First v10 migration

This commit is contained in:
sladecraven 2022-09-21 11:42:09 +02:00
parent a613571d7e
commit aee6b2feae
37 changed files with 295 additions and 307 deletions

View File

@ -24,7 +24,7 @@ export class YggdrasillActorSheet extends ActorSheet {
/* -------------------------------------------- */
getData() {
const objectData = YggdrasillUtility.data(this.object);
const objectData = duplicate(this.object)
let formData = {
title: this.title,
@ -34,7 +34,7 @@ export class YggdrasillActorSheet extends ActorSheet {
name: objectData.name,
editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked",
data: foundry.utils.deepClone(YggdrasillUtility.templateData(this.object)),
data: foundry.utils.deepClone(objectData.system),
effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)),
limited: this.object.limited,
isEpuise: this.actor.isEpuise(),

View File

@ -175,15 +175,15 @@ export class YggdrasillActor extends Actor {
async prepareData() {
if ( this.type == "personnage") {
this.computeCaracSecondaire();
if (this.data.data.furor.value == 0)
if (this.system.furor.value == 0)
await this.setEpuise();
else
await this.cleanEpuise();
if ( this.data.data.caracsecondaire.pv.value < (this.data.data.caracsecondaire.pv.max/4) )
if ( this.system.caracsecondaire.pv.value < (this.system.caracsecondaire.pv.max/4) )
await this.setMeurtri();
else
await this.cleanMeurtri();
if ( this.data.data.caracsecondaire.pv.value < (this.data.data.caracsecondaire.pv.max/2) )
if ( this.system.caracsecondaire.pv.value < (this.system.caracsecondaire.pv.max/2) )
await this.setBlesse();
else
await this.cleanBlesse();
@ -196,21 +196,21 @@ export class YggdrasillActor extends Actor {
if ( changed.data?.caracsecondaire?.pv?.value ) {
if ( changed.data.caracsecondaire.pv.value < 0 )
changed.data.caracsecondaire.pv.value = 0;
if ( changed.data.caracsecondaire.pv.value > this.data.data.caracsecondaire.pv.max )
changed.data.caracsecondaire.pv.value = this.data.data.caracsecondaire.pv.max;
if ( changed.data.caracsecondaire.pv.value > this.system.caracsecondaire.pv.max )
changed.data.caracsecondaire.pv.value = this.system.caracsecondaire.pv.max;
}
if ( changed.data?.furor?.value ) {
if ( changed.data.furor.value < 0 )
changed.data.furor.value = 0;
if ( changed.data.furor.value > this.data.data.furor.max )
changed.data.furor.value = this.data.data.furor.max;
if ( changed.data.furor.value > this.system.furor.max )
changed.data.furor.value = this.system.furor.max;
}
super._preUpdate(changed, options, user);
}
/* -------------------------------------------- */
getCompetences() {
let comp = this.data.items.filter( item => item.type == 'competence');
let comp = this.items.filter( item => item.type == 'competence');
return comp;
}
/* -------------------------------------------- */
@ -226,95 +226,95 @@ export class YggdrasillActor extends Actor {
/* -------------------------------------------- */
getInitiativeScore() {
if ( this.type == 'personnage') {
return this.data.data.caracsecondaire.reaction.max;
return this.system.caracsecondaire.reaction.max;
} else {
return this.data.data.attributs.physique.values.defaut.value;
return this.system.attributs.physique.values.defaut.value;
}
}
/* -------------------------------------------- */
getCompetencesGenerales() {
let comp = this.data.items.filter( item => item.type == 'competence' && item.data.data.categorie == 'generale');
let comp = this.items.filter( item => item.type == 'competence' && item.system.categorie == 'generale');
return comp.sort( this.compareName );
}
/* -------------------------------------------- */
getCompetencesMartiales() {
let comp = this.data.items.filter( item => item.type == 'competence' && item.data.data.categorie == 'martiale');
let comp = this.items.filter( item => item.type == 'competence' && item.system.categorie == 'martiale');
return comp.sort( this.compareName );
}
/* -------------------------------------------- */
getCompetencesMagiques() {
let comp = this.data.items.filter( item => item.type == 'competence' && item.data.data.categorie == 'magique');
let comp = this.items.filter( item => item.type == 'competence' && item.system.categorie == 'magique');
return comp.sort( this.compareName );
}
/* -------------------------------------------- */
getDons( ) {
let dons = this.data.items.filter( item => item.type == 'don');
let dons = this.items.filter( item => item.type == 'don');
return dons.sort( this.compareName );
}
/* -------------------------------------------- */
getEffetsMagiques( ) {
let effets = this.data.items.filter( item => item.type == 'effetmagique');
let effets = this.items.filter( item => item.type == 'effetmagique');
return effets.sort( this.compareName );
}
/* -------------------------------------------- */
getEffetsDeRunes( ) {
let effets = this.data.items.filter( item => item.type == 'effetderune');
let effets = this.items.filter( item => item.type == 'effetderune');
return effets.sort( this.compareName );
}
/* -------------------------------------------- */
getMonnaies( ) {
let monnaies = this.data.items.filter( item => item.type == 'monnaie');
let monnaies = this.items.filter( item => item.type == 'monnaie');
return monnaies.sort( this.compareName );
}
/* -------------------------------------------- */
getFaiblesses( ) {
let faib = this.data.items.filter( item => item.type == 'faiblesse');
let faib = this.items.filter( item => item.type == 'faiblesse');
return faib.sort( this.compareName );
}
/* -------------------------------------------- */
getBlessures( ) {
return this.data.items.filter( item => item.type == 'blessure');
return this.items.filter( item => item.type == 'blessure');
}
/* -------------------------------------------- */
getToutEquipements() {
return this.data.items.filter( item => item.type == 'equipement' || item.type == 'armure' || item.type == 'armecc' || item.type == 'armedist' || item.type == 'bouclier');
return this.items.filter( item => item.type == 'equipement' || item.type == 'armure' || item.type == 'armecc' || item.type == 'armedist' || item.type == 'bouclier');
}
/* -------------------------------------------- */
getArmes() {
return this.data.items.filter( item => (item.type == 'armecc' || item.type == 'armedist') && item.data.data.equipe );
return this.items.filter( item => (item.type == 'armecc' || item.type == 'armedist') && item.system.equipe );
}
/* -------------------------------------------- */
getArmures() {
return this.data.items.filter( item => item.type == 'armure' && item.data.data.equipe );
return this.items.filter( item => item.type == 'armure' && item.system.equipe );
}
getBoucliers() {
return this.data.items.filter( item => item.type == 'bouclier' && item.data.data.equipe );
return this.items.filter( item => item.type == 'bouclier' && item.system.equipe );
}
getProuessesMartiales() {
let prouesse = this.data.items.filter( item => item.type == 'prouesse' );
let prouesse = this.items.filter( item => item.type == 'prouesse' );
return prouesse.sort( this.compareName );
}
getSortsSejdr() {
let sort = this.data.items.filter( item => item.type == 'sortsejdr' );
let sort = this.items.filter( item => item.type == 'sortsejdr' );
return sort.sort( this.compareName );
}
getSortsGaldr() {
let sort = this.data.items.filter( item => item.type == 'sortgaldr' );
let sort = this.items.filter( item => item.type == 'sortgaldr' );
return sort.sort( this.compareName );
}
getRunes() {
let sort = this.data.items.filter( item => item.type == 'rune' );
let sort = this.items.filter( item => item.type == 'rune' );
return sort.sort( this.compareName );
}
/* -------------------------------------------- */
async setEpuise( ) {
if (!this.data.data.status.epuise) {
await this.update({ 'data.status.epuise': true});
this.data.data.status.epuise = true;
if (!this.system.status.epuise) {
await this.update({ 'system.status.epuise': true});
this.system.status.epuise = true;
}
/*let effect = this.getEffectByLabel('Epuisé');
if ( !effect ) {
@ -324,9 +324,9 @@ export class YggdrasillActor extends Actor {
}
/* -------------------------------------------- */
async cleanEpuise() {
if (this.data.data.status.epuise) {
await this.update({ 'data.status.epuise': false});
this.data.data.status.epuise = false;
if (this.system.status.epuise) {
await this.update({ 'system.status.epuise': false});
this.system.status.epuise = false;
}
/*let effect = this.getEffectByLabel('Epuisé');
if ( effect ) {
@ -335,7 +335,7 @@ export class YggdrasillActor extends Actor {
}
/* -------------------------------------------- */
async toggleEpuise( ) {
if ( this.data.data.status.epuise ) {
if ( this.system.status.epuise ) {
await this.cleanEpuise();
} else {
await this.setEpuise();
@ -343,14 +343,14 @@ export class YggdrasillActor extends Actor {
}
/* -------------------------------------------- */
isEpuise() {
return this.data.data.status.epuise;
return this.system.status.epuise;
}
/* -------------------------------------------- */
async setBlesse( ) {
if (!this.data.data.status.blesse) {
await this.update({ 'data.status.blesse': true} );
this.data.data.status.blesse = true;
if (!this.system.status.blesse) {
await this.update({ 'system.status.blesse': true} );
this.system.status.blesse = true;
}
/*let effect = this.getEffectByLabel('Blessé');
if ( !effect ) {
@ -360,9 +360,9 @@ export class YggdrasillActor extends Actor {
}
/* -------------------------------------------- */
async cleanBlesse() {
if (this.data.data.status.blesse) {
await this.update({ 'data.status.blesse': false} );
this.data.data.status.blesse = false;
if (this.system.status.blesse) {
await this.update({ 'system.status.blesse': false} );
this.system.status.blesse = false;
}
/*let effect = this.getEffectByLabel('Blessé');
if ( effect ) {
@ -372,37 +372,37 @@ export class YggdrasillActor extends Actor {
/* -------------------------------------------- */
isBlesse() {
return this.data.data.status.blesse;
return this.system.status.blesse;
//return this.getEffectByLabel('Blessé');
}
/* -------------------------------------------- */
async setMeurtri( ) {
await this.setBlesse();
if (!this.data.data.status.meurtri) {
await this.update({ 'data.status.meurtri': true});
this.data.data.status.meurtri = true;
if (!this.system.status.meurtri) {
await this.update({ 'system.status.meurtri': true});
this.system.status.meurtri = true;
}
}
/* -------------------------------------------- */
async cleanMeurtri() {
if (this.data.data.status.meurtri) {
await this.update({ 'data.status.meurtri': false});
this.data.data.status.meurtri = false;
if (this.system.status.meurtri) {
await this.update({ 'system.status.meurtri': false});
this.system.status.meurtri = false;
}
}
/* -------------------------------------------- */
isMeurtri() {
return this.data.data.status.meurtri;
return this.system.status.meurtri;
}
/* -------------------------------------------- */
async decrementFuror( nbFuror) {
await this.update( { 'data.furor.value': this.data.data.furor.value - nbFuror } );
await this.update( { 'system.furor.value': this.system.furor.value - nbFuror } );
}
/* -------------------------------------------- */
getCurrentFuror() {
return this.data.data.furor.value;
return this.system.furor.value;
}
/* -------------------------------------------- */
@ -421,8 +421,8 @@ export class YggdrasillActor extends Actor {
/* -------------------------------------------- */
getCarac( caracName ) {
for( let key in this.data.data.carac) {
let categ = this.data.data.carac[key];
for( let key in this.system.carac) {
let categ = this.system.carac[key];
for( let carac in categ.carac) {
if (carac.toLowerCase() == caracName.toLowerCase() ) {
return deepClone(categ.carac[carac]);
@ -434,50 +434,50 @@ export class YggdrasillActor extends Actor {
/* -------------------------------------------- */
computeCaracSecondaire( ) {
if ( this.type == "personnage") {
let basecorps = this.data.data.carac.corps.carac;
let basecorps = this.system.carac.corps.carac;
let sumcorps = basecorps.puissance.value + basecorps.agilite.value + basecorps.vigueur.value
let baseesprit = this.data.data.carac.esprit.carac;
let baseesprit = this.system.carac.esprit.carac;
let sumesprit = baseesprit.intellect.value + baseesprit.perception.value + baseesprit.tenacite.value
let baseame = this.data.data.carac.ame.carac;
let baseame = this.system.carac.ame.carac;
let sumame = baseame.charisme.value + baseame.communication.value + baseame.instinct.value
let newPV = (sumcorps*3) + (sumesprit *2) + sumame;
if ( newPV != this.data.data.caracsecondaire.pv.max) {
this.data.data.caracsecondaire.pv.max = newPV;
this.update( { 'data.caracsecondaire.pv.max': newPV });
if ( newPV != this.system.caracsecondaire.pv.max) {
this.system.caracsecondaire.pv.max = newPV;
this.update( { 'system.caracsecondaire.pv.max': newPV });
}
this.data.data.caracsecondaire.reaction.value = baseesprit.intellect.value + baseesprit.perception.value + baseame.instinct.value;
this.data.data.caracsecondaire.reaction.max = baseesprit.intellect.value + baseesprit.perception.value + baseame.instinct.value;
this.system.caracsecondaire.reaction.value = baseesprit.intellect.value + baseesprit.perception.value + baseame.instinct.value;
this.system.caracsecondaire.reaction.max = baseesprit.intellect.value + baseesprit.perception.value + baseame.instinct.value;
this.data.data.caracsecondaire.defensephy.value = basecorps.agilite.value + basecorps.vigueur.value + baseame.instinct.value;
this.data.data.caracsecondaire.defensephy.max = basecorps.agilite.value + basecorps.vigueur.value + baseame.instinct.value;
this.system.caracsecondaire.defensephy.value = basecorps.agilite.value + basecorps.vigueur.value + baseame.instinct.value;
this.system.caracsecondaire.defensephy.max = basecorps.agilite.value + basecorps.vigueur.value + baseame.instinct.value;
this.data.data.caracsecondaire.defensemen.value = baseesprit.tenacite.value + baseame.instinct.value + baseesprit.intellect.value;
this.data.data.caracsecondaire.defensemen.max = baseesprit.tenacite.value + baseame.instinct.value + baseesprit.intellect.value;
this.system.caracsecondaire.defensemen.value = baseesprit.tenacite.value + baseame.instinct.value + baseesprit.intellect.value;
this.system.caracsecondaire.defensemen.max = baseesprit.tenacite.value + baseame.instinct.value + baseesprit.intellect.value;
this.data.data.caracsecondaire.deplacement.value = basecorps.agilite.value + basecorps.vigueur.value;
this.data.data.caracsecondaire.deplacement.max = basecorps.agilite.value + basecorps.vigueur.value;
this.system.caracsecondaire.deplacement.value = basecorps.agilite.value + basecorps.vigueur.value;
this.system.caracsecondaire.deplacement.max = basecorps.agilite.value + basecorps.vigueur.value;
this.data.data.caracsecondaire.capaenc.value = (basecorps.puissance.value * 2) + basecorps.vigueur.value;
this.data.data.caracsecondaire.capaenc.max = (basecorps.puissance.value * 2) + basecorps.vigueur.value;
this.system.caracsecondaire.capaenc.value = (basecorps.puissance.value * 2) + basecorps.vigueur.value;
this.system.caracsecondaire.capaenc.max = (basecorps.puissance.value * 2) + basecorps.vigueur.value;
}
}
/* -------------------------------------------- */
async equiperObject( equipementId ) {
let item = this.data.items.find( item => item.id == equipementId );
if (item && item.data.data) {
let update = { _id: item.id, "data.equipe": !item.data.data.equipe };
let item = this.items.find( item => item.id == equipementId );
if (item && item.system) {
let update = { _id: item.id, "data.equipe": !item.system.equipe };
await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity
}
}
/* -------------------------------------------- */
async updateCompetence( compId, niveau) {
let comp = this.data.items.find( item => item.type == 'competence' && item.id == compId);
let comp = this.items.find( item => item.type == 'competence' && item.id == compId);
console.log("Comp updated!!!!", compId, niveau);
if (comp) {
const update = { _id: comp.id, 'data.niveau': niveau };
const update = { _id: comp.id, 'system.niveau': niveau };
await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity
} else {
ui.notifications.warn("Compétence inconnue", compId)
@ -491,9 +491,9 @@ export class YggdrasillActor extends Actor {
/* -------------------------------------------- */
async rollAttribute( attrkey, subAttrKey = 'defaut') {
let attr = duplicate(this.data.data.attributs[attrkey]);
let attr = duplicate(this.system.attributs[attrkey]);
console.log("ATTR : ", attr, attrkey, subAttrKey);
let subAttr = duplicate(this.data.data.attributs[attrkey].values[subAttrKey] );
let subAttr = duplicate(this.system.attributs[attrkey].values[subAttrKey] );
if ( attr ) {
subAttr.label = subAttr.label || "";
let title = `Attribut : ${attr.label} ${subAttr.label} : ${subAttr.value}`;
@ -503,11 +503,11 @@ export class YggdrasillActor extends Actor {
actorImg: this.img,
actorId: this.id,
attr: attr,
valuePhysique: this.data.data.attributs["physique"].values["defaut"].value,
valuePhysique: this.system.attributs["physique"].values["defaut"].value,
subAttr: subAttr,
rollMode: game.settings.get("core", "rollMode"),
title: title,
isBlesse: this.data.data.etat.etat == "blesse",
isBlesse: this.system.etat.etat == "blesse",
optionsBonusMalus: YggdrasillUtility.buildListOptions(-15, +15),
bonusMalus: 0,
bonusdefense: 0,
@ -525,8 +525,8 @@ export class YggdrasillActor extends Actor {
/* -------------------------------------------- */
async rollCarac( categName, caracName) {
let carac = duplicate(this.data.data.carac[categName].carac[caracName]);
console.log("CARAC : ", carac, this.data.data.carac);
let carac = duplicate(this.system.carac[categName].carac[caracName]);
console.log("CARAC : ", carac, this.system.carac);
if ( carac) {
let rollData = {
mode: "carac",
@ -559,7 +559,7 @@ export class YggdrasillActor extends Actor {
/* -------------------------------------------- */
async rollCompetence( competenceId ) {
let competence = this.data.items.find( item => item.type == 'competence' && item.id == competenceId);
let competence = this.items.find( item => item.type == 'competence' && item.id == competenceId);
if ( competence) {
let rollData = {
mode: "competence",
@ -568,7 +568,7 @@ export class YggdrasillActor extends Actor {
actorId: this.id,
img: competence.img,
rollMode: game.settings.get("core", "rollMode"),
title: `Compétence ${competence.name} : ${competence.data.data.niveau}`,
title: `Compétence ${competence.name} : ${competence.system.niveau}`,
competence: duplicate(competence),
isEpuise: this.isEpuise(),
isBlesse: this.isBlesse(),
@ -593,18 +593,18 @@ export class YggdrasillActor extends Actor {
let attackData = duplicate(attackMode[mode]);
if ( attackData){
attackData.mode = mode;
attackData.carac = duplicate(this.data.data.carac[attackData.categName].carac[attackData.caracName]);
attackData.carac = duplicate(this.system.carac[attackData.categName].carac[attackData.caracName]);
if ( attackData.malus != 0) {
let malusTab = attackData.malus.split(';');
attackData.malus = this.data.data.carac[attackData.categName].carac[malusTab[0]].value * Number(malusTab[1])
attackData.malus = this.system.carac[attackData.categName].carac[malusTab[0]].value * Number(malusTab[1])
}
if ( attackData.protection != 0) {
let malusTab = attackData.protection.split(';');
attackData.protection = this.data.data.carac[attackData.categName].carac[malusTab[0]].value * Number(malusTab[1])
attackData.protection = this.system.carac[attackData.categName].carac[malusTab[0]].value * Number(malusTab[1])
}
if ( attackData.bonusdegats != 0) {
let malusTab = attackData.bonusdegats.split(';');
attackData.bonusdegats = this.data.data.carac[attackData.categName].carac[malusTab[0]].value * Number(malusTab[1])
attackData.bonusdegats = this.system.carac[attackData.categName].carac[malusTab[0]].value * Number(malusTab[1])
}
}
return attackData;
@ -615,18 +615,18 @@ export class YggdrasillActor extends Actor {
let attackData = duplicate( tirMode[mode] );
if ( attackData){
attackData.mode = mode;
attackData.carac = duplicate(this.data.data.carac[attackData.categName].carac[attackData.caracName]);
attackData.carac = duplicate(this.system.carac[attackData.categName].carac[attackData.caracName]);
if ( attackData.malus != 0) {
let malusTab = attackData.malus.split(';');
attackData.malus = this.data.data.carac[attackData.categName].carac[malusTab[0]].value * Number(malusTab[1])
attackData.malus = this.system.carac[attackData.categName].carac[malusTab[0]].value * Number(malusTab[1])
}
if ( attackData.protection != 0) {
let malusTab = attackData.protection.split(';');
attackData.protection = this.data.data.carac[attackData.categName].carac[malusTab[0]].value * Number(malusTab[1])
attackData.protection = this.system.carac[attackData.categName].carac[malusTab[0]].value * Number(malusTab[1])
}
if ( attackData.bonusdegats != 0) {
let malusTab = attackData.bonusdegats.split(';');
attackData.bonusdegats = this.data.data.carac[attackData.categName].carac[malusTab[0]].value * Number(malusTab[1])
attackData.bonusdegats = this.system.carac[attackData.categName].carac[malusTab[0]].value * Number(malusTab[1])
}
}
return attackData;
@ -634,17 +634,17 @@ export class YggdrasillActor extends Actor {
/* -------------------------------------------- */
async rollSort( sortId, magie) {
let sort = this.data.items.find( item => item.id == sortId);
let competence = this.data.items.find( item => item.type == 'competence' && item.name.toLowerCase().includes(magie));
let sort = this.items.find( item => item.id == sortId);
let competence = this.items.find( item => item.type == 'competence' && item.name.toLowerCase().includes(magie));
console.log("SORT :", sortId, sort, competence );
let carac;
if ( magie == "sejdr") {
carac = duplicate(this.data.data.carac.ame.carac.instinct);
carac = duplicate(this.system.carac.ame.carac.instinct);
} else if ( magie == "rune") {
carac = duplicate(this.data.data.carac.ame.carac.communication);
carac = duplicate(this.system.carac.ame.carac.communication);
} else {
carac = duplicate(this.data.data.carac.ame.carac.charisme);
carac = duplicate(this.system.carac.ame.carac.charisme);
}
if ( sort && competence) {
@ -659,8 +659,8 @@ export class YggdrasillActor extends Actor {
rollMode: game.settings.get("core", "rollMode"),
title: magie + " - " + sort.name,
selectedCarac: carac,
agiliteCarac: duplicate(this.data.data.carac.corps.carac.agilite),
instinctCarac: duplicate(this.data.data.carac.ame.carac.instinct),
agiliteCarac: duplicate(this.system.carac.corps.carac.agilite),
instinctCarac: duplicate(this.system.carac.ame.carac.instinct),
sort: duplicate(sort),
competence: duplicate(competence),
dureeGaldr: "1d5a",
@ -691,9 +691,9 @@ export class YggdrasillActor extends Actor {
/* -------------------------------------------- */
async rollArme( armeId ) {
let arme = this.data.items.find( item => item.id == armeId);
let compName = armeCategorieToCompetence[arme.data.data.categorie];
let competence = this.data.items.find( item => item.type == 'competence' && item.name == compName);
let arme = this.items.find( item => item.id == armeId);
let compName = armeCategorieToCompetence[arme.system.categorie];
let competence = this.items.find( item => item.type == 'competence' && item.name == compName);
console.log("ARME :", armeId, arme, competence );
if ( arme && competence) {
@ -714,7 +714,7 @@ export class YggdrasillActor extends Actor {
img: competence.img,
rollMode: game.settings.get("core", "rollMode"),
title: "Attaque !",
selectedCarac: duplicate(this.data.data.carac.corps.carac.agilite),
selectedCarac: duplicate(this.system.carac.corps.carac.agilite),
arme: duplicate(arme),
competence: duplicate(competence),
bonusdefense: 0,
@ -740,16 +740,16 @@ export class YggdrasillActor extends Actor {
/* -------------------------------------------- */
getEncTotal( ) {
let encTotal = 0;
for( let item of this.data.items) {
for( let item of this.items) {
if (item.type == "equipement" || item.type == "armecc"
|| item.type == "armedist" || item.type == "armure" || item.type == "monnaie" || item.type == "bouclier") {
encTotal += (item.data.data.enc * item.data.data.quantite);
encTotal += (item.system.enc * item.system.quantite);
}
}
for( let item of this.data.items) {
if (item.type == "bouclier" && item.data.data.equipe) {
encTotal -= (item.data.data.enc * item.data.data.quantite);
encTotal += (item.data.data.enccomb * item.data.data.quantite);
for( let item of this.items) {
if (item.type == "bouclier" && item.system.equipe) {
encTotal -= (item.system.enc * item.system.quantite);
encTotal += (item.system.enccomb * item.system.quantite);
}
}
return encTotal;
@ -758,9 +758,9 @@ export class YggdrasillActor extends Actor {
/* -------------------------------------------- */
getProtectionTotal( ) {
let protectionTotal = 0;
for( let item of this.data.items) {
if (item.type == "armure" && item.data.data.equipe) {
protectionTotal += Number(item.data.data.protection);
for( let item of this.items) {
if (item.type == "armure" && item.system.equipe) {
protectionTotal += Number(item.system.protection);
}
}
return protectionTotal;
@ -768,9 +768,9 @@ export class YggdrasillActor extends Actor {
/* -------------------------------------------- */
getDpBouclier( ) {
let dpBouclier = 0;
for( let item of this.data.items) {
if (item.type == "bouclier" && item.data.data.equipe) {
dpBouclier += Number(item.data.data.defensebonus);
for( let item of this.items) {
if (item.type == "bouclier" && item.system.equipe) {
dpBouclier += Number(item.system.defensebonus);
}
}
return dpBouclier;
@ -778,20 +778,20 @@ export class YggdrasillActor extends Actor {
/* -------------------------------------------- */
async incrementeQuantite( objetId ) {
let objetQ = this.data.items.find( item => item.id == objetId );
let objetQ = this.items.find( item => item.id == objetId );
if (objetQ) {
let newQ = objetQ.data.data.quantite + 1;
const updated = await this.updateEmbeddedDocuments('Item', [{ _id: objetQ.id, 'data.quantite': newQ }]); // pdates one EmbeddedEntity
let newQ = objetQ.system.quantite + 1;
const updated = await this.updateEmbeddedDocuments('Item', [{ _id: objetQ.id, 'system.quantite': newQ }]); // pdates one EmbeddedEntity
}
}
/* -------------------------------------------- */
async decrementeQuantite( objetId ) {
let objetQ = this.data.items.find( item => item.id == objetId );
let objetQ = this.items.find( item => item.id == objetId );
if (objetQ) {
let newQ = objetQ.data.data.quantite - 1;
let newQ = objetQ.system.quantite - 1;
newQ = (newQ <= 0) ? 0 : newQ;
const updated = await this.updateEmbeddedDocuments('Item', [{ _id: objetQ.id, 'data.quantite': newQ }]); // pdates one EmbeddedEntity
const updated = await this.updateEmbeddedDocuments('Item', [{ _id: objetQ.id, 'system.quantite': newQ }]); // pdates one EmbeddedEntity
}
}

View File

@ -24,7 +24,7 @@ export class YggdrasillFigurantSheet extends ActorSheet {
/* -------------------------------------------- */
getData() {
const objectData = YggdrasillUtility.data(this.object);
const objectData = duplicate(this.object)
let formData = {
title: this.title,
@ -34,7 +34,7 @@ export class YggdrasillFigurantSheet extends ActorSheet {
name: objectData.name,
editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked",
data: foundry.utils.deepClone(YggdrasillUtility.templateData(this.object)),
data: foundry.utils.deepClone(this.object.system),
limited: this.object.limited,
equipements: this.actor.getToutEquipements(),
effetsmagiques: this.actor.getEffetsMagiques(),

View File

@ -43,7 +43,7 @@ export class YggdrasillItemSheet extends ItemSheet {
/* -------------------------------------------- */
async getData() {
const objectData = YggdrasillUtility.data(this.object);
const objectData = duplicate(this.object);
let formData = {
title: this.title,
@ -53,7 +53,7 @@ export class YggdrasillItemSheet extends ItemSheet {
name: objectData.name,
editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked",
data: foundry.utils.deepClone(YggdrasillUtility.templateData(this.object)),
data: foundry.utils.deepClone(this.object.system),
optionsBase: YggdrasillUtility.createDirectOptionList(0, 20),
optionsNiveaux4: YggdrasillUtility.buildListOptions(1, 5),
limited: this.object.limited,

View File

@ -82,6 +82,7 @@ function registerUsageCount( registerKey ) {
name: "Unique world key",
scope: "world",
config: false,
default: "",
type: String
});
@ -90,7 +91,7 @@ function registerUsageCount( registerKey ) {
worldKey = randomID(32)
game.settings.set(registerKey, "world-key", worldKey )
}
let regURL = `https://www.uberwald.me/fvtt_appcount/count.php?name="${registerKey}"&worldKey="${worldKey}"&version="${game.release.generation}.${game.release.build}"&system="${game.system.id}"&systemversion="${game.system.data.version}"`
let regURL = `https://www.uberwald.me/fvtt_appcount/count.php?name="${registerKey}"&worldKey="${worldKey}"&version="${game.release.generation}.${game.release.build}"&system="${game.system.id}"&systemversion="${game.system.version}"`
$.ajax(regURL)
/* -------------------------------------------- */
}

View File

@ -73,12 +73,12 @@ export class YggdrasillRoll extends Dialog {
updateGaldrSR( ) {
let sdDuree = Number(dureeGaldrSD[this.rollData.dureeGaldr]);
let sdVar = 0;
if ( this.rollData.sort.data.voie == "illusion") {
if ( this.rollData.sort.system.voie == "illusion") {
sdVar = Number(zonesciblesGaldrSD[this.rollData.zoneGaldr]);
} else {
sdVar = Number(ciblesGaldrSD[this.rollData.nbCibles]);
}
let SR = Number(this.rollData.sort.data.sd) + sdDuree + sdVar;
let SR = Number(this.rollData.sort.system.sd) + sdDuree + sdVar;
$("#srTotal").text(SR);
this.rollData.sr = SR;
}
@ -113,10 +113,10 @@ export class YggdrasillRoll extends Dialog {
this.rollData.echelleDuree = "Jours";
this.rollData.echelleDureeVie = "Années"
}
let SR = this.rollData.puissanceRune + (Number(this.rollData.sort.data.niveau)*3) + support;
let SR = this.rollData.puissanceRune + (Number(this.rollData.sort.system.niveau)*3) + support;
$("#srTotal").text(SR);
$("#runeDuree").text( this.rollData.dureeRune + " " + this.rollData.echelleDuree);
$("#runeDureeVie").text( this.rollData.competence.data.niveau + " " + this.rollData.echelleDureeVie);
$("#runeDureeVie").text( this.rollData.competence.system.niveau + " " + this.rollData.echelleDureeVie);
this.rollData.sr = SR;
}

View File

@ -20,19 +20,6 @@ export class YggdrasillUtility {
return loadTemplates(templatePaths);
}
/* -------------------------------------------- */
static templateData(it) {
return YggdrasillUtility.data(it)?.data ?? {}
}
/* -------------------------------------------- */
static data(it) {
if (it instanceof Actor || it instanceof Item || it instanceof Combatant) {
return it.data;
}
return it;
}
/* -------------------------------------------- */
static createDirectSortedOptionList( min, max) {
let options = [];
@ -205,7 +192,7 @@ export class YggdrasillUtility {
// Select niveau de competence/arme/carac
if ( rollData.mode != "carac" ) {
niveauCompetence = rollData.competence.data.niveau;
niveauCompetence = rollData.competence.system.niveau;
} else {
niveauCompetence = rollData.selectedCarac.value;
}
@ -215,8 +202,8 @@ export class YggdrasillUtility {
if ( rollData.attackDef) {
rollData.finalBM -= rollData.attackDef.malus;
}
if ( rollData.sort && rollData.sort.data.malus ) {
rollData.finalBM += rollData.sort.data.malus;
if ( rollData.sort && rollData.sort.system.malus ) {
rollData.finalBM += rollData.sort.system.malus;
}
// Gestion cas blessé (malus de -3)
if ( rollData.isBlesse) { // Cas blesse : malus de -3
@ -276,8 +263,8 @@ export class YggdrasillUtility {
// Dégats
if ( isSuccess && (rollData.mode == "armecc" || rollData.mode == "armedist") ) {
rollData.degatsExplain = `Marge(${marge}) + Degats Arme(${rollData.arme.data.degat}) + Bonus Attaque(${rollData.attackDef.bonusdegats})`;
rollData.degats = marge + rollData.arme.data.degat + rollData.attackDef.bonusdegats;
rollData.degatsExplain = `Marge(${marge}) + Degats Arme(${rollData.arme.system.degat}) + Bonus Attaque(${rollData.attackDef.bonusdegats})`;
rollData.degats = marge + rollData.arme.system.degat + rollData.attackDef.bonusdegats;
}
// Stockage resultats
@ -292,7 +279,7 @@ export class YggdrasillUtility {
let galdrRoll = new Roll( rollData.dureeGaldr.substring(0, rollData.dureeGaldr.length - 1) ).roll( { async: false} );
await this.showDiceSoNice(galdrRoll, game.settings.get("core", "rollMode") );
rollData.dureeGaldrText = galdrRoll.total + " " + dureeGaldrText[rollData.dureeGaldr];
if ( rollData.sort.data.voie == "illusion") {
if ( rollData.sort.system.voie == "illusion") {
let volume = rollData.zoneGaldr.substring(3, rollData.zoneGaldr.length);
rollData.zoneGaldrText = rollData.instinctCarac.value + " x " + volume;
} else {
@ -310,7 +297,7 @@ export class YggdrasillUtility {
/* -------------------------------------------- */
static getUsers(filter) {
return game.users.filter(filter).map(user => user.data._id);
return game.users.filter(filter).map(user => user.system._id);
}
/* -------------------------------------------- */
static getWhisperRecipients(rollMode, name) {

View File

@ -1,14 +1,14 @@
{
"title": "Yggdrasill",
"description": "Système non-officiel Yggdrasill (7ième Cercle) pour FoundryVTT",
"version": "1.2.3",
"version": "10.0.0",
"esmodules": [
"modules/yggdrasill-main.js"
],
"styles": [
"styles/simple.css"
],
"background": "images/ui/yggdrasill_map.webp",
"background": "systems/fvtt-yggdrasill/images/ui/yggdrasill_map.webp",
"packs": [
{
"label": "Compétences Générales",
@ -196,7 +196,7 @@
"socket": true,
"url": "https://www.uberwald.me/gitea/public/fvtt-yggdrasill/",
"manifest": "https://www.uberwald.me/gitea/public/fvtt-yggdrasill/raw/main/system.json",
"download": "https://www.uberwald.me/gitea/public/fvtt-yggdrasill/archive/fvtt-yggdrasill-1.2.3.zip",
"download": "https://www.uberwald.me/gitea/public/fvtt-yggdrasill/archive/fvtt-yggdrasill-10.0.0.zip",
"license": "LICENSE.txt",
"id": "fvtt-yggdrasill",
"authors": [
@ -220,7 +220,7 @@
]
},
"compatibility": {
"minimum": "9",
"verified": "9"
"minimum": "10",
"verified": "10.286"
}
}

View File

@ -43,7 +43,7 @@
<li class="item flexrow list-item" data-carac-categ="{{keycateg}}" data-carac-key="{{keycarac}}">
<img class="sheet-competence-img" src="systems/fvtt-yggdrasill/images/icons/icon_carac_{{keycateg}}.png"/>
<span class="stat-label flexrow tooltip tooltip-nobottom" name="{{key}}"><a class="carac-roll">{{mycarac.label}}</a></span>
<select class="carac-base flexrow" type="text" name="data.carac.{{keycateg}}.carac.{{keycarac}}.value" value="{{mycarac.value}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
<select class="carac-base flexrow" type="text" name="system.carac.{{keycateg}}.carac.{{keycarac}}.value" value="{{mycarac.value}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{selectOptions @root.optionsCarac selected=mycarac.value localize=false}}
</select>
</li>
@ -56,10 +56,10 @@
<span class="generic-label"><h3>Furor</h3>
<ul>
<li class="">
<input type="text" id="input-furor" name="data.furor.value" value="{{data.furor.value}}" data-dtype="Number"/>
<input type="text" id="input-furor" name="system.furor.value" value="{{data.furor.value}}" data-dtype="Number"/>
{{#if isGM}}
<span class="pv-label flexrow tooltip tooltip-nobottom">/
<input type="text" id="max-furor" name="data.furor.max" value="{{data.furor.max}}" data-dtype="Number"/>
<input type="text" id="max-furor" name="system.furor.max" value="{{data.furor.max}}" data-dtype="Number"/>
</span>
{{else}}
<span class="pv-label flexrow tooltip tooltip-nobottom"> / {{data.furor.max}}</span>
@ -148,7 +148,7 @@
<li class="item flexrow list-item"><span class="stat-label flexrow tooltip tooltip-nobottom" name="{{key}}-max">Base : {{caracsec.max}}</span></li>
<li class="item flexrow list-item">
<span class="stat-label flexrow tooltip tooltip-nobottom" name="{{key}}-max">B/M</span>
<select class="carac-base flexrow" type="text" name="data.caracsecondaire.{{key}}.bonusmalus" value="{{caracsec.bonusmalus}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
<select class="carac-base flexrow" type="text" name="system.caracsecondaire.{{key}}.bonusmalus" value="{{caracsec.bonusmalus}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select caracsec.bonusmalus}}
{{#each @root.optionsDMDP as |option key| }}
<option value="{{option.value}}">{{option.text}}</option>
@ -166,7 +166,7 @@
<li class="item flexrow list-item"><span class="stat-label flexrow tooltip tooltip-nobottom" name="{{key}}-max">Base : {{caracsec.max}}</span></li>
<li class="item flexrow list-item">
<span class="stat-label flexrow tooltip tooltip-nobottom" name="{{key}}-max">B/M</span>
<select class="carac-base flexrow" type="text" name="data.caracsecondaire.{{key}}.bonusmalus" value="{{caracsec.bonusmalus}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
<select class="carac-base flexrow" type="text" name="system.caracsecondaire.{{key}}.bonusmalus" value="{{caracsec.bonusmalus}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select caracsec.bonusmalus}}
{{#each @root.optionsDMDP as |option key| }}
<option value="{{option.value}}">{{option.text}}</option>
@ -188,20 +188,20 @@
<span class="generic-label"><h3>Points de Vie</h3>
<ul>
<li class="">
<input class="input-pv" type="text" id="input-pv" name="data.caracsecondaire.pv.value" value="{{data.caracsecondaire.pv.value}}" data-dtype="Number"/>
<input class="input-pv" type="text" id="input-pv" name="system.caracsecondaire.pv.value" value="{{data.caracsecondaire.pv.value}}" data-dtype="Number"/>
<span class="pv-label flexrow tooltip tooltip-nobottom" name="{{key}}-total"> / {{data.caracsecondaire.pv.max}}</span>
</li>
</ul>
</span>
<span class="generic-label"><h4>Epuisé :
<input type="checkbox" id="isEpuise" name="data.status.epuise" {{checked data.status.epuise}}/></h3>
<input type="checkbox" id="isEpuise" name="system.status.epuise" {{checked data.status.epuise}}/></h3>
</span>
<span class="generic-label"><h4>Blessé :
<input type="checkbox" id="isBlesse" name="data.status.blesse" {{checked data.status.blesse}}/></h3>
<input type="checkbox" id="isBlesse" name="system.status.blesse" {{checked data.status.blesse}}/></h3>
</span>
<span class="generic-label"><h4>Meurtri :
<input type="checkbox" id="isMeurtri" name="data.status.meurtri" {{checked data.status.meurtri}}/></h3>
<input type="checkbox" id="isMeurtri" name="system.status.meurtri" {{checked data.status.meurtri}}/></h3>
</span>
</div>
</div>
@ -229,12 +229,12 @@
<img class="sheet-competence-img" src="{{competence.img}}"/>
<span class="competence-label"><a>{{competence.name}}</a></span>
<div>
{{#if competence.data.data.isspecialisation}}
<span class="specialisation-label">({{competence.data.data.specialisation}})</span>
{{#if competence.system.isspecialisation}}
<span class="specialisation-label">({{competence.system.specialisation}})</span>
{{/if}}
</div>
<select class="competence-base flexrow" type="text" skillname="{{competence.name}}" value="{{competence.data.data.niveau}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{selectOptions @root.optionsBase selected=competence.data.data.niveau localize=false}}
<select class="competence-base flexrow" type="text" skillname="{{competence.name}}" value="{{competence.system.niveau}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{selectOptions @root.optionsBase selected=competence.system.niveau localize=false}}
</select>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
@ -257,8 +257,8 @@
<li class="item flexrow list-item" data-item-id="{{competence.id}}">
<img class="sheet-competence-img" src="{{competence.img}}"/>
<span class="competence-label"><a>{{competence.name}}</a></span>
<select class="competence-base flexrow" type="text" skillname="{{competence.name}}" value="{{competence.data.data.niveau}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{selectOptions @root.optionsBase selected=competence.data.data.niveau localize=false}}
<select class="competence-base flexrow" type="text" skillname="{{competence.name}}" value="{{competence.system.niveau}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{selectOptions @root.optionsBase selected=competence.system.niveau localize=false}}
</select>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
@ -278,8 +278,8 @@
<li class="item flexrow list-item" data-item-id="{{competence.id}}">
<img class="sheet-competence-img" src="{{competence.img}}"/>
<span class="competence-label"><a>{{competence.name}}</a></span>
<select class="competence-base flexrow" type="text" skillname="{{competence.name}}" value="{{competence.data.data.niveau}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{selectOptions @root.optionsBase selected=competence.data.data.niveau localize=false}}
<select class="competence-base flexrow" type="text" skillname="{{competence.name}}" value="{{competence.system.niveau}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{selectOptions @root.optionsBase selected=competence.system.niveau localize=false}}
</select>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
@ -311,10 +311,10 @@
<li class="item stat flexrow list-item" data-arme-id="{{arme.id}}" data-item-id="{{arme.id}}">
<img class="sheet-competence-img" src="{{arme.img}}"/>
<span class="stat-label arme-label flexrow tooltip tooltip-nobottom"><a name="{{arme.name}}">{{arme.name}}</a></span>
<span class="stat-label combat-label">&nbsp;{{arme.data.data.categorie}}</span>
<span class="stat-label combat-label">&nbsp;{{arme.data.data.degat}}</span>
<span class="stat-label combat-label">&nbsp;{{arme.system.categorie}}</span>
<span class="stat-label combat-label">&nbsp;{{arme.system.degat}}</span>
<div class="item-controls">
<a class="item-control item-equip" title="Worn">{{#if arme.data.data.equipe}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-equip" title="Worn">{{#if arme.system.equipe}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
@ -335,8 +335,8 @@
<li class="item stat flexrow list-item" data-item-id="{{prouesse.id}}">
<img class="sheet-competence-img" src="{{prouesse.img}}"/>
<span class="stat-label combat-label flexrow tooltip tooltip-nobottom">{{prouesse.name}}</a></span>
<span class="stat-label combat-label">{{prouesse.data.data.categorie}}</span>
<span class="stat-label combat-label">{{prouesse.data.data.niveau}}</span>
<span class="stat-label combat-label">{{prouesse.system.categorie}}</span>
<span class="stat-label combat-label">{{prouesse.system.niveau}}</span>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
@ -358,10 +358,10 @@
<li class="item stat flexrow list-item" data-armure-id="{{armure.id}}" data-item-id="{{armure.id}}">
<img class="sheet-competence-img" src="{{armure.img}}"/>
<span class="stat-label combat-label flexrow tooltip tooltip-nobottom"><a name="{{armure.name}}">{{armure.name}}</a></span>
<span class="stat-label combat-label">&nbsp;{{armure.data.data.categorie}}</span>
<span class="stat-label combat-label">&nbsp;{{armure.data.data.protection}}</span>
<span class="stat-label combat-label">&nbsp;{{armure.system.categorie}}</span>
<span class="stat-label combat-label">&nbsp;{{armure.system.protection}}</span>
<div class="item-controls">
<a class="item-control item-equip" title="Worn">{{#if armure.data.data.equipe}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-equip" title="Worn">{{#if armure.system.equipe}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
@ -382,10 +382,10 @@
<li class="item stat flexrow list-item" data-armure-id="{{bouclier.id}}" data-item-id="{{bouclier.id}}">
<img class="sheet-competence-img" src="{{bouclier.img}}"/>
<span class="stat-label combat-label flexrow tooltip tooltip-nobottom"><a name="{{bouclier.name}}">{{bouclier.name}}</a></span>
<span class="stat-label combat-label">&nbsp;{{bouclier.data.data.categorie}}</span>
<span class="stat-label combat-label">&nbsp;{{bouclier.data.data.defensebonus}}</span>
<span class="stat-label combat-label">&nbsp;{{bouclier.system.categorie}}</span>
<span class="stat-label combat-label">&nbsp;{{bouclier.system.defensebonus}}</span>
<div class="item-controls">
<a class="item-control item-equip" title="Worn">{{#if bouclier.data.data.equipe}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-equip" title="Worn">{{#if bouclier.system.equipe}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
@ -406,8 +406,8 @@
<li class="item flexrow list-item" data-item-id="{{sort.id}}">
<img class="sheet-competence-img" src="{{sort.img}}"/>
<span class="sort-label"><a class="sort-sejdr">{{sort.name}}</a></span>
<span class="sort-difficulty">{{sort.data.data.forme}}</span>
<span class="sort-difficulty">{{sort.data.data.niveau}}</span>
<span class="sort-difficulty">{{sort.system.forme}}</span>
<span class="sort-difficulty">{{sort.system.niveau}}</span>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
@ -424,8 +424,8 @@
<li class="item flexrow list-item" data-item-id="{{sort.id}}">
<img class="sheet-competence-img" src="{{sort.img}}"/>
<span class="sort-label"><a class="sort-galdr">{{sort.name}}</a></span>
<span class="sort-difficulty">{{sort.data.data.domaine}}</span>
<span class="sort-difficulty">{{sort.data.data.duree}}</span>
<span class="sort-difficulty">{{sort.system.domaine}}</span>
<span class="sort-difficulty">{{sort.system.duree}}</span>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
@ -442,9 +442,9 @@
<li class="item flexrow list-item" data-item-id="{{sort.id}}">
<img class="sheet-competence-img" src="{{sort.img}}"/>
<span class="sort-label"><a class="sort-rune">{{sort.name}}</a></span>
<span class="sort-difficulty">{{sort.data.data.cible}}</span>
<span class="sort-difficulty">{{sort.data.data.niveau}}</span>
<span class="sort-difficulty">{{sort.data.data.domaine}}</span>
<span class="sort-difficulty">{{sort.system.cible}}</span>
<span class="sort-difficulty">{{sort.system.niveau}}</span>
<span class="sort-difficulty">{{sort.system.domaine}}</span>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
@ -464,7 +464,7 @@
<li class="item flexrow list-item" data-item-id="{{monnaie.id}}">
<img class="sheet-competence-img" src="{{monnaie.img}}"/>
<span class="generic-label">{{monnaie.name}}</span>
<span class="generic-label">{{monnaie.data.data.quantite}}
<span class="generic-label">{{monnaie.system.quantite}}
(<a class="equipement-moins plus-moins-button"> -</a>/<a class="equipement-plus plus-moins-button">+</a>)
</span>
</span>
@ -492,13 +492,13 @@
<li class="item flexrow list-item" data-item-id="{{equipement.id}}">
<img class="sheet-competence-img" src="{{equipement.img}}"/>
<span class="equipement-label">{{equipement.name}}</span>
<span class="equipement-label">{{equipement.data.data.quantite}}</span>
<span class="equipement-label">{{equipement.data.data.enc}}</span>
<span class="equipement-label">{{equipement.system.quantite}}</span>
<span class="equipement-label">{{equipement.system.enc}}</span>
<span class="equipement-label">
(<a class="equipement-moins plus-moins-button">-</a>/<a class="equipement-plus plus-moins-button">+</a>)
</span>
<div class="item-controls">
<a class="item-control item-equip" title="Worn">{{#if equipement.data.data.equipe}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-equip" title="Worn">{{#if equipement.system.equipe}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
@ -514,43 +514,43 @@
<h3>Expérience et Renommée : </h3>
<div class="form-group editor">
<span class="equipement-label">XP : </span>
<input type="text" name="data.xp.xp.current" value="{{data.xp.xp.current}}" data-dtype="Number"/>
<input type="text" name="data.xp.xp.total" value="{{data.xp.xp.total}}" data-dtype="Number"/>
<input type="text" name="system.xp.xp.current" value="{{data.xp.xp.current}}" data-dtype="Number"/>
<input type="text" name="system.xp.xp.total" value="{{data.xp.xp.total}}" data-dtype="Number"/>
<span class="equipement-label">Renommée : </span>
<input type="text" name="data.xp.renommee.value" value="{{data.xp.renommee.value}}" data-dtype="Number"/>
<input type="text" name="system.xp.renommee.value" value="{{data.xp.renommee.value}}" data-dtype="Number"/>
</div>
<hr>
<h3>Biodatas : </h3>
<div class="form-group editor">
<span class="equipement-label">Poids : </span>
<input type="text" name="data.biodata.poids" value="{{data.biodata.poids}}" data-dtype="String"/>
<input type="text" name="system.biodata.poids" value="{{data.biodata.poids}}" data-dtype="String"/>
<span class="equipement-label">Taille : </span>
<input type="text" name="data.biodata.taille" value="{{data.biodata.taille}}" data-dtype="String"/>
<input type="text" name="system.biodata.taille" value="{{data.biodata.taille}}" data-dtype="String"/>
<span class="equipement-label">Age : </span>
<input type="text" name="data.biodata.age" value="{{data.biodata.age}}" data-dtype="String"/>
<input type="text" name="system.biodata.age" value="{{data.biodata.age}}" data-dtype="String"/>
</div>
<div class="form-group editor">
<span class="equipement-label">Archetype : </span>
<input type="text" name="data.biodata.archetype" value="{{data.biodata.archetype}}" data-dtype="String"/>
<input type="text" name="system.biodata.archetype" value="{{data.biodata.archetype}}" data-dtype="String"/>
<span class="equipement-label">Profession : </span>
<input type="text" name="data.biodata.profession" value="{{data.biodata.profession}}" data-dtype="String"/>
<input type="text" name="system.biodata.profession" value="{{data.biodata.profession}}" data-dtype="String"/>
<span class="equipement-label">Royaume : </span>
<input type="text" name="data.biodata.royaume" value="{{data.biodata.royaume}}" data-dtype="String"/>
<input type="text" name="system.biodata.royaume" value="{{data.biodata.royaume}}" data-dtype="String"/>
</div>
<hr>
<h3>Biographie : </h3>
<div class="form-group editor">
{{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>
<hr>
<h3>Notes : </h3>
<div class="form-group editor">
{{editor content=data.notes target="data.notes" button=true owner=owner editable=editable}}
{{editor data.notes target="system.notes" button=true owner=owner editable=editable}}
</div>
<hr>
<h3>Tirage des Runes: </h3>
<div class="form-group editor">
{{editor content=data.tiragerunes target="data.tiragerunes" button=true owner=owner editable=editable}}
{{editor data.tiragerunes target="system.tiragerunes" button=true owner=owner editable=editable}}
</div>
<hr>
{{>"systems/fvtt-yggdrasill/templates/editor-notes-gm.html"}}

View File

@ -12,24 +12,24 @@
Jet de {{attr.label}} {{subAttr.label}} (2d10+{{subAttr.value}})
{{else}}
{{#if (eq mode "competence")}}
Jet de {{selectedCarac.label}} ({{selectedCarac.value}}d10) / {{competence.name}} ({{competence.data.niveau}})
Jet de {{selectedCarac.label}} ({{selectedCarac.value}}d10) / {{competence.name}} ({{competence.system.niveau}})
{{else}}
{{#if (eq mode "armecc")}}
Attaque au corps à Corps {{attackDef.label}} ({{selectedCarac.value}}d10) / {{competence.name}}
({{competence.data.niveau}})
({{competence.system.niveau}})
{{else}}
{{#if (eq mode "armedist")}}
Attaque à Distance {{attackDef.label}} ({{selectedCarac.value}}d10) / {{competence.name}}
({{competence.data.niveau}})
({{competence.system.niveau}})
{{else}}
{{#if (eq mode "sejdr")}}
Lancer du Sort {{sort.name}} ({{selectedCarac.value}}d10) / {{competence.name}} ({{competence.data.niveau}})
Lancer du Sort {{sort.name}} ({{selectedCarac.value}}d10) / {{competence.name}} ({{competence.system.niveau}})
{{else}}
{{#if (eq mode "rune")}}
Gravure de la Rune {{sort.name}} ({{selectedCarac.value}}d10) / {{competence.name}} ({{competence.data.niveau}})
Gravure de la Rune {{sort.name}} ({{selectedCarac.value}}d10) / {{competence.name}} ({{competence.system.niveau}})
{{else}}
{{#if (eq mode "galdr")}}
Lancer du Domaine {{sort.name}} ({{selectedCarac.value}}d10) / {{competence.name}} ({{competence.data.niveau}})
Lancer du Domaine {{sort.name}} ({{selectedCarac.value}}d10) / {{competence.name}} ({{competence.system.niveau}})
{{else}}
Jet de {{selectedCarac.label}} ({{selectedCarac.value}}d10)
{{/if}}

View File

@ -1,6 +1,6 @@
{{#if data.isGM}}
<h3>GM Notes : </h3>
<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>
{{/if}}

View File

@ -46,7 +46,7 @@
<span class="stat-label flexrow tooltip tooltip-nobottom" name="{{index}}">
<a class="attribut-roll" data-attr-sub-key="{{index}}">{{value.label}}</a></span>
{{/if}}
<select class="carac-base flexrow" type="text" name="data.attributs.{{key}}.values.{{index}}.value" value="{{value.value}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
<select class="carac-base flexrow" type="text" name="system.attributs.{{key}}.values.{{index}}.value" value="{{value.value}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select value.value}}
{{#each @root.optionsAttr as |option index|}}
<option value="{{index}}">{{index}}</option>
@ -66,7 +66,7 @@
<ul>
<li class="item flexrow list-item" data-attr-key="etat">
<span class="stat-label flexrow tooltip tooltip-nobottom" name="etat">Etat : </span>
<select class="carac-base flexrow" type="text" name="data.etat.etat" value="{{data.etat.etat}}" data-dtype="String" {{#unless @root.editScore}}disabled{{/unless}}>
<select class="carac-base flexrow" type="text" name="system.etat.etat" value="{{data.etat.etat}}" data-dtype="String" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select data.etat.etat}}
<option value="fringant">Fringant</option>
<option value="blesse">Blessé</option>
@ -102,7 +102,7 @@
<li class="item flexrow list-item" data-item-id="{{monnaie.id}}">
<img class="sheet-competence-img" src="{{monnaie.img}}"/>
<span class="generic-label">{{monnaie.name}}</span>
<span class="generic-label">{{monnaie.data.data.quantite}}
<span class="generic-label">{{monnaie.system.quantite}}
(<a class="equipement-moins plus-moins-button"> -</a>/<a class="equipement-plus plus-moins-button">+</a>)
</span>
</span>
@ -130,13 +130,13 @@
<li class="item flexrow list-item" data-item-id="{{equipement.id}}">
<img class="sheet-competence-img" src="{{equipement.img}}"/>
<span class="equipement-label">{{equipement.name}}</span>
<span class="equipement-label">{{equipement.data.data.quantite}}</span>
<span class="equipement-label">{{equipement.data.data.enc}}</span>
<span class="equipement-label">{{equipement.system.quantite}}</span>
<span class="equipement-label">{{equipement.system.enc}}</span>
<span class="equipement-label">
(<a class="equipement-moins plus-moins-button">-</a>/<a class="equipement-plus plus-moins-button">+</a>)
</span>
<div class="item-controls">
<a class="item-control item-equip" title="Worn">{{#if equipement.data.data.equipe}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-equip" title="Worn">{{#if equipement.system.equipe}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>

View File

@ -2,7 +2,7 @@
<img class="vadentis-hud-togglebutton" src="systems/foundryvtt-vadentis/images/icons/icone_item_armes_cac.webp" width="36" height="36" title="Attaque"/>
<div class="vadentis-hud-list tokenhudext left">
{{#each armes as |arme key|}}
{{#if arme.data.equipee}}
{{#if arme.system.equipee}}
<div class="control-icon tokenhudicon vadentis-hud-menu vadentis-attaque" data-combatant-id="{{../combatant._id}}" data-arme-id="{{arme._id}}" title="{{arme.name}}">
<label>C:{{arme.name}}</label>
</div>

View File

@ -12,8 +12,8 @@
<div class="tab" data-group="primary">
<ul>
<li class="flexrow"><label class="generic-label">Catégorie</label>
<select class="competence-base flexrow" type="text" name="data.categorie" value="{{data.categorie}}" data-dtype="String">
{{#select data.categorie}}
<select class="competence-base flexrow" type="text" name="system.categorie" value="{{data.categorie}}" data-dtype="String">
{{#select system.categorie}}
<option value="lutte">Lutte</option>
<option value="improvisee">Improvisée</option>
<option value="courte">Courte</option>
@ -24,15 +24,15 @@
</select>
</li>
<li class="flexrow"><label class="generic-label">Equipée ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.equipe" {{checked data.equipe}}/></label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.equipe" {{checked data.equipe}}/></label>
</li>
<li class="flexrow"><label class="generic-label">Degat</label><input type="text" name="data.degat" value="{{data.degat}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Solidité</label><input type="text" name="data.solidite" value="{{data.solidite}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Encombrement</label><input type="text" name="data.enc" value="{{data.enc}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Valeur</label><input type="text" name="data.valeur" value="{{data.valeur}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Degat</label><input type="text" name="system.degat" value="{{data.degat}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Solidité</label><input type="text" name="system.solidite" value="{{data.solidite}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Encombrement</label><input type="text" name="system.enc" value="{{data.enc}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Valeur</label><input type="text" name="system.valeur" value="{{data.valeur}}" data-dtype="Number"/></li>
</ul>
<label class="generic-label">Description</label>
{{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>
</section>

View File

@ -12,7 +12,7 @@
<div class="tab" data-group="primary">
<ul>
<li class="flexrow"><label class="generic-label">Catégorie</label>
<select class="competence-base flexrow" type="text" name="data.categorie" value="{{data.categorie}}" data-dtype="String">
<select class="competence-base flexrow" type="text" name="system.categorie" value="{{data.categorie}}" data-dtype="String">
{{#select data.categorie}}
<option value="jet">Jet</option>
<option value="tir">Tir</option>
@ -20,16 +20,16 @@
</select>
</li>
<li class="flexrow"><label class="generic-label">Equipée ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.equipe" {{checked data.equipe}}/></label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.equipe" {{checked data.equipe}}/></label>
</li>
<li class="flexrow"><label class="generic-label">Degat</label><input type="text" name="data.degat" value="{{data.degat}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Solidité</label><input type="text" name="data.solidite" value="{{data.solidite}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Encombrement</label><input type="text" name="data.enc" value="{{data.enc}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Valeur</label><input type="text" name="data.valeur" value="{{data.valeur}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Portée</label><input type="text" name="data.portee" value="{{data.portee}}" data-dtype="String"/></li>
<li class="flexrow"><label class="generic-label">Degat</label><input type="text" name="system.degat" value="{{data.degat}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Solidité</label><input type="text" name="system.solidite" value="{{data.solidite}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Encombrement</label><input type="text" name="system.enc" value="{{data.enc}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Valeur</label><input type="text" name="system.valeur" value="{{data.valeur}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Portée</label><input type="text" name="system.portee" value="{{data.portee}}" data-dtype="String"/></li>
</ul>
<label class="generic-label">Description</label>
{{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>
</section>

View File

@ -12,7 +12,7 @@
<div class="tab" data-group="primary">
<ul>
<li class="flexrow"><label class="generic-label">Catégorie</label>
<select class="competence-base flexrow" type="text" name="data.categorie" value="{{data.categorie}}" data-dtype="String">
<select class="competence-base flexrow" type="text" name="system.categorie" value="{{data.categorie}}" data-dtype="String">
{{#select data.categorie}}
<option value="armure">Armure</option>
<option value="piecearmure">Pièce d'Armure</option>
@ -20,14 +20,14 @@
</select>
</li>
<li class="flexrow"><label class="generic-label">Equipée ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.equipe" {{checked data.equipe}}/></label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.equipe" {{checked data.equipe}}/></label>
</li>
<li class="flexrow"><label class="generic-label">Protection</label><input type="text" name="data.protection" value="{{data.protection}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Encombrement</label><input type="text" name="data.enc" value="{{data.enc}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Valeur</label><input type="text" name="data.valeur" value="{{data.valeur}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Protection</label><input type="text" name="system.protection" value="{{data.protection}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Encombrement</label><input type="text" name="system.enc" value="{{data.enc}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Valeur</label><input type="text" name="system.valeur" value="{{data.valeur}}" data-dtype="Number"/></li>
</ul>
<label class="generic-label">Description</label>
{{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>
</section>

View File

@ -11,7 +11,7 @@
<div class="tab" data-group="primary">
<label class="generic-label">Description</label>
{{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>
</section>

View File

@ -12,23 +12,23 @@
<div class="tab" data-group="primary">
<ul>
<li class="flexrow"><label class="generic-label">Catégorie</label>
<select class="competence-base flexrow" type="text" name="data.categorie" value="{{data.categorie}}" data-dtype="String">
<select class="competence-base flexrow" type="text" name="system.categorie" value="{{data.categorie}}" data-dtype="String">
{{#select data.categorie}}
<option value="bouclier">bouclier</option>
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Equipée ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.equipe" {{checked data.equipe}}/></label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.equipe" {{checked data.equipe}}/></label>
</li>
<li class="flexrow"><label class="generic-label">Bonus DP</label><input type="text" name="data.defensebonus" value="{{data.defensebonus}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Encombrement</label><input type="text" name="data.enc" value="{{data.enc}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Encombrement en combat</label><input type="text" name="data.enccomb" value="{{data.enccomb}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Solidité</label><input type="text" name="data.solidite" value="{{data.solidite}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Valeur</label><input type="text" name="data.valeur" value="{{data.valeur}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Bonus DP</label><input type="text" name="system.defensebonus" value="{{data.defensebonus}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Encombrement</label><input type="text" name="system.enc" value="{{data.enc}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Encombrement en combat</label><input type="text" name="system.enccomb" value="{{data.enccomb}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Solidité</label><input type="text" name="system.solidite" value="{{data.solidite}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Valeur</label><input type="text" name="system.valeur" value="{{data.valeur}}" data-dtype="Number"/></li>
</ul>
<label class="generic-label">Description</label>
{{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>
</section>

View File

@ -12,7 +12,7 @@
<div class="tab" data-group="primary">
<ul>
<li class="flexrow"><label class="generic-label">Catégorie</label>
<select class="competence-base flexrow" type="text" name="data.categorie" value="{{data.categorie}}" data-dtype="String">
<select class="competence-base flexrow" type="text" name="system.categorie" value="{{data.categorie}}" data-dtype="String">
{{#select data.categorie}}
<option value="generale">Générale</option>
<option value="magique">Magique</option>
@ -21,20 +21,20 @@
</select>
</li>
<li class="flexrow"><label class="generic-label">Niveau</label>
<select class="competence-malus flexrow" type="text" name="data.niveau" value="{{data.niveau}}" data-dtype="Number">
<select class="competence-malus flexrow" type="text" name="system.niveau" value="{{data.niveau}}" data-dtype="Number">
{{selectOptions @root.optionsBase selected=data.niveau localize=false}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Spécialisation ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.isspecialisation" {{checked data.isspecialisation}}/></label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.isspecialisation" {{checked data.isspecialisation}}/></label>
</li>
<li class="flexrow"><label class="generic-label">Spécialisation</label><input type="text" name="data.specialisation" value="{{data.specialisation}}" data-dtype="String"/></li>
<li class="flexrow"><label class="generic-label">Spécialisation</label><input type="text" name="system.specialisation" value="{{data.specialisation}}" data-dtype="String"/></li>
<li class="flexrow"><label class="generic-label">Niveau 1 requis ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.niveauunrequis" {{checked data.niveauunrequis}}/></label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.niveauunrequis" {{checked data.niveauunrequis}}/></label>
</li>
</ul>
<label class="generic-label">Description</label>
{{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>
</section>

View File

@ -11,7 +11,7 @@
<div class="tab" data-group="primary">
<label class="generic-label">Description</label>
{{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>
</section>

View File

@ -11,7 +11,7 @@
<div class="tab" data-group="primary">
<label class="generic-label">Description</label>
{{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>
</section>

View File

@ -13,11 +13,11 @@
<ul>
<li class="flexrow">
<label class="generic-label">Origine</label>
<input type="text" name="data.origine" value="{{data.origine}}" data-dtype="String"/>
<input type="text" name="system.origine" value="{{data.origine}}" data-dtype="String"/>
</li>
</ul>
<label class="generic-label">Effet</label>
{{editor content=data.effet target="data.effet" button=true owner=owner editable=editable}}
{{editor data.effet target="system.effet" button=true owner=owner editable=editable}}
</div>
</section>

View File

@ -12,13 +12,13 @@
<div class="tab" data-group="primary">
<ul>
<li class="flexrow"><label class="generic-label">Equipée ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.equipe" {{checked data.equipe}}/></label>
<label class="attribute-value checkbox"><input type="checkbox" name="system.equipe" {{checked data.equipe}}/></label>
</li>
<li class="flexrow"><label class="generic-label">Encombrement</label><input type="text" name="data.enc" value="{{data.enc}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Valeur</label><input type="text" name="data.valeur" value="{{data.valeur}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Encombrement</label><input type="text" name="system.enc" value="{{data.enc}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Valeur</label><input type="text" name="system.valeur" value="{{data.valeur}}" data-dtype="Number"/></li>
</ul>
<label class="generic-label">Description</label>
{{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>
</section>

View File

@ -11,7 +11,7 @@
<div class="tab" data-group="primary">
<label class="generic-label">Description</label>
{{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>
</section>

View File

@ -12,7 +12,7 @@
<div class="tab" data-group="primary">
<ul>
<li class="flexrow"><label class="generic-label">Catégorie</label>
<select class="competence-base flexrow" type="text" name="data.categorie" value="{{data.categorie}}" data-dtype="String">
<select class="competence-base flexrow" type="text" name="system.categorie" value="{{data.categorie}}" data-dtype="String">
{{#select data.categorie}}
<option value="mineure">Mineure</option>
<option value="moderee">Modérée</option>
@ -20,11 +20,11 @@
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Periode</label><input type="text" name="data.periode" value="{{data.periode}}" data-dtype="String"/>
<li class="flexrow"><label class="generic-label">Periode</label><input type="text" name="system.periode" value="{{data.periode}}" data-dtype="String"/>
</li>
</ul>
<label class="generic-label">Description</label>
{{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>
</section>

View File

@ -11,11 +11,11 @@
<div class="tab" data-group="primary">
<ul>
<li class="flexrow"><label class="generic-label">Quantité</label><input type="text" name="data.quantite" value="{{data.quantite}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Encombrement</label><input type="text" name="data.enc" value="{{data.enc}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Quantité</label><input type="text" name="system.quantite" value="{{data.quantite}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Encombrement</label><input type="text" name="system.enc" value="{{data.enc}}" data-dtype="Number"/></li>
</ul>
<label class="generic-label">Description</label>
{{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>
</section>

View File

@ -12,7 +12,7 @@
<div class="tab" data-group="primary">
<ul>
<li class="flexrow"><label class="generic-label">Catégorie</label>
<select class="competence-base flexrow" type="text" name="data.categorie" value="{{data.categorie}}" data-dtype="String">
<select class="competence-base flexrow" type="text" name="system.categorie" value="{{data.categorie}}" data-dtype="String">
{{#select data.categorie}}
<option value="mineure">Mineure</option>
<option value="moderee">Modérée</option>
@ -20,10 +20,10 @@
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Type</label><input type="text" name="data.type" value="{{data.type}}" data-dtype="String"/></li>
<li class="flexrow"><label class="generic-label">Type</label><input type="text" name="system.type" value="{{data.type}}" data-dtype="String"/></li>
</ul>
<label class="generic-label">Description</label>
{{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>
</section>

View File

@ -12,7 +12,7 @@
<div class="tab" data-group="primary">
<ul>
<li class="flexrow"><label class="generic-label">Catégorie</label>
<select class="competence-base flexrow" type="text" name="data.categorie" value="{{data.categorie}}" data-dtype="String">
<select class="competence-base flexrow" type="text" name="system.categorie" value="{{data.categorie}}" data-dtype="String">
{{#select data.categorie}}
<option value="attaque">Attaque</option>
<option value="defensive">Défensive</option>
@ -22,18 +22,18 @@
</li>
<li class="flexrow">
<label class="generic-label">Niveau</label>
<select class="competence-base flexrow" type="text" name="data.niveau" value="{{data.niveau}}" data-dtype="Number">
<select class="competence-base flexrow" type="text" name="system.niveau" value="{{data.niveau}}" data-dtype="Number">
{{#select data.niveau}}
{{{optionsNiveaux4}}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Armes</label><input type="text" name="data.armes" value="{{data.armes}}" data-dtype="String"/></li>
<li class="flexrow"><label class="generic-label">Prérequis</label><input type="text" name="data.prerequis" value="{{data.prerequis}}" data-dtype="String"/></li>
<li class="flexrow"><label class="generic-label">Modificateur</label><input type="text" name="data.modificateur" value="{{data.modificateur}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Armes</label><input type="text" name="system.armes" value="{{data.armes}}" data-dtype="String"/></li>
<li class="flexrow"><label class="generic-label">Prérequis</label><input type="text" name="system.prerequis" value="{{data.prerequis}}" data-dtype="String"/></li>
<li class="flexrow"><label class="generic-label">Modificateur</label><input type="text" name="system.modificateur" value="{{data.modificateur}}" data-dtype="Number"/></li>
</ul>
<label class="generic-label">Description</label>
{{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>
</section>

View File

@ -11,20 +11,20 @@
<div class="tab" data-group="primary">
<ul>
<li class="flexrow"><label class="generic-label">Cible</label><input type="text" name="data.cible" value="{{data.cible}}" data-dtype="String"/></li>
<li class="flexrow"><label class="generic-label">Cible</label><input type="text" name="system.cible" value="{{data.cible}}" data-dtype="String"/></li>
<li class="flexrow">
<label class="generic-label">Niveau</label>
<select class="competence-base flexrow" type="text" name="data.niveau" value="{{data.niveau}}" data-dtype="Number">
<select class="competence-base flexrow" type="text" name="system.niveau" value="{{data.niveau}}" data-dtype="Number">
{{#select data.niveau}}
{{{optionsNiveaux4}}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Domaine</label><input type="text" name="data.domaine" value="{{data.domaine}}" data-dtype="String"/></li>
<li class="flexrow"><label class="generic-label">Zone/Cible</label><input type="text" name="data.zonecible" value="{{data.zonecible}}" data-dtype="String"/></li>
<li class="flexrow"><label class="generic-label">Domaine</label><input type="text" name="system.domaine" value="{{data.domaine}}" data-dtype="String"/></li>
<li class="flexrow"><label class="generic-label">Zone/Cible</label><input type="text" name="system.zonecible" value="{{data.zonecible}}" data-dtype="String"/></li>
</ul>
<label class="generic-label">Description</label>
{{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>
</section>

View File

@ -13,7 +13,7 @@
<ul>
<li class="flexrow">
<label class="generic-label">Voie</label>
<select class="competence-base flexrow" type="text" name="data.voie" value="{{data.voie}}" data-dtype="String">
<select class="competence-base flexrow" type="text" name="system.voie" value="{{data.voie}}" data-dtype="String">
{{#select data.voie}}
<option value="malediction">Malédictions</option>
<option value="illusion">Illusions</option>
@ -21,10 +21,10 @@
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">SD</label><input type="text" name="data.sd" value="{{data.sd}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">SD</label><input type="text" name="system.sd" value="{{data.sd}}" data-dtype="Number"/></li>
</ul>
<label class="generic-label">Description</label>
{{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>
</section>

View File

@ -11,22 +11,22 @@
<div class="tab" data-group="primary">
<ul>
<li class="flexrow"><label class="generic-label">Domaine</label><input type="text" name="data.forme" value="{{data.forme}}" data-dtype="String"/></li>
<li class="flexrow"><label class="generic-label">Préparation</label><input type="text" name="data.preparation" value="{{data.preparation}}" data-dtype="String"/></li>
<li class="flexrow"><label class="generic-label">Domaine</label><input type="text" name="system.forme" value="{{data.forme}}" data-dtype="String"/></li>
<li class="flexrow"><label class="generic-label">Préparation</label><input type="text" name="system.preparation" value="{{data.preparation}}" data-dtype="String"/></li>
<li class="flexrow">
<label class="generic-label">Niveau</label>
<select class="competence-base flexrow" type="text" name="data.niveau" value="{{data.niveau}}" data-dtype="Number">
<select class="competence-base flexrow" type="text" name="system.niveau" value="{{data.niveau}}" data-dtype="Number">
{{#select data.niveau}}
{{{optionsNiveaux4}}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Malus</label><input type="text" name="data.malus" value="{{data.malus}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Durée</label><input type="text" name="data.duree" value="{{data.duree}}" data-dtype="String"/></li>
<li class="flexrow"><label class="generic-label">Zone</label><input type="text" name="data.zone" value="{{data.zone}}" data-dtype="String"/></li>
<li class="flexrow"><label class="generic-label">Malus</label><input type="text" name="system.malus" value="{{data.malus}}" data-dtype="Number"/></li>
<li class="flexrow"><label class="generic-label">Durée</label><input type="text" name="system.duree" value="{{data.duree}}" data-dtype="String"/></li>
<li class="flexrow"><label class="generic-label">Zone</label><input type="text" name="system.zone" value="{{data.zone}}" data-dtype="String"/></li>
</ul>
<label class="generic-label">Description</label>
{{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>
</section>

View File

@ -30,7 +30,7 @@
<div class="flexrow">
<span class="competence-base flexrow" >Compétence : </span>
<span class="competence-base flexrow" id="compName">{{competence.name}}</span>
<span class="competence-base flexrow" id="compNiveau">{{competence.data.niveau}}</span>
<span class="competence-base flexrow" id="compNiveau">{{competence.system.niveau}}</span>
</div>
<div class="flexrow">

View File

@ -32,7 +32,7 @@
<div class="flexrow">
<span class="competence-base flexrow" >Compétence : </span>
<span class="competence-base flexrow" id="compName">{{competence.name}}</span>
<span class="competence-base flexrow" id="compNiveau">{{competence.data.niveau}}</span>
<span class="competence-base flexrow" id="compNiveau">{{competence.system.niveau}}</span>
</div>
<div class="flexrow">

View File

@ -2,10 +2,10 @@
<h2 class="dialog-roll-title">{{title}}</h2>
<div class="floxrow">
{{#if competence.data.data.isspecialisation}}
{{#if competence.system.isspecialisation}}
<div class="flexrow">
<span class="competence-base flexrow" >Spécialisation : </span>
<span class="competence-base flexrow" >{{competence.data.specialisation}}</span>
<span class="competence-base flexrow" >{{competence.system.specialisation}}</span>
<span class="competence-base flexrow" >&nbsp;&nbsp;</span>
<span class="competence-base flexrow" >&nbsp;&nbsp;</span>
</div>

View File

@ -1,5 +1,5 @@
<form class="skill-roll-dialog">
<h2 class="dialog-roll-title">{{title}} - SD {{sort.data.sd}}</h2>
<h2 class="dialog-roll-title">{{title}} - SD {{sort.system.sd}}</h2>
<div class="floxrow">
<div class="flexrow">
@ -11,7 +11,7 @@
<div class="flexrow">
<span class="competence-base flexrow" >Compétence : </span>
<span class="competence-base flexrow" id="compName">{{competence.name}}</span>
<span class="competence-base flexrow" id="compNiveau">{{competence.data.niveau}}</span>
<span class="competence-base flexrow" id="compNiveau">{{competence.system.niveau}}</span>
</div>
<div class="flexrow">

View File

@ -1,5 +1,5 @@
<form class="skill-roll-dialog">
<h2 class="dialog-roll-title">{{title}} - Niveau {{sort.data.niveau}}</h2>
<h2 class="dialog-roll-title">{{title}} - Niveau {{sort.system.niveau}}</h2>
<div class="floxrow">
<div class="flexrow">
@ -11,7 +11,7 @@
<div class="flexrow">
<span class="competence-base flexrow" >Compétence : </span>
<span class="competence-base flexrow" id="compName">{{competence.name}}</span>
<span class="competence-base flexrow" id="compNiveau">{{competence.data.niveau}}</span>
<span class="competence-base flexrow" id="compNiveau">{{competence.system.niveau}}</span>
</div>
<div class="flexrow">

View File

@ -10,18 +10,18 @@
<div class="flexrow">
<span class="competence-base flexrow" >Préparation : </span>
<span class="competence-base flexrow" id="caracName">{{sort.data.preparation}}</span>
<span class="competence-base flexrow" id="caracName">{{sort.system.preparation}}</span>
</div>
<div class="flexrow">
<span class="competence-base flexrow" >Compétence : </span>
<span class="competence-base flexrow" id="compName">{{competence.name}}</span>
<span class="competence-base flexrow" id="compNiveau">{{competence.data.niveau}}</span>
<span class="competence-base flexrow" id="compNiveau">{{competence.system.niveau}}</span>
</div>
<div class="flexrow">
<span class="competence-base flexrow" >Malus du Sort : </span>
<span class="competence-base flexrow" id="malus">{{sort.data.malus}}</span>
<span class="competence-base flexrow" id="malus">{{sort.system.malus}}</span>
</div>
<div class="flexrow">