mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-16 00:52:40 +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:
@@ -67,14 +67,11 @@ func (p *AdventurePlugin) runDungeonCombat(
|
||||
enemyStats, enemyMods := DeriveDungeonMonsterStats(loc)
|
||||
|
||||
// All combat is D&D. Auto-migrate if needed.
|
||||
dndChar, freshMigrate, err := ensureDnDCharacterForCombat(userID, char)
|
||||
dndChar, _, err := ensureDnDCharacterForCombat(userID, char)
|
||||
if err != nil {
|
||||
slog.Error("dnd: ensureDnDCharacterForCombat (dungeon) failed", "user", userID, "err", err)
|
||||
return CombatResult{}
|
||||
}
|
||||
if freshMigrate {
|
||||
p.maybeSendDnDOnboarding(userID, char, dndChar)
|
||||
}
|
||||
applyDnDPlayerLayer(&playerStats, dndChar)
|
||||
applyDnDEquipmentLayer(&playerStats, dndChar, equip)
|
||||
applyDnDHPScaling(&playerStats, dndChar)
|
||||
|
||||
Reference in New Issue
Block a user