Commit Graph

1 Commits

Author SHA1 Message Date
Brian Fertig c7f4dc9bbb feat(combat): implement alternating initiative with enhanced attack animations
- Added `playerGoesFirst` state to `CombatEngine` to alternate turn order each round.
- Updated `beginTurn` and `beginCommit` to handle AI deployment based on the current initiative (opponent deploys first if they have initiative, otherwise after the player).
- Modified `_buildPendingAttacks` to respect the alternating attack order.
- Added `animateHPLoss` to `CardObject.js` for a visual HP reduction animation similar to the Berserk gain effect.
- Enhanced `_animateAttack` in `BattleScene.js`:
  - Integrated sprite animations for attacks (gun turret) and explosions using new spritesheets.
  - Synchronized HP loss and Berserk gain animations with the attack sprite completion.
  - Added an "Attacks First" indicator icon next to the commander of the side with initiative.
- Updated `BootScene.js` to load the new `attacksFirst` UI image and `attacks` spritesheet.
2026-03-13 10:31:09 -06:00