aboutsummaryrefslogtreecommitdiff
path: root/go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-02-04 13:04:31 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2025-08-20 15:46:39 +0200
commit9c0a84cf71e060c99b4c162bfff6b747560c4631 (patch)
tree8e6ab3b6f30e849778eec9cb60951bf05136589a /go
parentdec4514160011f9856b926f2485e0aa6e2d318bc (diff)
downloadmuhqs-game-9c0a84cf71e060c99b4c162bfff6b747560c4631.tar.gz
muhqs-game-9c0a84cf71e060c99b4c162bfff6b747560c4631.zip
fix IsValidAttack unit type assertion
Diffstat (limited to 'go')
-rw-r--r--go/game/state.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/go/game/state.go b/go/game/state.go
index 6ca100c8..15b6b226 100644
--- a/go/game/state.go
+++ b/go/game/state.go
@@ -138,7 +138,7 @@ func (s *State) IsValidAttack(a *AttackAction) error {
return fmt.Errorf("Attack actions can only be declared during one's actions phase")
}
- unit := a.Source().(Unit)
+ unit := a.Source().(*Unit)
if INVALID_ATTACK(unit.Attack) {
return fmt.Errorf("%s can not attack", unit.card.Name)
}