mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 08:32:41 +00:00
Add action economy split and cross-plugin chat level lookup (Adventure 2.5 steps 1-2)
Action economy: replace single daily action with 1 combat + 3 harvest actions per day. Holidays grant +1 to each bucket. Rest consumes all remaining actions. Arena remains outside both buckets. - Add CombatActionsUsed/HarvestActionsUsed counters to AdventureCharacter - Add CanDoCombat/CanDoHarvest/AllActionsUsed/HasActedToday helpers - Update all 14 ActionTakenToday check sites across adventure, scheduler, babysit, twinbee, events, and render - Morning DM shows action budget and grays out exhausted categories - Activity resolution checks per-bucket availability before proceeding - Midnight reset zeros both counters - Post-action nudge shows remaining actions instead of holiday prompt Cross-plugin lookup: export XPPlugin.GetLevel(), wire into AdventurePlugin via p.chatLevel(userID) for upcoming chat level perks. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -96,8 +96,9 @@ func (p *AdventurePlugin) sendMorningDMs() {
|
||||
continue
|
||||
}
|
||||
|
||||
// If already acted today, skip
|
||||
if char.ActionTakenToday {
|
||||
// If all actions used today, skip
|
||||
isHol, _ := isHolidayToday()
|
||||
if char.AllActionsUsed(isHol) {
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -225,7 +226,7 @@ func (p *AdventurePlugin) postDailySummary() {
|
||||
continue
|
||||
}
|
||||
|
||||
if !c.ActionTakenToday {
|
||||
if !c.HasActedToday() {
|
||||
ps.IsResting = true
|
||||
if len(SummaryResting) > 0 {
|
||||
ps.SummaryLine = SummaryResting[time.Now().Nanosecond()%len(SummaryResting)]
|
||||
@@ -313,7 +314,7 @@ func (p *AdventurePlugin) midnightReset() error {
|
||||
continue
|
||||
}
|
||||
|
||||
if !char.ActionTakenToday {
|
||||
if !char.HasActedToday() {
|
||||
// If the player died today (or yesterday — covering late-night deaths
|
||||
// that span midnight), grant a grace period: no shame, no streak reset.
|
||||
if char.LastDeathDate == today ||
|
||||
|
||||
Reference in New Issue
Block a user