aboutsummaryrefslogtreecommitdiff
path: root/go/game/state.go
Commit message (Collapse)AuthorAgeFilesLines
* add support for flexible attacksFlorian Fischer2025-08-051-1/+1
|
* minor code improvements reported by golangci-lintFlorian Fischer2025-07-301-18/+19
|
* only clear the selections if the target is not nilFlorian Fischer2025-07-281-3/+6
|
* reset an action's targets after resolving itFlorian Fischer2025-07-281-0/+2
|
* set activePlayerId when adding the first new playerFlorian Fischer2025-07-241-4/+11
|
* check the wincondition after the state based actionsFlorian Fischer2025-07-241-24/+59
|
* implement house tile effectFlorian Fischer2025-07-221-0/+14
|
* add comments and action assertionFlorian Fischer2025-07-221-0/+4
|
* panic if we try to resolve an unknown card typeFlorian Fischer2025-07-221-1/+1
|
* fix king map preparationFlorian Fischer2025-07-221-1/+3
|
* remove player color from game codeFlorian Fischer2025-07-191-7/+12
|
* add methods to control a LocalState without enforcing game rulesFlorian Fischer2025-07-061-7/+40
|
* refactor playerControlFlorian Fischer2025-07-061-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-07-061-1/+3
|
* move hand card removal to the play action's costsFlorian Fischer2025-07-031-3/+0
|
* change phase names to match the rulesFlorian Fischer2025-07-031-3/+3
|
* return the player after adding itFlorian Fischer2025-07-031-3/+4
|
* small code modernization and refactoringFlorian Fischer2025-07-031-1/+1
|
* fix retrieving of the active playerFlorian Fischer2025-05-011-1/+1
| | | | Fixes: 4e2ab55d
* finish the target-oriented aiFlorian Fischer2025-01-271-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-01-271-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-01-271-107/+189
| | | | | This allows to not use the internal game state directly from client code.
* pass the PlayAction to the cards onPlay implementationsFlorian Fischer2025-01-271-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-01-271-2/+7
|
* emit target and death eventsFlorian Fischer2025-01-271-0/+12
|
* run state based actions before players receive priorityFlorian Fischer2025-01-271-0/+1
|
* prompt the user to order its triggersFlorian Fischer2025-01-271-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-01-271-1/+46
|
* remove unused members and make EotEffects privateFlorian Fischer2025-01-271-7/+4
|
* implement equipment with next unit play optionFlorian Fischer2025-01-271-34/+50
| | | | Also make more state methods private.
* intermediate commitFlorian Fischer2025-01-271-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-01-271-3/+13
| | | | | | * implement dopping piles * implement simple spell targeting * add some simple spells
* fixup! validate equip and switch actionsFlorian Fischer2025-01-271-6/+7
|
* validate equip and switch actionsFlorian Fischer2025-01-271-1/+39
|
* export less methodsFlorian Fischer2025-01-271-16/+16
|
* implement unit and artifact switch actionFlorian Fischer2025-01-271-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-01-271-3/+3
| | | | Panicf includes a stacktrace and causes a debugger to halt.
* implement the basics of the rest of the base cardsFlorian Fischer2025-01-271-0/+12
| | | | | * Add more TODOs * Implement permanents granting more spawn tiles
* intermediate commitFlorian Fischer2025-01-271-3/+15
| | | | | | | | | | | | * fix a lot of target and action bugs * check target selection before adding it to the prompt * use the store view for stores on the map * fix card highlighting in CardGrid * Only prompt for Upkeep-/DiscardActions if appropriate * Add helper for areaEffects granting new FullActions * Add Target() helper selecting the first target to the Action interface * Fix BuyAction and DiscardAction targets * Remember the stores a player has seen
* intermediate commitFlorian Fischer2025-01-271-17/+19
|
* remove card from hand when declaring a play actionFlorian Fischer2025-01-271-0/+3
|
* intermediate commitFlorian Fischer2025-01-271-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-01-271-3/+5
| | | | | | * implement most of the kraken cards * unify permanent marks * add state based actions hook for card implementations
* intermediate commitFlorian Fischer2025-01-271-6/+14
| | | | adding area effects and hooks for permanents entering and leaving tiles
* add simple spell supportFlorian Fischer2025-01-271-0/+2
|
* fix some warnings reported by golang-ciFlorian Fischer2025-01-271-1/+1
|
* improve permanent pile supportFlorian Fischer2025-01-271-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-01-271-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-01-271-1/+1
|
* change unit attack representation and implement swordFlorian Fischer2025-01-271-3/+3
|