aboutsummaryrefslogtreecommitdiff
path: root/go/client
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2024-12-27 12:41:38 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2025-01-27 16:43:58 +0100
commita504a91ef4ed49ba451de14f04ef02472dfcb189 (patch)
tree852dfcac3a47fd423095bf0b0d112322a7795e51 /go/client
parent4e2ab55d345fd5e5c5d2d5bc56948611b15564d5 (diff)
downloadmuhqs-game-a504a91ef4ed49ba451de14f04ef02472dfcb189.tar.gz
muhqs-game-a504a91ef4ed49ba451de14f04ef02472dfcb189.zip
improve and fix slow action timing check
Do not allow to declare slow play actions in the client. Fix the slow action check in the game state.
Diffstat (limited to 'go/client')
-rw-r--r--go/client/game.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/go/client/game.go b/go/client/game.go
index 50f0400b..6c2f41e0 100644
--- a/go/client/game.go
+++ b/go/client/game.go
@@ -502,6 +502,10 @@ func (g *Game) handleSelection(obj interface{}, x, y int) {
g.addPermActionChoice(perm, x, y)
case ui.HandCard:
+ if obj.C.IsPermanent() && !g.gameState.Stack().IsEmpty() {
+ return
+ }
+
if obj.C.PlayCosts.IsVariadic() {
g.addChoice(ui.NewNumberChoice(
g.Width-ui.NUMBER_CHOICE_WIDTH,