(Underdepths) Pass 7

This commit is contained in:
AlexKucera committed 2026-08-16 19:10:31 +02:00
1 parent e0ea5bb034
commit e254511b56
40 files changed
+8023 -35

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
from __future__ import annotations
from dataclasses import dataclass
from entities.entity import Entity
@dataclass(slots=True)
class Enemy(Entity):
key: str = "enemy"
name: str = "Enemy"
sprite_key: str = "enemy"
hp: int = 1
max_hp: int = 1
power: int = 1
armor: int = 0
accuracy: int = 0
evasion: int = 0
crit_chance: float = 0.0
speed: int = 1
behavior: str = "wander"
ranged_power: int = 0
xp_reward: int = 0
last_known_position: tuple[int, int] | None = None
@property
def alive(self) -> bool:
return self.hp > 0