Adv 2.0 D&D Phase 10 SUB3a-ii: Battle Master L10/L15

L10 Improved Combat Superiority — superiority dice grow d8 → d10. The
two scalar maneuvers (Precision Attack +4→+5; Rally heal +4→+5) bump in
their Apply hooks; Trip Attack has no scalar to scale.

L15 Relentless — 5e regenerates one die when initiative is rolled with
an empty pool. Proxied as +1 max pool size (4→5), which gives the same
"always at least one die per encounter" guarantee across the long-rest
cycle without introducing per-fight regen state.

subclassResourceMax now takes level; initSubclassResources upserts the
max (and bumps current by the delta) so existing characters grow on
level-up. Hooked into the dnd_xp level-up loop so Battle Masters
crossing L15 see the new die without waiting for a long rest. 4 new
tests; no regression in subclass/resource/level-up paths.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
prosolis
2026-05-08 11:17:55 -07:00
parent 97c2c37396
commit 64c70dda27
6 changed files with 162 additions and 22 deletions

View File

@@ -132,6 +132,13 @@ func (p *AdventurePlugin) grantDnDXP(userID id.UserID, amount int) ([]LevelUpEve
}
if len(events) > 0 {
// Phase 10 SUB3a-ii — Battle Master Relentless (L15) raises the
// superiority cap from 4 → 5; reconcile any level-gated subclass pool
// growth here. Idempotent and non-fatal: a stale pool just means the
// player reaches their full cap on the next long rest at the latest.
if c.Subclass != "" {
_ = initSubclassResources(userID, c.Subclass, c.Level)
}
p.sendLevelUpDM(userID, c, events, amount)
}