diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-08-06 16:34:01 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-08-20 15:57:34 +0200 |
| commit | 4f8dad957f345e69a686d5348b4baca6473c4ac9 (patch) | |
| tree | 0f005c4eb9d0093b688b7fd7b9ca3531189c3f89 /go | |
| parent | 486e240975682bef87d8a1d60fa80e3b1ee41b32 (diff) | |
| download | muhqs-game-4f8dad957f345e69a686d5348b4baca6473c4ac9.tar.gz muhqs-game-4f8dad957f345e69a686d5348b4baca6473c4ac9.zip | |
add naive spear implementation
Diffstat (limited to 'go')
| -rw-r--r-- | go/game/cardImplementations.go | 13 |
1 files changed, 13 insertions, 0 deletions
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{}, |
