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

@ -57,6 +57,20 @@ export const ECRYME_CONFIG = {
"lige": {name: "ECRY.ui.lige", value: 100 },
"hurle": {name: "ECRY.ui.hurle", value: 10 },
"coin": {name: "ECRY.ui.coin", value: 1 }
}
},
transcendanceOptions: {
"execution": "ECRY.ui.execution",
"preservation": "EC,RY.ui.preservation"
},
bonusMalusPersoOptions: [
{value: "-3", label: "-3"},
{value: "-2", label: "-2"},
{value: "-1", label: "-1"},
{value: "0", label: "0"},
{value: "+1", label: "+1"},
{value: "+2", label: "+2"},
{value: "+3", label: "+3"}
]
}

View File

@ -97,6 +97,7 @@ export class EcrymeUtility {
"level_b": game.i18n.localize("ECRY.settings.boheme"),
"level_a": game.i18n.localize("ECRY.settings.amertume"),
},
default: "level_a",
restricted: true
})
@ -126,7 +127,7 @@ export class EcrymeUtility {
for (let categKey in game.data.template.Actor.templates.core.skills) {
let category = game.data.template.Actor.templates.core.skills[categKey]
for (let skillKey in category.skilllist) {
let skill = duplicate(category.skilllist[skillKey])
let skill = foundry.utils.duplicate(category.skilllist[skillKey])
skill.categKey = categKey // Auto reference the category
game.system.ecryme.config.skills[skillKey] = skill
}
@ -404,7 +405,7 @@ export class EcrymeUtility {
let id = rollData.rollId
let oldRollData = this.rollDataStore[id] || {}
let newRollData = mergeObject(oldRollData, rollData)
let newRollData = foundry.utils.mergeObject(oldRollData, rollData)
this.rollDataStore[id] = newRollData
}
@ -565,9 +566,9 @@ export class EcrymeUtility {
let diceFormula = this.computeRollFormula(rollData, actor)
// Performs roll
let myRoll = new Roll(diceFormula).roll({ async: false })
let myRoll = await new Roll(diceFormula).roll()
await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
rollData.roll = duplicate(myRoll)
rollData.roll = foundry.utils.duplicate(myRoll)
rollData.total = myRoll.total
rollData.diceSum = myRoll.terms[0].total
@ -682,7 +683,7 @@ export class EcrymeUtility {
/* -------------------------------------------- */
static getBasicRollData() {
let rollData = {
rollId: randomID(16),
rollId: foundry.utils.randomID(16),
type: "roll-data",
bonusMalusPerso: 0,
bonusMalusSituation: 0,
@ -695,7 +696,7 @@ export class EcrymeUtility {
useSpleen: false,
useIdeal: false,
impactMalus: 0,
config: duplicate(game.system.ecryme.config)
config: foundry.utils.duplicate(game.system.ecryme.config)
}
EcrymeUtility.updateWithTarget(rollData)
return rollData