aboutsummaryrefslogtreecommitdiff
path: root/go/game/state.go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2025-08-02 14:47:01 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2025-08-20 15:57:33 +0200
commitc696829f9e37e9f3752fdb89ebaadd4b3b237bea (patch)
treea205a17da9618e04f61e44d49cb028ede23dd732 /go/game/state.go
parentca083639a4b52215b39bb863031f71c0a8209ee9 (diff)
downloadmuhqs-game-c696829f9e37e9f3752fdb89ebaadd4b3b237bea.tar.gz
muhqs-game-c696829f9e37e9f3752fdb89ebaadd4b3b237bea.zip
add support for flexible attacks
Diffstat (limited to 'go/game/state.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 8901aed7..f6bcbc8e 100644
--- a/go/game/state.go
+++ b/go/game/state.go
@@ -319,7 +319,7 @@ func (s *LocalState) IsValidAttack(a *AttackAction) error {
}
unit := a.Source().(*Unit)
- if INVALID_ATTACK(unit.Attack) {
+ if !unit.Attack.Valid() {
return fmt.Errorf("%s can not attack", unit.card.Name)
}