Annence/Boheme

This commit is contained in:
2023-08-08 18:05:10 +02:00
parent b2219c0f81
commit 554a1af531
27 changed files with 104 additions and 68 deletions

View File

@ -416,6 +416,7 @@ export class EcrymeActor extends Actor {
let rollData = this.getCommonRollData()
rollData.mode = "cephaly"
rollData.skill = duplicate(this.system.cephaly.skilllist[skillKey])
rollData.annency = duplicate(this.getAnnency())
rollData.img = rollData.skill.img
rollData.skill.categKey = "cephaly"
rollData.skill.skillKey = skillKey

View File

@ -221,7 +221,7 @@ export class EcrymeUtility {
let msg = await this.createChatWithRollMode(this.confrontData1.alias, {
content: await renderTemplate(`systems/fvtt-ecryme/templates/chat/chat-confrontation-result.hbs`, confront)
})
msg.setFlag("world", "ecryme-rolldata", confront)
await msg.setFlag("world", "ecryme-rolldata", confront)
console.log("Confront result", confront)
this.lastConfront = confront
@ -539,6 +539,9 @@ export class EcrymeUtility {
diceFormula += "+" + rollData.bonusMalusTraits
diceFormula += "+" + rollData.bonusMalusPerso
diceFormula += "+" + rollData.impactMalus
if (rollData.annency) {
diceFormula += "+" + rollData.annencyBonus
}
rollData.diceFormula = diceFormula
return diceFormula
}
@ -567,7 +570,7 @@ export class EcrymeUtility {
let msg = await this.createChatWithRollMode(rollData.alias, {
content: await renderTemplate(`systems/fvtt-ecryme/templates/chat/chat-generic-result.hbs`, rollData)
})
msg.setFlag("world", "ecryme-rolldata", rollData)
await msg.setFlag("world", "ecryme-rolldata", rollData)
console.log("Rolldata result", rollData)
}
@ -584,7 +587,7 @@ export class EcrymeUtility {
let msg = await this.createChatWithRollMode(rollData.alias, {
content: await renderTemplate(`systems/fvtt-ecryme/templates/chat/chat-generic-result.hbs`, rollData)
})
msg.setFlag("world", "ecryme-rolldata", rollData)
await msg.setFlag("world", "ecryme-rolldata", rollData)
}
/* -------------------------------------------- */
@ -684,6 +687,7 @@ export class EcrymeUtility {
bonusMalusPerso: 0,
bonusMalusSituation: 0,
bonusMalusDef: 0,
annencyBonus: 0,
bonusMalusPortee: 0,
skillTranscendence: 0,
rollMode: game.settings.get("core", "rollMode"),

View File

@ -245,7 +245,9 @@ export class EcrymeConfrontDialog extends Dialog {
this.rollData.applyTranscendence = $('#roll-apply-transcendence').val()
this.computeTotals()
})
html.find('#annency-bonus').change((event) => {
this.rollData.annencyBonus = Number(event.currentTarget.value)
})
}
}