Refactor: unified combat engine for PvE/PvP

- Create api/services/combat_engine.py with all shared combat logic
- Rewrite combat.py from 2820 to ~600 lines (thin orchestration)
- Fix buff consumption: fortify, berserker_rage, evade, foresight, iron_skin now actually work
- Fix stun: PvE skills now write stun to npc_status_effects
- Fix skill damage: now uses stats.attack_power consistently (includes perks)
- Fix PvPCombatActionRequest: add skill_id field for proper PvP skill support
- Remove dead code: PvP skill/item blocks copy-pasted into PvE endpoint
- Update game_logic.npc_attack to check buff modifiers (dodge, damage reduction, etc.)
This commit is contained in:
Joan
2026-02-25 12:10:45 +01:00
parent 540df02ae7
commit d5afd28eb9
4 changed files with 1693 additions and 2161 deletions

File diff suppressed because it is too large Load Diff