diff --git a/foundry-module/module.json b/foundry-module/module.json index bfb0518..bb0b260 100644 --- a/foundry-module/module.json +++ b/foundry-module/module.json @@ -2,7 +2,7 @@ "id": "vanity-delve", "title": "DELVE — a dungeon layer for VANITY", "description": "Generates a coherent delve and sequences VANITY's Forge to stage it, one area at a time.", - "version": "0.6.2", + "version": "0.6.3", "compatibility": { "minimum": "13", "verified": "14.365" diff --git a/foundry-module/module/forge-app.mjs b/foundry-module/module/forge-app.mjs index aedd119..6c18315 100644 --- a/foundry-module/module/forge-app.mjs +++ b/foundry-module/module/forge-app.mjs @@ -109,7 +109,9 @@ export async function raiseDungeon(params = {}) { const PACK = await game.delve.loadPack(params.theme ?? 'barrow'); if (!PACK) return ui.notifications.error(`DELVE: could not load the ${params.theme} theme.`); const seed = params.seed || coinSeed(new Rng(String(Date.now()))); - const d = generateDelve({ pack: PACK, ...params, seed }); + // pack last: a programmatic caller passing params.pack would otherwise generate from one pack + // while the maps below are staged from the one actually loaded. + const d = generateDelve({ ...params, seed, pack: PACK }); const sk = d.skeleton; const title = sk.placeName; @@ -242,9 +244,13 @@ function buildPages(d, scenes) { ${a._foes?.length ? `
${esc(cap(a.encounter.heat))} — in the world. These are the actors the Forge created; run the fight off these.
| Foe | atk | def | Grit | Nerve | |
|---|---|---|---|---|---|
| @UUID[${f.uuid}]{${esc(f.name)}} | ${f.atk ?? '?'} | ${f.def ?? '?'} | ${f.grit ?? '?'} | ${f.nerve ?? '?'} | ${esc(f.trick)} |
DELVE planned ${esc(R.line)} — the Forge rolls its own foes, so the plan and the table above are different lists. - Its guidance still applies to the scene: harmed by ${esc(R.harmedBy)}${R.harmedBy.includes('ONLY') ? ' — only true if you cast the fight yourself' : ''}. ${esc(R.avoid)}.
` : ''} + + ${R ? `DELVE planned ${esc(R.line)}. The Forge rolls its own cast, so the plan's foes are not these — its tactical notes describe monsters that were not created.
` : ''}` + : R ? `${esc(cap(a.encounter.heat))} — not cast. Nothing was forged for this area, so the plan is the encounter. Cast it by hand:
+| Foe | atk | def | Grit | Nerve | |
|---|---|---|---|---|---|
| ${f.n}× ${esc(f.name)} | ${f.atk} | ${f.def} | ${f.grit} | ${f.nerve} | ${esc(f.note)} |
Harmed by ${esc(R.harmedBy)}${R.harmedBy.includes('ONLY') ? ' — say so before initiative' : ''}. ${esc(R.avoid)}.
` : ''} ${a.temptation ? `${esc(cap(a.temptation.id))} — ${esc(a.temptation.cue)}: ${esc(a.temptation.benefit)}.
Using it costs ${a.temptation.useCost?.bane ? `+${a.temptation.useCost.bane} Bane` : '—'}. While carried, ${esc(a.temptation.standingDrawback)}.
Hoard.
${cap(area.encounter.heat)} — in the world:
${list(foes.map(foeLine))}${ + R ? `DELVE planned ${R.line}; the Forge rolled its own, so the plan's tactics do not describe these.
` : ''}` + : R + ? `${cap(area.encounter.heat)} — not cast. Nothing was forged; run the plan by hand:
${ + list(R.foes.map(f => `${f.n}× ${f.name} — ${f.atk}/${f.def}/${f.grit}, Nerve ${f.nerve}. ${f.note}`)) + }Harmed by ${R.harmedBy}. ${R.avoid}.
` + : ''; await gmCard(`⛏ ${area.index} · ${name}`, `${area.role} · ${area.facet}`, `${area.situation ? `Here: ${cap(area.situation.occupant)}, ${area.situation.doing} — ${area.situation.onArrival}.
They can: ${area.situation.offer}. ${cap(area.situation.because)}.
${cap(area.decision.cue)}${rv.roll ? ` — [${rv.roll}] ${rv.success}` : ''}${rv.failure ? `
Miss: ${rv.failure}` : ''}${rv.orElse ? `
Or: ${rv.orElse}` : ''}
${cap(area.encounter.heat)} — in the world:
${list(foes.map(foeLine))}` : ''} - ${R ? `DELVE planned ${R.line} — the Forge rolled its own, so run the block above. ${R.avoid}.
` : ''} + ${foeBlock} ${area.temptation ? `${cap(area.temptation.id)}: ${area.temptation.benefit}. Use: ${area.temptation.useCost?.bane ? `+${area.temptation.useCost.bane} Bane` : '—'}. ${area.temptation.standingDrawback}.
` : ''} ${w.notes ? `Your note: ${w.notes}
` : ''}${area.trigger}${area.baneBeat ? ` · ${area.baneBeat}` : ''} · fallback: ${area.fallback.route}