Add roll to global game var

This commit is contained in:
Vlyan
2021-01-04 15:58:23 +01:00
parent 911e7f4415
commit 0bcfb699c0
6 changed files with 6 additions and 5 deletions

View File

@@ -1,5 +1,4 @@
import { TwentyQuestions } from "./twenty-questions.js";
import { RollL5r5e } from "../dice/roll.js";
/**
* L5R Twenty Questions form
@@ -366,7 +365,7 @@ export class TwentyQuestionsDialog extends FormApplication {
* @private
*/
async _rollHeritage(stepName, formula, flavor) {
const roll = new RollL5r5e(formula);
const roll = new game.l5r5e.RollL5r5e(formula);
roll.actor = this._actor;
await roll.roll();

View File

@@ -1,5 +1,3 @@
import { RollL5r5e } from "./roll.js";
/**
* L5R Dice picker dialog
* @extends {FormApplication}
@@ -366,7 +364,7 @@ export class DicePickerDialog extends FormApplication {
}
// Let's roll !
const roll = await new RollL5r5e(formula.join("+"));
const roll = await new game.l5r5e.RollL5r5e(formula.join("+"));
roll.actor = this._actor;
roll.l5r5e.stance = this.object.ring.id;

View File

@@ -61,6 +61,7 @@ Hooks.once("init", async function () {
// Add some helper classes in game
game.l5r5e = {
HelpersL5r5e,
RollL5r5e,
DicePickerDialog,
};