Files
agentic-labs-challenge/underdepths/data/enemies.py
T
2026-08-13 07:28:55 +02:00

50 lines
2.2 KiB
Python

"""Enemy roster. Stats match plan.md Enemy Roster exactly."""
from __future__ import annotations
from data.constants import ENEMY_COLORS
# accuracy/evasion/crit_chance are not enumerated in the plan's roster table;
# sensible defaults per enemy keep combat fair without contradicting it.
ENEMIES: dict[str, dict] = {
"Rat": {
"hp": 8, "power": 3, "armor": 0, "accuracy": 4, "evasion": 2,
"crit_chance": 0.05, "speed": 1, "behavior": "wander", "xp": 5,
"ranged_power": 0, "floors": (0, 3), "color": ENEMY_COLORS["Rat"],
},
"Goblin": {
"hp": 15, "power": 5, "armor": 1, "accuracy": 5, "evasion": 1,
"crit_chance": 0.05, "speed": 1, "behavior": "chase", "xp": 12,
"ranged_power": 0, "floors": (0, 5), "color": ENEMY_COLORS["Goblin"],
},
"Skeleton Archer": {
"hp": 12, "power": 4, "armor": 1, "accuracy": 6, "evasion": 1,
"crit_chance": 0.10, "speed": 1, "behavior": "ranged", "xp": 15,
"ranged_power": 6, "floors": (2, 7), "color": ENEMY_COLORS["Skeleton Archer"],
},
"Orc Warrior": {
"hp": 30, "power": 8, "armor": 3, "accuracy": 4, "evasion": 0,
"crit_chance": 0.05, "speed": 1, "behavior": "flee", "xp": 25,
"ranged_power": 0, "floors": (3, 8), "color": ENEMY_COLORS["Orc Warrior"],
},
"Wraith": {
"hp": 20, "power": 10, "armor": 0, "accuracy": 6, "evasion": 3,
"crit_chance": 0.10, "speed": 2, "behavior": "phase", "xp": 30,
"ranged_power": 0, "floors": (5, 8), "color": ENEMY_COLORS["Wraith"],
},
"Green Slime": {
"hp": 18, "power": 5, "armor": 1, "accuracy": 4, "evasion": 0,
"crit_chance": 0.05, "speed": 1, "behavior": "split", "xp": 18,
"ranged_power": 0, "floors": (4, 8), "color": ENEMY_COLORS["Green Slime"],
},
"Ancient Dragon": {
"hp": 120, "power": 15, "armor": 8, "accuracy": 7, "evasion": 1,
"crit_chance": 0.10, "speed": 1, "behavior": "chase", "xp": 200,
"ranged_power": 0, "floors": (9, 9), "color": ENEMY_COLORS["Ancient Dragon"],
},
}
def enemies_for_floor(floor_index: int) -> list[str]:
return [k for k, v in ENEMIES.items()
if v["floors"][0] <= floor_index <= v["floors"][1]]