Merge branch 'v1.4-adapt080' into 'v1.4'
Corrections data.data See merge request LeRatierBretonnien/foundryvtt-reve-de-dragon!163
This commit is contained in:
commit
b4c1dc1222
48
dev-notes.md
Normal file
48
dev-notes.md
Normal file
@ -0,0 +1,48 @@
|
||||
# Actor notes
|
||||
|
||||
> The Actor#getData default implementation gives you the following for use in sheet rendering:
|
||||
|
||||
```
|
||||
actor -> the Actor instance
|
||||
data -> a cloned copy of Actor#data
|
||||
items -> a cloned copy of Actor#data#items
|
||||
effects -> a cloned copy of Actor#data#effects
|
||||
```
|
||||
|
||||
> if all you need is a safe copy of `Actor#data`, you'll be much better off by simply defining your own function and avoiding all the wasted work that the parent class does which will slow down your sheet
|
||||
```js
|
||||
getData(options) {
|
||||
return {
|
||||
data: foundry.utils.deepClone(this.object.data)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
who knows, maybe you don't even need to copy your actor data, skip the copy and it's even faster:
|
||||
```js
|
||||
getData(options) {
|
||||
return {
|
||||
data: this.object.data
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Atropos19/02/2021
|
||||
There are two recommended ways to create owned items in 0.8.0:
|
||||
```js
|
||||
await Item.create(itemData, {parent: actor});
|
||||
await actor.createEmbeddedDocuments("Item", itemDataArray);
|
||||
```
|
||||
|
||||
|
||||
You can update an embedded item in one of two ways:
|
||||
```js
|
||||
//Method 1:
|
||||
|
||||
const item = actor.items.get(itemId);
|
||||
item.update(data);
|
||||
|
||||
//Method 2:
|
||||
actor.updateEmbeddedDocuments("Item", [{_id: itemId, ...}]);
|
||||
```
|
@ -7,6 +7,8 @@
|
||||
import { HtmlUtility } from "./html-utility.js";
|
||||
import { RdDUtility } from "./rdd-utility.js";
|
||||
import { RdDActorSheet } from "./actor-sheet.js";
|
||||
import { Misc } from "./misc.js";
|
||||
import { RdDCarac } from "./rdd-carac.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class RdDActorCreatureSheet extends RdDActorSheet {
|
||||
@ -26,40 +28,29 @@ export class RdDActorCreatureSheet extends RdDActorSheet {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getData() {
|
||||
let data = super.getData();
|
||||
console.log("Creature : ", data);
|
||||
let sheetData = super.getData();
|
||||
console.log("Creature : ", sheetData);
|
||||
|
||||
data.itemsByType = {};
|
||||
for (const item of data.items) {
|
||||
let list = data.itemsByType[item.type];
|
||||
if (!list) {
|
||||
list = [];
|
||||
data.itemsByType[item.type] = list;
|
||||
sheetData.itemsByType = Misc.classify(sheetData.items, item => item.type);
|
||||
sheetData.calc = {
|
||||
caracTotal: RdDCarac.computeTotal(sheetData.data.data.carac),
|
||||
blessures: {
|
||||
resume: sheetData.actor.computeResumeBlessure(sheetData.data.data.blessures)
|
||||
}
|
||||
list.push(item);
|
||||
}
|
||||
|
||||
// Compute current carac sum
|
||||
let sum = 0;
|
||||
Object.values(data.data.carac).forEach(carac => { if (!carac.derivee) { sum += parseInt(carac.value) } });
|
||||
data.data.caracSum = sum;
|
||||
sheetData.data.carac.taille.isTaille = true; // To avoid button link;
|
||||
|
||||
data.data.carac.taille.isTaille = true; // To avoid button link;
|
||||
data.data.blessures.resume = this.actor.computeResumeBlessure(data.data.blessures);
|
||||
|
||||
data.data.isGM = game.user.isGM;
|
||||
|
||||
data.data.competencecreature = data.itemsByType["competencecreature"];
|
||||
sheetData.data.competencecreature = sheetData.itemsByType["competencecreature"];
|
||||
|
||||
this.actor.computeEncombrementTotalEtMalusArmure();
|
||||
RdDUtility.filterItemsPerTypeForSheet(data);
|
||||
RdDUtility.buildArbreDeConteneur(this, data);
|
||||
data.data.encTotal = this.actor.encTotal;
|
||||
data.data.isGM = game.user.isGM;
|
||||
RdDUtility.filterItemsPerTypeForSheet(sheetData);
|
||||
RdDUtility.buildArbreDeConteneur(this, sheetData);
|
||||
|
||||
console.log("Creature : ", this.objetVersConteneur, data);
|
||||
console.log("Creature : ", this.objetVersConteneur, sheetData);
|
||||
|
||||
return data;
|
||||
return sheetData;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -100,7 +91,7 @@ export class RdDActorCreatureSheet extends RdDActorSheet {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/** @override */
|
||||
_updateObject(event, formData) {
|
||||
async _updateObject(event, formData) {
|
||||
// Update the Actor
|
||||
return this.object.update(formData);
|
||||
}
|
||||
|
@ -20,33 +20,17 @@ export class RdDActorEntiteSheet extends ActorSheet {
|
||||
});
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
_checkNull(items) {
|
||||
if (items && items.length) {
|
||||
return items;
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getData() {
|
||||
let data = super.getData();
|
||||
let sheetData = super.getData();
|
||||
|
||||
data.itemsByType = {};
|
||||
for (const item of data.items) {
|
||||
let list = data.itemsByType[item.type];
|
||||
if (!list) {
|
||||
list = [];
|
||||
data.itemsByType[item.type] = list;
|
||||
}
|
||||
list.push(item);
|
||||
}
|
||||
|
||||
data.data.carac.taille.isTaille = true; // To avoid button link;
|
||||
data.data.competencecreature = data.itemsByType["competencecreature"];
|
||||
data.data.isGM = game.user.isGM;
|
||||
sheetData.data.competencecreature = sheetData.itemsByType["competencecreature"];
|
||||
|
||||
return data;
|
||||
data.options = {
|
||||
isGM: game.user.isGM
|
||||
};
|
||||
|
||||
return sheetData;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -135,7 +119,7 @@ export class RdDActorEntiteSheet extends ActorSheet {
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/** @override */
|
||||
_updateObject(event, formData) {
|
||||
async _updateObject(event, formData) {
|
||||
// Update the Actor
|
||||
return this.object.update(formData);
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import { RdDItemCompetence } from "./item-competence.js";
|
||||
import { RdDBonus } from "./rdd-bonus.js";
|
||||
import { Misc } from "./misc.js";
|
||||
import { RdDCombatManager } from "./rdd-combat.js";
|
||||
import { RdDCarac } from "./rdd-carac.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class RdDActorSheet extends ActorSheet {
|
||||
@ -31,122 +32,92 @@ export class RdDActorSheet extends ActorSheet {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getData() {
|
||||
let data = super.getData();
|
||||
if ( data.actor.type == 'creature' || data.actor.type == 'humanoide') return data; // Shortcut
|
||||
async getData() {
|
||||
// Partie commune
|
||||
let sheetData = await super.getData();
|
||||
|
||||
data.data.editCaracComp = this.options.editCaracComp;
|
||||
data.data.showCompNiveauBase = this.options.showCompNiveauBase;
|
||||
data.data.montrerArchetype = this.options.montrerArchetype;
|
||||
sheetData.options = this.options;
|
||||
sheetData.itemsByType = Misc.classify(sheetData.items, item => item.type);
|
||||
sheetData.options.isGM = game.user.isGM;
|
||||
|
||||
data.itemsByType = Misc.classify(data.items);
|
||||
const carac = sheetData.data.data.carac;
|
||||
// la taille est la taille: on ne peut pas l'utiliser pour un jet
|
||||
carac.taille.isTaille = true;
|
||||
|
||||
// Competence per category
|
||||
data.data.comptageArchetype = RdDUtility.getLimitesArchetypes();
|
||||
data.data.competenceXPTotal = 0;
|
||||
data.competenceByCategory = Misc.classify(
|
||||
data.itemsByType.competence,
|
||||
item => item.data.categorie,
|
||||
item => {
|
||||
let archetypeKey = (item.data.niveau_archetype < 0) ? 0 : item.data.niveau_archetype;
|
||||
if (data.data.comptageArchetype[archetypeKey] == undefined) {
|
||||
data.data.comptageArchetype[archetypeKey] = { "niveau": archetypeKey, "nombreMax": 0, "nombre": 0};
|
||||
}
|
||||
data.data.comptageArchetype[archetypeKey].nombre = (data.data.comptageArchetype[archetypeKey]?.nombre??0) + 1; //Comptage archetype
|
||||
item.data.xpNext = RdDItemCompetence.getCompetenceNextXp(item.data.niveau);
|
||||
item.data.isLevelUp = item.data.xp >= item.data.xpNext; // Flag de niveau à MAJ
|
||||
//this.actor.checkCompetenceXP(item.name); // Petite vérification experience
|
||||
item.data.showCompetence = !data.data.showCompNiveauBase || (Number(item.data.niveau) != Number(RdDUtility.getLevelCategory(item.data.categorie)));
|
||||
// Ignorer les compétences 'troncs' à ce stade
|
||||
data.data.competenceXPTotal += RdDItemCompetence.computeCompetenceXPCost(item);
|
||||
return item;
|
||||
});
|
||||
data.data.competenceXPTotal -= RdDItemCompetence.computeEconomieCompetenceTroncXP(data.itemsByType.competence);
|
||||
if (sheetData.actor.type == 'creature') return sheetData; // Shortcut
|
||||
|
||||
// Compute current carac sum
|
||||
let sum = 0;
|
||||
let caracList = data.data.data.carac;
|
||||
for (let caracName in caracList) {
|
||||
let currentCarac = caracList[caracName];
|
||||
if (!currentCarac.derivee) {
|
||||
sum += parseInt(currentCarac.value);
|
||||
}
|
||||
currentCarac.xpNext = RdDUtility.getCaracNextXp(currentCarac.value);
|
||||
currentCarac.isLevelUp = (currentCarac.xp >= currentCarac.xpNext);
|
||||
}
|
||||
sum += (data.data.beaute >= 0) ? (data.data.beaute - 10) : 0;
|
||||
data.data.caracSum = sum;
|
||||
/* -- partie spécifique aux personnages -- */
|
||||
|
||||
// Force empty arme, at least for Esquive
|
||||
if (data.itemsByType.arme == undefined) data.itemsByType.arme = [];
|
||||
for (const arme of data.itemsByType.arme) {
|
||||
arme.data.niveau = 0; // Per default, TODO to be fixed
|
||||
for (const melee of data.competenceByCategory.melee) {
|
||||
if (melee.name == arme.data.competence)
|
||||
arme.data.niveau = melee.data.niveau
|
||||
}
|
||||
for (const tir of data.competenceByCategory.tir) {
|
||||
if (tir.name == arme.data.competence)
|
||||
arme.data.niveau = tir.data.niveau
|
||||
}
|
||||
for (const lancer of data.competenceByCategory.lancer) {
|
||||
if (lancer.name == arme.data.competence)
|
||||
arme.data.niveau = lancer.data.niveau
|
||||
}
|
||||
const competences = sheetData.itemsByType.competence;
|
||||
// toujours avoir une liste d'armes (pour mettre esquive et corps à corps)
|
||||
sheetData.itemsByType.arme = sheetData.itemsByType.arme ?? [];
|
||||
sheetData.competenceByCategory = Misc.classify(competences, comp => comp.data.categorie);
|
||||
|
||||
sheetData.calc = {
|
||||
comptageArchetype: RdDItemCompetence.computeResumeArchetype(competences),
|
||||
competenceXPTotal: RdDItemCompetence.computeTotalXP(competences),
|
||||
caracTotal: RdDCarac.computeTotal(carac),
|
||||
// Mise à jour de l'encombrement total et du prix de l'équipement
|
||||
encTotal: await sheetData.actor.computeEncombrementTotalEtMalusArmure(),
|
||||
prixTotalEquipement: await sheetData.actor.computePrixTotalEquipement(),
|
||||
surprise: RdDBonus.find(sheetData.actor.getSurprise(false)).descr,
|
||||
surEncombrementMessage: (sheetData.data.data.compteurs.surenc.value < 0) ? "Sur-Encombrement!" : "",
|
||||
fatigue: {
|
||||
malus: RdDUtility.calculMalusFatigue(sheetData.data.data.sante.fatigue.value, sheetData.data.data.sante.endurance.max),
|
||||
html: "<table class='table-fatigue'>" + RdDUtility.makeHTMLfatigueMatrix(sheetData.data.data.sante.fatigue.value, sheetData.data.data.sante.endurance.max).html() + "</table>"
|
||||
},
|
||||
resumeBlessures: sheetData.actor.computeResumeBlessure(sheetData.data.data.blessures),
|
||||
};
|
||||
|
||||
competences.forEach(it => it.visible = this.isCompetenceAffichable(it));
|
||||
RdDItemCompetence.setLevelUp(competences);
|
||||
RdDCarac.setLevelUp(carac);
|
||||
|
||||
sheetData.armes = sheetData.itemsByType.arme;
|
||||
RdDItemArme.computeNiveauArmes(sheetData.armes, competences);
|
||||
RdDItemArme.ajoutCorpsACorps(sheetData.armes, competences, carac);
|
||||
sheetData.esquive = RdDItemCompetence.getEsquive(competences);
|
||||
sheetData.armes = RdDCombatManager.finalizeArmeList(sheetData.armes, competences, carac);
|
||||
|
||||
sheetData.data.data.compteurs.chance.isChance = true;
|
||||
|
||||
|
||||
RdDUtility.filterItemsPerTypeForSheet(sheetData);
|
||||
|
||||
sheetData.tmr = {
|
||||
sortsReserve: sheetData.data.data.reve.reserve.list,
|
||||
rencontres: sheetData.data.data.reve.rencontre.list,
|
||||
caseSpeciales: sheetData.itemsByType.casetmr
|
||||
}
|
||||
|
||||
// To avoid armour and so on...
|
||||
data.data.combat = duplicate(RdDUtility.checkNull(data.itemsByType['arme']));
|
||||
data.data.combat = RdDCombatManager.finalizeArmeList(data.data.combat, data.itemsByType.competence, data.data.carac);
|
||||
RdDUtility.buildArbreDeConteneur(this, sheetData);
|
||||
|
||||
data.esquive = { name: "Esquive", niveau: data.competenceByCategory?.melee.find(it => it.name == 'Esquive')?.data.niveau ?? -6};
|
||||
let corpsACorps = data.competenceByCategory?.melee.find(it => it.name == 'Corps à corps');
|
||||
if (corpsACorps) {
|
||||
let cc_init = RdDCombatManager.calculInitiative(corpsACorps.data.niveau, data.data.carac['melee'].value);
|
||||
data.data.combat.push(RdDItemArme.mainsNues({ niveau: corpsACorps.data.niveau, initiative: cc_init }));
|
||||
}
|
||||
this.armesList = duplicate(data.data.combat);
|
||||
|
||||
caracList.isTaille = true; // To avoid button link;
|
||||
let compteursList = data.data.data.compteurs
|
||||
compteursList.chance.isChance = true;
|
||||
data.data.data.blessures.resume = this.actor.computeResumeBlessure(data.data.data.blessures);
|
||||
|
||||
// Mise à jour de l'encombrement total et du prix de l'équipement
|
||||
this.actor.computeEncombrementTotalEtMalusArmure();
|
||||
this.actor.computePrixTotalEquipement();
|
||||
|
||||
// Common data
|
||||
data.data.competenceByCategory = data.competenceByCategory;
|
||||
data.data.encTotal = this.actor.encTotal;
|
||||
data.data.prixTotalEquipement = this.actor.prixTotalEquipement;
|
||||
data.data.surprise = RdDBonus.find(this.actor.getSurprise(false)).descr;
|
||||
data.data.isGM = game.user.isGM;
|
||||
data.ajustementsConditions = CONFIG.RDD.ajustementsConditions;
|
||||
data.difficultesLibres = CONFIG.RDD.difficultesLibres;
|
||||
|
||||
// low is normal, this the base used to compute the grid.
|
||||
data.data.fatigue = {
|
||||
malus: RdDUtility.calculMalusFatigue(data.data.data.sante.fatigue.value, data.data.data.sante.endurance.max),
|
||||
html: "<table class='table-fatigue'>" + RdDUtility.makeHTMLfatigueMatrix(data.data.data.sante.fatigue.value, data.data.data.sante.endurance.max).html() + "</table>"
|
||||
sheetData.subacteurs = {
|
||||
vehiculesList: sheetData.actor.buildVehiculesList(),
|
||||
montures: sheetData.actor.buildMonturesList(),
|
||||
suivants: sheetData.actor.buildSuivantsList()
|
||||
}
|
||||
|
||||
RdDUtility.filterItemsPerTypeForSheet(data);
|
||||
data.data.sortReserve = data.data.data.reve.reserve.list;
|
||||
data.data.rencontres = duplicate(data.data.data.reve.rencontre.list);
|
||||
data.data.caseSpeciales = data.itemsByType['casetmr'];
|
||||
RdDUtility.buildArbreDeConteneur(this, data);
|
||||
data.data.surEncombrementMessage = (data.data.data.compteurs.surenc.value < 0) ? "Sur-Encombrement!" : "";
|
||||
data.data.vehiculesList = this.actor.buildVehiculesList();
|
||||
data.data.monturesList = this.actor.buildMonturesList();
|
||||
data.data.suivantsList = this.actor.buildSuivantsList();
|
||||
return data;
|
||||
// conserver la liste des armes
|
||||
this.armesList = sheetData.armes;
|
||||
return sheetData;
|
||||
}
|
||||
|
||||
computeNiveauArme(armes, competences) {
|
||||
for (const arme of armes) {
|
||||
const compArme = competences.find(it => it.name == arme.data.competence);
|
||||
arme.data.niveau = compArme?.data.niveau ?? -8;
|
||||
}
|
||||
}
|
||||
|
||||
isCompetenceAffichable(competence) {
|
||||
return !this.options.showCompNiveauBase || !RdDItemCompetence.isNiveauBase(competence);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async _onDrop(event) {
|
||||
let toSuper = await RdDUtility.processItemDropEvent(this, event);
|
||||
if ( toSuper) {
|
||||
if (toSuper) {
|
||||
super._onDrop(event);
|
||||
}
|
||||
}
|
||||
@ -215,12 +186,12 @@ export class RdDActorSheet extends ActorSheet {
|
||||
html.find('.item-delete').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
RdDUtility.confirmerSuppression(this, li);
|
||||
});
|
||||
});
|
||||
html.find('.subacteur-delete').click(ev => {
|
||||
const li = $(ev.currentTarget).parents(".item");
|
||||
RdDUtility.confirmerSuppressionSubacteur(this, li);
|
||||
});
|
||||
|
||||
|
||||
html.find('#encaisser-direct').click(ev => {
|
||||
this.actor.encaisser();
|
||||
});
|
||||
@ -337,12 +308,12 @@ export class RdDActorSheet extends ActorSheet {
|
||||
html.find('.subacteur-label a').click((event) => {
|
||||
const li = $(event.currentTarget).parents(".item");
|
||||
let actorId = li.data('actor-id');
|
||||
let actor = game.actors.get( actorId) ;
|
||||
if ( actor ) {
|
||||
let actor = game.actors.get(actorId);
|
||||
if (actor) {
|
||||
actor.sheet.render(true);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Points de reve actuel
|
||||
html.find('.ptreve-actuel a').click((event) => {
|
||||
this.actor.rollCarac('reve-actuel');
|
||||
@ -580,7 +551,7 @@ export class RdDActorSheet extends ActorSheet {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/** @override */
|
||||
_updateObject(event, formData) {
|
||||
async _updateObject(event, formData) {
|
||||
// Update the Actor
|
||||
return this.object.update(formData);
|
||||
}
|
||||
|
@ -24,30 +24,26 @@ export class RdDActorVehiculeSheet extends ActorSheet {
|
||||
});
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
_checkNull(items) {
|
||||
if (items && items.length) {
|
||||
return items;
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
getData() {
|
||||
let data = super.getData();
|
||||
let sheetData = super.getData();
|
||||
sheetData.options = {
|
||||
isGM: game.user.isGM
|
||||
};
|
||||
|
||||
data.itemsByType = Misc.classify(data.items);
|
||||
sheetData.itemsByType = Misc.classify(sheetData.items);
|
||||
|
||||
RdDUtility.filterItemsPerTypeForSheet(data);
|
||||
RdDUtility.buildArbreDeConteneur(this, data);
|
||||
RdDUtility.filterItemsPerTypeForSheet(sheetData);
|
||||
RdDUtility.buildArbreDeConteneur(this, sheetData);
|
||||
|
||||
this.actor.computeEncombrementTotalEtMalusArmure();
|
||||
data.data.isGM = game.user.isGM;
|
||||
data.data.surEncombrementMessage = (this.encTotal > data.capacite_encombrement) ? "Sur-Encombrement!" : "";
|
||||
sheetData.calc = {
|
||||
surEncombrementMessage: (this.encTotal > sheetData.capacite_encombrement) ? "Sur-Encombrement!" : ""
|
||||
}
|
||||
|
||||
console.log("DATA", data);
|
||||
console.log("DATA", sheetData);
|
||||
|
||||
return data;
|
||||
return sheetData;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -102,7 +98,7 @@ export class RdDActorVehiculeSheet extends ActorSheet {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/** @override */
|
||||
_updateObject(event, formData) {
|
||||
async _updateObject(event, formData) {
|
||||
// Update the Actor
|
||||
return this.object.update(formData);
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ export class RdDActor extends Actor {
|
||||
);
|
||||
if (index >=0 ) {
|
||||
reserve.list.splice(index,1);
|
||||
await this.update({ "data.reve.reserve": reserve });
|
||||
await this.update({ "data.data.reve.reserve": reserve });
|
||||
}
|
||||
}
|
||||
|
||||
@ -358,7 +358,7 @@ export class RdDActor extends Actor {
|
||||
await this._recupererBlessures(message, "legere", blessures.legeres.liste.filter(b => b.active), []);
|
||||
await this._recupererBlessures(message, "grave", blessures.graves.liste.filter(b => b.active), blessures.legeres.liste);
|
||||
await this._recupererBlessures(message, "critique", blessures.critiques.liste.filter(b => b.active), blessures.graves.liste);
|
||||
await this.update({ "data.blessures": blessures });
|
||||
await this.update({ "data.data.blessures": blessures });
|
||||
await this._recupererVie(message);
|
||||
await this.jetDeMoral('neutre');
|
||||
|
||||
@ -475,7 +475,7 @@ export class RdDActor extends Actor {
|
||||
this._supprimerBlessure(blessure);
|
||||
}
|
||||
}
|
||||
await this.update({ "data.blessures": blessures });
|
||||
await this.update({ "data.data.blessures": blessures });
|
||||
}
|
||||
if (this.isPersonnage()) {
|
||||
await this.setEthylisme(1);
|
||||
@ -486,7 +486,7 @@ export class RdDActor extends Actor {
|
||||
if (this.data.data.sante.fatigue) {
|
||||
let fatigue = duplicate(this.data.data.sante.fatigue)
|
||||
fatigue.value = 0;
|
||||
await this.update({ "data.sante.fatigue": fatigue });
|
||||
await this.update({ "data.data.sante.fatigue": fatigue });
|
||||
}
|
||||
}
|
||||
ChatMessage.create(message);
|
||||
@ -522,7 +522,7 @@ export class RdDActor extends Actor {
|
||||
message.content += `Vous dégrisez un peu (${RdDUtility.getNomEthylisme(ethylisme.value)}). `;
|
||||
}
|
||||
}
|
||||
await this.update({ "data.compteurs.ethylisme": ethylisme });
|
||||
await this.update({ "data.data.compteurs.ethylisme": ethylisme });
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -544,7 +544,7 @@ export class RdDActor extends Actor {
|
||||
}
|
||||
fatigue.value = Math.max(fatigueMin, this._calculRecuperationSegment(fatigue.value));
|
||||
console.log("recupererFatigue", fatigue)
|
||||
await this.update({ "data.sante.fatigue": fatigue });
|
||||
await this.update({ "data.data.sante.fatigue": fatigue });
|
||||
if (fatigue.value == 0) {
|
||||
message.content += "Vous êtes complêtement reposé. ";
|
||||
}
|
||||
@ -686,7 +686,7 @@ export class RdDActor extends Actor {
|
||||
async sortMisEnReserve(rollData, sort) {
|
||||
let reserve = duplicate(this.data.data.reve.reserve);
|
||||
reserve.list.push({ coord: rollData.tmr.coord, sort: sort, draconic: duplicate(rollData.competence) });
|
||||
await this.update({ "data.reve.reserve": reserve });
|
||||
await this.update({ "data.data.reve.reserve": reserve });
|
||||
this.currentTMR.updateTokens();
|
||||
}
|
||||
|
||||
@ -802,14 +802,14 @@ export class RdDActor extends Actor {
|
||||
//console.log("Update", fieldName, fieldValue);
|
||||
let compteurs = duplicate(this.data.data.compteurs);
|
||||
compteurs[fieldName].value = fieldValue;
|
||||
await this.update({ "data.compteurs": compteurs });
|
||||
await this.update({ "data.data.compteurs": compteurs });
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async updateProtectionValue(fieldName, fieldValue) {
|
||||
let attributs = duplicate(this.data.data.attributs);
|
||||
attributs[fieldName].value = fieldValue;
|
||||
await this.update({ "data.attributs": attributs });
|
||||
await this.update({ "data.data.attributs": attributs });
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -1018,8 +1018,9 @@ export class RdDActor extends Actor {
|
||||
// Mise à jour éventuelle du malus armure
|
||||
if (this.data.data.attributs && this.data.data.attributs.malusarmure && newMalusArmure != malusArmureData.value) {
|
||||
malusArmureData.value = newMalusArmure;
|
||||
await this.update({ "data.attributs.malusarmure": malusArmureData });
|
||||
await this.update({ "data.data.attributs.malusarmure": malusArmureData });
|
||||
}
|
||||
return this.encTotal;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -1037,6 +1038,7 @@ export class RdDActor extends Actor {
|
||||
}
|
||||
// Mise à jour valeur totale de l'équipement
|
||||
this.prixTotalEquipement = prixTotalEquipement;
|
||||
return this.prixTotalEquipement;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -1104,7 +1106,7 @@ export class RdDActor extends Actor {
|
||||
ret = "souffle";
|
||||
}
|
||||
|
||||
await this.update({ "data.reve.refoulement": refoulement });
|
||||
await this.update({ "data.data.reve.refoulement": refoulement });
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1129,7 +1131,7 @@ export class RdDActor extends Actor {
|
||||
queue = await RdDRollTables.getOmbre();
|
||||
let myReve = duplicate(this.data.data.reve.reve);
|
||||
myReve.thanatosused = false;
|
||||
await this.update({ "data.reve.reve": myReve } );
|
||||
await this.update({ "data.data.reve.reve": myReve } );
|
||||
}
|
||||
else {
|
||||
queue = await RdDRollTables.getQueue();
|
||||
@ -1181,7 +1183,7 @@ export class RdDActor extends Actor {
|
||||
if (newTable.length != len) {
|
||||
rencontres.list = newTable;
|
||||
//console.log("Result: ", rencontres);
|
||||
await this.update({ "data.reve.rencontre": rencontres });
|
||||
await this.update({ "data.data.reve.rencontre": rencontres });
|
||||
}
|
||||
}
|
||||
|
||||
@ -1197,7 +1199,7 @@ export class RdDActor extends Actor {
|
||||
}
|
||||
if (!already) {
|
||||
rencontres.list.push(currentRencontre);
|
||||
await this.update({ "data.reve.rencontre": rencontres });
|
||||
await this.update({ "data.data.reve.rencontre": rencontres });
|
||||
}
|
||||
}
|
||||
|
||||
@ -1209,19 +1211,19 @@ export class RdDActor extends Actor {
|
||||
if ( i != rencontreKey)
|
||||
newList.push( list[i]);
|
||||
}
|
||||
await this.update({ "data.reve.rencontre.list": newList });
|
||||
await this.update({ "data.data.reve.rencontre.list": newList });
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async updateCoordTMR(coord) {
|
||||
await this.update({ "data.reve.tmrpos.coord": coord });
|
||||
await this.update({ "data.data.reve.tmrpos.coord": coord });
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async reveActuelIncDec(value) {
|
||||
let reve = duplicate(this.data.data.reve.reve);
|
||||
reve.value = Math.max(reve.value + value, 0);
|
||||
await this.update({ "data.reve.reve": reve });
|
||||
await this.update({ "data.data.reve.reve": reve });
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -1235,16 +1237,16 @@ export class RdDActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async setPointsDeSeuil(value) {
|
||||
let seuil = duplicate(this.data.data.reve.seuil);
|
||||
seuil.value = value;
|
||||
await this.update({ "data.reve.seuil": seuil });
|
||||
// let seuil = duplicate(this.data.data.reve.seuil);
|
||||
// seuil.value = value;
|
||||
await this.update({ "data.data.reve.seuil.value": value });
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async setPointsDeChance(value) {
|
||||
let chance = duplicate(this.data.data.compteurs.chance);
|
||||
chance.value = value;
|
||||
await this.update({ "data.compteurs.chance": chance });
|
||||
await this.update({ "data.data.compteurs.chance": chance });
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -1285,7 +1287,7 @@ export class RdDActor extends Actor {
|
||||
let sonneData = duplicate(this.data.data.sante.sonne);
|
||||
sonneData.value = sonne;
|
||||
sonneData.round = round;
|
||||
await this.update({ "data.sante.sonne": sonneData });
|
||||
await this.update({ "data.data.sante.sonne": sonneData });
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -1307,7 +1309,7 @@ export class RdDActor extends Actor {
|
||||
}
|
||||
if (roll.total == 1) {
|
||||
let xp = Misc.toInt(this.data.data.carac.constitution.xp) + 1;
|
||||
this.update({ "data.carac.constitution.xp": xp }); // +1 XP !
|
||||
this.update({ "data.data.carac.constitution.xp": xp }); // +1 XP !
|
||||
ChatMessage.create( { content: `${this.name} a obenu 1 sur son Jet d'Endurance et a gagné 1 point d'Expérience en Constitution. Ce point d'XP a été ajouté automatiquement).`});
|
||||
}
|
||||
if (result.sonne) {
|
||||
@ -1340,7 +1342,7 @@ export class RdDActor extends Actor {
|
||||
msgText += `et gagne 1 Point d'Experience en Constitution`;
|
||||
let constit = duplicate(this.data.data.carac.constitution)
|
||||
constit.xp += 1;
|
||||
await this.update({ "data.carac.constitution": constit });
|
||||
await this.update({ "data.data.carac.constitution": constit });
|
||||
}
|
||||
} else {
|
||||
msgText += `${this.name} a échoué son Jet d'Endurance et devient Sonné`;
|
||||
@ -1424,7 +1426,7 @@ export class RdDActor extends Actor {
|
||||
if (sante.fatigue && fatigue > 0) {
|
||||
sante.fatigue.value = Math.max(sante.fatigue.value + fatigue, this._computeFatigueMin());
|
||||
}
|
||||
await this.update({ "data.sante": sante });
|
||||
await this.update({ "data.data.sante": sante });
|
||||
if (this.isDead()) {
|
||||
await this.addStatusEffectById('dead');
|
||||
}
|
||||
@ -1537,7 +1539,7 @@ export class RdDActor extends Actor {
|
||||
if (degre == 1) {
|
||||
ethylisme.jet_moral = false;
|
||||
}
|
||||
await this.update({ "data.compteurs.ethylisme": ethylisme });
|
||||
await this.update({ "data.data.compteurs.ethylisme": ethylisme });
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -1649,7 +1651,7 @@ export class RdDActor extends Actor {
|
||||
compteurs.experience.value += stressRollData.xp;
|
||||
compteurs.dissolution.value = dissolution - perteDissolution;
|
||||
compteurs.exaltation.value = 0;
|
||||
await this.update({ "data.compteurs": compteurs });
|
||||
await this.update({ "data.data.compteurs": compteurs });
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -1969,7 +1971,7 @@ export class RdDActor extends Actor {
|
||||
}
|
||||
|
||||
myReve.value = Math.max(myReve.value - rollData.depenseReve, 0);
|
||||
await this.update({ "data.reve.reve": myReve });
|
||||
await this.update({ "data.data.reve.reve": myReve });
|
||||
|
||||
if (closeTMR) {
|
||||
this.currentTMR.close(); // Close TMR !
|
||||
@ -2311,7 +2313,7 @@ export class RdDActor extends Actor {
|
||||
if (limit) {
|
||||
chance.value = Math.min(chance.value, this.getChance())
|
||||
}
|
||||
await this.update({ "data.compteurs.chance": chance });
|
||||
await this.update({ "data.data.compteurs.chance": chance });
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -2320,7 +2322,7 @@ export class RdDActor extends Actor {
|
||||
ChatMessage.create({ content: `<span class="rdd-roll-part">${this.name} a fait appel à la Destinée !</span>` });
|
||||
let destinee = duplicate(this.data.data.compteurs.destinee);
|
||||
destinee.value = destinee.value - 1;
|
||||
await this.update({ "data.compteurs.destinee": destinee });
|
||||
await this.update({ "data.data.compteurs.destinee": destinee });
|
||||
onSuccess();
|
||||
}
|
||||
else {
|
||||
@ -2373,7 +2375,7 @@ export class RdDActor extends Actor {
|
||||
let selectedCarac = RdDActor._findCaracByName(carac, caracName);
|
||||
if (!selectedCarac.derivee) {
|
||||
selectedCarac.xp = Misc.toInt(selectedCarac.xp) + xpCarac;
|
||||
await this.update({ "data.carac": carac });
|
||||
await this.update({ "data.data.carac": carac });
|
||||
} else {
|
||||
ChatMessage.create({
|
||||
content: `Vous avez ${xpCarac} à répartir pour la caractéristique dérivée ${caracName}. Vous devez le faire manuellement.`,
|
||||
@ -2751,7 +2753,7 @@ export class RdDActor extends Actor {
|
||||
}
|
||||
|
||||
encaissement.endurance = Math.max(encaissement.endurance, -endActuelle);
|
||||
this.update({ "data.blessures": blessures });
|
||||
this.update({ "data.data.blessures": blessures });
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -2857,7 +2859,7 @@ export class RdDActor extends Actor {
|
||||
return;
|
||||
}
|
||||
resonnance.actors.push(attaquant._id);
|
||||
await this.update({ "data.sante.resonnance": resonnance });
|
||||
await this.update({ "data.data.sante.resonnance": resonnance });
|
||||
return;
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
@ -3151,7 +3153,7 @@ export class RdDActor extends Actor {
|
||||
this.deleteStatusEffectById(statusEffect.id, options);
|
||||
const effet = duplicate(statusEffect);
|
||||
effet["flags.core.statusId"] = effet.id;
|
||||
await this.createEmbeddedDocuments('ActiveEffect', effet, options);
|
||||
await this.createEmbeddedDocuments('ActiveEffect', [effet], options);
|
||||
this.applyActiveEffects();
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { RdDItemCompetenceCreature } from "./item-competencecreature.js"
|
||||
import { RdDCombatManager } from "./rdd-combat.js"
|
||||
|
||||
const nomCategorieParade = {
|
||||
"sans-armes": "Sans arme / armes naturelles",
|
||||
@ -167,4 +168,24 @@ export class RdDItemArme extends Item {
|
||||
}
|
||||
return mainsNues
|
||||
}
|
||||
}
|
||||
|
||||
static ajoutCorpsACorps(armes, competences, carac) {
|
||||
let corpsACorps = competences.find(it => it.name == 'Corps à corps');
|
||||
if (corpsACorps) {
|
||||
let cc_init = RdDCombatManager.calculInitiative(corpsACorps.data.niveau, carac['melee'].value);
|
||||
armes.push(RdDItemArme.mainsNues({ niveau: corpsACorps.data.niveau, initiative: cc_init }));
|
||||
}
|
||||
}
|
||||
|
||||
static computeNiveauArmes(armes, competences) {
|
||||
for (const arme of armes) {
|
||||
arme.data.niveau = RdDItemArme.computeNiveauArme(arme, competences);
|
||||
}
|
||||
}
|
||||
|
||||
static computeNiveauArme(arme, competences) {
|
||||
const compName = arme.data.competence;
|
||||
const compArme = competences.find(it => it.name == compName);
|
||||
return compArme?.data.niveau ?? -8;
|
||||
}
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
import { RdDUtility } from "./rdd-utility.js";
|
||||
|
||||
const competenceTroncs = [["Esquive", "Dague", "Corps à corps"],
|
||||
["Epée à 1 main", "Epée à 2 mains", "Hache à 1 main", "Hache à 2 mains", "Lance", "Masse à 1 main", "Masse à 2 mains"]];
|
||||
@ -55,33 +56,70 @@ export class RdDItemCompetence extends Item {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static computeCompetenceXPCost(competence) {
|
||||
let xp = RdDItemCompetence.getDeltaXp(competence.data.base, competence.data.niveau ?? competence.data.base);
|
||||
xp += competence.data.xp ?? 0;
|
||||
if ( competence.name.includes('Thanatos') ) xp *= 2; /// Thanatos compte double !
|
||||
xp += competence.data.xp_sort ?? 0;
|
||||
return xp;
|
||||
static computeTotalXP(competences) {
|
||||
const total = competences.map(c => RdDItemCompetence.computeXP(c))
|
||||
.reduce((a, b) => a + b, 0);
|
||||
const economieTronc = RdDItemCompetence.computeEconomieXPTronc(competences);
|
||||
return total - economieTronc;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static computeEconomieCompetenceTroncXP(competences) {
|
||||
let economie = 0;
|
||||
for (let troncList of competenceTroncs) {
|
||||
let list = troncList.map(name => RdDItemCompetence.findCompetence(competences, name))
|
||||
.sort( (c1, c2) => c2.data.niveau - c1.data.niveau); // tri du plus haut au plus bas
|
||||
list.splice(0,1); // ignorer la plus élevée
|
||||
list.forEach(c => {
|
||||
economie += RdDItemCompetence.getDeltaXp(c.data.base, Math.min(c.data.niveau, 0) );
|
||||
});
|
||||
}
|
||||
return economie;
|
||||
static computeXP(competence) {
|
||||
// Thanatos compte double !
|
||||
const factor = competence.name.includes('Thanatos') ? 2 : 1
|
||||
const xpNiveau = RdDItemCompetence.computeDeltaXP(competence.data.base, competence.data.niveau ?? competence.data.base);
|
||||
const xp = competence.data.xp ?? 0;
|
||||
const xpSort = competence.data.xp_sort ?? 0;
|
||||
return factor * (xpNiveau + xp) + xpSort;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static computeEconomieXPTronc(competences) {
|
||||
return competenceTroncs.map(
|
||||
list => list.map(name => RdDItemCompetence.findCompetence(competences, name))
|
||||
// calcul du coût xp jusqu'au niveau 0 maximum
|
||||
.map(it => RdDItemCompetence.computeDeltaXP(it.data.base, Math.min(it.data.niveau, 0)))
|
||||
.sort((a, b) => b - a) // tri descendant
|
||||
.splice(0, 1) // ignorer le coût xp le plus élevé
|
||||
.reduce((a, b) => a + b, 0)
|
||||
).reduce((a, b) => a + b, 0);
|
||||
}
|
||||
|
||||
static setLevelUp(competences) {
|
||||
competences.forEach(it => {
|
||||
it.data.xpNext = RdDItemCompetence.getCompetenceNextXp(it.data.niveau);
|
||||
it.data.isLevelUp = it.data.xp >= it.data.xpNext;
|
||||
});
|
||||
}
|
||||
|
||||
static computeResumeArchetype(competences) {
|
||||
const archetype = RdDUtility.getLimitesArchetypes();
|
||||
competences.forEach(item => {
|
||||
let niveau = (item.data.niveau_archetype < 0) ? 0 : item.data.niveau_archetype;
|
||||
archetype[niveau] = archetype[niveau] ?? { "niveau": niveau, "nombreMax": 0, "nombre": 0 };
|
||||
archetype[niveau].nombre = (archetype[niveau]?.nombre ?? 0) + 1;
|
||||
});
|
||||
return archetype;
|
||||
}
|
||||
|
||||
static isVisible(competence) {
|
||||
return Number(competence.data.niveau) != RdDUtility.getCategorieNiveauBase(competence.data.categorie);
|
||||
}
|
||||
|
||||
static isNiveauBase(competence) {
|
||||
return Number(competence.data.niveau) == RdDUtility.getCategorieNiveauBase(competence.data.categorie);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static findCompetence(list, name) {
|
||||
name = name.toLowerCase();
|
||||
return list.find(item => item.name.toLowerCase() == name && (item.type == "competence" || item.type == "competencecreature"))
|
||||
return list.find(it => it.name.toLowerCase() == name && (it.type == "competence" || it.type == "competencecreature"))
|
||||
}
|
||||
|
||||
static getEsquive(competences) {
|
||||
return { name: "Esquive", niveau: RdDItemCompetence.findCompetence(competences, 'Esquive')?.data.niveau ?? -6 };
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -96,14 +134,14 @@ export class RdDItemCompetence extends Item {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static getDeltaXp(from, to) {
|
||||
static computeDeltaXP(from, to) {
|
||||
RdDItemCompetence._valideNiveau(from);
|
||||
RdDItemCompetence._valideNiveau(to);
|
||||
return competence_xp_cumul[to] - competence_xp_cumul[from];
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static _valideNiveau(niveau){
|
||||
static _valideNiveau(niveau) {
|
||||
if (niveau < -11 || niveau > competence_niveau_max) {
|
||||
console.warn("Niveau en dehors des niveaux de compétences: [-11, " + competence_niveau_max + "]", niveau)
|
||||
}
|
||||
|
@ -47,27 +47,27 @@ export class RdDItemSheet extends ItemSheet {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async getData() {
|
||||
let data = super.getData();
|
||||
let sheetData = super.getData();
|
||||
|
||||
data.categorieCompetences = RdDUtility.getCategorieCompetences();
|
||||
if ( data.item.type == 'tache' || data.item.type == 'livre' || data.item.type == 'meditation' || data.item.type == 'oeuvre') {
|
||||
data.caracList = duplicate(game.system.model.Actor.personnage.carac);
|
||||
data.competences = await RdDUtility.loadCompendiumNames( 'foundryvtt-reve-de-dragon.competences' );
|
||||
sheetData.categorieCompetences = RdDUtility.getCategorieCompetences();
|
||||
if ( sheetData.item.type == 'tache' || sheetData.item.type == 'livre' || sheetData.item.type == 'meditation' || sheetData.item.type == 'oeuvre') {
|
||||
sheetData.caracList = duplicate(game.system.model.Actor.personnage.carac);
|
||||
sheetData.competences = await RdDUtility.loadCompendiumNames( 'foundryvtt-reve-de-dragon.competences' );
|
||||
}
|
||||
if (data.item.type == 'arme') {
|
||||
data.competences = await RdDUtility.loadCompendium( 'foundryvtt-reve-de-dragon.competences', it => RdDItemCompetence.isCompetenceArme(it));
|
||||
if (sheetData.item.type == 'arme') {
|
||||
sheetData.competences = await RdDUtility.loadCompendium( 'foundryvtt-reve-de-dragon.competences', it => RdDItemCompetence.isCompetenceArme(it));
|
||||
}
|
||||
if ( data.item.type == 'recettealchimique' ) {
|
||||
RdDAlchimie.processManipulation(data.item, this.actor && this.actor.id );
|
||||
if ( sheetData.item.type == 'recettealchimique' ) {
|
||||
RdDAlchimie.processManipulation(sheetData.item, this.actor && this.actor.id );
|
||||
}
|
||||
if ( this.actor ) {
|
||||
data.isOwned = true;
|
||||
data.actorId = this.actor.id;
|
||||
sheetData.isOwned = true;
|
||||
sheetData.actorId = this.actor.id;
|
||||
}
|
||||
data.bonusCaseList = RdDItemSort.getBonusCaseList(data, true);
|
||||
data.isGM = game.user.isGM; // Pour verrouiller certaines éditions
|
||||
sheetData.bonusCaseList = RdDItemSort.getBonusCaseList(sheetData, true);
|
||||
sheetData.isGM = game.user.isGM; // Pour verrouiller certaines éditions
|
||||
|
||||
return data;
|
||||
return sheetData;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -112,7 +112,7 @@ export class RdDItemSheet extends ItemSheet {
|
||||
async _onClickSelectCategorie(event) {
|
||||
event.preventDefault();
|
||||
|
||||
let level = RdDUtility.getLevelCategory(event.currentTarget.value);
|
||||
let level = RdDUtility.getCategorieNiveauBase(event.currentTarget.value);
|
||||
this.object.data.data.base = level;
|
||||
$("#base").val( level );
|
||||
}
|
||||
@ -127,7 +127,7 @@ export class RdDItemSheet extends ItemSheet {
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/** @override */
|
||||
_updateObject(event, formData) {
|
||||
async _updateObject(event, formData) {
|
||||
// Données de bonus de cases ?
|
||||
formData = RdDItemSort.buildBonusCaseStringFromFormData( formData );
|
||||
//console.log("HERE", this, formData, this.object.data );
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Grammar } from "./grammar.js";
|
||||
import { RdDUtility } from "./rdd-utility.js";
|
||||
|
||||
export class RdDCarac {
|
||||
|
||||
@ -20,6 +21,21 @@ export class RdDCarac {
|
||||
RdDCarac.isChance(selectedCarac) ||
|
||||
(RdDCarac.isReve(selectedCarac) && !competence);
|
||||
}
|
||||
|
||||
static computeTotal(carac, beaute=undefined) {
|
||||
const total = Object.values(carac).filter(c => !c.derivee)
|
||||
.map(it => parseInt(it.value))
|
||||
.reduce((a, b) => a + b, 0);
|
||||
const beauteSuperieur10 = Math.max((beaute ?? 10) - 10, 0);
|
||||
return total + beauteSuperieur10;
|
||||
}
|
||||
|
||||
static setLevelUp(carac) {
|
||||
Object.values(carac).forEach(it => {
|
||||
it.xpNext = RdDUtility.getCaracNextXp(it.value);
|
||||
it.isLevelUp = (it.xp >= it.xpNext);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* L’appel à la chance n’est possible que pour recommencer les jets d’actions physiques :
|
||||
|
@ -257,7 +257,7 @@ export class RdDCommands {
|
||||
if (params && (params.length == 1 || params.length == 2)) {
|
||||
let to = params.length == 1 ? Number(params[0]) : Number(params[1]);
|
||||
let from = params.length == 1 ? to - 1 : Number(params[0]);
|
||||
RdDCommands._chatAnswer(msg, `Coût pour passer une compétence de ${from} à ${to}: ${RdDItemCompetence.getDeltaXp(from, to)}`);
|
||||
RdDCommands._chatAnswer(msg, `Coût pour passer une compétence de ${from} à ${to}: ${RdDItemCompetence.computeDeltaXP(from, to)}`);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
|
@ -12,14 +12,14 @@ import { Grammar } from "./grammar.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
const categorieCompetences = {
|
||||
"generale": { level: "-4", label: "Générales" },
|
||||
"particuliere": { level: "-8", label: "Particulières" },
|
||||
"specialisee": { level: "-11", label: "Spécialisées" },
|
||||
"connaissance": { level: "-11", label: "Connaissances" },
|
||||
"draconic": { level: "-11", label: "Draconics" },
|
||||
"melee": { level: "-6", label: "Mêlée" },
|
||||
"tir": { level: "-8", label: "Tir" },
|
||||
"lancer": { level: "-8", label: "Lancer" }
|
||||
"generale": { level: -4, label: "Générales" },
|
||||
"particuliere": { level: -8, label: "Particulières" },
|
||||
"specialisee": { level: -11, label: "Spécialisées" },
|
||||
"connaissance": { level: -11, label: "Connaissances" },
|
||||
"draconic": { level: -11, label: "Draconics" },
|
||||
"melee": { level: -6, label: "Mêlée" },
|
||||
"tir": { level: -8, label: "Tir" },
|
||||
"lancer": { level: -8, label: "Lancer" }
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -267,10 +267,7 @@ export class RdDUtility {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static checkNull(items) {
|
||||
if (items && items.length) {
|
||||
return items;
|
||||
}
|
||||
return [];
|
||||
return items ?? [];
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -296,32 +293,39 @@ export class RdDUtility {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static filterItemsPerTypeForSheet(data) {
|
||||
data.data.materiel = this.checkNull(data.itemsByType['objet']);
|
||||
data.data.conteneurs = this.checkNull(data.itemsByType['conteneur']);
|
||||
data.data.armes = this.checkNull(data.itemsByType['arme']);
|
||||
data.data.armures = this.checkNull(data.itemsByType['armure']);
|
||||
data.data.livres = this.checkNull(data.itemsByType['livre']);
|
||||
data.data.potions = this.checkNull(data.itemsByType['potion']);
|
||||
data.data.ingredients = this.checkNull(data.itemsByType['ingredient']);
|
||||
data.data.munitions = this.checkNull(data.itemsByType['munition']);
|
||||
data.data.herbes = this.checkNull(data.itemsByType['herbe']);
|
||||
data.data.sorts = this.checkNull(data.itemsByType['sort']);
|
||||
data.data.queues = this.checkNull(data.itemsByType['queue']);
|
||||
data.data.souffles = this.checkNull(data.itemsByType['souffle']);
|
||||
data.data.ombres = this.checkNull(data.itemsByType['ombre']);
|
||||
data.data.tetes = this.checkNull(data.itemsByType['tete']);
|
||||
data.data.taches = this.checkNull(data.itemsByType['tache']);
|
||||
data.data.monnaie = this.checkNull(data.itemsByType['monnaie']);
|
||||
data.data.meditations = this.checkNull(data.itemsByType['meditation']);
|
||||
data.data.chants = this.checkNull(data.itemsByType['chant']);
|
||||
data.data.danses = this.checkNull(data.itemsByType['danse']);
|
||||
data.data.musiques = this.checkNull(data.itemsByType['musique']);
|
||||
data.data.oeuvres = this.checkNull(data.itemsByType['oeuvre']);
|
||||
data.data.jeux = this.checkNull(data.itemsByType['jeu']);
|
||||
data.data.recettescuisine = this.checkNull(data.itemsByType['recettecuisine']);
|
||||
data.data.recettesAlchimiques = this.checkNull(data.itemsByType['recettealchimique']);
|
||||
data.data.objets = data.data.conteneurs.concat(data.data.materiel).concat(data.data.armes).concat(data.data.armures).concat(data.data.munitions).concat(data.data.livres).concat(data.data.potions).concat(data.data.herbes).concat(data.data.ingredients);
|
||||
static filterItemsPerTypeForSheet(sheetData) {
|
||||
sheetData.data.materiel = this.checkNull(sheetData.itemsByType['objet']);
|
||||
sheetData.data.conteneurs = this.checkNull(sheetData.itemsByType['conteneur']);
|
||||
sheetData.data.armes = this.checkNull(sheetData.itemsByType['arme']);
|
||||
sheetData.data.armures = this.checkNull(sheetData.itemsByType['armure']);
|
||||
sheetData.data.livres = this.checkNull(sheetData.itemsByType['livre']);
|
||||
sheetData.data.potions = this.checkNull(sheetData.itemsByType['potion']);
|
||||
sheetData.data.ingredients = this.checkNull(sheetData.itemsByType['ingredient']);
|
||||
sheetData.data.munitions = this.checkNull(sheetData.itemsByType['munition']);
|
||||
sheetData.data.herbes = this.checkNull(sheetData.itemsByType['herbe']);
|
||||
sheetData.data.sorts = this.checkNull(sheetData.itemsByType['sort']);
|
||||
sheetData.data.queues = this.checkNull(sheetData.itemsByType['queue']);
|
||||
sheetData.data.souffles = this.checkNull(sheetData.itemsByType['souffle']);
|
||||
sheetData.data.ombres = this.checkNull(sheetData.itemsByType['ombre']);
|
||||
sheetData.data.tetes = this.checkNull(sheetData.itemsByType['tete']);
|
||||
sheetData.data.taches = this.checkNull(sheetData.itemsByType['tache']);
|
||||
sheetData.data.monnaie = this.checkNull(sheetData.itemsByType['monnaie']);
|
||||
sheetData.data.meditations = this.checkNull(sheetData.itemsByType['meditation']);
|
||||
sheetData.data.chants = this.checkNull(sheetData.itemsByType['chant']);
|
||||
sheetData.data.danses = this.checkNull(sheetData.itemsByType['danse']);
|
||||
sheetData.data.musiques = this.checkNull(sheetData.itemsByType['musique']);
|
||||
sheetData.data.oeuvres = this.checkNull(sheetData.itemsByType['oeuvre']);
|
||||
sheetData.data.jeux = this.checkNull(sheetData.itemsByType['jeu']);
|
||||
sheetData.data.recettescuisine = this.checkNull(sheetData.itemsByType['recettecuisine']);
|
||||
sheetData.data.recettesAlchimiques = this.checkNull(sheetData.itemsByType['recettealchimique']);
|
||||
sheetData.data.objets = sheetData.data.conteneurs.concat(sheetData.data.materiel)
|
||||
.concat(sheetData.data.armes)
|
||||
.concat(sheetData.data.armures)
|
||||
.concat(sheetData.data.munitions)
|
||||
.concat(sheetData.data.livres)
|
||||
.concat(sheetData.data.potions)
|
||||
.concat(sheetData.data.herbes)
|
||||
.concat(sheetData.data.ingredients);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -352,16 +356,16 @@ export class RdDUtility {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static buildArbreDeConteneur(actorSheet, data) {
|
||||
static buildArbreDeConteneur(actorSheet, sheetData) {
|
||||
actorSheet.objetVersConteneur = {}; // Table de hash locale pour recupération rapide du conteneur parent (si existant)
|
||||
// Attribution des objets aux conteneurs
|
||||
for (let conteneur of data.data.conteneurs) {
|
||||
for (let conteneur of sheetData.data.conteneurs) {
|
||||
conteneur.subItems = [];
|
||||
if (!conteneur.data.encTotal) conteneur.data.encTotal = 0;
|
||||
//conteneur.data.encTotal = ; Deja calculé
|
||||
if (conteneur.data.contenu) {
|
||||
for (let id of conteneur.data.contenu) {
|
||||
let objet = data.data.objets.find(objet => (id == objet._id));
|
||||
let objet = sheetData.data.objets.find(objet => (id == objet._id));
|
||||
if (objet) {
|
||||
if (!objet.data.encombrement) objet.data.encombrement = 0; // Auto-fix
|
||||
objet.estContenu = true; // Permet de filtrer ce qifui est porté dans le template
|
||||
@ -373,8 +377,8 @@ export class RdDUtility {
|
||||
}
|
||||
}
|
||||
// Construit la liste des conteneurs de niveau 1 (c'est à dire non contenu eux-même dans un conteneur)
|
||||
let newConteneurs = data.data.conteneurs.filter(function (conteneur, index, arr) { return !conteneur.estContenu });
|
||||
data.data.conteneurs = newConteneurs;
|
||||
let newConteneurs = sheetData.data.conteneurs.filter(function (conteneur, index, arr) { return !conteneur.estContenu });
|
||||
sheetData.data.conteneurs = newConteneurs;
|
||||
//console.log(newConteneurs);
|
||||
}
|
||||
|
||||
@ -406,10 +410,10 @@ export class RdDUtility {
|
||||
static getCategorieCompetences() {
|
||||
return categorieCompetences;
|
||||
}
|
||||
static getLevelCategory(category) {
|
||||
static getCategorieNiveauBase(category) {
|
||||
return categorieCompetences[category].level;
|
||||
}
|
||||
static getLabelCategory(category) {
|
||||
static getCategorieLabel(category) {
|
||||
return categorieCompetences[category].label;
|
||||
}
|
||||
static getCaracArray() {
|
||||
@ -609,7 +613,7 @@ export class RdDUtility {
|
||||
let compendiumItems = await RdDUtility.loadCompendiumNames(compendium);
|
||||
const pack = game.packs.get(compendium);
|
||||
let list = [];
|
||||
for (let compendiumItem of compendiumItems) {
|
||||
for (let compendiumItem of compendiumItems) {
|
||||
await pack.getDocument(compendiumItem._id).then(it => {
|
||||
const item = it.data;
|
||||
if (filter(item)) {
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
|
||||
{{!-- Sheet Header --}}
|
||||
@ -15,17 +16,17 @@
|
||||
</div>
|
||||
<div class="flexrow">
|
||||
<div class="flexrow">
|
||||
<span>{{data.blessures.resume}}</span>
|
||||
<span>{{calc.resumeBlessures}}</span>
|
||||
</div>
|
||||
<div class="flexrow">
|
||||
{{#if data.surprise}}{{data.surprise}}! {{/if}}
|
||||
{{#if calc.surprise}}{{calc.surprise}}! {{/if}}
|
||||
{{#if actor.effects}}
|
||||
{{#each actor.effects as |effect key|}}
|
||||
<span id="effect-{{effect.flags.core.status.statusId}} ">
|
||||
<img class="button-effect-img" src="{{effect.icon}}" alt="{{effect.label}}" width="24" height="24" />
|
||||
</span>
|
||||
{{/each}}
|
||||
{{#if data.isGM}}
|
||||
{{#if options.isGM}}
|
||||
<span id="enlever-tous-effets"><a>(enlever tout)</a></span>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
@ -67,7 +68,7 @@
|
||||
{{/each}}
|
||||
<li class="competence flexrow">
|
||||
<span class="carac-label flexrow" name="carac-total">Total Caractéristiques</span>
|
||||
<span class="competence-value flexrow" name="carac-total-value">{{data.caracSum}}</span>
|
||||
<span class="competence-value flexrow" name="carac-total-value">{{calc.caracTotal}}</span>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -199,9 +200,9 @@
|
||||
|
||||
{{!-- Equipment Tab --}}
|
||||
<div class="tab items" data-group="primary" data-tab="items">
|
||||
<span class="item-name">Encombrement total/max : {{numberFormat data.encTotal decimals=1}} / {{data.attributs.encombrement.value}} <b>{{data.surEncombrementMessage}}</b></span> -
|
||||
<span class="item-name">Encombrement total/max : {{numberFormat calc.encTotal decimals=1}} / {{data.attributs.encombrement.value}} <b>{{armes}}</b></span> -
|
||||
<span class="item-name"><a id="creer-un-objet">Créer un objet</a></span>
|
||||
{{#if data.isGM}}
|
||||
{{#if options.isGM}}
|
||||
<span class="item-name"> - <a id="nettoyer-conteneurs">Vider tout les conteneurs</a></span>
|
||||
{{/if}}
|
||||
<ul class="item-list alterne-list">
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
|
||||
{{!-- Sheet Header --}}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
|
||||
{{!-- Sheet Header --}}
|
||||
@ -15,7 +16,7 @@
|
||||
</div>
|
||||
<div class="flexrow">
|
||||
<div class="flexrow">
|
||||
<span>{{data.blessures.resume}}</span>
|
||||
<span>{{calc.resumeBlessures}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -52,7 +53,7 @@
|
||||
{{/each}}
|
||||
<li class="competence flexrow list-item">
|
||||
<span class="carac-label flexrow" name="carac-total">Total Caractéristiques</span>
|
||||
<span class="competence-value flexrow" name="carac-total-value">{{data.caracSum}}</span>
|
||||
<span class="competence-value flexrow" name="carac-total-value">{{calc.caracTotal}}</span>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -185,7 +186,7 @@
|
||||
|
||||
{{!-- Equipment Tab --}}
|
||||
<div class="tab items" data-group="primary" data-tab="items">
|
||||
<span cass=item-name>Encombrement total/max : {{numberFormat data.encTotal decimals=1}} / {{data.attributs.encombrement.value}}</span>
|
||||
<span cass=item-name>Encombrement total/max : {{numberFormat calc.encTotal decimals=1}} / {{data.attributs.encombrement.value}}</span>
|
||||
<ol class="item-list alterne-list">
|
||||
<li class="competence-header flexrow">
|
||||
<span class="competence-title competence-label">Nom</span>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{{log "handlebar actor-sheet" this}}
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
|
||||
{{!-- Sheet Header --}}
|
||||
@ -23,14 +23,14 @@
|
||||
<label class="ctn-endu">
|
||||
<a id="jet-endurance">Endurance</a>
|
||||
<a id="endurance-moins">-</a>
|
||||
<input class="resource-content" type="text" name="data.sante.endurance.value" value="{{data.data.sante.endurance.value}}" data-dtype="Number"/>
|
||||
<input class="resource-content" type="text" name="data.data.sante.endurance.value" value="{{data.data.sante.endurance.value}}" data-dtype="Number"/>
|
||||
<span>/ {{data.data.sante.endurance.max}}</span>
|
||||
<a id="endurance-plus">+</a>
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label class="ctn-fatigue tooltip">
|
||||
<span class="tooltiptext ttt-fatigue">{{{data.fatigue.html}}}</span>
|
||||
<span class="tooltiptext ttt-fatigue">{{{calc.fatigue.html}}}</span>
|
||||
Fatigue
|
||||
<a id="fatigue-moins">-</a>
|
||||
<input class="resource-content" id="fatigue-value" type="text" name="data.data.sante.fatigue.value" value="{{data.data.sante.fatigue.value}}" data-dtype="Number" />
|
||||
@ -65,24 +65,25 @@
|
||||
<span id="visu-tmr"><a title="Regarder les Terres Médianes"><img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-view.svg" alt="Regarder les Terres Médianes"/></a></span>
|
||||
</div>
|
||||
<div class="flexrow">
|
||||
<span class="tooltip">Malus de fatigue : {{data.data.fatigue.malus}}
|
||||
<span class="tooltiptext ttt-fatigue">{{{data.fatigue.html}}}</span>
|
||||
<span class="tooltip">Malus de fatigue : {{calc.fatigue.malus}}
|
||||
<span class="tooltiptext ttt-fatigue">{{{calc.fatigue.html}}}</span>
|
||||
</span>
|
||||
<span>{{data.data.blessures.resume}}</span>
|
||||
<span>{{calc.blessures.resume}}</span>
|
||||
</div>
|
||||
<div class="flexrow">
|
||||
<span>{{data.data.compteurs.etat.label}}: {{data.data.compteurs.etat.value}}</span>
|
||||
<span>{{data.data.compteurs.surenc.label}}: {{data.data.compteurs.surenc.value}}</span>
|
||||
</div>
|
||||
<div>
|
||||
{{#if data.surprise}}{{data.surprise}}! {{/if}}
|
||||
{{#if calc.surprise}}{{calc.surprise}}! {{/if}}
|
||||
{{#if actor.effects}}
|
||||
{{#each actor.effects as |effect key|}}
|
||||
<span id="effect-{{effect.flags.core.status.statusId}} ">
|
||||
<img class="button-effect-img" src="{{effect.icon}}" alt="{{effect.label}}" width="24" height="24" />
|
||||
{{log "handlebar effect" effect}}
|
||||
<span id="effect-{{effect.data.flags.core.status.statusId}} ">
|
||||
<img class="button-effect-img" src="{{effect.data.icon}}" alt="{{effect.data.label}}" width="24" height="24" />
|
||||
</span>
|
||||
{{/each}}
|
||||
{{#if data.isGM}}
|
||||
{{#if options.isGM}}
|
||||
<span id="enlever-tous-effets"><a>(enlever tout)</a></span>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
@ -113,8 +114,8 @@
|
||||
<div class="grid grid-2col">
|
||||
<div class="flex-group-left flexcol">
|
||||
<span><a class="lock-unlock-sheet"><img class="small-button-container"
|
||||
src="systems/foundryvtt-reve-de-dragon/icons/{{#if data.editCaracComp}}unlocked.svg{{else}}locked.svg{{/if}}" alt="blocker/débloquer"
|
||||
>{{#if data.editCaracComp}}Verrouiller{{else}}Déverrouiller{{/if}}</a></span>
|
||||
src="systems/foundryvtt-reve-de-dragon/icons/{{#if @root.options.editCaracComp}}unlocked.svg{{else}}locked.svg{{/if}}" alt="blocker/débloquer"
|
||||
>{{#if @root.options.editCaracComp}}Verrouiller{{else}}Déverrouiller{{/if}}</a></span>
|
||||
<ul class="carac-list alterne-list">
|
||||
{{#each data.data.carac as |carac key|}}
|
||||
{{#if carac.isLevelUp}}
|
||||
@ -124,12 +125,12 @@
|
||||
{{/if}}
|
||||
{{#if carac.isTaille}}
|
||||
<span class="carac-label flexrow" name="data.carac.{{key}}.label">{{carac.label}}</span>
|
||||
<input class="carac-value flexrow" type="text" name="data.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.data.editCaracComp}}disabled{{/unless}} />
|
||||
<input class="carac-value flexrow" type="text" name="data.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.options.editCaracComp}}disabled{{/unless}} />
|
||||
<label class="carac-xp flexrow"/>
|
||||
{{else}}
|
||||
{{#if carac.derivee}}
|
||||
<span class="carac-label flexrow" name="data.carac.{{key}}.label"> <a name={{key}}>{{carac.label}}</a></span>
|
||||
<label class="competence-value flexrow">{{carac.value}}</label>
|
||||
<label class="carac-value flexrow">{{carac.value}}</label>
|
||||
<label class="carac-xp flexrow"/>
|
||||
{{else}}
|
||||
{{#if carac.isLevelUp}}
|
||||
@ -141,28 +142,28 @@
|
||||
{{else}}
|
||||
<span class="carac-label flexrow tooltip tooltip-nobottom" name="data.carac.{{key}}.label"><a name={{key}}>{{carac.label}}</a></span>
|
||||
{{/if}}
|
||||
<input class="carac-value flexrow" type="text" name="data.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.data.editCaracComp}}disabled{{/unless}} />
|
||||
<input class="carac-xp flexrow" type="text" name="data.carac.{{key}}.xp" value="{{carac.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}} />
|
||||
<input class="carac-value flexrow" type="text" name="data.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.options.editCaracComp}}disabled{{/unless}} />
|
||||
<input class="carac-xp flexrow" type="text" name="data.carac.{{key}}.xp" value="{{carac.xp}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}} />
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/each}}
|
||||
<li class="competence flexrow">
|
||||
<span class="carac-label flexrow" name="carac-total">Total Caractéristiques </span>
|
||||
<span class="competence-value flexrow" name="carac-total-value">{{data.caracSum}} </span>
|
||||
<span class="carac-label flexrow" name="carac-total-value">{{calc.caracTotal}} </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="flex-group-left flexcol" >
|
||||
<ul class="carac-list">
|
||||
<li class="competence flexrow list-item">
|
||||
<span class="competence-label flexrow" name="beaute">Beauté :
|
||||
<input class="description-value" type="text" name="data.beaute" value="{{data.beaute}}" data-dtype="String" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
<span class="description-label flexrow" name="beaute">Beauté :
|
||||
<input class="description-value" type="text" name="data.beaute" value="{{data.data.beaute}}" data-dtype="String" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
</span>
|
||||
</li>
|
||||
{{#each data.attributs as |attr key|}}
|
||||
<li class="competence flexrow list-item" data-attribute="{{key}}">
|
||||
<span class="competence-label flexrow" name="data.attributs.{{key}}.label">{{attr.label}} :
|
||||
<span class="generic-label flexrow" name="data.attributs.{{key}}.label">{{attr.label}} :
|
||||
{{#if (eq key 'protection')}}
|
||||
<input id="attribut-protection-edit" type="text" name="{{key}}" value="{{attr.value}}" data-dtype="number"/><span/>
|
||||
{{else}}
|
||||
@ -175,7 +176,7 @@
|
||||
<ul class="carac-list alterne-list">
|
||||
<li class="competence flexrow list-item">
|
||||
<span class="generic-label" id="chance-actuelle"><a>Chance actuelle</a></span>
|
||||
<input class="compteur-edit" id="chance-edit" type="text" name="chance" value="{{data.compteurs.chance.value}}" data-dtype="number"/>
|
||||
<input class="compteur-edit" id="chance-edit" type="text" name="chance" value="{{data.data.compteurs.chance.value}}" data-dtype="number"/>
|
||||
<span><a class="item-control stress-test" id="chance-appel">Utiliser</a></span>
|
||||
</li>
|
||||
{{#each data.data.compteurs as |compteur key|}}
|
||||
@ -218,14 +219,14 @@
|
||||
<div class="tab competences" data-group="primary" data-tab="competences">
|
||||
<div class="flexrow">
|
||||
<span><a class="lock-unlock-sheet"><img class="small-button-container"
|
||||
src="systems/foundryvtt-reve-de-dragon/icons/{{#if data.editCaracComp}}unlocked.svg{{else}}locked.svg{{/if}}" alt="blocker/débloquer"
|
||||
>{{#if data.editCaracComp}}Verrouiller{{else}}Déverrouiller{{/if}}</a></span>
|
||||
src="systems/foundryvtt-reve-de-dragon/icons/{{#if @root.options.editCaracComp}}unlocked.svg{{else}}locked.svg{{/if}}" alt="blocker/débloquer"
|
||||
>{{#if @root.options.editCaracComp}}Verrouiller{{else}}Déverrouiller{{/if}}</a></span>
|
||||
<span><a id="show-hide-competences"><img class="small-button-container"
|
||||
src="systems/foundryvtt-reve-de-dragon/icons/{{#if data.showCompNiveauBase}}no-filter.svg{{else}}filter.svg{{/if}}" alt="filter/montrer tout"
|
||||
>{{#if data.showCompNiveauBase}}Montrer tout{{else}}Filtrer{{/if}}</a></span>
|
||||
src="systems/foundryvtt-reve-de-dragon/icons/{{#if @root.options.showCompNiveauBase}}no-filter.svg{{else}}filter.svg{{/if}}" alt="filter/montrer tout"
|
||||
>{{#if @root.options.showCompNiveauBase}}Montrer tout{{else}}Filtrer{{/if}}</a></span>
|
||||
<span><a id="show-hide-archetype"><img class="small-button-container"
|
||||
src="systems/foundryvtt-reve-de-dragon/icons/{{#if data.montrerArchetype}}no-filter.svg{{else}}filter.svg{{/if}}" alt="filter/montrer l'archétype"
|
||||
>{{#if data.montrerArchetype}}Masquer l'archétype{{else}}Voir l'archétype{{/if}}</a></span>
|
||||
src="systems/foundryvtt-reve-de-dragon/icons/{{#if @root.options.montrerArchetype}}no-filter.svg{{else}}filter.svg{{/if}}" alt="filter/montrer l'archétype"
|
||||
>{{#if @root.options.montrerArchetype}}Masquer l'archétype{{else}}Voir l'archétype{{/if}}</a></span>
|
||||
</div>
|
||||
<div class="grid grid-2col">
|
||||
<div class="flex-group-left flexcol competence-column">
|
||||
@ -233,8 +234,8 @@
|
||||
<span class="competence-title">Compétences de base</span>
|
||||
</header>
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each data.competenceByCategory.generale as |comp key|}}
|
||||
{{#if data.showCompetence}}
|
||||
{{#each competenceByCategory.generale as |comp key|}}
|
||||
{{#if visible}}
|
||||
{{#if comp.data.isLevelUp}}
|
||||
<li class="item flexrow xp-level-up" data-item-id="{{comp._id}}">
|
||||
{{else}}
|
||||
@ -250,14 +251,14 @@
|
||||
{{else}}
|
||||
<span class="competence-label"><a>{{comp.name}}</a></span>
|
||||
{{/if}}
|
||||
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
<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>
|
||||
</div>
|
||||
{{#if ../data.montrerArchetype}}
|
||||
<input class="competence-archetype" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
{{#if @root.options.montrerArchetype}}
|
||||
<input class="competence-archetype" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/if}}
|
||||
@ -268,8 +269,8 @@
|
||||
<span class="competence-title">Compétences Particulières</span>
|
||||
</header>
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each data.competenceByCategory.particuliere as |comp key|}}
|
||||
{{#if data.showCompetence}}
|
||||
{{#each competenceByCategory.particuliere as |comp key|}}
|
||||
{{#if visible}}
|
||||
{{#if comp.data.isLevelUp}}
|
||||
<li class="item flexrow xp-level-up" data-item-id="{{comp._id}}">
|
||||
{{else}}
|
||||
@ -285,14 +286,14 @@
|
||||
{{else}}
|
||||
<span class="competence-label"><a>{{comp.name}}</a></span>
|
||||
{{/if}}
|
||||
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
<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>
|
||||
</div>
|
||||
{{#if ../data.montrerArchetype}}
|
||||
<input class="competence-archetype" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
{{#if @root.options.montrerArchetype}}
|
||||
<input class="competence-archetype" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/if}}
|
||||
@ -302,8 +303,8 @@
|
||||
<span class="competence-title">Compétences Spécialisées</span>
|
||||
</header>
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each data.competenceByCategory.specialisee as |comp key|}}
|
||||
{{#if data.showCompetence}}
|
||||
{{#each competenceByCategory.specialisee as |comp key|}}
|
||||
{{#if visible}}
|
||||
{{#if comp.data.isLevelUp}}
|
||||
<li class="item flexrow xp-level-up" data-item-id="{{comp._id}}">
|
||||
{{else}}
|
||||
@ -319,14 +320,14 @@
|
||||
{{else}}
|
||||
<span class="competence-label"><a>{{comp.name}}</a></span>
|
||||
{{/if}}
|
||||
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
<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>
|
||||
</div>
|
||||
{{#if ../data.montrerArchetype}}
|
||||
<input class="competence-archetype" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
{{#if @root.options.montrerArchetype}}
|
||||
<input class="competence-archetype" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/if}}
|
||||
@ -339,8 +340,8 @@
|
||||
<span class="competence-title">Compétences de Mêlée</span>
|
||||
</header>
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each data.competenceByCategory.melee as |comp key|}}
|
||||
{{#if data.showCompetence}}
|
||||
{{#each competenceByCategory.melee as |comp key|}}
|
||||
{{#if visible}}
|
||||
{{#if comp.data.isLevelUp}}
|
||||
<li class="item flexrow xp-level-up" data-item-id="{{comp._id}}">
|
||||
{{else}}
|
||||
@ -356,14 +357,14 @@
|
||||
{{else}}
|
||||
<span class="competence-label"><a>{{comp.name}}</a></span>
|
||||
{{/if}}
|
||||
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
<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>
|
||||
</div>
|
||||
{{#if ../data.montrerArchetype}}
|
||||
<input class="competence-archetype" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
{{#if @root.options.montrerArchetype}}
|
||||
<input class="competence-archetype" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/if}}
|
||||
@ -374,8 +375,8 @@
|
||||
<span class="competence-title">Compétences de Tir</span>
|
||||
</header>
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each data.competenceByCategory.tir as |comp key|}}
|
||||
{{#if data.showCompetence}}
|
||||
{{#each competenceByCategory.tir as |comp key|}}
|
||||
{{#if visible}}
|
||||
{{#if comp.data.isLevelUp}}
|
||||
<li class="item flexrow xp-level-up" data-item-id="{{comp._id}}">
|
||||
{{else}}
|
||||
@ -391,14 +392,14 @@
|
||||
{{else}}
|
||||
<span class="competence-label"><a>{{comp.name}}</a></span>
|
||||
{{/if}}
|
||||
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
<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>
|
||||
</div>
|
||||
{{#if ../data.montrerArchetype}}
|
||||
<input class="competence-archetype" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
{{#if @root.options.montrerArchetype}}
|
||||
<input class="competence-archetype" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/if}}
|
||||
@ -409,8 +410,8 @@
|
||||
<span class="competence-title">Compétences de Lancer</span>
|
||||
</header>
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each data.competenceByCategory.lancer as |comp key|}}
|
||||
{{#if data.showCompetence}}
|
||||
{{#each competenceByCategory.lancer as |comp key|}}
|
||||
{{#if visible}}
|
||||
{{#if comp.data.isLevelUp}}
|
||||
<li class="item flexrow xp-level-up" data-item-id="{{comp._id}}">
|
||||
{{else}}
|
||||
@ -426,14 +427,14 @@
|
||||
{{else}}
|
||||
<span class="competence-label"><a>{{comp.name}}</a></span>
|
||||
{{/if}}
|
||||
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number"{{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number"{{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
<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>
|
||||
</div>
|
||||
{{#if ../data.montrerArchetype}}
|
||||
<input class="competence-archetype" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
{{#if @root.options.montrerArchetype}}
|
||||
<input class="competence-archetype" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/if}}
|
||||
@ -444,8 +445,8 @@
|
||||
<span class="competence-title">Connaissances</span>
|
||||
</header>
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each data.competenceByCategory.connaissance as |comp key|}}
|
||||
{{#if data.showCompetence}}
|
||||
{{#each competenceByCategory.connaissance as |comp key|}}
|
||||
{{#if visible}}
|
||||
{{#if comp.data.isLevelUp}}
|
||||
<li class="item flexrow xp-level-up" data-item-id="{{comp._id}}">
|
||||
{{else}}
|
||||
@ -461,14 +462,14 @@
|
||||
{{else}}
|
||||
<span class="competence-label"><a>{{comp.name}}</a></span>
|
||||
{{/if}}
|
||||
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
<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>
|
||||
</div>
|
||||
{{#if ../data.montrerArchetype}}
|
||||
<input class="competence-archetype" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
{{#if @root.options.montrerArchetype}}
|
||||
<input class="competence-archetype" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/if}}
|
||||
@ -479,8 +480,8 @@
|
||||
<span class="competence-title">Draconic</span>
|
||||
</header>
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each data.competenceByCategory.draconic as |comp key|}}
|
||||
{{#if data.showCompetence}}
|
||||
{{#each competenceByCategory.draconic as |comp key|}}
|
||||
{{#if visible}}
|
||||
{{#if comp.data.isLevelUp}}
|
||||
<li class="item flexrow xp-level-up" data-item-id="{{comp._id}}">
|
||||
{{else}}
|
||||
@ -496,15 +497,15 @@
|
||||
{{else}}
|
||||
<span class="competence-label"><a>{{comp.name}}</a></span>
|
||||
{{/if}}
|
||||
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-xp-sort" type="text" compname="{{comp.name}}" value="{{comp.data.xp_sort}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
<input class="competence-xp-sort" type="text" compname="{{comp.name}}" value="{{comp.data.xp_sort}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
<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>
|
||||
</div>
|
||||
{{#if ../data.montrerArchetype}}
|
||||
<input class="competence-archetype" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
|
||||
{{#if @root.options.montrerArchetype}}
|
||||
<input class="competence-archetype" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/if}}
|
||||
@ -514,10 +515,10 @@
|
||||
<ul class="item-list">
|
||||
<li class="item flexrow">
|
||||
<span class="generic-label">Total XP compétences</span>
|
||||
<span class="competence-value">{{data.competenceXPTotal}}</span>
|
||||
<span class="generic-label">{{calc.competenceXPTotal}}</span>
|
||||
</li>
|
||||
{{#if data.montrerArchetype}}
|
||||
{{#each data.comptageArchetype as |archetype key|}}
|
||||
{{#if @root.options.montrerArchetype}}
|
||||
{{#each calc.comptageArchetype as |archetype key|}}
|
||||
<li class="item flexrow">
|
||||
<label class="generic-label">Archetype {{archetype.niveau}} : {{archetype.nombre}} / {{archetype.nombreMax}}</label>
|
||||
</li>
|
||||
@ -534,27 +535,27 @@
|
||||
<h3 class="blessures-title">Armes et Défenses:</h3>
|
||||
<ul class="item-list alterne-list">
|
||||
<li class="competence-header flexrow">
|
||||
<span class="competence-title competence-label">Armes</span>
|
||||
<span class="competence-title competence-label">Initiative</span>
|
||||
<span class="competence-title competence-label">Comp.</span>
|
||||
<span class="competence-title competence-value">Niveau</span>
|
||||
<span class="competence-title competence-value">+dom</span>
|
||||
<span class="competence-title generic-label">Armes</span>
|
||||
<span class="competence-title generic-label">Initiative</span>
|
||||
<span class="competence-title generic-label">Comp.</span>
|
||||
<span class="competence-title generic-label">Niveau</span>
|
||||
<span class="competence-title generic-label">+dom</span>
|
||||
</li>
|
||||
{{#each data.combat as |arme key|}}
|
||||
{{#each armes as |arme key|}}
|
||||
<li class="item flexrow list-item" data-item-id="{{arme._id}}">
|
||||
<span class="arme-label"><a data-competence-name="{{arme.data.competence}}">{{arme.name}}</a></span>
|
||||
<span class="arme-initiative"><a data-arme-name="{{arme.name}}" data-competence-name="{{arme.data.competence}}">{{arme.data.initiative}}</a></span>
|
||||
<span class="competence-label">{{arme.data.competence}}</span>
|
||||
<span class="competence-value">{{numberFormat arme.data.niveau decimals=0 sign=true}}</span>
|
||||
<span class="competence-value">{{numberFormat arme.data.dommages decimals=0 sign=true}}</span>
|
||||
<span class="generic-label">{{arme.data.competence}}</span>
|
||||
<span class="generic-label">{{numberFormat arme.data.niveau decimals=0 sign=true}}</span>
|
||||
<span class="generic-label">{{numberFormat arme.data.dommages decimals=0 sign=true}}</span>
|
||||
</li>
|
||||
{{/each}}
|
||||
<li class="item flexrow list-item">
|
||||
<span class="competence-label"><a data-competence-name="{{esquive.name}}">{{esquive.name}}</a></span>
|
||||
<span class="arme-initiative"></span>
|
||||
<span class="competence-label"></span>
|
||||
<span class="competence-value">{{numberFormat esquive.niveau decimals=0 sign=true}}</span>
|
||||
<span class="competence-value"></span>
|
||||
<span class="generic-label"></span>
|
||||
<span class="generic-label">{{numberFormat esquive.niveau decimals=0 sign=true}}</span>
|
||||
<span class="generic-label"></span>
|
||||
</li>
|
||||
</ul>
|
||||
<hr>
|
||||
@ -748,32 +749,32 @@
|
||||
<h3>Haut rêve:</h3>
|
||||
<ul class="item-list">
|
||||
<li class="item flexrow">
|
||||
<span class="competence-label">Position en TMR :</span>
|
||||
<span class="generic-label">Position en TMR :</span>
|
||||
<span>
|
||||
{{#if data.isGM}}
|
||||
<input class="competence-value" type="text" name="data.reve.tmrpos.coord" value="{{data.reve.tmrpos.coord}}" data-dtype="String"/>
|
||||
{{#if options.isGM}}
|
||||
<input class="attribut-value" type="text" name="data.reve.tmrpos.coord" value="{{data.data.reve.tmrpos.coord}}" data-dtype="String"/>
|
||||
{{else}}
|
||||
{{data.reve.tmrpos.coord}}
|
||||
{{data.data.reve.tmrpos.coord}}
|
||||
{{/if}}
|
||||
</span>
|
||||
</li>
|
||||
<li class="item flexrow">
|
||||
<span class="competence-label">Seuil de Rêve :</span>
|
||||
<span class="generic-label">Seuil de Rêve :</span>
|
||||
<span>
|
||||
{{#if data.isGM}}
|
||||
<input class="seuil-reve-value" type="text" name="data.reve.seuil.value" value="{{data.reve.seuil.value}}" data-dtype="Number"/>
|
||||
{{#if options.isGM}}
|
||||
<input class="seuil-reve-value" type="text" name="data.reve.seuil.value" value="{{data.data.reve.seuil.value}}" data-dtype="Number"/>
|
||||
{{else}}
|
||||
{{data.reve.seuil.value}}
|
||||
{{data.data.reve.seuil.value}}
|
||||
{{/if}}
|
||||
</span>
|
||||
</li>
|
||||
<li class="item flexrow" >
|
||||
<span class="competence-label">Refoulement : </span>
|
||||
<span class="generic-label">Refoulement : </span>
|
||||
<span>
|
||||
{{#if data.isGM}}
|
||||
<input class="competence-value" type="text" name="data.reve.refoulement.value" value="{{data.reve.refoulement.value}}" data-dtype="Number"/>
|
||||
{{#if options.isGM}}
|
||||
<input class="attribut-value" type="text" name="data.reve.refoulement.value" value="{{data.data.reve.refoulement.value}}" data-dtype="Number"/>
|
||||
{{else}}
|
||||
{{data.reve.refoulement.value}}
|
||||
{{data.data.reve.refoulement.value}}
|
||||
{{/if}}
|
||||
</span>
|
||||
</li>
|
||||
@ -801,7 +802,7 @@
|
||||
<div>
|
||||
<h3>Sorts en Réserve:</h3>
|
||||
<ul class="item-list">
|
||||
{{#each data.sortReserve as |reserve key|}}
|
||||
{{#each tmr.sortsReserve as |reserve key|}}
|
||||
<li class="item flexrow" data-item-id="{{mysort._id}}" data-attribute="{{key}}">
|
||||
<span class="sort-label"> {{reserve.sort.name}} - {{reserve.coord}}</span>
|
||||
</li>
|
||||
@ -827,7 +828,7 @@
|
||||
<div>
|
||||
<h3>Cases Spéciales:</h3>
|
||||
<ul class="item-list">
|
||||
{{#each data.caseSpeciales as |casetmr key|}}
|
||||
{{#each tmr.caseSpeciales as |casetmr key|}}
|
||||
<li class="item flexrow" data-item-id="{{casetmr._id}}" data-attribute="{{key}}">
|
||||
<span class="case-label"><a data-id="{{casetmr._id}}">{{casetmr.name}}</a></span>
|
||||
<div class="item-controls">
|
||||
@ -841,7 +842,7 @@
|
||||
<div>
|
||||
<h3>Rencontres présentes:</h3>
|
||||
<ul class="item-list">
|
||||
{{#each data.rencontres as |rencontre key|}}
|
||||
{{#each tmr.rencontres as |rencontre key|}}
|
||||
<li class="item flexrow" data-item-id="{{key}}" data-attribute="{{key}}">
|
||||
<span class="case-label"><a data-id="{{key}}">{{rencontre.rencontre.name}} - {{rencontre.coord}} ({{rencontre.rencontre.date}} - {{rencontre.rencontre.heure}})</a></span>
|
||||
<div class="item-controls">
|
||||
@ -921,22 +922,22 @@
|
||||
|
||||
<span class="item-name"><h4>Equipement porté</h4></span>
|
||||
<div>
|
||||
<span class="item-name">Encombrement total/max : {{numberFormat data.encTotal decimals=1}} / {{data.attributs.encombrement.value}} <b>{{data.surEncombrementMessage}}</b></span> -
|
||||
<span class="item-name">Estimation de l'équipement : {{numberFormat data.prixTotalEquipement decimals=2}} Sols</span>
|
||||
<span class="item-name">Encombrement total/max : {{numberFormat calc.encTotal decimals=1}} / {{data.data.attributs.encombrement.value}} <b>{{calc.surEncombrementMessage}}</b></span> -
|
||||
<span class="item-name">Estimation de l'équipement : {{numberFormat calc.prixTotalEquipement decimals=2}} Sols</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="item-name"><a id="creer-un-objet">Créer un objet</a></span>
|
||||
{{#if data.isGM}}
|
||||
{{#if options.isGM}}
|
||||
<span class="item-name"> - <a id="nettoyer-conteneurs">Vider tout les conteneurs</a></span>
|
||||
{{/if}}
|
||||
</div>
|
||||
<ul class="item-list alterne-list">
|
||||
<li class="competence-header flexrow">
|
||||
<img class="sheet-competence-img" src="systems/foundryvtt-reve-de-dragon/icons/objets/sac_a_dos.webp" title="Equipement"/>
|
||||
<span class="competence-title competence-label">Nom</span>
|
||||
<span class="competence-title competence-label">Q.</span>
|
||||
<span class="competence-title competence-label">Enc.</span>
|
||||
<span class="competence-title competence-label">Equiper/Editer/Suppr.</span>
|
||||
<span class="competence-title generic-label">Nom</span>
|
||||
<span class="competence-title generic-label">Q.</span>
|
||||
<span class="competence-title generic-label">Enc.</span>
|
||||
<span class="competence-title generic-label">Equiper/Editer/Suppr.</span>
|
||||
</li>
|
||||
{{#each data.objets as |item id|}}
|
||||
{{#unless item.estContenu}}
|
||||
@ -962,7 +963,7 @@
|
||||
|
||||
<span class="item-name"><h4>Montures</h4></span>
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each data.monturesList as |monture id|}}
|
||||
{{#each subacteurs.montures as |monture id|}}
|
||||
<li class="item flexrow list-item" data-actor-id="{{monture.id}}">
|
||||
<img class="sheet-competence-img" src="{{monture.img}}" title="{{monture.name}}"/>
|
||||
<span class="competence-title subacteur-label"><a>{{monture.name}}</a></span>
|
||||
@ -975,7 +976,7 @@
|
||||
|
||||
<span class="item-name"><h4>Véhicules</h4></span>
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each data.vehiculesList as |vehicule id|}}
|
||||
{{#each subacteurs.vehicules as |vehicule id|}}
|
||||
<li class="item flexrow list-item" data-actor-id="{{vehicule.id}}">
|
||||
<img class="sheet-competence-img" src="{{vehicule.img}}" title="{{vehicule.name}}"/>
|
||||
<span class="competence-title subacteur-label"><a>{{vehicule.name}}</a></span>
|
||||
@ -990,7 +991,7 @@
|
||||
|
||||
<span class="item-name"><h4>Suivants</h4></span>
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each data.suivantsList as |suivant id|}}
|
||||
{{#each subacteurs.suivants as |suivant id|}}
|
||||
<li class="item flexrow list-item" data-actor-id="{{suivant.id}}">
|
||||
<img class="sheet-competence-img" src="{{suivant.img}}" title="{{suivant.name}}"/>
|
||||
<span class="competence-title subacteur-label"><a>{{suivant.name}}</a></span>
|
||||
@ -1008,40 +1009,40 @@
|
||||
<article class="flexrow">
|
||||
<ul class="item-list alterne-list">
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label competence-label">Sexe :
|
||||
<input class="description-value flexrow" type="text" name="data.sexe" value="{{data.sexe}}" data-dtype="String"/>
|
||||
<label class="description-label generic-label">Sexe :
|
||||
<input class="description-value flexrow" type="text" name="data.sexe" value="{{data.data.sexe}}" data-dtype="String"/>
|
||||
</label>
|
||||
</li>
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label competence-label">Poids :
|
||||
<input class="description-value flexrow" type="text" name="data.poids" value="{{data.poids}}" data-dtype="String"/>
|
||||
<label class="description-label generic-label">Poids :
|
||||
<input class="description-value flexrow" type="text" name="data.poids" value="{{data.data.poids}}" data-dtype="String"/>
|
||||
</label>
|
||||
</li>
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label competence-label">Taille :
|
||||
<input class="description-value flexrow" type="text" name="data.taille" value="{{data.taille}}" data-dtype="String"/>
|
||||
<label class="description-label generic-label">Taille :
|
||||
<input class="description-value flexrow" type="text" name="data.taille" value="{{data.data.taille}}" data-dtype="String"/>
|
||||
</label>
|
||||
</li>
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label competence-label">Cheveux :
|
||||
<input class="description-value flexrow" type="text" name="data.cheveux" value="{{data.cheveux}}" data-dtype="String"/>
|
||||
<label class="description-label generic-label">Cheveux :
|
||||
<input class="description-value flexrow" type="text" name="data.cheveux" value="{{data.data.cheveux}}" data-dtype="String"/>
|
||||
</label>
|
||||
</li>
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label competence-label">Yeux :
|
||||
<input class="description-value flexrow" type="text" name="data.yeux" value="{{data.yeux}}" data-dtype="String"/>
|
||||
<label class="description-label generic-label">Yeux :
|
||||
<input class="description-value flexrow" type="text" name="data.yeux" value="{{data.data.yeux}}" data-dtype="String"/>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="item-list alterne-list">
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label competence-label">Age :
|
||||
<input class="description-value flexrow" type="text" name="data.age" value="{{data.age}}" data-dtype="String"/>
|
||||
<label class="description-label generic-label">Age :
|
||||
<input class="description-value flexrow" type="text" name="data.age" value="{{data.data.age}}" data-dtype="String"/>
|
||||
</label>
|
||||
</li>
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label competence-label">Heure de naissance :
|
||||
<select class="description-value flexrow" type="text" name="data.heure" value="{{data.heure}}" data-dtype="String">
|
||||
<label class="description-label generic-label">Heure de naissance :
|
||||
<select class="description-value flexrow" type="text" name="data.heure" value="{{data.data.heure}}" data-dtype="String">
|
||||
{{#select data.heure}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/heures-select-option.html"}}
|
||||
{{/select}}
|
||||
@ -1049,14 +1050,14 @@
|
||||
</label>
|
||||
</li>
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label competence-label">Beauté :
|
||||
<label class="description-label competence-label">{{data.beaute}}
|
||||
<label class="description-label generic-label">Beauté :
|
||||
<label class="description-label generic-label">{{data.data.beaute}}
|
||||
</label>
|
||||
</label>
|
||||
</li>
|
||||
<li class="item flexrow list-item">
|
||||
<label class="description-label competence-label">Main directrice :
|
||||
<input class="description-value flexrow" type="text" name="data.main" value="{{data.main}}" data-dtype="String"/>
|
||||
<label class="description-label generic-label">Main directrice :
|
||||
<input class="description-value flexrow" type="text" name="data.main" value="{{data.data.main}}" data-dtype="String"/>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
|
||||
{{!-- Sheet Header --}}
|
||||
@ -68,9 +69,9 @@
|
||||
|
||||
{{!-- Equipment Tab --}}
|
||||
<div class="tab items" data-group="primary" data-tab="items">
|
||||
<span class="item-name">Encombrement total/max : {{numberFormat data.encTotal decimals=1}} / {{data.capacite_encombrement}} <b>{{data.surEncombrementMessage}}</b></span> -
|
||||
<span class="item-name">Encombrement total/max : {{numberFormat calc.encTotal decimals=1}} / {{data.capacite_encombrement}} <b>{{calc.surEncombrementMessage}}</b></span> -
|
||||
<span class="item-name"><a id="creer-un-objet">Créer un objet</a></span>
|
||||
{{#if data.isGM}}
|
||||
{{#if options.isGM}}
|
||||
<span class="item-name"> - <a id="nettoyer-conteneurs">Vider tout les conteneurs</a></span>
|
||||
{{/if}}
|
||||
<ul class="item-list alterne-list">
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<div class="header-fields">
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<div class="header-fields">
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<div id="calendar-time-container">
|
||||
<div id="calendar">
|
||||
{{#if isGM}}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<h4>{{alias}} peut progresser dans sa compétence {{competence}} ! </h4>
|
||||
<div>Son niveau en {{competence}} peut évoluer à {{niveau}} pour un archétype de {{archetype}} ! </div>
|
||||
<div>Son experience dans cette compétence est de {{xp}}. </div>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<h4>C'est au tour de {{alias}} !</h4>
|
||||
<div data-combatid="{{combatId}}" data-combatmessage="actor-turn-summary">{{blessuresStatus}}</div>
|
||||
<div>Son état général est de : {{etatGeneral}} {{#if isSonne}} et est <strong>sonné</strong>{{/if}}</div>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<div data-passearme="{{passeArme}}">
|
||||
<h4 class="rdd-roll-etotal"><strong>Echec total en attaque</strong></h4>
|
||||
<br>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<div data-passearme="{{passeArme}}">
|
||||
<h4 class="rdd-roll-part">{{alias}} réussit une attaque particulière!</strong></h4>
|
||||
<br>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<div data-passearme="{{passeArme}}">
|
||||
{{#if (eq surprise 'totale')}}
|
||||
<span><strong>{{defender.name}}</strong> est totalement surpris</span>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{{#if use.appelAuMoral}}<div>
|
||||
{{alias}} fait appel {{#if (gt moral 0)}}au moral{{else}}à l'énergie du déspoir{{/if}} {{#if moralDiminuer}}et échoue, diminuant son moral.{{else}} et réussit.{{/if}}
|
||||
{{alias}} utilise {{#if (gt moral 0)}}le moral{{else}} l'énergie du déspoir{{/if}} et {{#if moralDiminuer}}échoue, diminuant son moral.{{else}}réussit.{{/if}}
|
||||
{{^jetEchouerMoralDiminuer}} Son moral reste inchangé à {{moral}}.{{/jetEchouerMoralDiminuer}}
|
||||
<div>{{/if}}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<div>
|
||||
<span {{#if ajustements}}class="tooltip" {{/if}}>
|
||||
{{rolled.caracValue}} à {{numberFormat rolled.finalLevel decimals=0 sign=true}}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<h4>L'initiative de {{alias}} a été modifiée !</h4>
|
||||
<hr>
|
||||
<div>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
{{#if description}}
|
||||
<hr>
|
||||
<span class="poesie-extrait">
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/>
|
||||
<h4 data-categorie="tmr" data-actor-id="{{actor._id}}" data-rencontre-round="{{nbRounds}}">
|
||||
{{alias}} rencontre {{#if (eq genre 'f')}}une{{else}}un{{/if}} {{rencontre.name}} de force {{rencontre.force}}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<h4>
|
||||
{{alias}} s'accorde: {{entite}}
|
||||
</h4>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<img class="chat-icon" src="systems/foundryvtt-reve-de-dragon/icons/competence_alchimie.png" alt="préparation alchimique" />
|
||||
<h4>
|
||||
{{alias}} essaye de réaliser sa recette Alchimique : {{recette.name}}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<h4>
|
||||
{{alias}} fait appel à la chance
|
||||
</h4>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
|
||||
<h4>{{alias}} attaque à {{diffLibre}}: {{arme.name}}</h4>
|
||||
<div>{{selectedCarac.label}}{{#unless (eq selectedCarac.label competence.name)}} / {{competence.name}}{{/unless}}</div>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<img class="chat-icon" src="{{competence.img}}" alt="{{oeuvre.data.competence}}" />
|
||||
<h4>
|
||||
{{alias}} tente de chanter la chanson : {{oeuvre.name}} (niveau {{oeuvre.data.niveau}})
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
|
||||
<h4>
|
||||
{{alias}} {{show.title}}:
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<img class="chat-icon" src="{{competence.img}}" alt="{{oeuvre.data.competence}}" />
|
||||
<h4>
|
||||
{{alias}} tente de danser : {{oeuvre.name}} (niveau {{oeuvre.data.niveau}})
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
{{#if isGM}}
|
||||
<span>
|
||||
{{#if (gt endurance 0)}}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
|
||||
<h4>{{alias}} esquive une attaque à {{diffLibre}}</h4>
|
||||
<div>{{selectedCarac.label}}{{#unless (eq selectedCarac.label competence.name)}} / {{competence.name}}{{/unless}}</div>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<h4>
|
||||
{{alias}} {{#if isSortReserve}}met en réserve{{else}}lance{{/if}}
|
||||
le {{#if selectedSort.data.isrituel}}rituel{{else}}sort{{/if}}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
{{#if competence.img}}
|
||||
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
|
||||
{{/if}}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<img class="chat-icon" src="{{competence.img}}" alt="{{oeuvre.data.competence}}" />
|
||||
<h4>
|
||||
{{alias}} joue à : {{oeuvre.name}}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/>
|
||||
<h4 data-categorie="tmr" data-actor-id="{{actor._id}}">
|
||||
{{alias}} tente de {{maitrise.verbe}} {{le tmr.genre}} {{tmr.label}} ({{tmr.coord}})
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
|
||||
<h4>
|
||||
{{alias}} a médité : {{meditation.name}}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<img class="chat-icon" src="{{competence.img}}" alt="{{oeuvre.data.competence}}" />
|
||||
<h4>
|
||||
{{alias}} tente de jouer le morceau : {{oeuvre.name}} (niveau {{oeuvre.data.niveau}})
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<h4><img class="chat-icon" src="{{competence.img}}" alt="{{oeuvre.data.competence}}" />
|
||||
|
||||
{{alias}} tente d'interpréter {{oeuvre.name}} (niveau {{oeuvre.data.niveau}})
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
|
||||
<h4>{{alias}} pare une attaque à {{diffLibre}} - {{arme.name}}</h4>
|
||||
<div>{{selectedCarac.label}}{{#unless (eq selectedCarac.label competence.name)}} / {{competence.name}}{{/unless}}</div>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<img class="chat-icon" src="{{competence.img}}" alt="{{oeuvre.data.competence}}" />
|
||||
<h4>
|
||||
{{alias}} tente de cuisiner la recette : {{oeuvre.name}} (niveau {{oeuvre.data.niveau}})
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<img class="chat-icon" src="systems/foundryvtt-reve-de-dragon/icons/competence_legendes.png" alt="Rêve de Dragon"/>
|
||||
<h4 data-categorie="tmr" data-actor-id="{{actor._id}}">
|
||||
{{alias}} tente de maîtriser un Rêve de Dragon!
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
|
||||
<h4>
|
||||
{{alias}} {{#if isSortReserve}}met en réserve{{else}}lance{{/if}}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
|
||||
<h4>
|
||||
{{alias}} travaille à sa tâche {{tache.name}}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<h4>
|
||||
{{alias}} transforme {{rolled.factor}}% de son stress
|
||||
</h4>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<div class="header-fields">
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="skill-roll-dialog">
|
||||
<h2 class="compdialog" id="compdialogTitle"></h2>
|
||||
<div class="form-group">
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<div class="table-ajustement">
|
||||
<span class="tooltip">
|
||||
<span>Ajustement Final:</span>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="dialog-roll-sort">
|
||||
<div class="form-group">
|
||||
<ul>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="skill-roll-dialog">
|
||||
<h2 class="compdialog" id="compdialogTitle"></h2>
|
||||
<div class="form-group">
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="dialog-roll-sort">
|
||||
<div class="form-group">
|
||||
<ul>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="dialog-roll-danse">
|
||||
<div class="form-group">
|
||||
<ul>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="encaisse-roll-dialog">
|
||||
<h2 class="encaisserdialog" id="encaisserTitle"></h2>
|
||||
<div class="form-group">
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="dialog-roll-sort">
|
||||
|
||||
<div class="form-group">
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="dialog-roll-sort">
|
||||
<div class="form-group">
|
||||
<ul>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="skill-roll-dialog">
|
||||
<div class="form-group">
|
||||
<label for="categorie">{{tmr.label}} ({{tmr.coord}})</label>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="dialog-roll-meditation">
|
||||
<div class="form-group">
|
||||
<ul class="item-list">
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="dialog-roll-sort">
|
||||
<div class="form-group">
|
||||
<ul>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="dialog-roll-sort">
|
||||
<div class="form-group">
|
||||
<ul>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="dialog-roll-sort">
|
||||
|
||||
<div class="form-group">
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="resolution-roll-dialog">
|
||||
<div class="flexrow flex-group-left">
|
||||
<label for="categorie">Caractéristique</label>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="skill-roll-dialog">
|
||||
<h2 class="compdialog">Rêve de Dragon de force {{rencontre.force}}!</h2>
|
||||
<div class="form-group">
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="dialog-roll-sort">
|
||||
<div class="form-group">
|
||||
<label for="categorie">Rêve : <label>{{numberFormat selectedCarac.value decimals=0 sign=false}}</label></label>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
{{#if surencMalusFlag}}
|
||||
<div class="form-group">
|
||||
<label for="xp">Appliquer le malus de sur-encombrement ? </label>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="tmr-dialog">
|
||||
<h2 class="comptmrdialog" id="tmrDialogTitle"></h2>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{{#if data.isGM}}
|
||||
{{#if options.isGM}}
|
||||
<h3>Notes du MJ : </h3>
|
||||
<div class="form-group editor">
|
||||
{{editor content=data.notesmj target="data.notesmj" button=true owner=owner editable=editable}}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<div class="control-icon rdd-combat ">
|
||||
<img class="rdd-hud-togglebutton" src="systems/foundryvtt-reve-de-dragon/icons/heures/hd06.svg" width="36" height="36" title="Attaque"/>
|
||||
<div class="rdd-hud-list tokenhudext left">
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<div class="control-icon rdd-initiative ">
|
||||
<img class="rdd-hud-togglebutton" src="icons/svg/sword.svg" width="36" height="36" title="Initiative" />
|
||||
<div class="rdd-hud-list tokenhudext right">
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}" />
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}" />
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}" />
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||
|
@ -1,3 +1,4 @@
|
||||
{{log "handlebar" this}}
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user