Files
agentic-labs-challenge/underdepths/entities/enemy.py
T
2026-08-15 19:22:48 +02:00

30 lines
623 B
Python

from __future__ import annotations
from dataclasses import dataclass
from entities.entity import Entity
@dataclass(slots=True)
class Enemy(Entity):
key: str = ""
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
splits_remaining: int = 0
xp_reward: int = 0
last_known_position: tuple[int, int] | None = None
@property
def alive(self) -> bool:
return self.hp > 0