Foundry v13 migration
This commit is contained in:
parent
342f9c2342
commit
d647fcc35e
@ -6,7 +6,7 @@
|
|||||||
import { MaleficesUtility } from "./malefices-utility.js";
|
import { MaleficesUtility } from "./malefices-utility.js";
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
export class MaleficesActorSheet extends ActorSheet {
|
export class MaleficesActorSheet extends foundry.appv1.sheets.ActorSheet {
|
||||||
|
|
||||||
/** @override */
|
/** @override */
|
||||||
static get defaultOptions() {
|
static get defaultOptions() {
|
||||||
@ -44,9 +44,9 @@ export class MaleficesActorSheet extends ActorSheet {
|
|||||||
phyMalus: this.actor.getPhysiqueMalus(),
|
phyMalus: this.actor.getPhysiqueMalus(),
|
||||||
elementsbio: this.actor.getElementsBio(),
|
elementsbio: this.actor.getElementsBio(),
|
||||||
sorts: this.actor.getSorts(),
|
sorts: this.actor.getSorts(),
|
||||||
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 }),
|
||||||
notes: await TextEditor.enrichHTML(this.object.system.biodata.notes, { async: true }),
|
notes: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.biodata.notes, { async: true }),
|
||||||
equipementlibre: await TextEditor.enrichHTML(this.object.system.equipementlibre, { async: true }),
|
equipementlibre: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.equipementlibre, { async: true }),
|
||||||
options: this.options,
|
options: this.options,
|
||||||
owner: this.document.isOwner,
|
owner: this.document.isOwner,
|
||||||
editScore: this.options.editScore,
|
editScore: this.options.editScore,
|
||||||
@ -66,10 +66,10 @@ export class MaleficesActorSheet extends ActorSheet {
|
|||||||
|
|
||||||
// Everything below here is only needed if the sheet is editable
|
// Everything below here is only needed if the sheet is editable
|
||||||
if (!this.options.editable) return;
|
if (!this.options.editable) return;
|
||||||
|
|
||||||
html.bind("keydown", function(e) { // Ignore Enter in actores sheet
|
html.bind("keydown", function(e) { // Ignore Enter in actores sheet
|
||||||
if (e.keyCode === 13) return false;
|
if (e.keyCode === 13) return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Update Inventory Item
|
// Update Inventory Item
|
||||||
html.find('.item-edit').click(ev => {
|
html.find('.item-edit').click(ev => {
|
||||||
@ -87,14 +87,14 @@ export class MaleficesActorSheet extends ActorSheet {
|
|||||||
let dataType = $(ev.currentTarget).data("type")
|
let dataType = $(ev.currentTarget).data("type")
|
||||||
this.actor.createEmbeddedDocuments('Item', [{ name: "NewItem", type: dataType }], { renderSheet: true })
|
this.actor.createEmbeddedDocuments('Item', [{ name: "NewItem", type: dataType }], { renderSheet: true })
|
||||||
})
|
})
|
||||||
|
|
||||||
html.find('.subactor-edit').click(ev => {
|
html.find('.subactor-edit').click(ev => {
|
||||||
const li = $(ev.currentTarget).parents(".item");
|
const li = $(ev.currentTarget).parents(".item");
|
||||||
let actorId = li.data("actor-id");
|
let actorId = li.data("actor-id");
|
||||||
let actor = game.actors.get( actorId );
|
let actor = game.actors.get( actorId );
|
||||||
actor.sheet.render(true);
|
actor.sheet.render(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
html.find('.subactor-delete').click(ev => {
|
html.find('.subactor-delete').click(ev => {
|
||||||
const li = $(ev.currentTarget).parents(".item");
|
const li = $(ev.currentTarget).parents(".item");
|
||||||
let actorId = li.data("actor-id");
|
let actorId = li.data("actor-id");
|
||||||
@ -117,38 +117,38 @@ export class MaleficesActorSheet extends ActorSheet {
|
|||||||
const li = $(event.currentTarget).parents(".item")
|
const li = $(event.currentTarget).parents(".item")
|
||||||
this.actor.incDecAmmo( li.data("item-id"), +1 )
|
this.actor.incDecAmmo( li.data("item-id"), +1 )
|
||||||
} );
|
} );
|
||||||
|
|
||||||
html.find('.roll-attribut').click((event) => {
|
html.find('.roll-attribut').click((event) => {
|
||||||
let attrKey = $(event.currentTarget).data("attr-key")
|
let attrKey = $(event.currentTarget).data("attr-key")
|
||||||
this.actor.rollAttribut(attrKey)
|
this.actor.rollAttribut(attrKey)
|
||||||
});
|
});
|
||||||
html.find('.roll-arme').click((event) => {
|
html.find('.roll-arme').click((event) => {
|
||||||
const armeId = $(event.currentTarget).data("arme-id")
|
const armeId = $(event.currentTarget).data("arme-id")
|
||||||
this.actor.rollArme(armeId)
|
this.actor.rollArme(armeId)
|
||||||
});
|
});
|
||||||
|
|
||||||
html.find('.lock-unlock-sheet').click((event) => {
|
html.find('.lock-unlock-sheet').click((event) => {
|
||||||
this.options.editScore = !this.options.editScore;
|
this.options.editScore = !this.options.editScore;
|
||||||
this.render(true);
|
this.render(true);
|
||||||
});
|
});
|
||||||
html.find('.item-link a').click((event) => {
|
html.find('.item-link a').click((event) => {
|
||||||
const itemId = $(event.currentTarget).data("item-id");
|
const itemId = $(event.currentTarget).data("item-id");
|
||||||
const item = this.actor.getOwnedItem(itemId);
|
const item = this.actor.getOwnedItem(itemId);
|
||||||
item.sheet.render(true);
|
item.sheet.render(true);
|
||||||
});
|
});
|
||||||
html.find('.item-equip').click(ev => {
|
html.find('.item-equip').click(ev => {
|
||||||
const li = $(ev.currentTarget).parents(".item");
|
const li = $(ev.currentTarget).parents(".item");
|
||||||
this.actor.equipItem( li.data("item-id") );
|
this.actor.equipItem( li.data("item-id") );
|
||||||
this.render(true);
|
this.render(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
html.find('.update-field').change(ev => {
|
html.find('.update-field').change(ev => {
|
||||||
const fieldName = $(ev.currentTarget).data("field-name");
|
const fieldName = $(ev.currentTarget).data("field-name");
|
||||||
let value = Number(ev.currentTarget.value);
|
let value = Number(ev.currentTarget.value);
|
||||||
this.actor.update( { [`${fieldName}`]: value } );
|
this.actor.update( { [`${fieldName}`]: value } );
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
/** @override */
|
/** @override */
|
||||||
setPosition(options = {}) {
|
setPosition(options = {}) {
|
||||||
|
@ -80,7 +80,7 @@ export class MaleficesCommands {
|
|||||||
console.log("===> Processing command")
|
console.log("===> Processing command")
|
||||||
let command = commandsTable[name];
|
let command = commandsTable[name];
|
||||||
path = path + name + " ";
|
path = path + name + " ";
|
||||||
if (command && command.subTable) {
|
if (command?.subTable) {
|
||||||
if (params[0]) {
|
if (params[0]) {
|
||||||
return this._processCommand(command.subTable, params[0], params.slice(1), content, msg, path)
|
return this._processCommand(command.subTable, params[0], params.slice(1), content, msg, path)
|
||||||
}
|
}
|
||||||
@ -89,7 +89,7 @@ export class MaleficesCommands {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (command && command.func) {
|
if (command?.func) {
|
||||||
const result = command.func(content, msg, params);
|
const result = command.func(content, msg, params);
|
||||||
if (result == false) {
|
if (result == false) {
|
||||||
CrucibleCommands._chatAnswer(msg, command.descr);
|
CrucibleCommands._chatAnswer(msg, command.descr);
|
||||||
@ -140,7 +140,7 @@ export class MaleficesCommands {
|
|||||||
selectedCard.system.isgm = false
|
selectedCard.system.isgm = false
|
||||||
selectedCard.value = (selectedCard.system.ispositif)? selectedCard.system.numericvalueup : selectedCard.system.numericvaluedown
|
selectedCard.value = (selectedCard.system.ispositif)? selectedCard.system.numericvalueup : selectedCard.system.numericvaluedown
|
||||||
MaleficesUtility.createChatMessage(game.user.name, "", {
|
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)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import { MaleficesUtility } from "./malefices-utility.js";
|
|||||||
* Extend the basic ItemSheet with some very simple modifications
|
* Extend the basic ItemSheet with some very simple modifications
|
||||||
* @extends {ItemSheet}
|
* @extends {ItemSheet}
|
||||||
*/
|
*/
|
||||||
export class MaleficesItemSheet extends ItemSheet {
|
export class MaleficesItemSheet extends foundry.appv1.sheets.ItemSheet {
|
||||||
|
|
||||||
/** @override */
|
/** @override */
|
||||||
static get defaultOptions() {
|
static get defaultOptions() {
|
||||||
@ -48,15 +48,15 @@ export class MaleficesItemSheet extends ItemSheet {
|
|||||||
limited: this.object.limited,
|
limited: this.object.limited,
|
||||||
options: this.options,
|
options: this.options,
|
||||||
owner: this.document.isOwner,
|
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 }),
|
||||||
notes: await TextEditor.enrichHTML(this.object.system.notes, { async: true }),
|
notes: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.notes, { async: true }),
|
||||||
isGM: game.user.isGM
|
isGM: game.user.isGM
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( this.object.type == "archetype") {
|
if ( this.object.type == "archetype") {
|
||||||
formData.tarots = MaleficesUtility.getTarots()
|
formData.tarots = MaleficesUtility.getTarots()
|
||||||
}
|
}
|
||||||
|
|
||||||
this.options.editable = !(this.object.origin == "embeddedItem");
|
this.options.editable = !(this.object.origin == "embeddedItem");
|
||||||
console.log("ITEM DATA", formData, this);
|
console.log("ITEM DATA", formData, this);
|
||||||
return formData;
|
return formData;
|
||||||
@ -102,7 +102,7 @@ export class MaleficesItemSheet extends ItemSheet {
|
|||||||
let levelIndex = Number($(ev.currentTarget).parents(".item").data("level-index"))
|
let levelIndex = Number($(ev.currentTarget).parents(".item").data("level-index"))
|
||||||
let choiceIndex = Number($(ev.currentTarget).parents(".item").data("choice-index"))
|
let choiceIndex = Number($(ev.currentTarget).parents(".item").data("choice-index"))
|
||||||
let featureId = $(ev.currentTarget).parents(".item").data("feature-id")
|
let featureId = $(ev.currentTarget).parents(".item").data("feature-id")
|
||||||
|
|
||||||
let itemData = this.object.system.levels[levelIndex].choices[choiceIndex].features[featureId]
|
let itemData = this.object.system.levels[levelIndex].choices[choiceIndex].features[featureId]
|
||||||
|
|
||||||
if (itemData.name != 'None') {
|
if (itemData.name != 'None') {
|
||||||
|
@ -39,7 +39,7 @@ Hooks.once("init", async function () {
|
|||||||
MaleficesUtility.preloadHandlebarsTemplates();
|
MaleficesUtility.preloadHandlebarsTemplates();
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
// Set an initiative formula for the system
|
// Set an initiative formula for the system
|
||||||
CONFIG.Combat.initiative = {
|
CONFIG.Combat.initiative = {
|
||||||
formula: "1d6",
|
formula: "1d6",
|
||||||
decimals: 1
|
decimals: 1
|
||||||
@ -58,12 +58,12 @@ Hooks.once("init", async function () {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
// Register sheet application classes
|
// Register sheet application classes
|
||||||
Actors.unregisterSheet("core", ActorSheet);
|
foundry.documents.collections.Actors.unregisterSheet("core", foundry.appv1.sheets.ActorSheet);
|
||||||
Actors.registerSheet("fvtt-malefices", MaleficesActorSheet, { types: ["personnage"], makeDefault: true });
|
foundry.documents.collections.Actors.registerSheet("fvtt-malefices", MaleficesActorSheet, { types: ["personnage"], makeDefault: true });
|
||||||
Actors.registerSheet("fvtt-malefices", MaleficesNPCSheet, { types: ["pnj"], makeDefault: false });
|
foundry.documents.collections.Actors.registerSheet("fvtt-malefices", MaleficesNPCSheet, { types: ["pnj"], makeDefault: false });
|
||||||
|
|
||||||
Items.unregisterSheet("core", ItemSheet);
|
foundry.documents.collections.Items.unregisterSheet("core", foundry.appv1.sheets.ItemSheet);
|
||||||
Items.registerSheet("fvtt-malefices", MaleficesItemSheet, { makeDefault: true });
|
foundry.documents.collections.Items.registerSheet("fvtt-malefices", MaleficesItemSheet, { makeDefault: true });
|
||||||
|
|
||||||
MaleficesUtility.init()
|
MaleficesUtility.init()
|
||||||
|
|
||||||
@ -119,4 +119,3 @@ Hooks.on("chatMessage", (html, content, msg) => {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
import { MaleficesUtility } from "./malefices-utility.js";
|
import { MaleficesUtility } from "./malefices-utility.js";
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
export class MaleficesNPCSheet extends ActorSheet {
|
export class MaleficesNPCSheet extends foundry.appv1.sheets.ActorSheet {
|
||||||
|
|
||||||
/** @override */
|
/** @override */
|
||||||
static get defaultOptions() {
|
static get defaultOptions() {
|
||||||
@ -71,10 +71,10 @@ export class MaleficesNPCSheet extends ActorSheet {
|
|||||||
|
|
||||||
// Everything below here is only needed if the sheet is editable
|
// Everything below here is only needed if the sheet is editable
|
||||||
if (!this.options.editable) return;
|
if (!this.options.editable) return;
|
||||||
|
|
||||||
html.bind("keydown", function(e) { // Ignore Enter in actores sheet
|
html.bind("keydown", function(e) { // Ignore Enter in actores sheet
|
||||||
if (e.keyCode === 13) return false;
|
if (e.keyCode === 13) return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Update Inventory Item
|
// Update Inventory Item
|
||||||
html.find('.item-edit').click(ev => {
|
html.find('.item-edit').click(ev => {
|
||||||
@ -92,17 +92,17 @@ export class MaleficesNPCSheet extends ActorSheet {
|
|||||||
let dataType = $(ev.currentTarget).data("type")
|
let dataType = $(ev.currentTarget).data("type")
|
||||||
this.actor.createEmbeddedDocuments('Item', [{ name: "NewItem", type: dataType }], { renderSheet: true })
|
this.actor.createEmbeddedDocuments('Item', [{ name: "NewItem", type: dataType }], { renderSheet: true })
|
||||||
})
|
})
|
||||||
|
|
||||||
html.find('.equip-activate').click(ev => {
|
html.find('.equip-activate').click(ev => {
|
||||||
const li = $(ev.currentTarget).parents(".item")
|
const li = $(ev.currentTarget).parents(".item")
|
||||||
let itemId = li.data("item-id")
|
let itemId = li.data("item-id")
|
||||||
this.actor.equipActivate( itemId)
|
this.actor.equipActivate( itemId)
|
||||||
});
|
});
|
||||||
html.find('.equip-deactivate').click(ev => {
|
html.find('.equip-deactivate').click(ev => {
|
||||||
const li = $(ev.currentTarget).parents(".item")
|
const li = $(ev.currentTarget).parents(".item")
|
||||||
let itemId = li.data("item-id")
|
let itemId = li.data("item-id")
|
||||||
this.actor.equipDeactivate( itemId)
|
this.actor.equipDeactivate( itemId)
|
||||||
});
|
});
|
||||||
|
|
||||||
html.find('.subactor-edit').click(ev => {
|
html.find('.subactor-edit').click(ev => {
|
||||||
const li = $(ev.currentTarget).parents(".item");
|
const li = $(ev.currentTarget).parents(".item");
|
||||||
@ -110,7 +110,7 @@ export class MaleficesNPCSheet extends ActorSheet {
|
|||||||
let actor = game.actors.get( actorId );
|
let actor = game.actors.get( actorId );
|
||||||
actor.sheet.render(true);
|
actor.sheet.render(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
html.find('.subactor-delete').click(ev => {
|
html.find('.subactor-delete').click(ev => {
|
||||||
const li = $(ev.currentTarget).parents(".item");
|
const li = $(ev.currentTarget).parents(".item");
|
||||||
let actorId = li.data("actor-id");
|
let actorId = li.data("actor-id");
|
||||||
@ -133,7 +133,7 @@ export class MaleficesNPCSheet extends ActorSheet {
|
|||||||
const li = $(event.currentTarget).parents(".item")
|
const li = $(event.currentTarget).parents(".item")
|
||||||
this.actor.incDecAmmo( li.data("item-id"), +1 )
|
this.actor.incDecAmmo( li.data("item-id"), +1 )
|
||||||
} );
|
} );
|
||||||
|
|
||||||
html.find('.roll-ability').click((event) => {
|
html.find('.roll-ability').click((event) => {
|
||||||
const abilityKey = $(event.currentTarget).data("ability-key");
|
const abilityKey = $(event.currentTarget).data("ability-key");
|
||||||
this.actor.rollAbility(abilityKey);
|
this.actor.rollAbility(abilityKey);
|
||||||
@ -142,7 +142,7 @@ export class MaleficesNPCSheet extends ActorSheet {
|
|||||||
const li = $(event.currentTarget).parents(".item")
|
const li = $(event.currentTarget).parents(".item")
|
||||||
const skillId = li.data("item-id")
|
const skillId = li.data("item-id")
|
||||||
this.actor.rollSkill(skillId)
|
this.actor.rollSkill(skillId)
|
||||||
});
|
});
|
||||||
|
|
||||||
html.find('.roll-weapon').click((event) => {
|
html.find('.roll-weapon').click((event) => {
|
||||||
const li = $(event.currentTarget).parents(".item");
|
const li = $(event.currentTarget).parents(".item");
|
||||||
@ -163,28 +163,28 @@ export class MaleficesNPCSheet extends ActorSheet {
|
|||||||
const saveKey = $(event.currentTarget).data("save-key")
|
const saveKey = $(event.currentTarget).data("save-key")
|
||||||
this.actor.rollSave(saveKey)
|
this.actor.rollSave(saveKey)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
html.find('.lock-unlock-sheet').click((event) => {
|
html.find('.lock-unlock-sheet').click((event) => {
|
||||||
this.options.editScore = !this.options.editScore;
|
this.options.editScore = !this.options.editScore;
|
||||||
this.render(true);
|
this.render(true);
|
||||||
});
|
});
|
||||||
html.find('.item-link a').click((event) => {
|
html.find('.item-link a').click((event) => {
|
||||||
const itemId = $(event.currentTarget).data("item-id");
|
const itemId = $(event.currentTarget).data("item-id");
|
||||||
const item = this.actor.getOwnedItem(itemId);
|
const item = this.actor.getOwnedItem(itemId);
|
||||||
item.sheet.render(true);
|
item.sheet.render(true);
|
||||||
});
|
});
|
||||||
html.find('.item-equip').click(ev => {
|
html.find('.item-equip').click(ev => {
|
||||||
const li = $(ev.currentTarget).parents(".item");
|
const li = $(ev.currentTarget).parents(".item");
|
||||||
this.actor.equipItem( li.data("item-id") );
|
this.actor.equipItem( li.data("item-id") );
|
||||||
this.render(true);
|
this.render(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
html.find('.update-field').change(ev => {
|
html.find('.update-field').change(ev => {
|
||||||
const fieldName = $(ev.currentTarget).data("field-name");
|
const fieldName = $(ev.currentTarget).data("field-name");
|
||||||
let value = Number(ev.currentTarget.value);
|
let value = Number(ev.currentTarget.value);
|
||||||
this.actor.update( { [`${fieldName}`]: value } );
|
this.actor.update( { [`${fieldName}`]: value } );
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,10 +7,10 @@ export class MaleficesRollDialog extends Dialog {
|
|||||||
|
|
||||||
let options = { classes: ["MaleficesDialog"], width: 540, height: 'fit-content', 'z-index': 99999 }
|
let options = { classes: ["MaleficesDialog"], width: 540, height: 'fit-content', 'z-index': 99999 }
|
||||||
let html
|
let html
|
||||||
if (rollData.attr && rollData.attr.iscard) {
|
if (rollData?.attr?.iscard) {
|
||||||
html = await renderTemplate('systems/fvtt-malefices/templates/dialogs/confrontation-dialog.hbs', rollData);
|
html = await foundry.applications.handlebars.renderTemplate('systems/fvtt-malefices/templates/dialogs/confrontation-dialog.hbs', rollData);
|
||||||
} else {
|
} 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);
|
return new MaleficesRollDialog(actor, rollData, html, options);
|
||||||
@ -18,7 +18,7 @@ export class MaleficesRollDialog extends Dialog {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
constructor(actor, rollData, html, options, close = undefined) {
|
constructor(actor, rollData, html, options, close = undefined) {
|
||||||
let isCard = rollData.attr && rollData.attr.iscard
|
let isCard = rollData?.attr?.iscard
|
||||||
let conf = {
|
let conf = {
|
||||||
title: (isCard) ? "Jet" : "Tirage",
|
title: (isCard) ? "Jet" : "Tirage",
|
||||||
content: html,
|
content: html,
|
||||||
@ -45,7 +45,7 @@ export class MaleficesRollDialog extends Dialog {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
roll() {
|
roll() {
|
||||||
let isCard = this.rollData.attr && this.rollData.attr.iscard
|
let isCard = this.rollData?.attr?.iscard
|
||||||
if (isCard) {
|
if (isCard) {
|
||||||
MaleficesUtility.tirageConfrontationMalefices(this.rollData)
|
MaleficesUtility.tirageConfrontationMalefices(this.rollData)
|
||||||
} else {
|
} else {
|
||||||
@ -64,7 +64,6 @@ export class MaleficesRollDialog extends Dialog {
|
|||||||
activateListeners(html) {
|
activateListeners(html) {
|
||||||
super.activateListeners(html);
|
super.activateListeners(html);
|
||||||
|
|
||||||
var dialog = this;
|
|
||||||
function onLoad() {
|
function onLoad() {
|
||||||
}
|
}
|
||||||
$(function () { onLoad(); });
|
$(function () { onLoad(); });
|
||||||
@ -87,6 +86,6 @@ export class MaleficesRollDialog extends Dialog {
|
|||||||
html.find('#confrontationModif').change((event) => {
|
html.find('#confrontationModif').change((event) => {
|
||||||
this.rollData.confrontationModif = Number(event.currentTarget.value)
|
this.rollData.confrontationModif = Number(event.currentTarget.value)
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -6,7 +6,7 @@ export class MaleficesTirageTarotDialog extends Dialog {
|
|||||||
static async create(actor, tirageData) {
|
static async create(actor, tirageData) {
|
||||||
|
|
||||||
let options = { classes: ["MaleficesDialog"], width: 720, height: 740, 'z-index': 99999 };
|
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);
|
return new MaleficesTirageTarotDialog(actor, tirageData, html, options);
|
||||||
}
|
}
|
||||||
@ -36,7 +36,7 @@ export class MaleficesTirageTarotDialog extends Dialog {
|
|||||||
async sendCardRequest() {
|
async sendCardRequest() {
|
||||||
this.tirageData.state = 'waiting-user-card'
|
this.tirageData.state = 'waiting-user-card'
|
||||||
let msg = await MaleficesUtility.createChatMessage(this.tirageData.user.name, "useronly", {
|
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)
|
//msg.setFlag("world", "tirage-data", this.tirageData)
|
||||||
console.log("MSG IS", msg)
|
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
|
if ( selectedCard.system.isdualside) { // Cas des cartes pouvant avoir 2 sens
|
||||||
selectedCard.system.ispositif = (Math.random() > 0.5)
|
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
|
// Cas spécial de la Roue de la Fortune
|
||||||
if ( selectedCard.name.toLowerCase().includes("fortune")) {
|
if ( selectedCard.name.toLowerCase().includes("fortune")) {
|
||||||
this.tirageData.maxPlayerCard += 1
|
this.tirageData.maxPlayerCard += 1
|
||||||
@ -63,7 +63,7 @@ export class MaleficesTirageTarotDialog extends Dialog {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.tirageData.deck = newList
|
this.tirageData.deck = newList
|
||||||
|
|
||||||
return selectedCard
|
return selectedCard
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,9 +74,9 @@ export class MaleficesTirageTarotDialog extends Dialog {
|
|||||||
let selectedCard = this.drawCard()
|
let selectedCard = this.drawCard()
|
||||||
selectedCard.system.isgm = false
|
selectedCard.system.isgm = false
|
||||||
await MaleficesUtility.createChatMessage(this.tirageData.user.name, "gmroll", {
|
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.shift()
|
||||||
}
|
}
|
||||||
this.tirageData.cards.push(selectedCard)
|
this.tirageData.cards.push(selectedCard)
|
||||||
@ -87,9 +87,9 @@ export class MaleficesTirageTarotDialog extends Dialog {
|
|||||||
let selectedCard = this.drawCard()
|
let selectedCard = this.drawCard()
|
||||||
selectedCard.system.isgm = true
|
selectedCard.system.isgm = true
|
||||||
await MaleficesUtility.createChatMessage(this.tirageData.user.name, "blindroll", {
|
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.shift()
|
||||||
}
|
}
|
||||||
this.tirageData.secretCards.push(selectedCard)
|
this.tirageData.secretCards.push(selectedCard)
|
||||||
@ -124,7 +124,7 @@ export class MaleficesTirageTarotDialog extends Dialog {
|
|||||||
}
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async refreshDialog() {
|
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.data.content = content
|
||||||
this.render(true)
|
this.render(true)
|
||||||
}
|
}
|
||||||
@ -133,7 +133,7 @@ export class MaleficesTirageTarotDialog extends Dialog {
|
|||||||
activateListeners(html) {
|
activateListeners(html) {
|
||||||
super.activateListeners(html);
|
super.activateListeners(html);
|
||||||
|
|
||||||
var dialog = this;
|
let dialog = this;
|
||||||
function onLoad() {
|
function onLoad() {
|
||||||
}
|
}
|
||||||
$(function () { onLoad(); });
|
$(function () { onLoad(); });
|
||||||
@ -150,6 +150,6 @@ export class MaleficesTirageTarotDialog extends Dialog {
|
|||||||
dialog.attributeToActor(actorId)
|
dialog.attributeToActor(actorId)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -43,6 +43,14 @@ export class MaleficesUtility {
|
|||||||
Handlebars.registerHelper('add', function (a, b) {
|
Handlebars.registerHelper('add', function (a, b) {
|
||||||
return parseInt(a) + parseInt(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", {
|
game.settings.register("world", "character-summary-data", {
|
||||||
name: "character-summary-data",
|
name: "character-summary-data",
|
||||||
@ -68,7 +76,7 @@ export class MaleficesUtility {
|
|||||||
return foundry.utils.duplicate(this.tarots)
|
return foundry.utils.duplicate(this.tarots)
|
||||||
}
|
}
|
||||||
static getTarot(tId) {
|
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) {
|
if (game.user.isGM) {
|
||||||
game.system.malefices.currentTirage.addCard(msgId)
|
game.system.malefices.currentTirage.addCard(msgId)
|
||||||
} else {
|
} 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) {
|
static async chatListeners(html) {
|
||||||
|
|
||||||
html.on("click", '.roll-destin', event => {
|
$(html).on("click", '.roll-destin', event => {
|
||||||
let messageId = MaleficesUtility.findChatMessageId(event.currentTarget)
|
let messageId = MaleficesUtility.findChatMessageId(event.currentTarget)
|
||||||
let message = game.messages.get(messageId)
|
let message = game.messages.get(messageId)
|
||||||
let rollData = message.getFlag("world", "rolldata")
|
let rollData = message.getFlag("world", "rolldata")
|
||||||
@ -115,11 +123,11 @@ export class MaleficesUtility {
|
|||||||
rollData.isReroll = true
|
rollData.isReroll = true
|
||||||
this.rollMalefices(rollData)
|
this.rollMalefices(rollData)
|
||||||
})
|
})
|
||||||
html.on("click", '.draw-tarot-card', event => {
|
$(html).on("click", '.draw-tarot-card', event => {
|
||||||
let messageId = MaleficesUtility.findChatMessageId(event.currentTarget)
|
let messageId = MaleficesUtility.findChatMessageId(event.currentTarget)
|
||||||
this.drawDeckCard(messageId)
|
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-nav.hbs',
|
||||||
'systems/fvtt-malefices/templates/items/partial-item-description.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) {
|
static async onSocketMesssage(msg) {
|
||||||
console.log("SOCKET MESSAGE", msg.name)
|
console.log("SOCKET MESSAGE", msg.name)
|
||||||
if (msg.name == "msg-draw-card") {
|
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)
|
game.system.malefices.currentTirage.addCard(msg.data.msgId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -271,71 +279,79 @@ export class MaleficesUtility {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static processSpecialCard(actor, rollData) {
|
static processSpecialCard(actor, rollData) {
|
||||||
if (rollData.selectedCard.name.toLowerCase().includes("archange")) {
|
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) {
|
if (actorCard) {
|
||||||
MaleficesUtility.createChatMessage(actor.name, "gmroll", {
|
MaleficesUtility.createChatMessage(actor.name, "gmroll", {
|
||||||
content: `Conséquence supplémentaire ! <br>L'Archange : ${actor.name} gagne 1 point de Spiritualité.` })
|
content: `Conséquence supplémentaire ! <br>L'Archange : ${actor.name} gagne 1 point de Spiritualité.`
|
||||||
|
})
|
||||||
actor.incDecAttr("spiritualite", 1)
|
actor.incDecAttr("spiritualite", 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rollData.selectedCard.name.toLowerCase().includes("vicaire")) {
|
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) {
|
if (actorCard) {
|
||||||
MaleficesUtility.createChatMessage(actor.name, "blindroll", {
|
MaleficesUtility.createChatMessage(actor.name, "blindroll", {
|
||||||
content: `Conséquence supplémentaire ! <br>Le Vicaire : ${actor.name} vient de gagner 1 point en Pratique de la Magie Blanche (MPMB, secret).` })
|
content: `Conséquence supplémentaire ! <br>Le Vicaire : ${actor.name} vient de gagner 1 point en Pratique de la Magie Blanche (MPMB, secret).`
|
||||||
|
})
|
||||||
actor.incDecMPMB(1)
|
actor.incDecMPMB(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rollData.selectedCard.name.toLowerCase().includes("chance")) {
|
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) {
|
if (actorCard) {
|
||||||
MaleficesUtility.createChatMessage(actor.name, "gmroll", {
|
MaleficesUtility.createChatMessage(actor.name, "gmroll", {
|
||||||
content: `Conséquence supplémentaire ! <br>La Chance : ${actor.name} a gagné 1 point de Destin.` })
|
content: `Conséquence supplémentaire ! <br>La Chance : ${actor.name} a gagné 1 point de Destin.`
|
||||||
|
})
|
||||||
actor.incDecDestin(1)
|
actor.incDecDestin(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rollData.selectedCard.name.toLowerCase().includes("mort")) {
|
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) {
|
if (actorCard) {
|
||||||
MaleficesUtility.createChatMessage(actor.name, "gmroll", {
|
MaleficesUtility.createChatMessage(actor.name, "gmroll", {
|
||||||
content: `Conséquence supplémentaire ! <br>La Mort : ${actor.name} est pétrifié par la peur.` })
|
content: `Conséquence supplémentaire ! <br>La Mort : ${actor.name} est pétrifié par la peur.`
|
||||||
|
})
|
||||||
actor.incDecDestin(1)
|
actor.incDecDestin(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rollData.selectedCard.name.toLowerCase().includes("diable")) {
|
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) {
|
if (actorCard) {
|
||||||
MaleficesUtility.createChatMessage(actor.name, "gmroll", {
|
MaleficesUtility.createChatMessage(actor.name, "gmroll", {
|
||||||
content: `Conséquence supplémentaire ! <br>Le Diable : ${actor.name} gagne 1 point de Rationnalité.` })
|
content: `Conséquence supplémentaire ! <br>Le Diable : ${actor.name} gagne 1 point de Rationnalité.`
|
||||||
|
})
|
||||||
actor.incDecAttr("rationnalite", 1)
|
actor.incDecAttr("rationnalite", 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rollData.selectedCard.name.toLowerCase().includes("lune noire")) {
|
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) {
|
if (actorCard) {
|
||||||
MaleficesUtility.createChatMessage(actor.name, "blindroll", {
|
MaleficesUtility.createChatMessage(actor.name, "blindroll", {
|
||||||
content: `Conséquence supplémentaire ! <br>La Lune Noire : ${actor.name} vient de gagner 1 point de Fluide (secret).` })
|
content: `Conséquence supplémentaire ! <br>La Lune Noire : ${actor.name} vient de gagner 1 point de Fluide (secret).`
|
||||||
|
})
|
||||||
actor.incDecFluide(1)
|
actor.incDecFluide(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rollData.selectedCard.name.toLowerCase().includes("grand livre")) {
|
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) {
|
if (actorCard) {
|
||||||
MaleficesUtility.createChatMessage(actor.name, "blindroll", {
|
MaleficesUtility.createChatMessage(actor.name, "blindroll", {
|
||||||
content: `Conséquence supplémentaire ! <br>La Lune Noire : ${actor.name} vient de gagner 1 point de Fluide (secret).` })
|
content: `Conséquence supplémentaire ! <br>La Lune Noire : ${actor.name} vient de gagner 1 point de Fluide (secret).`
|
||||||
|
})
|
||||||
actor.incDecFluide(1)
|
actor.incDecFluide(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rollData.selectedCard.name.toLowerCase().includes("sorcier")) {
|
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) {
|
if (actorCard) {
|
||||||
MaleficesUtility.createChatMessage(actor.name, "blindroll", {
|
MaleficesUtility.createChatMessage(actor.name, "blindroll", {
|
||||||
content: `Conséquence supplémentaire ! <br>Le Vicaire : ${actor.name} vient de gagner 1 point en Pratique de la Magie Noire (MPMN, secret).` })
|
content: `Conséquence supplémentaire ! <br>Le Vicaire : ${actor.name} vient de gagner 1 point en Pratique de la Magie Noire (MPMN, secret).`
|
||||||
|
})
|
||||||
actor.incDecMPMN(1)
|
actor.incDecMPMN(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static computeResults(rollData) {
|
static computeResults(rollData) {
|
||||||
@ -362,30 +378,30 @@ export class MaleficesUtility {
|
|||||||
rollData.target = rollData.attr.value - rollData.confrontationDegre + rollData.confrontationModif
|
rollData.target = rollData.attr.value - rollData.confrontationDegre + rollData.confrontationModif
|
||||||
|
|
||||||
let deck = this.getTarots()
|
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]
|
let selectedCard = deck[index]
|
||||||
selectedCard.system.ispositif = (Math.random() > 0.5)
|
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.total = selectedCard.value
|
||||||
rollData.selectedCard = selectedCard
|
rollData.selectedCard = selectedCard
|
||||||
await MaleficesUtility.createChatMessage(actor.name, "gmroll", {
|
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)
|
this.computeResults(rollData)
|
||||||
|
|
||||||
if (rollData.isSuccess) {
|
if (rollData.isSuccess) {
|
||||||
rollData.gainAttr = Math.ceil(rollData.confrontationDegre/2) + ((rollData.isCritical ) ? 1 : 0)
|
rollData.gainAttr = Math.ceil(rollData.confrontationDegre / 2) + ((rollData.isCritical) ? 1 : 0)
|
||||||
actor.incDecAttr(rollData.attr.abbrev, rollData.gainAttr )
|
actor.incDecAttr(rollData.attr.abbrev, rollData.gainAttr)
|
||||||
} else {
|
} else {
|
||||||
rollData.gainAttr = rollData.confrontationDegre
|
rollData.gainAttr = rollData.confrontationDegre
|
||||||
actor.incDecAttr(rollData.attr.abbrev, -rollData.gainAttr )
|
actor.incDecAttr(rollData.attr.abbrev, -rollData.gainAttr)
|
||||||
}
|
}
|
||||||
|
|
||||||
await MaleficesUtility.createChatMessage(actor.name, "gmroll", {
|
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) {
|
static async rollMalefices(rollData) {
|
||||||
@ -410,7 +426,7 @@ export class MaleficesUtility {
|
|||||||
this.computeResults(rollData)
|
this.computeResults(rollData)
|
||||||
|
|
||||||
let msg = await this.createChatWithRollMode(rollData.alias, {
|
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)
|
msg.setFlag("world", "rolldata", rollData)
|
||||||
if (rollData.mode == "initiative") {
|
if (rollData.mode == "initiative") {
|
||||||
|
BIN
packs/malefices-archetypes/000035.log
Normal file
BIN
packs/malefices-archetypes/000035.log
Normal file
Binary file not shown.
@ -1 +1 @@
|
|||||||
MANIFEST-000029
|
MANIFEST-000034
|
||||||
|
@ -1,14 +1,3 @@
|
|||||||
2024/11/29-17:51:13.272607 7f11d37fe6c0 Recovering log #28
|
2025/05/01-00:13:13.266834 7efc4dffb6c0 Recovering log #31
|
||||||
2024/11/29-17:51:13.282971 7f11d37fe6c0 Delete type=0 #28
|
2025/05/01-00:13:13.321299 7efc4dffb6c0 Delete type=3 #29
|
||||||
2024/11/29-17:51:13.283067 7f11d37fe6c0 Delete type=3 #27
|
2025/05/01-00:13:13.321436 7efc4dffb6c0 Delete type=0 #31
|
||||||
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)
|
|
||||||
|
@ -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)
|
||||||
|
Binary file not shown.
BIN
packs/malefices-archetypes/MANIFEST-000034
Normal file
BIN
packs/malefices-archetypes/MANIFEST-000034
Normal file
Binary file not shown.
BIN
packs/malefices-armes/000035.log
Normal file
BIN
packs/malefices-armes/000035.log
Normal file
Binary file not shown.
@ -1 +1 @@
|
|||||||
MANIFEST-000029
|
MANIFEST-000034
|
||||||
|
@ -1,14 +1,3 @@
|
|||||||
2024/11/29-17:51:13.259713 7f11d2ffd6c0 Recovering log #28
|
2025/05/01-00:13:13.203817 7efc4effd6c0 Recovering log #31
|
||||||
2024/11/29-17:51:13.269307 7f11d2ffd6c0 Delete type=0 #28
|
2025/05/01-00:13:13.258580 7efc4effd6c0 Delete type=3 #29
|
||||||
2024/11/29-17:51:13.269361 7f11d2ffd6c0 Delete type=3 #27
|
2025/05/01-00:13:13.258656 7efc4effd6c0 Delete type=0 #31
|
||||||
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)
|
|
||||||
|
@ -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)
|
||||||
|
Binary file not shown.
BIN
packs/malefices-armes/MANIFEST-000034
Normal file
BIN
packs/malefices-armes/MANIFEST-000034
Normal file
Binary file not shown.
BIN
packs/malefices-macros/000035.log
Normal file
BIN
packs/malefices-macros/000035.log
Normal file
Binary file not shown.
@ -1 +1 @@
|
|||||||
MANIFEST-000029
|
MANIFEST-000034
|
||||||
|
@ -1,14 +1,3 @@
|
|||||||
2024/11/29-17:51:13.287438 7f11d3fff6c0 Recovering log #28
|
2025/05/01-00:13:13.328666 7efc4f7fe6c0 Recovering log #31
|
||||||
2024/11/29-17:51:13.297962 7f11d3fff6c0 Delete type=0 #28
|
2025/05/01-00:13:13.380625 7efc4f7fe6c0 Delete type=3 #29
|
||||||
2024/11/29-17:51:13.298081 7f11d3fff6c0 Delete type=3 #27
|
2025/05/01-00:13:13.380738 7efc4f7fe6c0 Delete type=0 #31
|
||||||
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)
|
|
||||||
|
@ -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)
|
||||||
|
Binary file not shown.
BIN
packs/malefices-macros/MANIFEST-000034
Normal file
BIN
packs/malefices-macros/MANIFEST-000034
Normal file
Binary file not shown.
BIN
packs/malefices-tarots/000035.log
Normal file
BIN
packs/malefices-tarots/000035.log
Normal file
Binary file not shown.
@ -1 +1 @@
|
|||||||
MANIFEST-000029
|
MANIFEST-000034
|
||||||
|
@ -1,14 +1,3 @@
|
|||||||
2024/11/29-17:51:13.246162 7f11d8ffa6c0 Recovering log #28
|
2025/05/01-00:13:13.144691 7efc4e7fc6c0 Recovering log #31
|
||||||
2024/11/29-17:51:13.256519 7f11d8ffa6c0 Delete type=0 #28
|
2025/05/01-00:13:13.196169 7efc4e7fc6c0 Delete type=3 #29
|
||||||
2024/11/29-17:51:13.256622 7f11d8ffa6c0 Delete type=3 #27
|
2025/05/01-00:13:13.196332 7efc4e7fc6c0 Delete type=0 #31
|
||||||
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)
|
|
||||||
|
@ -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)
|
||||||
|
Binary file not shown.
BIN
packs/malefices-tarots/MANIFEST-000034
Normal file
BIN
packs/malefices-tarots/MANIFEST-000034
Normal file
Binary file not shown.
@ -27,7 +27,7 @@
|
|||||||
--actor-label-font-weight: 700;
|
--actor-label-font-weight: 700;
|
||||||
--actor-label-color: #464331c4;
|
--actor-label-color: #464331c4;
|
||||||
|
|
||||||
/* =================== 2. DEBUGGING HIGHLIGHTERS ============ */
|
/* =================== 2. DEBUGGING HIGHLIGHTERS ============ */
|
||||||
--debug-background-color-red: #ff000054;
|
--debug-background-color-red: #ff000054;
|
||||||
--debug-background-color-blue: #1d00ff54;
|
--debug-background-color-blue: #1d00ff54;
|
||||||
--debug-background-color-green: #54ff0054;
|
--debug-background-color-green: #54ff0054;
|
||||||
@ -58,7 +58,7 @@ font-size: 0.8rem;
|
|||||||
|
|
||||||
.window-header{
|
.window-header{
|
||||||
background: rgba(0,0,0,0.75);
|
background: rgba(0,0,0,0.75);
|
||||||
}
|
}
|
||||||
|
|
||||||
.window-app.sheet .window-content {
|
.window-app.sheet .window-content {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@ -465,7 +465,7 @@ section.sheet-body{padding: 0.25rem 0.5rem;}
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.malefices-actor-sheet nav.sheet-tabs {
|
nav.sheet-tabs {
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
height: 3rem;
|
height: 3rem;
|
||||||
@ -495,6 +495,9 @@ section.sheet-body{padding: 0.25rem 0.5rem;}
|
|||||||
nav.sheet-tabs .item {
|
nav.sheet-tabs .item {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 0 0.25rem;
|
padding: 0 0.25rem;
|
||||||
|
color:beige;
|
||||||
|
margin-top: 4px;
|
||||||
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav.sheet-tabs .item:after {
|
nav.sheet-tabs .item:after {
|
||||||
@ -735,7 +738,7 @@ ul, li {
|
|||||||
|
|
||||||
/* ======================================== */
|
/* ======================================== */
|
||||||
.tokenhudext {
|
.tokenhudext {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 0 !important;
|
flex: 0 !important;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
@ -791,7 +794,7 @@ ul, li {
|
|||||||
.skill-label {
|
.skill-label {
|
||||||
font-size: 0.7rem;
|
font-size: 0.7rem;
|
||||||
}
|
}
|
||||||
.skill-good-checkbox {
|
.skill-good-checkbox {
|
||||||
max-height: 10px;
|
max-height: 10px;
|
||||||
max-width: 10px;
|
max-width: 10px;
|
||||||
}
|
}
|
||||||
@ -829,7 +832,7 @@ ul, li {
|
|||||||
.sidebar-tab .directory-list .entity {
|
.sidebar-tab .directory-list .entity {
|
||||||
border-top: 1px dashed rgba(0,0,0,0.25);
|
border-top: 1px dashed rgba(0,0,0,0.25);
|
||||||
border-bottom: 0 none;
|
border-bottom: 0 none;
|
||||||
padding: 0.25rem 0;
|
padding: 0.25rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-tab .directory-list .entity:hover {
|
.sidebar-tab .directory-list .entity:hover {
|
||||||
@ -843,10 +846,10 @@ ul, li {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
display: flex;
|
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;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
.chat-result-text,
|
.chat-result-text,
|
||||||
@ -1014,7 +1017,7 @@ ul, li {
|
|||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#hotbar .bar-controls {
|
#hotbar .bar-controls {
|
||||||
background: rgba(30, 25, 20, 1);
|
background: rgba(30, 25, 20, 1);
|
||||||
border: 1px solid rgba(72, 46, 28, 1);
|
border: 1px solid rgba(72, 46, 28, 1);
|
||||||
}
|
}
|
||||||
@ -1074,7 +1077,7 @@ ul, li {
|
|||||||
top: 1px;
|
top: 1px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
|
||||||
/* Fade in tooltip */
|
/* Fade in tooltip */
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
@ -1180,7 +1183,7 @@ ul, li {
|
|||||||
height: 60px;
|
height: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dice-cell {
|
.dice-cell {
|
||||||
padding-left: 12px;
|
padding-left: 12px;
|
||||||
padding-right: 12px;
|
padding-right: 12px;
|
||||||
width: 60px;
|
width: 60px;
|
||||||
@ -1306,7 +1309,7 @@ ul, li {
|
|||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
}
|
}
|
||||||
.item-filler {
|
.item-filler {
|
||||||
flex-grow: 6;
|
flex-grow: 6;
|
||||||
flex-shrink: 7;
|
flex-shrink: 7;
|
||||||
}
|
}
|
||||||
.item-controls-fixed {
|
.item-controls-fixed {
|
||||||
@ -1317,7 +1320,7 @@ ul, li {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.flexrow-no-expand {
|
.flexrow-no-expand {
|
||||||
flex-grow: 0;
|
flex-grow: 0;
|
||||||
}
|
}
|
||||||
.item-input-small {
|
.item-input-small {
|
||||||
max-width: 16px;
|
max-width: 16px;
|
||||||
|
44
system.json
44
system.json
@ -26,44 +26,56 @@
|
|||||||
"type": "Item",
|
"type": "Item",
|
||||||
"label": "Tarots",
|
"label": "Tarots",
|
||||||
"name": "malefices-tarots",
|
"name": "malefices-tarots",
|
||||||
"path": "packs/malefices-tarots.db",
|
"path": "packs/malefices-tarots",
|
||||||
"system": "fvtt-malefices",
|
"system": "fvtt-malefices",
|
||||||
"private": false,
|
"flags": {},
|
||||||
"flags": {}
|
"ownership": {
|
||||||
|
"PLAYER": "OBSERVER",
|
||||||
|
"ASSISTANT": "OWNER"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Item",
|
"type": "Item",
|
||||||
"label": "Armes",
|
"label": "Armes",
|
||||||
"name": "malefices-armes",
|
"name": "malefices-armes",
|
||||||
"path": "packs/malefices-armes.db",
|
"path": "packs/malefices-armes",
|
||||||
"system": "fvtt-malefices",
|
"system": "fvtt-malefices",
|
||||||
"private": false,
|
"flags": {},
|
||||||
"flags": {}
|
"ownership": {
|
||||||
|
"PLAYER": "OBSERVER",
|
||||||
|
"ASSISTANT": "OWNER"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Item",
|
"type": "Item",
|
||||||
"label": "Archetypes",
|
"label": "Archetypes",
|
||||||
"name": "malefices-archetypes",
|
"name": "malefices-archetypes",
|
||||||
"path": "packs/malefices-archetypes.db",
|
"path": "packs/malefices-archetypes",
|
||||||
"system": "fvtt-malefices",
|
"system": "fvtt-malefices",
|
||||||
"private": false,
|
"flags": {},
|
||||||
"flags": {}
|
"ownership": {
|
||||||
|
"PLAYER": "OBSERVER",
|
||||||
|
"ASSISTANT": "OWNER"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Macro",
|
"type": "Macro",
|
||||||
"label": "Macros",
|
"label": "Macros",
|
||||||
"name": "malefices-macros",
|
"name": "malefices-macros",
|
||||||
"path": "packs/malefices-macros.db",
|
"path": "packs/malefices-macros",
|
||||||
"system": "fvtt-malefices",
|
"system": "fvtt-malefices",
|
||||||
"private": false,
|
"flags": {},
|
||||||
"flags": {}
|
"ownership": {
|
||||||
|
"PLAYER": "OBSERVER",
|
||||||
|
"ASSISTANT": "OWNER"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"license": "LICENSE.txt",
|
"license": "LICENSE.txt",
|
||||||
"manifest": "https://www.uberwald.me/gitea/public/fvtt-malefices/raw/branch/master/system.json",
|
"manifest": "https://www.uberwald.me/gitea/public/fvtt-malefices/raw/branch/master/system.json",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "12",
|
"minimum": "13",
|
||||||
"verified": "12"
|
"verified": "13"
|
||||||
},
|
},
|
||||||
"id": "fvtt-malefices",
|
"id": "fvtt-malefices",
|
||||||
"primaryTokenAttribute": "secondary.health",
|
"primaryTokenAttribute": "secondary.health",
|
||||||
@ -74,7 +86,7 @@
|
|||||||
],
|
],
|
||||||
"title": "Maléfices, le Jeu de Rôle",
|
"title": "Maléfices, le Jeu de Rôle",
|
||||||
"url": "https://www.uberwald.me/gitea/public/fvtt-malefices",
|
"url": "https://www.uberwald.me/gitea/public/fvtt-malefices",
|
||||||
"version": "12.0.1",
|
"version": "13.0.0",
|
||||||
"download": "https://www.uberwald.me/gitea/public/fvtt-malefices/archive/fvtt-malefices-v12.0.1.zip",
|
"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"
|
"background": "systems/fvtt-malefices/images/ui/malefice_welcome_page.webp"
|
||||||
}
|
}
|
@ -8,7 +8,7 @@
|
|||||||
<div class="profile-img-container">
|
<div class="profile-img-container">
|
||||||
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}" />
|
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<h1 class="charname margin-right"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
|
<h1 class="charname margin-right"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
|
||||||
|
|
||||||
@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
{{!-- Skills Tab --}}
|
{{!-- Skills Tab --}}
|
||||||
<div class="tab main" data-group="primary" data-tab="main">
|
<div class="tab main" data-group="primary" data-tab="main">
|
||||||
|
|
||||||
|
|
||||||
<div class="grid grid-2col">
|
<div class="grid grid-2col">
|
||||||
<div>
|
<div>
|
||||||
@ -68,12 +68,12 @@
|
|||||||
<input type="text" class="item-field-label-short" name="system.attributs.{{key}}.value" value="{{attr.value}}" data-dtype="Number"/>
|
<input type="text" class="item-field-label-short" name="system.attributs.{{key}}.value" value="{{attr.value}}" data-dtype="Number"/>
|
||||||
{{#if attr.hasmax}}
|
{{#if attr.hasmax}}
|
||||||
<input type="text" class="item-field-label-short" name="system.attributs.{{key}}.max" value="{{attr.max}}" data-dtype="Number"/>
|
<input type="text" class="item-field-label-short" name="system.attributs.{{key}}.max" value="{{attr.max}}" data-dtype="Number"/>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if (eq key "physique")}}
|
{{#if (eq key "physique")}}
|
||||||
{{#if @root.phyMalus}}
|
{{#if @root.phyMalus}}
|
||||||
({{@root.phyMalus}})
|
({{@root.phyMalus}})
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
||||||
@ -81,7 +81,7 @@
|
|||||||
<span class="item-field-label-long">Points de Destin</span>
|
<span class="item-field-label-long">Points de Destin</span>
|
||||||
<input type="text" class="item-field-label-short" name="system.pointdestin" value="{{system.pointdestin}}" data-dtype="Number"/>
|
<input type="text" class="item-field-label-short" name="system.pointdestin" value="{{system.pointdestin}}" data-dtype="Number"/>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
{{#if isGM}}
|
{{#if isGM}}
|
||||||
<li class="item flexrow list-item">
|
<li class="item flexrow list-item">
|
||||||
<span class="item-field-label-long">Fluide (MJ)</span>
|
<span class="item-field-label-long">Fluide (MJ)</span>
|
||||||
@ -171,7 +171,7 @@
|
|||||||
<label class="item-field-label-medium">Critique</label>
|
<label class="item-field-label-medium">Critique</label>
|
||||||
</span>
|
</span>
|
||||||
<div class="item-controls item-controls-fixed">
|
<div class="item-controls item-controls-fixed">
|
||||||
<a class="item-control item-add" data-type="weapon" title="Create Item"><i class="fas fa-plus"></i></a>
|
<a class="item-control item-add" data-type="arme" title="Créer une arme"><i class="fas fa-plus"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{{#each armes as |arme key|}}
|
{{#each armes as |arme key|}}
|
||||||
@ -201,7 +201,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<div class="item-filler"> </div>
|
<div class="item-filler"> </div>
|
||||||
<div class="item-controls item-controls-fixed">
|
<div class="item-controls item-controls-fixed">
|
||||||
<a class="item-control item-add" data-type="equipment" title="Create Item"><i class="fas fa-plus"></i></a>
|
<a class="item-control item-add" data-type="equipement" title="Créer un équipement"><i class="fas fa-plus"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
@ -229,7 +229,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<div class="item-filler"> </div>
|
<div class="item-filler"> </div>
|
||||||
<div class="item-controls item-controls-fixed">
|
<div class="item-controls item-controls-fixed">
|
||||||
<a class="item-control item-add" data-type="equipment" title="Create Item"><i class="fas fa-plus"></i></a>
|
<a class="item-control item-add" data-type="sortilege" title="Créer un Sortilège"><i class="fas fa-plus"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
@ -320,7 +320,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li class="item flexrow">
|
<li class="item flexrow">
|
||||||
<label class="generic-label">Position vis-à-vis du fantastique</label>
|
<label class="generic-label">Position vis-à-vis du fantastique</label>
|
||||||
@ -339,7 +339,7 @@
|
|||||||
<label class="item-field-label-medium">Sens</label>
|
<label class="item-field-label-medium">Sens</label>
|
||||||
</span>
|
</span>
|
||||||
<div class="item-controls item-controls-fixed">
|
<div class="item-controls item-controls-fixed">
|
||||||
<a class="item-control item-add" data-type="tarot" title="Create Item"><i class="fas fa-plus"></i></a>
|
<a class="item-control item-add" data-type="tarot" title="Créer une lame de tarot"><i class="fas fa-plus"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{{#each tarots as |tarot key|}}
|
{{#each tarots as |tarot key|}}
|
||||||
@ -368,7 +368,7 @@
|
|||||||
<label class="item-field-label-medium">Sens</label>
|
<label class="item-field-label-medium">Sens</label>
|
||||||
</span>
|
</span>
|
||||||
<div class="item-controls item-controls-fixed">
|
<div class="item-controls item-controls-fixed">
|
||||||
<a class="item-control item-add" data-type="tarot" title="Create Item"><i class="fas fa-plus"></i></a>
|
<a class="item-control item-add" data-type="tarot" title="Créer une lame de Tarot (secret)"><i class="fas fa-plus"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{{#each tarotsCache as |tarot key|}}
|
{{#each tarotsCache as |tarot key|}}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
|
|
||||||
{{#if attr}}
|
{{#if attr}}
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<span class="roll-dialog-label">{{attr.label}} : </span>
|
<span class="roll-dialog-label">{{attr.label}} : </span>
|
||||||
@ -17,11 +17,11 @@
|
|||||||
{{#if phyMalus}}
|
{{#if phyMalus}}
|
||||||
({{phyMalus}})
|
({{phyMalus}})
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<span class="roll-dialog-label">Rappel des élements biographiques : </span>
|
<span class="roll-dialog-label">Rappel des élements biographiques : </span>
|
||||||
<ul class="ul-level1 item-list alternate-list">
|
<ul class="ul-level1 item-list alternate-list">
|
||||||
@ -36,30 +36,30 @@
|
|||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<span class="roll-dialog-label">Bonus/Malus biographique : </span>
|
<span class="roll-dialog-label">Bonus/Malus biographique : </span>
|
||||||
<select id="bonusMalusPerso" name="bonusMalusPerso">
|
<select id="bonusMalusPerso" name="bonusMalusPerso">
|
||||||
{{selectOptions config.bonusMalusPersoOptions selected=bonusMalusPerso nameAttr="value" labelAttr="label"}}
|
{{selectOptions config.bonusMalusPersoOptions selected=bonusMalusPerso valueAttr="value" labelAttr="label"}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<span class="roll-dialog-label">Bonus/Malus de situation : </span>
|
<span class="roll-dialog-label">Bonus/Malus de situation : </span>
|
||||||
<select id="bonusMalusSituation" name="bonusMalusSituation">
|
<select id="bonusMalusSituation" name="bonusMalusSituation">
|
||||||
{{selectOptions config.bonusMalusPersoOptions selected=bonusMalusSituation nameAttr="value" labelAttr="label"}}
|
{{selectOptions config.bonusMalusPersoOptions selected=bonusMalusSituation valueAttr="value" labelAttr="label"}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{#if arme}}
|
{{#if arme}}
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<span class="roll-dialog-label">Défense : </span>
|
<span class="roll-dialog-label">Défense : </span>
|
||||||
<select id="bonusMalusDef" name="bonusMalusDef">
|
<select id="bonusMalusDef" name="bonusMalusDef">
|
||||||
{{selectOptions config.bonusMalusDefOptions selected=bonusMalusDef nameAttr="value" labelAttr="label"}}
|
{{selectOptions config.bonusMalusDefOptions selected=bonusMalusDef valueAttr="value" labelAttr="label"}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<span class="roll-dialog-label">Portée : </span>
|
<span class="roll-dialog-label">Portée : </span>
|
||||||
<select id="bonusMalusPortee" name="bonusMalusPortee">
|
<select id="bonusMalusPortee" name="bonusMalusPortee">
|
||||||
{{selectOptions config.bonusMalusPorteeOptions selected=bonusMalusPortee nameAttr="value" labelAttr="label"}}
|
{{selectOptions config.bonusMalusPorteeOptions selected=bonusMalusPortee valueAttr="value" labelAttr="label"}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user