From 46819d5eb7ce7dd174db9eba254eed583adbf01a Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 26 Mar 2024 21:31:47 +0100 Subject: check if Targets allow a selection This fixes highlighting when an action needs no targets at all. --- go/client/game.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'go/client') diff --git a/go/client/game.go b/go/client/game.go index 4d265e4b..8c7d50ad 100644 --- a/go/client/game.go +++ b/go/client/game.go @@ -501,7 +501,7 @@ func (g *Game) handleSelection(obj interface{}, x, y int) { case ui.HandCard: a := game.NewPlayAction(g.activePlayer, obj.C) targets := a.Targets() - if targets != nil && targets.Cur().AllowSelection() { + if targets != nil && targets.AllowSelection() { g.addPrompt(a, fmt.Sprintf("Select targets to play %v", obj.C.Name)) g.handLayer.HighlightCard(obj.C, ui.HighlightSelectionColor) } else { -- cgit v1.2.3