mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-16 00:52:40 +00:00
Adv 2.0 D&D Phase 12 E2d: Fortified Camp branch + overnight rest effects
§5.1 fortified camp unlocked in !camp, gated on exp.BossDefeated for
now (cache-site waypoints land in E3+). +2 SU cost was already in the
E1e cost table; this commit just stops rejecting the type.
§3 / §5.1 / §8.1 overnight rest applied at briefing rollover via
processOvernightCamp:
- rough: HP floor of HPMax/2 (no spell refresh)
- standard: full HP, exhaustion -1, refreshAllResources +
refreshSpellSlots
- fortified / base: standard rest + 1d6 HP bonus on wake +
threat-clock -5 (§8.1 modifier)
The camp auto-breaks once the rest applies — staying camped multi-day
isn't a thing in the spec; the player can re-pitch on the next night
if they want to. Briefing body now includes a 💤 line summarizing the
HP/threat delta from the night's rest.
Combat-driven side of fortified ('+1d6 HP on wake' as a rare flavor
event) currently surfaces as the rest summary; a peaceful-night TwinBee
narration variant could come later if we add a dedicated pool — for
now reusing the existing CampEstablished ambience suffices.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -162,6 +162,19 @@ func (p *AdventurePlugin) deliverBriefing(e *Expedition, now time.Time) error {
|
||||
e.Supplies = newSupplies
|
||||
e.CurrentDay++
|
||||
|
||||
// E2d: overnight camp rest effects (HP/spells/threat). Auto-breaks
|
||||
// the camp after applying. Run before threat drift so a fortified
|
||||
// camp's −5 lands first and a same-day +3 drift can't push back over
|
||||
// a threshold the rest just dropped.
|
||||
restSummary := processOvernightCamp(e)
|
||||
if restSummary != "" {
|
||||
if fresh, err := getExpedition(e.ID); err == nil && fresh != nil {
|
||||
e.ThreatLevel = fresh.ThreatLevel
|
||||
e.SiegeMode = fresh.SiegeMode
|
||||
e.Camp = fresh.Camp
|
||||
}
|
||||
}
|
||||
|
||||
// E2a: daily threat drift (+3 base, GM-mood modifier). No-op after
|
||||
// boss kill. May cross a threshold and append a flavor-bearing log.
|
||||
if _, _, err := applyDailyThreatDrift(e); err != nil {
|
||||
@@ -170,6 +183,9 @@ func (p *AdventurePlugin) deliverBriefing(e *Expedition, now time.Time) error {
|
||||
|
||||
line := pickMorningBriefing(e.CurrentDay)
|
||||
body := renderMorningBriefing(e, line, burn)
|
||||
if restSummary != "" {
|
||||
body += "\n💤 _" + restSummary + "_\n"
|
||||
}
|
||||
|
||||
if uid := id.UserID(e.UserID); uid != "" {
|
||||
if err := p.SendDM(uid, body); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user