mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 16:42:41 +00:00
Phase 5b: player power floor + Phase-3 winners shipped to live
Closes the 'fairly breezy with some death' target the user picked
for Phase 5. Five-piece ship; Phase 1 matrix lands T1 88%, T2 74%,
T4 72%, T5 ~57% in or above band. T3 remains the design hump at
~45% (manor 39, underforge 47) — Wraith promotion to elite was
already done in Phase 4-B, the remaining standard-pool deaths are
the irreducible part of T3.
Pieces:
1. computeMaxHP × 1.5 (phase5BHPMult in dnd.go). Uniform across
class/level so the class-balance harness's in-tier parity
assertion stays green. Bootstrap (bootstrap_phase5b_hp.go)
refreshes hp_max for existing characters at startup;
idempotent via db.JobCompleted. hp_current is bumped by the
same delta so a full-HP character stays at full.
2. applyPhase5BPlayerFloor (dnd_combat.go): +3 AC, +3 AttackBonus,
+3 weapon.MagicBonus (damage). Applied at the END of
applyDnDEquipmentLayer (after computeArmorAC's AC override)
and inside buildHarnessPlayer so live and harness measurement
match.
3. Elite bracket 19 → 23 (resolveCombatInterrupt). Case order
puts Elite (≥23) before Patrol (≥22) so a 23+ total prefers
the single dangerous fight. Elite is now effectively a
high-threat event reachable only via the +1-per-20-threat-
above-40 mod — Phase 4-B's elite-pool monsters still appear,
just less often.
4. dailyThreatDrift base 3 → 1. Slows the threat clock so
players have the days they need before threat tips zones
into the new 23+ elite band.
5. applyDailyBurn default → 50% (phase5BDailyBurnRatePct). Also
applied in the temporal-override branch in
dnd_expedition_cycle.go so tidal / unraveling days scale by
the same 0.5× — otherwise those days would be
disproportionately harsh against the new baseline.
The harness's expedition_balance.go reads phase5BDailyBurnRatePct
as the default-burn fallback when the override knob is zero, so
Phase 1 matrix measurements now reflect what live players
experience.
Test debt: 13 pinned-numbers unit tests across combat_stats_test,
dnd_test, dnd_xp_test, dnd_equipment_profiles_test,
dnd_expedition_supplies_test, dnd_expedition_cycle_test,
dnd_expedition_extract_test, dnd_expedition_region_cmd_test,
dnd_expedition_combat_test, dnd_expedition_threat_test,
dnd_expedition_temporal_test, expedition_balance_test were
pinning pre-Phase-5-B baselines; updated with comments noting
the cause. Class-balance suite stayed green (uniform buff
preserves spread).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -145,6 +145,46 @@ func applyDnDEquipmentLayer(stats *CombatStats, c *DnDCharacter, equip map[Equip
|
||||
if armor != nil || shield != nil {
|
||||
stats.AC = computeArmorAC(armor, shield, dexMod)
|
||||
}
|
||||
|
||||
// Phase 5-B player power floor — see applyPhase5BPlayerFloor doc.
|
||||
// Lives at the end of the equipment layer so it lands AFTER the AC
|
||||
// override above (otherwise the +3 AC bonus from the floor would be
|
||||
// stomped by computeArmorAC's overwrite).
|
||||
applyPhase5BPlayerFloor(stats)
|
||||
}
|
||||
|
||||
// Phase 5-B player power floor — uniform combat-stat lift added on top
|
||||
// of class + equipment to land the expedition harness in the band the
|
||||
// user chose for the "fairly breezy with some death" difficulty target.
|
||||
// See gogobee_expedition_difficulty.md Phase 5-B for the sweep that
|
||||
// picked these values (gear floor +3, paired with HP ×phase5BHPMult in
|
||||
// computeMaxHP).
|
||||
//
|
||||
// Applied as a *flat* lift, not via gearTier — keeps the in-game gear
|
||||
// narrative untouched (a player's +1 longsword still reads as +1 in
|
||||
// their inventory; the floor stacks invisibly at combat-stat time).
|
||||
// Uniform across classes so the class-balance harness's in-tier parity
|
||||
// spread is unaffected.
|
||||
//
|
||||
// Called from both applyDnDEquipmentLayer (live combat) and
|
||||
// buildHarnessPlayer (expedition / class-balance harnesses) so the
|
||||
// harness's measurement matches what live players experience.
|
||||
const (
|
||||
phase5BACBonus = 3
|
||||
phase5BAttackBonus = 3
|
||||
phase5BWeaponMagicBonus = 3
|
||||
)
|
||||
|
||||
func applyPhase5BPlayerFloor(stats *CombatStats) {
|
||||
stats.AC += phase5BACBonus
|
||||
stats.AttackBonus += phase5BAttackBonus
|
||||
if stats.Weapon != nil {
|
||||
// Mutate the weapon copy in place — applyDnDEquipmentLayer and
|
||||
// buildHarnessPlayer both already hand us a fresh copy (the
|
||||
// synthesize* / classLoadout chain returns a new profile), so
|
||||
// this doesn't leak into the registry.
|
||||
stats.Weapon.MagicBonus += phase5BWeaponMagicBonus
|
||||
}
|
||||
}
|
||||
|
||||
// pickWeaponAbilityMod returns the ability modifier added to weapon damage:
|
||||
|
||||
Reference in New Issue
Block a user