diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-09-08 20:42:26 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-09-08 20:42:26 +0200 |
| commit | 0cbb13f420840d49f1a2f12f97c779b263102337 (patch) | |
| tree | 0d81d94ae92e8dc002b269f4ac69d3dbcaf7f595 /go/game/cardImplementations.go | |
| parent | 492417cf3a8109a2f063dcffe4017dfda477fef3 (diff) | |
| download | muhqs-game-0cbb13f420840d49f1a2f12f97c779b263102337.tar.gz muhqs-game-0cbb13f420840d49f1a2f12f97c779b263102337.zip | |
implement spell target parsing and magic/no!
Diffstat (limited to 'go/game/cardImplementations.go')
| -rw-r--r-- | go/game/cardImplementations.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/go/game/cardImplementations.go b/go/game/cardImplementations.go index 0af99570..886bf3bb 100644 --- a/go/game/cardImplementations.go +++ b/go/game/cardImplementations.go @@ -324,6 +324,17 @@ func (*moreImpl) onPlay(a *PlayAction) { a.Controller().DrawN(2) } +type noImpl struct{ cardImplementationBase } + +func (*noImpl) playTargets() TargetDesc { + return newTargetDesc("declared spell") +} + +func (*noImpl) onPlay(a *PlayAction) { + s := a.Controller().gameState + s.counterAction(a.Target().Selection()[0].(Action)) +} + type pierceImpl struct{ cardImplementationBase } func (*pierceImpl) playTargets() TargetDesc { @@ -911,6 +922,7 @@ func init() { "magic/heal!": &healImpl{}, "magic/mine!": &mineImpl{}, "magic/more!": &moreImpl{}, + "magic/no!": &noImpl{}, "magic/pierce!": &pierceImpl{}, "magic/ritual!": &ritualImpl{}, "magic/rush!": &rushImpl{}, |
