diff options
Diffstat (limited to 'go/game')
| -rw-r--r-- | go/game/cardImplementations.go | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/go/game/cardImplementations.go b/go/game/cardImplementations.go index 33d874b9..80865c1c 100644 --- a/go/game/cardImplementations.go +++ b/go/game/cardImplementations.go @@ -611,6 +611,31 @@ func (*unholyCannonballImpl) onPlay(s *State, _ *Card, kraken *Player, _ *Target } } +type illusionistImpl struct{ cardImplementationBase } + +func (*illusionistImpl) fullActions(u *Unit) []*FullAction { + resolvePrototype := func(a Action) ActionResolveFunc { + u := a.Source().(*Unit) + return func(s *State) { + t := a.Target().sel[0].(*Tile) + s.addNewUnit(NewCard("exp1/illusion"), t.Position, u.Controller()) + } + } + + s := u.Controller().gameState + a := newFullAction(u, resolvePrototype, "create illusion") + a.targets = newTargets(newTarget(s, newTargetDesc("adjacent free tile"), a)) + return []*FullAction{a} +} + +type illusionImpl struct{ cardImplementationBase } + +func (*illusionImpl) onETB(s *State, p Permanent) { + s.addTrigger(newTargetedTrigger(p, true, func(s *State) { + s.destroyPermanent(p) + }, p.Card().getEffects()[0])) +} + func init() { cardImplementations = map[string]cardImplementation{ "base/advisor": &advisorImpl{}, @@ -654,5 +679,8 @@ func init() { "kraken/tentacle_slap": &tentacleSlapImpl{}, "kraken/tides_change!": &tidesChangeImpl{}, "kraken/unholy_cannonball": &unholyCannonballImpl{}, + + "exp1/illusionist": &illusionistImpl{}, + "exp1/illusion": &illusionImpl{}, } } |
