mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 08:32:41 +00:00
Fix harvest actions remaining to use consistent harvestMax pattern
The nudge message after an action was computing harvest remaining inline with maxHarvestActions + 1 for holidays instead of using the harvestMax++ pattern used everywhere else. Functionally equivalent but inconsistent — would break if the holiday bonus ever changed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -930,10 +930,11 @@ func (p *AdventurePlugin) resolveActivity(ctx MessageContext, char *AdventureCha
|
||||
remaining = append(remaining, "combat")
|
||||
}
|
||||
if char.CanDoHarvest(isHol) {
|
||||
harvestLeft := maxHarvestActions - char.HarvestActionsUsed
|
||||
harvestMax := maxHarvestActions
|
||||
if isHol {
|
||||
harvestLeft = maxHarvestActions + 1 - char.HarvestActionsUsed
|
||||
harvestMax++
|
||||
}
|
||||
harvestLeft := harvestMax - char.HarvestActionsUsed
|
||||
remaining = append(remaining, fmt.Sprintf("%d harvest", harvestLeft))
|
||||
}
|
||||
p.SendDM(ctx.Sender, fmt.Sprintf("Actions remaining today: %s. Type `!adv` for the menu.", strings.Join(remaining, ", ")))
|
||||
|
||||
Reference in New Issue
Block a user