diff --git a/modules/malefices-actor-sheet.js b/modules/malefices-actor-sheet.js index 3c009be..bb57f59 100644 --- a/modules/malefices-actor-sheet.js +++ b/modules/malefices-actor-sheet.js @@ -6,7 +6,7 @@ import { MaleficesUtility } from "./malefices-utility.js"; /* -------------------------------------------- */ -export class MaleficesActorSheet extends ActorSheet { +export class MaleficesActorSheet extends foundry.appv1.sheets.ActorSheet { /** @override */ static get defaultOptions() { @@ -44,9 +44,9 @@ export class MaleficesActorSheet extends ActorSheet { phyMalus: this.actor.getPhysiqueMalus(), elementsbio: this.actor.getElementsBio(), sorts: this.actor.getSorts(), - description: await TextEditor.enrichHTML(this.object.system.biodata.description, { async: true }), - notes: await TextEditor.enrichHTML(this.object.system.biodata.notes, { async: true }), - equipementlibre: await TextEditor.enrichHTML(this.object.system.equipementlibre, { async: true }), + description: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.biodata.description, { async: true }), + notes: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.biodata.notes, { async: true }), + equipementlibre: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.equipementlibre, { async: true }), options: this.options, owner: this.document.isOwner, editScore: this.options.editScore, @@ -66,10 +66,10 @@ export class MaleficesActorSheet extends ActorSheet { // Everything below here is only needed if the sheet is editable if (!this.options.editable) return; - + html.bind("keydown", function(e) { // Ignore Enter in actores sheet if (e.keyCode === 13) return false; - }); + }); // Update Inventory Item html.find('.item-edit').click(ev => { @@ -87,14 +87,14 @@ export class MaleficesActorSheet extends ActorSheet { let dataType = $(ev.currentTarget).data("type") this.actor.createEmbeddedDocuments('Item', [{ name: "NewItem", type: dataType }], { renderSheet: true }) }) - + html.find('.subactor-edit').click(ev => { const li = $(ev.currentTarget).parents(".item"); let actorId = li.data("actor-id"); let actor = game.actors.get( actorId ); actor.sheet.render(true); }); - + html.find('.subactor-delete').click(ev => { const li = $(ev.currentTarget).parents(".item"); let actorId = li.data("actor-id"); @@ -117,38 +117,38 @@ export class MaleficesActorSheet extends ActorSheet { const li = $(event.currentTarget).parents(".item") this.actor.incDecAmmo( li.data("item-id"), +1 ) } ); - + html.find('.roll-attribut').click((event) => { let attrKey = $(event.currentTarget).data("attr-key") this.actor.rollAttribut(attrKey) - }); + }); html.find('.roll-arme').click((event) => { const armeId = $(event.currentTarget).data("arme-id") this.actor.rollArme(armeId) }); - + html.find('.lock-unlock-sheet').click((event) => { this.options.editScore = !this.options.editScore; this.render(true); - }); + }); html.find('.item-link a').click((event) => { const itemId = $(event.currentTarget).data("item-id"); const item = this.actor.getOwnedItem(itemId); item.sheet.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); }); html.find('.update-field').change(ev => { const fieldName = $(ev.currentTarget).data("field-name"); let value = Number(ev.currentTarget.value); this.actor.update( { [`${fieldName}`]: value } ); - }); + }); } - + /* -------------------------------------------- */ /** @override */ setPosition(options = {}) { diff --git a/modules/malefices-commands.js b/modules/malefices-commands.js index 31d482d..adc2e95 100644 --- a/modules/malefices-commands.js +++ b/modules/malefices-commands.js @@ -80,7 +80,7 @@ export class MaleficesCommands { console.log("===> Processing command") let command = commandsTable[name]; path = path + name + " "; - if (command && command.subTable) { + if (command?.subTable) { if (params[0]) { return this._processCommand(command.subTable, params[0], params.slice(1), content, msg, path) } @@ -89,7 +89,7 @@ export class MaleficesCommands { return true; } } - if (command && command.func) { + if (command?.func) { const result = command.func(content, msg, params); if (result == false) { CrucibleCommands._chatAnswer(msg, command.descr); @@ -140,7 +140,7 @@ export class MaleficesCommands { selectedCard.system.isgm = false selectedCard.value = (selectedCard.system.ispositif)? selectedCard.system.numericvalueup : selectedCard.system.numericvaluedown MaleficesUtility.createChatMessage(game.user.name, "", { - content: await renderTemplate(`systems/fvtt-malefices/templates/chat/display-tarot-card.hbs`, selectedCard) + content: await foundry.applications.handlebars.renderTemplates(`systems/fvtt-malefices/templates/chat/display-tarot-card.hbs`, selectedCard) }) } diff --git a/modules/malefices-item-sheet.js b/modules/malefices-item-sheet.js index 68aaa56..0d0846e 100644 --- a/modules/malefices-item-sheet.js +++ b/modules/malefices-item-sheet.js @@ -4,7 +4,7 @@ import { MaleficesUtility } from "./malefices-utility.js"; * Extend the basic ItemSheet with some very simple modifications * @extends {ItemSheet} */ -export class MaleficesItemSheet extends ItemSheet { +export class MaleficesItemSheet extends foundry.appv1.sheets.ItemSheet { /** @override */ static get defaultOptions() { @@ -48,15 +48,15 @@ export class MaleficesItemSheet extends ItemSheet { limited: this.object.limited, options: this.options, owner: this.document.isOwner, - description: await TextEditor.enrichHTML(this.object.system.description, { async: true }), - notes: await TextEditor.enrichHTML(this.object.system.notes, { async: true }), + description: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.description, { async: true }), + notes: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.notes, { async: true }), isGM: game.user.isGM } if ( this.object.type == "archetype") { formData.tarots = MaleficesUtility.getTarots() } - + this.options.editable = !(this.object.origin == "embeddedItem"); console.log("ITEM DATA", formData, this); return formData; @@ -102,7 +102,7 @@ export class MaleficesItemSheet extends ItemSheet { let levelIndex = Number($(ev.currentTarget).parents(".item").data("level-index")) let choiceIndex = Number($(ev.currentTarget).parents(".item").data("choice-index")) let featureId = $(ev.currentTarget).parents(".item").data("feature-id") - + let itemData = this.object.system.levels[levelIndex].choices[choiceIndex].features[featureId] if (itemData.name != 'None') { diff --git a/modules/malefices-main.js b/modules/malefices-main.js index 9aa2019..8b76e91 100644 --- a/modules/malefices-main.js +++ b/modules/malefices-main.js @@ -39,7 +39,7 @@ Hooks.once("init", async function () { MaleficesUtility.preloadHandlebarsTemplates(); /* -------------------------------------------- */ - // Set an initiative formula for the system + // Set an initiative formula for the system CONFIG.Combat.initiative = { formula: "1d6", decimals: 1 @@ -58,12 +58,12 @@ Hooks.once("init", async function () { /* -------------------------------------------- */ // Register sheet application classes - Actors.unregisterSheet("core", ActorSheet); - Actors.registerSheet("fvtt-malefices", MaleficesActorSheet, { types: ["personnage"], makeDefault: true }); - Actors.registerSheet("fvtt-malefices", MaleficesNPCSheet, { types: ["pnj"], makeDefault: false }); + foundry.documents.collections.Actors.unregisterSheet("core", foundry.appv1.sheets.ActorSheet); + foundry.documents.collections.Actors.registerSheet("fvtt-malefices", MaleficesActorSheet, { types: ["personnage"], makeDefault: true }); + foundry.documents.collections.Actors.registerSheet("fvtt-malefices", MaleficesNPCSheet, { types: ["pnj"], makeDefault: false }); - Items.unregisterSheet("core", ItemSheet); - Items.registerSheet("fvtt-malefices", MaleficesItemSheet, { makeDefault: true }); + foundry.documents.collections.Items.unregisterSheet("core", foundry.appv1.sheets.ItemSheet); + foundry.documents.collections.Items.registerSheet("fvtt-malefices", MaleficesItemSheet, { makeDefault: true }); MaleficesUtility.init() @@ -119,4 +119,3 @@ Hooks.on("chatMessage", (html, content, msg) => { } return true; }); - diff --git a/modules/malefices-npc-sheet.js b/modules/malefices-npc-sheet.js index d122913..5738e02 100644 --- a/modules/malefices-npc-sheet.js +++ b/modules/malefices-npc-sheet.js @@ -6,7 +6,7 @@ import { MaleficesUtility } from "./malefices-utility.js"; /* -------------------------------------------- */ -export class MaleficesNPCSheet extends ActorSheet { +export class MaleficesNPCSheet extends foundry.appv1.sheets.ActorSheet { /** @override */ static get defaultOptions() { @@ -71,10 +71,10 @@ export class MaleficesNPCSheet extends ActorSheet { // Everything below here is only needed if the sheet is editable if (!this.options.editable) return; - + html.bind("keydown", function(e) { // Ignore Enter in actores sheet if (e.keyCode === 13) return false; - }); + }); // Update Inventory Item html.find('.item-edit').click(ev => { @@ -92,17 +92,17 @@ export class MaleficesNPCSheet extends ActorSheet { let dataType = $(ev.currentTarget).data("type") this.actor.createEmbeddedDocuments('Item', [{ name: "NewItem", type: dataType }], { renderSheet: true }) }) - + html.find('.equip-activate').click(ev => { const li = $(ev.currentTarget).parents(".item") let itemId = li.data("item-id") this.actor.equipActivate( itemId) - }); + }); html.find('.equip-deactivate').click(ev => { const li = $(ev.currentTarget).parents(".item") let itemId = li.data("item-id") this.actor.equipDeactivate( itemId) - }); + }); html.find('.subactor-edit').click(ev => { const li = $(ev.currentTarget).parents(".item"); @@ -110,7 +110,7 @@ export class MaleficesNPCSheet extends ActorSheet { let actor = game.actors.get( actorId ); actor.sheet.render(true); }); - + html.find('.subactor-delete').click(ev => { const li = $(ev.currentTarget).parents(".item"); let actorId = li.data("actor-id"); @@ -133,7 +133,7 @@ export class MaleficesNPCSheet extends ActorSheet { const li = $(event.currentTarget).parents(".item") this.actor.incDecAmmo( li.data("item-id"), +1 ) } ); - + html.find('.roll-ability').click((event) => { const abilityKey = $(event.currentTarget).data("ability-key"); this.actor.rollAbility(abilityKey); @@ -142,7 +142,7 @@ export class MaleficesNPCSheet extends ActorSheet { const li = $(event.currentTarget).parents(".item") const skillId = li.data("item-id") this.actor.rollSkill(skillId) - }); + }); html.find('.roll-weapon').click((event) => { const li = $(event.currentTarget).parents(".item"); @@ -163,28 +163,28 @@ export class MaleficesNPCSheet extends ActorSheet { const saveKey = $(event.currentTarget).data("save-key") this.actor.rollSave(saveKey) }); - - + + html.find('.lock-unlock-sheet').click((event) => { this.options.editScore = !this.options.editScore; this.render(true); - }); + }); html.find('.item-link a').click((event) => { const itemId = $(event.currentTarget).data("item-id"); const item = this.actor.getOwnedItem(itemId); item.sheet.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); }); html.find('.update-field').change(ev => { const fieldName = $(ev.currentTarget).data("field-name"); let value = Number(ev.currentTarget.value); this.actor.update( { [`${fieldName}`]: value } ); - }); + }); } diff --git a/modules/malefices-roll-dialog.js b/modules/malefices-roll-dialog.js index 3ee79cb..852dc61 100644 --- a/modules/malefices-roll-dialog.js +++ b/modules/malefices-roll-dialog.js @@ -7,10 +7,10 @@ export class MaleficesRollDialog extends Dialog { let options = { classes: ["MaleficesDialog"], width: 540, height: 'fit-content', 'z-index': 99999 } let html - if (rollData.attr && rollData.attr.iscard) { - html = await renderTemplate('systems/fvtt-malefices/templates/dialogs/confrontation-dialog.hbs', rollData); + if (rollData?.attr?.iscard) { + html = await foundry.applications.handlebars.renderTemplate('systems/fvtt-malefices/templates/dialogs/confrontation-dialog.hbs', rollData); } else { - html = await renderTemplate('systems/fvtt-malefices/templates/dialogs/roll-dialog-generic.hbs', rollData); + html = await foundry.applications.handlebars.renderTemplate('systems/fvtt-malefices/templates/dialogs/roll-dialog-generic.hbs', rollData); } return new MaleficesRollDialog(actor, rollData, html, options); @@ -18,7 +18,7 @@ export class MaleficesRollDialog extends Dialog { /* -------------------------------------------- */ constructor(actor, rollData, html, options, close = undefined) { - let isCard = rollData.attr && rollData.attr.iscard + let isCard = rollData?.attr?.iscard let conf = { title: (isCard) ? "Jet" : "Tirage", content: html, @@ -45,7 +45,7 @@ export class MaleficesRollDialog extends Dialog { /* -------------------------------------------- */ roll() { - let isCard = this.rollData.attr && this.rollData.attr.iscard + let isCard = this.rollData?.attr?.iscard if (isCard) { MaleficesUtility.tirageConfrontationMalefices(this.rollData) } else { @@ -64,7 +64,6 @@ export class MaleficesRollDialog extends Dialog { activateListeners(html) { super.activateListeners(html); - var dialog = this; function onLoad() { } $(function () { onLoad(); }); @@ -87,6 +86,6 @@ export class MaleficesRollDialog extends Dialog { html.find('#confrontationModif').change((event) => { this.rollData.confrontationModif = Number(event.currentTarget.value) }) - + } } \ No newline at end of file diff --git a/modules/malefices-tirage-tarot-dialog.js b/modules/malefices-tirage-tarot-dialog.js index d137c9d..f9b0096 100644 --- a/modules/malefices-tirage-tarot-dialog.js +++ b/modules/malefices-tirage-tarot-dialog.js @@ -6,7 +6,7 @@ export class MaleficesTirageTarotDialog extends Dialog { static async create(actor, tirageData) { let options = { classes: ["MaleficesDialog"], width: 720, height: 740, 'z-index': 99999 }; - let html = await renderTemplate('systems/fvtt-malefices/templates/dialogs/tirage-tarot-dialog.hbs', tirageData); + let html = await foundry.applications.handlebars.renderTemplate('systems/fvtt-malefices/templates/dialogs/tirage-tarot-dialog.hbs', tirageData); return new MaleficesTirageTarotDialog(actor, tirageData, html, options); } @@ -36,7 +36,7 @@ export class MaleficesTirageTarotDialog extends Dialog { async sendCardRequest() { this.tirageData.state = 'waiting-user-card' let msg = await MaleficesUtility.createChatMessage(this.tirageData.user.name, "useronly", { - content: await renderTemplate(`systems/fvtt-malefices/templates/chat/request-tarot-card.hbs`, this.tirageData) + content: await renderTemplate(`systems/fvtt-malefices/templates/chat/request-tarot-card.hbs`, this.tirageData) }) //msg.setFlag("world", "tirage-data", this.tirageData) console.log("MSG IS", msg) @@ -50,7 +50,7 @@ export class MaleficesTirageTarotDialog extends Dialog { if ( selectedCard.system.isdualside) { // Cas des cartes pouvant avoir 2 sens selectedCard.system.ispositif = (Math.random() > 0.5) } - console.log("CARD SELECTED:", selectedCard) + console.log("CARD SELECTED:", selectedCard) // Cas spécial de la Roue de la Fortune if ( selectedCard.name.toLowerCase().includes("fortune")) { this.tirageData.maxPlayerCard += 1 @@ -63,7 +63,7 @@ export class MaleficesTirageTarotDialog extends Dialog { } } this.tirageData.deck = newList - + return selectedCard } @@ -74,9 +74,9 @@ export class MaleficesTirageTarotDialog extends Dialog { let selectedCard = this.drawCard() selectedCard.system.isgm = false await MaleficesUtility.createChatMessage(this.tirageData.user.name, "gmroll", { - content: await renderTemplate(`systems/fvtt-malefices/templates/chat/display-tarot-card.hbs`, selectedCard) + content: await renderTemplate(`systems/fvtt-malefices/templates/chat/display-tarot-card.hbs`, selectedCard) }) - if (this.tirageData.cards[0].name == "???") { + if (this.tirageData.cards[0].name == "???") { this.tirageData.cards.shift() } this.tirageData.cards.push(selectedCard) @@ -87,9 +87,9 @@ export class MaleficesTirageTarotDialog extends Dialog { let selectedCard = this.drawCard() selectedCard.system.isgm = true await MaleficesUtility.createChatMessage(this.tirageData.user.name, "blindroll", { - content: await renderTemplate(`systems/fvtt-malefices/templates/chat/display-tarot-card.hbs`, selectedCard) + content: await foundry.applications.handlebars.renderTemplate(`systems/fvtt-malefices/templates/chat/display-tarot-card.hbs`, selectedCard) }) - if (this.tirageData.secretCards[0].name == "???") { + if (this.tirageData.secretCards[0].name == "???") { this.tirageData.secretCards.shift() } this.tirageData.secretCards.push(selectedCard) @@ -124,7 +124,7 @@ export class MaleficesTirageTarotDialog extends Dialog { } /* -------------------------------------------- */ async refreshDialog() { - const content = await renderTemplate("systems/fvtt-malefices/templates/dialogs/tirage-tarot-dialog.hbs", this.tirageData) + const content = await foundry.applications.handlebars.renderTemplate("systems/fvtt-malefices/templates/dialogs/tirage-tarot-dialog.hbs", this.tirageData) this.data.content = content this.render(true) } @@ -133,7 +133,7 @@ export class MaleficesTirageTarotDialog extends Dialog { activateListeners(html) { super.activateListeners(html); - var dialog = this; + let dialog = this; function onLoad() { } $(function () { onLoad(); }); @@ -150,6 +150,6 @@ export class MaleficesTirageTarotDialog extends Dialog { dialog.attributeToActor(actorId) } }) - + } } \ No newline at end of file diff --git a/modules/malefices-utility.js b/modules/malefices-utility.js index 442075b..7d167c8 100644 --- a/modules/malefices-utility.js +++ b/modules/malefices-utility.js @@ -43,6 +43,14 @@ export class MaleficesUtility { Handlebars.registerHelper('add', function (a, b) { return parseInt(a) + parseInt(b); }) + // Handle v12 removal of this helper + Handlebars.registerHelper('select', function (selected, options) { + const escapedValue = RegExp.escape(Handlebars.escapeExpression(selected)); + const rgx = new RegExp(' value=[\"\']' + escapedValue + '[\"\']'); + const html = options.fn(this); + return html.replace(rgx, "$& selected"); + }); + game.settings.register("world", "character-summary-data", { name: "character-summary-data", @@ -68,7 +76,7 @@ export class MaleficesUtility { return foundry.utils.duplicate(this.tarots) } static getTarot(tId) { - return this.tarots.find(t => t._id == tId) + return this.tarots.find(t => t._id == tId) } /* -------------------------------------------- */ @@ -99,14 +107,14 @@ export class MaleficesUtility { if (game.user.isGM) { game.system.malefices.currentTirage.addCard(msgId) } else { - game.socket.emit( "system.fvtt-malefices", {name: "msg-draw-card", data: {msgId: msgId}}) + game.socket.emit("system.fvtt-malefices", { name: "msg-draw-card", data: { msgId: msgId } }) } } /* -------------------------------------------- */ static async chatListeners(html) { - html.on("click", '.roll-destin', event => { + $(html).on("click", '.roll-destin', event => { let messageId = MaleficesUtility.findChatMessageId(event.currentTarget) let message = game.messages.get(messageId) let rollData = message.getFlag("world", "rolldata") @@ -115,11 +123,11 @@ export class MaleficesUtility { rollData.isReroll = true this.rollMalefices(rollData) }) - html.on("click", '.draw-tarot-card', event => { + $(html).on("click", '.draw-tarot-card', event => { let messageId = MaleficesUtility.findChatMessageId(event.currentTarget) this.drawDeckCard(messageId) }) - + } /* -------------------------------------------- */ @@ -130,7 +138,7 @@ export class MaleficesUtility { 'systems/fvtt-malefices/templates/items/partial-item-nav.hbs', 'systems/fvtt-malefices/templates/items/partial-item-description.hbs' ] - return loadTemplates(templatePaths); + return foundry.applications.handlebars.loadTemplates(templatePaths); } /* -------------------------------------------- */ @@ -204,7 +212,7 @@ export class MaleficesUtility { static async onSocketMesssage(msg) { console.log("SOCKET MESSAGE", msg.name) if (msg.name == "msg-draw-card") { - if ( game.user.isGM && game.system.malefices.currentTirage) { + if (game.user.isGM && game.system.malefices.currentTirage) { game.system.malefices.currentTirage.addCard(msg.data.msgId) } } @@ -271,71 +279,79 @@ export class MaleficesUtility { /* -------------------------------------------- */ static processSpecialCard(actor, rollData) { if (rollData.selectedCard.name.toLowerCase().includes("archange")) { - let actorCard = actor.items.find( c => c.type =="tarot" && c.name.toLowerCase().includes("archange")) + let actorCard = actor.items.find(c => c.type == "tarot" && c.name.toLowerCase().includes("archange")) if (actorCard) { MaleficesUtility.createChatMessage(actor.name, "gmroll", { - content: `Conséquence supplémentaire !
L'Archange : ${actor.name} gagne 1 point de Spiritualité.` }) + content: `Conséquence supplémentaire !
L'Archange : ${actor.name} gagne 1 point de Spiritualité.` + }) actor.incDecAttr("spiritualite", 1) } } if (rollData.selectedCard.name.toLowerCase().includes("vicaire")) { - let actorCard = actor.items.find( c => c.type =="tarot" && c.name.toLowerCase().includes("vicaire")) + let actorCard = actor.items.find(c => c.type == "tarot" && c.name.toLowerCase().includes("vicaire")) if (actorCard) { MaleficesUtility.createChatMessage(actor.name, "blindroll", { - content: `Conséquence supplémentaire !
Le Vicaire : ${actor.name} vient de gagner 1 point en Pratique de la Magie Blanche (MPMB, secret).` }) + content: `Conséquence supplémentaire !
Le Vicaire : ${actor.name} vient de gagner 1 point en Pratique de la Magie Blanche (MPMB, secret).` + }) actor.incDecMPMB(1) } } if (rollData.selectedCard.name.toLowerCase().includes("chance")) { - let actorCard = actor.items.find( c => c.type =="tarot" && c.name.toLowerCase().includes("chance")) + let actorCard = actor.items.find(c => c.type == "tarot" && c.name.toLowerCase().includes("chance")) if (actorCard) { MaleficesUtility.createChatMessage(actor.name, "gmroll", { - content: `Conséquence supplémentaire !
La Chance : ${actor.name} a gagné 1 point de Destin.` }) + content: `Conséquence supplémentaire !
La Chance : ${actor.name} a gagné 1 point de Destin.` + }) actor.incDecDestin(1) } } if (rollData.selectedCard.name.toLowerCase().includes("mort")) { - let actorCard = actor.items.find( c => c.type =="tarot" && c.name.toLowerCase().includes("mort")) + let actorCard = actor.items.find(c => c.type == "tarot" && c.name.toLowerCase().includes("mort")) if (actorCard) { MaleficesUtility.createChatMessage(actor.name, "gmroll", { - content: `Conséquence supplémentaire !
La Mort : ${actor.name} est pétrifié par la peur.` }) + content: `Conséquence supplémentaire !
La Mort : ${actor.name} est pétrifié par la peur.` + }) actor.incDecDestin(1) } } if (rollData.selectedCard.name.toLowerCase().includes("diable")) { - let actorCard = actor.items.find( c => c.type =="tarot" && c.name.toLowerCase().includes("diable")) + let actorCard = actor.items.find(c => c.type == "tarot" && c.name.toLowerCase().includes("diable")) if (actorCard) { MaleficesUtility.createChatMessage(actor.name, "gmroll", { - content: `Conséquence supplémentaire !
Le Diable : ${actor.name} gagne 1 point de Rationnalité.` }) + content: `Conséquence supplémentaire !
Le Diable : ${actor.name} gagne 1 point de Rationnalité.` + }) actor.incDecAttr("rationnalite", 1) } } if (rollData.selectedCard.name.toLowerCase().includes("lune noire")) { - let actorCard = actor.items.find( c => c.type =="tarot" && c.name.toLowerCase().includes("lune noire")) + let actorCard = actor.items.find(c => c.type == "tarot" && c.name.toLowerCase().includes("lune noire")) if (actorCard) { MaleficesUtility.createChatMessage(actor.name, "blindroll", { - content: `Conséquence supplémentaire !
La Lune Noire : ${actor.name} vient de gagner 1 point de Fluide (secret).` }) + content: `Conséquence supplémentaire !
La Lune Noire : ${actor.name} vient de gagner 1 point de Fluide (secret).` + }) actor.incDecFluide(1) } } if (rollData.selectedCard.name.toLowerCase().includes("grand livre")) { - let actorCard = actor.items.find( c => c.type =="tarot" && c.name.toLowerCase().includes("grand livre")) + let actorCard = actor.items.find(c => c.type == "tarot" && c.name.toLowerCase().includes("grand livre")) if (actorCard) { MaleficesUtility.createChatMessage(actor.name, "blindroll", { - content: `Conséquence supplémentaire !
La Lune Noire : ${actor.name} vient de gagner 1 point de Fluide (secret).` }) + content: `Conséquence supplémentaire !
La Lune Noire : ${actor.name} vient de gagner 1 point de Fluide (secret).` + }) actor.incDecFluide(1) } } if (rollData.selectedCard.name.toLowerCase().includes("sorcier")) { - let actorCard = actor.items.find( c => c.type =="tarot" && c.name.toLowerCase().includes("sorcier")) + let actorCard = actor.items.find(c => c.type == "tarot" && c.name.toLowerCase().includes("sorcier")) if (actorCard) { MaleficesUtility.createChatMessage(actor.name, "blindroll", { - content: `Conséquence supplémentaire !
Le Vicaire : ${actor.name} vient de gagner 1 point en Pratique de la Magie Noire (MPMN, secret).` }) + content: `Conséquence supplémentaire !
Le Vicaire : ${actor.name} vient de gagner 1 point en Pratique de la Magie Noire (MPMN, secret).` + }) actor.incDecMPMN(1) } } - } + } /* -------------------------------------------- */ static computeResults(rollData) { @@ -362,30 +378,30 @@ export class MaleficesUtility { rollData.target = rollData.attr.value - rollData.confrontationDegre + rollData.confrontationModif let deck = this.getTarots() - let index = Math.round(Math.random() * (deck.length-1)) + let index = Math.round(Math.random() * (deck.length - 1)) let selectedCard = deck[index] selectedCard.system.ispositif = (Math.random() > 0.5) - selectedCard.value = (selectedCard.system.ispositif)? selectedCard.system.numericvalueup : selectedCard.system.numericvaluedown + selectedCard.value = (selectedCard.system.ispositif) ? selectedCard.system.numericvalueup : selectedCard.system.numericvaluedown rollData.total = selectedCard.value rollData.selectedCard = selectedCard await MaleficesUtility.createChatMessage(actor.name, "gmroll", { - content: await renderTemplate(`systems/fvtt-malefices/templates/chat/display-tarot-card.hbs`, selectedCard) + content: await renderTemplate(`systems/fvtt-malefices/templates/chat/display-tarot-card.hbs`, selectedCard) }) this.computeResults(rollData) if (rollData.isSuccess) { - rollData.gainAttr = Math.ceil(rollData.confrontationDegre/2) + ((rollData.isCritical ) ? 1 : 0) - actor.incDecAttr(rollData.attr.abbrev, rollData.gainAttr ) + rollData.gainAttr = Math.ceil(rollData.confrontationDegre / 2) + ((rollData.isCritical) ? 1 : 0) + actor.incDecAttr(rollData.attr.abbrev, rollData.gainAttr) } else { rollData.gainAttr = rollData.confrontationDegre - actor.incDecAttr(rollData.attr.abbrev, -rollData.gainAttr ) + actor.incDecAttr(rollData.attr.abbrev, -rollData.gainAttr) } await MaleficesUtility.createChatMessage(actor.name, "gmroll", { - content: await renderTemplate(`systems/fvtt-malefices/templates/chat/chat-confrontation-result.hbs`, rollData) + content: await renderTemplate(`systems/fvtt-malefices/templates/chat/chat-confrontation-result.hbs`, rollData) }) - this.processSpecialCard(actor, rollData) + this.processSpecialCard(actor, rollData) } /* -------------------------------------------- */ static async rollMalefices(rollData) { @@ -410,7 +426,7 @@ export class MaleficesUtility { this.computeResults(rollData) let msg = await this.createChatWithRollMode(rollData.alias, { - content: await renderTemplate(`systems/fvtt-malefices/templates/chat/chat-generic-result.hbs`, rollData) + content: await foundry.applications.handlebars.renderTemplate(`systems/fvtt-malefices/templates/chat/chat-generic-result.hbs`, rollData) }) msg.setFlag("world", "rolldata", rollData) if (rollData.mode == "initiative") { diff --git a/packs/malefices-archetypes/000031.log b/packs/malefices-archetypes/000031.log deleted file mode 100644 index e69de29..0000000 diff --git a/packs/malefices-archetypes/000035.log b/packs/malefices-archetypes/000035.log new file mode 100644 index 0000000..2cf3251 Binary files /dev/null and b/packs/malefices-archetypes/000035.log differ diff --git a/packs/malefices-archetypes/CURRENT b/packs/malefices-archetypes/CURRENT index 52f34be..eea9b0f 100644 --- a/packs/malefices-archetypes/CURRENT +++ b/packs/malefices-archetypes/CURRENT @@ -1 +1 @@ -MANIFEST-000029 +MANIFEST-000034 diff --git a/packs/malefices-archetypes/LOG b/packs/malefices-archetypes/LOG index 396b357..bde38ff 100644 --- a/packs/malefices-archetypes/LOG +++ b/packs/malefices-archetypes/LOG @@ -1,14 +1,3 @@ -2024/11/29-17:51:13.272607 7f11d37fe6c0 Recovering log #28 -2024/11/29-17:51:13.282971 7f11d37fe6c0 Delete type=0 #28 -2024/11/29-17:51:13.283067 7f11d37fe6c0 Delete type=3 #27 -2024/11/29-17:51:44.217520 7f11d27fc6c0 Level-0 table #32: started -2024/11/29-17:51:44.221106 7f11d27fc6c0 Level-0 table #32: 50651 bytes OK -2024/11/29-17:51:44.227128 7f11d27fc6c0 Delete type=0 #30 -2024/11/29-17:51:44.256008 7f11d27fc6c0 Manual compaction at level-0 from '!items!2HWSdXDSFei9KC6y' @ 72057594037927935 : 1 .. '!items!xtYE2kVIfNtrXSoU' @ 0 : 0; will stop at '!items!xtYE2kVIfNtrXSoU' @ 46 : 1 -2024/11/29-17:51:44.256025 7f11d27fc6c0 Compacting 2@0 + 0@1 files -2024/11/29-17:51:44.260729 7f11d27fc6c0 Generated table #33@0: 23 keys, 50651 bytes -2024/11/29-17:51:44.260747 7f11d27fc6c0 Compacted 2@0 + 0@1 files => 50651 bytes -2024/11/29-17:51:44.266718 7f11d27fc6c0 compacted to: files[ 0 1 0 0 0 0 0 ] -2024/11/29-17:51:44.266853 7f11d27fc6c0 Delete type=2 #22 -2024/11/29-17:51:44.267043 7f11d27fc6c0 Delete type=2 #32 -2024/11/29-17:51:44.297135 7f11d27fc6c0 Manual compaction at level-0 from '!items!xtYE2kVIfNtrXSoU' @ 46 : 1 .. '!items!xtYE2kVIfNtrXSoU' @ 0 : 0; will stop at (end) +2025/05/01-00:13:13.266834 7efc4dffb6c0 Recovering log #31 +2025/05/01-00:13:13.321299 7efc4dffb6c0 Delete type=3 #29 +2025/05/01-00:13:13.321436 7efc4dffb6c0 Delete type=0 #31 diff --git a/packs/malefices-archetypes/LOG.old b/packs/malefices-archetypes/LOG.old index c2fda22..396b357 100644 --- a/packs/malefices-archetypes/LOG.old +++ b/packs/malefices-archetypes/LOG.old @@ -1 +1,14 @@ -2024/05/03-23:45:44.034560 7f863f4006c0 Delete type=3 #1 +2024/11/29-17:51:13.272607 7f11d37fe6c0 Recovering log #28 +2024/11/29-17:51:13.282971 7f11d37fe6c0 Delete type=0 #28 +2024/11/29-17:51:13.283067 7f11d37fe6c0 Delete type=3 #27 +2024/11/29-17:51:44.217520 7f11d27fc6c0 Level-0 table #32: started +2024/11/29-17:51:44.221106 7f11d27fc6c0 Level-0 table #32: 50651 bytes OK +2024/11/29-17:51:44.227128 7f11d27fc6c0 Delete type=0 #30 +2024/11/29-17:51:44.256008 7f11d27fc6c0 Manual compaction at level-0 from '!items!2HWSdXDSFei9KC6y' @ 72057594037927935 : 1 .. '!items!xtYE2kVIfNtrXSoU' @ 0 : 0; will stop at '!items!xtYE2kVIfNtrXSoU' @ 46 : 1 +2024/11/29-17:51:44.256025 7f11d27fc6c0 Compacting 2@0 + 0@1 files +2024/11/29-17:51:44.260729 7f11d27fc6c0 Generated table #33@0: 23 keys, 50651 bytes +2024/11/29-17:51:44.260747 7f11d27fc6c0 Compacted 2@0 + 0@1 files => 50651 bytes +2024/11/29-17:51:44.266718 7f11d27fc6c0 compacted to: files[ 0 1 0 0 0 0 0 ] +2024/11/29-17:51:44.266853 7f11d27fc6c0 Delete type=2 #22 +2024/11/29-17:51:44.267043 7f11d27fc6c0 Delete type=2 #32 +2024/11/29-17:51:44.297135 7f11d27fc6c0 Manual compaction at level-0 from '!items!xtYE2kVIfNtrXSoU' @ 46 : 1 .. '!items!xtYE2kVIfNtrXSoU' @ 0 : 0; will stop at (end) diff --git a/packs/malefices-archetypes/MANIFEST-000029 b/packs/malefices-archetypes/MANIFEST-000029 deleted file mode 100644 index 7a470c8..0000000 Binary files a/packs/malefices-archetypes/MANIFEST-000029 and /dev/null differ diff --git a/packs/malefices-archetypes/MANIFEST-000034 b/packs/malefices-archetypes/MANIFEST-000034 new file mode 100644 index 0000000..b2a014a Binary files /dev/null and b/packs/malefices-archetypes/MANIFEST-000034 differ diff --git a/packs/malefices-armes/000031.log b/packs/malefices-armes/000031.log deleted file mode 100644 index e69de29..0000000 diff --git a/packs/malefices-armes/000035.log b/packs/malefices-armes/000035.log new file mode 100644 index 0000000..f59ac79 Binary files /dev/null and b/packs/malefices-armes/000035.log differ diff --git a/packs/malefices-armes/CURRENT b/packs/malefices-armes/CURRENT index 52f34be..eea9b0f 100644 --- a/packs/malefices-armes/CURRENT +++ b/packs/malefices-armes/CURRENT @@ -1 +1 @@ -MANIFEST-000029 +MANIFEST-000034 diff --git a/packs/malefices-armes/LOG b/packs/malefices-armes/LOG index af525f5..f64632f 100644 --- a/packs/malefices-armes/LOG +++ b/packs/malefices-armes/LOG @@ -1,14 +1,3 @@ -2024/11/29-17:51:13.259713 7f11d2ffd6c0 Recovering log #28 -2024/11/29-17:51:13.269307 7f11d2ffd6c0 Delete type=0 #28 -2024/11/29-17:51:13.269361 7f11d2ffd6c0 Delete type=3 #27 -2024/11/29-17:51:44.227241 7f11d27fc6c0 Level-0 table #32: started -2024/11/29-17:51:44.230288 7f11d27fc6c0 Level-0 table #32: 2091 bytes OK -2024/11/29-17:51:44.237280 7f11d27fc6c0 Delete type=0 #30 -2024/11/29-17:51:44.267165 7f11d27fc6c0 Manual compaction at level-0 from '!items!5J6qIaWdnhEGMAXJ' @ 72057594037927935 : 1 .. '!items!nkRQU81L1gWOfaeo' @ 0 : 0; will stop at '!items!nkRQU81L1gWOfaeo' @ 18 : 1 -2024/11/29-17:51:44.267179 7f11d27fc6c0 Compacting 2@0 + 0@1 files -2024/11/29-17:51:44.270390 7f11d27fc6c0 Generated table #33@0: 9 keys, 2091 bytes -2024/11/29-17:51:44.270401 7f11d27fc6c0 Compacted 2@0 + 0@1 files => 2091 bytes -2024/11/29-17:51:44.276181 7f11d27fc6c0 compacted to: files[ 0 1 0 0 0 0 0 ] -2024/11/29-17:51:44.276330 7f11d27fc6c0 Delete type=2 #22 -2024/11/29-17:51:44.276569 7f11d27fc6c0 Delete type=2 #32 -2024/11/29-17:51:44.297146 7f11d27fc6c0 Manual compaction at level-0 from '!items!nkRQU81L1gWOfaeo' @ 18 : 1 .. '!items!nkRQU81L1gWOfaeo' @ 0 : 0; will stop at (end) +2025/05/01-00:13:13.203817 7efc4effd6c0 Recovering log #31 +2025/05/01-00:13:13.258580 7efc4effd6c0 Delete type=3 #29 +2025/05/01-00:13:13.258656 7efc4effd6c0 Delete type=0 #31 diff --git a/packs/malefices-armes/LOG.old b/packs/malefices-armes/LOG.old index 9e15543..af525f5 100644 --- a/packs/malefices-armes/LOG.old +++ b/packs/malefices-armes/LOG.old @@ -1 +1,14 @@ -2024/05/03-23:45:44.013998 7f863fe006c0 Delete type=3 #1 +2024/11/29-17:51:13.259713 7f11d2ffd6c0 Recovering log #28 +2024/11/29-17:51:13.269307 7f11d2ffd6c0 Delete type=0 #28 +2024/11/29-17:51:13.269361 7f11d2ffd6c0 Delete type=3 #27 +2024/11/29-17:51:44.227241 7f11d27fc6c0 Level-0 table #32: started +2024/11/29-17:51:44.230288 7f11d27fc6c0 Level-0 table #32: 2091 bytes OK +2024/11/29-17:51:44.237280 7f11d27fc6c0 Delete type=0 #30 +2024/11/29-17:51:44.267165 7f11d27fc6c0 Manual compaction at level-0 from '!items!5J6qIaWdnhEGMAXJ' @ 72057594037927935 : 1 .. '!items!nkRQU81L1gWOfaeo' @ 0 : 0; will stop at '!items!nkRQU81L1gWOfaeo' @ 18 : 1 +2024/11/29-17:51:44.267179 7f11d27fc6c0 Compacting 2@0 + 0@1 files +2024/11/29-17:51:44.270390 7f11d27fc6c0 Generated table #33@0: 9 keys, 2091 bytes +2024/11/29-17:51:44.270401 7f11d27fc6c0 Compacted 2@0 + 0@1 files => 2091 bytes +2024/11/29-17:51:44.276181 7f11d27fc6c0 compacted to: files[ 0 1 0 0 0 0 0 ] +2024/11/29-17:51:44.276330 7f11d27fc6c0 Delete type=2 #22 +2024/11/29-17:51:44.276569 7f11d27fc6c0 Delete type=2 #32 +2024/11/29-17:51:44.297146 7f11d27fc6c0 Manual compaction at level-0 from '!items!nkRQU81L1gWOfaeo' @ 18 : 1 .. '!items!nkRQU81L1gWOfaeo' @ 0 : 0; will stop at (end) diff --git a/packs/malefices-armes/MANIFEST-000029 b/packs/malefices-armes/MANIFEST-000029 deleted file mode 100644 index 626c855..0000000 Binary files a/packs/malefices-armes/MANIFEST-000029 and /dev/null differ diff --git a/packs/malefices-armes/MANIFEST-000034 b/packs/malefices-armes/MANIFEST-000034 new file mode 100644 index 0000000..54e68e9 Binary files /dev/null and b/packs/malefices-armes/MANIFEST-000034 differ diff --git a/packs/malefices-macros/000031.log b/packs/malefices-macros/000031.log deleted file mode 100644 index e69de29..0000000 diff --git a/packs/malefices-macros/000035.log b/packs/malefices-macros/000035.log new file mode 100644 index 0000000..36ebeec Binary files /dev/null and b/packs/malefices-macros/000035.log differ diff --git a/packs/malefices-macros/CURRENT b/packs/malefices-macros/CURRENT index 52f34be..eea9b0f 100644 --- a/packs/malefices-macros/CURRENT +++ b/packs/malefices-macros/CURRENT @@ -1 +1 @@ -MANIFEST-000029 +MANIFEST-000034 diff --git a/packs/malefices-macros/LOG b/packs/malefices-macros/LOG index b51f10d..5979708 100644 --- a/packs/malefices-macros/LOG +++ b/packs/malefices-macros/LOG @@ -1,14 +1,3 @@ -2024/11/29-17:51:13.287438 7f11d3fff6c0 Recovering log #28 -2024/11/29-17:51:13.297962 7f11d3fff6c0 Delete type=0 #28 -2024/11/29-17:51:13.298081 7f11d3fff6c0 Delete type=3 #27 -2024/11/29-17:51:44.237485 7f11d27fc6c0 Level-0 table #32: started -2024/11/29-17:51:44.240689 7f11d27fc6c0 Level-0 table #32: 851 bytes OK -2024/11/29-17:51:44.246485 7f11d27fc6c0 Delete type=0 #30 -2024/11/29-17:51:44.276713 7f11d27fc6c0 Manual compaction at level-0 from '!macros!ESV4er8Hy6liMOC3' @ 72057594037927935 : 1 .. '!macros!zDPgmHiwNxBWhoYz' @ 0 : 0; will stop at '!macros!zDPgmHiwNxBWhoYz' @ 6 : 1 -2024/11/29-17:51:44.276731 7f11d27fc6c0 Compacting 2@0 + 0@1 files -2024/11/29-17:51:44.280157 7f11d27fc6c0 Generated table #33@0: 3 keys, 851 bytes -2024/11/29-17:51:44.280180 7f11d27fc6c0 Compacted 2@0 + 0@1 files => 851 bytes -2024/11/29-17:51:44.287399 7f11d27fc6c0 compacted to: files[ 0 1 0 0 0 0 0 ] -2024/11/29-17:51:44.287547 7f11d27fc6c0 Delete type=2 #22 -2024/11/29-17:51:44.287718 7f11d27fc6c0 Delete type=2 #32 -2024/11/29-17:51:44.297154 7f11d27fc6c0 Manual compaction at level-0 from '!macros!zDPgmHiwNxBWhoYz' @ 6 : 1 .. '!macros!zDPgmHiwNxBWhoYz' @ 0 : 0; will stop at (end) +2025/05/01-00:13:13.328666 7efc4f7fe6c0 Recovering log #31 +2025/05/01-00:13:13.380625 7efc4f7fe6c0 Delete type=3 #29 +2025/05/01-00:13:13.380738 7efc4f7fe6c0 Delete type=0 #31 diff --git a/packs/malefices-macros/LOG.old b/packs/malefices-macros/LOG.old index 1b8b127..b51f10d 100644 --- a/packs/malefices-macros/LOG.old +++ b/packs/malefices-macros/LOG.old @@ -1 +1,14 @@ -2024/05/03-23:45:44.055066 7f863fe006c0 Delete type=3 #1 +2024/11/29-17:51:13.287438 7f11d3fff6c0 Recovering log #28 +2024/11/29-17:51:13.297962 7f11d3fff6c0 Delete type=0 #28 +2024/11/29-17:51:13.298081 7f11d3fff6c0 Delete type=3 #27 +2024/11/29-17:51:44.237485 7f11d27fc6c0 Level-0 table #32: started +2024/11/29-17:51:44.240689 7f11d27fc6c0 Level-0 table #32: 851 bytes OK +2024/11/29-17:51:44.246485 7f11d27fc6c0 Delete type=0 #30 +2024/11/29-17:51:44.276713 7f11d27fc6c0 Manual compaction at level-0 from '!macros!ESV4er8Hy6liMOC3' @ 72057594037927935 : 1 .. '!macros!zDPgmHiwNxBWhoYz' @ 0 : 0; will stop at '!macros!zDPgmHiwNxBWhoYz' @ 6 : 1 +2024/11/29-17:51:44.276731 7f11d27fc6c0 Compacting 2@0 + 0@1 files +2024/11/29-17:51:44.280157 7f11d27fc6c0 Generated table #33@0: 3 keys, 851 bytes +2024/11/29-17:51:44.280180 7f11d27fc6c0 Compacted 2@0 + 0@1 files => 851 bytes +2024/11/29-17:51:44.287399 7f11d27fc6c0 compacted to: files[ 0 1 0 0 0 0 0 ] +2024/11/29-17:51:44.287547 7f11d27fc6c0 Delete type=2 #22 +2024/11/29-17:51:44.287718 7f11d27fc6c0 Delete type=2 #32 +2024/11/29-17:51:44.297154 7f11d27fc6c0 Manual compaction at level-0 from '!macros!zDPgmHiwNxBWhoYz' @ 6 : 1 .. '!macros!zDPgmHiwNxBWhoYz' @ 0 : 0; will stop at (end) diff --git a/packs/malefices-macros/MANIFEST-000029 b/packs/malefices-macros/MANIFEST-000029 deleted file mode 100644 index 14cf6f4..0000000 Binary files a/packs/malefices-macros/MANIFEST-000029 and /dev/null differ diff --git a/packs/malefices-macros/MANIFEST-000034 b/packs/malefices-macros/MANIFEST-000034 new file mode 100644 index 0000000..3e0e0f6 Binary files /dev/null and b/packs/malefices-macros/MANIFEST-000034 differ diff --git a/packs/malefices-tarots/000031.log b/packs/malefices-tarots/000031.log deleted file mode 100644 index e69de29..0000000 diff --git a/packs/malefices-tarots/000035.log b/packs/malefices-tarots/000035.log new file mode 100644 index 0000000..802ed43 Binary files /dev/null and b/packs/malefices-tarots/000035.log differ diff --git a/packs/malefices-tarots/CURRENT b/packs/malefices-tarots/CURRENT index 52f34be..eea9b0f 100644 --- a/packs/malefices-tarots/CURRENT +++ b/packs/malefices-tarots/CURRENT @@ -1 +1 @@ -MANIFEST-000029 +MANIFEST-000034 diff --git a/packs/malefices-tarots/LOG b/packs/malefices-tarots/LOG index f917e3e..eba352b 100644 --- a/packs/malefices-tarots/LOG +++ b/packs/malefices-tarots/LOG @@ -1,14 +1,3 @@ -2024/11/29-17:51:13.246162 7f11d8ffa6c0 Recovering log #28 -2024/11/29-17:51:13.256519 7f11d8ffa6c0 Delete type=0 #28 -2024/11/29-17:51:13.256622 7f11d8ffa6c0 Delete type=3 #27 -2024/11/29-17:51:44.246559 7f11d27fc6c0 Level-0 table #32: started -2024/11/29-17:51:44.249606 7f11d27fc6c0 Level-0 table #32: 4001 bytes OK -2024/11/29-17:51:44.255805 7f11d27fc6c0 Delete type=0 #30 -2024/11/29-17:51:44.287848 7f11d27fc6c0 Manual compaction at level-0 from '!items!1DRKmbzGzbCRCswc' @ 72057594037927935 : 1 .. '!items!zbGGMEQFdwVdlKAf' @ 0 : 0; will stop at '!items!zbGGMEQFdwVdlKAf' @ 44 : 1 -2024/11/29-17:51:44.287866 7f11d27fc6c0 Compacting 2@0 + 0@1 files -2024/11/29-17:51:44.291002 7f11d27fc6c0 Generated table #33@0: 22 keys, 4001 bytes -2024/11/29-17:51:44.291025 7f11d27fc6c0 Compacted 2@0 + 0@1 files => 4001 bytes -2024/11/29-17:51:44.296891 7f11d27fc6c0 compacted to: files[ 0 1 0 0 0 0 0 ] -2024/11/29-17:51:44.296997 7f11d27fc6c0 Delete type=2 #22 -2024/11/29-17:51:44.297082 7f11d27fc6c0 Delete type=2 #32 -2024/11/29-17:51:44.297163 7f11d27fc6c0 Manual compaction at level-0 from '!items!zbGGMEQFdwVdlKAf' @ 44 : 1 .. '!items!zbGGMEQFdwVdlKAf' @ 0 : 0; will stop at (end) +2025/05/01-00:13:13.144691 7efc4e7fc6c0 Recovering log #31 +2025/05/01-00:13:13.196169 7efc4e7fc6c0 Delete type=3 #29 +2025/05/01-00:13:13.196332 7efc4e7fc6c0 Delete type=0 #31 diff --git a/packs/malefices-tarots/LOG.old b/packs/malefices-tarots/LOG.old index 44e27ea..f917e3e 100644 --- a/packs/malefices-tarots/LOG.old +++ b/packs/malefices-tarots/LOG.old @@ -1 +1,14 @@ -2024/05/03-23:45:43.983438 7f863f4006c0 Delete type=3 #1 +2024/11/29-17:51:13.246162 7f11d8ffa6c0 Recovering log #28 +2024/11/29-17:51:13.256519 7f11d8ffa6c0 Delete type=0 #28 +2024/11/29-17:51:13.256622 7f11d8ffa6c0 Delete type=3 #27 +2024/11/29-17:51:44.246559 7f11d27fc6c0 Level-0 table #32: started +2024/11/29-17:51:44.249606 7f11d27fc6c0 Level-0 table #32: 4001 bytes OK +2024/11/29-17:51:44.255805 7f11d27fc6c0 Delete type=0 #30 +2024/11/29-17:51:44.287848 7f11d27fc6c0 Manual compaction at level-0 from '!items!1DRKmbzGzbCRCswc' @ 72057594037927935 : 1 .. '!items!zbGGMEQFdwVdlKAf' @ 0 : 0; will stop at '!items!zbGGMEQFdwVdlKAf' @ 44 : 1 +2024/11/29-17:51:44.287866 7f11d27fc6c0 Compacting 2@0 + 0@1 files +2024/11/29-17:51:44.291002 7f11d27fc6c0 Generated table #33@0: 22 keys, 4001 bytes +2024/11/29-17:51:44.291025 7f11d27fc6c0 Compacted 2@0 + 0@1 files => 4001 bytes +2024/11/29-17:51:44.296891 7f11d27fc6c0 compacted to: files[ 0 1 0 0 0 0 0 ] +2024/11/29-17:51:44.296997 7f11d27fc6c0 Delete type=2 #22 +2024/11/29-17:51:44.297082 7f11d27fc6c0 Delete type=2 #32 +2024/11/29-17:51:44.297163 7f11d27fc6c0 Manual compaction at level-0 from '!items!zbGGMEQFdwVdlKAf' @ 44 : 1 .. '!items!zbGGMEQFdwVdlKAf' @ 0 : 0; will stop at (end) diff --git a/packs/malefices-tarots/MANIFEST-000029 b/packs/malefices-tarots/MANIFEST-000029 deleted file mode 100644 index 029b60c..0000000 Binary files a/packs/malefices-tarots/MANIFEST-000029 and /dev/null differ diff --git a/packs/malefices-tarots/MANIFEST-000034 b/packs/malefices-tarots/MANIFEST-000034 new file mode 100644 index 0000000..ab889f7 Binary files /dev/null and b/packs/malefices-tarots/MANIFEST-000034 differ diff --git a/styles/simple.css b/styles/simple.css index daa3cff..7829fb6 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -27,7 +27,7 @@ --actor-label-font-weight: 700; --actor-label-color: #464331c4; -/* =================== 2. DEBUGGING HIGHLIGHTERS ============ */ +/* =================== 2. DEBUGGING HIGHLIGHTERS ============ */ --debug-background-color-red: #ff000054; --debug-background-color-blue: #1d00ff54; --debug-background-color-green: #54ff0054; @@ -58,7 +58,7 @@ font-size: 0.8rem; .window-header{ background: rgba(0,0,0,0.75); -} +} .window-app.sheet .window-content { margin: 0; @@ -465,7 +465,7 @@ section.sheet-body{padding: 0.25rem 0.5rem;} padding: 0; } -.malefices-actor-sheet nav.sheet-tabs { +nav.sheet-tabs { font-size: 1.2rem; font-weight: bold; height: 3rem; @@ -495,6 +495,9 @@ section.sheet-body{padding: 0.25rem 0.5rem;} nav.sheet-tabs .item { position: relative; padding: 0 0.25rem; + color:beige; + margin-top: 4px; + margin-bottom: 4px; } nav.sheet-tabs .item:after { @@ -735,7 +738,7 @@ ul, li { /* ======================================== */ .tokenhudext { - display: flex; + display: flex; flex: 0 !important; font-weight: 600; } @@ -791,7 +794,7 @@ ul, li { .skill-label { font-size: 0.7rem; } -.skill-good-checkbox { +.skill-good-checkbox { max-height: 10px; max-width: 10px; } @@ -829,7 +832,7 @@ ul, li { .sidebar-tab .directory-list .entity { border-top: 1px dashed rgba(0,0,0,0.25); border-bottom: 0 none; - padding: 0.25rem 0; + padding: 0.25rem 0; } .sidebar-tab .directory-list .entity:hover { @@ -843,10 +846,10 @@ ul, li { text-align: center; vertical-align: middle; display: flex; - align-items: center; + align-items: center; } -.chat-message .message-header .flavor-text, .chat-message .message-header .whisper-to { +.chat-message .message-header .flavor-text, .chat-message .message-header .whisper-to { font-size: 0.9rem; } .chat-result-text, @@ -1014,7 +1017,7 @@ ul, li { border-radius: 0px; } -#hotbar .bar-controls { +#hotbar .bar-controls { background: rgba(30, 25, 20, 1); border: 1px solid rgba(72, 46, 28, 1); } @@ -1074,7 +1077,7 @@ ul, li { top: 1px; position: absolute; z-index: 1; - + /* Fade in tooltip */ visibility: hidden; opacity: 0; @@ -1180,7 +1183,7 @@ ul, li { height: 60px; } -.dice-cell { +.dice-cell { padding-left: 12px; padding-right: 12px; width: 60px; @@ -1306,7 +1309,7 @@ ul, li { flex-wrap: nowrap; } .item-filler { - flex-grow: 6; + flex-grow: 6; flex-shrink: 7; } .item-controls-fixed { @@ -1317,7 +1320,7 @@ ul, li { font-weight: bold; } .flexrow-no-expand { - flex-grow: 0; + flex-grow: 0; } .item-input-small { max-width: 16px; diff --git a/system.json b/system.json index 3571463..152c963 100644 --- a/system.json +++ b/system.json @@ -26,44 +26,56 @@ "type": "Item", "label": "Tarots", "name": "malefices-tarots", - "path": "packs/malefices-tarots.db", + "path": "packs/malefices-tarots", "system": "fvtt-malefices", - "private": false, - "flags": {} + "flags": {}, + "ownership": { + "PLAYER": "OBSERVER", + "ASSISTANT": "OWNER" + } }, { "type": "Item", "label": "Armes", "name": "malefices-armes", - "path": "packs/malefices-armes.db", + "path": "packs/malefices-armes", "system": "fvtt-malefices", - "private": false, - "flags": {} + "flags": {}, + "ownership": { + "PLAYER": "OBSERVER", + "ASSISTANT": "OWNER" + } }, { "type": "Item", "label": "Archetypes", "name": "malefices-archetypes", - "path": "packs/malefices-archetypes.db", + "path": "packs/malefices-archetypes", "system": "fvtt-malefices", - "private": false, - "flags": {} + "flags": {}, + "ownership": { + "PLAYER": "OBSERVER", + "ASSISTANT": "OWNER" + } }, { "type": "Macro", "label": "Macros", "name": "malefices-macros", - "path": "packs/malefices-macros.db", + "path": "packs/malefices-macros", "system": "fvtt-malefices", - "private": false, - "flags": {} + "flags": {}, + "ownership": { + "PLAYER": "OBSERVER", + "ASSISTANT": "OWNER" + } } ], "license": "LICENSE.txt", "manifest": "https://www.uberwald.me/gitea/public/fvtt-malefices/raw/branch/master/system.json", "compatibility": { - "minimum": "12", - "verified": "12" + "minimum": "13", + "verified": "13" }, "id": "fvtt-malefices", "primaryTokenAttribute": "secondary.health", @@ -74,7 +86,7 @@ ], "title": "Maléfices, le Jeu de Rôle", "url": "https://www.uberwald.me/gitea/public/fvtt-malefices", - "version": "12.0.1", - "download": "https://www.uberwald.me/gitea/public/fvtt-malefices/archive/fvtt-malefices-v12.0.1.zip", + "version": "13.0.0", + "download": "https://www.uberwald.me/gitea/public/fvtt-malefices/archive/fvtt-malefices-v13.0.0.zip", "background": "systems/fvtt-malefices/images/ui/malefice_welcome_page.webp" } \ No newline at end of file diff --git a/templates/actors/actor-sheet.hbs b/templates/actors/actor-sheet.hbs index 4584d17..34390ec 100644 --- a/templates/actors/actor-sheet.hbs +++ b/templates/actors/actor-sheet.hbs @@ -8,7 +8,7 @@
- +

@@ -45,7 +45,7 @@ {{!-- Skills Tab --}}
- +
@@ -68,12 +68,12 @@ {{#if attr.hasmax}} - {{/if}} + {{/if}} {{#if (eq key "physique")}} {{#if @root.phyMalus}} ({{@root.phyMalus}}) {{/if}} - {{/if}} + {{/if}} {{/each}} @@ -81,7 +81,7 @@ Points de Destin - + {{#if isGM}}
  • Fluide (MJ) @@ -171,7 +171,7 @@
    - +
  • {{#each armes as |arme key|}} @@ -201,7 +201,7 @@
     
    - +
    @@ -229,7 +229,7 @@
     
    - +
    @@ -320,7 +320,7 @@
    - +