Gestion/assistance aventure/eclat
This commit is contained in:
@ -288,11 +288,20 @@ export class MournbladeUtility {
|
||||
/* -------------------------------------------- */
|
||||
static async rollMournblade(rollData) {
|
||||
|
||||
let actor = game.actors.get(rollData.actorId)
|
||||
if (rollData.attrKey == "tochoose") { // No attr selected, force address
|
||||
rollData.attrKey = "adr"
|
||||
}
|
||||
if ( !rollData.attr) {
|
||||
console.log("ATTR!!!", rollData.attrKey)
|
||||
rollData.actionImg = "systems/fvtt-mournblade/assets/icons/" + actor.data.data.attributs[rollData.attrKey].labelnorm + ".webp"
|
||||
rollData.attr = duplicate(actor.data.data.attributs[rollData.attrKey])
|
||||
}
|
||||
|
||||
rollData.diceFormula = rollData.mainDice
|
||||
if ( rollData.doubleD20) { // Multiply result !
|
||||
rollData.diceFormula += "*2"
|
||||
if (!rollData.isReroll) {
|
||||
let actor = game.actors.get(rollData.actorId)
|
||||
actor.changeEclat(-1)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user