mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 00:32:40 +00:00
Add blacksmith repair system, community lottery, and audit fixes
Blacksmith: equipment repair with tier-based pricing, DM confirmation flow, masterwork/arena surcharges, full flavor text pools. Added to main adventure menu as option 6 (rest bumped to 7). Lottery: weekly draw (Friday 23:59 UTC), ticket purchases with 100/week cap, Fisher-Yates number generation, fixed+jackpot prize tiers, community pot funding, Thursday reminders, draw history. Audit fixes: TOCTOU in blacksmith repair costs (recompute from fresh equipment), user lock in DM slot selection, partial repair refund tracking, error logging on save failures, Fisher-Yates bias correction, communityPotDebit return value checks in draw execution. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -297,7 +297,8 @@ func renderAdvMorningDM(char *AdventureCharacter, equip map[EquipmentSlot]*AdvEq
|
||||
}
|
||||
|
||||
sb.WriteString("**5️⃣ Shop** — buy/sell gear and loot\n")
|
||||
sb.WriteString("**6️⃣ Rest** — skip today, bank your luck\n\n")
|
||||
sb.WriteString("**6️⃣ Blacksmith** — repair damaged equipment\n")
|
||||
sb.WriteString("**7️⃣ Rest** — skip today, bank your luck\n\n")
|
||||
|
||||
sb.WriteString("Reply with the number and location, e.g: `1 Soggy Cellar`\n")
|
||||
sb.WriteString("You have until midnight UTC to choose.")
|
||||
@@ -349,7 +350,8 @@ func renderAdvHolidaySecondPrompt(char *AdventureCharacter, equip map[EquipmentS
|
||||
}
|
||||
|
||||
sb.WriteString("**5️⃣ Shop** — buy/sell gear and loot\n")
|
||||
sb.WriteString("**6️⃣ Rest** — skip the second action\n\n")
|
||||
sb.WriteString("**6️⃣ Blacksmith** — repair damaged equipment\n")
|
||||
sb.WriteString("**7️⃣ Rest** — skip the second action\n\n")
|
||||
sb.WriteString("Reply with the number and location, e.g: `1 Soggy Cellar`")
|
||||
|
||||
return sb.String()
|
||||
|
||||
Reference in New Issue
Block a user