14 lines
1.9 KiB
Plaintext
14 lines
1.9 KiB
Plaintext
Phase 3 is complete. All gates pass (exit 0 for phases 1, 2, and 3).
|
||
|
||
## Summary of Phase 3 work
|
||
|
||
**New files created:**
|
||
- **`data/enemies.py`** — `ENEMIES` roster with exact plan.md values for all 8 kinds (rat 8/3/0/1/wander/5 … ancient_dragon 120/15/8/1/chase/200), plus `ranged_power:6` for the skeleton archer and `can_split:True` for green slime. Includes `ENEMY_FLOORS` kind→(min,max) windows.
|
||
- **`data/items.py`** — full 13-item catalog (4 weapons, 3 armor, 3 potions, 3 scrolls), each with `category`/`stats`/`effect`. `ITEM_BY_FLOOR(floor, rng)` does depth-scaled distribution (better gear deeper, consumables uniform).
|
||
- **`entities/item.py`** — `Item` as `@dataclass(slots=True)` with `name, category, x, y, stats, effect, glyph, color`; `make_item(name,x,y)` reads `ITEMS` and copies stats/effect per-instance.
|
||
|
||
**Updated files:**
|
||
- **`entities/player.py`** — added `total_crit_chance()` / `total_evasion()` (fold in War Hammer −5% crit and Plate Armor −10% evasion), strength-potion bonus in `total_power()`, `tick_effects()`, `quaff(idx, log)` (heal/strength/invisibility, consumes item) and `read_scroll(idx, ctx, log, target)` (fireball AoE+XP+split, teleport, mapping). That's 6 distinct working effects.
|
||
- **`engine/combat.py`** — `resolve_attack` now prefers `total_power/total_armor/total_crit_chance/total_evasion` accessors (so equipped gear matters) while keeping the namedtuple fallback for the phase-2 contract; added `handle_enemy_death` (XP, corpse removal, green-slime→2 small_slime split only when `can_split`) and `check_player_death` (safe hp≤0 path).
|
||
- **`engine/map_gen.py`** — `spawn_entities` now spawns enemies gated by `ENEMY_FLOORS` and items via `ITEM_BY_FLOOR`, respecting per-floor count tables, avoiding the player's spawn room; floor 9 builds the boss arena with exactly one ancient_dragon + two healing potions, no other enemies, no stairs.
|