feat: add Settlement actor type with Overview/Buildings/Inventory tabs
- New TypeDataModel: archetype, territory, renown, currency (gp/sp/cp), garrison, underSiege, isCapital, founded, taxNotes, description, notes - 3-tab ApplicationV2 sheet with drag & drop for building/weapon/armor/equipment - Currency steppers (+/−), building constructed toggle, qty controls - LESS-based CSS (settlement-sheet.less) + base.less updated for shared styles - Full i18n keys in lang/en.json (8 settlement archetypes) - system.json: registered settlement actor type Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -30,6 +30,15 @@ export default class OathHammerMiracleDialog {
|
||||
return { value: v, label: v > 0 ? `+${v}` : String(v), selected: v === 0 }
|
||||
})
|
||||
|
||||
const availableLuck = actorSys.luck?.value ?? 0
|
||||
const isHuman = (actorSys.lineage?.name ?? "").toLowerCase() === "human"
|
||||
const luckDicePerPoint = isHuman ? 3 : 2
|
||||
const luckOptions = Array.from({ length: availableLuck + 1 }, (_, i) => ({
|
||||
value: i,
|
||||
label: i === 0 ? "0" : `${i} (+${i * luckDicePerPoint}d)`,
|
||||
selected: i === 0,
|
||||
}))
|
||||
|
||||
const rollModes = foundry.utils.duplicate(CONFIG.Dice.rollModes)
|
||||
|
||||
const context = {
|
||||
@@ -47,6 +56,9 @@ export default class OathHammerMiracleDialog {
|
||||
basePool,
|
||||
miracleCountOptions,
|
||||
bonusOptions,
|
||||
availableLuck,
|
||||
isHuman,
|
||||
luckOptions,
|
||||
rollModes,
|
||||
visibility: game.settings.get("core", "rollMode"),
|
||||
}
|
||||
@@ -84,6 +96,8 @@ export default class OathHammerMiracleDialog {
|
||||
bonus: parseInt(result.bonus) || 0,
|
||||
visibility: result.visibility ?? game.settings.get("core", "rollMode"),
|
||||
explodeOn5: result.explodeOn5 === "true",
|
||||
luckSpend: Math.min(Math.max(0, parseInt(result.luckSpend) || 0), availableLuck),
|
||||
luckIsHuman: result.luckIsHuman === "true",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user