Fix effects
This commit is contained in:
parent
92cea77239
commit
39d220cfe6
@ -111,13 +111,16 @@ export class PegasusUtility {
|
|||||||
for (let effect of rollData.effectsList) {
|
for (let effect of rollData.effectsList) {
|
||||||
if (effect && effect.applied && effect.type == "effect" && effect.effect.data.bonusdice) {
|
if (effect && effect.applied && effect.type == "effect" && effect.effect.data.bonusdice) {
|
||||||
let diceKey = PegasusUtility.getDiceFromLevel(effect.effect.data.effectlevel)
|
let diceKey = PegasusUtility.getDiceFromLevel(effect.effect.data.effectlevel)
|
||||||
|
let diceList = diceKey.split(" ")
|
||||||
|
for (let myDice of diceList) {
|
||||||
let newDice = {
|
let newDice = {
|
||||||
name: "effect-bonus-dice", key: diceKey, level: effect.effect.data.effectlevel, effect: effect.effect.name,
|
name: "effect-bonus-dice", key: myDice, level: effect.effect.data.effectlevel, effect: effect.effect.name,
|
||||||
img: `systems/fvtt-pegasus-rpg/images/dice/${diceKey}.webp`
|
img: `systems/fvtt-pegasus-rpg/images/dice/${myDice}.webp`
|
||||||
}
|
}
|
||||||
newDicePool.push(newDice)
|
newDicePool.push(newDice)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
rollData.dicePool = newDicePool
|
rollData.dicePool = newDicePool
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,13 +130,16 @@ export class PegasusUtility {
|
|||||||
for (let hindrance of rollData.effectsList) {
|
for (let hindrance of rollData.effectsList) {
|
||||||
if (hindrance && hindrance.applied && (hindrance.type == "hindrance" || (hindrance.type == "effect" && hindrance.effect?.data?.hindrance) ) ) {
|
if (hindrance && hindrance.applied && (hindrance.type == "hindrance" || (hindrance.type == "effect" && hindrance.effect?.data?.hindrance) ) ) {
|
||||||
let diceKey = PegasusUtility.getDiceFromLevel( (hindrance.value) ? hindrance.value : hindrance.effect.data.effectlevel)
|
let diceKey = PegasusUtility.getDiceFromLevel( (hindrance.value) ? hindrance.value : hindrance.effect.data.effectlevel)
|
||||||
|
let diceList = diceKey.split(" ")
|
||||||
|
for (let myDice of diceList) {
|
||||||
let newDice = {
|
let newDice = {
|
||||||
name: "effect-hindrance", key: diceKey, level: hindrance.value, effect: hindrance.name,
|
name: "effect-hindrance", key: myDice, level: hindrance.value, effect: hindrance.name,
|
||||||
img: `systems/fvtt-pegasus-rpg/images/dice/${diceKey}.webp`
|
img: `systems/fvtt-pegasus-rpg/images/dice/${myDice}.webp`
|
||||||
}
|
}
|
||||||
newDicePool.push(newDice)
|
newDicePool.push(newDice)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
rollData.dicePool = newDicePool
|
rollData.dicePool = newDicePool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -273,6 +273,6 @@
|
|||||||
"templateVersion": 109,
|
"templateVersion": 109,
|
||||||
"title": "Pegasus RPG",
|
"title": "Pegasus RPG",
|
||||||
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
|
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
|
||||||
"version": "0.6.26",
|
"version": "0.6.27",
|
||||||
"background" : "./images/ui/pegasus_welcome_page.webp"
|
"background" : "./images/ui/pegasus_welcome_page.webp"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user