Roll shields

This commit is contained in:
2025-02-05 17:48:48 +01:00
parent 0eede64244
commit 4d0dda8f9c
27 changed files with 1839 additions and 72 deletions

View File

@ -279,7 +279,7 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet
const rollType = event.target.dataset.rollType
let rollTarget
let rollKey = event.target.dataset.rollKey
switch (rollType) {
switch (rollType) {
case "granted":
rollTarget = {
name: rollKey,
@ -325,6 +325,12 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet
rollTarget = this.actor.items.find((i) => i.type === "spell" && i.id === rollKey)
rollTarget.rollKey = rollKey
break
case "shield-roll":
rollTarget = this.actor.items.find((i) => i.type === "shield" && i.id === rollKey)
let shieldSkill = this.actor.items.find((i) => i.type === "skill" && i.name.toLowerCase() === rollTarget.name.toLowerCase())
rollTarget.skill = shieldSkill
rollTarget.rollKey = rollKey
break;
case "weapon-damage-small":
case "weapon-damage-medium":
case "weapon-attack":