foundryvtt-reve-de-dragon/module/de-draconique.js
Vincent Vandemeulebrouck 3fe8e834c8 Fix dé draconique 0.8
2021-04-24 00:52:02 +02:00

26 lines
536 B
JavaScript

import { RdDDice } from "./rdd-dice.js";
export class DeDraconique extends Roll{
static async ddr(rollMode=undefined) {
let ddr = new DeDraconique().evaluate();
await RdDDice.show(ddr, rollMode);
return ddr;
}
constructor(){
super("1d8x8 - 0")
}
evaluate() {
super.evaluate();
const rerolls = Math.ceil(this.total / 8);
this.terms[this.terms.length - 1].number = rerolls;
this._total -= rerolls;
return this;
}
async render(chatOptions) {
return super.render(chatOptions)
}
}