From 1730a8d3908f24378eba9aed42f2853415f83e6e Mon Sep 17 00:00:00 2001 From: sladecraven Date: Tue, 20 Sep 2022 08:57:40 +0200 Subject: [PATCH] v10 first release --- modules/mournblade-actor-sheet.js | 7 +- modules/mournblade-actor.js | 158 ++++++++++++------------ modules/mournblade-item-sheet.js | 17 ++- modules/mournblade-utility.js | 25 +--- styles/simple.css | 7 +- system.json | 6 +- templates/actor-sheet.html | 92 +++++++------- templates/chat-degats-result.html | 2 +- templates/chat-generic-result.html | 2 +- templates/editor-notes-gm.html | 2 +- templates/item-arme-sheet.html | 24 ++-- templates/item-competence-sheet.html | 10 +- templates/item-don-sheet.html | 6 +- templates/item-equipement-sheet.html | 4 +- templates/item-pacte-sheet.html | 2 +- templates/item-predilection-sheet.html | 2 +- templates/item-protection-sheet.html | 10 +- templates/item-rune-sheet.html | 8 +- templates/item-runeeffet-sheet.html | 8 +- templates/item-tendance-sheet.html | 2 +- templates/partial-actor-equipment.html | 30 +---- templates/partial-actor-stat-block.html | 16 --- templates/partial-actor-status.html | 70 ----------- templates/partial-item-description.html | 2 +- templates/post-item.html | 2 +- templates/roll-dialog-generic.html | 4 +- 26 files changed, 194 insertions(+), 324 deletions(-) delete mode 100644 templates/partial-actor-stat-block.html delete mode 100644 templates/partial-actor-status.html diff --git a/modules/mournblade-actor-sheet.js b/modules/mournblade-actor-sheet.js index e12d1a4..a2f1e32 100644 --- a/modules/mournblade-actor-sheet.js +++ b/modules/mournblade-actor-sheet.js @@ -25,9 +25,8 @@ export class MournbladeActorSheet extends ActorSheet { /* -------------------------------------------- */ async getData() { - const objectData = MournbladeUtility.data(this.object); - - let actorData = duplicate(MournbladeUtility.templateData(this.object)) + const objectData = duplicate(this.object) + let actorData = objectData let formData = { title: this.title, @@ -37,7 +36,7 @@ export class MournbladeActorSheet extends ActorSheet { name: objectData.name, editable: this.isEditable, cssClass: this.isEditable ? "editable" : "locked", - data: actorData, + data: actorData.system, effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)), limited: this.object.limited, skills: this.actor.getSkills(), diff --git a/modules/mournblade-actor.js b/modules/mournblade-actor.js index 2f709fb..d558046 100644 --- a/modules/mournblade-actor.js +++ b/modules/mournblade-actor.js @@ -51,22 +51,22 @@ export class MournbladeActor extends Actor { prepareArme(arme) { arme = duplicate(arme) let combat = this.getCombatValues() - if (arme.data.typearme == "contact" || arme.data.typearme == "contactjet") { - arme.data.competence = duplicate(this.data.items.find(item => item.type == "competence" && item.name.toLowerCase() == "mêlée")) - arme.data.attrKey = "pui" - arme.data.totalDegats = arme.data.degats + "+" + combat.bonusDegatsTotal - arme.data.totalOffensif = this.data.data.attributs.pui.value + arme.data.competence.data.niveau + arme.data.bonusmaniementoff - if (arme.data.isdefense) { - arme.data.totalDefensif = combat.defenseTotal + arme.data.competence.data.niveau + arme.data.bonusmaniementdef + if (arme.system.typearme == "contact" || arme.system.typearme == "contactjet") { + arme.system.competence = duplicate(this.items.find(item => item.type == "competence" && item.name.toLowerCase() == "mêlée")) + arme.system.attrKey = "pui" + arme.system.totalDegats = arme.system.degats + "+" + combat.bonusDegatsTotal + arme.system.totalOffensif = this.system.attributs.pui.value + arme.system.competence.system.niveau + arme.system.bonusmaniementoff + if (arme.system.isdefense) { + arme.system.totalDefensif = combat.defenseTotal + arme.system.competence.system.niveau + arme.system.bonusmaniementdef } } - if (arme.data.typearme == "jet" || arme.data.typearme == "tir") { - arme.data.competence = duplicate(this.data.items.find(item => item.type == "competence" && item.name.toLowerCase() == "armes à distance")) - arme.data.attrKey = "adr" - arme.data.totalOffensif = this.data.data.attributs.adr.value + arme.data.competence.data.niveau + arme.data.bonusmaniementoff - arme.data.totalDegats = arme.data.degats - if (arme.data.isdefense) { - arme.data.totalDefensif = combat.defenseTotal + arme.data.competence.data.niveau + arme.data.bonusmaniementdef + if (arme.system.typearme == "jet" || arme.system.typearme == "tir") { + arme.system.competence = duplicate(this.items.find(item => item.type == "competence" && item.name.toLowerCase() == "armes à distance")) + arme.system.attrKey = "adr" + arme.system.totalOffensif = this.system.attributs.adr.value + arme.system.competence.system.niveau + arme.system.bonusmaniementoff + arme.system.totalDegats = arme.system.degats + if (arme.system.isdefense) { + arme.system.totalDefensif = combat.defenseTotal + arme.system.competence.system.niveau + arme.system.bonusmaniementdef } } return arme @@ -75,7 +75,7 @@ export class MournbladeActor extends Actor { /* -------------------------------------------- */ getWeapons() { let armes = [] - for (let arme of this.data.items) { + for (let arme of this.items) { if (arme.type == "arme") { armes.push(this.prepareArme(arme)) } @@ -85,49 +85,49 @@ export class MournbladeActor extends Actor { /* -------------------------------------------- */ getDons() { - return this.data.items.filter(item => item.type == "don") + return this.items.filter(item => item.type == "don") } /* -------------------------------------------- */ getTendances() { - return this.data.items.filter(item => item.type == "tendance") + return this.items.filter(item => item.type == "tendance") } getRunes() { - return this.data.items.filter(item => item.type == "rune") + return this.items.filter(item => item.type == "rune") } /* -------------------------------------------- */ getEquipments() { - return this.data.items.filter(item => item.type == "equipement") + return this.items.filter(item => item.type == "equipement") } /* -------------------------------------------- */ getArmors() { - return this.data.items.filter(item => item.type == "protection") + return this.items.filter(item => item.type == "protection") } getOrigine() { - return this.data.items.find(item => item.type == "origine") + return this.items.find(item => item.type == "origine") } getMetier() { - return this.data.items.find(item => item.type == "metier") + return this.items.find(item => item.type == "metier") } getHeritage() { - return this.data.items.find(item => item.type == "heritage") + return this.items.find(item => item.type == "heritage") } /* -------------------------------------------- */ getSkills() { let comp = [] - for (let item of this.data.items) { + for (let item of this.items) { item = duplicate(item) if (item.type == "competence") { - item.data.attribut1total = item.data.niveau + (this.data.data.attributs[item.data.attribut1]?.value || 0) - item.data.attribut2total = item.data.niveau + (this.data.data.attributs[item.data.attribut2]?.value || 0) - item.data.attribut3total = item.data.niveau + (this.data.data.attributs[item.data.attribut3]?.value || 0) - if (item.data.niveau == 0) { - item.data.attribut1total -= 3 - item.data.attribut2total -= 3 - item.data.attribut3total -= 3 + item.system.attribut1total = item.system.niveau + (this.system.attributs[item.system.attribut1]?.value || 0) + item.system.attribut2total = item.system.niveau + (this.system.attributs[item.system.attribut2]?.value || 0) + item.system.attribut3total = item.system.niveau + (this.system.attributs[item.system.attribut3]?.value || 0) + if (item.system.niveau == 0) { + item.system.attribut1total -= 3 + item.system.attribut2total -= 3 + item.system.attribut3total -= 3 } - item.data.attribut1label = this.data.data.attributs[item.data.attribut1]?.label || "" - item.data.attribut2label = this.data.data.attributs[item.data.attribut2]?.label || "" - item.data.attribut3label = this.data.data.attributs[item.data.attribut3]?.label || "" + item.system.attribut1label = this.system.attributs[item.system.attribut1]?.label || "" + item.system.attribut2label = this.system.attributs[item.system.attribut2]?.label || "" + item.system.attribut3label = this.system.attributs[item.system.attribut3]?.label || "" comp.push(item) } } @@ -146,30 +146,30 @@ export class MournbladeActor extends Actor { /* -------------------------------------------- */ getAlignement() { - return (this.data.data.balance.loi > this.data.data.balance.chaos) ? "loyal" : "chaotique" + return (this.system.balance.loi > this.system.balance.chaos) ? "loyal" : "chaotique" } /* -------------------------------------------- */ getDefenseBase() { - return this.data.data.attributs.tre.value + 5 + return this.system.attributs.tre.value + 5 } /* -------------------------------------------- */ getVitesseBase() { - return 5 + __vitesseBonus[this.data.data.attributs.adr.value] + return 5 + __vitesseBonus[this.system.attributs.adr.value] } /* -------------------------------------------- */ getCombatValues() { let combat = { - initBase: this.data.data.attributs.adr.value, - initTotal: this.data.data.attributs.adr.value + this.data.data.combat.initbonus, + initBase: this.system.attributs.adr.value, + initTotal: this.system.attributs.adr.value + this.system.combat.initbonus, bonusDegats: this.getBonusDegats(), - bonusDegatsTotal: this.getBonusDegats() + this.data.data.combat.bonusdegats, + bonusDegatsTotal: this.getBonusDegats() + this.system.combat.bonusdegats, vitesseBase: this.getVitesseBase(), - vitesseTotal: this.getVitesseBase() + this.data.data.combat.vitessebonus, + vitesseTotal: this.getVitesseBase() + this.system.combat.vitessebonus, defenseBase: this.getDefenseBase(), - defenseTotal: this.getDefenseBase() + this.data.data.combat.defensebonus + defenseTotal: this.getDefenseBase() + this.system.combat.defensebonus } return combat } @@ -186,12 +186,12 @@ export class MournbladeActor extends Actor { prepareDerivedData() { if (this.type == 'personnage') { - let newSante = this.data.data.sante.bonus + (this.data.data.attributs.pui.value + this.data.data.attributs.tre.value) * 2 + 5 - if (this.data.data.sante.base != newSante) { + let newSante = this.system.sante.bonus + (this.system.attributs.pui.value + this.system.attributs.tre.value) * 2 + 5 + if (this.system.sante.base != newSante) { this.update({ 'data.sante.base': newSante }) } - let newAme = (this.data.data.attributs.cla.value + this.data.data.attributs.tre.value) * this.data.data.biodata.amemultiplier + 5 - if (this.data.data.ame.fullmax != newAme) { + let newAme = (this.system.attributs.cla.value + this.system.attributs.tre.value) * this.system.biodata.amemultiplier + 5 + if (this.system.ame.fullmax != newAme) { this.update({ 'data.ame.fullmax': newAme }) } } @@ -207,7 +207,7 @@ export class MournbladeActor extends Actor { /* -------------------------------------------- */ getItemById(id) { - let item = this.data.items.find(item => item.id == id); + let item = this.items.find(item => item.id == id); if (item) { item = duplicate(item) } @@ -216,16 +216,16 @@ export class MournbladeActor extends Actor { /* -------------------------------------------- */ async equipItem(itemId) { - let item = this.data.items.find(item => item.id == itemId); - if (item && item.data.data) { - let update = { _id: item.id, "data.equipped": !item.data.data.equipped }; + let item = this.items.find(item => item.id == itemId); + if (item && item.system.data) { + let update = { _id: item.id, "data.equipped": !item.system.equipped }; await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity } } /* -------------------------------------------- */ editItemField(itemId, itemType, itemField, dataType, value) { - let item = this.data.items.find(item => item.id == itemId) + let item = this.items.find(item => item.id == itemId) if (item) { console.log("Item ", item, itemField, dataType, value) if (dataType.toLowerCase() == "number") { @@ -240,35 +240,35 @@ export class MournbladeActor extends Actor { /* -------------------------------------------- */ getBonneAventure() { - return this.data.data.bonneaventure.actuelle + return this.system.bonneaventure.actuelle } /* -------------------------------------------- */ changeBonneAventure(value) { - let newBA = this.data.data.bonneaventure.actuelle + let newBA = this.system.bonneaventure.actuelle newBA += value this.update({ 'data.bonneaventure.actuelle': newBA }) } /* -------------------------------------------- */ getEclat() { - return this.data.data.eclat.value + return this.system.eclat.value } /* -------------------------------------------- */ changeEclat(value) { - let newE = this.data.data.eclat.value + let newE = this.system.eclat.value newE += value this.update({ 'data.eclat.value': newE }) } /* -------------------------------------------- */ canEclatDoubleD20() { - return (this.getAlignement() == "loyal" && this.data.data.eclat.value > 0) + return (this.getAlignement() == "loyal" && this.system.eclat.value > 0) } /* -------------------------------------------- */ subPointsAme(runeMode, value) { - let ame = duplicate(this.data.data.ame) + let ame = duplicate(this.system.ame) if(runeMode == "prononcer") { ame.value -= value } else { @@ -290,19 +290,19 @@ export class MournbladeActor extends Actor { /* -------------------------------------------- */ getAttribute(attrKey) { - return this.data.data.attributes[attrKey] + return this.system.attributes[attrKey] } /* -------------------------------------------- */ getBonusDegats() { - return __degatsBonus[this.data.data.attributs.pui.value] + return __degatsBonus[this.system.attributs.pui.value] } /* -------------------------------------------- */ async equipGear(equipmentId) { - let item = this.data.items.find(item => item.id == equipmentId); - if (item && item.data.data) { - let update = { _id: item.id, "data.equipped": !item.data.data.equipped }; + let item = this.items.find(item => item.id == equipmentId); + if (item && item.system.data) { + let update = { _id: item.id, "data.equipped": !item.system.equipped }; await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity } } @@ -310,21 +310,21 @@ export class MournbladeActor extends Actor { /* -------------------------------------------- */ getSubActors() { let subActors = []; - for (let id of this.data.data.subactors) { + for (let id of this.system.subactors) { subActors.push(duplicate(game.actors.get(id))); } return subActors; } /* -------------------------------------------- */ async addSubActor(subActorId) { - let subActors = duplicate(this.data.data.subactors); + let subActors = duplicate(this.system.subactors); subActors.push(subActorId); await this.update({ 'data.subactors': subActors }); } /* -------------------------------------------- */ async delSubActor(subActorId) { let newArray = []; - for (let id of this.data.data.subactors) { + for (let id of this.system.subactors) { if (id != subActorId) { newArray.push(id); } @@ -334,22 +334,22 @@ export class MournbladeActor extends Actor { /* -------------------------------------------- */ async incDecQuantity(objetId, incDec = 0) { - let objetQ = this.data.items.get(objetId) + let objetQ = this.items.get(objetId) if (objetQ) { - let newQ = objetQ.data.data.quantity + incDec; + let newQ = objetQ.system.quantity + incDec; const updated = await this.updateEmbeddedDocuments('Item', [{ _id: objetQ.id, 'data.quantity': newQ }]); // pdates one EmbeddedEntity } } /* -------------------------------------------- */ getCompetence(compId) { - return this.data.items.get(compId) + return this.items.get(compId) } /* -------------------------------------------- */ async setPredilectionUsed(compId, predIdx) { - let comp = this.data.items.get(compId) - let pred = duplicate(comp.data.data.predilections) + let comp = this.items.get(compId) + let pred = duplicate(comp.system.predilections) pred[predIdx].used = true await this.updateEmbeddedDocuments('Item', [{ _id: compId, 'data.predilections': pred }]) } @@ -368,16 +368,16 @@ export class MournbladeActor extends Actor { if (attrKey) { rollData.attrKey = attrKey if (attrKey != "tochoose") { - rollData.actionImg = "systems/fvtt-mournblade/assets/icons/" + this.data.data.attributs[attrKey].labelnorm + ".webp" - rollData.attr = duplicate(this.data.data.attributs[attrKey]) + rollData.actionImg = "systems/fvtt-mournblade/assets/icons/" + this.system.attributs[attrKey].labelnorm + ".webp" + rollData.attr = duplicate(this.system.attributs[attrKey]) } } if (compId) { - rollData.competence = duplicate(this.data.items.get(compId) || {}) + rollData.competence = duplicate(this.items.get(compId) || {}) rollData.actionImg = rollData.competence?.img } if (compName) { - rollData.competence = duplicate(this.data.items.find( item => item.name.toLowerCase() == compName.toLowerCase()) || {}) + rollData.competence = duplicate(this.items.find( item => item.name.toLowerCase() == compName.toLowerCase()) || {}) rollData.actionImg = rollData.competence?.img } return rollData @@ -402,7 +402,7 @@ export class MournbladeActor extends Actor { /* -------------------------------------------- */ async rollRune(runeId) { let rollData = this.getCommonRollData("cla", undefined, "Savoir : Runes") - rollData.rune = duplicate(this.data.items.get(runeId) || {}) + rollData.rune = duplicate(this.items.get(runeId) || {}) rollData.difficulte = rollData.rune?.data?.seuil || 0 rollData.runemode = "prononcer" rollData.runeame = 1 @@ -413,9 +413,9 @@ export class MournbladeActor extends Actor { /* -------------------------------------------- */ async rollArmeOffensif(armeId) { - let arme = this.data.items.get(armeId) + let arme = this.items.get(armeId) arme = this.prepareArme(arme) - let rollData = this.getCommonRollData(arme.data.attrKey, arme.data.competence._id) + let rollData = this.getCommonRollData(arme.system.attrKey, arme.system.competence._id) rollData.arme = arme console.log("ARME!", rollData) let rollDialog = await MournbladeRollDialog.create(this, rollData) @@ -424,9 +424,9 @@ export class MournbladeActor extends Actor { /* -------------------------------------------- */ async rollArmeDegats(armeId) { - let arme = this.data.items.get(armeId) + let arme = this.items.get(armeId) arme = this.prepareArme(arme) - let roll = new Roll(arme.data.totalDegats).roll({ async: false }) + let roll = new Roll(arme.system.totalDegats).roll({ async: false }) await MournbladeUtility.showDiceSoNice(roll, game.settings.get("core", "rollMode")); let rollData = { arme: arme, diff --git a/modules/mournblade-item-sheet.js b/modules/mournblade-item-sheet.js index 0f0466d..1f8bad8 100644 --- a/modules/mournblade-item-sheet.js +++ b/modules/mournblade-item-sheet.js @@ -48,9 +48,8 @@ export class MournbladeItemSheet extends ItemSheet { /* -------------------------------------------- */ async getData() { - const objectData = MournbladeUtility.data(this.object); - - let itemData = foundry.utils.deepClone(MournbladeUtility.templateData(this.object)); + const objectData = duplicate(this.object) + let itemData = objectData let formData = { title: this.title, id: this.id, @@ -60,7 +59,7 @@ export class MournbladeItemSheet extends ItemSheet { editable: this.isEditable, cssClass: this.isEditable ? "editable" : "locked", attributs: MournbladeUtility.getAttributs(), - data: itemData, + data: itemData.system, limited: this.object.limited, options: this.options, owner: this.document.isOwner, @@ -68,7 +67,7 @@ export class MournbladeItemSheet extends ItemSheet { isGM: game.user.isGM } - this.options.editable = !(this.object.data.origin == "embeddedItem"); + //this.options.editable = !(this.object.origin == "embeddedItem"); console.log("ITEM DATA", formData, this); return formData; } @@ -130,26 +129,26 @@ export class MournbladeItemSheet extends ItemSheet { html.find('.edit-prediction').change(ev => { const li = $(ev.currentTarget).parents(".prediction-item") let index = li.data("prediction-index") - let pred = duplicate(this.object.data.data.predilections) + let pred = duplicate(this.object.system.predilections) pred[index].name = ev.currentTarget.value this.object.update( { 'data.predilections': pred }) }) html.find('.delete-prediction').click(ev => { const li = $(ev.currentTarget).parents(".prediction-item") let index = li.data("prediction-index") - let pred = duplicate(this.object.data.data.predilections) + let pred = duplicate(this.object.system.predilections) pred.splice(index,1) this.object.update( { 'data.predilections': pred }) }) html.find('.use-prediction').change(ev => { const li = $(ev.currentTarget).parents(".prediction-item") let index = li.data("prediction-index") - let pred = duplicate(this.object.data.data.predilections) + let pred = duplicate(this.object.system.predilections) pred[index].used = ev.currentTarget.checked this.object.update( { 'data.predilections': pred }) }) html.find('#add-predilection').click(ev => { - let pred = duplicate(this.object.data.data.predilections) + let pred = duplicate(this.object.system.predilections) pred.push( { name: "Nouvelle prédilection", used: false }) this.object.update( { 'data.predilections': pred }) }) diff --git a/modules/mournblade-utility.js b/modules/mournblade-utility.js index f70fe44..eb733f3 100644 --- a/modules/mournblade-utility.js +++ b/modules/mournblade-utility.js @@ -155,19 +155,6 @@ export class MournbladeUtility { return undefined; } - /* -------------------------------------------- */ - static templateData(it) { - return MournbladeUtility.data(it)?.data ?? {} - } - - /* -------------------------------------------- */ - static data(it) { - if (it instanceof Actor || it instanceof Item || it instanceof Combatant) { - return it.data; - } - return it; - } - /* -------------------------------------------- */ static createDirectOptionList(min, max) { let options = {}; @@ -309,8 +296,8 @@ export class MournbladeUtility { rollData.attrKey = "adr" } if ( !rollData.attr) { - rollData.actionImg = "systems/fvtt-mournblade/assets/icons/" + actor.data.data.attributs[rollData.attrKey].labelnorm + ".webp" - rollData.attr = duplicate(actor.data.data.attributs[rollData.attrKey]) + rollData.actionImg = "systems/fvtt-mournblade/assets/icons/" + actor.system.attributs[rollData.attrKey].labelnorm + ".webp" + rollData.attr = duplicate(actor.system.attributs[rollData.attrKey]) } rollData.diceFormula = rollData.mainDice @@ -321,15 +308,15 @@ export class MournbladeUtility { } } if (rollData.competence) { - rollData.predilections = duplicate( rollData.competence.data.predilections.filter( pred => !pred.used) || [] ) - let compmod = (rollData.competence.data.niveau == 0) ? -3 : 0 - rollData.diceFormula += `+${rollData.attr.value}+${rollData.competence.data.niveau}+${rollData.modificateur}+${compmod}` + rollData.predilections = duplicate( rollData.competence.system.predilections.filter( pred => !pred.used) || [] ) + let compmod = (rollData.competence.system.niveau == 0) ? -3 : 0 + rollData.diceFormula += `+${rollData.attr.value}+${rollData.competence.system.niveau}+${rollData.modificateur}+${compmod}` } else { rollData.diceFormula += `+${rollData.attr.value}*2+${rollData.modificateur}` } if (rollData.arme) { - rollData.diceFormula += `+${rollData.arme.data.bonusmaniementoff}` + rollData.diceFormula += `+${rollData.arme.system.bonusmaniementoff}` } if(rollData.rune) { diff --git a/styles/simple.css b/styles/simple.css index bb686f8..3d4d286 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -8,7 +8,7 @@ :root { /* =================== 1. ACTOR SHEET FONT STYLES =========== */ --window-header-font-family: Charlemagne; - --window-header-title-font-size: 1.3rem; + --window-header-title-font-size: 1.1rem; --window-header-title-font-weight: normal; --window-header-title-color: #f5f5f5; @@ -44,15 +44,16 @@ /*@import url("https://fonts.googleapis.com/css2?family=Martel:wght@400;800&family=Roboto:wght@300;400;500&display=swap");*/ /* Global styles & Font */ .window-app { + font-family: Charlemagne; text-align: justify; - font-size: 16px; + font-size: 12px; letter-spacing: 1px; } /* Fonts */ .sheet header.sheet-header h1 input, .window-app .window-header, #actors .directory-list, #navigation #scene-list .scene.nav-item { font-family: "Charlemagne"; - font-size: 1.0rem; + font-size: 0.8rem; } /* For title, sidebar character and scene */ .sheet nav.sheet-tabs { font-family: "Charlemagne"; diff --git a/system.json b/system.json index 8f46203..9d379ee 100644 --- a/system.json +++ b/system.json @@ -13,11 +13,6 @@ "gridDistance": 5, "gridUnits": "m", "languages": [ - { - "lang": "en", - "name": "English", - "path": "lang/en.json" - } ], "library": false, "license": "LICENSE.txt", @@ -70,6 +65,7 @@ }, { "label": "Dons", + "type": "Item", "name": "dons", "path": "./packs/dons.db", "system": "fvtt-mournblade", diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index 2d73626..fc9acfb 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -12,14 +12,14 @@

{{upperFirst alignement}}

+ name="system.bonneaventure.base" value="{{data.bonneaventure.base}}" data-dtype="Number" /> + name="system.bonneaventure.actuelle" value="{{data.bonneaventure.actuelle}}" data-dtype="Number" />

Eclat

+ name="system.eclat.value" value="{{data.eclat.value}}" data-dtype="Number" />

Expérience

+ name="system.experience.value" value="{{data.experience.value}}" data-dtype="Number" />
@@ -74,7 +74,7 @@ {{attr.label}}
  • - -
  • @@ -108,13 +108,13 @@ @@ -124,28 +124,28 @@
  • -
  • -
  • -
  • -
  • @@ -178,28 +178,28 @@ {{skill.name}} - {{#if (ne skill.data.attribut1 "none")}} + {{#if (ne skill.system.attribut1 "none")}} - + {{/if}} - {{#if (ne skill.data.attribut2 "none")}} + {{#if (ne skill.system.attribut2 "none")}} - + {{/if}} - {{#if (ne skill.data.attribut3 "none")}} + {{#if (ne skill.system.attribut3 "none")}} - + {{/if}} @@ -239,7 +239,7 @@
  • {{don.name}} - {{don.data.allegeance}} + {{don.system.allegeance}}
     
    @@ -270,8 +270,8 @@
  • {{rune.name}} - {{rune.data.formule}} - {{rune.data.seuil}} + {{rune.system.formule}} + {{rune.system.seuil}}
     
    @@ -300,7 +300,7 @@
  • {{tendance.name}} - {{tendance.data.allegeance}} + {{tendance.system.allegeance}}
     
    @@ -347,16 +347,16 @@ {{arme.name}} - + - {{#if arme.data.isdefense}} + {{#if arme.system.isdefense}} + class="arme-defensif">{{arme.system.totalDefensif}} {{else}} {{/if}} - +
     
    @@ -388,7 +388,7 @@ {{protection.name}} + class="arme-defensif">{{protection.system.protection}}
     
    @@ -462,7 +462,7 @@
  • -
  • @@ -472,19 +472,19 @@ @@ -492,16 +492,16 @@
  • - +
  • -
  • -
  • @@ -511,7 +511,7 @@

    Description

    - {{editor content=data.description target="data.description" button=true owner=owner editable=editable}} + {{editor data.biodata.description target="system.biodata.description" button=true owner=owner editable=editable}}
    diff --git a/templates/chat-degats-result.html b/templates/chat-degats-result.html index 3471f53..4875ad7 100644 --- a/templates/chat-degats-result.html +++ b/templates/chat-degats-result.html @@ -18,7 +18,7 @@
    diff --git a/templates/chat-generic-result.html b/templates/chat-generic-result.html index db9aff3..c317075 100644 --- a/templates/chat-generic-result.html +++ b/templates/chat-generic-result.html @@ -36,7 +36,7 @@ {{/if}} {{#if arme}} -
  • Arme : {{arme.name}} (+{{arme.data.bonusmaniementoff}})
  • +
  • Arme : {{arme.name}} (+{{arme.system.bonusmaniementoff}})
  • {{/if}}
  • Formule : {{diceFormula}}
  • diff --git a/templates/editor-notes-gm.html b/templates/editor-notes-gm.html index f3b3218..ca22bd0 100644 --- a/templates/editor-notes-gm.html +++ b/templates/editor-notes-gm.html @@ -1,6 +1,6 @@ {{#if data.isGM}}

    GM Notes :

    - {{editor content=data.gmnotes target="data.gmnotes" button=true owner=owner editable=editable}} + {{editor data.biodata.gmnotes target="system.biodata.gmnotes" button=true owner=owner editable=editable}}
    {{/if}} diff --git a/templates/item-arme-sheet.html b/templates/item-arme-sheet.html index 66b8ad4..ab76131 100644 --- a/templates/item-arme-sheet.html +++ b/templates/item-arme-sheet.html @@ -12,7 +12,7 @@
    - {{#select data.typearme}} @@ -23,49 +23,49 @@ - + - + {{#if data.isdefense}} - + {{/if}} - + - + - + - + - + - + - + - + {{> systems/fvtt-mournblade/templates/partial-item-description.html}} diff --git a/templates/item-competence-sheet.html b/templates/item-competence-sheet.html index 55b0103..d30b87a 100644 --- a/templates/item-competence-sheet.html +++ b/templates/item-competence-sheet.html @@ -17,7 +17,7 @@ - {{#select data.attribut2}} @@ -40,7 +40,7 @@ - + @@ -63,7 +63,7 @@ {{#each data.predilections as |predilection key|}}
  • + name="system.predilections[{{key}}]" value="{{predilection.name}}" data-dtype="String" />
  • diff --git a/templates/item-don-sheet.html b/templates/item-don-sheet.html index ee788b6..26e479b 100644 --- a/templates/item-don-sheet.html +++ b/templates/item-don-sheet.html @@ -12,7 +12,7 @@
    - {{#select data.allegeance}} @@ -24,7 +24,7 @@ - + @@ -32,7 +32,7 @@
    - {{editor content=data.sacrifice target="data.sacrifice" button=true owner=owner editable=editable}} + {{editor data.sacrifice target="system.sacrifice" button=true owner=owner editable=editable}}
    {{> systems/fvtt-mournblade/templates/partial-item-description.html}} diff --git a/templates/item-equipement-sheet.html b/templates/item-equipement-sheet.html index b7a0ac8..1771942 100644 --- a/templates/item-equipement-sheet.html +++ b/templates/item-equipement-sheet.html @@ -12,11 +12,11 @@
    - + - + {{> systems/fvtt-mournblade/templates/partial-item-description.html}} diff --git a/templates/item-pacte-sheet.html b/templates/item-pacte-sheet.html index d0e89e8..4d0587e 100644 --- a/templates/item-pacte-sheet.html +++ b/templates/item-pacte-sheet.html @@ -12,7 +12,7 @@
    - {{#select data.allegeance}} diff --git a/templates/item-predilection-sheet.html b/templates/item-predilection-sheet.html index 4bb644f..5462793 100644 --- a/templates/item-predilection-sheet.html +++ b/templates/item-predilection-sheet.html @@ -12,7 +12,7 @@
    - + {{> systems/fvtt-mournblade/templates/partial-item-description.html}} diff --git a/templates/item-protection-sheet.html b/templates/item-protection-sheet.html index 5c4f039..e378420 100644 --- a/templates/item-protection-sheet.html +++ b/templates/item-protection-sheet.html @@ -12,7 +12,7 @@
    - {{#select data.typearme}} @@ -21,19 +21,19 @@ - + - + - + - + {{> systems/fvtt-mournblade/templates/partial-item-description.html}} diff --git a/templates/item-rune-sheet.html b/templates/item-rune-sheet.html index e9f03c0..2392600 100644 --- a/templates/item-rune-sheet.html +++ b/templates/item-rune-sheet.html @@ -12,23 +12,23 @@
    - + - + - + - + {{> systems/fvtt-mournblade/templates/partial-item-description.html}} diff --git a/templates/item-runeeffet-sheet.html b/templates/item-runeeffet-sheet.html index 5a40746..8e304a6 100644 --- a/templates/item-runeeffet-sheet.html +++ b/templates/item-runeeffet-sheet.html @@ -11,12 +11,12 @@ - + - + - +
    diff --git a/templates/item-tendance-sheet.html b/templates/item-tendance-sheet.html index d0e89e8..4d0587e 100644 --- a/templates/item-tendance-sheet.html +++ b/templates/item-tendance-sheet.html @@ -12,7 +12,7 @@
    - {{#select data.allegeance}} diff --git a/templates/partial-actor-equipment.html b/templates/partial-actor-equipment.html index 01158d3..105ef00 100644 --- a/templates/partial-actor-equipment.html +++ b/templates/partial-actor-equipment.html @@ -7,37 +7,11 @@ {{/if}} - - - {{#if (count equip.data.effects)}} - {{#if equip.data.activated}} - Deactivate - {{else}} - Activate - {{/if}} - {{else}} -  -  - {{/if}} - - - {{#if equip.data.iscontainer}} - {{equip.data.contentsEnc}} - {{else}} - {{mul equip.data.weight equip.data.quantity}} - {{/if}} - - - {{#if equip.data.idrDice}} - {{equip.data.idrDice}} - {{else}} -  -  - {{/if}} - - +
     
    {{#if (eq level 1)}} diff --git a/templates/partial-actor-stat-block.html b/templates/partial-actor-stat-block.html deleted file mode 100644 index d2cdb82..0000000 --- a/templates/partial-actor-stat-block.html +++ /dev/null @@ -1,16 +0,0 @@ -
  • - - - - -

    {{stat.abbrev}}

    -
    - - -
  • \ No newline at end of file diff --git a/templates/partial-actor-status.html b/templates/partial-actor-status.html deleted file mode 100644 index 7fd3734..0000000 --- a/templates/partial-actor-status.html +++ /dev/null @@ -1,70 +0,0 @@ -
      -
    • - - - - -
    • - {{#each data.secondary as |stat2 key|}} -
    • - - - - - - -
    • - {{/each}} -
    • - - - - - - - /{{data.nrg.absolutemax}} -
    • -
    • - - - - - - - -
    • -
    • - - - - - - - + - - - -
    • - - - -
    - - \ No newline at end of file diff --git a/templates/partial-item-description.html b/templates/partial-item-description.html index 3da8a88..41856c1 100644 --- a/templates/partial-item-description.html +++ b/templates/partial-item-description.html @@ -2,5 +2,5 @@

    Description

    - {{editor content=data.description target="data.description" button=true owner=owner editable=editable}} + {{editor data.description target="system.description" button=true owner=owner editable=editable}}
    diff --git a/templates/post-item.html b/templates/post-item.html index 1bad9c8..8ce0f51 100644 --- a/templates/post-item.html +++ b/templates/post-item.html @@ -4,5 +4,5 @@ {{/if}}

    Description :

    -

    {{{data.description}}}

    +

    {{{system.description}}}

    diff --git a/templates/roll-dialog-generic.html b/templates/roll-dialog-generic.html index 4173050..0048473 100644 --- a/templates/roll-dialog-generic.html +++ b/templates/roll-dialog-generic.html @@ -27,14 +27,14 @@ {{#if competence}}
    {{competence.name}} - {{competence.data.niveau}} + {{competence.system.niveau}}
    {{/if}} {{#if rune}}
    {{rune.name}} - {{rune.data.formule}} + {{rune.system.formule}}
    Lancement