N5/D2: NPC arcs — Misty stages, Robbie's gift, Thom's final letter

Three flavor arcs on existing per-player counters (no schema, golden
byte-identical):

- Misty: 3 deepening dialogue beats at MistyEncounterCount 5/15/30,
  prepended to the encounter opening the one time the counter lands on a
  threshold. Fiction only — no copy ties a donation to the hidden arena
  effects.
- Robbie: every 10th visit he leaves a consumable "for the trouble,"
  drawn from the dungeon pool at a level-matched tier.
- Thom: paying off the Tier-4 mortgage (no next tier) sends a final
  letter instead of the stock payoff line, plus an inert pet-treat
  keepsake if the player keeps a pet.

Claude-Session: https://claude.ai/code/session_017mEwUmmS7aQTP2NQXj6rUa
This commit is contained in:
prosolis
2026-07-10 16:12:53 -07:00
parent c37c95a3e3
commit 3103b519fb
7 changed files with 208 additions and 6 deletions

View File

@@ -141,6 +141,12 @@ func (p *AdventurePlugin) npcFireEncounter(userID id.UserID, npc string) {
// Pool union: legacy mistyOpenings + D&D MistyGreeting flavor.
mistyPool := dndMistyGreetingPool()
opening = mistyPool[rand.IntN(len(mistyPool))]
// D2 arc: a deepening beat lands the one time the counter hits a
// threshold (5/15/30). MistyEncounterCount only ever increments by one
// above, so each beat is delivered exactly once.
if beat := mistyArcBeat(char.MistyEncounterCount); beat != "" {
opening = beat + "\n\n" + opening
}
prompt = fmt.Sprintf("👤 A woman approaches you.\n\n_%s_\n\n"+
"Reply `yes` to give €%d, or `no` to walk away.", opening, mistyCost)
case "arina":