diff options
| -rw-r--r-- | go/game/player.go | 3 | ||||
| -rw-r--r-- | go/game/unit.go | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/go/game/player.go b/go/game/player.go index 0221eb34..b1cb6916 100644 --- a/go/game/player.go +++ b/go/game/player.go @@ -68,8 +68,7 @@ func (p *Player) Upkeep() { // TODO: let players decide if they want to pay the upkeep p.Resource -= unit.Upkeep - - unit.resetBaseActions() + unit.onUpkeep() } } diff --git a/go/game/unit.go b/go/game/unit.go index c24e3901..fba85f30 100644 --- a/go/game/unit.go +++ b/go/game/unit.go @@ -120,6 +120,10 @@ func (u *Unit) resetBaseActions() { u.AvailAttackActions = DEFAULT_AVAIL_ATTACK_ACTIONS + u.additionalAttackActions } +func (u *Unit) onUpkeep() { + u.resetBaseActions() +} + func (u *Unit) move(s *State, tile *Tile) { u.tile.Permanent = nil tile.Permanent = u |
