From 9a0e003c823115baeaf3d9b2b7d3f3b74df8b096 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 15 Aug 2025 23:49:42 +0200 Subject: include the tile where a pile is dropped in the action --- go/game/action.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'go/game/action.go') diff --git a/go/game/action.go b/go/game/action.go index 08ef25cf..f588dce5 100644 --- a/go/game/action.go +++ b/go/game/action.go @@ -211,19 +211,19 @@ func NewDeclareTriggeredActionsAction(t []*TriggeredAction) *DeclareTriggeredAct type PileDropAction struct { ActionBase pile []Permanent + tile *Tile } func (a *PileDropAction) String() string { perm := a.source.(Permanent) controller := perm.Controller() if a.targets.RequireSelection() { - return fmt.Sprintf("%s drop %v", controller.Name, perm.Tile().Position) + return fmt.Sprintf("%s drop %v", controller.Name, a.tile) } s := fmt.Sprintf("%s drop [", controller.Name) - pile := perm.Pile() for i, t := range a.targets.ts { - s = fmt.Sprintf("%s %v@%v,", s, pile[i], t.sel[0]) + s = fmt.Sprintf("%s %v@%v,", s, a.pile[i], t.sel[0]) } return s[:len(s)-1] + " ]" } @@ -237,6 +237,7 @@ func newPileDropAction(perm Permanent, tile *Tile, pile []Permanent) *PileDropAc source: perm, }, pile, + tile, } a.resolveFunc = func(s *LocalState) { -- cgit v1.2.3