mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 08:32:41 +00:00
Add hospital revival, Robbie bandit, MW/shop fixes, float64 scoring
- St. Guildmore's Memorial Hospital: !hospital command with Nurse Joy, procedural itemized billing, same-day revival, 6-hour dead timer, hospital ad after death, 2-hour nudge follow-up - Robbie the Friendly Bandit: automated inventory cleaner, random daily visits (8-21 UTC, 40% chance), collects sub-tier gear at €50/item, donates to community pot, drops Get Out of Medical Debt Free card - Fix MW auto-equip: T1 MW no longer replaces better equipped gear - Fix shop MW block: allow purchasing upgrades over lower-tier MW - Float64 equipment scoring: advEffectiveTier and advEquipmentScore return float64, no mid-calculation truncation (MW 1.25x, Arena 1.5x) - Fix markdown rendering: convert *asterisk* to _underscore_ italics across all flavor text files (shop, blacksmith, rival, hospital) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -177,18 +177,19 @@ func (p *AdventurePlugin) checkMasterworkDrop(userID id.UserID, char *AdventureC
|
||||
// Check current equipment in target slot
|
||||
existing := equip[def.Slot]
|
||||
|
||||
// Determine: auto-equip, inventory, or silent discard
|
||||
// Determine: auto-equip, inventory, or silent discard.
|
||||
// Compare effective tiers: Masterwork = tier*1.25, Arena = tier*1.5, Shop = tier.
|
||||
// Only auto-equip if the new Masterwork drop is strictly better.
|
||||
newEffective := float64(def.Tier) * 1.25 // incoming masterwork
|
||||
existingEffective := advEffectiveTier(existing)
|
||||
|
||||
autoEquip := false
|
||||
if existing == nil {
|
||||
autoEquip = true
|
||||
} else if existing.Masterwork {
|
||||
if def.Tier > existing.Tier {
|
||||
autoEquip = true // upgrade over lower-tier masterwork
|
||||
} else {
|
||||
return // silent discard: same or higher tier masterwork already equipped
|
||||
}
|
||||
} else {
|
||||
autoEquip = true // any masterwork > shop gear
|
||||
} else if existing.Masterwork && def.Tier <= existing.Tier {
|
||||
return // silent discard: same or lower tier masterwork already equipped
|
||||
} else if newEffective > existingEffective {
|
||||
autoEquip = true // genuinely better than what they have
|
||||
}
|
||||
|
||||
// First-drop detection
|
||||
|
||||
Reference in New Issue
Block a user