Merge branch 'master-fixes' into 'master'

Moral sur les oeuvres

See merge request LeRatierBretonnien/foundryvtt-reve-de-dragon!169
This commit is contained in:
Leratier Bretonnien 2021-03-17 07:38:29 +00:00
commit a86ac0ffa2
42 changed files with 747 additions and 1038 deletions

View File

@ -7,6 +7,7 @@
import { HtmlUtility } from "./html-utility.js"; import { HtmlUtility } from "./html-utility.js";
import { RdDUtility } from "./rdd-utility.js"; import { RdDUtility } from "./rdd-utility.js";
import { RdDActorSheet } from "./actor-sheet.js"; import { RdDActorSheet } from "./actor-sheet.js";
import { RdDCarac } from "./rdd-carac.js";
/* -------------------------------------------- */ /* -------------------------------------------- */
export class RdDActorCreatureSheet extends RdDActorSheet { export class RdDActorCreatureSheet extends RdDActorSheet {
@ -25,41 +26,25 @@ export class RdDActorCreatureSheet extends RdDActorSheet {
/* -------------------------------------------- */ /* -------------------------------------------- */
getData() { async getData() {
let data = super.getData(); let formData = await super.getData();
console.log("Creature : ", data); console.log("Creature : ", formData);
formData.calc = {
data.itemsByType = {}; caracTotal: RdDCarac.computeTotal(formData.data.carac),
for (const item of data.items) { resumeBlessures: this.actor.computeResumeBlessure(formData.data.blessures),
let list = data.itemsByType[item.type]; encTotal: await this.actor.computeEncombrementTotalEtMalusArmure(),
if (!list) {
list = [];
data.itemsByType[item.type] = list;
}
list.push(item);
} }
formData.calc.surEncombrementMessage = (formData.data.compteurs.surenc.value < 0) ? "Sur-Encombrement!" : "";
formData.options.isGM = game.user.isGM;
// Compute current carac sum formData.data.competencecreature = formData.itemsByType["competencecreature"];
let sum = 0;
Object.values(data.data.carac).forEach(carac => { if (!carac.derivee) { sum += parseInt(carac.value) } });
data.data.caracSum = sum;
data.data.carac.taille.isTaille = true; // To avoid button link; RdDUtility.filterItemsPerTypeForSheet(formData);
data.data.blessures.resume = this.actor.computeResumeBlessure(data.data.blessures); RdDUtility.buildArbreDeConteneur(this, formData);
data.data.isGM = game.user.isGM; console.log("Creature : ", this.objetVersConteneur, formData);
data.data.competencecreature = data.itemsByType["competencecreature"]; return formData;
this.actor.computeEncombrementTotalEtMalusArmure();
RdDUtility.filterItemsPerTypeForSheet(data);
RdDUtility.buildArbreDeConteneur(this, data);
data.data.encTotal = this.actor.encTotal;
data.data.isGM = game.user.isGM;
console.log("Creature : ", this.objetVersConteneur, data);
return data;
} }
/* -------------------------------------------- */ /* -------------------------------------------- */

View File

@ -4,6 +4,7 @@
*/ */
import { HtmlUtility } from "./html-utility.js"; import { HtmlUtility } from "./html-utility.js";
import { Misc } from "./misc.js";
/* -------------------------------------------- */ /* -------------------------------------------- */
export class RdDActorEntiteSheet extends ActorSheet { export class RdDActorEntiteSheet extends ActorSheet {
@ -29,24 +30,18 @@ export class RdDActorEntiteSheet extends ActorSheet {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
getData() { async getData() {
let data = super.getData(); let formData = super.getData();
data.itemsByType = {}; formData.itemsByType = Misc.classify(formData.items);
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; formData.options.isGM = game.user.isGM;
data.data.competencecreature = data.itemsByType["competencecreature"];
data.data.isGM = game.user.isGM;
return data; formData.data.carac.taille.isTaille = true; // To avoid button link;
formData.data.competencecreature = formData.itemsByType["competencecreature"];
return formData;
} }
/* -------------------------------------------- */ /* -------------------------------------------- */

View File

@ -10,6 +10,7 @@ import { RdDItemCompetence } from "./item-competence.js";
import { RdDBonus } from "./rdd-bonus.js"; import { RdDBonus } from "./rdd-bonus.js";
import { Misc } from "./misc.js"; import { Misc } from "./misc.js";
import { RdDCombatManager } from "./rdd-combat.js"; import { RdDCombatManager } from "./rdd-combat.js";
import { RdDCarac } from "./rdd-carac.js";
/* -------------------------------------------- */ /* -------------------------------------------- */
export class RdDActorSheet extends ActorSheet { export class RdDActorSheet extends ActorSheet {
@ -31,114 +32,128 @@ export class RdDActorSheet extends ActorSheet {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
getData() { async getData() {
let data = super.getData(); let formData = super.getData();
if (data.actor.type == 'creature' || data.actor.type == 'humanoide') return data; // Shortcut // -------------- version 0.7.9
// let formData = {
// cssClass: this.entity.owner ? "editable" : "locked",
// editable: this.isEditable,
// entity: duplicate(this.entity.data),
// limited: this.entity.limited,
// options: this.options,
// owner: this.entity.owner,
// title: this.title
// }
// // Entity data
// formData.actor = formData.entity;
// formData.data = formData.entity.data;
data.data.editCaracComp = this.options.editCaracComp; // // Owned items
data.data.showCompNiveauBase = this.options.showCompNiveauBase; // formData.items = formData.actor.items;
data.data.montrerArchetype = this.options.montrerArchetype; // formData.items.sort((a, b) => (a.sort || 0) - (b.sort || 0));
data.itemsByType = Misc.classify(data.items); formData.itemsByType = Misc.classify(formData.items);
RdDUtility.filterItemsPerTypeForSheet(formData);
// Competence per category formData.options.isGM = game.user.isGM;
data.data.comptageArchetype = RdDUtility.getLimitesArchetypes();
data.data.competenceXPTotal = 0; // la taille est la taille: on ne peut pas l'utiliser pour un jet
data.competenceByCategory = Misc.classify( formData.data.carac.taille.isTaille = true;
data.itemsByType.competence,
item => item.data.categorie, if (this.actor.data.type == 'creature') return formData; // Shortcut
item => {
let archetypeKey = (item.data.niveau_archetype < 0) ? 0 : item.data.niveau_archetype; // toujours avoir une liste d'armes (pour mettre esquive et corps à corps)
if (data.data.comptageArchetype[archetypeKey] == undefined) { formData.itemsByType.arme = formData.itemsByType.arme ?? [];
data.data.comptageArchetype[archetypeKey] = { "niveau": archetypeKey, "nombreMax": 0, "nombre": 0 };
} formData.competenceByCategory = Misc.classify(formData.data.competences, item => item.data.categorie);
data.data.comptageArchetype[archetypeKey].nombre = (data.data.comptageArchetype[archetypeKey]?.nombre ?? 0) + 1; //Comptage archetype
item.data.xpNext = RdDItemCompetence.getCompetenceNextXp(item.data.niveau); formData.calc = {
item.data.isLevelUp = item.data.xp >= item.data.xpNext; // Flag de niveau à MAJ comptageArchetype: RdDItemCompetence.computeResumeArchetype(formData.data.competences),
//this.actor.checkCompetenceXP(item.name); // Petite vérification experience competenceXPTotal: RdDItemCompetence.computeTotalXP(formData.data.competences),
item.data.showCompetence = !data.data.showCompNiveauBase || (Number(item.data.niveau) != Number(RdDItemCompetence.getLevelCategory(item.data.categorie))); caracTotal: RdDCarac.computeTotal(formData.data.carac, formData.data.beaute),
// Ignorer les compétences 'troncs' à ce stade // Mise à jour de l'encombrement total et du prix de l'équipement
data.data.competenceXPTotal += RdDItemCompetence.computeCompetenceXPCost(item); encTotal: await this.actor.computeEncombrementTotalEtMalusArmure(),
return item; prixTotalEquipement: await this.actor.computePrixTotalEquipement(),
surprise: RdDBonus.find(this.actor.getSurprise(false)).descr,
fatigue: {
malus: RdDUtility.calculMalusFatigue(formData.data.sante.fatigue.value, formData.data.sante.endurance.max),
html: "<table class='table-fatigue'>" + RdDUtility.makeHTMLfatigueMatrix(formData.data.sante.fatigue.value, formData.data.sante.endurance.max).html() + "</table>"
},
resumeBlessures: this.actor.computeResumeBlessure(formData.data.blessures),
};
formData.calc.surEncombrementMessage = (formData.data.compteurs.surenc.value < 0) ? "Sur-Encombrement!" : "";
formData.data.competences.forEach(item => {
item.visible = !this.options.showCompNiveauBase || !RdDItemCompetence.isNiveauBase(item);
RdDItemCompetence.levelUp(item);
});
Object.values(formData.data.carac).forEach(c => {
RdDCarac.levelUp(c);
}); });
data.data.competenceXPTotal -= RdDItemCompetence.computeEconomieCompetenceTroncXP(data.itemsByType.competence);
// Compute current carac sum
let sum = 0;
for (let caracName in data.data.carac) {
let currentCarac = data.data.carac[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;
// Force empty arme, at least for Esquive // Force empty arme, at least for Esquive
if (data.itemsByType.arme == undefined) data.itemsByType.arme = []; if (formData.itemsByType.arme == undefined) formData.itemsByType.arme = [];
for (const arme of data.itemsByType.arme) { for (const arme of formData.itemsByType.arme) {
arme.data.niveau = 0; // Per default, TODO to be fixed arme.data.niveau = 0; // Per default, TODO to be fixed
for (const melee of data.competenceByCategory.melee) { for (const melee of formData.competenceByCategory.melee) {
if (melee.name == arme.data.competence) if (melee.name == arme.data.competence)
arme.data.niveau = melee.data.niveau arme.data.niveau = melee.data.niveau
} }
for (const tir of data.competenceByCategory.tir) { for (const tir of formData.competenceByCategory.tir) {
if (tir.name == arme.data.competence) if (tir.name == arme.data.competence)
arme.data.niveau = tir.data.niveau arme.data.niveau = tir.data.niveau
} }
for (const lancer of data.competenceByCategory.lancer) { for (const lancer of formData.competenceByCategory.lancer) {
if (lancer.name == arme.data.competence) if (lancer.name == arme.data.competence)
arme.data.niveau = lancer.data.niveau arme.data.niveau = lancer.data.niveau
} }
} }
// To avoid armour and so on... // To avoid armour and so on...
data.data.combat = duplicate(RdDUtility.checkNull(data.itemsByType['arme'])); formData.data.combat = duplicate(RdDUtility.checkNull(formData.itemsByType['arme']));
data.data.combat = RdDCombatManager.finalizeArmeList(data.data.combat, data.itemsByType.competence, data.data.carac); formData.data.combat = RdDCombatManager.finalizeArmeList(formData.data.combat, formData.itemsByType.competence, formData.data.carac);
data.esquive = { name: "Esquive", niveau: data.competenceByCategory?.melee.find(it => it.name == 'Esquive')?.data.niveau ?? -6 }; formData.esquive = { name: "Esquive", niveau: formData.competenceByCategory?.melee.find(it => it.name == 'Esquive')?.data.niveau ?? -6 };
let corpsACorps = data.competenceByCategory?.melee.find(it => it.name == 'Corps à corps'); let corpsACorps = formData.competenceByCategory?.melee.find(it => it.name == 'Corps à corps');
if (corpsACorps) { if (corpsACorps) {
let cc_init = RdDCombatManager.calculInitiative(corpsACorps.data.niveau, data.data.carac['melee'].value); let cc_init = RdDCombatManager.calculInitiative(corpsACorps.data.niveau, formData.data.carac['melee'].value);
data.data.combat.push(RdDItemArme.mainsNues({ niveau: corpsACorps.data.niveau, initiative: cc_init })); formData.data.combat.push(RdDItemArme.mainsNues({ niveau: corpsACorps.data.niveau, initiative: cc_init }));
} }
this.armesList = duplicate(data.data.combat); this.armesList = duplicate(formData.data.combat);
data.data.carac.taille.isTaille = true; // To avoid button link; formData.data.carac.taille.isTaille = true; // To avoid button link;
data.data.compteurs.chance.isChance = true; formData.data.compteurs.chance.isChance = true;
data.data.blessures.resume = this.actor.computeResumeBlessure(data.data.blessures); formData.data.blessures.resume = this.actor.computeResumeBlessure(formData.data.blessures);
// Mise à jour de l'encombrement total et du prix de l'équipement // Mise à jour de l'encombrement total et du prix de l'équipement
this.actor.computeEncombrementTotalEtMalusArmure();
this.actor.computePrixTotalEquipement();
// Common data // Common data
data.data.competenceByCategory = data.competenceByCategory; formData.data.competenceByCategory = formData.competenceByCategory;
data.data.encTotal = this.actor.encTotal; formData.data.isGM = game.user.isGM;
data.data.prixTotalEquipement = this.actor.prixTotalEquipement; formData.ajustementsConditions = CONFIG.RDD.ajustementsConditions;
data.data.surprise = RdDBonus.find(this.actor.getSurprise(false)).descr; formData.difficultesLibres = CONFIG.RDD.difficultesLibres;
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. // low is normal, this the base used to compute the grid.
data.data.fatigue = { formData.data.fatigue = {
malus: RdDUtility.calculMalusFatigue(data.data.sante.fatigue.value, data.data.sante.endurance.max), malus: RdDUtility.calculMalusFatigue(formData.data.sante.fatigue.value, formData.data.sante.endurance.max),
html: "<table class='table-fatigue'>" + RdDUtility.makeHTMLfatigueMatrix(data.data.sante.fatigue.value, data.data.sante.endurance.max).html() + "</table>" html: "<table class='table-fatigue'>" + RdDUtility.makeHTMLfatigueMatrix(formData.data.sante.fatigue.value, formData.data.sante.endurance.max).html() + "</table>"
} }
RdDUtility.filterItemsPerTypeForSheet(data); RdDUtility.filterItemsPerTypeForSheet(formData);
data.data.sortReserve = data.data.reve.reserve.list; formData.data.sortReserve = formData.data.reve.reserve.list;
data.data.rencontres = duplicate(data.data.reve.rencontre.list); formData.data.rencontres = duplicate(formData.data.reve.rencontre.list);
data.data.caseSpeciales = data.itemsByType['casetmr']; formData.data.caseSpeciales = formData.itemsByType['casetmr'];
RdDUtility.buildArbreDeConteneur(this, data); RdDUtility.buildArbreDeConteneur(this, formData);
data.data.surEncombrementMessage = (data.data.compteurs.surenc.value < 0) ? "Sur-Encombrement!" : ""; formData.data.vehiculesList = this.actor.buildVehiculesList();
data.data.vehiculesList = this.actor.buildVehiculesList(); formData.data.monturesList = this.actor.buildMonturesList();
data.data.monturesList = this.actor.buildMonturesList(); formData.data.suivantsList = this.actor.buildSuivantsList();
data.data.suivantsList = this.actor.buildSuivantsList(); return formData;
return data; }
isCompetenceAffichable(competence) {
return !this.options.showCompNiveauBase || !RdDItemCompetence.isNiveauBase(competence);
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -489,15 +504,15 @@ export class RdDActorSheet extends ActorSheet {
this.actor.transformerStress(); this.actor.transformerStress();
this.render(true); this.render(true);
}); });
html.find('#moral-malheureux').click((event) => { html.find('.moral-malheureux').click((event) => {
this.actor.jetDeMoral('malheureuse'); this.actor.jetDeMoral('malheureuse');
this.render(true); this.render(true);
}); });
html.find('#moral-neutre').click((event) => { html.find('.moral-neutre').click((event) => {
this.actor.jetDeMoral('neutre'); this.actor.jetDeMoral('neutre');
this.render(true); this.render(true);
}); });
html.find('#moral-heureux').click((event) => { html.find('.moral-heureux').click((event) => {
this.actor.jetDeMoral('heureuse'); this.actor.jetDeMoral('heureuse');
this.render(true); this.render(true);
}); });

View File

@ -33,21 +33,24 @@ export class RdDActorVehiculeSheet extends ActorSheet {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
getData() { async getData() {
let data = super.getData(); let formData = super.getData();
data.itemsByType = Misc.classify(data.items); formData.itemsByType = Misc.classify(formData.items);
RdDUtility.filterItemsPerTypeForSheet(data); RdDUtility.filterItemsPerTypeForSheet(formData);
RdDUtility.buildArbreDeConteneur(this, data); RdDUtility.buildArbreDeConteneur(this, formData);
this.actor.computeEncombrementTotalEtMalusArmure(); formData.options.isGM = game.user.isGM;
data.data.isGM = game.user.isGM;
data.data.surEncombrementMessage = (this.encTotal > data.capacite_encombrement) ? "Sur-Encombrement!" : "";
console.log("DATA", data); formData.calc ={
encTotal: await this.actor.computeEncombrementTotalEtMalusArmure(),
}
formData.calc.surEncombrementMessage = formData.calc.encTotal > formData.data.capacite_encombrement ? "Sur-Encombrement!" : "",
return data; console.log("DATA", formData);
return formData;
} }
/* -------------------------------------------- */ /* -------------------------------------------- */

View File

@ -25,6 +25,7 @@ import { TMRRencontres } from "./tmr-rencontres.js";
import { Poetique } from "./poetique.js"; import { Poetique } from "./poetique.js";
import { EffetsDraconiques } from "./tmr/effets-draconiques.js"; import { EffetsDraconiques } from "./tmr/effets-draconiques.js";
import { Draconique } from "./tmr/draconique.js"; import { Draconique } from "./tmr/draconique.js";
import { RdDCarac } from "./rdd-carac.js";
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -139,7 +140,7 @@ export class RdDActor extends Actor {
*/ */
async _prepareCharacterData(actorData) { async _prepareCharacterData(actorData) {
// Initialize empty items // Initialize empty items
RdDUtility.computeCarac(actorData.data); RdDCarac.computeCarac(actorData.data);
this.computeEncombrementTotalEtMalusArmure(); this.computeEncombrementTotalEtMalusArmure();
this.computePrixTotalEquipement(); this.computePrixTotalEquipement();
this.computeEtatGeneral(); this.computeEtatGeneral();
@ -736,7 +737,7 @@ export class RdDActor extends Actor {
let comp = this.getCompetence(compName); let comp = this.getCompetence(compName);
if (comp) { if (comp) {
let troncList = RdDItemCompetence.isTronc(compName); let troncList = RdDItemCompetence.isTronc(compName);
let nouveauNiveau = compValue ?? RdDItemCompetence.getLevelCategory(comp.data.categorie); let nouveauNiveau = compValue ?? RdDItemCompetence.getNiveauBase(comp.data.categorie);
if (troncList) { if (troncList) {
let message = "Vous avez modifié une compétence 'tronc'. Vérifiez que les compétences suivantes évoluent ensemble jusqu'au niveau 0 : "; let message = "Vous avez modifié une compétence 'tronc'. Vérifiez que les compétences suivantes évoluent ensemble jusqu'au niveau 0 : ";
for (let troncName of troncList) { for (let troncName of troncList) {
@ -1015,6 +1016,7 @@ export class RdDActor extends Actor {
malusArmureData.value = newMalusArmure; malusArmureData.value = newMalusArmure;
await this.update({ "data.attributs.malusarmure": malusArmureData }); await this.update({ "data.attributs.malusarmure": malusArmureData });
} }
return this.encTotal;
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -1032,6 +1034,7 @@ export class RdDActor extends Actor {
} }
// Mise à jour valeur totale de l'équipement // Mise à jour valeur totale de l'équipement
this.prixTotalEquipement = prixTotalEquipement; this.prixTotalEquipement = prixTotalEquipement;
return prixTotalEquipement;
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -1310,7 +1313,7 @@ export class RdDActor extends Actor {
if (this.isEntiteCauchemar()) { if (this.isEntiteCauchemar()) {
return 0; return 0;
} }
return RdDUtility.calculSConst(this.data.data.carac.constitution.value); return RdDCarac.calculSConst(this.data.data.carac.constitution.value);
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -1716,7 +1719,7 @@ export class RdDActor extends Actor {
async checkCaracXP(caracName) { async checkCaracXP(caracName) {
let carac = this.data.data.carac[caracName]; let carac = this.data.data.carac[caracName];
if (carac && carac.xp > 0) { if (carac && carac.xp > 0) {
let xpNeeded = RdDUtility.getCaracNextXp(carac.value + 1); let xpNeeded = RdDCarac.getCaracNextXp(carac.value + 1);
if (carac.xp >= xpNeeded) { if (carac.xp >= xpNeeded) {
carac = duplicate(carac); carac = duplicate(carac);
carac.value = Number(carac.value) + 1; carac.value = Number(carac.value) + 1;

View File

@ -1,9 +1,23 @@
const competenceTroncs = [["Esquive", "Dague", "Corps à corps"], 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"]]; ["Epée à 1 main", "Epée à 2 mains", "Hache à 1 main", "Hache à 2 mains", "Lance", "Masse à 1 main", "Masse à 2 mains"]];
const competence_xp_par_niveau = [5, 5, 5, 10, 10, 10, 10, 15, 15, 15, 15, 20, 20, 20, 20, 30, 30, 40, 40, 60, 60, 100, 100, 100, 100, 100, 100, 100, 100, 100]; const competence_xp_par_niveau = [5, 5, 5, 10, 10, 10, 10, 15, 15, 15, 15, 20, 20, 20, 20, 30, 30, 40, 40, 60, 60, 100, 100, 100, 100, 100, 100, 100, 100, 100];
const competence_niveau_max = competence_xp_par_niveau.length - 10; const competence_niveau_max = competence_xp_par_niveau.length - 10;
/* -------------------------------------------- */
const limitesArchetypes = [
{ "niveau": 0, "nombreMax": 100, "nombre": 0 },
{ "niveau": 1, "nombreMax": 10, "nombre": 0 },
{ "niveau": 2, "nombreMax": 9, "nombre": 0 },
{ "niveau": 3, "nombreMax": 8, "nombre": 0 },
{ "niveau": 4, "nombreMax": 7, "nombre": 0 },
{ "niveau": 5, "nombreMax": 6, "nombre": 0 },
{ "niveau": 6, "nombreMax": 5, "nombre": 0 },
{ "niveau": 7, "nombreMax": 4, "nombre": 0 },
{ "niveau": 8, "nombreMax": 3, "nombre": 0 },
{ "niveau": 9, "nombreMax": 2, "nombre": 0 },
{ "niveau": 10, "nombreMax": 1, "nombre": 0 },
{ "niveau": 11, "nombreMax": 1, "nombre": 0 }
];
/* -------------------------------------------- */ /* -------------------------------------------- */
const categorieCompetences = { const categorieCompetences = {
@ -35,10 +49,10 @@ export class RdDItemCompetence extends Item {
static getCategorieCompetences() { static getCategorieCompetences() {
return categorieCompetences; return categorieCompetences;
} }
static getLevelCategory(category) { static getNiveauBase(category) {
return categorieCompetences[category].level; return categorieCompetences[category].level;
} }
static getLabelCategory(category) { static getLabelCategorie(category) {
return categorieCompetences[category].label; return categorieCompetences[category].label;
} }
@ -77,6 +91,44 @@ export class RdDItemCompetence extends Item {
} }
return false; return false;
} }
/* -------------------------------------------- */
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 computeXP(competence) {
const factor = competence.name.includes('Thanatos') ? 2 : 1; // Thanatos compte double !
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 ?? -11, Math.min(it?.data.niveau ?? -11, 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 computeDeltaXP(from, to) {
RdDItemCompetence._valideNiveau(from);
RdDItemCompetence._valideNiveau(to);
return competence_xp_cumul[to] - competence_xp_cumul[from];
}
/* -------------------------------------------- */ /* -------------------------------------------- */
static computeCompetenceXPCost(competence) { static computeCompetenceXPCost(competence) {
let xp = RdDItemCompetence.getDeltaXp(competence.data.base, competence.data.niveau ?? competence.data.base); let xp = RdDItemCompetence.getDeltaXp(competence.data.base, competence.data.niveau ?? competence.data.base);
@ -100,6 +152,20 @@ export class RdDItemCompetence extends Item {
return economie; return economie;
} }
static levelUp(item) {
item.data.xpNext = RdDItemCompetence.getCompetenceNextXp(item.data.niveau);
item.data.isLevelUp = item.data.xp >= item.data.xpNext;
}
static isVisible(item) {
return Number(item.data.niveau) != RdDItemCompetence.getNiveauBase(item.data.categorie);
}
/* -------------------------------------------- */
static isNiveauBase(item) {
return Number(item.data.niveau) == RdDItemCompetence.getNiveauBase(item.data.categorie);
}
/* -------------------------------------------- */ /* -------------------------------------------- */
static findCompetence(list, name) { static findCompetence(list, name) {
name = name.toLowerCase(); name = name.toLowerCase();
@ -127,8 +193,24 @@ export class RdDItemCompetence extends Item {
/* -------------------------------------------- */ /* -------------------------------------------- */
static _valideNiveau(niveau){ static _valideNiveau(niveau){
if (niveau < -11 || niveau > competence_niveau_max) { if (niveau < -11 || niveau > competence_niveau_max) {
console.warn("Niveau en dehors des niveaux de compétences: [-11, " + competence_niveau_max + "]", niveau) console.warn(`Niveau ${niveau} en dehors des niveaux de compétences: [-11, ${competence_niveau_max} ]`);
} }
} }
/* -------------------------------------------- */
static computeResumeArchetype(competences) {
const archetype = RdDItemCompetence.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 getLimitesArchetypes() {
return duplicate(limitesArchetypes);
}
} }

View File

@ -47,26 +47,26 @@ export class RdDItemSheet extends ItemSheet {
/* -------------------------------------------- */ /* -------------------------------------------- */
async getData() { async getData() {
let data = super.getData(); let formData = super.getData();
data.categorieCompetences = RdDItemCompetence.getCategorieCompetences(); formData.categorieCompetences = RdDItemCompetence.getCategorieCompetences();
if ( data.item.type == 'tache' || data.item.type == 'livre' || data.item.type == 'meditation' || data.item.type == 'oeuvre') { if ( formData.item.type == 'tache' || formData.item.type == 'livre' || formData.item.type == 'meditation' || formData.item.type == 'oeuvre') {
data.caracList = duplicate(game.system.model.Actor.personnage.carac); formData.caracList = duplicate(game.system.model.Actor.personnage.carac);
data.competences = await RdDUtility.loadCompendiumNames( 'foundryvtt-reve-de-dragon.competences' ); formData.competences = await RdDUtility.loadCompendiumNames( 'foundryvtt-reve-de-dragon.competences' );
} }
if (data.item.type == 'arme') { if (formData.item.type == 'arme') {
data.competences = await RdDUtility.loadCompendium( 'foundryvtt-reve-de-dragon.competences', it => RdDItemCompetence.isCompetenceArme(it)); formData.competences = await RdDUtility.loadCompendium( 'foundryvtt-reve-de-dragon.competences', it => RdDItemCompetence.isCompetenceArme(it));
} }
if ( data.item.type == 'recettealchimique' ) { if ( formData.item.type == 'recettealchimique' ) {
RdDAlchimie.processManipulation(data.item, this.actor && this.actor._id ); RdDAlchimie.processManipulation(formData.item, this.actor && this.actor._id );
} }
if ( this.actor ) { if ( this.actor ) {
data.isOwned = true; formData.isOwned = true;
data.actorId = this.actor._id; formData.actorId = this.actor._id;
} }
data.bonusCaseList = RdDItemSort.getBonusCaseList(data, true); formData.bonusCaseList = RdDItemSort.getBonusCaseList(formData, true);
data.isGM = game.user.isGM; // Pour verrouiller certaines éditions formData.isGM = game.user.isGM; // Pour verrouiller certaines éditions
return data; return formData;
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -111,7 +111,7 @@ export class RdDItemSheet extends ItemSheet {
async _onClickSelectCategorie(event) { async _onClickSelectCategorie(event) {
event.preventDefault(); event.preventDefault();
let level = RdDItemCompetence.getLevelCategory(event.currentTarget.value); let level = RdDItemCompetence.getNiveauBase(event.currentTarget.value);
this.object.data.data.base = level; this.object.data.data.base = level;
$("#base").val( level ); $("#base").val( level );
} }

View File

@ -211,7 +211,7 @@ export class RdDCalendrier extends Application {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
fillCalendrierData(data = {}) { fillCalendrierData(formData = {}) {
let moisKey = heuresList[this.calendrier.moisRdD]; let moisKey = heuresList[this.calendrier.moisRdD];
let heureKey = heuresList[this.calendrier.heureRdD]; let heureKey = heuresList[this.calendrier.heureRdD];
@ -219,18 +219,18 @@ export class RdDCalendrier extends Application {
const heure = heuresDef[heureKey]; const heure = heuresDef[heureKey];
//console.log(moisKey, heureKey); //console.log(moisKey, heureKey);
data.heureKey = heureKey; formData.heureKey = heureKey;
data.moisKey = moisKey; formData.moisKey = moisKey;
data.jourMois = this.calendrier.jour + 1; formData.jourMois = this.calendrier.jour + 1;
data.nomMois = mois.label; // heures et mois nommés identiques formData.nomMois = mois.label; // heures et mois nommés identiques
data.iconMois = dossierIconesHeures + mois.icon; formData.iconMois = dossierIconesHeures + mois.icon;
data.nomHeure = heure.label; formData.nomHeure = heure.label;
data.iconHeure = dossierIconesHeures + heure.icon; formData.iconHeure = dossierIconesHeures + heure.icon;
data.nomSaison = saisonsDef[mois.saison].label; formData.nomSaison = saisonsDef[mois.saison].label;
data.heureRdD = this.calendrier.heureRdD; formData.heureRdD = this.calendrier.heureRdD;
data.minutesRelative = this.calendrier.minutesRelative; formData.minutesRelative = this.calendrier.minutesRelative;
data.isGM = game.user.isGM; formData.isGM = game.user.isGM;
return data; return formData;
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -301,12 +301,12 @@ export class RdDCalendrier extends Application {
/* -------------------------------------------- */ /* -------------------------------------------- */
getData() { getData() {
let data = super.getData(); let formData = super.getData();
this.fillCalendrierData(data); this.fillCalendrierData(formData);
this.setPos(this.calendrierPos); this.setPos(this.calendrierPos);
return data; return formData;
} }
/* -------------------------------------------- */ /* -------------------------------------------- */

View File

@ -1,4 +1,41 @@
import { Grammar } from "./grammar.js"; import { Grammar } from "./grammar.js";
import { RdDUtility } from "./rdd-utility.js";
const tableCaracDerivee = {
// xp: coût pour passer du niveau inférieur à ce niveau
1: { xp: 3, poids: "moins de 1kg", plusdom: -5, sconst: 0.5, sust: 0.1 },
2: { xp: 3, poids: "1-5", plusdom: -4, sconst: 0.5, sust: 0.3 },
3: { xp: 4, poids: "6-10", plusdom: -3, sconst: 1, sust: 0.5, beaute: 'hideux' },
4: { xp: 4, poids: "11-20", plusdom: -3, sconst: 1, sust: 1, beaute: 'repoussant' },
5: { xp: 5, poids: "21-30", plusdom: -2, sconst: 1, sust: 1, beaute: 'franchement très laid' },
6: { xp: 5, poids: "31-40", plusdom: -1, sconst: 2, sust: 2, beaute: 'laid' },
7: { xp: 6, poids: "41-50", plusdom: -1, sconst: 2, sust: 2, beaute: 'très désavantagé' },
8: { xp: 6, poids: "51-60", plusdom: 0, sconst: 2, sust: 2, beaute: 'désavantagé' },
9: { xp: 7, poids: "61-65", plusdom: 0, sconst: 3, sust: 2, beaute: 'pas terrible' },
10: { xp: 7, poids: "66-70", plusdom: 0, sconst: 3, sust: 3, beaute: 'commun' },
11: { xp: 8, poids: "71-75", plusdom: 0, sconst: 3, sust: 3, beaute: 'pas mal' },
12: { xp: 8, poids: "76-80", plusdom: +1, sconst: 4, sust: 3, beaute: 'avantagé' },
13: { xp: 9, poids: "81-90", plusdom: +1, sconst: 4, sust: 3, beaute: 'mignon' },
14: { xp: 9, poids: "91-100", plusdom: +2, sconst: 4, sust: 4, beaute: 'beau' },
15: { xp: 10, poids: "101-110", plusdom: +2, sconst: 5, sust: 4, beaute: 'très beau' },
16: { xp: 20, poids: "111-120", plusdom: +3, sconst: 5, sust: 4, beaute: 'éblouissant' },
17: { xp: 30, poids: "121-131", plusdom: +3, sconst: 5, sust: 5 },
18: { xp: 40, poids: "131-141", plusdom: +4, sconst: 6, sust: 5 },
19: { xp: 50, poids: "141-150", plusdom: +4, sconst: 6, sust: 5 },
20: { xp: 60, poids: "151-160", plusdom: +4, sconst: 6, sust: 6 },
21: { xp: 70, poids: "161-180", plusdom: +5, sconst: 7, sust: 6 },
22: { xp: 80, poids: "181-200", plusdom: +5, sconst: 7, sust: 7 },
23: { xp: 90, poids: "201-300", plusdom: +6, sconst: 7, sust: 8 },
24: { xp: 100, poids: "301-400", plusdom: +6, sconst: 8, sust: 9 },
25: { xp: 110, poids: "401-500", plusdom: +7, sconst: 8, sust: 10 },
26: { xp: 120, poids: "501-600", plusdom: +7, sconst: 8, sust: 11 },
27: { xp: 130, poids: "601-700", plusdom: +8, sconst: 9, sust: 12 },
28: { xp: 140, poids: "701-800", plusdom: +8, sconst: 9, sust: 13 },
29: { xp: 150, poids: "801-900", plusdom: +9, sconst: 9, sust: 14 },
30: { xp: 160, poids: "901-1000", plusdom: +9, sconst: 10, sust: 15 },
31: { xp: 170, poids: "1001-1500", plusdom: +10, sconst: 10, sust: 16 },
32: { xp: 180, poids: "1501-2000", plusdom: +11, sconst: 10, sust: 17 }
};
export class RdDCarac { export class RdDCarac {
@ -21,6 +58,37 @@ export class RdDCarac {
(RdDCarac.isReve(selectedCarac) && !competence); (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 levelUp(it) {
it.xpNext = RdDCarac.getCaracNextXp(it.value);
it.isLevelUp = (it.xp >= it.xpNext);
}
/* -------------------------------------------- */
static calculSConst(constitution) {
return Number(tableCaracDerivee[Number(constitution)].sconst);
}
/* -------------------------------------------- */
static getCaracNextXp(value) {
const nextValue = Number(value) + 1;
// xp est le coût pour atteindre cette valeur, on regarde donc le coût de la valeur+1
return RdDCarac.getCaracXp(nextValue);
}
static getCaracXp(targetValue) {
return tableCaracDerivee[targetValue]?.xp ?? 200;
}
/** /**
* Lappel à la chance nest possible que pour recommencer les jets dactions physiques : * Lappel à la chance nest possible que pour recommencer les jets dactions physiques :
* tous les jets de combat, de FORCE, dAGILITÉ, de DEXTÉRITÉ, de Dérobée, dAPPARENCE, * tous les jets de combat, de FORCE, dAGILITÉ, de DEXTÉRITÉ, de Dérobée, dAPPARENCE,
@ -29,4 +97,38 @@ export class RdDCarac {
static isActionPhysique(selectedCarac) { static isActionPhysique(selectedCarac) {
return Grammar.toLowerCaseNoAccent(selectedCarac?.label).match(/(apparence|force|agilite|dexterite|vue|ouie|odorat|empathie|melee|tir|lancer|derobee)/); return Grammar.toLowerCaseNoAccent(selectedCarac?.label).match(/(apparence|force|agilite|dexterite|vue|ouie|odorat|empathie|melee|tir|lancer|derobee)/);
} }
/* -------------------------------------------- */
static computeCarac(data) {
data.carac.force.value = Math.min(data.carac.force.value, parseInt(data.carac.taille.value) + 4);
data.carac.derobee.value = Math.floor(parseInt(((21 - data.carac.taille.value)) + parseInt(data.carac.agilite.value)) / 2);
let bonusDomKey = Math.floor((parseInt(data.carac.force.value) + parseInt(data.carac.taille.value)) / 2);
bonusDomKey = Math.min(Math.max(bonusDomKey, 0), 32); // Clamp de securite
let tailleData = tableCaracDerivee[bonusDomKey];
data.attributs.plusdom.value = tailleData.plusdom;
data.attributs.sconst.value = RdDCarac.calculSConst(data.carac.constitution.value);
data.attributs.sust.value = tableCaracDerivee[Number(data.carac.taille.value)].sust;
data.attributs.encombrement.value = (parseInt(data.carac.force.value) + parseInt(data.carac.taille.value)) / 2;
data.carac.melee.value = Math.floor((parseInt(data.carac.force.value) + parseInt(data.carac.agilite.value)) / 2);
data.carac.tir.value = Math.floor((parseInt(data.carac.vue.value) + parseInt(data.carac.dexterite.value)) / 2);
data.carac.lancer.value = Math.floor((parseInt(data.carac.tir.value) + parseInt(data.carac.force.value)) / 2);
data.sante.vie.max = Math.ceil((parseInt(data.carac.taille.value) + parseInt(data.carac.constitution.value)) / 2);
data.sante.vie.value = Math.min(data.sante.vie.value, data.sante.vie.max)
data.sante.endurance.max = Math.max(parseInt(data.carac.taille.value) + parseInt(data.carac.constitution.value), parseInt(data.sante.vie.max) + parseInt(data.carac.volonte.value));
data.sante.endurance.value = Math.min(data.sante.endurance.value, data.sante.endurance.max);
data.sante.fatigue.max = data.sante.endurance.max * 2;
data.sante.fatigue.value = Math.min(data.sante.fatigue.value, data.sante.fatigue.max);
//Compteurs
data.reve.reve.max = data.carac.reve.value;
data.compteurs.chance.max = data.carac.chance.value;
}
} }

View File

@ -3,6 +3,7 @@
import { DeDraconique } from "./de-draconique.js"; import { DeDraconique } from "./de-draconique.js";
import { RdDItemCompetence } from "./item-competence.js"; import { RdDItemCompetence } from "./item-competence.js";
import { Misc } from "./misc.js"; import { Misc } from "./misc.js";
import { RdDCarac } from "./rdd-carac.js";
import { RdDDice } from "./rdd-dice.js"; import { RdDDice } from "./rdd-dice.js";
import { RdDNameGen } from "./rdd-namegen.js"; import { RdDNameGen } from "./rdd-namegen.js";
import { RdDResolutionTable } from "./rdd-resolution-table.js"; import { RdDResolutionTable } from "./rdd-resolution-table.js";
@ -266,7 +267,7 @@ export class RdDCommands {
getCoutXpCarac(msg, params) { getCoutXpCarac(msg, params) {
if (params && params.length == 1) { if (params && params.length == 1) {
let to = Number(params[0]); let to = Number(params[0]);
RdDCommands._chatAnswer(msg, `Coût pour passer une caractéristique de ${to - 1} à ${to}: ${RdDUtility.getCaracXp(to)}`); RdDCommands._chatAnswer(msg, `Coût pour passer une caractéristique de ${to - 1} à ${to}: ${RdDCarac.getCaracXp(to)}`);
} }
else { else {
return false; return false;

View File

@ -18,7 +18,7 @@ export class RdDRoll extends Dialog {
/* -------------------------------------------- */ /* -------------------------------------------- */
static async create(actor, rollData, dialogConfig, ...actions) { static async create(actor, rollData, dialogConfig, ...actions) {
if (actor.isRollWindowsOpened() ) { if (actor.isRollWindowsOpened()) {
ui.notifications.warn("Vous avez déja une fenêtre de Test ouverte, il faut la fermer avant d'en ouvrir une autre.") ui.notifications.warn("Vous avez déja une fenêtre de Test ouverte, il faut la fermer avant d'en ouvrir une autre.")
return; return;
} }
@ -52,17 +52,18 @@ export class RdDRoll extends Dialog {
surencMalusFlag: actor.isPersonnage() ? (actor.data.data.compteurs.surenc.value < 0) : false, surencMalusFlag: actor.isPersonnage() ? (actor.data.data.compteurs.surenc.value < 0) : false,
surencMalusValue: actor.getSurenc(), surencMalusValue: actor.getSurenc(),
useMalusSurenc: false, useMalusSurenc: false,
appelAuMoralPossible : false, /* Est-ce que l'appel au moral est possible ? Variable utisé pour l'affichage ou non de la ligne concernant le moral */ useMoral: false, /* Est-ce que le joueur demande d'utiliser le moral ? Utile si le joueur change plusieurs fois de carac associée. */
appelAuMoralDemander :false, /* Est-ce que le joueur demande d'utiliser le moral ? Utile si le joueur change plusieurs fois de carac associée. */ perteMoralEchec: false, /* Pour l'affichage dans le chat */
perteMoralEchec : false, /* Pour l'affichage dans le chat */ use: { libre: true, conditions: true, surenc: false, encTotal: false },
use: { libre: true, conditions: true, surenc: false, encTotal: false, appelAuMoral : false /* Le jet se fait ou non en utilisant l'appel au moral */},
isMalusEncombrementTotal: RdDItemCompetence.isMalusEncombrementTotal(rollData.competence), isMalusEncombrementTotal: RdDItemCompetence.isMalusEncombrementTotal(rollData.competence),
useMalusEncTotal: false, useMalusEncTotal: false,
encTotal: actor.getEncTotal(), encTotal: actor.getEncTotal(),
ajustementAstrologique: actor.ajustementAstrologique(), ajustementAstrologique: actor.ajustementAstrologique(),
surprise: actor.getSurprise(false), surprise: actor.getSurprise(false),
canClose: true canClose: true
} };
mergeObject(rollData, defaultRollData, { recursive: true, overwrite: false }); mergeObject(rollData, defaultRollData, { recursive: true, overwrite: false });
if (rollData.forceCarac) { if (rollData.forceCarac) {
rollData.carac = rollData.forceCarac; rollData.carac = rollData.forceCarac;
@ -206,24 +207,19 @@ export class RdDRoll extends Dialog {
this.rollData.useMalusEncTotal = event.currentTarget.checked; this.rollData.useMalusEncTotal = event.currentTarget.checked;
this.updateRollResult(); this.updateRollResult();
}); });
html.find('#iconeSmile').change((event) => { html.find('.imgAppelAuMoral').click((event) => { /* l'appel au moral, qui donne un bonus de +1 */
console.log("iconeSmile"); this.rollData.useMoral = !this.rollData.useMoral;
console.log(html.find('.iconeSmile')); if (this.rollData.useMoral) {
this.updateRollResult(); if (this.rollData.moral > 0) {
}); html.find('.imgAppelAuMoral')[0].src = "/systems/foundryvtt-reve-de-dragon/icons/moral-heureux.svg";
html.find('#iconeSmile').click((event) => { /* l'appel au moral, qui donne un bonus de +1 */ html.find('.tooltipAppelAuMoralText')[0].innerHTML = "Appel au moral";
this.rollData.appelAuMoralDemander = ! this.rollData.appelAuMoralDemander;
if ( this.rollData.appelAuMoralDemander ) {
if ( this.rollData.moral > 0 ) {
html.find('#iconeSmile')[0].src = "/systems/foundryvtt-reve-de-dragon/icons/moral-heureux.svg";
html.find('#tooltipAppelAuMoralText')[0].innerHTML = "Appel au moral";
} else { } else {
html.find('#iconeSmile')[0].src = "/systems/foundryvtt-reve-de-dragon/icons/moral-malheureux.svg"; html.find('.imgAppelAuMoral')[0].src = "/systems/foundryvtt-reve-de-dragon/icons/moral-malheureux.svg";
html.find('#tooltipAppelAuMoralText')[0].innerHTML = "Appel à l'énergie du désespoir"; html.find('.tooltipAppelAuMoralText')[0].innerHTML = "Appel à l'énergie du désespoir";
} }
} else { } else {
html.find('#iconeSmile')[0].src = "/systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg"; html.find('.imgAppelAuMoral')[0].src = "/systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg";
html.find('#tooltipAppelAuMoralText')[0].innerHTML = "Sans appel au moral"; html.find('.tooltipAppelAuMoralText')[0].innerHTML = "Sans appel au moral";
} }
this.updateRollResult(); this.updateRollResult();
}); });
@ -242,6 +238,7 @@ export class RdDRoll extends Dialog {
rollData.dmg = rollData.attackerRoll?.dmg ?? RdDBonus.dmg(rollData, this.actor.getBonusDegat()); rollData.dmg = rollData.attackerRoll?.dmg ?? RdDBonus.dmg(rollData, this.actor.getBonusDegat());
rollData.caracValue = parseInt(rollData.selectedCarac.value); rollData.caracValue = parseInt(rollData.selectedCarac.value);
rollData.coupsNonMortels = (rollData.attackerRoll?.dmg.mortalite ?? rollData.dmg.mortalite) == 'non-mortel'; rollData.coupsNonMortels = (rollData.attackerRoll?.dmg.mortalite ?? rollData.dmg.mortalite) == 'non-mortel';
rollData.use.appelAuMoral = this.actor.isPersonnage() && RdDCarac.isActionPhysique(rollData.selectedCarac);
let dmgText = Misc.toSignedString(rollData.dmg.total); let dmgText = Misc.toSignedString(rollData.dmg.total);
if (rollData.coupsNonMortels) { if (rollData.coupsNonMortels) {
@ -253,20 +250,11 @@ export class RdDRoll extends Dialog {
HtmlUtility._showControlWhen($("#div-sort-ptreve"), RdDItemSort.isCoutVariable(rollData.selectedSort)) HtmlUtility._showControlWhen($("#div-sort-ptreve"), RdDItemSort.isCoutVariable(rollData.selectedSort))
} }
if ( ! RdDCarac.isActionPhysique(rollData.selectedCarac || ! actor.isPersonnage() ) ) {
rollData.appelAuMoralPossible = false;
rollData.use.appelAuMoral = false;
} else {
rollData.appelAuMoralPossible = true;
rollData.use.appelAuMoral = rollData.appelAuMoralDemander;
}
RollDataAjustements.calcul(rollData, this.actor); RollDataAjustements.calcul(rollData, this.actor);
rollData.finalLevel = this._computeFinalLevel(rollData); rollData.finalLevel = this._computeFinalLevel(rollData);
HtmlUtility._showControlWhen($(".diffMoral"), rollData.ajustements.moralTotal.used); HtmlUtility._showControlWhen($(".diffMoral"), rollData.ajustements.moralTotal.used);
HtmlUtility._showControlWhen($("#divAppelAuMoral"), rollData.appelAuMoralPossible ); HtmlUtility._showControlWhen($(".divAppelAuMoral"), rollData.use.appelAuMoral);
HtmlUtility._showControlWhen($("#etat-general"), !RdDCarac.isIgnoreEtatGeneral(rollData.selectedCarac, rollData.competence)); HtmlUtility._showControlWhen($("#etat-general"), !RdDCarac.isIgnoreEtatGeneral(rollData.selectedCarac, rollData.competence));
HtmlUtility._showControlWhen($("#ajust-astrologique"), RdDResolutionTable.isAjustementAstrologique(rollData)); HtmlUtility._showControlWhen($("#ajust-astrologique"), RdDResolutionTable.isAjustementAstrologique(rollData));

View File

@ -5,22 +5,6 @@ import { RdDCombat } from "./rdd-combat.js";
import { Misc } from "./misc.js"; import { Misc } from "./misc.js";
import { Grammar } from "./grammar.js"; import { Grammar } from "./grammar.js";
/* -------------------------------------------- */
const limitesArchetypes = [
{ "niveau": 0, "nombreMax": 100, "nombre": 0 },
{ "niveau": 1, "nombreMax": 10, "nombre": 0 },
{ "niveau": 2, "nombreMax": 9, "nombre": 0 },
{ "niveau": 3, "nombreMax": 8, "nombre": 0 },
{ "niveau": 4, "nombreMax": 7, "nombre": 0 },
{ "niveau": 5, "nombreMax": 6, "nombre": 0 },
{ "niveau": 6, "nombreMax": 5, "nombre": 0 },
{ "niveau": 7, "nombreMax": 4, "nombre": 0 },
{ "niveau": 8, "nombreMax": 3, "nombre": 0 },
{ "niveau": 9, "nombreMax": 2, "nombre": 0 },
{ "niveau": 10, "nombreMax": 1, "nombre": 0 },
{ "niveau": 11, "nombreMax": 1, "nombre": 0 }
];
/* -------------------------------------------- */ /* -------------------------------------------- */
// This table starts at 0 -> niveau -10 // This table starts at 0 -> niveau -10
const carac_array = ["taille", "apparence", "constitution", "force", "agilite", "dexterite", "vue", "ouie", "odoratgout", "volonte", "intellect", "empathie", "reve", "chance", "melee", "tir", "lancer", "derobee"]; const carac_array = ["taille", "apparence", "constitution", "force", "agilite", "dexterite", "vue", "ouie", "odoratgout", "volonte", "intellect", "empathie", "reve", "chance", "melee", "tir", "lancer", "derobee"];
@ -28,42 +12,6 @@ const difficultesLibres = [0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10];
const ajustementsConditions = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, +1, +2, +3, +4, +5, +6, +7, +8, +9, +10]; const ajustementsConditions = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, +1, +2, +3, +4, +5, +6, +7, +8, +9, +10];
const ajustementsEncaissement = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, +1, +2, +3, +4, +5, +6, +7, +8, +9, +10, +11, +12, +13, +14, +15, +16, +17, +18, +19, +20, +21, +22, +23, +24, +25]; const ajustementsEncaissement = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, +1, +2, +3, +4, +5, +6, +7, +8, +9, +10, +11, +12, +13, +14, +15, +16, +17, +18, +19, +20, +21, +22, +23, +24, +25];
const tableCaracDerivee = {
// xp: coût pour passer du niveau inférieur à ce niveau
1: { xp: 3, poids: "moins de 1kg", plusdom: -5, sconst: 0.5, sust: 0.1 },
2: { xp: 3, poids: "1-5", plusdom: -4, sconst: 0.5, sust: 0.3 },
3: { xp: 4, poids: "6-10", plusdom: -3, sconst: 1, sust: 0.5, beaute: 'hideux' },
4: { xp: 4, poids: "11-20", plusdom: -3, sconst: 1, sust: 1, beaute: 'repoussant' },
5: { xp: 5, poids: "21-30", plusdom: -2, sconst: 1, sust: 1, beaute: 'franchement très laid' },
6: { xp: 5, poids: "31-40", plusdom: -1, sconst: 2, sust: 2, beaute: 'laid' },
7: { xp: 6, poids: "41-50", plusdom: -1, sconst: 2, sust: 2, beaute: 'très désavantagé' },
8: { xp: 6, poids: "51-60", plusdom: 0, sconst: 2, sust: 2, beaute: 'désavantagé' },
9: { xp: 7, poids: "61-65", plusdom: 0, sconst: 3, sust: 2, beaute: 'pas terrible' },
10: { xp: 7, poids: "66-70", plusdom: 0, sconst: 3, sust: 3, beaute: 'commun' },
11: { xp: 8, poids: "71-75", plusdom: 0, sconst: 3, sust: 3, beaute: 'pas mal' },
12: { xp: 8, poids: "76-80", plusdom: +1, sconst: 4, sust: 3, beaute: 'avantagé' },
13: { xp: 9, poids: "81-90", plusdom: +1, sconst: 4, sust: 3, beaute: 'mignon' },
14: { xp: 9, poids: "91-100", plusdom: +2, sconst: 4, sust: 4, beaute: 'beau' },
15: { xp: 10, poids: "101-110", plusdom: +2, sconst: 5, sust: 4, beaute: 'très beau' },
16: { xp: 20, poids: "111-120", plusdom: +3, sconst: 5, sust: 4, beaute: 'éblouissant' },
17: { xp: 30, poids: "121-131", plusdom: +3, sconst: 5, sust: 5 },
18: { xp: 40, poids: "131-141", plusdom: +4, sconst: 6, sust: 5 },
19: { xp: 50, poids: "141-150", plusdom: +4, sconst: 6, sust: 5 },
20: { xp: 60, poids: "151-160", plusdom: +4, sconst: 6, sust: 6 },
21: { xp: 70, poids: "161-180", plusdom: +5, sconst: 7, sust: 6 },
22: { xp: 80, poids: "181-200", plusdom: +5, sconst: 7, sust: 7 },
23: { xp: 90, poids: "201-300", plusdom: +6, sconst: 7, sust: 8 },
24: { xp: 100, poids: "301-400", plusdom: +6, sconst: 8, sust: 9 },
25: { xp: 110, poids: "401-500", plusdom: +7, sconst: 8, sust: 10 },
26: { xp: 120, poids: "501-600", plusdom: +7, sconst: 8, sust: 11 },
27: { xp: 130, poids: "601-700", plusdom: +8, sconst: 9, sust: 12 },
28: { xp: 140, poids: "701-800", plusdom: +8, sconst: 9, sust: 13 },
29: { xp: 150, poids: "801-900", plusdom: +9, sconst: 9, sust: 14 },
30: { xp: 160, poids: "901-1000", plusdom: +9, sconst: 10, sust: 15 },
31: { xp: 170, poids: "1001-1500", plusdom: +10, sconst: 10, sust: 16 },
32: { xp: 180, poids: "1501-2000", plusdom: +11, sconst: 10, sust: 17 }
}
/* -------------------------------------------- */ /* -------------------------------------------- */
function _buildAllSegmentsFatigue(max) { function _buildAllSegmentsFatigue(max) {
const cycle = [5, 2, 4, 1, 3, 0]; const cycle = [5, 2, 4, 1, 3, 0];
@ -243,10 +191,6 @@ export class RdDUtility {
return loadTemplates(templatePaths); return loadTemplates(templatePaths);
} }
/* -------------------------------------------- */
static getLimitesArchetypes() {
return duplicate(limitesArchetypes);
}
/* -------------------------------------------- */ /* -------------------------------------------- */
static checkNull(items) { static checkNull(items) {
@ -279,32 +223,40 @@ export class RdDUtility {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
static filterItemsPerTypeForSheet(data) { static filterItemsPerTypeForSheet(formData) {
data.data.materiel = this.checkNull(data.itemsByType['objet']); formData.data.materiel = this.checkNull(formData.itemsByType['objet']);
data.data.conteneurs = this.checkNull(data.itemsByType['conteneur']); formData.data.conteneurs = this.checkNull(formData.itemsByType['conteneur']);
data.data.armes = this.checkNull(data.itemsByType['arme']); formData.data.armes = this.checkNull(formData.itemsByType['arme']);
data.data.armures = this.checkNull(data.itemsByType['armure']); formData.data.armures = this.checkNull(formData.itemsByType['armure']);
data.data.livres = this.checkNull(data.itemsByType['livre']); formData.data.livres = this.checkNull(formData.itemsByType['livre']);
data.data.potions = this.checkNull(data.itemsByType['potion']); formData.data.potions = this.checkNull(formData.itemsByType['potion']);
data.data.ingredients = this.checkNull(data.itemsByType['ingredient']); formData.data.ingredients = this.checkNull(formData.itemsByType['ingredient']);
data.data.munitions = this.checkNull(data.itemsByType['munition']); formData.data.munitions = this.checkNull(formData.itemsByType['munition']);
data.data.herbes = this.checkNull(data.itemsByType['herbe']); formData.data.herbes = this.checkNull(formData.itemsByType['herbe']);
data.data.sorts = this.checkNull(data.itemsByType['sort']); formData.data.sorts = this.checkNull(formData.itemsByType['sort']);
data.data.queues = this.checkNull(data.itemsByType['queue']); formData.data.queues = this.checkNull(formData.itemsByType['queue']);
data.data.souffles = this.checkNull(data.itemsByType['souffle']); formData.data.souffles = this.checkNull(formData.itemsByType['souffle']);
data.data.ombres = this.checkNull(data.itemsByType['ombre']); formData.data.ombres = this.checkNull(formData.itemsByType['ombre']);
data.data.tetes = this.checkNull(data.itemsByType['tete']); formData.data.tetes = this.checkNull(formData.itemsByType['tete']);
data.data.taches = this.checkNull(data.itemsByType['tache']); formData.data.taches = this.checkNull(formData.itemsByType['tache']);
data.data.monnaie = this.checkNull(data.itemsByType['monnaie']); formData.data.monnaie = this.checkNull(formData.itemsByType['monnaie']);
data.data.meditations = this.checkNull(data.itemsByType['meditation']); formData.data.meditations = this.checkNull(formData.itemsByType['meditation']);
data.data.chants = this.checkNull(data.itemsByType['chant']); formData.data.chants = this.checkNull(formData.itemsByType['chant']);
data.data.danses = this.checkNull(data.itemsByType['danse']); formData.data.danses = this.checkNull(formData.itemsByType['danse']);
data.data.musiques = this.checkNull(data.itemsByType['musique']); formData.data.musiques = this.checkNull(formData.itemsByType['musique']);
data.data.oeuvres = this.checkNull(data.itemsByType['oeuvre']); formData.data.oeuvres = this.checkNull(formData.itemsByType['oeuvre']);
data.data.jeux = this.checkNull(data.itemsByType['jeu']); formData.data.jeux = this.checkNull(formData.itemsByType['jeu']);
data.data.recettescuisine = this.checkNull(data.itemsByType['recettecuisine']); formData.data.recettescuisine = this.checkNull(formData.itemsByType['recettecuisine']);
data.data.recettesAlchimiques = this.checkNull(data.itemsByType['recettealchimique']); formData.data.recettesAlchimiques = this.checkNull(formData.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); formData.data.objets = formData.data.conteneurs.concat(formData.data.materiel)
.concat(formData.data.armes)
.concat(formData.data.armures)
.concat(formData.data.munitions)
.concat(formData.data.livres)
.concat(formData.data.potions)
.concat(formData.data.herbes)
.concat(formData.data.ingredients);
formData.data.competences = (formData.itemsByType.competence??[]).concat(formData.itemsByType.competencecreature??[]);
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -403,53 +355,6 @@ export class RdDUtility {
return definitionsBlessures; return definitionsBlessures;
} }
/* -------------------------------------------- */
static getCaracNextXp(value) {
const nextValue = Number(value) + 1;
// xp est le coût pour atteindre cette valeur, on regarde donc le coût de la valeur+1
return RdDUtility.getCaracXp(nextValue);
}
static getCaracXp(targetValue) {
return tableCaracDerivee[targetValue]?.xp ?? 200;
}
/* -------------------------------------------- */
static computeCarac(data) {
data.carac.force.value = Math.min(data.carac.force.value, parseInt(data.carac.taille.value) + 4);
data.carac.derobee.value = Math.floor(parseInt(((21 - data.carac.taille.value)) + parseInt(data.carac.agilite.value)) / 2);
let bonusDomKey = Math.floor((parseInt(data.carac.force.value) + parseInt(data.carac.taille.value)) / 2);
bonusDomKey = Math.min(Math.max(bonusDomKey, 0), 32); // Clamp de securite
let tailleData = tableCaracDerivee[bonusDomKey];
data.attributs.plusdom.value = tailleData.plusdom;
data.attributs.sconst.value = RdDUtility.calculSConst(data.carac.constitution.value);
data.attributs.sust.value = tableCaracDerivee[Number(data.carac.taille.value)].sust;
data.attributs.encombrement.value = (parseInt(data.carac.force.value) + parseInt(data.carac.taille.value)) / 2;
data.carac.melee.value = Math.floor((parseInt(data.carac.force.value) + parseInt(data.carac.agilite.value)) / 2);
data.carac.tir.value = Math.floor((parseInt(data.carac.vue.value) + parseInt(data.carac.dexterite.value)) / 2);
data.carac.lancer.value = Math.floor((parseInt(data.carac.tir.value) + parseInt(data.carac.force.value)) / 2);
data.sante.vie.max = Math.ceil((parseInt(data.carac.taille.value) + parseInt(data.carac.constitution.value)) / 2);
data.sante.vie.value = Math.min(data.sante.vie.value, data.sante.vie.max)
data.sante.endurance.max = Math.max(parseInt(data.carac.taille.value) + parseInt(data.carac.constitution.value), parseInt(data.sante.vie.max) + parseInt(data.carac.volonte.value));
data.sante.endurance.value = Math.min(data.sante.endurance.value, data.sante.endurance.max);
data.sante.fatigue.max = data.sante.endurance.max * 2;
data.sante.fatigue.value = Math.min(data.sante.fatigue.value, data.sante.fatigue.max);
//Compteurs
data.reve.reve.max = data.carac.reve.value;
data.compteurs.chance.max = data.carac.chance.value;
}
static calculSConst(constitution) {
return Number(tableCaracDerivee[Number(constitution)].sconst);
}
/* -------------------------------------------- */ /* -------------------------------------------- */
static getSegmentsFatigue(maxEnd) { static getSegmentsFatigue(maxEnd) {
maxEnd = Math.max(maxEnd, 1); maxEnd = Math.max(maxEnd, 1);

View File

@ -50,14 +50,14 @@ export class ReglesOptionelles extends FormApplication {
} }
getData() { getData() {
let data = super.getData(); let formData = super.getData();
data.regles = listeReglesOptionelles.map(it => { formData.regles = listeReglesOptionelles.map(it => {
let r = duplicate(it); let r = duplicate(it);
r.id = ReglesOptionelles._getIdRegle(r.name); r.id = ReglesOptionelles._getIdRegle(r.name);
r.active = ReglesOptionelles.isUsing(r.name); r.active = ReglesOptionelles.isUsing(r.name);
return r; return r;
}) })
return data; return formData;
} }
static isUsing(name) { static isUsing(name) {

View File

@ -73,8 +73,8 @@ export const referenceAjustements = {
getValue: (rollData, actor) => actor.getSurenc() getValue: (rollData, actor) => actor.getSurenc()
}, },
moral: { moral: {
isVisible: (rollData, actor) => RdDCarac.isActionPhysique(rollData.selectedCarac), isVisible: (rollData, actor) => actor.isPersonnage() && RdDCarac.isActionPhysique(rollData.selectedCarac) && rollData.useMoral,
isUsed: (rollData, actor) => rollData.use?.appelAuMoral, isUsed: (rollData, actor) => rollData.useMoral,
getLabel: (rollData, actor) => 'Appel au moral', getLabel: (rollData, actor) => 'Appel au moral',
getValue: (rollData, actor) => 1 getValue: (rollData, actor) => 1
}, },

View File

@ -103,9 +103,9 @@ class StatusEffectsSettings extends FormApplication {
} }
getData() { getData() {
let data = super.getData(); let formData = super.getData();
data.effects = CONFIG.RDD.allEffects; formData.effects = CONFIG.RDD.allEffects;
return data; return formData;
} }
activateListeners(html) { activateListeners(html) {

View File

@ -5,5 +5,5 @@
{"_id":"RFOYL8HBUxd32DXS","name":"Galère","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"vehicule","data":{"categorie":"Bateau","resistance":36,"structure":14,"vitesse":"2/2/1","bonus":"(12)/+12/+16","manoeuvrabilite":"0/-4/-6","equipage":10,"capacite_encombrement":300,"description":"Description ...","notesmj":"Notes du MJ"},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/galere.webp","token":{"flags":{},"name":"Galère","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/galere_token.webp","tint":"","width":14,"height":14,"scale":1,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"RFOYL8HBUxd32DXS","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]} {"_id":"RFOYL8HBUxd32DXS","name":"Galère","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"vehicule","data":{"categorie":"Bateau","resistance":36,"structure":14,"vitesse":"2/2/1","bonus":"(12)/+12/+16","manoeuvrabilite":"0/-4/-6","equipage":10,"capacite_encombrement":300,"description":"Description ...","notesmj":"Notes du MJ"},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/galere.webp","token":{"flags":{},"name":"Galère","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/galere_token.webp","tint":"","width":14,"height":14,"scale":1,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"RFOYL8HBUxd32DXS","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]}
{"_id":"TDpSn7GawJ1LCHp7","name":"Charette","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"vehicule","data":{"categorie":"Chariot","resistance":16,"structure":8,"vitesse":"","bonus":"","manoeuvrabilite":"","equipage":1,"capacite_encombrement":100,"description":"Description ...","notesmj":"Notes du MJ"},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/charette.webp","token":{"flags":{},"name":"Charette","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/charette_token.webp","tint":"","width":3,"height":3,"scale":1.1,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"TDpSn7GawJ1LCHp7","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]} {"_id":"TDpSn7GawJ1LCHp7","name":"Charette","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"vehicule","data":{"categorie":"Chariot","resistance":16,"structure":8,"vitesse":"","bonus":"","manoeuvrabilite":"","equipage":1,"capacite_encombrement":100,"description":"Description ...","notesmj":"Notes du MJ"},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/charette.webp","token":{"flags":{},"name":"Charette","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/charette_token.webp","tint":"","width":3,"height":3,"scale":1.1,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"TDpSn7GawJ1LCHp7","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]}
{"_id":"ZiyRDzz3gGzlpLIc","name":"Barque","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"vehicule","data":{"categorie":"Barque","resistance":20,"structure":10,"vitesse":"3/2/1","bonus":"(4)/+4/+6","manoeuvrabilite":"0/0/-4","equipage":4,"capacite_encombrement":100,"description":"Description ...","notesmj":"Notes du MJ"},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/barque.webp","token":{"flags":{},"name":"Barque","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/barque_token.webp","tint":"","width":6,"height":6,"scale":1,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"ZiyRDzz3gGzlpLIc","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]} {"_id":"ZiyRDzz3gGzlpLIc","name":"Barque","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"vehicule","data":{"categorie":"Barque","resistance":20,"structure":10,"vitesse":"3/2/1","bonus":"(4)/+4/+6","manoeuvrabilite":"0/0/-4","equipage":4,"capacite_encombrement":100,"description":"Description ...","notesmj":"Notes du MJ"},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/barque.webp","token":{"flags":{},"name":"Barque","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/barque_token.webp","tint":"","width":6,"height":6,"scale":1,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"ZiyRDzz3gGzlpLIc","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]}
{"_id":"gM77co80kmpVsYg6","name":"Posé par terre","permission":{"default":0,"Q2G6GTdrotKzYGUC":3},"type":"vehicule","data":{"categorie":"Autre","resistance":0,"structure":0,"vitesse":"","bonus":"","manoeuvrabilite":"","equipage":0,"capacite_encombrement":100,"description":"<p>D&eacute;poser ici les objets que vous voulez &eacute;changer avec d'autres joueurs</p>","notesmj":""},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/templates/icone_parchement_vierge.png","token":{"flags":{},"name":"Posé par terre","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/templates/icone_parchement_vierge.png","tint":"","width":1,"height":1,"scale":1,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"gM77co80kmpVsYg6","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]} {"_id":"gM77co80kmpVsYg6","name":"Posé par terre","permission":{"default":0,"Q2G6GTdrotKzYGUC":3},"type":"vehicule","data":{"categorie":"Autre","resistance":0,"structure":0,"vitesse":"","bonus":"","manoeuvrabilite":"","equipage":0,"capacite_encombrement":100,"description":"<p>D&eacute;poser ici les objets que vous voulez &eacute;changer avec d'autres joueurs</p>","notesmj":""},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/templates/icone_parchement_vierge.png","token":{"flags":{},"name":"Posé par terre","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/templates/icone_parchement_vierge.png","tint":"","width":1,"height":1,"scale":1,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"gM77co80kmpVsYg6","actorLink":true,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]}
{"_id":"idyDmDWYpQ4Eppen","name":"Chariot","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"vehicule","data":{"categorie":"Chariot","resistance":20,"structure":10,"vitesse":"","bonus":"","manoeuvrabilite":"","equipage":1,"capacite_encombrement":150,"description":"Description ...","notesmj":"Notes du MJ"},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/chariot.webp","token":{"flags":{},"name":"Chariot","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/chariot_token.webp","tint":"","width":4,"height":4,"scale":1.4,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"idyDmDWYpQ4Eppen","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]} {"_id":"idyDmDWYpQ4Eppen","name":"Chariot","permission":{"default":0,"rYShh2P1DNavdoBD":3},"type":"vehicule","data":{"categorie":"Chariot","resistance":20,"structure":10,"vitesse":"","bonus":"","manoeuvrabilite":"","equipage":1,"capacite_encombrement":150,"description":"Description ...","notesmj":"Notes du MJ"},"sort":100001,"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/chariot.webp","token":{"flags":{},"name":"Chariot","displayName":0,"img":"systems/foundryvtt-reve-de-dragon/icons/vehicules/chariot_token.webp","tint":"","width":4,"height":4,"scale":1.4,"mirrorX":false,"mirrorY":false,"lockRotation":false,"rotation":0,"vision":false,"dimSight":0,"brightSight":0,"dimLight":0,"brightLight":0,"sightAngle":360,"lightAngle":360,"lightColor":"","lightAlpha":1,"lightAnimation":{"type":"","speed":5,"intensity":5},"actorId":"idyDmDWYpQ4Eppen","actorLink":false,"disposition":0,"displayBars":0,"bar1":{"attribute":""},"bar2":{"attribute":""},"randomImg":false},"items":[],"effects":[]}

View File

@ -246,6 +246,12 @@ table {border: 1px solid #7a7971;}
height: 8%; height: 8%;
max-height: 48px; max-height: 48px;
border-width: 0; border-width: 0;
border: 1px solid rgba(0, 0, 0, 0);
}
.button-img:hover {
color: rgba(255, 255, 128, 0.7);
border: 1px solid rgba(255, 128, 0, 0.8);
cursor: pointer;
} }
.button-effect-img { .button-effect-img {
@ -819,7 +825,7 @@ ul, li {
display: none !important; display: none !important;
} }
.iconeSmile { .imgAppelAuMoral {
height: 20px; height: 20px;
width: 20px; width: 20px;
border:none; border:none;

View File

@ -15,17 +15,17 @@
</div> </div>
<div class="flexrow"> <div class="flexrow">
<div class="flexrow"> <div class="flexrow">
<span>{{data.blessures.resume}}</span> <span>{{calc.resumeBlessures}}</span>
</div> </div>
<div class="flexrow"> <div class="flexrow">
{{#if data.surprise}}{{data.surprise}}! {{/if}} {{#if calc.surprise}}{{calc.surprise}}! {{/if}}
{{#if actor.effects}} {{#if actor.effects}}
{{#each actor.effects as |effect key|}} {{#each actor.effects as |effect key|}}
<span id="effect-{{effect.flags.core.status.statusId}} "> <span id="effect-{{effect.flags.core.status.statusId}} ">
<img class="button-effect-img" src="{{effect.icon}}" alt="{{effect.label}}" width="24" height="24" /> <img class="button-effect-img" src="{{effect.icon}}" alt="{{effect.label}}" width="24" height="24" />
</span> </span>
{{/each}} {{/each}}
{{#if data.isGM}} {{#if options.isGM}}
<span id="enlever-tous-effets"><a>(enlever tout)</a></span> <span id="enlever-tous-effets"><a>(enlever tout)</a></span>
{{/if}} {{/if}}
{{else}} {{else}}
@ -199,9 +199,9 @@
{{!-- Equipment Tab --}} {{!-- Equipment Tab --}}
<div class="tab items" data-group="primary" data-tab="items"> <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=2}} / {{data.attributs.encombrement.value}} <b>{{calc.surEncombrementMessage}}</b></span> -
<span class="item-name"><a id="creer-un-objet">Créer un objet</a></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> <span class="item-name"> - <a id="nettoyer-conteneurs">Vider tout les conteneurs</a></span>
{{/if}} {{/if}}
<ul class="item-list alterne-list"> <ul class="item-list alterne-list">

View File

@ -75,14 +75,11 @@
<li class="item flexrow list-item" data-item-id="{{comp._id}}"> <li class="item flexrow list-item" data-item-id="{{comp._id}}">
<img class="sheet-competence-img" src="{{comp.img}}" /> <img class="sheet-competence-img" src="{{comp.img}}" />
<span class="competence-label"><a>{{comp.name}}</a></span> <span class="competence-label"><a>{{comp.name}}</a></span>
<input class="competence-value creature-carac" type="text" <input class="competence-value creature-carac" type="text" compname="{{comp.name}}"
name="data.competencecreature[{{key}}].data.carac_value" compname="{{comp.name}}"
value="{{comp.data.carac_value}}" data-dtype="number" /> value="{{comp.data.carac_value}}" data-dtype="number" />
<input class="competence-value creature-niveau" type="text" <input class="competence-value creature-niveau" type="text" compname="{{comp.name}}"
compname="{{comp.name}}"
value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" /> value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" />
<input class="competence-value creature-dommages" type="text" <input class="competence-value creature-dommages" type="text" compname="{{comp.name}}"
name="data.competencecreature[{{key}}].data.dommages" compname="{{comp.name}}"
value="{{numberFormat comp.data.dommages decimals=0 sign=true}}" data-dtype="number" /> value="{{numberFormat comp.data.dommages decimals=0 sign=true}}" data-dtype="number" />
<div class="item-controls"> <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-edit" title="Edit Item"><i class="fas fa-edit"></i></a>

View File

@ -1,230 +0,0 @@
<form class="{{cssClass}}" autocomplete="off">
{{!-- Sheet Header --}}
<header class="sheet-header">
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{actor.name}}" />
<div class="header-fields">
<div class="flexrow">
<h1 class="charname"><input name="name" type="text" value="{{actor.name}}" placeholder="Name" /></h1>
</div>
<div class="flexrow flex-group-center flex-actions-bar">
<div>
<span id="encaisser-direct"><a title="Encaisser des dommages"><img class="button-img" src="icons/svg/bones.svg" alt="Encaisser des dommages"/></a></span>
<span class="gm-only remise-a-neuf"><a title="Remise à neuf"><img class="button-img" src="icons/svg/regen.svg" alt="Remise à neuf"/></a></span>
</div>
</div>
<div class="flexrow">
<div class="flexrow">
<span>{{data.blessures.resume}}</span>
</div>
</div>
</div>
</header>
{{!-- Sheet Tab Navigation --}}
<nav class="sheet-tabs tabs" data-group="primary">
<a class="item" data-tab="carac">Caractéristiques</a>
<a class="item" data-tab="competences">Compétences</a>
<a class="item" data-tab="blessures">Blessures</a>
<a class="item" data-tab="items">Équipement</a>
<a class="item" data-tab="description">Description</a>
</nav>
{{!-- Sheet Body --}}
<section class="sheet-body">
{{!-- Carac Tab --}}
<div class="tab items" data-group="primary" data-tab="carac">
<div class="grid grid-2col">
<div class="flex-group-left flexcol">
<ol class="carac-list alterne-list">
{{#each data.carac as |carac key|}}
<li class="competence flexrow list-item" data-attribute="{{key}}">
{{#if carac.isTaille}}
<span class="carac-label flexrow" name="data.carac.{{key}}.label">{{carac.label}}</span>
{{else}}
<span class="carac-label flexrow" name="data.carac.{{key}}.label"><a
name={{key}}>{{carac.label}}</a></span>
{{/if}}
<input class="competence-value flexrow" type="text" name="data.carac.{{key}}.value"
value="{{carac.value}}" data-dtype="{{carac.type}}" />
</li>
{{/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>
</li>
</ol>
</div>
<div class="flex-group-left flexcol">
<ol class="carac-list alterne-list">
{{#each data.attributs as |attr key|}}
<li class="competence flexrow list-item" data-attribute="{{key}}">
<span class="carac-label flexrow" name="data.attributs.{{key}}.label">{{attr.label}} : </span>
<span><input class="attribut-value flexrow" type="text" name="data.attributs.{{key}}.value"
value="{{attr.value}}" data-dtype="{{attr.type}}" /></span>
</li>
{{/each}}
<li class="competence flexrow list-item" data-attribute="vie">
<span class="competence-label flexrow" name="data.sante.vie.label">Vie : </span>
<span><input class="sante-value flexrow" type="text" name="data.sante.vie.value"
value="{{data.sante.vie.value}}" data-dtype="Number" /></span><span>/ </span>
<span><input class="sante-value flexrow" type="text" name="data.sante.vie.max"
value="{{data.sante.vie.max}}" data-dtype="Number" /></span>
</li>
<li class="competence flexrow list-item" data-attribute="endurance">
<span class="competence-label flexrow" name="data.sante.endurance.label">Endurance : </span>
<span><input class="sante-value flexrow" type="text" name="data.sante.endurance.value"
value="{{data.sante.endurance.value}}" data-dtype="Number" /></span><span>/ </span>
<span><input class="sante-value flexrow" type="text" name="data.sante.endurance.max"
value="{{data.sante.endurance.max}}" data-dtype="Number" /></span>
</li>
<li class="competence flexrow list-item" data-attribute="sonne">
<span class="competence-label flexrow" name="data.sante.sonne.label">Sonné : </span>
<input class="resource-content" type="checkbox" name="data.sante.sonne.value"
value="{{data.sante.sonne.value}}" {{#if data.sante.sonne.value}}checked{{/if}} />
<img class="button-effect-img" {{#if data.sante.sonne.value}}style="opacity: 1;"{{else}}style="opacity: 0;"{{/if}} src="icons/svg/stoned.svg" height="16" width="16"/>
</li>
<li class="competence flexrow list-item" data-attribute="etat">
<span class="competence-label flexrow" name="data.compteurs.etat.label">Etat Général : </span>
<span>{{data.compteurs.etat.value}}</span>
</li>
</ol>
</div>
</div>
</div>
{{!-- Compétences Tab --}}
<div class="tab competences" data-group="primary" data-tab="competences">
<div class="flexcol">
<div class="flex-group-left flexcol competence-column">
<ol class="item-list alterne-list">
{{#each data.competencecreature as |comp key|}}
<li class="item flexrow list-item" data-item-id="{{comp._id}}">
<img class="sheet-competence-img" src="{{comp.img}}" />
<span class="competence-label"><a>{{comp.name}}</a></span>
<input class="competence-value creature-carac" type="text"
name="data.competencecreature[{{key}}].data.carac_value" compname="{{comp.name}}"
value="{{comp.data.carac_value}}" data-dtype="number" />
<input class="competence-value creature-niveau" type="text"
compname="{{comp.name}}"
value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" />
<input class="competence-value creature-dommages" type="text"
name="data.competencecreature[{{key}}].data.dommages" compname="{{comp.name}}"
value="{{numberFormat comp.data.dommages decimals=0 sign=true}}" data-dtype="number" />
<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>
</li>
{{/each}}
</ol>
</div>
</div>
</div>
{{!-- blessures Tab --}}
<div class="tab blessures" data-group="primary" data-tab="blessures" style="height:200px">
<span class="blessures-title">Blessures Légeres :</span>
<div class="blessure-data">
{{#each data.blessures.legeres.liste as |bless key|}}
<li class="item flexrow blessure-data" data-blessure-type="legere" data-attribute={{key}}
data-blessure-index="{{key}}">
<a class="item-control blessure-control" title="Blessure Légère"
data-blessure-active="{{bless.active}}">{{#if bless.active}}<i class="fas fa-circle"></i>{{else}}<i
class="fas fa-genderless"></i>{{/if}}</a>
Premiers soins <input class="blessures-soins" type="text" name='premiers_soins' data-dtype="number"
value="{{this.premiers_soins}}" /> -
Soins complets <input class="blessures-soins" type="text" name='soins_complets' data-dtype="number"
value="{{this.soins_complets}}" /> -
Jours <input class="blessures-soins" type="text" name='jours' data-dtype="number" value="{{this.jours}}" />
-
Loc. <input class="blessures-soins" type="text" name='localisation' data-dtype="String"
value="{{this.loc}}" />
</li>
{{/each}}
</div>
<span class="blessures-title">Blessures Graves :</span>
<div>
{{#each data.blessures.graves.liste as |bless key|}}
<li class="item flexrow" data-blessure-type="grave" data-attribute={{key}} data-blessure-index="{{key}}">
<a class="item-control blessure-control" title="Blessure Grave"
data-blessure-active="{{bless.active}}">{{#if bless.active}}<i class="fas fa-circle"></i>{{else}}<i
class="fas fa-genderless"></i>{{/if}}</a>
Premiers soins <input class="blessures-soins" type="text" name="premiers_soins" data-dtype="number"
value="{{bless.premiers_soins}}" /> -
Soins complets <input class="blessures-soins" type="text" name="soins_complets" data-dtype="number"
value="{{bless.soins_complets}}" /> -
Jours <input class="blessures-soins" type="text" name="jours" data-dtype="number" value="{{bless.jours}}" />
-
Loc. <input class="blessures-soins" type="text" name="localisation" data-dtype="String"
value="{{bless.loc}}" />
</li>
{{/each}}
</div>
<span class="blessures-title">Blessure Critique :</span>
<div>
{{#each data.blessures.critiques.liste as |bless key|}}
<li class="item flexrow" data-blessure-type="critique" data-attribute={{key}} data-blessure-index="{{key}}">
<a class="item-control blessure-control" title="Blessure Critique"
data-blessure-active="{{bless.active}}">{{#if bless.active}}<i class="fas fa-circle"></i>{{else}}<i
class="fas fa-genderless"></i>{{/if}}</a>
Premiers soins <input class="blessures-soins" type="text" name="premiers_soins" data-dtype="number"
value="{{bless.premiers_soins}}" /> -
Soins complets <input class="blessures-soins" type="text" name="soins_complets" data-dtype="number"
value="{{bless.soins_complets}}" /> -
Jours <input class="blessures-soins" type="text" name="jours" data-dtype="number" value="{{bless.jours}}" />
-
Loc. <input class="blessures-soins" type="text" name="localisation" data-dtype="String"
value="{{bless.loc}}" />
</li>
</li>
{{/each}}
</div>
</div>
{{!-- 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>
<ol class="item-list alterne-list">
<li class="competence-header flexrow">
<span class="competence-title competence-label">Nom</span>
<span class="competence-title competence-label">Q.</span>
<span class="competence-title competence-value">Enc.</span>
<span class="competence-title competence-value">Equiper</span>
<span class="competence-title competence-value">Editer/Suppr.</span>
</li>
{{#each data.objets as |item id|}}
{{#unless item.estContenu}}
{{#if (ne item.type 'conteneur')}}
<li class="item flexrow list-item" data-item-id="{{item._id}}">
<img class="sheet-competence-img" src="{{item.img}}" title="{{item.name}}"/>
<span class="item-name">{{item.name}}</span>
<span class="item-quantite">{{item.data.quantite}}</span>
<span class="item-quantite">{{numberFormat item.data.encTotal decimals=2}}</span>
<div class="item-controls">
<a class="item-control item-equip" title="Equiper">{{#if item.data.equipe}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-edit" title="Editer"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/if}}
{{/unless}}
{{/each}}
{{#each data.conteneurs as |conteneur id|}}
{{buildConteneur this}}
{{/each}}
</div>
{{!-- Biography Tab --}}
<div class="tab description" data-group="primary" data-tab="description">
<div class="form-group editor">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div>
{{>"systems/foundryvtt-reve-de-dragon/templates/editor-notes-mj.html"}}
</div>
</div>
</section>
</form>

View File

@ -0,0 +1,31 @@
{{#if visible}}
{{#if data.isLevelUp}}
<li class="item flexrow xp-level-up" data-item-id="{{_id}}">
{{else}}
<li class="item flexrow list-item" data-item-id="{{_id}}">
{{/if}}
<img class="sheet-competence-img" src="{{img}}" />
{{#if data.isLevelUp}}
<span class="competence-label tooltip tooltip-nobottom">
<span class="tooltiptext ttt-xp">
Vous pouvez dépenser {{data.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{name}}
</span>
<a name={{key}}>{{name}}</a></span>
{{else}}
<span class="competence-label"><a>{{name}}</a></span>
{{/if}}
<input class="competence-value" type="text" compname="{{name}}" value="{{numberFormat data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}} />
<input class="competence-xp" type="text" compname="{{name}}" value="{{numberFormat data.xp decimals=0 sign=false}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}} />
{{#if (eq data.categorie 'draconic')}}
<input class="competence-xp-sort" type="text" compname="{{name}}" value="{{numberFormat data.xp_sort decimals=0 sign=false}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
{{/if}}
<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 @root.options.montrerArchetype}}
<input class="competence-archetype" type="text" compname="{{name}}"
value="{{numberFormat data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}} />
{{/if}}
</li>
{{/if}}

View File

@ -1,4 +1,3 @@
{{log "handlebar actor-sheet" this}}
<form class="{{cssClass}}" autocomplete="off"> <form class="{{cssClass}}" autocomplete="off">
{{!-- Sheet Header --}} {{!-- Sheet Header --}}
@ -30,7 +29,7 @@
</li> </li>
<li> <li>
<label class="ctn-fatigue tooltip"> <label class="ctn-fatigue tooltip">
<span class="tooltiptext ttt-fatigue">{{{data.fatigue.html}}}</span> <span class="tooltiptext ttt-fatigue">{{{calc.fatigue.html}}}</span>
Fatigue Fatigue
<a id="fatigue-moins">-</a> <a id="fatigue-moins">-</a>
<input class="resource-content" id="fatigue-value" type="text" name="data.sante.fatigue.value" value="{{data.sante.fatigue.value}}" data-dtype="Number" /> <input class="resource-content" id="fatigue-value" type="text" name="data.sante.fatigue.value" value="{{data.sante.fatigue.value}}" data-dtype="Number" />
@ -65,24 +64,24 @@
<span id="visu-tmr"><a title="Regarder les Terres M&eacute;dianes"><img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-view.svg" alt="Regarder les Terres M&eacute;dianes"/></a></span> <span id="visu-tmr"><a title="Regarder les Terres M&eacute;dianes"><img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-view.svg" alt="Regarder les Terres M&eacute;dianes"/></a></span>
</div> </div>
<div class="flexrow"> <div class="flexrow">
<span class="tooltip">Malus de fatigue : {{data.fatigue.malus}} <span class="tooltip">Malus de fatigue : {{calc.fatigue.malus}}
<span class="tooltiptext ttt-fatigue">{{{data.fatigue.html}}}</span> <span class="tooltiptext ttt-fatigue">{{{calc.fatigue.html}}}</span>
</span> </span>
<span>{{data.blessures.resume}}</span> <span>{{calc.resumeBlessures}}</span>
</div> </div>
<div class="flexrow"> <div class="flexrow">
<span>{{data.compteurs.etat.label}}: {{data.compteurs.etat.value}}</span> <span>{{data.compteurs.etat.label}}: {{data.compteurs.etat.value}}</span>
<span>{{data.compteurs.surenc.label}}: {{data.compteurs.surenc.value}}</span> <span>{{data.compteurs.surenc.label}}: {{data.compteurs.surenc.value}}</span>
</div> </div>
<div> <div>
{{#if data.surprise}}{{data.surprise}}! {{/if}} {{#if calc.surprise}}{{calc.surprise}}! {{/if}}
{{#if actor.effects}} {{#if actor.effects}}
{{#each actor.effects as |effect key|}} {{#each actor.effects as |effect key|}}
<span id="effect-{{effect.flags.core.status.statusId}} "> <span id="effect-{{effect.flags.core.status.statusId}} ">
<img class="button-effect-img" src="{{effect.icon}}" alt="{{effect.label}}" width="24" height="24" /> <img class="button-effect-img" src="{{effect.icon}}" alt="{{effect.label}}" width="24" height="24" />
</span> </span>
{{/each}} {{/each}}
{{#if data.isGM}} {{#if options.isGM}}
<span id="enlever-tous-effets"><a>(enlever tout)</a></span> <span id="enlever-tous-effets"><a>(enlever tout)</a></span>
{{/if}} {{/if}}
{{else}} {{else}}
@ -113,8 +112,8 @@
<div class="grid grid-2col"> <div class="grid grid-2col">
<div class="flex-group-left flexcol"> <div class="flex-group-left flexcol">
<span><a class="lock-unlock-sheet"><img class="small-button-container" <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" src="systems/foundryvtt-reve-de-dragon/icons/{{#if options.editCaracComp}}unlocked.svg{{else}}locked.svg{{/if}}" alt="blocker/débloquer"
>{{#if data.editCaracComp}}Verrouiller{{else}}Déverrouiller{{/if}}</a></span> >{{#if options.editCaracComp}}Verrouiller{{else}}Déverrouiller{{/if}}</a></span>
<ul class="carac-list alterne-list"> <ul class="carac-list alterne-list">
{{#each data.carac as |carac key|}} {{#each data.carac as |carac key|}}
{{#if carac.isLevelUp}} {{#if carac.isLevelUp}}
@ -124,7 +123,7 @@
{{/if}} {{/if}}
{{#if carac.isTaille}} {{#if carac.isTaille}}
<span class="carac-label flexrow" name="data.carac.{{key}}.label">{{carac.label}}</span> <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"/> <label class="carac-xp flexrow"/>
{{else}} {{else}}
{{#if carac.derivee}} {{#if carac.derivee}}
@ -141,15 +140,15 @@
{{else}} {{else}}
<span class="carac-label flexrow tooltip tooltip-nobottom" name="data.carac.{{key}}.label"><a name={{key}}>{{carac.label}}</a></span> <span class="carac-label flexrow tooltip tooltip-nobottom" name="data.carac.{{key}}.label"><a name={{key}}>{{carac.label}}</a></span>
{{/if}} {{/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-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.data.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}}
{{/if}} {{/if}}
</li> </li>
{{/each}} {{/each}}
<li class="competence flexrow"> <li class="competence flexrow">
<span class="carac-label flexrow" name="carac-total">Total Caractéristiques </span> <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> </li>
</ul> </ul>
</div> </div>
@ -157,7 +156,7 @@
<ul class="carac-list"> <ul class="carac-list">
<li class="competence flexrow list-item"> <li class="competence flexrow list-item">
<span class="competence-label flexrow" name="beaute">Beauté : <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}}/> <input class="description-value" type="text" name="data.beaute" value="{{data.beaute}}" data-dtype="String" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
</span> </span>
</li> </li>
{{#each data.attributs as |attr key|}} {{#each data.attributs as |attr key|}}
@ -198,9 +197,9 @@
{{else if (eq compteur.label 'Ethylisme')}} {{else if (eq compteur.label 'Ethylisme')}}
<a class="item-control ethylisme-test" id="ethylisme-test" title="Jet d'Ethylisme">Jet d'Ethylisme</a> <a class="item-control ethylisme-test" id="ethylisme-test" title="Jet d'Ethylisme">Jet d'Ethylisme</a>
{{else if (eq compteur.label 'Moral')}} {{else if (eq compteur.label 'Moral')}}
<a id="moral-malheureux" title="Jet de moral situation malheureuse"><img class="small-button-container" src="systems/foundryvtt-reve-de-dragon/icons/moral-malheureux.svg" alt="Jet de moral situation malheureuse"/></a> <a class="moral-malheureux" title="Jet de moral situation malheureuse"><img class="small-button-container" src="systems/foundryvtt-reve-de-dragon/icons/moral-malheureux.svg" alt="Jet de moral situation malheureuse"/></a>
<a id="moral-neutre" title="Jet de moral situation neutre"><img class="small-button-container" src="systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg" alt="Jet de moral situation neutre"/></a> <a class="moral-neutre" title="Jet de moral situation neutre"><img class="small-button-container" src="systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg" alt="Jet de moral situation neutre"/></a>
<a id="moral-heureux" title="Jet de moral situation heureuse"><img class="small-button-container" src="systems/foundryvtt-reve-de-dragon/icons/moral-heureux.svg" alt="Jet de moral situation heureuse"/></a> <a class="moral-heureux" title="Jet de moral situation heureuse"><img class="small-button-container" src="systems/foundryvtt-reve-de-dragon/icons/moral-heureux.svg" alt="Jet de moral situation heureuse"/></a>
{{else}} {{else}}
<label></label> <label></label>
{{/if}} {{/if}}
@ -218,49 +217,25 @@
<div class="tab competences" data-group="primary" data-tab="competences"> <div class="tab competences" data-group="primary" data-tab="competences">
<div class="flexrow"> <div class="flexrow">
<span><a class="lock-unlock-sheet"><img class="small-button-container" <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" src="systems/foundryvtt-reve-de-dragon/icons/{{#if options.editCaracComp}}unlocked.svg{{else}}locked.svg{{/if}}" alt="blocker/débloquer"
>{{#if data.editCaracComp}}Verrouiller{{else}}Déverrouiller{{/if}}</a></span> >{{#if options.editCaracComp}}Verrouiller{{else}}Déverrouiller{{/if}}</a></span>
<span><a id="show-hide-competences"><img class="small-button-container" <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" src="systems/foundryvtt-reve-de-dragon/icons/{{#if options.showCompNiveauBase}}no-filter.svg{{else}}filter.svg{{/if}}" alt="filter/montrer tout"
>{{#if data.showCompNiveauBase}}Montrer tout{{else}}Filtrer{{/if}}</a></span> >{{#if options.showCompNiveauBase}}Montrer tout{{else}}Filtrer{{/if}}</a></span>
<span><a id="show-hide-archetype"><img class="small-button-container" <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" src="systems/foundryvtt-reve-de-dragon/icons/{{#if options.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> >{{#if options.montrerArchetype}}Masquer l'archétype{{else}}Voir l'archétype{{/if}}</a></span>
</div> </div>
<div class="grid grid-2col"> <div class="grid grid-2col">
<div class="flex-group-left flexcol competence-column"> <div class="flex-group-left flexcol competence-column">
<header class="competence-header flexrow"> <header class="competence-header flexrow">
<span class="competence-title">Compétences de base</span> <span class="competence-title">Compétences générales</span>
</header> </header>
<ul class="item-list alterne-list"> <ul class="item-list alterne-list">
{{#each data.competenceByCategory.generale as |comp key|}} {{#each data.competenceByCategory.generale as |comp key|}}
{{#if data.showCompetence}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}}
{{#if comp.data.isLevelUp}}
<li class="item flexrow xp-level-up" data-item-id="{{comp._id}}">
{{else}}
<li class="item flexrow list-item" data-item-id="{{comp._id}}">
{{/if}}
<img class="sheet-competence-img" src="{{comp.img}}"/>
{{#if comp.data.isLevelUp}}
<span class="competence-label tooltip tooltip-nobottom">
<span class="tooltiptext ttt-xp">
Vous pouvez dépenser {{comp.data.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{comp.name}}
</span>
<a name={{key}}>{{comp.name}}</a></span>
{{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}}/>
<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}}
</li>
{{/if}}
{{/each}} {{/each}}
</ul> </ul>
@ -269,67 +244,16 @@
</header> </header>
<ul class="item-list alterne-list"> <ul class="item-list alterne-list">
{{#each data.competenceByCategory.particuliere as |comp key|}} {{#each data.competenceByCategory.particuliere as |comp key|}}
{{#if data.showCompetence}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}}
{{#if comp.data.isLevelUp}}
<li class="item flexrow xp-level-up" data-item-id="{{comp._id}}">
{{else}}
<li class="item flexrow list-item" data-item-id="{{comp._id}}">
{{/if}}
<img class="sheet-competence-img" src="{{comp.img}}"/>
{{#if comp.data.isLevelUp}}
<span class="competence-label tooltip tooltip-nobottom">
<span class="tooltiptext ttt-xp">
Vous pouvez dépenser {{comp.data.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{comp.name}}
</span>
<a name={{key}}>{{comp.name}}</a></span>
{{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}}/>
<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}}
</li>
{{/if}}
{{/each}} {{/each}}
</ul> </ul>
<header class="competence-header flexrow"> <header class="competence-header flexrow">
<span class="competence-title">Compétences Spécialisées</span> <span class="competence-title">Compétences Spécialisées</span>
</header> </header>
<ul class="item-list alterne-list"> <ul class="item-list alterne-list">
{{#each data.competenceByCategory.specialisee as |comp key|}} {{#each data.competenceByCategory.specialisee as |comp key|}}
{{#if data.showCompetence}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}}
{{#if comp.data.isLevelUp}}
<li class="item flexrow xp-level-up" data-item-id="{{comp._id}}">
{{else}}
<li class="item flexrow list-item" data-item-id="{{comp._id}}">
{{/if}}
<img class="sheet-competence-img" src="{{comp.img}}"/>
{{#if comp.data.isLevelUp}}
<span class="competence-label tooltip tooltip-nobottom">
<span class="tooltiptext ttt-xp">
Vous pouvez dépenser {{comp.data.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{comp.name}}
</span>
<a name={{key}}>{{comp.name}}</a></span>
{{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}}/>
<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}}
</li>
{{/if}}
{{/each}} {{/each}}
</ul> </ul>
</div> </div>
@ -340,33 +264,7 @@
</header> </header>
<ul class="item-list alterne-list"> <ul class="item-list alterne-list">
{{#each data.competenceByCategory.melee as |comp key|}} {{#each data.competenceByCategory.melee as |comp key|}}
{{#if data.showCompetence}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}}
{{#if comp.data.isLevelUp}}
<li class="item flexrow xp-level-up" data-item-id="{{comp._id}}">
{{else}}
<li class="item flexrow list-item" data-item-id="{{comp._id}}">
{{/if}}
<img class="sheet-competence-img" src="{{comp.img}}"/>
{{#if comp.data.isLevelUp}}
<span class="competence-label tooltip tooltip-nobottom">
<span class="tooltiptext ttt-xp">
Vous pouvez dépenser {{comp.data.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{comp.name}}
</span>
<a name={{key}}>{{comp.name}}</a></span>
{{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}}/>
<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}}
</li>
{{/if}}
{{/each}} {{/each}}
</ul> </ul>
@ -375,33 +273,7 @@
</header> </header>
<ul class="item-list alterne-list"> <ul class="item-list alterne-list">
{{#each data.competenceByCategory.tir as |comp key|}} {{#each data.competenceByCategory.tir as |comp key|}}
{{#if data.showCompetence}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}}
{{#if comp.data.isLevelUp}}
<li class="item flexrow xp-level-up" data-item-id="{{comp._id}}">
{{else}}
<li class="item flexrow list-item" data-item-id="{{comp._id}}">
{{/if}}
<img class="sheet-competence-img" src="{{comp.img}}"/>
{{#if comp.data.isLevelUp}}
<span class="competence-label tooltip tooltip-nobottom">
<span class="tooltiptext ttt-xp">
Vous pouvez dépenser {{comp.data.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{comp.name}}
</span>
<a name={{key}}>{{comp.name}}</a></span>
{{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}}/>
<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}}
</li>
{{/if}}
{{/each}} {{/each}}
</ul> </ul>
@ -410,33 +282,7 @@
</header> </header>
<ul class="item-list alterne-list"> <ul class="item-list alterne-list">
{{#each data.competenceByCategory.lancer as |comp key|}} {{#each data.competenceByCategory.lancer as |comp key|}}
{{#if data.showCompetence}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}}
{{#if comp.data.isLevelUp}}
<li class="item flexrow xp-level-up" data-item-id="{{comp._id}}">
{{else}}
<li class="item flexrow list-item" data-item-id="{{comp._id}}">
{{/if}}
<img class="sheet-competence-img" src="{{comp.img}}"/>
{{#if comp.data.isLevelUp}}
<span class="competence-label tooltip tooltip-nobottom">
<span class="tooltiptext ttt-xp">
Vous pouvez dépenser {{comp.data.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{comp.name}}
</span>
<a name={{key}}>{{comp.name}}</a></span>
{{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}}/>
<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}}
</li>
{{/if}}
{{/each}} {{/each}}
</ul> </ul>
@ -445,33 +291,7 @@
</header> </header>
<ul class="item-list alterne-list"> <ul class="item-list alterne-list">
{{#each data.competenceByCategory.connaissance as |comp key|}} {{#each data.competenceByCategory.connaissance as |comp key|}}
{{#if data.showCompetence}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}}
{{#if comp.data.isLevelUp}}
<li class="item flexrow xp-level-up" data-item-id="{{comp._id}}">
{{else}}
<li class="item flexrow list-item" data-item-id="{{comp._id}}">
{{/if}}
<img class="sheet-competence-img" src="{{comp.img}}"/>
{{#if comp.data.isLevelUp}}
<span class="competence-label tooltip tooltip-nobottom">
<span class="tooltiptext ttt-xp">
Vous pouvez dépenser {{comp.data.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{comp.name}}
</span>
<a name={{key}}>{{comp.name}}</a></span>
{{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}}/>
<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}}
</li>
{{/if}}
{{/each}} {{/each}}
</ul> </ul>
@ -480,44 +300,17 @@
</header> </header>
<ul class="item-list alterne-list"> <ul class="item-list alterne-list">
{{#each data.competenceByCategory.draconic as |comp key|}} {{#each data.competenceByCategory.draconic as |comp key|}}
{{#if data.showCompetence}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}}
{{#if comp.data.isLevelUp}}
<li class="item flexrow xp-level-up" data-item-id="{{comp._id}}">
{{else}}
<li class="item flexrow list-item" data-item-id="{{comp._id}}">
{{/if}}
<img class="sheet-competence-img" src="{{comp.img}}"/>
{{#if comp.data.isLevelUp}}
<span class="competence-label tooltip tooltip-nobottom">
<span class="tooltiptext ttt-xp">
Vous pouvez dépenser {{comp.data.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{comp.name}}
</span>
<a name={{key}}>{{comp.name}}</a></span>
{{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}}/>
<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}}
</li>
{{/if}}
{{/each}} {{/each}}
</ul> </ul>
<div> <div>
<ul class="item-list"> <ul class="item-list">
<li class="item flexrow"> <li class="item flexrow">
<span class="generic-label">Total XP compétences</span> <span class="generic-label">Total XP compétences</span>
<span class="competence-value">{{data.competenceXPTotal}}</span> <span class="competence-value">{{calc.competenceXPTotal}}</span>
</li> </li>
{{#if data.montrerArchetype}} {{#if options.montrerArchetype}}
{{#each data.comptageArchetype as |archetype key|}} {{#each calc.comptageArchetype as |archetype key|}}
<li class="item flexrow"> <li class="item flexrow">
<label class="generic-label">Archetype {{archetype.niveau}} : {{archetype.nombre}} / {{archetype.nombreMax}}</label> <label class="generic-label">Archetype {{archetype.niveau}} : {{archetype.nombre}} / {{archetype.nombreMax}}</label>
</li> </li>
@ -750,7 +543,7 @@
<li class="item flexrow"> <li class="item flexrow">
<span class="competence-label">Position en TMR :</span> <span class="competence-label">Position en TMR :</span>
<span> <span>
{{#if data.isGM}} {{#if options.isGM}}
<input class="competence-value" type="text" name="data.reve.tmrpos.coord" value="{{data.reve.tmrpos.coord}}" data-dtype="String"/> <input class="competence-value" type="text" name="data.reve.tmrpos.coord" value="{{data.reve.tmrpos.coord}}" data-dtype="String"/>
{{else}} {{else}}
{{data.reve.tmrpos.coord}} {{data.reve.tmrpos.coord}}
@ -760,7 +553,7 @@
<li class="item flexrow"> <li class="item flexrow">
<span class="competence-label">Seuil de Rêve :</span> <span class="competence-label">Seuil de Rêve :</span>
<span> <span>
{{#if data.isGM}} {{#if options.isGM}}
<input class="seuil-reve-value" type="text" name="data.reve.seuil.value" value="{{data.reve.seuil.value}}" data-dtype="Number"/> <input class="seuil-reve-value" type="text" name="data.reve.seuil.value" value="{{data.reve.seuil.value}}" data-dtype="Number"/>
{{else}} {{else}}
{{data.reve.seuil.value}} {{data.reve.seuil.value}}
@ -770,7 +563,7 @@
<li class="item flexrow" > <li class="item flexrow" >
<span class="competence-label">Refoulement : </span> <span class="competence-label">Refoulement : </span>
<span> <span>
{{#if data.isGM}} {{#if options.isGM}}
<input class="competence-value" type="text" name="data.reve.refoulement.value" value="{{data.reve.refoulement.value}}" data-dtype="Number"/> <input class="competence-value" type="text" name="data.reve.refoulement.value" value="{{data.reve.refoulement.value}}" data-dtype="Number"/>
{{else}} {{else}}
{{data.reve.refoulement.value}} {{data.reve.refoulement.value}}
@ -921,12 +714,12 @@
<span class="item-name"><h4>Equipement porté</h4></span> <span class="item-name"><h4>Equipement porté</h4></span>
<div> <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">Encombrement total/max : {{numberFormat calc.encTotal decimals=2}} / {{data.attributs.encombrement.value}} <b>{{calc.surEncombrementMessage}}</b></span> -
<span class="item-name">Estimation de l'équipement : {{numberFormat data.prixTotalEquipement decimals=2}} Sols</span> <span class="item-name">Estimation de l'équipement : {{numberFormat calc.prixTotalEquipement decimals=2}} Sols</span>
</div> </div>
<div> <div>
<span class="item-name"><a id="creer-un-objet">Créer un objet</a></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> <span class="item-name"> - <a id="nettoyer-conteneurs">Vider tout les conteneurs</a></span>
{{/if}} {{/if}}
</div> </div>

View File

@ -68,9 +68,9 @@
{{!-- Equipment Tab --}} {{!-- Equipment Tab --}}
<div class="tab items" data-group="primary" data-tab="items"> <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=2}} / {{data.capacite_encombrement}} <b>{{calc.surEncombrementMessage}}</b></span> -
<span class="item-name"><a id="creer-un-objet">Créer un objet</a></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> <span class="item-name"> - <a id="nettoyer-conteneurs">Vider tout les conteneurs</a></span>
{{/if}} {{/if}}
<ul class="item-list alterne-list"> <ul class="item-list alterne-list">

View File

@ -5,7 +5,7 @@
</div> </div>
</header> </header>
<label for="categorie">&nbsp;&nbsp;Conditions</label> <label>&nbsp;&nbsp;Conditions</label>
<select name="diffConditions" id="diffConditions" data-dtype="number"> <select name="diffConditions" id="diffConditions" data-dtype="number">
{{#select diffConditions}} {{#select diffConditions}}
{{#each ajustementsConditions as |key|}} {{#each ajustementsConditions as |key|}}
@ -13,7 +13,7 @@
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
<label for="categorie">&nbsp;&nbsp;Jours</label> <label>&nbsp;&nbsp;Jours</label>
<select name="joursAstrologie" id="joursAstrologie" data-dtype="number"> <select name="joursAstrologie" id="joursAstrologie" data-dtype="number">
{{#select joursSuivants}} {{#select joursSuivants}}
{{#each dates as |date key|}} {{#each dates as |date key|}}
@ -21,8 +21,8 @@
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
<label for="categorie">Etat Général: {{etat}}</label> <label>Etat Général: {{etat}}</label>
<label for="categorie">&nbsp;&nbsp;<a id='jet-astrologie'>Faire un jet d'Astrologie</a></label> <label>&nbsp;&nbsp;<a id='jet-astrologie'>Faire un jet d'Astrologie</a></label>
{{!-- Sheet Body --}} {{!-- Sheet Body --}}
<section class="sheet-body"> <section class="sheet-body">

View File

@ -1,7 +1,7 @@
<form class="skill-roll-dialog"> <form class="skill-roll-dialog">
<h2 class="compdialog" id="compdialogTitle"></h2> <h2 class="compdialog" id="compdialogTitle"></h2>
<div class="form-group"> <div class="form-group">
<label for="categorie">Caractéristique </label> <label>Caractéristique </label>
<select name="carac" id="carac" data-dtype="String"> <select name="carac" id="carac" data-dtype="String">
{{#select carac}} {{#select carac}}
{{#each carac as |caracitem key|}} {{#each carac as |caracitem key|}}
@ -9,21 +9,19 @@
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
<label></label>
<div class="form-group" id="divAppelAuMoral" > <label class="diffMoral">Moral: {{#if (gt moral 0)}}+{{/if}}{{moral}}</label>
<div class="tooltipAppelAuMoral"> <div class="tooltipAppelAuMoral divAppelAuMoral">
<input class="diffAppelAuMoral" id="useAppelAuMoralCheckbox" type="checkbox" name="appelAuMoralDemander" /> <img class="imgAppelAuMoral small-button-container" src="/systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg">
<img for="useAppelAuMoralCheckbox" class="iconeSmile" id="iconeSmile" src="/systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg"> <span class="tooltipAppelAuMoralText">Sans appel au moral</span>
<span class="tooltipAppelAuMoralText" id="tooltipAppelAuMoralText">Sans appel au moral</span>
</div>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
{{#if attackerRoll}} {{#if attackerRoll}}
<label for="categorie">Difficulté</label> <label>Difficulté</label>
<label>{{diffLibre}}</label> <label>{{diffLibre}}</label>
{{else}} {{else}}
<label for="categorie">Difficulté libre</label> <label>Difficulté libre</label>
<select name="diffLibre" id="diffLibre" data-dtype="number" {{#unless use.libre}}disabled{{/unless}}> <select name="diffLibre" id="diffLibre" data-dtype="number" {{#unless use.libre}}disabled{{/unless}}>
{{#select diffLibre}} {{#select diffLibre}}
{{#each difficultesLibres as |key|}} {{#each difficultesLibres as |key|}}
@ -32,7 +30,7 @@
{{/select}} {{/select}}
</select> </select>
{{/if}} {{/if}}
<label for="categorie">&nbsp;&nbsp;Conditions</label> <label>&nbsp;&nbsp;Conditions</label>
<select name="diffConditions" id="diffConditions" data-dtype="number" {{#unless use.conditions}}disabled{{/unless}}> <select name="diffConditions" id="diffConditions" data-dtype="number" {{#unless use.conditions}}disabled{{/unless}}>
{{#select diffConditions}} {{#select diffConditions}}
{{#each ajustementsConditions as |key|}} {{#each ajustementsConditions as |key|}}
@ -40,19 +38,18 @@
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
<label class="diffMoral" for="categorie">Moral: {{#if (gt moral 0)}}+{{/if}}{{moral}}</label>
</div> </div>
{{#if arme}} {{#if arme}}
<div class="form-group"> <div class="form-group">
{{#if attackerRoll}} {{#if attackerRoll}}
{{#if attackerRoll.tactique}} {{#if attackerRoll.tactique}}
<label for="categorie">Tactique: {{attackerRoll.tactique}}</label> <label>Tactique: {{attackerRoll.tactique}}</label>
{{/if}} {{/if}}
<label for="categorie">D&eacute;gats:</label><label id="dmg-arme-actor"></label> <label>D&eacute;gats:</label><label id="dmg-arme-actor"></label>
<label></label> <label></label>
{{else}} {{else}}
<span class="tooltip"> <span class="tooltip">
<label for="categorie">Tactique:</label> <label>Tactique:</label>
<select name="tactique-combat" id="tactique-combat" data-dtype="String" {{#unless use.conditions}}disabled{{/unless}}> <select name="tactique-combat" id="tactique-combat" data-dtype="String" {{#unless use.conditions}}disabled{{/unless}}>
<option value="Attaque normale">Attaque normale</option> <option value="Attaque normale">Attaque normale</option>
<option value="charge">Charge</option> <option value="charge">Charge</option>
@ -65,12 +62,12 @@
</div> </div>
</div> </div>
</span> </span>
<label for="categorie">D&eacute;gats:</label><label id="dmg-arme-actor"></label> <label>D&eacute;gats:</label><label id="dmg-arme-actor"></label>
<label>Non Mortel</label> <label>Non Mortel</label>
<input class="attribute-value" type="checkbox" id="coupsNonMortels" name="coupsNonMortels" {{#if coupsNonMortels}}checked{{/if}}/> <input class="attribute-value" type="checkbox" id="coupsNonMortels" name="coupsNonMortels" {{#if coupsNonMortels}}checked{{/if}}/>
{{/if}} {{/if}}
{{#if ajustements.attaqueDefenseurSurpris.used}} {{#if ajustements.attaqueDefenseurSurpris.used}}
<label for="categorie" id="defenseur-surprise">{{ajustements.attaqueDefenseurSurpris.label}}</label> <label id="defenseur-surprise">{{ajustements.attaqueDefenseurSurpris.label}}</label>
{{/if}} {{/if}}
</div> </div>
{{/if}} {{/if}}

View File

@ -1,14 +1,18 @@
<form class="dialog-roll-sort"> <form class="dialog-roll-sort">
<div class="form-group"> <div class="form-group">
<ul> <ul>
<li><label for="categorie">Recette : {{recetteName}}</label></li> <li><label>Recette : {{recetteName}}</label></li>
<li><label for="categorie">Tâche Alchimique : {{alchimieTexte}}</label></li> <li><label>Tâche Alchimique : {{alchimieTexte}}</label></li>
<li><label for="categorie">Jet : {{selectedCarac.label}} / {{competence.name}}</label></li> <li><label>Jet : {{selectedCarac.label}} / {{competence.name}}</label></li>
</ul> </ul>
<div class="tooltipAppelAuMoral divAppelAuMoral">
<img class="imgAppelAuMoral small-button-container" src="/systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg">
<span class="tooltipAppelAuMoralText">Sans appel au moral</span>
</div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="categorie">conditions</label> <label>conditions</label>
<select name="diffConditions" id="diffConditions" data-dtype="number"> <select name="diffConditions" id="diffConditions" data-dtype="number">
{{#select diffConditions}} {{#select diffConditions}}
{{#each ajustementsConditions as |key|}} {{#each ajustementsConditions as |key|}}
@ -16,7 +20,7 @@
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
<label for="categorie">Difficulté </label> <label>Difficulté </label>
<select name="diffLibre" id="diffLibre" data-dtype="number"> <select name="diffLibre" id="diffLibre" data-dtype="number">
{{#select diffLibre}} {{#select diffLibre}}
{{#each difficultesLibres as |key|}} {{#each difficultesLibres as |key|}}

View File

@ -1,7 +1,7 @@
<form class="skill-roll-dialog"> <form class="skill-roll-dialog">
<h2 class="compdialog" id="compdialogTitle"></h2> <h2 class="compdialog" id="compdialogTitle"></h2>
<div class="form-group"> <div class="form-group">
<label for="categorie">Difficulté libre</label> <label>Difficulté libre</label>
<select name="diffLibre" id="diffLibre" data-dtype="number"> <select name="diffLibre" id="diffLibre" data-dtype="number">
{{#select diffLibre}} {{#select diffLibre}}
{{#each difficultesLibres as |key|}} {{#each difficultesLibres as |key|}}
@ -9,7 +9,7 @@
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
<label for="categorie">conditions</label> <label>conditions</label>
<select name="diffConditions" id="diffConditions" data-dtype="number"> <select name="diffConditions" id="diffConditions" data-dtype="number">
{{#select diffConditions}} {{#select diffConditions}}
{{#each ajustementsConditions as |key|}} {{#each ajustementsConditions as |key|}}
@ -17,15 +17,20 @@
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
<label class="diffMoral" for="categorie">Moral: {{#if (gt moral 0)}}+{{/if}}{{moral}}</label> <label class="diffMoral">Moral: {{#if (gt moral 0)}}+{{/if}}{{moral}}</label>
</div> <div class="tooltipAppelAuMoral divAppelAuMoral">
{{>"systems/foundryvtt-reve-de-dragon/templates/dialog-roll-surenc.html"}} <img class="imgAppelAuMoral small-button-container"
<div id="tableAjustements"> src="/systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg">
</div> <span class="tooltipAppelAuMoralText">Sans appel au moral</span>
<div id="tableResolution"> </div>
</div> </div>
<div id="tableProbaReussite"> {{>"systems/foundryvtt-reve-de-dragon/templates/dialog-roll-surenc.html"}}
</div> <div id="tableAjustements">
</div>
<div id="tableResolution">
</div>
<div id="tableProbaReussite">
</div>
</form> </form>
<script> <script>

View File

@ -1,13 +1,17 @@
<form class="dialog-roll-sort"> <form class="dialog-roll-sort">
<div class="form-group"> <div class="form-group">
<ul> <ul>
<li><label for="categorie">Chant : {{chant.name}}</label></li> <li><label>Chant : {{oeuvre.name}}</label></li>
<li><label for="categorie">Jet : OUIE / {{competence.name}}</label></li> <li><label>Jet : OUIE / {{competence.name}}</label></li>
</ul> </ul>
<div class="tooltipAppelAuMoral divAppelAuMoral">
<img class="imgAppelAuMoral small-button-container" src="/systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg">
<span class="tooltipAppelAuMoralText">Sans appel au moral</span>
</div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="categorie">conditions</label> <label>conditions</label>
<select name="diffConditions" id="diffConditions" data-dtype="number"> <select name="diffConditions" id="diffConditions" data-dtype="number">
{{#select diffConditions}} {{#select diffConditions}}
{{#each ajustementsConditions as |key|}} {{#each ajustementsConditions as |key|}}
@ -15,7 +19,7 @@
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
<label for="categorie">Difficulté </label> <label>Difficulté </label>
<select name="diffLibre" id="diffLibre" data-dtype="number"> <select name="diffLibre" id="diffLibre" data-dtype="number">
{{#select diffLibre}} {{#select diffLibre}}
{{#each difficultesLibres as |key|}} {{#each difficultesLibres as |key|}}

View File

@ -1,22 +1,28 @@
<form class="dialog-roll-danse"> <form class="dialog-roll-danse">
<div class="form-group"> <div class="form-group">
<ul> <ul>
<li><label for="categorie">Danse : {{danse.name}}</label></li> <li><label>Danse : {{oeuvre.name}}</label></li>
<li><label for="categorie">Jet : APPARENCE ou AGILITE / {{competence.name}}</label></li> <li><label>Jet : APPARENCE ou AGILITE / {{competence.name}}</label></li>
</ul> </ul>
</div> </div>
<label for="categorie">Caractéristique</label> <div class="form-group">
<select name="carac" id="carac" class="select-diff" data-dtype="String"> <label>Caractéristique</label>
<select name="carac" id="carac" class="select-diff" data-dtype="String">
{{#select carac}} {{#select carac}}
{{#each carac as |caracitem key|}} {{#each carac as |caracitem key|}}
<option value={{key}}>{{caracitem.label}}</option> <option value={{key}}>{{caracitem.label}}</option>
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
<div class="tooltipAppelAuMoral divAppelAuMoral">
<img class="imgAppelAuMoral small-button-container" src="/systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg">
<span class="tooltipAppelAuMoralText">Sans appel au moral</span>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label for="categorie">conditions</label> <label>conditions</label>
<select name="diffConditions" id="diffConditions" data-dtype="number"> <select name="diffConditions" id="diffConditions" data-dtype="number">
{{#select diffConditions}} {{#select diffConditions}}
{{#each ajustementsConditions as |key|}} {{#each ajustementsConditions as |key|}}
@ -24,7 +30,7 @@
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
<label for="categorie">Difficulté </label> <label>Difficulté </label>
<select name="diffLibre" id="diffLibre" data-dtype="number"> <select name="diffLibre" id="diffLibre" data-dtype="number">
{{#select diffLibre}} {{#select diffLibre}}
{{#each difficultesLibres as |key|}} {{#each difficultesLibres as |key|}}
@ -32,14 +38,14 @@
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
</div> </div>
<div id="tableAjustements"> <div id="tableAjustements">
</div> </div>
<div id="tableResolution"> <div id="tableResolution">
</div> </div>
<div id="tableProbaReussite"> <div id="tableProbaReussite">
</div> </div>
</form> </form>
<script> <script>

View File

@ -1,13 +1,13 @@
<form class="dialog-roll-sort"> <form class="dialog-roll-sort">
<div class="form-group"> <div class="form-group">
<label for="categorie">Vie : {{vieValue}}</label> <label>Vie : {{vieValue}}</label>
<label for="categorie">Etat général : {{etat}}</label> <label>Etat général : {{etat}}</label>
<label for="categorie">Déjà bu : {{diffNbDoses}}</label> <label>Déjà bu : {{diffNbDoses}}</label>
</div> </div>
<div class="form-group" id="div-sort-difficulte"> <div class="form-group" id="div-sort-difficulte">
<label for="categorie">Force du breuvage </label> <label>Force du breuvage </label>
<select name="forceAlcool" id="forceAlcool" data-dtype="number"> <select name="forceAlcool" id="forceAlcool" data-dtype="number">
{{#select forceAlcool}} {{#select forceAlcool}}
{{#each ajustementsConditions as |key|}} {{#each ajustementsConditions as |key|}}

View File

@ -1,14 +1,14 @@
<form class="dialog-roll-sort"> <form class="dialog-roll-sort">
<div class="form-group"> <div class="form-group">
<ul> <ul>
<li><label for="competence-label">Jouer à : {{oeuvre.name}}</label></li> <li><label for="competence-label">Jouer à : {{oeuvre.name}}</label></li>
<li><label for="competence-label">Type : {{oeuvre.data.type}}</label></li> <li><label for="competence-label">Type : {{oeuvre.data.type}}</label></li>
<li><label for="competence-label">Base : {{oeuvre.data.base}}</label></li> <li><label for="competence-label">Base : {{oeuvre.data.base}}</label></li>
<li><label for="competence-label">Carac/Compétence : {{oeuvre.data.caraccomp}}</label></li> <li><label for="competence-label">Carac/Compétence : {{oeuvre.data.caraccomp}}</label></li>
</ul> </ul>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="categorie">Caractéristique</label> <label>Caractéristique</label>
<select name="carac" id="carac" class="select-diff" data-dtype="String"> <select name="carac" id="carac" class="select-diff" data-dtype="String">
{{#select carac}} {{#select carac}}
{{#each carac as |caracitem key|}} {{#each carac as |caracitem key|}}
@ -16,7 +16,13 @@
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
<label for="categorie">conditions</label> <div class="tooltipAppelAuMoral divAppelAuMoral">
<img class="imgAppelAuMoral small-button-container" src="/systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg">
<span class="tooltipAppelAuMoralText">Sans appel au moral</span>
</div>
</div>
<div class="form-group">
<label>Conditions</label>
<select name="diffConditions" id="diffConditions" data-dtype="number"> <select name="diffConditions" id="diffConditions" data-dtype="number">
{{#select diffConditions}} {{#select diffConditions}}
{{#each ajustementsConditions as |key|}} {{#each ajustementsConditions as |key|}}
@ -24,7 +30,7 @@
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
<label for="categorie">Difficulté </label> <label>Difficulté </label>
<select name="diffLibre" id="diffLibre" data-dtype="number"> <select name="diffLibre" id="diffLibre" data-dtype="number">
{{#select diffLibre}} {{#select diffLibre}}
{{#each difficultesLibres as |key|}} {{#each difficultesLibres as |key|}}
@ -32,14 +38,14 @@
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
</div> </div>
<div id="tableAjustements"> <div id="tableAjustements">
</div> </div>
<div id="tableResolution"> <div id="tableResolution">
</div> </div>
<div id="tableProbaReussite"> <div id="tableProbaReussite">
</div> </div>
</form> </form>
<script> <script>

View File

@ -1,10 +1,10 @@
<form class="skill-roll-dialog"> <form class="skill-roll-dialog">
<div class="form-group"> <div class="form-group">
<label for="categorie">{{tmr.label}} ({{tmr.coord}})</label> <label>{{tmr.label}} ({{tmr.coord}})</label>
<label for="categorie">Rêve actuel à {{diffLibre}}</label> <label>Rêve actuel à {{diffLibre}}</label>
<span> <span>
<label for="categorie">Conditions</label> <label>Conditions</label>
<select name="diffConditions" id="diffConditions" data-dtype="number"> <select name="diffConditions" id="diffConditions" data-dtype="number">
{{#select diffConditions}} {{#select diffConditions}}
{{#each ajustementsConditions as |key|}} {{#each ajustementsConditions as |key|}}

View File

@ -2,46 +2,46 @@
<div class="form-group"> <div class="form-group">
<ul class="item-list"> <ul class="item-list">
<li class="item flexrow"> <li class="item flexrow">
<label for="categorie"><strong>Thème : {{meditation.data.theme}} </strong></label> <label><strong>Thème : {{meditation.data.theme}} </strong></label>
<label for="categorie">Intellect {{numberFormat carac.intellect.value decimals=0 sign=false}} / {{competence.name}} {{numberFormat competence.data.niveau decimals=0 sign=true}}</label> <label>Intellect {{numberFormat carac.intellect.value decimals=0 sign=false}} / {{competence.name}} {{numberFormat competence.data.niveau decimals=0 sign=true}}</label>
</li> </li>
<li class="item flexrow"> <li class="item flexrow">
<label for="categorie">Sujet : {{competence.name}} ({{meditation.data.theme}})</label> <label>Sujet : {{competence.name}} ({{meditation.data.theme}})</label>
<label for="categorie">Durée : 60 minutes</label> <label>Durée : 60 minutes</label>
</li> </li>
<li class="item flexrow"> <li class="item flexrow">
<label for="categorie">Support : {{meditation.data.support}}</label> <label>Support : {{meditation.data.support}}</label>
<label for="categorie">Malus spécial : {{meditation.data.malus}}</label> <label>Malus spécial : {{meditation.data.malus}}</label>
</li> </li>
<li class="item flexrow"><label for="categorie">Case TMR : {{meditation.data.tmr}}</label></li> <li class="item flexrow"><label>Case TMR : {{meditation.data.tmr}}</label></li>
</ul> </ul>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="categorie" class="h4"><strong>Conditions Optionnelles : </strong></label> <label class="h4"><strong>Conditions Optionnelles : </strong></label>
</div> </div>
<div class="form-group"> <div class="form-group">
<ul class="item-list"> <ul class="item-list">
<li class="item flexrow"> <li class="item flexrow">
<label for="categorie">Heure : {{meditation.data.heure}}</label> <label>Heure : {{meditation.data.heure}}</label>
<input class="attribute-value conditionMeditation" type="checkbox" id="isHeure" {{#if conditionMeditation.isHeure}}checked{{/if}}/> <input class="attribute-value conditionMeditation" type="checkbox" id="isHeure" {{#if conditionMeditation.isHeure}}checked{{/if}}/>
</li> </li>
<li class="item flexrow"> <li class="item flexrow">
<label for="categorie">Purification : {{meditation.data.purification}}</label> <label>Purification : {{meditation.data.purification}}</label>
<input class="attribute-value conditionMeditation" type="checkbox" id="isPurification" {{#if conditionMeditation.isPurification}}checked{{/if}}/> <input class="attribute-value conditionMeditation" type="checkbox" id="isPurification" {{#if conditionMeditation.isPurification}}checked{{/if}}/>
</li> </li>
<li class="item flexrow"> <li class="item flexrow">
<label for="categorie">Vêture : {{meditation.data.veture}}</label> <label>Vêture : {{meditation.data.veture}}</label>
<input class="attribute-value conditionMeditation" type="checkbox" id="isVeture" {{#if conditionMeditation.isVeture}}checked{{/if}}/> <input class="attribute-value conditionMeditation" type="checkbox" id="isVeture" {{#if conditionMeditation.isVeture}}checked{{/if}}/>
</li> </li>
<li class="item flexrow"> <li class="item flexrow">
<label for="categorie">Comportement antérieur : {{meditation.data.comportement}}</label> <label>Comportement antérieur : {{meditation.data.comportement}}</label>
<input class="attribute-value conditionMeditation" type="checkbox" id="isComportement" {{#if conditionMeditation.isComportement}}checked{{/if}}/> <input class="attribute-value conditionMeditation" type="checkbox" id="isComportement" {{#if conditionMeditation.isComportement}}checked{{/if}}/>
</li> </li>
</ul> </ul>
</div> </div>
<label for="categorie">Conditions supplémentaires : </label> <label>Conditions supplémentaires : </label>
<select name="diffConditions" id="diffConditions" data-dtype="number"> <select name="diffConditions" id="diffConditions" data-dtype="number">
{{#select diffConditions}} {{#select diffConditions}}
{{#each ajustementsConditions as |key|}} {{#each ajustementsConditions as |key|}}

View File

@ -1,13 +1,17 @@
<form class="dialog-roll-sort"> <form class="dialog-roll-sort">
<div class="form-group"> <div class="form-group">
<ul> <ul>
<li><label for="categorie">Jouer une Musique : {{musique.name}}</label></li> <li><label>Jouer une Musique : {{oeuvre.name}}</label></li>
<li><label for="categorie">Jet : OUIE / {{competence.name}}</label></li> <li><label>Jet : OUIE / {{competence.name}}</label></li>
</ul> </ul>
<div class="tooltipAppelAuMoral divAppelAuMoral">
<img class="imgAppelAuMoral small-button-container" src="/systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg">
<span class="tooltipAppelAuMoralText">Sans appel au moral</span>
</div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="categorie">conditions</label> <label>conditions</label>
<select name="diffConditions" id="diffConditions" data-dtype="number"> <select name="diffConditions" id="diffConditions" data-dtype="number">
{{#select diffConditions}} {{#select diffConditions}}
{{#each ajustementsConditions as |key|}} {{#each ajustementsConditions as |key|}}
@ -15,7 +19,7 @@
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
<label for="categorie">Difficulté </label> <label>Difficulté </label>
<select name="diffLibre" id="diffLibre" data-dtype="number"> <select name="diffLibre" id="diffLibre" data-dtype="number">
{{#select diffLibre}} {{#select diffLibre}}
{{#each difficultesLibres as |key|}} {{#each difficultesLibres as |key|}}

View File

@ -1,13 +1,17 @@
<form class="dialog-roll-sort"> <form class="dialog-roll-sort">
<div class="form-group"> <div class="form-group">
<ul> <ul>
<li><label for="categorie">Interpréter une Oeuvre : {{oeuvre.name}}</label></li> <li><label>Interpréter une Oeuvre : {{oeuvre.name}}</label></li>
<li><label for="categorie">Jet : {{upperFirst oeuvre.data.default_carac}} / {{competence.name}}</label></li> <li><label>Jet : {{upperFirst oeuvre.data.default_carac}} / {{competence.name}}</label></li>
</ul> </ul>
<div class="tooltipAppelAuMoral divAppelAuMoral">
<img class="imgAppelAuMoral small-button-container" src="/systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg">
<span class="tooltipAppelAuMoralText">Sans appel au moral</span>
</div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="categorie">conditions</label> <label>conditions</label>
<select name="diffConditions" id="diffConditions" data-dtype="number"> <select name="diffConditions" id="diffConditions" data-dtype="number">
{{#select diffConditions}} {{#select diffConditions}}
{{#each ajustementsConditions as |key|}} {{#each ajustementsConditions as |key|}}
@ -15,7 +19,7 @@
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
<label for="categorie">Difficulté </label> <label>Difficulté </label>
<select name="diffLibre" id="diffLibre" data-dtype="number"> <select name="diffLibre" id="diffLibre" data-dtype="number">
{{#select diffLibre}} {{#select diffLibre}}
{{#each difficultesLibres as |key|}} {{#each difficultesLibres as |key|}}

View File

@ -2,14 +2,18 @@
<div class="form-group"> <div class="form-group">
<ul> <ul>
<li><label for="categorie">Cuisiner : {{oeuvre.name}}</label></li> <li><label>Cuisiner : {{oeuvre.name}}</label></li>
<li><label for="categorie">Jet : ODORAT-GOUT / {{competence.name}}</label></li> <li><label>Jet : ODORAT-GOUT / {{competence.name}}</label></li>
<li><label for="categorie">Exotisme : {{oeuvre.data.exotisme}}</label></li> <li><label>Exotisme : {{oeuvre.data.exotisme}}</label></li>
</ul> </ul>
<div class="tooltipAppelAuMoral divAppelAuMoral">
<img class="imgAppelAuMoral small-button-container" src="/systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg">
<span class="tooltipAppelAuMoralText">Sans appel au moral</span>
</div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="categorie">conditions</label> <label>conditions</label>
<select name="diffConditions" id="diffConditions" data-dtype="number"> <select name="diffConditions" id="diffConditions" data-dtype="number">
{{#select diffConditions}} {{#select diffConditions}}
{{#each ajustementsConditions as |key|}} {{#each ajustementsConditions as |key|}}
@ -17,7 +21,7 @@
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
<label for="categorie">Difficulté </label> <label>Difficulté </label>
<select name="diffLibre" id="diffLibre" data-dtype="number"> <select name="diffLibre" id="diffLibre" data-dtype="number">
{{#select diffLibre}} {{#select diffLibre}}
{{#each difficultesLibres as |key|}} {{#each difficultesLibres as |key|}}

View File

@ -1,6 +1,6 @@
<form class="resolution-roll-dialog"> <form class="resolution-roll-dialog">
<div class="flexrow flex-group-left"> <div class="flexrow flex-group-left">
<label for="categorie">Caractéristique</label> <label>Caractéristique</label>
<select name="carac" id="carac" class="select-diff" data-dtype="String"> <select name="carac" id="carac" class="select-diff" data-dtype="String">
{{#select carac}} {{#select carac}}
{{#each carac as |caracitem key|}} {{#each carac as |caracitem key|}}
@ -8,7 +8,7 @@
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
<label for="categorie">Difficulté libre</label> <label>Difficulté libre</label>
<select name="diffLibre" id="diffLibre" class="select-diff" data-dtype="number"> <select name="diffLibre" id="diffLibre" class="select-diff" data-dtype="number">
{{#select diffLibre}} {{#select diffLibre}}
{{#each difficultesLibres as |key|}} {{#each difficultesLibres as |key|}}
@ -16,7 +16,7 @@
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
<label for="categorie">&nbsp;&nbsp;Conditions</label> <label>&nbsp;&nbsp;Conditions</label>
<select name="diffConditions" id="diffConditions" class="select-diff" data-dtype="number"> <select name="diffConditions" id="diffConditions" class="select-diff" data-dtype="number">
{{#select diffConditions}} {{#select diffConditions}}
{{#each ajustementsConditions as |key|}} {{#each ajustementsConditions as |key|}}
@ -24,7 +24,6 @@
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
<span class="flex-between"></span>
<button id="lancer" type="button">Lancer les dés</button> <button id="lancer" type="button">Lancer les dés</button>
</div> </div>
<div id="tableResolution"> <div id="tableResolution">

View File

@ -1,11 +1,11 @@
<form class="dialog-roll-sort"> <form class="dialog-roll-sort">
<div class="form-group"> <div class="form-group">
<label for="categorie">Rêve : <label>{{numberFormat selectedCarac.value decimals=0 sign=false}}</label></label> <label>Rêve : <label>{{numberFormat selectedCarac.value decimals=0 sign=false}}</label></label>
<label for="categorie">TMR : {{tmr.label}} ({{tmr.coord}})</label> <label>TMR : {{tmr.label}} ({{tmr.coord}})</label>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="categorie">Draconic </label> <label>Draconic </label>
<select name="draconic" id="draconic" data-dtype="String"> <select name="draconic" id="draconic" data-dtype="String">
{{#select draconic}} {{#select draconic}}
{{#each draconicList as |draconic key|}} {{#each draconicList as |draconic key|}}
@ -13,7 +13,7 @@
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
<label for="categorie"> &nbsp;Conditions</label> <label> &nbsp;Conditions</label>
<select name="diffConditions" id="diffConditions" data-dtype="number"> <select name="diffConditions" id="diffConditions" data-dtype="number">
{{#select diffConditions}} {{#select diffConditions}}
{{#each ajustementsConditions as |key|}} {{#each ajustementsConditions as |key|}}
@ -24,7 +24,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="categorie">Sort </label> <label>Sort </label>
<select name="sort" id="sort" data-dtype="String"> <select name="sort" id="sort" data-dtype="String">
{{#select sort}} {{#select sort}}
{{#each sortList as |sort key|}} {{#each sortList as |sort key|}}
@ -35,7 +35,7 @@
</div> </div>
<div class="form-group" id="div-sort-difficulte"> <div class="form-group" id="div-sort-difficulte">
<label for="categorie">Difficulté </label> <label>Difficulté </label>
<select name="diffLibre" id="diffLibre" data-dtype="number"> <select name="diffLibre" id="diffLibre" data-dtype="number">
{{#select diffLibre}} {{#select diffLibre}}
{{#each difficultesLibres as |key|}} {{#each difficultesLibres as |key|}}
@ -46,7 +46,7 @@
</div> </div>
<div class="form-group" id="div-sort-ptreve"> <div class="form-group" id="div-sort-ptreve">
<label for="categorie">Couts en Points de Rêve </label> <label>Couts en Points de Rêve </label>
<select name="ptreve-variable" id="ptreve-variable" data-dtype="number"> <select name="ptreve-variable" id="ptreve-variable" data-dtype="number">
{{#select ptreve-variable}} {{#select ptreve-variable}}
{{#each coutreve as |cout key|}} {{#each coutreve as |cout key|}}

View File

@ -1,4 +1,4 @@
{{#if data.isGM}} {{#if options.isGM}}
<h3>Notes du MJ : </h3> <h3>Notes du MJ : </h3>
<div class="form-group editor"> <div class="form-group editor">
{{editor content=data.notesmj target="data.notesmj" button=true owner=owner editable=editable}} {{editor content=data.notesmj target="data.notesmj" button=true owner=owner editable=editable}}

View File

@ -9,7 +9,7 @@
{{!-- Sheet Body --}} {{!-- Sheet Body --}}
<section class="sheet-body"> <section class="sheet-body">
<div class="form-group"> <div class="form-group">
<label for="categorie">Compétence associée</label> <label>Compétence associée</label>
<select name="data.competence" id="competence" data-dtype="String"> <select name="data.competence" id="competence" data-dtype="String">
{{#select item.data.competence}} {{#select item.data.competence}}
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-competence.html"}} {{>"systems/foundryvtt-reve-de-dragon/templates/enum-competence.html"}}

View File

@ -15,7 +15,7 @@
{{!-- Sheet Body --}} {{!-- Sheet Body --}}
<section class="sheet-body"> <section class="sheet-body">
<div class="form-group"> <div class="form-group">
<label for="categorie">Catégorie </label> <label>Catégorie </label>
<select name="data.categorie" id="categorie" data-dtype="String"> <select name="data.categorie" id="categorie" data-dtype="String">
{{#select item.data.categorie}} {{#select item.data.categorie}}
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-competence.html"}} {{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-competence.html"}}

View File

@ -9,7 +9,7 @@
{{!-- Sheet Body --}} {{!-- Sheet Body --}}
<section class="sheet-body"> <section class="sheet-body">
<div class="form-group"> <div class="form-group">
<label for="categorie">Draconic </label> <label>Draconic </label>
<select name="data.draconic" id="draconic" data-dtype="String"> <select name="data.draconic" id="draconic" data-dtype="String">
{{#select item.data.draconic}} {{#select item.data.draconic}}
{{>"systems/foundryvtt-reve-de-dragon/templates/sort-draconic.html"}} {{>"systems/foundryvtt-reve-de-dragon/templates/sort-draconic.html"}}