From f9ab2cfdb25eb3fcd85868a2e375326a9c8b6022 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 15 Feb 2023 13:13:06 +0100 Subject: intermediate commit * 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 --- go/game/permanent.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'go/game/permanent.go') diff --git a/go/game/permanent.go b/go/game/permanent.go index f25c95b3..ecc4459a 100644 --- a/go/game/permanent.go +++ b/go/game/permanent.go @@ -22,7 +22,7 @@ type Permanent interface { HasEffect(string) bool XEffect(string) (int, error) Marks(PermanentMark) int - addMarks(PermanentMark, int) + adjustMarks(PermanentMark, int) String() string Fight(p Permanent) @@ -137,7 +137,7 @@ func (p *PermanentBase) Marks(mark PermanentMark) int { return 0 } -func (p *PermanentBase) addMarks(mark PermanentMark, amount int) { +func (p *PermanentBase) adjustMarks(mark PermanentMark, amount int) { if amount, found := p.marks[mark]; found { p.marks[mark] += amount } else { @@ -195,8 +195,8 @@ func DropPile(containing Permanent) { func enterTile(p Permanent, t *Tile) { p.SetTile(t) - p.Card().Impl.onEntering(t) t.entering(p) + p.Card().Impl.onEntering(t) } func leaveTile(p Permanent) { -- cgit v1.2.3