aboutsummaryrefslogtreecommitdiff
path: root/go/game/unit_test.go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-02-04 18:51:31 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2025-08-20 15:46:40 +0200
commit8c3456f5a120a00f8a4e89065d7d50f2c1b4ad0d (patch)
tree6e201152c264184bcd5aad784386654e921c8634 /go/game/unit_test.go
parent083ec284a9ef286729e544df9340a12760f03ab7 (diff)
downloadmuhqs-game-8c3456f5a120a00f8a4e89065d7d50f2c1b4ad0d.tar.gz
muhqs-game-8c3456f5a120a00f8a4e89065d7d50f2c1b4ad0d.zip
improve permanent pile support
* Fix alot of bugs caused by permanents without tiles * Implement a permanent choice to select the permanents in a pile * Fix how pile hooks are called
Diffstat (limited to 'go/game/unit_test.go')
-rw-r--r--go/game/unit_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/go/game/unit_test.go b/go/game/unit_test.go
index 341fb350..d6b5b079 100644
--- a/go/game/unit_test.go
+++ b/go/game/unit_test.go
@@ -44,6 +44,18 @@ symbols:
}
}
+ if INVALID_ATTACK(f.Attack) {
+ t.Fatalf("fisher has an invalid attack")
+ }
+
+ if a.Attackable() {
+ t.Fatalf("Piled archer is attackable")
+ }
+
+ if len(a.AttackableTiles(s.Map)) != 0 {
+ t.Fatalf("Piled archer has attackable tiles")
+ }
+
a.move(s, s.Map.TileAt(Position{1, 1}))
if len(f.Pile()) != 0 {
t.Fatalf("fisher's pile is not empty")