Commit graph

9 commits

Author SHA1 Message Date
8a6a2f7662
Add ethereal keyword to endTurn 2026-02-25 09:22:02 -05:00
e05663d1c7
Add unplayable keyword to playCard 2026-02-25 09:20:19 -05:00
fe95c03529
Add exhaust keyword to playCard 2026-02-25 09:19:59 -05:00
4e457b80af
Add createCombatFromRun to create combat state from run 2026-02-25 08:02:04 -05:00
28e54d502f
Export shuffle from state and add getAllCards to cards module 2026-02-24 22:34:19 -05:00
886b744db8
Refactor playCard to options-based API instead of overloaded positional args 2026-02-23 23:30:06 -05:00
62425eadd7
Update combat orchestration for multiplayer turns
startTurn resets energy/block for all players and draws 5 cards each,
also resets playersReady. resolveEnemyTurn iterates all enemies,
resets each enemy's block, and has each enemy act against player 0.
checkCombatEnd checks all enemies (victory) and any player (defeat).
2026-02-23 23:30:06 -05:00
b2056d8368
Expand state model for multiple players and enemies
createCombatState now accepts arrays of characters and enemy IDs,
producing players[] and enemies[] arrays. Backward compat aliases
(state.player, state.enemy) are kept in sync. effects.js updated
to resolve entity descriptors as either legacy string keys or
{type, index} objects so both old and new call sites work.
2026-02-23 23:29:13 -05:00
a1f242d54e
Add state module with combat init, draw, play, end turn 2026-02-23 17:54:41 -05:00