aboutsummaryrefslogtreecommitdiff
path: root/go/game/card.go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2024-12-26 18:52:15 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2025-01-27 16:43:57 +0100
commit5684983b963eeb2f498028360ebc17cc2fb32564 (patch)
tree0a9e4c95b7d38ff664190eaee7168830997efcbf /go/game/card.go
parentd1d926debe4d261e057980f325741440b3d76609 (diff)
downloadmuhqs-game-5684983b963eeb2f498028360ebc17cc2fb32564.tar.gz
muhqs-game-5684983b963eeb2f498028360ebc17cc2fb32564.zip
pass the PlayAction to the cards onPlay implementations
This is done to propagate the chosen variadic play cost to the card implementation.
Diffstat (limited to 'go/game/card.go')
-rw-r--r--go/game/card.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/go/game/card.go b/go/game/card.go
index be198d5a..ee16346c 100644
--- a/go/game/card.go
+++ b/go/game/card.go
@@ -102,7 +102,7 @@ type cardImplementation interface {
onEntering(*Tile)
onLeaving(*Tile)
- onPlay(*State, *Card, *Player, *Targets)
+ onPlay(*PlayAction)
onETB(*State, Permanent)
onPile(containing Permanent)
onUnpile(containing Permanent)
@@ -125,13 +125,13 @@ func (*cardImplementationBase) stateBasedActions(*State, Permanent) {}
func (*cardImplementationBase) additionalSpawnsFor(Permanent, CardType) []*Tile { return nil }
-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) {}
+func (*cardImplementationBase) onEntering(*Tile) {}
+func (*cardImplementationBase) onLeaving(*Tile) {}
+func (*cardImplementationBase) onPlay(*PlayAction) {}
+func (*cardImplementationBase) onETB(*State, Permanent) {}
+func (*cardImplementationBase) onPile(Permanent) {}
+func (*cardImplementationBase) onUnpile(Permanent) {}
+func (*cardImplementationBase) onDrop(Permanent) {}
// Map of all card implementations
var cardImplementations map[string]cardImplementation