Files
agentic-labs-challenge/underdepths/data/enemies.py
T
2026-08-12 18:44:04 +02:00

84 lines
2.7 KiB
Python

"""Enemy roster — the authoritative stats for every monster kind.
Each entry is a plain dict consumed by ``entities.enemy.make_enemy``. Values
mirror plan.md's Enemy Roster exactly; do not renumber them without updating
both the plan and ``tests/smoke.py``.
Per-kind keys:
name, hp, power, armor, speed, behavior, xp (every kind)
ranged_power (skeleton_archer)
can_split (green_slime)
glyph, color (rendering hints)
"""
from __future__ import annotations
__all__ = ["ENEMIES", "ENEMY_FLOORS"]
ENEMIES: dict[str, dict] = {
"rat": {
"name": "Rat",
"hp": 8, "power": 3, "armor": 0, "speed": 1,
"behavior": "wander", "xp": 5,
"glyph": "r", "color": (150, 100, 50),
},
"goblin": {
"name": "Goblin",
"hp": 15, "power": 5, "armor": 1, "speed": 1,
"behavior": "chase", "xp": 12,
"glyph": "g", "color": (70, 180, 80),
},
"skeleton_archer": {
"name": "Skeleton Archer",
"hp": 12, "power": 4, "ranged_power": 6,
"armor": 1, "speed": 1,
"behavior": "ranged", "xp": 15,
"glyph": "s", "color": (210, 210, 210),
},
"orc_warrior": {
"name": "Orc Warrior",
"hp": 30, "power": 8, "armor": 3, "speed": 1,
"behavior": "flee", "xp": 25,
"glyph": "o", "color": (140, 40, 40),
},
"wraith": {
"name": "Wraith",
"hp": 20, "power": 10, "armor": 0, "speed": 2,
"behavior": "phase", "xp": 30,
"glyph": "w", "color": (160, 90, 210),
},
"green_slime": {
"name": "Green Slime",
"hp": 18, "power": 5, "armor": 1, "speed": 1,
"behavior": "split", "xp": 18, "can_split": True,
"glyph": "j", "color": (100, 220, 100),
},
"ancient_dragon": {
"name": "Ancient Dragon",
"hp": 120, "power": 15, "armor": 8, "speed": 1,
"behavior": "chase", "xp": 200,
"glyph": "D", "color": (235, 50, 50),
},
"small_slime": {
"name": "Small Slime",
"hp": 9, "power": 3, "armor": 1, "speed": 1,
"behavior": "wander", "xp": 6,
"glyph": "i", "color": (130, 230, 130),
},
}
# Inclusive (min_floor, max_floor) window each kind may spawn on, per plan.md's
# "Floors" column. ``small_slime`` is only ever produced by a green-slime split
# (never placed directly), so its window is the full descent; ``ancient_dragon``
# is the floor-9 boss and never appears elsewhere.
ENEMY_FLOORS: dict[str, tuple[int, int]] = {
"rat": (0, 3),
"goblin": (0, 5),
"skeleton_archer": (2, 7),
"orc_warrior": (3, 8),
"green_slime": (4, 8),
"wraith": (5, 8),
"ancient_dragon": (9, 9),
"small_slime": (0, 9),
}