mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 08:32:41 +00:00
Adv 2.0 L5 close-out: §7.4 reconciled + retire 3 CombatLevel readers
Reconcile the migration plan with what actually shipped, and clear the three remaining CombatLevel reader sites so the §7 grep gates hold. Plan reconciliation (gogobee_legacy_migration.md §7.4): The original deletion list was wrong on two counts. (1) AdventureCharacter struct survives as the loaded-view shape post-L5h overlay; only the backing table drops at purge. (2) combat_engine.go / combat_bridge.go / combat_stats.go are not legacy — they're the live combat engine the D&D system layers on top of (applyDnDPlayerLayer/EquipmentLayer/etc. mutate CombatStats before SimulateCombat). Verified via grep: 21+ files reference these symbols across arena/dungeon/zone/expedition. §7.4 rewritten to reflect this; no L6 combat-engine migration needed. Reader fixes: - babysitDailyCost reframed for D&D-level scale. Formula 100 + level*100 preserves the curve at every old-CL boundary given the 5:1 compression in dndLevelFromCombatLevel (Level 4 ≈ old CL 20 = €500/day, Level 10 ≈ old CL 50 = €1100/day). Caller switched to dndLevelForUser. - dnd_sheet.go drops the vestigial "Combat (legacy) %d" stat-block line. - D&D onboarding retired. Post-L5g the welcome DM never fires (every legacy player already has a D&D row), so dnd_onboarding.go + dnd_onboarding_test.go are deleted, the 3 production caller invocations (dnd_zone_combat, combat_bridge, dnd_combat::ensureCharForDnDCmd) and the dnd_setup.go stub-creation branch removed. OnboardingSent column kept for a separate cleanup pass. dnd_audit_fixes_test.go ported. go vet ./... && go test ./... clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -13,8 +13,13 @@ import (
|
||||
|
||||
// ── Pricing ─────────────────────────────────────────────────────────────────
|
||||
|
||||
func babysitDailyCost(combatLevel int) int {
|
||||
return 100 + (combatLevel * 20)
|
||||
// babysitDailyCost returns the daily babysit subscription cost in €.
|
||||
// Phase L (post-L5g): keyed off D&D Level instead of legacy CombatLevel.
|
||||
// The slope is 5× the old per-level slope to preserve the curve shape across
|
||||
// the 5:1 compression in dndLevelFromCombatLevel — Level 4 (~old CL 20) =
|
||||
// €500/day, Level 10 (~old CL 50) = €1100/day, matching pre-migration pricing.
|
||||
func babysitDailyCost(level int) int {
|
||||
return 100 + (level * 100)
|
||||
}
|
||||
|
||||
// ── Pet-care daily trickle ─────────────────────────────────────────────────
|
||||
@@ -120,7 +125,7 @@ func (p *AdventurePlugin) handleBabysitPurchase(ctx MessageContext, days int) er
|
||||
return p.SendDM(ctx.Sender, "Your adventurer is dead. The babysitter does not work with corpses.")
|
||||
}
|
||||
|
||||
daily := babysitDailyCost(char.CombatLevel)
|
||||
daily := babysitDailyCost(dndLevelForUser(char.UserID))
|
||||
totalCost := daily * days
|
||||
balance := p.euro.GetBalance(char.UserID)
|
||||
if balance < float64(totalCost) {
|
||||
|
||||
Reference in New Issue
Block a user