Foundry v13 migration
This commit is contained in:
@@ -7,7 +7,7 @@ import { MournbladeUtility } from "./mournblade-utility.js";
|
||||
import { MournbladeRollDialog } from "./mournblade-roll-dialog.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class MournbladeActorSheet extends ActorSheet {
|
||||
export class MournbladeActorSheet extends foundry.appv1.sheets.ActorSheet {
|
||||
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
@@ -25,8 +25,8 @@ export class MournbladeActorSheet extends ActorSheet {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async getData() {
|
||||
const objectData = foundry.utils.duplicate(this.object)
|
||||
let actorData = objectData
|
||||
const objectData = foundry.utils.duplicate(this.object)
|
||||
let actorData = objectData
|
||||
|
||||
let formData = {
|
||||
title: this.title,
|
||||
@@ -54,7 +54,7 @@ export class MournbladeActorSheet extends ActorSheet {
|
||||
origine: foundry.utils.duplicate(this.actor.getOrigine() || {}),
|
||||
heritage: foundry.utils.duplicate(this.actor.getHeritage() || {}),
|
||||
metier: foundry.utils.duplicate(this.actor.getMetier() || {}),
|
||||
combat: this.actor.getCombatValues(),
|
||||
combat: this.actor.getCombatValues(),
|
||||
equipements: foundry.utils.duplicate(this.actor.getEquipments()),
|
||||
modifiers: foundry.utils.duplicate(this.actor.getModifiers()),
|
||||
monnaies: foundry.utils.duplicate(this.actor.getMonnaies()),
|
||||
@@ -63,7 +63,7 @@ export class MournbladeActorSheet extends ActorSheet {
|
||||
protectionTotal: this.actor.getProtectionTotal(),
|
||||
santeMalus: this.actor.getStatusMalus(),
|
||||
ameMalus: this.actor.getAmeMalus(),
|
||||
description: await TextEditor.enrichHTML(this.object.system.biodata.description, {async: true}),
|
||||
description: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.biodata.description, {async: true}),
|
||||
options: this.options,
|
||||
owner: this.document.isOwner,
|
||||
editScore: this.options.editScore,
|
||||
@@ -75,7 +75,7 @@ export class MournbladeActorSheet extends ActorSheet {
|
||||
return formData;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/** @override */
|
||||
activateListeners(html) {
|
||||
@@ -83,14 +83,14 @@ export class MournbladeActorSheet extends ActorSheet {
|
||||
|
||||
// Everything below here is only needed if the sheet is editable
|
||||
if (!this.options.editable) return;
|
||||
|
||||
|
||||
// Update Inventory Item
|
||||
html.find('.item-edit').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item")
|
||||
let itemId = li.data("item-id")
|
||||
const item = this.actor.items.get( itemId )
|
||||
item.sheet.render(true)
|
||||
})
|
||||
})
|
||||
// Delete Inventory Item
|
||||
html.find('.item-delete').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
@@ -105,7 +105,7 @@ export class MournbladeActorSheet extends ActorSheet {
|
||||
let value = ev.currentTarget.value
|
||||
this.actor.editItemField(itemId, itemType, itemField, dataType, value)
|
||||
})
|
||||
|
||||
|
||||
html.find('.quantity-minus').click(event => {
|
||||
const li = $(event.currentTarget).parents(".item");
|
||||
this.actor.incDecQuantity( li.data("item-id"), -1 );
|
||||
@@ -150,7 +150,7 @@ export class MournbladeActorSheet extends ActorSheet {
|
||||
let armeId = li.data("item-id")
|
||||
this.actor.rollArmeSpecial(armeId)
|
||||
})
|
||||
|
||||
|
||||
html.find('.roll-arme-degats').click((event) => {
|
||||
const li = $(event.currentTarget).parents(".item")
|
||||
let armeId = li.data("item-id")
|
||||
@@ -175,19 +175,19 @@ export class MournbladeActorSheet extends ActorSheet {
|
||||
this.actor.incDecAme(value)
|
||||
})
|
||||
|
||||
|
||||
|
||||
html.find('.lock-unlock-sheet').click((event) => {
|
||||
this.options.editScore = !this.options.editScore;
|
||||
this.render(true);
|
||||
});
|
||||
});
|
||||
html.find('.item-equip').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
this.actor.equipItem( li.data("item-id") );
|
||||
this.render(true);
|
||||
this.render(true);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/** @override */
|
||||
setPosition(options = {}) {
|
||||
|
||||
@@ -17,8 +17,8 @@ export class MournbladeActor extends Actor {
|
||||
/**
|
||||
* Override the create() function to provide additional SoS functionality.
|
||||
*
|
||||
* This overrided create() function adds initial items
|
||||
* Namely: Basic skills, money,
|
||||
* This overrided create() function adds initial items
|
||||
* Namely: Basic skills, money,
|
||||
*
|
||||
* @param {Object} data Barebones actor data which this function adds onto.
|
||||
* @param {Object} options (Unused) Additional options which customize the creation workflow.
|
||||
@@ -253,15 +253,6 @@ export class MournbladeActor extends Actor {
|
||||
return combat
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
prepareBaseData() {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async prepareData() {
|
||||
super.prepareData();
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
prepareDerivedData() {
|
||||
|
||||
@@ -718,8 +709,8 @@ export class MournbladeActor extends Actor {
|
||||
if (arme.type == "bouclier") {
|
||||
arme = this.prepareBouclier(arme)
|
||||
}
|
||||
rollData.degatsFormula = arme.system.totalDegats
|
||||
let roll = new Roll(arme.system.totalDegats).roll({ async: false })
|
||||
//Unused rollData.degatsFormula = arme.system.totalDegats
|
||||
let roll = await new Roll(arme.system.totalDegats).roll()
|
||||
await MournbladeUtility.showDiceSoNice(roll, game.settings.get("core", "rollMode"));
|
||||
let rollData = {
|
||||
arme: arme,
|
||||
|
||||
@@ -4,7 +4,7 @@ import { MournbladeUtility } from "./mournblade-utility.js";
|
||||
* Extend the basic ItemSheet with some very simple modifications
|
||||
* @extends {ItemSheet}
|
||||
*/
|
||||
export class MournbladeItemSheet extends ItemSheet {
|
||||
export class MournbladeItemSheet extends foundry.appv1.sheets.ItemSheet {
|
||||
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
@@ -49,7 +49,7 @@ export class MournbladeItemSheet extends ItemSheet {
|
||||
/* -------------------------------------------- */
|
||||
async getData() {
|
||||
const objectData = foundry.utils.duplicate(this.object)
|
||||
let itemData = objectData
|
||||
let itemData = objectData
|
||||
let formData = {
|
||||
title: this.title,
|
||||
id: this.id,
|
||||
@@ -63,14 +63,14 @@ export class MournbladeItemSheet extends ItemSheet {
|
||||
limited: this.object.limited,
|
||||
options: this.options,
|
||||
owner: this.document.isOwner,
|
||||
description: await TextEditor.enrichHTML(this.object.system.description, {async: true}),
|
||||
description: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.description, {async: true}),
|
||||
config: game.system.mournblade.config,
|
||||
mr: (this.object.type == 'specialisation'),
|
||||
isGM: game.user.isGM
|
||||
}
|
||||
|
||||
if ( objectData.type == "don") {
|
||||
formData.sacrifice = await TextEditor.enrichHTML(this.object.system.sacrifice, {async: true})
|
||||
formData.sacrifice = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.sacrifice, {async: true})
|
||||
}
|
||||
//this.options.editable = !(this.object.origin == "embeddedItem");
|
||||
console.log("ITEM DATA", formData, this);
|
||||
@@ -151,7 +151,7 @@ export class MournbladeItemSheet extends ItemSheet {
|
||||
let pred = foundry.utils.duplicate(this.object.system.predilections)
|
||||
pred[index].used = ev.currentTarget.checked
|
||||
this.object.update( { 'system.predilections': pred })
|
||||
})
|
||||
})
|
||||
html.find('#add-predilection').click(ev => {
|
||||
let pred = foundry.utils.duplicate(this.object.system.predilections)
|
||||
pred.push( { name: "Nouvelle prédilection", id: randomID(), used: false })
|
||||
|
||||
@@ -30,7 +30,7 @@ Hooks.once("init", async function () {
|
||||
MournbladeUtility.preloadHandlebarsTemplates();
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// Set an initiative formula for the system
|
||||
// Set an initiative formula for the system
|
||||
CONFIG.Combat.initiative = {
|
||||
formula: "1d6",
|
||||
decimals: 1
|
||||
@@ -46,21 +46,21 @@ Hooks.once("init", async function () {
|
||||
CONFIG.Combat.documentClass = MournbladeCombat
|
||||
CONFIG.Actor.documentClass = MournbladeActor
|
||||
CONFIG.Item.documentClass = MournbladeItem
|
||||
game.system.mournblade = {
|
||||
game.system.mournblade = {
|
||||
config : MournbladeConfig.getConfig(),
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// Register sheet application classes
|
||||
Actors.unregisterSheet("core", ActorSheet);
|
||||
Actors.registerSheet("fvtt-mournblade", MournbladeActorSheet, { types: ["personnage"], makeDefault: true })
|
||||
Actors.registerSheet("fvtt-mournblade", MournbladeCreatureSheet, { types: ["creature"], makeDefault: true })
|
||||
foundry.documents.collections.Actors.unregisterSheet("core", foundry.appv1.sheets.ActorSheet);
|
||||
foundry.documents.collections.Actors.registerSheet("fvtt-mournblade", MournbladeActorSheet, { types: ["personnage"], makeDefault: true })
|
||||
foundry.documents.collections.Actors.registerSheet("fvtt-mournblade", MournbladeCreatureSheet, { types: ["creature"], makeDefault: true })
|
||||
|
||||
Items.unregisterSheet("core", ItemSheet);
|
||||
Items.registerSheet("fvtt-mournblade", MournbladeItemSheet, { makeDefault: true })
|
||||
foundry.documents.collections.Items.unregisterSheet("core", foundry.appv1.sheets.ItemSheet);
|
||||
foundry.documents.collections.Items.registerSheet("fvtt-mournblade", MournbladeItemSheet, { makeDefault: true })
|
||||
|
||||
MournbladeUtility.init();
|
||||
|
||||
|
||||
});
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -92,7 +92,7 @@ async function importDefaultScene() {
|
||||
/* -------------------------------------------- */
|
||||
Hooks.once("ready", function () {
|
||||
|
||||
game.system.mournblade = {
|
||||
game.system.mournblade = {
|
||||
config : MournbladeConfig.getConfig(),
|
||||
}
|
||||
|
||||
@@ -137,4 +137,3 @@ Hooks.on("chatMessage", (html, content, msg) => {
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ export class MournbladeRollDialog extends Dialog {
|
||||
static async create(actor, rollData ) {
|
||||
|
||||
let options = { classes: ["MournbladeDialog"], width: 340, height: 'fit-content', 'z-index': 99999 };
|
||||
let html = await renderTemplate('systems/fvtt-mournblade/templates/roll-dialog-generic.html', rollData);
|
||||
let html = await foundry.applications.handlebars.renderTemplate('systems/fvtt-mournblade/templates/roll-dialog-generic.html', rollData);
|
||||
|
||||
return new MournbladeRollDialog(actor, rollData, html, options );
|
||||
}
|
||||
@@ -16,16 +16,16 @@ export class MournbladeRollDialog extends Dialog {
|
||||
let conf = {
|
||||
title: "Test de Capacité",
|
||||
content: html,
|
||||
buttons: {
|
||||
buttons: {
|
||||
rolld10: {
|
||||
icon: '<i class="fas fa-check"></i>',
|
||||
label: "Lancer 1d10",
|
||||
callback: () => { this.roll("1d10") }
|
||||
callback: () => { this.roll("1d10") }
|
||||
},
|
||||
rolld20: {
|
||||
icon: '<i class="fas fa-check"></i>',
|
||||
label: "Lancer 1d20",
|
||||
callback: () => { this.roll("1d20") }
|
||||
callback: () => { this.roll("1d20") }
|
||||
},
|
||||
cancel: {
|
||||
icon: '<i class="fas fa-times"></i>',
|
||||
@@ -73,45 +73,45 @@ export class MournbladeRollDialog extends Dialog {
|
||||
})
|
||||
html.find('#attrKey').change(async (event) => {
|
||||
this.rollData.attrKey = String(event.currentTarget.value)
|
||||
})
|
||||
})
|
||||
html.find('#runemode').change(async (event) => {
|
||||
this.rollData.runemode = String(event.currentTarget.value)
|
||||
})
|
||||
})
|
||||
html.find('#runeame').change(async (event) => {
|
||||
this.rollData.runeame = Number(event.currentTarget.value)
|
||||
})
|
||||
})
|
||||
html.find('#isMonte').change(async (event) => {
|
||||
this.rollData.desavantages.isMonte = event.currentTarget.checked
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
html.find('#cibleausol').change(async (event) => {
|
||||
this.rollData.desavantages.cibleausol = event.currentTarget.checked
|
||||
})
|
||||
})
|
||||
html.find('#cibledesarmee').change(async (event) => {
|
||||
this.rollData.desavantages.cibledesarmee = event.currentTarget.checked
|
||||
})
|
||||
})
|
||||
html.find('#ciblerestreint').change(async (event) => {
|
||||
this.rollData.desavantages.ciblerestreint = event.currentTarget.checked
|
||||
})
|
||||
})
|
||||
html.find('#cibleimmobilisée').change(async (event) => {
|
||||
this.rollData.desavantages.cibleimmobilisée = event.currentTarget.checked
|
||||
})
|
||||
})
|
||||
html.find('#ciblesurplomb').change(async (event) => {
|
||||
this.rollData.desavantages.ciblesurplomb = event.currentTarget.checked
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
html.find('#doubleD20').change(async (event) => {
|
||||
this.rollData.doubleD20 = event.currentTarget.checked
|
||||
})
|
||||
})
|
||||
html.find('#visee').change(async (event) => {
|
||||
this.rollData.visee = event.currentTarget.checked
|
||||
})
|
||||
})
|
||||
html.find('#cibleconsciente').change(async (event) => {
|
||||
this.rollData.cibleconsciente = event.currentTarget.checked
|
||||
})
|
||||
})
|
||||
html.find('#ciblecourt').change(async (event) => {
|
||||
this.rollData.ciblecourt = event.currentTarget.checked
|
||||
})
|
||||
})
|
||||
html.find('#typeCouvert').change(async (event) => {
|
||||
this.rollData.typeCouvert = String(event.currentTarget.value)
|
||||
})
|
||||
|
||||
@@ -8,9 +8,9 @@ export class MournbladeUtility {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async init() {
|
||||
Hooks.on('renderChatLog', (log, html, data) => MournbladeUtility.chatListeners(html))
|
||||
Hooks.on("getChatLogEntryContext", (html, options) => MournbladeUtility.chatRollMenu(html, options))
|
||||
Hooks.on('renderChatMessage', (message, html, data) => MournbladeUtility.chatMessageHandler(message, html, data))
|
||||
Hooks.on('renderChatMessageHTML', (log, html, data) => MournbladeUtility.chatListeners(html))
|
||||
Hooks.on("getChatMessageContextOptions", (html, options) => MournbladeUtility.chatRollMenu(html, options))
|
||||
Hooks.on('renderChatMessageHTML', (message, html, data) => MournbladeUtility.chatMessageHandler(message, html, data))
|
||||
|
||||
Hooks.on("getCombatTrackerEntryContext", (html, options) => {
|
||||
MournbladeUtility.pushInitiativeOptions(html, options);
|
||||
@@ -112,7 +112,7 @@ export class MournbladeUtility {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async chatMessageHandler(message, html, data) {
|
||||
const chatCard = html.find('.action-section')
|
||||
const chatCard = $(html).find('.action-section')
|
||||
if (chatCard.length > 0) {
|
||||
// If the user is the message author or the actor owner, proceed
|
||||
const actor = game.actors.get(data.message.speaker.actor)
|
||||
@@ -127,7 +127,7 @@ export class MournbladeUtility {
|
||||
/* -------------------------------------------- */
|
||||
static async chatListeners(html) {
|
||||
|
||||
html.on("click", '.predilection-reroll', async event => {
|
||||
$(html).on("click", '.predilection-reroll', async event => {
|
||||
let predIdx = $(event.currentTarget).data("predilection-index")
|
||||
let messageId = MournbladeUtility.findChatMessageId(event.currentTarget)
|
||||
let message = game.messages.get(messageId)
|
||||
@@ -139,7 +139,7 @@ export class MournbladeUtility {
|
||||
await MournbladeUtility.rollMournblade(rollData)
|
||||
})
|
||||
|
||||
html.on("click", '.arme-roll-degats', async event => {
|
||||
$(html).on("click", '.arme-roll-degats', async event => {
|
||||
let messageId = MournbladeUtility.findChatMessageId(event.currentTarget)
|
||||
let message = game.messages.get(messageId)
|
||||
let rollData = message.getFlag("world", "mournblade-roll")
|
||||
@@ -147,7 +147,7 @@ export class MournbladeUtility {
|
||||
|
||||
})
|
||||
|
||||
html.on("click", '.arme-apply-degats', async event => {
|
||||
$(html).on("click", '.arme-apply-degats', async event => {
|
||||
let messageId = MournbladeUtility.findChatMessageId(event.currentTarget)
|
||||
let message = game.messages.get(messageId)
|
||||
let rollData = message.getFlag("world", "mournblade-roll")
|
||||
@@ -166,7 +166,7 @@ export class MournbladeUtility {
|
||||
'systems/fvtt-mournblade/templates/editor-notes-gm.html',
|
||||
'systems/fvtt-mournblade/templates/partial-item-description.html'
|
||||
]
|
||||
return loadTemplates(templatePaths);
|
||||
return foundry.applications.handlebars.loadTemplates(templatePaths);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -391,7 +391,7 @@ export class MournbladeUtility {
|
||||
rollData.runeduree = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let myRoll = await new Roll(rollData.diceFormula).evaluate();
|
||||
await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
|
||||
rollData.roll = foundry.utils.duplicate(myRoll)
|
||||
@@ -423,7 +423,7 @@ export class MournbladeUtility {
|
||||
actor.setModifier("Charge de Cavalerie : -5 défense pour le tour", "defense", -5)
|
||||
}
|
||||
this.createChatWithRollMode(rollData.alias, {
|
||||
content: await renderTemplate(`systems/fvtt-mournblade/templates/chat-generic-result.html`, rollData)
|
||||
content: await foundry.applications.handlebars.renderTemplate(`systems/fvtt-mournblade/templates/chat-generic-result.html`, rollData)
|
||||
}, rollData)
|
||||
|
||||
}
|
||||
@@ -553,6 +553,8 @@ export class MournbladeUtility {
|
||||
}
|
||||
defender.incDecSante(type, +degats, rollData.ignoreDefenseArmor)
|
||||
ui.notifications.info(defender.name + "a subi " + degats + " points de santé " + type + ".")
|
||||
} else {
|
||||
ui.notifications.warn("Pas de cible sélectionnée ou pas d'arme de défense équipée.")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -694,7 +696,7 @@ export class MournbladeUtility {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static applyBonneAventureRoll(li, changed, addedBonus) {
|
||||
let msgId = li.data("message-id")
|
||||
let msgId = $(li).data("message-id")
|
||||
let msg = game.messages.get(msgId)
|
||||
if (msg) {
|
||||
let rollData = msg.getFlag("world", "mournblade-roll")
|
||||
@@ -713,7 +715,7 @@ export class MournbladeUtility {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static applyEclatRoll(li, changed, addedBonus) {
|
||||
let msgId = li.data("message-id")
|
||||
let msgId = $(li).data("message-id")
|
||||
let msg = game.messages.get(msgId)
|
||||
if (msg) {
|
||||
let rollData = msg.getFlag("world", "mournblade-roll")
|
||||
@@ -730,37 +732,37 @@ export class MournbladeUtility {
|
||||
static chatRollMenu(html, options) {
|
||||
let canApply = li => canvas.tokens.controlled.length && li.find(".mournblade-roll").length
|
||||
let canApplyBALoyal = function (li) {
|
||||
let message = game.messages.get(li.attr("data-message-id"))
|
||||
let message = game.messages.get($(li).attr("data-message-id"))
|
||||
let rollData = message.getFlag("world", "mournblade-roll")
|
||||
let actor = MournbladeUtility.getActorFromRollData(rollData)
|
||||
return (!rollData.isReroll && actor.getBonneAventure() > 0 && actor.getAlignement() == "loyal")
|
||||
}
|
||||
let canApplyPELoyal = function (li) {
|
||||
let message = game.messages.get(li.attr("data-message-id"))
|
||||
let message = game.messages.get($(li).attr("data-message-id"))
|
||||
let rollData = message.getFlag("world", "mournblade-roll")
|
||||
let actor = MournbladeUtility.getActorFromRollData(rollData)
|
||||
return (!rollData.isReroll && actor.getEclat() > 0 && actor.getAlignement() == "loyal")
|
||||
}
|
||||
let canApplyBAChaotique = function (li) {
|
||||
let message = game.messages.get(li.attr("data-message-id"))
|
||||
let message = game.messages.get($(li).attr("data-message-id"))
|
||||
let rollData = message.getFlag("world", "mournblade-roll")
|
||||
let actor = MournbladeUtility.getActorFromRollData(rollData)
|
||||
return (!rollData.isReroll && actor.getBonneAventure() > 0 && actor.getAlignement() == "chaotique")
|
||||
}
|
||||
let canApplyBAChaotique3 = function (li) {
|
||||
let message = game.messages.get(li.attr("data-message-id"))
|
||||
let message = game.messages.get($(li).attr("data-message-id"))
|
||||
let rollData = message.getFlag("world", "mournblade-roll")
|
||||
let actor = MournbladeUtility.getActorFromRollData(rollData)
|
||||
return (!rollData.isReroll && actor.getBonneAventure() > 2 && actor.getAlignement() == "chaotique")
|
||||
}
|
||||
let canApplyPEChaotique = function (li) {
|
||||
let message = game.messages.get(li.attr("data-message-id"))
|
||||
let message = game.messages.get($(li).attr("data-message-id"))
|
||||
let rollData = message.getFlag("world", "mournblade-roll")
|
||||
let actor = MournbladeUtility.getActorFromRollData(rollData)
|
||||
return (!rollData.isReroll && actor.getEclat() > 0 && actor.getAlignement() == "chaotique")
|
||||
}
|
||||
let hasPredilection = function (li) {
|
||||
let message = game.messages.get(li.attr("data-message-id"))
|
||||
let message = game.messages.get($(li).attr("data-message-id"))
|
||||
let rollData = message.getFlag("world", "mournblade-roll")
|
||||
let actor = MournbladeUtility.getActorFromRollData(rollData)
|
||||
if (rollData.competence) {
|
||||
@@ -770,7 +772,7 @@ export class MournbladeUtility {
|
||||
return false
|
||||
}
|
||||
let canCompetenceDouble = function (li) {
|
||||
let message = game.messages.get(li.attr("data-message-id"))
|
||||
let message = game.messages.get($(li).attr("data-message-id"))
|
||||
let rollData = message.getFlag("world", "mournblade-roll")
|
||||
let actor = MournbladeUtility.getActorFromRollData(rollData)
|
||||
if (rollData.competence) {
|
||||
|
||||
Reference in New Issue
Block a user