v10 first release

This commit is contained in:
sladecraven 2022-09-20 08:57:40 +02:00
parent 4a0a57870c
commit 1730a8d390
26 changed files with 194 additions and 324 deletions

View File

@ -25,9 +25,8 @@ export class MournbladeActorSheet extends ActorSheet {
/* -------------------------------------------- */ /* -------------------------------------------- */
async getData() { async getData() {
const objectData = MournbladeUtility.data(this.object); const objectData = duplicate(this.object)
let actorData = objectData
let actorData = duplicate(MournbladeUtility.templateData(this.object))
let formData = { let formData = {
title: this.title, title: this.title,
@ -37,7 +36,7 @@ export class MournbladeActorSheet extends ActorSheet {
name: objectData.name, name: objectData.name,
editable: this.isEditable, editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked", cssClass: this.isEditable ? "editable" : "locked",
data: actorData, data: actorData.system,
effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)), effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)),
limited: this.object.limited, limited: this.object.limited,
skills: this.actor.getSkills(), skills: this.actor.getSkills(),

View File

@ -51,22 +51,22 @@ export class MournbladeActor extends Actor {
prepareArme(arme) { prepareArme(arme) {
arme = duplicate(arme) arme = duplicate(arme)
let combat = this.getCombatValues() let combat = this.getCombatValues()
if (arme.data.typearme == "contact" || arme.data.typearme == "contactjet") { if (arme.system.typearme == "contact" || arme.system.typearme == "contactjet") {
arme.data.competence = duplicate(this.data.items.find(item => item.type == "competence" && item.name.toLowerCase() == "mêlée")) arme.system.competence = duplicate(this.items.find(item => item.type == "competence" && item.name.toLowerCase() == "mêlée"))
arme.data.attrKey = "pui" arme.system.attrKey = "pui"
arme.data.totalDegats = arme.data.degats + "+" + combat.bonusDegatsTotal arme.system.totalDegats = arme.system.degats + "+" + combat.bonusDegatsTotal
arme.data.totalOffensif = this.data.data.attributs.pui.value + arme.data.competence.data.niveau + arme.data.bonusmaniementoff arme.system.totalOffensif = this.system.attributs.pui.value + arme.system.competence.system.niveau + arme.system.bonusmaniementoff
if (arme.data.isdefense) { if (arme.system.isdefense) {
arme.data.totalDefensif = combat.defenseTotal + arme.data.competence.data.niveau + arme.data.bonusmaniementdef arme.system.totalDefensif = combat.defenseTotal + arme.system.competence.system.niveau + arme.system.bonusmaniementdef
} }
} }
if (arme.data.typearme == "jet" || arme.data.typearme == "tir") { if (arme.system.typearme == "jet" || arme.system.typearme == "tir") {
arme.data.competence = duplicate(this.data.items.find(item => item.type == "competence" && item.name.toLowerCase() == "armes à distance")) arme.system.competence = duplicate(this.items.find(item => item.type == "competence" && item.name.toLowerCase() == "armes à distance"))
arme.data.attrKey = "adr" arme.system.attrKey = "adr"
arme.data.totalOffensif = this.data.data.attributs.adr.value + arme.data.competence.data.niveau + arme.data.bonusmaniementoff arme.system.totalOffensif = this.system.attributs.adr.value + arme.system.competence.system.niveau + arme.system.bonusmaniementoff
arme.data.totalDegats = arme.data.degats arme.system.totalDegats = arme.system.degats
if (arme.data.isdefense) { if (arme.system.isdefense) {
arme.data.totalDefensif = combat.defenseTotal + arme.data.competence.data.niveau + arme.data.bonusmaniementdef arme.system.totalDefensif = combat.defenseTotal + arme.system.competence.system.niveau + arme.system.bonusmaniementdef
} }
} }
return arme return arme
@ -75,7 +75,7 @@ export class MournbladeActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
getWeapons() { getWeapons() {
let armes = [] let armes = []
for (let arme of this.data.items) { for (let arme of this.items) {
if (arme.type == "arme") { if (arme.type == "arme") {
armes.push(this.prepareArme(arme)) armes.push(this.prepareArme(arme))
} }
@ -85,49 +85,49 @@ export class MournbladeActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
getDons() { getDons() {
return this.data.items.filter(item => item.type == "don") return this.items.filter(item => item.type == "don")
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
getTendances() { getTendances() {
return this.data.items.filter(item => item.type == "tendance") return this.items.filter(item => item.type == "tendance")
} }
getRunes() { getRunes() {
return this.data.items.filter(item => item.type == "rune") return this.items.filter(item => item.type == "rune")
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
getEquipments() { getEquipments() {
return this.data.items.filter(item => item.type == "equipement") return this.items.filter(item => item.type == "equipement")
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
getArmors() { getArmors() {
return this.data.items.filter(item => item.type == "protection") return this.items.filter(item => item.type == "protection")
} }
getOrigine() { getOrigine() {
return this.data.items.find(item => item.type == "origine") return this.items.find(item => item.type == "origine")
} }
getMetier() { getMetier() {
return this.data.items.find(item => item.type == "metier") return this.items.find(item => item.type == "metier")
} }
getHeritage() { getHeritage() {
return this.data.items.find(item => item.type == "heritage") return this.items.find(item => item.type == "heritage")
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
getSkills() { getSkills() {
let comp = [] let comp = []
for (let item of this.data.items) { for (let item of this.items) {
item = duplicate(item) item = duplicate(item)
if (item.type == "competence") { if (item.type == "competence") {
item.data.attribut1total = item.data.niveau + (this.data.data.attributs[item.data.attribut1]?.value || 0) item.system.attribut1total = item.system.niveau + (this.system.attributs[item.system.attribut1]?.value || 0)
item.data.attribut2total = item.data.niveau + (this.data.data.attributs[item.data.attribut2]?.value || 0) item.system.attribut2total = item.system.niveau + (this.system.attributs[item.system.attribut2]?.value || 0)
item.data.attribut3total = item.data.niveau + (this.data.data.attributs[item.data.attribut3]?.value || 0) item.system.attribut3total = item.system.niveau + (this.system.attributs[item.system.attribut3]?.value || 0)
if (item.data.niveau == 0) { if (item.system.niveau == 0) {
item.data.attribut1total -= 3 item.system.attribut1total -= 3
item.data.attribut2total -= 3 item.system.attribut2total -= 3
item.data.attribut3total -= 3 item.system.attribut3total -= 3
} }
item.data.attribut1label = this.data.data.attributs[item.data.attribut1]?.label || "" item.system.attribut1label = this.system.attributs[item.system.attribut1]?.label || ""
item.data.attribut2label = this.data.data.attributs[item.data.attribut2]?.label || "" item.system.attribut2label = this.system.attributs[item.system.attribut2]?.label || ""
item.data.attribut3label = this.data.data.attributs[item.data.attribut3]?.label || "" item.system.attribut3label = this.system.attributs[item.system.attribut3]?.label || ""
comp.push(item) comp.push(item)
} }
} }
@ -146,30 +146,30 @@ export class MournbladeActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
getAlignement() { 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() { getDefenseBase() {
return this.data.data.attributs.tre.value + 5 return this.system.attributs.tre.value + 5
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
getVitesseBase() { getVitesseBase() {
return 5 + __vitesseBonus[this.data.data.attributs.adr.value] return 5 + __vitesseBonus[this.system.attributs.adr.value]
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
getCombatValues() { getCombatValues() {
let combat = { let combat = {
initBase: this.data.data.attributs.adr.value, initBase: this.system.attributs.adr.value,
initTotal: this.data.data.attributs.adr.value + this.data.data.combat.initbonus, initTotal: this.system.attributs.adr.value + this.system.combat.initbonus,
bonusDegats: this.getBonusDegats(), bonusDegats: this.getBonusDegats(),
bonusDegatsTotal: this.getBonusDegats() + this.data.data.combat.bonusdegats, bonusDegatsTotal: this.getBonusDegats() + this.system.combat.bonusdegats,
vitesseBase: this.getVitesseBase(), vitesseBase: this.getVitesseBase(),
vitesseTotal: this.getVitesseBase() + this.data.data.combat.vitessebonus, vitesseTotal: this.getVitesseBase() + this.system.combat.vitessebonus,
defenseBase: this.getDefenseBase(), defenseBase: this.getDefenseBase(),
defenseTotal: this.getDefenseBase() + this.data.data.combat.defensebonus defenseTotal: this.getDefenseBase() + this.system.combat.defensebonus
} }
return combat return combat
} }
@ -186,12 +186,12 @@ export class MournbladeActor extends Actor {
prepareDerivedData() { prepareDerivedData() {
if (this.type == 'personnage') { 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 let newSante = this.system.sante.bonus + (this.system.attributs.pui.value + this.system.attributs.tre.value) * 2 + 5
if (this.data.data.sante.base != newSante) { if (this.system.sante.base != newSante) {
this.update({ 'data.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 let newAme = (this.system.attributs.cla.value + this.system.attributs.tre.value) * this.system.biodata.amemultiplier + 5
if (this.data.data.ame.fullmax != newAme) { if (this.system.ame.fullmax != newAme) {
this.update({ 'data.ame.fullmax': newAme }) this.update({ 'data.ame.fullmax': newAme })
} }
} }
@ -207,7 +207,7 @@ export class MournbladeActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
getItemById(id) { getItemById(id) {
let item = this.data.items.find(item => item.id == id); let item = this.items.find(item => item.id == id);
if (item) { if (item) {
item = duplicate(item) item = duplicate(item)
} }
@ -216,16 +216,16 @@ export class MournbladeActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
async equipItem(itemId) { async equipItem(itemId) {
let item = this.data.items.find(item => item.id == itemId); let item = this.items.find(item => item.id == itemId);
if (item && item.data.data) { if (item && item.system.data) {
let update = { _id: item.id, "data.equipped": !item.data.data.equipped }; let update = { _id: item.id, "data.equipped": !item.system.equipped };
await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity
} }
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
editItemField(itemId, itemType, itemField, dataType, value) { 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) { if (item) {
console.log("Item ", item, itemField, dataType, value) console.log("Item ", item, itemField, dataType, value)
if (dataType.toLowerCase() == "number") { if (dataType.toLowerCase() == "number") {
@ -240,35 +240,35 @@ export class MournbladeActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
getBonneAventure() { getBonneAventure() {
return this.data.data.bonneaventure.actuelle return this.system.bonneaventure.actuelle
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
changeBonneAventure(value) { changeBonneAventure(value) {
let newBA = this.data.data.bonneaventure.actuelle let newBA = this.system.bonneaventure.actuelle
newBA += value newBA += value
this.update({ 'data.bonneaventure.actuelle': newBA }) this.update({ 'data.bonneaventure.actuelle': newBA })
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
getEclat() { getEclat() {
return this.data.data.eclat.value return this.system.eclat.value
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
changeEclat(value) { changeEclat(value) {
let newE = this.data.data.eclat.value let newE = this.system.eclat.value
newE += value newE += value
this.update({ 'data.eclat.value': newE }) this.update({ 'data.eclat.value': newE })
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
canEclatDoubleD20() { canEclatDoubleD20() {
return (this.getAlignement() == "loyal" && this.data.data.eclat.value > 0) return (this.getAlignement() == "loyal" && this.system.eclat.value > 0)
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
subPointsAme(runeMode, value) { subPointsAme(runeMode, value) {
let ame = duplicate(this.data.data.ame) let ame = duplicate(this.system.ame)
if(runeMode == "prononcer") { if(runeMode == "prononcer") {
ame.value -= value ame.value -= value
} else { } else {
@ -290,19 +290,19 @@ export class MournbladeActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
getAttribute(attrKey) { getAttribute(attrKey) {
return this.data.data.attributes[attrKey] return this.system.attributes[attrKey]
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
getBonusDegats() { getBonusDegats() {
return __degatsBonus[this.data.data.attributs.pui.value] return __degatsBonus[this.system.attributs.pui.value]
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
async equipGear(equipmentId) { async equipGear(equipmentId) {
let item = this.data.items.find(item => item.id == equipmentId); let item = this.items.find(item => item.id == equipmentId);
if (item && item.data.data) { if (item && item.system.data) {
let update = { _id: item.id, "data.equipped": !item.data.data.equipped }; let update = { _id: item.id, "data.equipped": !item.system.equipped };
await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity
} }
} }
@ -310,21 +310,21 @@ export class MournbladeActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
getSubActors() { getSubActors() {
let subActors = []; let subActors = [];
for (let id of this.data.data.subactors) { for (let id of this.system.subactors) {
subActors.push(duplicate(game.actors.get(id))); subActors.push(duplicate(game.actors.get(id)));
} }
return subActors; return subActors;
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
async addSubActor(subActorId) { async addSubActor(subActorId) {
let subActors = duplicate(this.data.data.subactors); let subActors = duplicate(this.system.subactors);
subActors.push(subActorId); subActors.push(subActorId);
await this.update({ 'data.subactors': subActors }); await this.update({ 'data.subactors': subActors });
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
async delSubActor(subActorId) { async delSubActor(subActorId) {
let newArray = []; let newArray = [];
for (let id of this.data.data.subactors) { for (let id of this.system.subactors) {
if (id != subActorId) { if (id != subActorId) {
newArray.push(id); newArray.push(id);
} }
@ -334,22 +334,22 @@ export class MournbladeActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
async incDecQuantity(objetId, incDec = 0) { async incDecQuantity(objetId, incDec = 0) {
let objetQ = this.data.items.get(objetId) let objetQ = this.items.get(objetId)
if (objetQ) { 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 const updated = await this.updateEmbeddedDocuments('Item', [{ _id: objetQ.id, 'data.quantity': newQ }]); // pdates one EmbeddedEntity
} }
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
getCompetence(compId) { getCompetence(compId) {
return this.data.items.get(compId) return this.items.get(compId)
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
async setPredilectionUsed(compId, predIdx) { async setPredilectionUsed(compId, predIdx) {
let comp = this.data.items.get(compId) let comp = this.items.get(compId)
let pred = duplicate(comp.data.data.predilections) let pred = duplicate(comp.system.predilections)
pred[predIdx].used = true pred[predIdx].used = true
await this.updateEmbeddedDocuments('Item', [{ _id: compId, 'data.predilections': pred }]) await this.updateEmbeddedDocuments('Item', [{ _id: compId, 'data.predilections': pred }])
} }
@ -368,16 +368,16 @@ export class MournbladeActor extends Actor {
if (attrKey) { if (attrKey) {
rollData.attrKey = attrKey rollData.attrKey = attrKey
if (attrKey != "tochoose") { if (attrKey != "tochoose") {
rollData.actionImg = "systems/fvtt-mournblade/assets/icons/" + this.data.data.attributs[attrKey].labelnorm + ".webp" rollData.actionImg = "systems/fvtt-mournblade/assets/icons/" + this.system.attributs[attrKey].labelnorm + ".webp"
rollData.attr = duplicate(this.data.data.attributs[attrKey]) rollData.attr = duplicate(this.system.attributs[attrKey])
} }
} }
if (compId) { if (compId) {
rollData.competence = duplicate(this.data.items.get(compId) || {}) rollData.competence = duplicate(this.items.get(compId) || {})
rollData.actionImg = rollData.competence?.img rollData.actionImg = rollData.competence?.img
} }
if (compName) { 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 rollData.actionImg = rollData.competence?.img
} }
return rollData return rollData
@ -402,7 +402,7 @@ export class MournbladeActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
async rollRune(runeId) { async rollRune(runeId) {
let rollData = this.getCommonRollData("cla", undefined, "Savoir : Runes") 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.difficulte = rollData.rune?.data?.seuil || 0
rollData.runemode = "prononcer" rollData.runemode = "prononcer"
rollData.runeame = 1 rollData.runeame = 1
@ -413,9 +413,9 @@ export class MournbladeActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
async rollArmeOffensif(armeId) { async rollArmeOffensif(armeId) {
let arme = this.data.items.get(armeId) let arme = this.items.get(armeId)
arme = this.prepareArme(arme) 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 rollData.arme = arme
console.log("ARME!", rollData) console.log("ARME!", rollData)
let rollDialog = await MournbladeRollDialog.create(this, rollData) let rollDialog = await MournbladeRollDialog.create(this, rollData)
@ -424,9 +424,9 @@ export class MournbladeActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
async rollArmeDegats(armeId) { async rollArmeDegats(armeId) {
let arme = this.data.items.get(armeId) let arme = this.items.get(armeId)
arme = this.prepareArme(arme) 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")); await MournbladeUtility.showDiceSoNice(roll, game.settings.get("core", "rollMode"));
let rollData = { let rollData = {
arme: arme, arme: arme,

View File

@ -48,9 +48,8 @@ export class MournbladeItemSheet extends ItemSheet {
/* -------------------------------------------- */ /* -------------------------------------------- */
async getData() { async getData() {
const objectData = MournbladeUtility.data(this.object); const objectData = duplicate(this.object)
let itemData = objectData
let itemData = foundry.utils.deepClone(MournbladeUtility.templateData(this.object));
let formData = { let formData = {
title: this.title, title: this.title,
id: this.id, id: this.id,
@ -60,7 +59,7 @@ export class MournbladeItemSheet extends ItemSheet {
editable: this.isEditable, editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked", cssClass: this.isEditable ? "editable" : "locked",
attributs: MournbladeUtility.getAttributs(), attributs: MournbladeUtility.getAttributs(),
data: itemData, data: itemData.system,
limited: this.object.limited, limited: this.object.limited,
options: this.options, options: this.options,
owner: this.document.isOwner, owner: this.document.isOwner,
@ -68,7 +67,7 @@ export class MournbladeItemSheet extends ItemSheet {
isGM: game.user.isGM 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); console.log("ITEM DATA", formData, this);
return formData; return formData;
} }
@ -130,26 +129,26 @@ export class MournbladeItemSheet extends ItemSheet {
html.find('.edit-prediction').change(ev => { html.find('.edit-prediction').change(ev => {
const li = $(ev.currentTarget).parents(".prediction-item") const li = $(ev.currentTarget).parents(".prediction-item")
let index = li.data("prediction-index") 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 pred[index].name = ev.currentTarget.value
this.object.update( { 'data.predilections': pred }) this.object.update( { 'data.predilections': pred })
}) })
html.find('.delete-prediction').click(ev => { html.find('.delete-prediction').click(ev => {
const li = $(ev.currentTarget).parents(".prediction-item") const li = $(ev.currentTarget).parents(".prediction-item")
let index = li.data("prediction-index") 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) pred.splice(index,1)
this.object.update( { 'data.predilections': pred }) this.object.update( { 'data.predilections': pred })
}) })
html.find('.use-prediction').change(ev => { html.find('.use-prediction').change(ev => {
const li = $(ev.currentTarget).parents(".prediction-item") const li = $(ev.currentTarget).parents(".prediction-item")
let index = li.data("prediction-index") 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 pred[index].used = ev.currentTarget.checked
this.object.update( { 'data.predilections': pred }) this.object.update( { 'data.predilections': pred })
}) })
html.find('#add-predilection').click(ev => { 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 }) pred.push( { name: "Nouvelle prédilection", used: false })
this.object.update( { 'data.predilections': pred }) this.object.update( { 'data.predilections': pred })
}) })

View File

@ -155,19 +155,6 @@ export class MournbladeUtility {
return undefined; 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) { static createDirectOptionList(min, max) {
let options = {}; let options = {};
@ -309,8 +296,8 @@ export class MournbladeUtility {
rollData.attrKey = "adr" rollData.attrKey = "adr"
} }
if ( !rollData.attr) { if ( !rollData.attr) {
rollData.actionImg = "systems/fvtt-mournblade/assets/icons/" + actor.data.data.attributs[rollData.attrKey].labelnorm + ".webp" rollData.actionImg = "systems/fvtt-mournblade/assets/icons/" + actor.system.attributs[rollData.attrKey].labelnorm + ".webp"
rollData.attr = duplicate(actor.data.data.attributs[rollData.attrKey]) rollData.attr = duplicate(actor.system.attributs[rollData.attrKey])
} }
rollData.diceFormula = rollData.mainDice rollData.diceFormula = rollData.mainDice
@ -321,15 +308,15 @@ export class MournbladeUtility {
} }
} }
if (rollData.competence) { if (rollData.competence) {
rollData.predilections = duplicate( rollData.competence.data.predilections.filter( pred => !pred.used) || [] ) rollData.predilections = duplicate( rollData.competence.system.predilections.filter( pred => !pred.used) || [] )
let compmod = (rollData.competence.data.niveau == 0) ? -3 : 0 let compmod = (rollData.competence.system.niveau == 0) ? -3 : 0
rollData.diceFormula += `+${rollData.attr.value}+${rollData.competence.data.niveau}+${rollData.modificateur}+${compmod}` rollData.diceFormula += `+${rollData.attr.value}+${rollData.competence.system.niveau}+${rollData.modificateur}+${compmod}`
} else { } else {
rollData.diceFormula += `+${rollData.attr.value}*2+${rollData.modificateur}` rollData.diceFormula += `+${rollData.attr.value}*2+${rollData.modificateur}`
} }
if (rollData.arme) { if (rollData.arme) {
rollData.diceFormula += `+${rollData.arme.data.bonusmaniementoff}` rollData.diceFormula += `+${rollData.arme.system.bonusmaniementoff}`
} }
if(rollData.rune) { if(rollData.rune) {

View File

@ -8,7 +8,7 @@
:root { :root {
/* =================== 1. ACTOR SHEET FONT STYLES =========== */ /* =================== 1. ACTOR SHEET FONT STYLES =========== */
--window-header-font-family: Charlemagne; --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-font-weight: normal;
--window-header-title-color: #f5f5f5; --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");*/ /*@import url("https://fonts.googleapis.com/css2?family=Martel:wght@400;800&family=Roboto:wght@300;400;500&display=swap");*/
/* Global styles & Font */ /* Global styles & Font */
.window-app { .window-app {
font-family: Charlemagne;
text-align: justify; text-align: justify;
font-size: 16px; font-size: 12px;
letter-spacing: 1px; letter-spacing: 1px;
} }
/* Fonts */ /* Fonts */
.sheet header.sheet-header h1 input, .window-app .window-header, #actors .directory-list, #navigation #scene-list .scene.nav-item { .sheet header.sheet-header h1 input, .window-app .window-header, #actors .directory-list, #navigation #scene-list .scene.nav-item {
font-family: "Charlemagne"; font-family: "Charlemagne";
font-size: 1.0rem; font-size: 0.8rem;
} /* For title, sidebar character and scene */ } /* For title, sidebar character and scene */
.sheet nav.sheet-tabs { .sheet nav.sheet-tabs {
font-family: "Charlemagne"; font-family: "Charlemagne";

View File

@ -13,11 +13,6 @@
"gridDistance": 5, "gridDistance": 5,
"gridUnits": "m", "gridUnits": "m",
"languages": [ "languages": [
{
"lang": "en",
"name": "English",
"path": "lang/en.json"
}
], ],
"library": false, "library": false,
"license": "LICENSE.txt", "license": "LICENSE.txt",
@ -70,6 +65,7 @@
}, },
{ {
"label": "Dons", "label": "Dons",
"type": "Item",
"name": "dons", "name": "dons",
"path": "./packs/dons.db", "path": "./packs/dons.db",
"system": "fvtt-mournblade", "system": "fvtt-mournblade",

View File

@ -12,14 +12,14 @@
<h4 class="item-name-label competence-name item-field-label-short">{{upperFirst alignement}}</h4> <h4 class="item-name-label competence-name item-field-label-short">{{upperFirst alignement}}</h4>
<label class="item-name-label competence-name item-field-label-short">Loi</label> <label class="item-name-label competence-name item-field-label-short">Loi</label>
<select class="status-small-label color-class-common item-field-label-short" type="text" <select class="status-small-label color-class-common item-field-label-short" type="text"
name="data.balance.loi" value="{{data.balance.loi}}" data-dtype="Number"> name="system.balance.loi" value="{{data.balance.loi}}" data-dtype="Number">
{{#select data.balance.loi}} {{#select data.balance.loi}}
{{> systems/fvtt-mournblade/templates/partial-list-niveau.html}} {{> systems/fvtt-mournblade/templates/partial-list-niveau.html}}
{{/select}} {{/select}}
</select> </select>
<label class="item-name-label competence-name item-field-label-short">Chaos</label> <label class="item-name-label competence-name item-field-label-short">Chaos</label>
<select class="status-small-label color-class-common item-field-label-short" type="text" <select class="status-small-label color-class-common item-field-label-short" type="text"
name="data.balance.chaos" value="{{data.balance.chaos}}" data-dtype="Number"> name="system.balance.chaos" value="{{data.balance.chaos}}" data-dtype="Number">
{{#select data.balance.chaos}} {{#select data.balance.chaos}}
{{> systems/fvtt-mournblade/templates/partial-list-niveau.html}} {{> systems/fvtt-mournblade/templates/partial-list-niveau.html}}
{{/select}} {{/select}}
@ -30,19 +30,19 @@
<h4 class="item-name-label competence-name">Bonne Aventure</h4> <h4 class="item-name-label competence-name">Bonne Aventure</h4>
<label class="item-name-label competence-name item-field-label-short">Base</label> <label class="item-name-label competence-name item-field-label-short">Base</label>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short" <input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="data.bonneaventure.base" value="{{data.bonneaventure.base}}" data-dtype="Number" /> name="system.bonneaventure.base" value="{{data.bonneaventure.base}}" data-dtype="Number" />
<label class="item-name-label competence-name item-field-label-short">Actuelle</label> <label class="item-name-label competence-name item-field-label-short">Actuelle</label>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short" <input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="data.bonneaventure.actuelle" value="{{data.bonneaventure.actuelle}}" data-dtype="Number" /> name="system.bonneaventure.actuelle" value="{{data.bonneaventure.actuelle}}" data-dtype="Number" />
</div> </div>
<div class="flexrow"> <div class="flexrow">
<h4 class="item-name-label competence-name item-field-label-short">Eclat</h4> <h4 class="item-name-label competence-name item-field-label-short">Eclat</h4>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short" <input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="data.eclat.value" value="{{data.eclat.value}}" data-dtype="Number" /> name="system.eclat.value" value="{{data.eclat.value}}" data-dtype="Number" />
<h4 class="item-name-label competence-name item-field-label-medium">Expérience</h4> <h4 class="item-name-label competence-name item-field-label-medium">Expérience</h4>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short" <input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
name="data.experience.value" value="{{data.experience.value}}" data-dtype="Number" /> name="system.experience.value" value="{{data.experience.value}}" data-dtype="Number" />
</div> </div>
</div> </div>
@ -74,7 +74,7 @@
<span class="item-name-label competence-name item-field-label-medium"><a <span class="item-name-label competence-name item-field-label-medium"><a
class="roll-attribut">{{attr.label}}</a></span> class="roll-attribut">{{attr.label}}</a></span>
<select class="status-small-label color-class-common item-field-label-short" type="text" <select class="status-small-label color-class-common item-field-label-short" type="text"
name="data.attributs.{{key}}.value" value="{{attr.value}}" data-dtype="Number"> name="system.attributs.{{key}}.value" value="{{attr.value}}" data-dtype="Number">
{{#select attr.value}} {{#select attr.value}}
{{> systems/fvtt-mournblade/templates/partial-list-niveau.html}} {{> systems/fvtt-mournblade/templates/partial-list-niveau.html}}
{{/select}} {{/select}}
@ -89,17 +89,17 @@
<ul class="item-list alternate-list"> <ul class="item-list alternate-list">
<li class="item flexrow"> <li class="item flexrow">
<label class="label-name">Bonus</label> <label class="label-name">Bonus</label>
<input type="text" class="input-numeric-short" name="data.sante.bonus" value="{{data.sante.bonus}}" <input type="text" class="input-numeric-short" name="system.sante.bonus" value="{{data.sante.bonus}}"
data-dtype="Number" /> data-dtype="Number" />
<label class="label-name">Total</label> <label class="label-name">Total</label>
<label class="label-name">{{data.sante.base}}</label> <label class="label-name">{{data.sante.base}}</label>
</li> </li>
<li class="item flexrow"> <li class="item flexrow">
<label class="label-name">Non létaux</label> <label class="label-name">Non létaux</label>
<input type="text" class="input-numeric-short" name="data.sante.nonletaux" <input type="text" class="input-numeric-short" name="system.sante.nonletaux"
value="{{data.sante.nonletaux}}" data-dtype="Number" /> value="{{data.sante.nonletaux}}" data-dtype="Number" />
<label class="label-name">Létaux</label> <label class="label-name">Létaux</label>
<input type="text" class="input-numeric-short" name="data.sante.letaux" value="{{data.sante.letaux}}" <input type="text" class="input-numeric-short" name="system.sante.letaux" value="{{data.sante.letaux}}"
data-dtype="Number" /> data-dtype="Number" />
</li> </li>
</ul> </ul>
@ -108,13 +108,13 @@
<ul class="item-list alternate-list"> <ul class="item-list alternate-list">
<li class="item flexrow"> <li class="item flexrow">
<label class="label-name">Max</label> <label class="label-name">Max</label>
<input type="text" class="input-numeric-short" name="data.ame.fullmax" value="{{data.ame.fullmax}}" <input type="text" class="input-numeric-short" name="system.ame.fullmax" value="{{data.ame.fullmax}}"
data-dtype="Number" /> data-dtype="Number" />
<label class="label-name">Max Actuel</label> <label class="label-name">Max Actuel</label>
<input type="text" class="input-numeric-short" name="data.ame.currentmax" value="{{data.ame.currentmax}}" <input type="text" class="input-numeric-short" name="system.ame.currentmax" value="{{data.ame.currentmax}}"
data-dtype="Number" /> data-dtype="Number" />
<label class="label-name">Courante</label> <label class="label-name">Courante</label>
<input type="text" class="input-numeric-short" name="data.ame.value" value="{{data.ame.value}}" <input type="text" class="input-numeric-short" name="system.ame.value" value="{{data.ame.value}}"
data-dtype="Number" /> data-dtype="Number" />
</li> </li>
</ul> </ul>
@ -124,28 +124,28 @@
<li class="item flexrow"> <li class="item flexrow">
<label class="competence-name">Initiative</label> <label class="competence-name">Initiative</label>
<label class="competence-name">{{combat.initBase}}</label> <label class="competence-name">{{combat.initBase}}</label>
<input type="text" class="input-numeric-short" name="data.combat.initbonus" <input type="text" class="input-numeric-short" name="system.combat.initbonus"
value="{{data.combat.initbonus}}" data-dtype="Number" /> value="{{data.combat.initbonus}}" data-dtype="Number" />
<label class="competence-name">{{combat.initTotal}}</label> <label class="competence-name">{{combat.initTotal}}</label>
</li> </li>
<li class="item flexrow"> <li class="item flexrow">
<label class="competence-name">B. Dégats</label> <label class="competence-name">B. Dégats</label>
<label class="competence-name">+{{combat.bonusDegats}}</label> <label class="competence-name">+{{combat.bonusDegats}}</label>
<input type="text" class="input-numeric-short" name="data.combat.bonusdegats" <input type="text" class="input-numeric-short" name="system.combat.bonusdegats"
value="{{data.combat.bonusdegats}}" data-dtype="Number" /> value="{{data.combat.bonusdegats}}" data-dtype="Number" />
<label class="competence-name">+{{combat.bonusDegatsTotal}}</label> <label class="competence-name">+{{combat.bonusDegatsTotal}}</label>
</li> </li>
<li class="item flexrow"> <li class="item flexrow">
<label class="competence-name">Vitesse</label> <label class="competence-name">Vitesse</label>
<label class="competence-name">{{combat.vitesseBase}}</label> <label class="competence-name">{{combat.vitesseBase}}</label>
<input type="text" class="input-numeric-short" name="data.combat.vitessebonus" <input type="text" class="input-numeric-short" name="system.combat.vitessebonus"
value="{{data.combat.vitessebonus}}" data-dtype="Number" /> value="{{data.combat.vitessebonus}}" data-dtype="Number" />
<label class="competence-name">{{combat.vitesseTotal}}</label> <label class="competence-name">{{combat.vitesseTotal}}</label>
</li> </li>
<li class="item flexrow"> <li class="item flexrow">
<label class="competence-name">Défense</label> <label class="competence-name">Défense</label>
<label class="competence-name">{{combat.defenseBase}}</label> <label class="competence-name">{{combat.defenseBase}}</label>
<input type="text" class="input-numeric-short" name="data.combat.defensebonus" <input type="text" class="input-numeric-short" name="system.combat.defensebonus"
value="{{data.combat.defensebonus}}" data-dtype="Number" /> value="{{data.combat.defensebonus}}" data-dtype="Number" />
<label class="competence-name">{{combat.defenseTotal}}</label> <label class="competence-name">{{combat.defenseTotal}}</label>
</li> </li>
@ -178,28 +178,28 @@
<span class="item-name-label competence-name"><a class="roll-competence" <span class="item-name-label competence-name"><a class="roll-competence"
data-attr-key="tochoose">{{skill.name}}</a></span> data-attr-key="tochoose">{{skill.name}}</a></span>
<select class="status-small-label color-class-common edit-item-data competence-niveau" type="text" <select class="status-small-label color-class-common edit-item-data competence-niveau" type="text"
data-item-field="niveau" value="{{skill.data.niveau}}" data-dtype="Number"> data-item-field="niveau" value="{{skill.system.niveau}}" data-dtype="Number">
{{#select skill.data.niveau}} {{#select skill.system.niveau}}
{{> systems/fvtt-mournblade/templates/partial-list-niveau.html}} {{> systems/fvtt-mournblade/templates/partial-list-niveau.html}}
{{/select}} {{/select}}
</select> </select>
{{#if (ne skill.data.attribut1 "none")}} {{#if (ne skill.system.attribut1 "none")}}
<span class="item-field-label-short"> <span class="item-field-label-short">
<button class="roll-competence button-sheet-roll" data-attr-key="{{skill.data.attribut1}}">{{upper <button class="roll-competence button-sheet-roll" data-attr-key="{{skill.system.attribut1}}">{{upper
skill.data.attribut1}} : {{skill.data.attribut1total}}</button> skill.system.attribut1}} : {{skill.system.attribut1total}}</button>
</span> </span>
{{/if}} {{/if}}
{{#if (ne skill.data.attribut2 "none")}} {{#if (ne skill.system.attribut2 "none")}}
<span class="item-field-label-short"> <span class="item-field-label-short">
<button class="roll-competence button-sheet-roll" data-attr-key="{{skill.data.attribut2}}">{{upper <button class="roll-competence button-sheet-roll" data-attr-key="{{skill.system.attribut2}}">{{upper
skill.data.attribut2}} : {{skill.data.attribut2total}}</button> skill.system.attribut2}} : {{skill.system.attribut2total}}</button>
</span> </span>
{{/if}} {{/if}}
{{#if (ne skill.data.attribut3 "none")}} {{#if (ne skill.system.attribut3 "none")}}
<span class="item-field-label-short"> <span class="item-field-label-short">
<button class="roll-competence button-sheet-roll" data-attr-key="{{skill.data.attribut3}}">{{upper <button class="roll-competence button-sheet-roll" data-attr-key="{{skill.system.attribut3}}">{{upper
skill.data.attribut3}} : {{skill.data.attribut3total}}</button> skill.system.attribut3}} : {{skill.system.attribut3total}}</button>
</span> </span>
{{/if}} {{/if}}
@ -239,7 +239,7 @@
<li class="item flexrow " data-item-id="{{don._id}}" data-item-type="don"> <li class="item flexrow " data-item-id="{{don._id}}" data-item-type="don">
<img class="item-name-img" src="{{don.img}}" /> <img class="item-name-img" src="{{don.img}}" />
<span class="item-name-label competence-name">{{don.name}}</span> <span class="item-name-label competence-name">{{don.name}}</span>
<span class="item-field-label-short">{{don.data.allegeance}}</span> <span class="item-field-label-short">{{don.system.allegeance}}</span>
<div class="item-filler">&nbsp;</div> <div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed"> <div class="item-controls item-controls-fixed">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a> <a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
@ -270,8 +270,8 @@
<li class="item flexrow " data-item-id="{{rune._id}}" data-item-type="rune"> <li class="item flexrow " data-item-id="{{rune._id}}" data-item-type="rune">
<img class="item-name-img" src="{{rune.img}}" /> <img class="item-name-img" src="{{rune.img}}" />
<span class="item-name-label competence-name"><a class="roll-rune">{{rune.name}}</a></span> <span class="item-name-label competence-name"><a class="roll-rune">{{rune.name}}</a></span>
<span class="item-field-label-short">{{rune.data.formule}}</span> <span class="item-field-label-short">{{rune.system.formule}}</span>
<span class="item-field-label-short">{{rune.data.seuil}}</span> <span class="item-field-label-short">{{rune.system.seuil}}</span>
<div class="item-filler">&nbsp;</div> <div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed"> <div class="item-controls item-controls-fixed">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a> <a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
@ -300,7 +300,7 @@
<li class="item flexrow " data-item-id="{{tendance._id}}" data-item-type="tendance"> <li class="item flexrow " data-item-id="{{tendance._id}}" data-item-type="tendance">
<img class="item-name-img" src="{{tendance.img}}" /> <img class="item-name-img" src="{{tendance.img}}" />
<span class="item-name-label competence-name">{{tendance.name}}</span> <span class="item-name-label competence-name">{{tendance.name}}</span>
<span class="item-field-label-short">{{tendance.data.allegeance}}</span> <span class="item-field-label-short">{{tendance.system.allegeance}}</span>
<div class="item-filler">&nbsp;</div> <div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed"> <div class="item-controls item-controls-fixed">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a> <a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
@ -347,16 +347,16 @@
<img class="item-name-img" src="{{arme.img}}" /> <img class="item-name-img" src="{{arme.img}}" />
<span class="item-name-label competence-name">{{arme.name}}</span> <span class="item-name-label competence-name">{{arme.name}}</span>
<span class="item-field-label-short"> <span class="item-field-label-short">
<button class="roll-arme-offensif button-sheet-roll">{{arme.data.totalOffensif}}</button> <button class="roll-arme-offensif button-sheet-roll">{{arme.system.totalOffensif}}</button>
</span> </span>
{{#if arme.data.isdefense}} {{#if arme.system.isdefense}}
<span class="item-field-label-short arme-defensif"><label <span class="item-field-label-short arme-defensif"><label
class="arme-defensif">{{arme.data.totalDefensif}}</label></span> class="arme-defensif">{{arme.system.totalDefensif}}</label></span>
{{else}} {{else}}
<span class="item-field-label-short arme-defensif"><label class="arme-defensif">-</label></span> <span class="item-field-label-short arme-defensif"><label class="arme-defensif">-</label></span>
{{/if}} {{/if}}
<span class="item-field-label-short"> <span class="item-field-label-short">
<button class="roll-arme-degats button-sheet-roll">{{arme.data.totalDegats}}</button> <button class="roll-arme-degats button-sheet-roll">{{arme.system.totalDegats}}</button>
</span> </span>
<div class="item-filler">&nbsp;</div> <div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed"> <div class="item-controls item-controls-fixed">
@ -388,7 +388,7 @@
<img class="item-name-img" src="{{protection.img}}" /> <img class="item-name-img" src="{{protection.img}}" />
<span class="item-name-label competence-name">{{protection.name}}</span> <span class="item-name-label competence-name">{{protection.name}}</span>
<span class="item-field-label-short arme-defensif"><label <span class="item-field-label-short arme-defensif"><label
class="arme-defensif">{{protection.data.protection}}</label> class="arme-defensif">{{protection.system.protection}}</label>
</span> </span>
<div class="item-filler">&nbsp;</div> <div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed"> <div class="item-controls item-controls-fixed">
@ -462,7 +462,7 @@
</li> </li>
<li class="flexrow item"> <li class="flexrow item">
<label class="generic-label">Multiplicateur d'âme</label> <label class="generic-label">Multiplicateur d'âme</label>
<input type="text" class="" name="data.biodata.amemultiplier" value="{{data.biodata.amemultiplier}}" <input type="text" class="" name="system.biodata.amemultiplier" value="{{data.biodata.amemultiplier}}"
data-dtype="Number" /> data-dtype="Number" />
</li> </li>
</ul> </ul>
@ -472,19 +472,19 @@
<ul> <ul>
<li class="flexrow item"> <li class="flexrow item">
<label class="generic-label">Sexe</label> <label class="generic-label">Sexe</label>
<input type="text" class="" name="data.biodata.sex" value="{{data.biodata.sex}}" data-dtype="String" /> <input type="text" class="" name="system.biodata.sex" value="{{data.biodata.sex}}" data-dtype="String" />
</li> </li>
<li class="item flexrow"> <li class="item flexrow">
<label class="generic-label">Age</label> <label class="generic-label">Age</label>
<input type="text" class="" name="data.biodata.age" value="{{data.biodata.age}}" data-dtype="String" /> <input type="text" class="" name="system.biodata.age" value="{{data.biodata.age}}" data-dtype="String" />
</li> </li>
<li class="item flexrow"> <li class="item flexrow">
<label class="generic-label">Taille</label> <label class="generic-label">Taille</label>
<input type="text" class="" name="data.biodata.size" value="{{data.biodata.size}}" data-dtype="String" /> <input type="text" class="" name="system.biodata.size" value="{{data.biodata.size}}" data-dtype="String" />
</li> </li>
<li class="item flexrow"> <li class="item flexrow">
<label class="generic-label">Cheveux</label> <label class="generic-label">Cheveux</label>
<input type="text" class="" name="data.biodata.hair" value="{{data.biodata.hair}}" data-dtype="String" /> <input type="text" class="" name="system.biodata.hair" value="{{data.biodata.hair}}" data-dtype="String" />
</li> </li>
</ul> </ul>
</div> </div>
@ -492,16 +492,16 @@
<div> <div>
<li class="item flexrow"> <li class="item flexrow">
<label class="generic-label">Yeux</label> <label class="generic-label">Yeux</label>
<input type="text" class="" name="data.biodata.eyes" value="{{data.biodata.eyes}}" data-dtype="String" /> <input type="text" class="" name="system.biodata.eyes" value="{{data.biodata.eyes}}" data-dtype="String" />
</li> </li>
<li class="flexrow item"> <li class="flexrow item">
<label class="generic-label">Main préférée</label> <label class="generic-label">Main préférée</label>
<input type="text" class="" name="data.biodata.preferredhand" value="{{data.biodata.preferredhand}}" <input type="text" class="" name="system.biodata.preferredhand" value="{{data.biodata.preferredhand}}"
data-dtype="String" /> data-dtype="String" />
</li> </li>
<li class="flexrow item"> <li class="flexrow item">
<label class="generic-label">Poids</label> <label class="generic-label">Poids</label>
<input type="text" class="" name="data.biodata.weight" value="{{data.biodata.weight}}" <input type="text" class="" name="system.biodata.weight" value="{{data.biodata.weight}}"
data-dtype="String" /> data-dtype="String" />
</li> </li>
</div> </div>
@ -511,7 +511,7 @@
<h3>Description</h3> <h3>Description</h3>
</span> </span>
<div class="medium-editor item-text-long-line"> <div class="medium-editor item-text-long-line">
{{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}}
</div> </div>
</div> </div>

View File

@ -18,7 +18,7 @@
<div> <div>
<ul> <ul>
<li>Arme : {{arme.name}} (+{{arme.data.totalDegats}})</li> <li>Arme : {{arme.name}} (+{{arme.system.totalDegats}})</li>
<li>Dégats : {{finalResult}}</li> <li>Dégats : {{finalResult}}</li>
</ul> </ul>
</div> </div>

View File

@ -36,7 +36,7 @@
{{/if}} {{/if}}
{{#if arme}} {{#if arme}}
<li>Arme : {{arme.name}} (+{{arme.data.bonusmaniementoff}})</li> <li>Arme : {{arme.name}} (+{{arme.system.bonusmaniementoff}})</li>
{{/if}} {{/if}}
<li>Formule : {{diceFormula}}</li> <li>Formule : {{diceFormula}}</li>

View File

@ -1,6 +1,6 @@
{{#if data.isGM}} {{#if data.isGM}}
<h3>GM Notes : </h3> <h3>GM Notes : </h3>
<div class="form-group editor"> <div class="form-group editor">
{{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}}
</div> </div>
{{/if}} {{/if}}

View File

@ -12,7 +12,7 @@
<div class="flexcol"> <div class="flexcol">
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Type d'arme : </label> <label class="generic-label">Type d'arme : </label>
<select class="status-small-label color-class-common" type="text" name="data.typearme" value="{{data.typearme}}" data-dtype="string" > <select class="status-small-label color-class-common" type="text" name="system.typearme" value="{{data.typearme}}" data-dtype="string" >
{{#select data.typearme}} {{#select data.typearme}}
<option value="contact">Arme de contact</option> <option value="contact">Arme de contact</option>
<option value="contactjet">Arme de contact et de Jet</option> <option value="contactjet">Arme de contact et de Jet</option>
@ -23,49 +23,49 @@
</span> </span>
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Bonus de maniement (offensif) : </label> <label class="generic-label">Bonus de maniement (offensif) : </label>
<input type="text" class="padd-right status-small-label color-class-common" name="data.bonusmaniementoff" value="{{data.bonusmaniementoff}}" data-dtype="Number" /> <input type="text" class="padd-right status-small-label color-class-common" name="system.bonusmaniementoff" value="{{data.bonusmaniementoff}}" data-dtype="Number" />
</span> </span>
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Défensive ? </label> <label class="generic-label">Défensive ? </label>
<input class="" type="checkbox" name="data.isdefense" value="{{data.isdefense}}" {{checked data.isdefense}}/> <input class="" type="checkbox" name="system.isdefense" value="{{data.isdefense}}" {{checked data.isdefense}}/>
</span> </span>
{{#if data.isdefense}} {{#if data.isdefense}}
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Bonus de maniement (défensif) : </label> <label class="generic-label">Bonus de maniement (défensif) : </label>
<input type="text" class="padd-right status-small-label color-class-common" name="data.bonusmaniementdef" value="{{data.bonusmaniementdef}}" data-dtype="Number" /> <input type="text" class="padd-right status-small-label color-class-common" name="system.bonusmaniementdef" value="{{data.bonusmaniementdef}}" data-dtype="Number" />
</span> </span>
{{/if}} {{/if}}
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Dégâts : </label> <label class="generic-label">Dégâts : </label>
<input type="text" class="padd-right status-small-label color-class-common" name="data.degats" value="{{data.degats}}" data-dtype="String" /> <input type="text" class="padd-right status-small-label color-class-common" name="system.degats" value="{{data.degats}}" data-dtype="String" />
</span> </span>
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">A deux mains ? </label> <label class="generic-label">A deux mains ? </label>
<input class="" type="checkbox" name="data.deuxmains" value="{{data.deuxmains}}" {{checked data.deuxmains}}/> <input class="" type="checkbox" name="system.deuxmains" value="{{data.deuxmains}}" {{checked data.deuxmains}}/>
</span> </span>
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Portée courte </label> <label class="generic-label">Portée courte </label>
<input type="text" class="padd-right status-small-label color-class-common" name="data.courte" value="{{data.courte}}" data-dtype="Number" /> <input type="text" class="padd-right status-small-label color-class-common" name="system.courte" value="{{data.courte}}" data-dtype="Number" />
</span> </span>
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Portée moyenne </label> <label class="generic-label">Portée moyenne </label>
<input type="text" class="padd-right status-small-label color-class-common" name="data.moyenne" value="{{data.moyenne}}" data-dtype="Number" /> <input type="text" class="padd-right status-small-label color-class-common" name="system.moyenne" value="{{data.moyenne}}" data-dtype="Number" />
</span> </span>
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Portée longue </label> <label class="generic-label">Portée longue </label>
<input type="text" class="padd-right status-small-label color-class-common" name="data.longue" value="{{data.longue}}" data-dtype="Number" /> <input type="text" class="padd-right status-small-label color-class-common" name="system.longue" value="{{data.longue}}" data-dtype="Number" />
</span> </span>
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Temps de rechargement </label> <label class="generic-label">Temps de rechargement </label>
<input type="text" class="padd-right status-small-label color-class-common" name="data.tr" value="{{data.tr}}" data-dtype="Number" /> <input type="text" class="padd-right status-small-label color-class-common" name="system.tr" value="{{data.tr}}" data-dtype="Number" />
</span> </span>
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Rareté </label> <label class="generic-label">Rareté </label>
<input type="text" class="padd-right status-small-label color-class-common" name="data.rarete" value="{{data.rarete}}" data-dtype="Number" /> <input type="text" class="padd-right status-small-label color-class-common" name="system.rarete" value="{{data.rarete}}" data-dtype="Number" />
</span> </span>
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Prix </label> <label class="generic-label">Prix </label>
<input type="text" class="padd-right status-small-label color-class-common" name="data.prix" value="{{data.prix}}" data-dtype="Number" /> <input type="text" class="padd-right status-small-label color-class-common" name="system.prix" value="{{data.prix}}" data-dtype="Number" />
</span> </span>
{{> systems/fvtt-mournblade/templates/partial-item-description.html}} {{> systems/fvtt-mournblade/templates/partial-item-description.html}}

View File

@ -17,7 +17,7 @@
</span> </span>
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Attribut 1 : </label> <label class="generic-label">Attribut 1 : </label>
<select class="status-small-label color-class-common" type="text" name="data.attribut1" <select class="status-small-label color-class-common" type="text" name="system.attribut1"
value="{{data.attribut1}}" data-dtype="string"> value="{{data.attribut1}}" data-dtype="string">
{{#select data.attribut1}} {{#select data.attribut1}}
{{#each attributs as |attrLabel attrKey|}} {{#each attributs as |attrLabel attrKey|}}
@ -28,7 +28,7 @@
</span> </span>
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Attribut 2 : </label> <label class="generic-label">Attribut 2 : </label>
<select class="status-small-label color-class-common" type="text" name="data.attribut2" <select class="status-small-label color-class-common" type="text" name="system.attribut2"
value="{{data.attribut2}}" data-dtype="string"> value="{{data.attribut2}}" data-dtype="string">
<option value="none">Aucun</option> <option value="none">Aucun</option>
{{#select data.attribut2}} {{#select data.attribut2}}
@ -40,7 +40,7 @@
</span> </span>
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Attribut 3 : </label> <label class="generic-label">Attribut 3 : </label>
<select class="status-small-label color-class-common" type="text" name="data.attribut3" <select class="status-small-label color-class-common" type="text" name="system.attribut3"
value="{{data.attribut3}}" data-dtype="string"> value="{{data.attribut3}}" data-dtype="string">
<option value="none">Aucun</option> <option value="none">Aucun</option>
{{#select data.attribut3}} {{#select data.attribut3}}
@ -53,7 +53,7 @@
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Les bonus de Bonne Aventure et d'Eclat peuvent être doublés (cf. Métier) ? </label> <label class="generic-label">Les bonus de Bonne Aventure et d'Eclat peuvent être doublés (cf. Métier) ? </label>
<input class="" type="checkbox" name="data.doublebonus" value="{{data.doublebonus}}" {{checked data.doublebonus}}/> <input class="" type="checkbox" name="system.doublebonus" value="{{data.doublebonus}}" {{checked data.doublebonus}}/>
</span> </span>
<span class="flexrow"> <span class="flexrow">
@ -63,7 +63,7 @@
{{#each data.predilections as |predilection key|}} {{#each data.predilections as |predilection key|}}
<li class="prediction-item item flexrow" data-prediction-index="{{key}}"> <li class="prediction-item item flexrow" data-prediction-index="{{key}}">
<input type="text" class="padd-right color-class-common edit-prediction" <input type="text" class="padd-right color-class-common edit-prediction"
name="data.predilections[{{key}}]" value="{{predilection.name}}" data-dtype="String" /> name="system.predilections[{{key}}]" value="{{predilection.name}}" data-dtype="String" />
<input class="use-prediction" type="checkbox" name="predilection.used" value="{{predilection.used}}" {{checked predilection.used}} /> <input class="use-prediction" type="checkbox" name="predilection.used" value="{{predilection.used}}" {{checked predilection.used}} />
<a class="item-control delete-prediction" title="Supprimer une predilection"><i class="fas fa-trash"></i></a> <a class="item-control delete-prediction" title="Supprimer une predilection"><i class="fas fa-trash"></i></a>
</li> </li>

View File

@ -12,7 +12,7 @@
<div class="flexcol"> <div class="flexcol">
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Allégeance : </label> <label class="generic-label">Allégeance : </label>
<select class="status-small-label color-class-common" type="text" name="data.allegeance" value="{{data.allegeance}}" data-dtype="string" > <select class="status-small-label color-class-common" type="text" name="system.allegeance" value="{{data.allegeance}}" data-dtype="string" >
{{#select data.allegeance}} {{#select data.allegeance}}
<option value="tous">Tous</option> <option value="tous">Tous</option>
<option value="chaos">Chaos</option> <option value="chaos">Chaos</option>
@ -24,7 +24,7 @@
</span> </span>
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Prérequis : </label> <label class="generic-label">Prérequis : </label>
<input type="text" class="padd-right status-small-label color-class-common" name="data.prerequis" value="{{data.prerequis}}" data-dtype="String" /> <input type="text" class="padd-right status-small-label color-class-common" name="system.prerequis" value="{{data.prerequis}}" data-dtype="String" />
</span> </span>
<span> <span>
@ -32,7 +32,7 @@
</span> </span>
<div class="small-editor item-text-long-line"> <div class="small-editor item-text-long-line">
{{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}}
</div> </div>
{{> systems/fvtt-mournblade/templates/partial-item-description.html}} {{> systems/fvtt-mournblade/templates/partial-item-description.html}}

View File

@ -12,11 +12,11 @@
<div class="flexcol"> <div class="flexcol">
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Rareté </label> <label class="generic-label">Rareté </label>
<input type="text" class="padd-right status-small-label color-class-common" name="data.rarete" value="{{data.rarete}}" data-dtype="Number" /> <input type="text" class="padd-right status-small-label color-class-common" name="system.rarete" value="{{data.rarete}}" data-dtype="Number" />
</span> </span>
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Prix </label> <label class="generic-label">Prix </label>
<input type="text" class="padd-right status-small-label color-class-common" name="data.prix" value="{{data.prix}}" data-dtype="Number" /> <input type="text" class="padd-right status-small-label color-class-common" name="system.prix" value="{{data.prix}}" data-dtype="Number" />
</span> </span>
{{> systems/fvtt-mournblade/templates/partial-item-description.html}} {{> systems/fvtt-mournblade/templates/partial-item-description.html}}

View File

@ -12,7 +12,7 @@
<div class="flexcol"> <div class="flexcol">
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Allégeance : </label> <label class="generic-label">Allégeance : </label>
<select class="status-small-label color-class-common" type="text" name="data.allegeance" value="{{data.allegeance}}" data-dtype="string" > <select class="status-small-label color-class-common" type="text" name="system.allegeance" value="{{data.allegeance}}" data-dtype="string" >
{{#select data.allegeance}} {{#select data.allegeance}}
<option value="tous">Tous</option> <option value="tous">Tous</option>
<option value="chaos">Chaos</option> <option value="chaos">Chaos</option>

View File

@ -12,7 +12,7 @@
<div class="flexcol"> <div class="flexcol">
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Compétence : </label> <label class="generic-label">Compétence : </label>
<input type="text" class="padd-right status-small-label color-class-common" name="data.competence" value="{{data.competence}}" data-dtype="String" /> <input type="text" class="padd-right status-small-label color-class-common" name="system.competence" value="{{data.competence}}" data-dtype="String" />
</span> </span>
{{> systems/fvtt-mournblade/templates/partial-item-description.html}} {{> systems/fvtt-mournblade/templates/partial-item-description.html}}

View File

@ -12,7 +12,7 @@
<div class="flexcol"> <div class="flexcol">
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Type de protection : </label> <label class="generic-label">Type de protection : </label>
<select class="status-small-label color-class-common" type="text" name="data.typeprotection" value="{{data.typeprotection}}" data-dtype="string" > <select class="status-small-label color-class-common" type="text" name="system.typeprotection" value="{{data.typeprotection}}" data-dtype="string" >
{{#select data.typearme}} {{#select data.typearme}}
<option value="armure">Armure</option> <option value="armure">Armure</option>
<option value="bouclier">Bouclier</option> <option value="bouclier">Bouclier</option>
@ -21,19 +21,19 @@
</span> </span>
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Protection : </label> <label class="generic-label">Protection : </label>
<input type="text" class="padd-right status-small-label color-class-common" name="data.protection" value="{{data.protection}}" data-dtype="Number" /> <input type="text" class="padd-right status-small-label color-class-common" name="system.protection" value="{{data.protection}}" data-dtype="Number" />
</span> </span>
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Degats : </label> <label class="generic-label">Degats : </label>
<input type="text" class="padd-right status-small-label color-class-common" name="data.degats" value="{{data.degats}}" data-dtype="String" /> <input type="text" class="padd-right status-small-label color-class-common" name="system.degats" value="{{data.degats}}" data-dtype="String" />
</span> </span>
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Rareté </label> <label class="generic-label">Rareté </label>
<input type="text" class="padd-right status-small-label color-class-common" name="data.rarete" value="{{data.rarete}}" data-dtype="Number" /> <input type="text" class="padd-right status-small-label color-class-common" name="system.rarete" value="{{data.rarete}}" data-dtype="Number" />
</span> </span>
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Prix </label> <label class="generic-label">Prix </label>
<input type="text" class="padd-right status-small-label color-class-common" name="data.prix" value="{{data.prix}}" data-dtype="Number" /> <input type="text" class="padd-right status-small-label color-class-common" name="system.prix" value="{{data.prix}}" data-dtype="Number" />
</span> </span>
{{> systems/fvtt-mournblade/templates/partial-item-description.html}} {{> systems/fvtt-mournblade/templates/partial-item-description.html}}

View File

@ -12,23 +12,23 @@
<div class="flexcol"> <div class="flexcol">
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Haut-Parler : </label> <label class="generic-label">Haut-Parler : </label>
<input type="text" class="padd-right status-small-label color-class-common" name="data.formule" value="{{data.formule}}" data-dtype="String" /> <input type="text" class="padd-right status-small-label color-class-common" name="system.formule" value="{{data.formule}}" data-dtype="String" />
</span> </span>
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Seuil de difficulté : </label> <label class="generic-label">Seuil de difficulté : </label>
<input type="text" class="padd-right status-small-label color-class-common" name="data.seuil" value="{{data.seuil}}" data-dtype="Number" /> <input type="text" class="padd-right status-small-label color-class-common" name="system.seuil" value="{{data.seuil}}" data-dtype="Number" />
</span> </span>
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Rune prononcée : </label> <label class="generic-label">Rune prononcée : </label>
</span> </span>
<span class="flexrow"> <span class="flexrow">
<input type="text" class="padd-right status-small-label color-class-common" name="data.prononcee" value="{{data.prononcee}}" data-dtype="String" /> <input type="text" class="padd-right status-small-label color-class-common" name="system.prononcee" value="{{data.prononcee}}" data-dtype="String" />
</span> </span>
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Rune tracée : </label> <label class="generic-label">Rune tracée : </label>
</span> </span>
<span class="flexrow"> <span class="flexrow">
<input type="text" class="padd-right status-small-label color-class-common" name="data.tracee" value="{{data.tracee}}" data-dtype="String" /> <input type="text" class="padd-right status-small-label color-class-common" name="system.tracee" value="{{data.tracee}}" data-dtype="String" />
</span> </span>
{{> systems/fvtt-mournblade/templates/partial-item-description.html}} {{> systems/fvtt-mournblade/templates/partial-item-description.html}}

View File

@ -11,12 +11,12 @@
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Rune </label> <label class="generic-label">Rune </label>
<input type="text" class="padd-right status-small-label color-class-common" name="data.rune" value="{{data.rune}}" data-dtype="String" /> <input type="text" class="padd-right status-small-label color-class-common" name="system.rune" value="{{data.rune}}" data-dtype="String" />
</span> </span>
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Mode </label> <label class="generic-label">Mode </label>
<select class="status-small-label color-class-common" type="text" name="data.mode" <select class="status-small-label color-class-common" type="text" name="system.mode"
value="{{data.mode}}" data-dtype="string"> value="{{data.mode}}" data-dtype="string">
{{@select data.mode}} {{@select data.mode}}
<option value="prononcee">Prononcée</option> <option value="prononcee">Prononcée</option>
@ -27,12 +27,12 @@
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Points d'âme </label> <label class="generic-label">Points d'âme </label>
<input type="text" class="padd-right status-small-label color-class-common" name="data.pointame" value="{{data.pointame}}" data-dtype="Number" /> <input type="text" class="padd-right status-small-label color-class-common" name="system.pointame" value="{{data.pointame}}" data-dtype="Number" />
</span> </span>
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Durée </label> <label class="generic-label">Durée </label>
<input type="text" class="padd-right status-small-label color-class-common" name="data.duree" value="{{data.duree}}" data-dtype="String" /> <input type="text" class="padd-right status-small-label color-class-common" name="system.duree" value="{{data.duree}}" data-dtype="String" />
</span> </span>
<div class="flexcol"> <div class="flexcol">

View File

@ -12,7 +12,7 @@
<div class="flexcol"> <div class="flexcol">
<span class="flexrow"> <span class="flexrow">
<label class="generic-label">Allégeance : </label> <label class="generic-label">Allégeance : </label>
<select class="status-small-label color-class-common" type="text" name="data.allegeance" value="{{data.allegeance}}" data-dtype="string" > <select class="status-small-label color-class-common" type="text" name="system.allegeance" value="{{data.allegeance}}" data-dtype="string" >
{{#select data.allegeance}} {{#select data.allegeance}}
<option value="tous">Tous</option> <option value="tous">Tous</option>
<option value="chaos">Chaos</option> <option value="chaos">Chaos</option>

View File

@ -7,37 +7,11 @@
{{/if}} {{/if}}
<span class="item-field-label-long"><label> <span class="item-field-label-long"><label>
{{equip.data.quantity}} {{equip.system.quantity}}
(<a class="quantity-minus plus-minus-button"> -</a>/<a class="quantity-plus plus-minus-button">+</a>) (<a class="quantity-minus plus-minus-button"> -</a>/<a class="quantity-plus plus-minus-button">+</a>)
</label> </label>
</span> </span>
<span class="item-field-label-medium">
{{#if (count equip.data.effects)}}
{{#if equip.data.activated}}
<a class="equip-deactivate">Deactivate</a>
{{else}}
<a class="equip-activate">Activate</a>
{{/if}}
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<span class="item-field-label-short">
{{#if equip.data.iscontainer}}
{{equip.data.contentsEnc}}
{{else}}
{{mul equip.data.weight equip.data.quantity}}
{{/if}}
</span>
<span class="item-field-label-medium">
{{#if equip.data.idrDice}}
<a class="roll-idr" data-dice-value="{{equip.data.idrDice}}">{{equip.data.idrDice}}</a>
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<div class="item-filler">&nbsp;</div> <div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed"> <div class="item-controls item-controls-fixed">
{{#if (eq level 1)}} {{#if (eq level 1)}}

View File

@ -1,16 +0,0 @@
<li class="item flexrow list-item color-class-{{lower stat.abbrev}} item-stat-roll" data-attr-key="{{key}}">
<span class="stat-icon">
<img class="stat-icon" src="systems/fvtt-pegasus-rpg/images/icons/{{stat.abbrev}}.webp">
</span>
<span class="stat-label stat-margin" name="{{key}}">
<h4 class="stat-text-white stat-margin"><a class="roll-stat stat-margin" data-stat-key="{{key}}">{{stat.abbrev}}</a></h4>
</span>
<select class="status-small-label color-class-common" type="text" name="data.statistics.{{key}}.value" value="{{stat.value}}"
data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select stat.value}}
{{{@root.optionsDiceList}}}
{{/select}}
</select>
<input type="text" class="input-numeric-short padd-right status-small-label color-class-common" name="data.statistics.{{key}}.mod" value="{{stat.mod}}"
data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}} />
</li>

View File

@ -1,70 +0,0 @@
<ul class="status-block">
<li class="item flexrow">
<span class="stat-label status-small-label status-col-name"><label class="status-small-label"><strong>Status</strong></label></span>
<span class="status-header-label status-small-label no-grow"><label class="status-small-label">Cur</label></span>
<span class="status-header-label status-small-label no-grow"><label class="status-small-label">Mod</label></span>
<span class="status-header-label status-small-label no-grow"><label class="status-small-label">Max</label></span>
</li>
{{#each data.secondary as |stat2 key|}}
<li class="item flexrow " data-attr-key="{{key}}">
<span class="stat-label flexrow status-col-name" name="{{key}}">
<label class="status-small-label"><strong>{{stat2.label}}</strong><br>
{{#if (eq key "health")}}
(KOV -{{stat2.max}})
{{/if}}
{{#if (eq key "delirium")}}
(MV -{{stat2.max}})
{{/if}}
</label>
</span>
<input type="text" class="padd-right status-small-label no-grow" name="data.secondary.{{key}}.value" value="{{stat2.value}}" data-dtype="Number"/>
<input type="text" class="padd-right status-small-label no-grow" name="data.secondary.{{key}}.bonus" value="{{stat2.bonus}}" data-dtype="Number"/>
<input type="text" class="padd-right status-small-label no-grow" name="data.secondary.{{key}}.max" value="{{stat2.max}}" data-dtype="Number"/>
</li>
{{/each}}
<li class="item flexrow " data-key="nrg">
<span class="stat-label flexrow status-col-name" name="nrg">
<label class="status-small-label"><strong>{{data.nrg.label}}</strong></label>
</span>
<input type="text" class="padd-right status-small-label no-grow" name="data.nrg.value" value="{{data.nrg.value}}" data-dtype="Number"/>
<input type="text" class="padd-right status-small-label no-grow" name="data.nrg.mod" value="{{data.nrg.mod}}" data-dtype="Number"/>
<input type="text" class="padd-right status-small-label no-grow" name="data.nrg.max" value="{{data.nrg.max}}" data-dtype="Number"/>
<span class="small-label status-small-label"> /{{data.nrg.absolutemax}}</span>
</li>
<li class="item flexrow " data-key="nrg">
<span class="stat-label flexrow status-col-name" name="activated-nrg">
<label class="status-small-label"><strong>Activated NRG</strong><br>
</span>
<span class="stat-label flexrow status-col-name" name="activated-nrg">
<input type="text" class="padd-right status-small-label no-grow" name="data.nrg.activated" value="{{data.nrg.activated}}" data-dtype="Number"/>
</span>
<!--<span class="stat-label flexrow status-col-name" name="momentum">
<label class="status-small-label flexrow"><strong>
<a class="stat-icon lock-unlock-sheet">{{#if editScore}}Lock{{else}}Unlock{{/if}}</a>
</strong></label>-->
</span>
</li>
<li class="item flexrow " data-key="momentum">
<span class="stat-label flexrow status-col-name" name="momentum">
<label class="status-small-label"><strong>Momentum</strong></label>
</span>
<input type="text" class="padd-right status-small-label no-grow" name="data.momentum.value" value="{{data.momentum.value}}" data-dtype="Number"/>
<input type="text" class="padd-right status-small-label no-grow" name="data.momentum.max" value="{{data.momentum.max}}" data-dtype="Number"/>
<span>
<a class="momentum-plus plus-minus-button">+</a>
<a class="momentum-minus plus-minus-button">-</a>
</span>
</li>
<!--<li class="item flexrow list-item" data-key="lock-unlock">
<span class="stat-label flexrow status-col-name" name="momentum">
<a class="stat-icon lock-unlock-sheet"><img class="small-button-container"
src="systems/fvtt-pegasus-rpg/images/icons/{{#if editStatSkill}}unlocked.svg{{else}}locked.svg{{/if}}" alt="lock/unlock"
></a>
</span>-->
</li>
</ul>
<!-- <span class="small-label padd-right packed-left">Act</span>
<input type="text" class="padd-right" name="data.nrg.activated" value="{{data.nrg.activated}}" data-dtype="Number"/>
-->

View File

@ -2,5 +2,5 @@
<h3>Description</h3> <h3>Description</h3>
</span> </span>
<div class="medium-editor item-text-long-line"> <div class="medium-editor item-text-long-line">
{{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}}
</div> </div>

View File

@ -4,5 +4,5 @@
<img class="chat-img" src="{{img}}" title="{{name}}" /> <img class="chat-img" src="{{img}}" title="{{name}}" />
{{/if}} {{/if}}
<h4><b>Description : </b></h4> <h4><b>Description : </b></h4>
<p class="card-content">{{{data.description}}}</p> <p class="card-content">{{{system.description}}}</p>
</div> </div>

View File

@ -27,14 +27,14 @@
{{#if competence}} {{#if competence}}
<div class="flexrow"> <div class="flexrow">
<span class="roll-dialog-label">{{competence.name}}</span> <span class="roll-dialog-label">{{competence.name}}</span>
<span class="small-label">{{competence.data.niveau}}</span> <span class="small-label">{{competence.system.niveau}}</span>
</div> </div>
{{/if}} {{/if}}
{{#if rune}} {{#if rune}}
<div class="flexrow"> <div class="flexrow">
<span class="roll-dialog-label">{{rune.name}}</span> <span class="roll-dialog-label">{{rune.name}}</span>
<span class="small-label">{{rune.data.formule}}</span> <span class="small-label">{{rune.system.formule}}</span>
</div> </div>
<div class="flexrow"> <div class="flexrow">
<span class="roll-dialog-label">Lancement</span> <span class="roll-dialog-label">Lancement</span>