diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-02-04 13:04:31 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-08-20 15:46:39 +0200 |
| commit | 9c0a84cf71e060c99b4c162bfff6b747560c4631 (patch) | |
| tree | 8e6ab3b6f30e849778eec9cb60951bf05136589a | |
| parent | dec4514160011f9856b926f2485e0aa6e2d318bc (diff) | |
| download | muhqs-game-9c0a84cf71e060c99b4c162bfff6b747560c4631.tar.gz muhqs-game-9c0a84cf71e060c99b4c162bfff6b747560c4631.zip | |
fix IsValidAttack unit type assertion
| -rw-r--r-- | go/game/state.go | 2 |
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) } |
