diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2024-03-25 18:33:12 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-01-27 16:43:56 +0100 |
| commit | d6464e07d91d49e6b79c6b21768fcc086e862277 (patch) | |
| tree | 109d65a83fab022392cdf3a624eb5f0c60eca944 | |
| parent | 7037ff094b7633c704b8cfb962c45ffa3c2bc238 (diff) | |
| download | muhqs-game-d6464e07d91d49e6b79c6b21768fcc086e862277.tar.gz muhqs-game-d6464e07d91d49e6b79c6b21768fcc086e862277.zip | |
add death trigger to flyingDutchmenImpl
| -rw-r--r-- | go/game/cardImplementations.go | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/go/game/cardImplementations.go b/go/game/cardImplementations.go index 80865c1c..f304ee1c 100644 --- a/go/game/cardImplementations.go +++ b/go/game/cardImplementations.go @@ -464,15 +464,23 @@ func (*dolphinImpl) fullActions(u *Unit) []*FullAction { return []*FullAction{a} } -type drownedSailorImpl struct { sailorImpl } +type drownedSailorImpl struct{ sailorImpl } func (*drownedSailorImpl) onDrop(sailor Permanent) { sailor.Controller().gameState.destroyPermanent(sailor) } -// TODO: implement death trigger -// TODO: implement hook for the containing permanent on pile -type flyingDutchmenImpl struct{ cardImplementation } +// TODO: implement hook for the containing permanent on pile to change AI +type flyingDutchmenImpl struct{ cardImplementationBase } + +func (*flyingDutchmenImpl) onETB(s *State, p Permanent) { + s.addTrigger(newEnemyDeathTrigger(p, func(s *State) { + sailor := NewCard("kraken/drowned_sailor") + if p.Tile().IsAvailableForCard(sailor) { + addPermanentToPile(p, NewUnit(sailor, nil, p.Controller())) + } + }, p.Card().getEffects()[1])) +} type frostPylonAoE struct{} |
