From 4f8dad957f345e69a686d5348b4baca6473c4ac9 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 6 Aug 2025 16:34:01 +0200 Subject: add naive spear implementation --- go/game/cardImplementations.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'go') diff --git a/go/game/cardImplementations.go b/go/game/cardImplementations.go index 3d5ec749..139e7665 100644 --- a/go/game/cardImplementations.go +++ b/go/game/cardImplementations.go @@ -206,6 +206,17 @@ func (*pikemanImpl) onETB(s *LocalState, p Permanent) { p.(*Unit).Attack.flexAttack = pikeAttack() } +type spearImpl struct{ cardImplementationBase } + +func (*spearImpl) onPile(p Permanent) { + // FIXME: add + p.(*Unit).Attack.flexAttack = pikeAttack() +} +func (*spearImpl) onUnpile(p Permanent) { + // FIXME: restore flexAttack + p.(*Unit).Attack.flexAttack = nil +} + // ====== Magic Set ====== type attackImpl struct{ cardImplementationBase } @@ -713,6 +724,8 @@ func init() { "base/wormtongue": &wormtongueImpl{}, "base/pikeman": &pikemanImpl{}, + "equipment/spear": &spearImpl{}, + "magic/attack!": &attackImpl{}, "magic/appear!": &appearImpl{}, "magic/die!": &dieImpl{}, -- cgit v1.2.3