Update v11/v12 et correction sur le niveau de jeu

This commit is contained in:
2024-04-26 19:28:28 +02:00
parent 1e4692e850
commit 51e5a409c4
67 changed files with 231 additions and 241 deletions

View File

@ -6,7 +6,7 @@ export class EcrymeConfrontDialog extends Dialog {
/* -------------------------------------------- */
static async create(actor, rollData) {
let options = mergeObject(super.defaultOptions, {
let options = foundry.utils.mergeObject(super.defaultOptions, {
classes: ["fvtt-ecryme ecryme-confrontation-dialog"],
dragDrop: [{ dragSelector: ".confront-dice-container", dropSelector: null }],
width: 620, height: 'fit-content', 'z-index': 99999
@ -192,7 +192,7 @@ export class EcrymeConfrontDialog extends Dialog {
this.processTranscendence()
if (rollData.selectedSpecs && rollData.selectedSpecs.length > 0) {
rollData.spec = duplicate(actor.getSpecialization(rollData.selectedSpecs[0]))
rollData.spec = foundry.utils.duplicate(actor.getSpecialization(rollData.selectedSpecs[0]))
rollData.specApplied = true
rollData.executionTotal += 2
rollData.preservationTotal += 2

View File

@ -50,15 +50,15 @@ export class EcrymeConfrontStartDialog extends Dialog {
/* -------------------------------------------- */
async rollConfront( diceFormula ) {
// Do the initial roll
let myRoll = new Roll(diceFormula).roll({async: false})
let myRoll = await new Roll(diceFormula).roll()
await EcrymeUtility.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
// Fill the available dice table
let rollData = this.rollData
rollData.roll = duplicate(myRoll)
rollData.roll = foundry.utils.duplicate(myRoll)
rollData.availableDices = []
for (let result of myRoll.terms[0].results) {
if ( !result.discarded) {
let resultDup = duplicate(result)
let resultDup = foundry.utils.duplicate(result)
resultDup.location = "mainpool"
rollData.availableDices.push(resultDup)
}