Data model change

This commit is contained in:
2022-07-26 21:40:42 +02:00
parent eda4455be3
commit 80708e3f0a
10 changed files with 100 additions and 126 deletions

View File

@@ -86,6 +86,7 @@ export class CrucibleUtility {
const templatePaths = [
'systems/fvtt-crucible-rpg/templates/editor-notes-gm.html',
'systems/fvtt-crucible-rpg/templates/partial-roll-select.html',
'systems/fvtt-crucible-rpg/templates/partial-actor-ability-block.html',
'systems/fvtt-crucible-rpg/templates/partial-actor-status.html',
'systems/fvtt-crucible-rpg/templates/partial-options-abilities.html',
@@ -266,7 +267,12 @@ export class CrucibleUtility {
if (rollData.skill) {
diceFormula += "+" + String(rollData.skill.data.level) + "d8cs>=5"
}
if(rollData.advantage == "advantage") {
diceFormula += "+ 1d10cs>=5"
}
if(rollData.advantage == "disadvantage") {
diceFormula += "- 1d10cs>=5"
}
// Performs roll
let myRoll = rollData.roll
if (!myRoll) { // New rolls only of no rerolls
@@ -370,6 +376,7 @@ export class CrucibleUtility {
let rollData = {
rollId: randomID(16),
rollMode: game.settings.get("core", "rollMode"),
advantage: "none"
}
CrucibleUtility.updateWithTarget(rollData)
return rollData