Add charmes/tours management

This commit is contained in:
2023-11-29 22:04:17 +01:00
parent 06d0d9b24d
commit 3e394734ce
63 changed files with 334 additions and 252 deletions

View File

@@ -393,6 +393,7 @@ export class WastelandActor extends Actor {
rollData.canEclatDoubleD20 = true // Always true in Wastelan
rollData.doubleD20 = false
rollData.attributs = WastelandUtility.getAttributs()
rollData.config = duplicate(game.system.wasteland.config)
if (attrKey) {
rollData.attrKey = attrKey
@@ -427,6 +428,16 @@ export class WastelandActor extends Actor {
rollDialog.render(true)
}
/* -------------------------------------------- */
async rollCharme(charmeId) {
let rollData = this.getCommonRollData("cla")
rollData.charme = duplicate(this.items.get(charmeId) || {})
rollData.charmeDice = "1d4"
console.log("RollDatra", rollData)
let rollDialog = await WastelandRollDialog.create(this, rollData)
rollDialog.render(true)
}
/* -------------------------------------------- */
async rollPouvoir(pouvoirId) {
let comp = this.items.find(comp => comp.type == "competence" && comp.name.toLowerCase() == "savoir : runes")