diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-02-26 10:58:22 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-08-20 15:57:07 +0200 |
| commit | a1ab548f016f07171224d59cbaae37c35a47a24a (patch) | |
| tree | 9c081373c26dc1674110ea01c1e3c405d7a3bde6 /go | |
| parent | 278e2aed7201cdaab90ddfafac0ac76410169980 (diff) | |
| download | muhqs-game-a1ab548f016f07171224d59cbaae37c35a47a24a.tar.gz muhqs-game-a1ab548f016f07171224d59cbaae37c35a47a24a.zip | |
prompt for selection if the targets allow selections
Diffstat (limited to 'go')
| -rw-r--r-- | go/client/game.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/go/client/game.go b/go/client/game.go index 787987d5..2ea3a9f4 100644 --- a/go/client/game.go +++ b/go/client/game.go @@ -474,7 +474,8 @@ func (g *Game) handleSelection(obj interface{}, x, y int) { case ui.HandCard: a := game.NewPlayAction(g.activePlayer, obj.C) - if a.Targets().RequireSelection() { + targets := a.Targets() + if targets != nil && targets.Cur().AllowSelection() { g.addPrompt(a, fmt.Sprintf("Select targets to play %v", obj.C.Name)) g.handLayer.HighlightCard(obj.C, ui.HighlightSelectionColor) } else { |
