From 0cbb13f420840d49f1a2f12f97c779b263102337 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 8 Sep 2025 20:42:26 +0200 Subject: implement spell target parsing and magic/no! --- go/game/cardImplementations.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'go/game/cardImplementations.go') 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{}, -- cgit v1.2.3