Update skill sheet

This commit is contained in:
2026-01-14 14:16:31 +01:00
parent 56492c40a0
commit 7283f5f15b
18 changed files with 266 additions and 331 deletions
+13 -4
View File
@@ -119,18 +119,27 @@ export default class PrismRPGActor extends Actor {
rollTarget = this.items.find((i) => i.type === "miracle" && i.id === rollKey)
rollTarget.rollKey = rollKey
break
case "skill":
case "skill": {
rollTarget = this.items.find((i) => i.type === "skill" && i.id === rollKey)
rollTarget.rollKey = rollKey
if (rollTarget.system.category === "weapon") {
ui.notifications.warn(game.i18n.localize("PRISMRPG.Notifications.rollFromWeapon"))
return
}
// Get the primary attribute for D&D 5e style rolls
const attrKey = rollTarget.system.primaryAttribute || "dex"
rollTarget.characteristicValue = this.system.characteristics[attrKey].value
// Get the two sub-attributes for this skill
const subAttr1 = rollTarget.system.subAttribute1 || "prowess"
const subAttr2 = rollTarget.system.subAttribute2 || "initiative"
// Store both sub-attribute values for the dialog to choose from
rollTarget.subAttribute1 = subAttr1
rollTarget.subAttribute2 = subAttr2
rollTarget.subAttribute1Value = this.system.subAttributes?.[subAttr1]?.value || 0
rollTarget.subAttribute2Value = this.system.subAttributes?.[subAttr2]?.value || 0
rollTarget.subAttribute1Label = game.i18n.localize(SYSTEM.SUB_ATTRIBUTES?.[subAttr1]?.label || subAttr1)
rollTarget.subAttribute2Label = game.i18n.localize(SYSTEM.SUB_ATTRIBUTES?.[subAttr2]?.label || subAttr2)
rollTarget.proficiencyBonus = rollTarget.system.modifier
break
}
case "spell-attack":
case "spell-power":
case "spell-cast":