Fix initiative again
Release Creation / build (release) Successful in 43s

This commit is contained in:
2026-05-18 07:58:28 +02:00
parent db3e8b5d35
commit 7279cd752d
33 changed files with 120 additions and 95 deletions
@@ -259,9 +259,11 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet
async _onRoll(event, target) {
if (this.isEditMode) return
const rollType = event.target.dataset.rollType
let rollKey = event.target.dataset.rollKey;
let rollDice = event.target.dataset?.rollDice;
const el = event.currentTarget
const rollType = el.dataset.rollType
if (!rollType) return
let rollKey = el.dataset.rollKey
let rollDice = el.dataset.rollDice
this.actor.prepareRoll(rollType, rollKey, rollDice)
+3 -1
View File
@@ -115,7 +115,9 @@ export default class LethalFantasyMonsterSheet extends LethalFantasyActorSheet {
}
static async #onRollInitiative(event, target) {
await this.document.system.rollInitiative(event, target)
const combat = game.combat
const combatant = combat?.combatants.find(c => c.actorId === this.document.id)
await this.document.system.rollInitiative(combat?.id, combatant?.id)
}
getBestWeaponClassSkill(skills, rollType, multiplier = 1.0) {