From 805cbf397589e5cb861f866713c2eb4bec9ce40b Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 8 Feb 2023 17:50:10 +0100 Subject: intermediate commit --- go/game/cardImplementations.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'go/game/cardImplementations.go') diff --git a/go/game/cardImplementations.go b/go/game/cardImplementations.go index 3a7a729a..a9da5fb1 100644 --- a/go/game/cardImplementations.go +++ b/go/game/cardImplementations.go @@ -34,7 +34,7 @@ type missionaryImpl struct{ cardImplementationBase } func (*missionaryImpl) fullActions(u *Unit) []*FullAction { resolvePrototype := func(a Action) ActionResolveFunc { u := a.Source().(*Unit) - target := a.Targets().sel[0].(*Unit) + target := a.Targets().ts[0].sel[0].(*Unit) return func(s *State) { target.addMarks(UnitMarks.Faith, 2) if target.Marks(UnitMarks.Faith) > target.Card().BuyCost { @@ -42,7 +42,10 @@ func (*missionaryImpl) fullActions(u *Unit) []*FullAction { } } } - return []*FullAction{NewFullAction(u, resolvePrototype, "put faith ...")} + s := u.Controller().gameState + a := NewFullAction(u, resolvePrototype, "put faith ...") + a.targets = newTargets(newTarget(s, newTargetDesc("unit"), a)) + return []*FullAction{a} } type swordImpl struct{ cardImplementationBase } @@ -126,12 +129,12 @@ func (*fisherImpl) fullActions(u *Unit) []*FullAction { resolvePrototype := func(a Action) ActionResolveFunc { u := a.Source().(*Unit) return func(s *State) { - t := a.Targets().sel[0].(*Tile) + t := a.Targets().ts[0].sel[0].(*Tile) s.AddNewArtifact(NewCard("nautics/fish_trap"), t.Position, u.Controller()) } } a := NewFullAction(u, resolvePrototype, "create fish trap") - a.targets = newTargets(s, []string{"adjacent water tile"}, a) + a.targets = newTargets(newTarget(s, newTargetDesc("adjacent water tile"), a)) return []*FullAction{a} } -- cgit v1.2.3