2020-12-31 11:53:41 +01:00
|
|
|
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);
|
2021-04-22 20:12:29 +02:00
|
|
|
this.terms[this.terms.length - 1].number = rerolls;
|
2020-12-31 11:53:41 +01:00
|
|
|
this._total -= rerolls;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
async render(chatOptions) {
|
|
|
|
return super.render(chatOptions)
|
|
|
|
}
|
|
|
|
}
|