diff options
| -rw-r--r-- | go/game/card.go | 2 | ||||
| -rw-r--r-- | go/game/cardParsing.go | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/go/game/card.go b/go/game/card.go index a7b9cc52..e52ad3dc 100644 --- a/go/game/card.go +++ b/go/game/card.go @@ -103,6 +103,7 @@ type cardImplementation interface { onEntering(*Tile) onLeaving(*Tile) onPlay(*State, *Card, *Player, *Targets) + onETB(*State, Permanent) onPile(containing Permanent) onUnpile(containing Permanent) onDrop(dropped Permanent) @@ -127,6 +128,7 @@ func (*cardImplementationBase) additionalSpawnsFor(Permanent, CardType) []*Tile func (*cardImplementationBase) onEntering(*Tile) {} func (*cardImplementationBase) onLeaving(*Tile) {} func (*cardImplementationBase) onPlay(*State, *Card, *Player, *Targets) {} +func (*cardImplementationBase) onETB(*State, Permanent) {} func (*cardImplementationBase) onPile(Permanent) {} func (*cardImplementationBase) onUnpile(Permanent) {} func (*cardImplementationBase) onDrop(Permanent) {} diff --git a/go/game/cardParsing.go b/go/game/cardParsing.go index b14f3f96..2a53926e 100644 --- a/go/game/cardParsing.go +++ b/go/game/cardParsing.go @@ -22,6 +22,7 @@ type dynamicCardImplementation struct { _onEntering func(*Tile) _onLeaving func(*Tile) _onPlay func(*State, *Card, *Player, *Targets) + _onETB func(*State, Permanent) _onPile func(Permanent) _onUnpile func(Permanent) _onDrop func(Permanent) @@ -83,6 +84,12 @@ func (impl *dynamicCardImplementation) onPlay(s *State, c *Card, p *Player, t *T } } +func (impl *dynamicCardImplementation) onETB(s *State, p Permanent) { + if impl._onETB != nil { + impl._onETB(s, p) + } +} + func (impl *dynamicCardImplementation) onPile(p Permanent) { if impl._onPile != nil { impl._onPile(p) |
