FIx for spells/miracles

This commit is contained in:
2026-04-30 23:08:23 +02:00
parent b4211c121d
commit 1641be6516
6 changed files with 50 additions and 15 deletions
+12 -3
View File
@@ -25,9 +25,10 @@ export default class OathHammerSpellDialog {
const sys = spell.system
const actorSys = actor.system
const intRank = actorSys.attributes.intelligence.rank
const magicRank = actorSys.skills.magic.rank
const basePool = intRank + magicRank
const intRank = actorSys.attributes.intelligence.rank
const magicRank = actorSys.skills.magic.rank
const magicColor = actorSys.skills.magic.colorDiceType ?? "white"
const basePool = intRank + magicRank
const currentStress = actorSys.arcaneStress.value
const stressThreshold = actorSys.arcaneStress.threshold
@@ -41,6 +42,12 @@ export default class OathHammerSpellDialog {
return entry ? game.i18n.localize(entry.label) : (sys.tradition ?? "")
})()
const colorOptions = [
{ value: "white", label: game.i18n.localize("OATHHAMMER.ColorDice.White"), selected: magicColor === "white" },
{ value: "red", label: game.i18n.localize("OATHHAMMER.ColorDice.Red"), selected: magicColor === "red" },
{ value: "black", label: game.i18n.localize("OATHHAMMER.ColorDice.Black"), selected: magicColor === "black" },
]
const enhancementOptions = Object.entries(SPELL_ENHANCEMENTS).map(([key, def]) => ({
value: key,
label: game.i18n.localize(def.label),
@@ -87,6 +94,7 @@ export default class OathHammerSpellDialog {
magicRank,
basePool,
poolSizeOptions,
colorOptions,
currentStress,
stressThreshold,
isOverThreshold,
@@ -134,6 +142,7 @@ export default class OathHammerSpellDialog {
poolPenalty: enh.penalty,
redDice: enh.redDice,
noStress: enh.noStress,
colorOverride: result.colorOverride ?? magicColor,
elementalBonus: parseInt(result.elementalBonus) || 0,
bonus: parseInt(result.bonus) || 0,
poolSize: Math.min(Math.max(1, parseInt(result.poolSize) || basePool), basePool),