aboutsummaryrefslogtreecommitdiff
path: root/go/game/state.go
Commit message (Collapse)AuthorAgeFilesLines
* fix reported stores by the game stateFlorian Fischer2025-09-031-4/+13
|
* fix and test the banner implementationFlorian Fischer2025-08-221-2/+2
| | | | Fixes: 0667db9e5a765cbd1eec90b63fb8cd0a6e0a2dc7
* support concessionsFlorian Fischer2025-08-211-3/+24
|
* remove logged newline and button list debug messageFlorian Fischer2025-08-201-1/+1
|
* add description to wincondition to show the userFlorian Fischer2025-08-201-1/+1
|
* do not check the target constraints twiceFlorian Fischer2025-08-201-38/+0
|
* remove timing checks from action validationFlorian Fischer2025-08-201-43/+2
|
* add more eventsFlorian Fischer2025-08-201-1/+4
|
* use slog and add game log handler callbackFlorian Fischer2025-08-201-2/+3
|
* reset the tile of a destroyed permanent to allow the processing of the pile dropFlorian Fischer2025-08-201-1/+3
|
* implement mace and add damage dealt events/triggersFlorian Fischer2025-08-201-46/+6
|
* improve timing of declared actionsFlorian Fischer2025-08-201-18/+30
|
* git enforce slow action timing restrictionsFlorian Fischer2025-08-201-2/+14
|
* add support for flexible attacksFlorian Fischer2025-08-201-1/+1
|
* minor code improvements reported by golangci-lintFlorian Fischer2025-08-201-18/+19
|
* only clear the selections if the target is not nilFlorian Fischer2025-08-201-3/+6
|
* reset an action's targets after resolving itFlorian Fischer2025-08-201-0/+2
|
* set activePlayerId when adding the first new playerFlorian Fischer2025-08-201-4/+11
|
* check the wincondition after the state based actionsFlorian Fischer2025-08-201-24/+59
|
* implement house tile effectFlorian Fischer2025-08-201-0/+14
|
* add comments and action assertionFlorian Fischer2025-08-201-0/+4
|
* panic if we try to resolve an unknown card typeFlorian Fischer2025-08-201-1/+1
|
* fix king map preparationFlorian Fischer2025-08-201-1/+3
|
* remove player color from game codeFlorian Fischer2025-08-201-7/+12
|
* add methods to control a LocalState without enforcing game rulesFlorian Fischer2025-08-201-7/+40
|
* refactor playerControlFlorian Fischer2025-08-201-4/+13
| | | | | | | Allow to propagate errors in order to handle them acordingly. Use playerNotifications by value to reduce the amount of allocations. Add session managment playerNotifications. Support marshalling notifications to plain text.
* 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