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:
prosolis
2026-04-08 17:22:04 -07:00
parent e459b6e78d
commit 1b825498bd

View File

@@ -930,10 +930,11 @@ func (p *AdventurePlugin) resolveActivity(ctx MessageContext, char *AdventureCha
remaining = append(remaining, "combat") remaining = append(remaining, "combat")
} }
if char.CanDoHarvest(isHol) { if char.CanDoHarvest(isHol) {
harvestLeft := maxHarvestActions - char.HarvestActionsUsed harvestMax := maxHarvestActions
if isHol { if isHol {
harvestLeft = maxHarvestActions + 1 - char.HarvestActionsUsed harvestMax++
} }
harvestLeft := harvestMax - char.HarvestActionsUsed
remaining = append(remaining, fmt.Sprintf("%d harvest", harvestLeft)) 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, ", "))) p.SendDM(ctx.Sender, fmt.Sprintf("Actions remaining today: %s. Type `!adv` for the menu.", strings.Join(remaining, ", ")))