diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-02-04 13:04:31 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-01-27 16:43:46 +0100 |
| commit | 7d837dd91a50fd595acd679e84352b0a4dbcdf63 (patch) | |
| tree | 673172e21d337543d9f4d755b6be16be4e9b07a8 | |
| parent | 358d872f7b6f36f341b5f001f93d2fafaf83c68e (diff) | |
| download | muhqs-game-7d837dd91a50fd595acd679e84352b0a4dbcdf63.tar.gz muhqs-game-7d837dd91a50fd595acd679e84352b0a4dbcdf63.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) } |
