aboutsummaryrefslogtreecommitdiff
path: root/go/game/state.go
Commit message (Collapse)AuthorAgeFilesLines
* support king gamesFlorian Fischer2025-08-201-1/+3
|
* move hand card removal to the play action's costsFlorian Fischer2025-08-201-3/+0
|
* change phase names to match the rulesFlorian Fischer2025-08-201-3/+3
|
* return the player after adding itFlorian Fischer2025-08-201-3/+4
|
* small code modernization and refactoringFlorian Fischer2025-08-201-1/+1
|
* fix retrieving of the active playerFlorian Fischer2025-08-201-1/+1
| | | | Fixes: 4e2ab55d
* finish the target-oriented aiFlorian Fischer2025-08-201-2/+3
| | | | | | | | | Fix path selection choosing a to big step, since the next step was determined by the moving range and not the actually available movement tiles. Fix generating a target for the AI by introducing a dummy action to support "enemy" target constraints.
* improve and fix slow action timing checkFlorian Fischer2025-08-201-4/+6
| | | | | Do not allow to declare slow play actions in the client. Fix the slow action check in the game state.
* introduce game.State interface abstractionFlorian Fischer2025-08-201-107/+189
| | | | | This allows to not use the internal game state directly from client code.
* pass the PlayAction to the cards onPlay implementationsFlorian Fischer2025-08-201-2/+5
| | | | | This is done to propagate the chosen variadic play cost to the card implementation.
* fix trigger ordering for kraken AI always sending PassPriorityFlorian Fischer2025-08-201-2/+7
|
* emit target and death eventsFlorian Fischer2025-08-201-0/+12
|
* run state based actions before players receive priorityFlorian Fischer2025-08-201-0/+1
|
* prompt the user to order its triggersFlorian Fischer2025-08-201-7/+38
| | | | | | | | All TriggeredAction are passed in the wrapper action DeclareTriggeredActionsAction to the controller of the triggers. It is expected to receive an ordered list back from the user again wrapped in a DeclareTriggeredActionsAction. The triggered actions will be declared in from first to last.
* add skeleton for triggers and triggered actionsFlorian Fischer2025-08-201-1/+46
|
* remove unused members and make EotEffects privateFlorian Fischer2025-08-201-7/+4
|
* implement equipment with next unit play optionFlorian Fischer2025-08-201-34/+50
| | | | Also make more state methods private.
* intermediate commitFlorian Fischer2025-08-201-4/+39
| | | | | | | | | | | * Implement move artifact action * Fix widget update memory leak * update the highlights not during on each frame * do not update the unchanged label of a button * Allow to exit the game by pressing 'q' * Implement some cards from the magic set * Improve permanent formatting * Some tweaks to UnitAI code
* intermeditae commitFlorian Fischer2025-08-201-3/+13
| | | | | | * implement dopping piles * implement simple spell targeting * add some simple spells
* validate equip and switch actionsFlorian Fischer2025-08-201-1/+40
|
* export less methodsFlorian Fischer2025-08-201-16/+16
|
* implement unit and artifact switch actionFlorian Fischer2025-08-201-0/+11
| | | | | | | | | | Simplify the Choice Widget and make it a TextBox variant. Drive-by fixes: * ui.Collection: prioritize newer widgets during active widget selection * game.FullAction: fix incorrect cost function. Full actions cost all available actions. Also fix the cost check
* replace Fatalf with PanicfFlorian Fischer2025-08-201-3/+3
| | | | Panicf includes a stacktrace and causes a debugger to halt.
* implement the basics of the rest of the base cardsFlorian Fischer2025-08-201-0/+12
| | | | | * Add more TODOs * Implement permanents granting more spawn tiles
* intermediate commitFlorian Fischer2025-08-201-17/+31
|
* remove card from hand when declaring a play actionFlorian Fischer2025-08-201-0/+3
|
* intermediate commitFlorian Fischer2025-08-201-4/+5
| | | | | | * detect tokens and do not add them to pile of cards * only add spells not already in exile to their owners discard pile * add the played card to onPlay callback
* intermediate commitFlorian Fischer2025-08-201-9/+19
| | | | adding area effects and hooks for permanents entering and leaving tiles
* add simple spell supportFlorian Fischer2025-08-201-0/+2
|
* fix some warnings reported by golang-ciFlorian Fischer2025-08-201-1/+1
|
* improve permanent pile supportFlorian Fischer2025-08-201-6/+6
| | | | | | * Fix alot of bugs caused by permanents without tiles * Implement a permanent choice to select the permanents in a pile * Fix how pile hooks are called
* introduce state-based actionFlorian Fischer2025-08-201-9/+11
| | | | | | | | State-based action are executed anytime a action resolved to handle events caused by the game state. Currently state-based actions only destroy unit with more damage than health.
* fix IsValidAttack unit type assertionFlorian Fischer2025-08-201-1/+1
|
* change unit attack representation and implement swordFlorian Fischer2025-08-201-3/+3
|
* intermediate commitFlorian Fischer2025-08-201-0/+453