mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 08:32: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:
@@ -44,9 +44,9 @@ func TestSunkenTemple_TidalWarningDay4(t *testing.T) {
|
||||
if got.CurrentDay != 4 {
|
||||
t.Fatalf("CurrentDay = %d, want 4", got.CurrentDay)
|
||||
}
|
||||
// Warning day: NO doubled burn — single 1.5 SU burn.
|
||||
if got.Supplies.Current != startSU-1.5 {
|
||||
t.Errorf("supplies = %v, want %v (single burn)", got.Supplies.Current, startSU-1.5)
|
||||
// Warning day: NO doubled burn — single 1.5 SU burn × phase5B 50% = 0.75.
|
||||
if got.Supplies.Current != startSU-0.75 {
|
||||
t.Errorf("supplies = %v, want %v (single burn × phase5B)", got.Supplies.Current, startSU-0.75)
|
||||
}
|
||||
entries, _ := recentExpeditionLog(exp.ID, 10)
|
||||
foundWarn := false
|
||||
@@ -84,8 +84,8 @@ func TestSunkenTemple_TidalEventDay6_ForcesDoubleBurn(t *testing.T) {
|
||||
if got.CurrentDay != 6 {
|
||||
t.Fatalf("CurrentDay = %d, want 6", got.CurrentDay)
|
||||
}
|
||||
// Forced 2× burn = 1.5 * 2 = 3.0 SU
|
||||
wantBurn := float32(3.0)
|
||||
// Forced 2× burn = 1.5 * 2 × phase5B 50% = 1.5 SU
|
||||
wantBurn := float32(1.5)
|
||||
if startSU-got.Supplies.Current != wantBurn {
|
||||
t.Errorf("burn = %v, want %v (forced 2× tidal)", startSU-got.Supplies.Current, wantBurn)
|
||||
}
|
||||
@@ -125,9 +125,9 @@ func TestSunkenTemple_BossDefeatedSilencesTidal(t *testing.T) {
|
||||
}
|
||||
|
||||
got, _ := getExpedition(exp.ID)
|
||||
// Single normal burn, no tidal multiplier.
|
||||
if got.Supplies.Current != startSU-1.5 {
|
||||
t.Errorf("supplies = %v, want %v (no tidal mult)", got.Supplies.Current, startSU-1.5)
|
||||
// Single normal burn × phase5B 50%, no tidal multiplier: 1.5×0.5 = 0.75.
|
||||
if got.Supplies.Current != startSU-0.75 {
|
||||
t.Errorf("supplies = %v, want %v (no tidal mult × phase5B)", got.Supplies.Current, startSU-0.75)
|
||||
}
|
||||
entries, _ := recentExpeditionLog(exp.ID, 10)
|
||||
for _, e := range entries {
|
||||
@@ -433,9 +433,10 @@ func TestFeywild_HalfDay_HalvesBurn(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
got, _ := getExpedition(exp.ID)
|
||||
wantBurn := float32(1.5) // 3 * 0.5
|
||||
// Phase 5-B: 3 base × 0.5 half-day × 50% phase5B = 0.75.
|
||||
wantBurn := float32(0.75)
|
||||
if startSU-got.Supplies.Current != wantBurn {
|
||||
t.Errorf("burn = %v, want %v (half-day)", startSU-got.Supplies.Current, wantBurn)
|
||||
t.Errorf("burn = %v, want %v (half-day × phase5B)", startSU-got.Supplies.Current, wantBurn)
|
||||
}
|
||||
if today, _ := got.RegionState["feywild_today"].(string); today != "half" {
|
||||
t.Errorf("RegionState feywild_today = %q, want %q", today, "half")
|
||||
@@ -461,9 +462,10 @@ func TestFeywild_DoubleDay_DoublesBurn(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
got, _ := getExpedition(exp.ID)
|
||||
wantBurn := float32(6.0)
|
||||
// Phase 5-B: 3 base × 2.0 double-day × 50% phase5B = 3.0.
|
||||
wantBurn := float32(3.0)
|
||||
if startSU-got.Supplies.Current != wantBurn {
|
||||
t.Errorf("burn = %v, want %v (double-day)", startSU-got.Supplies.Current, wantBurn)
|
||||
t.Errorf("burn = %v, want %v (double-day × phase5B)", startSU-got.Supplies.Current, wantBurn)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -486,9 +488,10 @@ func TestFeywild_TimeLoop_LogsAndDoesNotChangeBurn(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
got, _ := getExpedition(exp.ID)
|
||||
// Loop has no burn override → default pipeline (no harsh, no siege) = 3 SU.
|
||||
if startSU-got.Supplies.Current != 3 {
|
||||
t.Errorf("burn = %v, want 3 (loop default)", startSU-got.Supplies.Current)
|
||||
// Loop has no burn override → default pipeline (no harsh, no siege)
|
||||
// × phase5B 50% = 1.5 SU (was 3 pre-Phase-5-B).
|
||||
if startSU-got.Supplies.Current != 1.5 {
|
||||
t.Errorf("burn = %v, want 1.5 (loop default × phase5B)", startSU-got.Supplies.Current)
|
||||
}
|
||||
entries, _ := recentExpeditionLog(exp.ID, 10)
|
||||
found := false
|
||||
@@ -741,9 +744,9 @@ func TestAbyss_UnravelingDoublesBurn(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
got, _ := getExpedition(exp.ID)
|
||||
wantBurn := float32(8.0) // 4 * 2 (unraveling override)
|
||||
wantBurn := float32(4.0) // 4 * 2 unraveling × 0.5 phase5B = 4
|
||||
if startSU-got.Supplies.Current != wantBurn {
|
||||
t.Errorf("burn = %v, want %v (unraveling 2×)", startSU-got.Supplies.Current, wantBurn)
|
||||
t.Errorf("burn = %v, want %v (unraveling 2× × phase5B)", startSU-got.Supplies.Current, wantBurn)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -822,7 +825,8 @@ func TestSunkenTemple_NoTidalOnNonZone(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
got, _ := getExpedition(exp.ID)
|
||||
if got.Supplies.Current != startSU-1 {
|
||||
t.Errorf("non-tidal zone burned %v, want 1", startSU-got.Supplies.Current)
|
||||
// Phase 5-B: 1 base × 50% = 0.5.
|
||||
if got.Supplies.Current != startSU-0.5 {
|
||||
t.Errorf("non-tidal zone burned %v, want 0.5", startSU-got.Supplies.Current)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user