mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 08:32:41 +00:00
N4/E1: T3 housing payoffs + a home-rest "well-rested" buff
Turn the dead top housing tiers into something worth buying. All three
land without a schema bump, and TestCombatCharacterization stays
byte-identical (the balance corpus never sets the new fields).
T3 trophy room: treasure cap 3->4 at HouseTier>=3 (maxTreasuresForTier).
Enforced at the save gate only -- HouseTier is never written downward,
so a held 4th treasure below tier 3 is unreachable and a load-time cap in
computeAdvBonuses would just add a query for an impossible state. The
all-irreplaceable manual discard prompt now lists the 4th slot too.
T3 workshop: +5% craft success at HouseTier>=3, lifting the cap 0.95->0.98
so a maxed forager still gains. craftingSuccessRate takes a workshopBonus,
threaded through autoCraftConsumables and renderRecipesKnown.
Well-rested buff (replaces the plan's T4 "inn-quality rest", a verified
no-op -- home rest already equals inn rest). Home-only (the inn and a
tier-1 shack grant nothing), starts at T2 and grows through T4, expires at
the next long rest:
- Temp HP cushion (8/12/16% of MaxHP). TempHP was a dormant field; wired
into applyDnDHPScaling as MaxHP headroom -- additive and golden-safe.
- Bonus spell slots (+1/+2/+3 at the caster's highest slot level), the
real reward, lifting casters who trail on spell-pool richness.
applyLongRestSpellSlots resets the pool to base then folds in the
bonus; expiry is stateless (next rest's reset drops it).
Magnitudes are tunable defaults; revisit against the post-parties
re-baseline.
Claude-Session: https://claude.ai/code/session_017mEwUmmS7aQTP2NQXj6rUa
This commit is contained in:
@@ -481,10 +481,23 @@ func formatN(n int, word string) string {
|
||||
// wound layered with the fresh equipment cushion. There is no scale
|
||||
// conversion; persistDnDHPAfterCombat is the inverse direct copy.
|
||||
func applyDnDHPScaling(stats *CombatStats, c *DnDCharacter) {
|
||||
if c == nil || c.HPMax <= 0 || c.HPCurrent >= c.HPMax {
|
||||
if c == nil || c.HPMax <= 0 {
|
||||
return
|
||||
}
|
||||
startHP := c.HPCurrent + stats.HPBonus
|
||||
// Well-rested temporary HP (from a long rest at a T2+ home) is a cushion
|
||||
// layered above the fight's MaxHP. It is dormant (0) for anyone not
|
||||
// currently rested — including every scenario in the balance corpus and
|
||||
// the class-balance harness, which never sets it — so the full-HP fast
|
||||
// path below stays byte-identical for them and the golden does not move.
|
||||
if c.TempHP > 0 {
|
||||
stats.MaxHP += c.TempHP
|
||||
}
|
||||
if c.HPCurrent >= c.HPMax {
|
||||
// Full HP: StartHP=0 sentinel already means "enter at MaxHP", which
|
||||
// now includes the +TempHP cushion.
|
||||
return
|
||||
}
|
||||
startHP := c.HPCurrent + stats.HPBonus + c.TempHP
|
||||
if startHP < 1 {
|
||||
startHP = 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user