diff options
| -rw-r--r-- | go/client/game.go | 4 | ||||
| -rw-r--r-- | go/game/state.go | 10 |
2 files changed, 10 insertions, 4 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, diff --git a/go/game/state.go b/go/game/state.go index cf7b7111..577a0cb8 100644 --- a/go/game/state.go +++ b/go/game/state.go @@ -424,7 +424,7 @@ func (s *LocalState) declareAction(a Action) { err = a.CheckTargets(s) - if err != nil { + if err == nil { switch a.(type) { case *BuyAction: if s.activePhase != Phases.BuyPhase { @@ -446,9 +446,11 @@ func (s *LocalState) declareAction(a Action) { } s.broadcastNotification(newDeclaredActionNotification(a, err)) - t := a.Targets() - if t != nil { - s.events = append(s.events, newTargetEvent(a, t)) + if err == nil { + t := a.Targets() + if t != nil { + s.events = append(s.events, newTargetEvent(a, t)) + } } } |
