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-06 16:34:01 +0200 |
| commit | 926680e30c17d72012bd2600d2ac94bc828d8dcc (patch) | |
| tree | 006b80964ab56059d07b36e42e7187d74e30ca3b | |
| parent | 2656796d927391f6e85724da9e352415159c7140 (diff) | |
| download | muhqs-game-926680e30c17d72012bd2600d2ac94bc828d8dcc.tar.gz muhqs-game-926680e30c17d72012bd2600d2ac94bc828d8dcc.zip | |
add naive spear implementation
| -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{}, |
