mantimon-tcg/backend/app/core/models
Cal Corum 325f1e8af5 Refactor turn action tracking from booleans to counters for RulesConfig support
Replace hardcoded boolean flags with integer counters to support configurable
per-turn limits from RulesConfig. This enables custom game modes with different
rules (e.g., 2 energy attachments per turn, unlimited items, etc.).

PlayerState changes:
- energy_attached_this_turn -> energy_attachments_this_turn (int)
- supporter_played_this_turn -> supporters_played_this_turn (int)
- stadium_played_this_turn -> stadiums_played_this_turn (int)
- retreated_this_turn -> retreats_this_turn (int)
- Added items_played_this_turn (int)
- Added can_play_stadium() and can_play_item() methods
- Renamed reset_turn_flags() to reset_turn_state()

Ability/CardInstance changes:
- Ability.once_per_turn (bool) -> uses_per_turn (int|None)
- CardInstance.ability_used_this_turn -> ability_uses_this_turn (int)
- Added CardInstance.can_use_ability(ability) method

All methods now properly compare counters against RulesConfig or Ability limits.
270 tests passing.
2026-01-24 23:16:37 -06:00
..
__init__.py Add GameState, PlayerState, Zone models and test fixtures 2026-01-24 22:55:31 -06:00
actions.py Add card/action models with stage/variant separation 2026-01-24 22:35:31 -06:00
card.py Refactor turn action tracking from booleans to counters for RulesConfig support 2026-01-24 23:16:37 -06:00
enums.py Add card/action models with stage/variant separation 2026-01-24 22:35:31 -06:00
game_state.py Refactor turn action tracking from booleans to counters for RulesConfig support 2026-01-24 23:16:37 -06:00