mantimon-tcg/backend/app/core
Cal Corum 72bd1102df Add weakness/resistance support to attack damage calculation
- Add DamageCalculationResult model for transparent damage breakdown
- Implement _calculate_attack_damage with W/R modifiers (additive/multiplicative)
- Add _execute_attack_effect for future effect system integration
- Add _build_attack_message for detailed damage breakdown in messages
- Update _execute_attack to use new calculation pipeline
- Bulbasaur now properly weak to Lightning in walkthrough demo

New features:
- Weakness applies bonus damage (additive +X or multiplicative xN)
- Resistance reduces damage (minimum 0)
- State changes include weakness/resistance details for UI
- Messages show damage breakdown (e.g. 'base 10 +20 weakness')

Tests: 7 new tests covering additive/multiplicative W/R, type matching,
minimum damage floor, knockout triggers, and state change details
2026-01-26 16:04:41 -06:00
..
effects Move enums to app/core/enums.py and set up clean module exports 2026-01-26 14:45:26 -06:00
models Move enums to app/core/enums.py and set up clean module exports 2026-01-26 14:45:26 -06:00
__init__.py Move enums to app/core/enums.py and set up clean module exports 2026-01-26 14:45:26 -06:00
AGENTS.md Add core module AGENTS.md documentation (DOCS-001) 2026-01-26 14:50:52 -06:00
config.py Move enums to app/core/enums.py and set up clean module exports 2026-01-26 14:45:26 -06:00
engine.py Add weakness/resistance support to attack damage calculation 2026-01-26 16:04:41 -06:00
enums.py Move enums to app/core/enums.py and set up clean module exports 2026-01-26 14:45:26 -06:00
rng.py Add game engine foundation: enums, config, and RNG modules 2026-01-24 22:14:45 -06:00
rules_validator.py Move enums to app/core/enums.py and set up clean module exports 2026-01-26 14:45:26 -06:00
turn_manager.py Move enums to app/core/enums.py and set up clean module exports 2026-01-26 14:45:26 -06:00
visibility.py Move enums to app/core/enums.py and set up clean module exports 2026-01-26 14:45:26 -06:00
win_conditions.py Move enums to app/core/enums.py and set up clean module exports 2026-01-26 14:45:26 -06:00