(Underdepths) Prepare for Pass 4

This commit is contained in:
AlexKucera committed 2026-08-13 09:05:25 +02:00
1 parent e2a47aba6b
commit 8249da7e9b
33 files changed
+123 -4173

No files matched your search

-31
View File
@@ -1,31 +0,0 @@
"""Item: equipment and consumables. Built from the data.items catalog."""
from __future__ import annotations
from dataclasses import dataclass
from entities.entity import Entity
from data.items import ITEM_CATALOG
from data.constants import COLORS
@dataclass(slots=True)
class Item(Entity):
# kind has a default because Entity's fields already carry defaults, and a
# dataclass cannot place a required field after defaulted ones. make_item
# always sets it, so "" is never observed in practice.
kind: str = ""
sub: str = ""
power: int = 0
armor: int = 0
evasion_delta: float = 0.0
crit_delta: float = 0.0
heal: int = 0
duration: int = 0
radius: int = 0
damage: int = 0
value: int = 0
def make_item(name: str) -> Item:
stats = ITEM_CATALOG[name]
return Item(name=name, color=COLORS[stats["kind"]], **stats)