Adv 2.0 D&D Phase 12 E2c: Siege Mode effects + threat-70 warning

§8.3 siege economics:
- applyDailyBurn now takes an explicit siege flag and enforces a 2× floor
  on supply burn even when HarshMod is below 2 (tier-1 zones still get
  starved out per spec).
- currentBurn mirrors the same precedence so status/briefing readouts
  stay consistent.
- Briefing rollover passes e.SiegeMode through, decoupling siege from
  the harsh-conditions composite.

§8.3 threat-70 warning: applyDailyThreatDrift emits a one-time
appendApproachingSiegeLog when the level crosses 70 (prevLevel<70 and
new level≥70). Pulls from a new flavor.ThreatClockApproachingSiege pool
seeded with the spec's verbatim warning beat plus two voice-matched
alternates.

Other siege effects (boss +20 HP / Legendary Resistance, cleared-room
respawn, no-short-rest enforcement) stay deferred to the combat-link
phase — ThreatBandInfo already exposes the flags that engine will read.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
prosolis
2026-05-08 15:39:31 -07:00
parent 9b48dda79e
commit 5b8ef740f8
7 changed files with 116 additions and 12 deletions

View File

@@ -158,13 +158,26 @@ func makeSupplies(tier ZoneTier, p SupplyPurchase) ExpeditionSupplies {
// applyDailyBurn deducts one day's supplies from the snapshot (caller
// persists). Returns the new snapshot and the SU consumed.
func applyDailyBurn(s ExpeditionSupplies, harshActive bool) (ExpeditionSupplies, float32) {
//
// Multiplier precedence (§4.1, §8.3):
// - siege overrides everything with a hard 2× floor (even for tier 1
// where HarshMod is 1×) — the dungeon is actively starving you out.
// - otherwise, harshActive applies HarshMod (zone-tier scaled).
func applyDailyBurn(s ExpeditionSupplies, harshActive, siege bool) (ExpeditionSupplies, float32) {
burn := s.DailyBurn
if harshActive {
burn *= s.HarshMod
if burn == s.DailyBurn { // HarshMod was 0 / unset
burn = s.DailyBurn
switch {
case siege:
mult := s.HarshMod
if mult < 2 {
mult = 2
}
burn *= mult
case harshActive:
mult := s.HarshMod
if mult <= 0 {
mult = 1
}
burn *= mult
}
s.Current -= burn
if s.Current < 0 {