Roll damage + fix

This commit is contained in:
2025-01-05 10:25:58 +01:00
parent c7cc39886d
commit 614adecde7
36 changed files with 145 additions and 119 deletions

View File

@ -1,4 +1,4 @@
import { ROLL_TYPE, SYSTEM } from "../config/system.mjs"
import { SYSTEM } from "../config/system.mjs"
import LethalFantasyRoll from "../documents/roll.mjs"
import LethalFantasyUtils from "../utils.mjs"

View File

@ -1,5 +1,4 @@
import LethalFantasyRoll from "../documents/roll.mjs"
import { ROLL_TYPE } from "../config/system.mjs"
export default class LethalFantasyOpponent extends foundry.abstract.TypeDataModel {
static defineSchema() {
@ -26,13 +25,13 @@ export default class LethalFantasyOpponent extends foundry.abstract.TypeDataMode
/**
* Rolls a dice attack for an opponent.
* @param {number} rollValue The dice to roll.
* @param {number} rollType Type of roll.
* @param {number} rollTarget The name of the attack
* @returns {Promise<null>} - A promise that resolves to null if the roll is cancelled.
*/
async roll(rollValue, rollTarget) {
async roll(rollType, rollTarget) {
let roll = await LethalFantasyRoll.prompt({
rollType: ROLL_TYPE.ATTACK,
rollType: rollType,
rollValue,
rollTarget,
actorId: this.parent.id,