Merge pull request 'v11.1.3 - Werther de Zloth l'Onirique' (#679) from VincentVk/foundryvtt-reve-de-dragon:v11 into v11

Reviewed-on: #679
This commit is contained in:
uberwald 2023-11-11 09:06:00 +01:00
commit 7811eae728
53 changed files with 271 additions and 241 deletions

View File

@ -1,5 +1,14 @@
# v11.0 # v11.0
## v11.1.1 - Les vertèbres de Werther de Zloth ## v11.1.3 - Werther de Zloth l'Onirique
- Ajout du facteur de significative à côté du pourcentage dans le résultat des jets de dés pour rappeler que le pourcentage n'est pas diviasé
- Fix: dans les TMRs, les tooltips affichent bien les informations de tous les effets sur la case
- Fix: la fatigue et l'éthylisme sont de nouveau pris en compte dans le calcul de l'éthylisme
- Fix: Le MJ peut correctement masquer les points de tâche requis
- Fix: le jet d'appréciation n'utilise pas la compétence
- Fix: la qualité négative n'est pas exotique, elle est juste mauvaise: on n'utilise pas la cuisine pour se retenir de jeter l'assiette
- Esthétique: ne pas afficher "+0" pour les ajustements de jets/encaissement
## v11.1.2 - Les vertèbres de Werther de Zloth
- Fix: les jets d'encaissement fonctionnent de nouveau normalement - Fix: les jets d'encaissement fonctionnent de nouveau normalement
- Macro "Mon personnage" permettant au joueur d'accéder à sa feuille de personnage depuis la barre de macros - Macro "Mon personnage" permettant au joueur d'accéder à sa feuille de personnage depuis la barre de macros

View File

@ -109,10 +109,10 @@ export class RdDActor extends RdDBaseActorSang {
/* -------------------------------------------- */ /* -------------------------------------------- */
getEtatGeneral(options = { ethylisme: false }) { getEtatGeneral(options = { ethylisme: false }) {
let etatGeneral = Misc.toInt(this.system.compteurs.etat?.value) const etatGeneral = Misc.toInt(this.system.compteurs.etat?.value)
if (options.ethylisme) { if (options.ethylisme) {
// Pour les jets d'Ethylisme, on ignore le degré d'éthylisme (p.162) // Pour les jets d'Ethylisme, on retire le malus d'éthylisme (p.162)
etatGeneral -= Math.min(0, this.system.compteurs.ethylisme.value) return etatGeneral - this.malusEthylisme()
} }
return etatGeneral return etatGeneral
} }
@ -533,7 +533,7 @@ export class RdDActor extends RdDBaseActorSang {
message.content += `Vous dégrisez un peu (${RdDUtility.getNomEthylisme(value)}). `; message.content += `Vous dégrisez un peu (${RdDUtility.getNomEthylisme(value)}). `;
} }
await this.update({ await this.update({
"system.compteurs.ethylisme": { 'system.compteurs.ethylisme': {
nb_doses: 0, nb_doses: 0,
jet_moral: false, jet_moral: false,
value: value value: value
@ -1178,17 +1178,6 @@ export class RdDActor extends RdDBaseActorSang {
return 0; return 0;
} }
/* -------------------------------------------- */
async setEthylisme(degre) {
let ethylisme = duplicate(this.system.compteurs.ethylisme);
ethylisme.value = degre;
ethylisme.nb_doses = 0;
if (degre == 1) {
ethylisme.jet_moral = false;
}
await this.update({ "system.compteurs.ethylisme": ethylisme });
}
/* -------------------------------------------- */ /* -------------------------------------------- */
async jetEthylisme() { async jetEthylisme() {
let rollData = { let rollData = {
@ -1207,7 +1196,7 @@ export class RdDActor extends RdDBaseActorSang {
async actionPrincipale(item, onActionItem = async () => { }) { async actionPrincipale(item, onActionItem = async () => { }) {
let result = await super.actionPrincipale(item, onActionItem) let result = await super.actionPrincipale(item, onActionItem)
if (result) { return result } if (result) { return result }
result = await this.actionNourritureboisson(item, onActionItem) result = await this.actionNourritureboisson(item, onActionItem)
if (result) { return result } if (result) { return result }
@ -1314,17 +1303,26 @@ export class RdDActor extends RdDBaseActorSang {
/* -------------------------------------------- */ /* -------------------------------------------- */
async _surmonterExotisme(item) { async _surmonterExotisme(item) {
const exotisme = Math.min(item.system.exotisme, item.system.qualite, 0); const qualite = Math.min(item.system.qualite, 0)
if (exotisme < 0) { const exotisme = item.system.exotisme
const rolled = await this.doRollCaracCompetence('volonte', 'cuisine', exotisme, { title: `tente de surmonter l'exotisme de ${item.name}` }); if (exotisme < 0 || qualite < 0) {
return rolled.isSuccess; const competence = qualite > 0 ? 'cuisine' : undefined
const difficulte = Math.min(exotisme, qualite)
const rolled = await this.doRollCaracCompetence('volonte', competence, difficulte, { title: `tente de surmonter l'exotisme de ${item.name}` })
return rolled.isSuccess
} }
return true; return true;
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
async apprecier(carac, compName, qualite, title) { async apprecier(carac, compName, qualite, title) {
const rolled = await this.doRollCaracCompetence(carac, compName, qualite, { title: title, apprecier: true }); const competence = this.getCompetence(compName);
const minQualite = Math.max(1, competence?.system.niveau ?? 0);
if (qualite <= minQualite) {
ui.notifications.info(`${this.name} a un niveau ${competence.system.niveau} en ${competence.name}, trop élevé pour apprécier la qualité de ${qualite}`)
return;
}
const rolled = await this.doRollCaracCompetence(carac, undefined, 0, { title });
if (rolled?.isSuccess) { if (rolled?.isSuccess) {
await this.jetDeMoral('heureux'); await this.jetDeMoral('heureux');
} }
@ -1801,20 +1799,13 @@ export class RdDActor extends RdDBaseActorSang {
* @param {*} options * @param {*} options
* @returns * @returns
*/ */
async doRollCaracCompetence(caracName, compName, diff, options = { title: "", apprecier: false }) { async doRollCaracCompetence(caracName, compName, diff, options = { title: "" }) {
const carac = this.getCaracByName(caracName); const carac = this.getCaracByName(caracName);
if (!carac) { if (!carac) {
ui.notifications.warn(`${this.name} n'a pas de caractéristique correspondant à ${caracName}`) ui.notifications.warn(`${this.name} n'a pas de caractéristique correspondant à ${caracName}`)
return; return;
} }
const competence = this.getCompetence(compName); const competence = this.getCompetence(compName);
if (options.apprecier && competence) {
const minQualite = Math.max(0, competence.system.niveau);
if (diff <= minQualite) {
ui.notifications.info(`${this.name} a un niveau ${competence.system.niveau} en ${competence.name}, trop élevé pour apprécier la qualité de ${diff}`)
return;
}
}
let rollData = { let rollData = {
alias: this.name, alias: this.name,
caracValue: Number(carac.value), caracValue: Number(carac.value),

View File

@ -269,7 +269,6 @@ export class RdDBaseActorSang extends RdDBaseActorReve {
} }
malusEthylisme() { return 0 } malusEthylisme() { return 0 }
malusFatigue() { return 0 }
} }

View File

@ -196,6 +196,7 @@ export class RdDItemSheet extends ItemSheet {
this.html.find('.creer-tache-livre').click((event) => this._getEventActor(event).creerTacheDepuisLivre(this.item)); this.html.find('.creer-tache-livre').click((event) => this._getEventActor(event).creerTacheDepuisLivre(this.item));
this.html.find('.consommer-potion').click((event) => this._getEventActor(event).consommerPotion(this.item, this.getActionRenderItem())); this.html.find('.consommer-potion').click((event) => this._getEventActor(event).consommerPotion(this.item, this.getActionRenderItem()));
this.html.find('.creer-potion-base').click((event) => this._getEventActor(event).actionHerbe(this.item)); this.html.find('.creer-potion-base').click((event) => this._getEventActor(event).actionHerbe(this.item));
this.html.find('input[name="system.cacher_points_de_tache"]').change(async event => await this.item.update({ 'system.cacher_points_de_tache': event.currentTarget.checked }));
this.html.find('.alchimie-tache a').click((event) => { this.html.find('.alchimie-tache a').click((event) => {
let actor = this._getEventActor(event); let actor = this._getEventActor(event);
@ -256,7 +257,7 @@ export class RdDItemSheet extends ItemSheet {
if (this.item.isCompetence()) { if (this.item.isCompetence()) {
const categorie = event.currentTarget.value; const categorie = event.currentTarget.value;
const level = RdDItemCompetence.getNiveauBase(categorie, this.item.getCategories()); const level = RdDItemCompetence.getNiveauBase(categorie, this.item.getCategories());
this.item.system.base = level; this.item.system.base = level;
this.html.find('[name="system.base"]').val(level); this.html.find('[name="system.base"]').val(level);
} }

View File

@ -797,7 +797,7 @@ export class RdDItem extends Item {
`<b>Périodicité</b>: ${this.system.periodicite}`, `<b>Périodicité</b>: ${this.system.periodicite}`,
`<b>Fatigue</b>: ${this.system.fatigue}`, `<b>Fatigue</b>: ${this.system.fatigue}`,
`<b>Difficulté</b>: ${this.system.difficulte}`, `<b>Difficulté</b>: ${this.system.difficulte}`,
RdDItem.propertyIfDefined('Points de Tâche', this.system.points_de_tache, this.system.cacher_points_de_tache), RdDItem.propertyIfDefined('Points de Tâche', this.system.points_de_tache, !this.system.cacher_points_de_tache),
`<b>Points de Tâche atteints</b>: ${this.system.points_de_tache_courant}`] `<b>Points de Tâche atteints</b>: ${this.system.points_de_tache_courant}`]
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -806,7 +806,7 @@ export class RdDItem extends Item {
`<b>Compétence</b>: ${this.system.competence}`, `<b>Compétence</b>: ${this.system.competence}`,
`<b>Auteur</b>: ${this.system.auteur}`, `<b>Auteur</b>: ${this.system.auteur}`,
`<b>Difficulté</b>: ${this.system.difficulte}`, `<b>Difficulté</b>: ${this.system.difficulte}`,
RdDItem.propertyIfDefined('Points de Tâche', this.system.points_de_tache, this.system.cacher_points_de_tache), RdDItem.propertyIfDefined('Points de Tâche', this.system.points_de_tache, !this.system.cacher_points_de_tache),
...this._inventaireTemplateChatData() ...this._inventaireTemplateChatData()
] ]
} }

View File

@ -62,8 +62,8 @@ export class RdDTMRDialog extends Dialog {
this.loadCasesSpeciales(); this.loadCasesSpeciales();
this.allTokens = []; this.allTokens = [];
this.rencontreState = 'aucune'; this.rencontreState = 'aucune';
this.pixiApp = new PIXI.Application({ width: 720, height: 860 }); this.pixiTMR = new PixiTMR(this);
this.pixiTMR = new PixiTMR(this, this.pixiApp);
this.subdialog = undefined this.subdialog = undefined
this.callbacksOnAnimate = []; this.callbacksOnAnimate = [];
@ -128,7 +128,7 @@ export class RdDTMRDialog extends Dialog {
/* -------------------------------------------- */ /* -------------------------------------------- */
createPixiSprites() { createPixiSprites() {
EffetsDraconiques.carteTmr.createSprite(this.pixiTMR); this.pixiTMR.setup()
this.updateTokens(); this.updateTokens();
this.forceDemiRevePositionView(); this.forceDemiRevePositionView();
} }
@ -139,13 +139,9 @@ export class RdDTMRDialog extends Dialog {
this.demiReve = this._tokenDemiReve(); this.demiReve = this._tokenDemiReve();
this._trackToken(this.demiReve); this._trackToken(this.demiReve);
} }
let tokens = this._getTokensCasesTmr() this._getTokensCasesTmr().forEach(t => this._trackToken(t))
.concat(this._getTokensRencontres()) this._getTokensRencontres().forEach(t => this._trackToken(t))
.concat(this._getTokensSortsReserve()); this._getTokensSortsReserve().forEach(t => this._trackToken(t))
for (let t of tokens) {
this._trackToken(t);
}
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -204,6 +200,7 @@ export class RdDTMRDialog extends Dialog {
if (this.subdialog) { if (this.subdialog) {
return this.forceTMRContinueAction(); return this.forceTMRContinueAction();
} }
let oddq = TMRUtility.coordTMRToOddq(this._getActorCoord()); let oddq = TMRUtility.coordTMRToOddq(this._getActorCoord());
if (move == 'top') oddq.row -= 1; if (move == 'top') oddq.row -= 1;
@ -230,7 +227,8 @@ export class RdDTMRDialog extends Dialog {
document.getElementsByClassName("tmr-row") document.getElementsByClassName("tmr-row")
.item(0) .item(0)
.insertCell(0).append(this.pixiApp.view); .insertCell(0)
.append(this.pixiTMR.view);
if (this.viewOnly) { if (this.viewOnly) {
this.html.find('.lancer-sort').remove(); this.html.find('.lancer-sort').remove();
@ -241,24 +239,17 @@ export class RdDTMRDialog extends Dialog {
HtmlUtility.showControlWhen(this.html.find(".appliquerFatigue"), ReglesOptionnelles.isUsing("appliquer-fatigue")); HtmlUtility.showControlWhen(this.html.find(".appliquerFatigue"), ReglesOptionnelles.isUsing("appliquer-fatigue"));
HtmlUtility.showControlWhen(this.html.find(".lire-signe-draconique"), this.actor.isResonanceSigneDraconique(this._getActorCoord())); HtmlUtility.showControlWhen(this.html.find(".lire-signe-draconique"), this.actor.isResonanceSigneDraconique(this._getActorCoord()));
this.html.find('tr.tmr-row *').click((event) => { this.html.find('tr.tmr-row *').click(event => this.subdialog?.bringToTop());
this.subdialog?.bringToTop();
});
// Roll Sort // Roll Sort
this.html.find('.lancer-sort').click((event) => { this.html.find('.lancer-sort').click(event => this.actor.rollUnSort(this._getActorCoord()));
this.actor.rollUnSort(this._getActorCoord()); this.html.find('.lire-signe-draconique').click(event => this.actor.rollLireSigneDraconique(this._getActorCoord()));
}); this.html.find('#dir-top').click(event=> this.moveFromKey("top"));
this.html.find('.lire-signe-draconique').click((event) => { this.html.find('#dir-top-left').click(event=> this.moveFromKey("top-left"));
this.actor.rollLireSigneDraconique(this._getActorCoord()); this.html.find('#dir-top-right').click(event=> this.moveFromKey("top-right"));
}); this.html.find('#dir-bottom-left').click(event=> this.moveFromKey("bottom-left"));
this.html.find('#dir-bottom-right').click(event=> this.moveFromKey("bottom-right"));
this.html.find('#dir-top').click((event) => this.moveFromKey("top")); this.html.find('#dir-bottom').click(event=> this.moveFromKey("bottom"));
this.html.find('#dir-top-left').click((event) => this.moveFromKey("top-left"));
this.html.find('#dir-top-right').click((event) => this.moveFromKey("top-right"));
this.html.find('#dir-bottom-left').click((event) => this.moveFromKey("bottom-left"));
this.html.find('#dir-bottom-right').click((event) => this.moveFromKey("bottom-right"));
this.html.find('#dir-bottom').click((event) => this.moveFromKey("bottom"));
// Gestion du cout de montée en points de rêve // Gestion du cout de montée en points de rêve
let reveCout = ((this.tmrdata.isRapide && !EffetsDraconiques.isDeplacementAccelere(this.actor)) ? -2 : -1) - this.actor.countMonteeLaborieuse(); let reveCout = ((this.tmrdata.isRapide && !EffetsDraconiques.isDeplacementAccelere(this.actor)) ? -2 : -1) - this.actor.countMonteeLaborieuse();
@ -382,19 +373,8 @@ export class RdDTMRDialog extends Dialog {
/* -------------------------------------------- */ /* -------------------------------------------- */
$marquerCasesTMR(listCoordTMR) { $marquerCasesTMR(listCoordTMR) {
this.currentRencontre.graphics = []; // Keep track of rectangles to delete it
this.currentRencontre.locList = duplicate(listCoordTMR); // And track of allowed location this.currentRencontre.locList = duplicate(listCoordTMR); // And track of allowed location
for (let coordTMR of listCoordTMR) { this.currentRencontre.graphics = listCoordTMR.map(coordTMR => this.pixiTMR.addMarkTMR(coordTMR))
const rect = this._getCaseRectangleCoord(coordTMR);
const rectDraw = new PIXI.Graphics();
rectDraw.beginFill(0xffff00, 0.3);
// set the line style to have a width of 5 and set the color to red
rectDraw.lineStyle(5, 0xff0000);
// draw a rectangle
rectDraw.drawRect(rect.x, rect.y, rect.w, rect.h);
this.pixiApp.stage.addChild(rectDraw);
this.currentRencontre.graphics.push(rectDraw); // garder les objets pour gestion post-click
}
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -907,15 +887,11 @@ export class RdDTMRDialog extends Dialog {
/* -------------------------------------------- */ /* -------------------------------------------- */
nettoyerRencontre() { nettoyerRencontre() {
if (!this.currentRencontre) return; // Sanity check // Suppression des dessins des zones possibles
if (this.currentRencontre.graphics) { this.currentRencontre?.graphics?.forEach(graphic => this.pixiTMR.removeGraphic(graphic))
for (let drawRect of this.currentRencontre.graphics) { // Nettoyage de la structureet de l'état
// Suppression des dessins des zones possibles this.currentRencontre = undefined;
this.pixiApp.stage.removeChild(drawRect); this.rencontreState = 'aucune';
}
}
this.currentRencontre = undefined; // Nettoyage de la structure
this.rencontreState = 'aucune'; // Et de l'état
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -1106,18 +1082,10 @@ export class RdDTMRDialog extends Dialog {
await this.postRencontre(tmr); await this.postRencontre(tmr);
return tmr; return tmr;
} }
/* -------------------------------------------- */
/** Retourne les coordonnées x, h, w, h du rectangle d'une case donnée */
_getCaseRectangleCoord(coord) {
return this.pixiTMR.getCaseRectangle(TMRUtility.coordTMRToOddq(coord));
}
/* -------------------------------------------- */ /* -------------------------------------------- */
_removeTokens(filter) { _removeTokens(filter) {
const tokensToRemove = this.allTokens.filter(filter); this.allTokens.filter(filter).forEach(token => this.pixiTMR.removeToken(token))
for (let token of tokensToRemove) {
this.pixiApp.stage.removeChild(token.sprite);
}
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -1125,7 +1093,9 @@ export class RdDTMRDialog extends Dialog {
if (this.demiReve === token && this.isDemiReveCache()) { if (this.demiReve === token && this.isDemiReveCache()) {
return; return;
} }
this.pixiTMR.setPosition(token.sprite, TMRUtility.coordTMRToOddq(token.coordTMR())); this.pixiTMR.positionToken(token);
this.allTokens.push(token); if (!this.allTokens.includes(token)) {
this.allTokens.push(token);
}
} }
} }

View File

@ -289,7 +289,8 @@ export class RdDUtility {
Handlebars.registerHelper('uniteQuantite', (itemId, actorId) => RdDUtility.getItem(itemId, actorId)?.getUniteQuantite()); Handlebars.registerHelper('uniteQuantite', (itemId, actorId) => RdDUtility.getItem(itemId, actorId)?.getUniteQuantite());
Handlebars.registerHelper('isFieldInventaireModifiable', (type, field) => RdDItem.isFieldInventaireModifiable(type, field)); Handlebars.registerHelper('isFieldInventaireModifiable', (type, field) => RdDItem.isFieldInventaireModifiable(type, field));
Handlebars.registerHelper('rarete-getChamp', (rarete, field) => RdDRaretes.getChamp(rarete, field)); Handlebars.registerHelper('rarete-getChamp', (rarete, field) => RdDRaretes.getChamp(rarete, field));
Handlebars.registerHelper('plusMoins', diff => (diff > 0 ? '+' : '') + Math.round(diff))
Handlebars.registerHelper('experienceLog-topic', topic => ExperienceLog.labelTopic(topic)); Handlebars.registerHelper('experienceLog-topic', topic => ExperienceLog.labelTopic(topic));
return loadTemplates(templatePaths); return loadTemplates(templatePaths);

View File

@ -17,7 +17,7 @@ export class AutoAdjustDarkness {
static async adjust(darkness) { static async adjust(darkness) {
if (AutoAdjustDarkness.isAuto()) { if (AutoAdjustDarkness.isAuto()) {
const scene = game.scenes.viewed; const scene = game.scenes.viewed;
if (scene.globalLight && scene.tokenVision) { if (scene?.globalLight && scene?.tokenVision) {
await scene.update({ darkness }); await scene.update({ darkness });
} }
} }

View File

@ -1,3 +1,4 @@
import { TMRUtility } from "../tmr-utility.js";
import { Draconique } from "./draconique.js"; import { Draconique } from "./draconique.js";
import { PixiTMR } from "./pixi-tmr.js"; import { PixiTMR } from "./pixi-tmr.js";
@ -16,7 +17,6 @@ export class CarteTmr extends Draconique {
img() { return 'systems/foundryvtt-reve-de-dragon/styles/img/ui/tmr.webp' } img() { return 'systems/foundryvtt-reve-de-dragon/styles/img/ui/tmr.webp' }
createSprite(pixiTMR) { createSprite(pixiTMR) {
const img = PixiTMR.getImgFromCode(this.code()) const img = PixiTMR.getImgFromCode(this.code())
const sprite = new PIXI.Sprite(PIXI.utils.TextureCache[img]); const sprite = new PIXI.Sprite(PIXI.utils.TextureCache[img]);
// Setup the position of the TMR // Setup the position of the TMR
@ -28,10 +28,12 @@ export class CarteTmr extends Draconique {
sprite.anchor.set(0); sprite.anchor.set(0);
sprite.buttonMode = true; sprite.buttonMode = true;
sprite.tmrObject = pixiTMR; sprite.tmrObject = pixiTMR;
pixiTMR.addTooltip(sprite, (e,s) => this.computeTooltip(e,s));
pixiTMR.pixiApp.stage.addChild(sprite);
return sprite; return sprite;
} }
computeTooltip(coordTMR) {
const tmr = TMRUtility.getTMR(coordTMR)
return tmr? TMRUtility.getTMRLabel(coordTMR) : '';
}
} }

View File

@ -86,15 +86,13 @@ export class Draconique {
* @param {*} pixiTMR instance de PixiTMR qui gère les tooltips, les méthodes de création de sprite standard, les clicks. * @param {*} pixiTMR instance de PixiTMR qui gère les tooltips, les méthodes de création de sprite standard, les clicks.
*/ */
token(pixiTMR, linkData, coordTMR, type = undefined) { token(pixiTMR, linkData, coordTMR, type = undefined) {
const tooltip = this.tooltip(linkData);
const token = { const token = {
sprite: this.createSprite(pixiTMR), sprite: this.createSprite(pixiTMR),
coordTMR: coordTMR coordTMR: coordTMR,
tooltip: tooltip
}; };
token[type ?? this.code()] = linkData; token[type ?? this.code()] = linkData;
this.linkData = linkData;
if (this.tooltip(linkData)) {
pixiTMR.addTooltip(token.sprite, (e, s) => this.computeTooltip(e, s));
}
return token; return token;
} }

View File

@ -1,6 +1,8 @@
import { Misc } from "../misc.js";
import { RdDTMRDialog } from "../rdd-tmr-dialog.js"; import { RdDTMRDialog } from "../rdd-tmr-dialog.js";
import { tmrConstants, tmrTokenZIndex } from "../tmr-constants.js"; import { tmrConstants, tmrTokenZIndex } from "../tmr-constants.js";
import { TMRUtility } from "../tmr-utility.js"; import { TMRUtility } from "../tmr-utility.js";
import { EffetsDraconiques } from "./effets-draconiques.js";
export const tooltipStyle = new PIXI.TextStyle({ export const tooltipStyle = new PIXI.TextStyle({
fontFamily: 'CaslonAntique', fontFamily: 'CaslonAntique',
@ -15,11 +17,35 @@ export class PixiTMR {
static textures = [] static textures = []
constructor(tmrObject, pixiApp) { constructor(tmrDialog) {
this.tmrObject = tmrObject; this.tmrDialog = tmrDialog;
this.pixiApp = pixiApp ?? tmrObject.pixiApp;
this.pixiApp.stage.sortableChildren = true;
this.callbacksOnAnimate = []; this.callbacksOnAnimate = [];
this.pixiApp = new PIXI.Application({ width: 720, height: 860 });
this.pixiApp.eventMode = 'static';
this.pixiApp.stage.sortableChildren = true;
this.tooltip = new PIXI.Text('', tooltipStyle);
this.tooltip.zIndex = 1000
this.pixiApp.stage.addChild(this.tooltip);
}
get view() {
return this.pixiApp.view
}
setup() {
this.carteTMR = EffetsDraconiques.carteTmr.createSprite(this);
this.pixiApp.stage.addChild(this.carteTMR);
this.carteTMR.isOver = false;
this.carteTMR.eventMode = 'static';
this.carteTMR
.on('pointermove', event => this.onPointerMove(event))
.on('pointerdown', event => this.onClickBackground(event))
.on('pointerover', event => this.onShowTooltip(event))
.on('pointerout', event => this.onHideTooltip(event));
} }
async load(onLoad = (loader, resources) => { }) { async load(onLoad = (loader, resources) => { }) {
@ -46,6 +72,22 @@ export class PixiTMR {
this.callbacksOnAnimate.push(() => animation(this.pixiApp)); this.callbacksOnAnimate.push(() => animation(this.pixiApp));
} }
addMarkTMR(coordTMR) {
const rect = this.getCaseRectangle(TMRUtility.coordTMRToOddq(coordTMR))
const markTMR = new PIXI.Graphics();
markTMR.beginFill(0xffff00, 0.3);
// set the line style to have a width of 5 and set the color to red
markTMR.lineStyle(5, 0xff0000);
// draw a rectangle
markTMR.drawRect(rect.x, rect.y, rect.w, rect.h);
this.pixiApp.stage.addChild(markTMR);
return markTMR
}
removeGraphic(graphic) {
this.pixiApp.stage.removeChild(graphic);
}
sprite(code, options = {}) { sprite(code, options = {}) {
let img = PixiTMR.getImgFromCode(code) let img = PixiTMR.getImgFromCode(code)
const texture = PIXI.utils.TextureCache[img]; const texture = PIXI.utils.TextureCache[img];
@ -67,7 +109,7 @@ export class PixiTMR {
return sprite; return sprite;
} }
circle(name, options = {}) { circle(code, options = {}) {
let sprite = new PIXI.Graphics(); let sprite = new PIXI.Graphics();
sprite.beginFill(options.color, options.opacity); sprite.beginFill(options.color, options.opacity);
sprite.drawCircle(0, 0, (options.taille ?? 12) / 2); sprite.drawCircle(0, 0, (options.taille ?? 12) / 2);
@ -77,63 +119,76 @@ export class PixiTMR {
return sprite; return sprite;
} }
addTooltip(sprite, computeTooltip) {
sprite.tooltip = new PIXI.Text('', tooltipStyle);
sprite.tooltip.zIndex = tmrTokenZIndex.tooltip;
sprite.isOver = false;
sprite.eventMode = 'static';
sprite
.on('pointermove', event => this.onPointerMove(event, sprite, computeTooltip))
.on('pointerdown', event => this.onClickBackground(event))
.on('pointerover', event => this.onShowTooltip(event, sprite))
.on('pointerout', event => this.onHideTooltip(event, sprite));
}
onClickBackground(event) { onClickBackground(event) {
if (!this.viewOnly) { if (!this.viewOnly) {
this.tmrObject.onClickTMR(event) this.tmrDialog.onClickTMR(event)
} }
} }
onPointerMove(event, sprite, computeTooltip) { onPointerMove(event) {
if (sprite.isOver && sprite.tooltip) { if (this.carteTMR.isOver) {
var { x, y } = TMRUtility.computeEventPosition(event); this.setTooltipPosition(event);
const oddq = TMRUtility.computeOddq(x, y); this.tooltip.text = this.computeTooltip(event);
}
}
onShowTooltip(event) {
if (!this.carteTMR.isOver) {
this.setTooltipPosition(event);
this.pixiApp.stage.addChild(this.tooltip);
this.tooltip.text = this.computeTooltip(event);
}
this.carteTMR.isOver = true;
}
sprite.tooltip.x = x + (oddq.col > 8 ? - 3 * tmrConstants.full : tmrConstants.half) onHideTooltip(event) {
sprite.tooltip.y = y + (oddq.row > 10 ? - tmrConstants.half : tmrConstants.half) if (this.carteTMR.isOver) {
sprite.tooltip.text = computeTooltip(event, sprite); this.pixiApp.stage.removeChild(this.tooltip);
}
this.carteTMR.isOver = false;
}
computeTooltip(event) {
const oddq = TMRUtility.computeEventOddq(event);
const coordTMR = TMRUtility.oddqToCoordTMR(oddq);
const tmr = TMRUtility.getTMR(coordTMR)
if (tmr) {
const labelTMR = TMRUtility.getTMRLabel(coordTMR);
const tokenTooltips = this.tmrDialog.allTokens
.filter(token => token.coordTMR() == coordTMR)
.map(token => token.tooltip);
const tmrTooltip = `${coordTMR}: ${labelTMR}`;
return [tmrTooltip, ...tokenTooltips].reduce(Misc.joining('\n'))
} }
} }
onShowTooltip(event, sprite) { setTooltipPosition(event) {
if (sprite.tooltip) { var { x, y } = TMRUtility.computeEventPosition(event);
if (!sprite.isOver) { const oddq = TMRUtility.computeOddq(x, y);
sprite.tooltip.x = sprite.x;
sprite.tooltip.y = sprite.y; this.tooltip.x = x + (oddq.col > 8 ? -3 * tmrConstants.full : tmrConstants.half);
this.pixiApp.stage.addChild(sprite.tooltip); this.tooltip.y = y + (oddq.row > 10 ? -tmrConstants.half : tmrConstants.half);
} }
sprite.isOver = true;
positionToken(token) {
if (token.sprite) {
const sprite = token.sprite;
const oddq = TMRUtility.coordTMRToOddq(token.coordTMR());
const decallagePairImpair = (oddq.col % 2 == 0) ? tmrConstants.col1_y : tmrConstants.col2_y;
const dx = (sprite.decallage == undefined) ? 0 : sprite.decallage.x;
const dy = (sprite.decallage == undefined) ? 0 : sprite.decallage.y;
sprite.x = tmrConstants.gridx + (oddq.col * tmrConstants.cellw) + dx;
sprite.y = tmrConstants.gridy + (oddq.row * tmrConstants.cellh) + dy + decallagePairImpair;
} }
} }
onHideTooltip(event, sprite) { removeToken(token) {
if (sprite.tooltip) { if (token.sprite) {
if (sprite.isOver) { this.pixiApp.stage.removeChild(token.sprite)
this.pixiApp.stage.removeChild(sprite.tooltip);
}
sprite.isOver = false;
} }
} }
setPosition(sprite, oddq) {
let decallagePairImpair = (oddq.col % 2 == 0) ? tmrConstants.col1_y : tmrConstants.col2_y;
let dx = (sprite.decallage == undefined) ? 0 : sprite.decallage.x;
let dy = (sprite.decallage == undefined) ? 0 : sprite.decallage.y;
sprite.x = tmrConstants.gridx + (oddq.col * tmrConstants.cellw) + dx;
sprite.y = tmrConstants.gridy + (oddq.row * tmrConstants.cellh) + dy + decallagePairImpair;
}
getCaseRectangle(oddq) { getCaseRectangle(oddq) {
let decallagePairImpair = (oddq.col % 2 == 0) ? tmrConstants.col1_y : tmrConstants.col2_y; let decallagePairImpair = (oddq.col % 2 == 0) ? tmrConstants.col1_y : tmrConstants.col2_y;
let x = tmrConstants.gridx + (oddq.col * tmrConstants.cellw) - (tmrConstants.cellw / 2); let x = tmrConstants.gridx + (oddq.col * tmrConstants.cellw) - (tmrConstants.cellw / 2);

File diff suppressed because one or more lines are too long

View File

@ -1,3 +0,0 @@
{"_id":"dlvK5Lks7WoSZ1Ko","name":"1er soins - Blessure critique","type":"tache","flags":{"core":{"sourceId":"Compendium.foundryvtt-reve-de-dragon.taches-courantes.dlvK5Lks7WoSZ1Ko"}},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_chirurgie.webp","effects":[],"system":{"description":"<p><span class=\"fontstyle0\">Effectuer les premiers soins consiste &agrave; obtenir le nombre de points de t&acirc;che demand&eacute; par la blessure. Un minimum de mat&eacute;riel est n&eacute;cessaire : de l&rsquo;eau, des chiffons propres pour servir de pansements.</span></p>\n<p>&nbsp;</p>","descriptionmj":"","carac":"dexterite","competence":"Chirurgie","periodicite":"1 round","fatigue":0,"difficulte":-6,"points_de_tache":6,"points_de_tache_courant":0,"nb_jet_echec":0,"nb_jet_succes":0,"cacher_points_de_tache":false},"ownership":{"default":0,"Q2G6GTdrotKzYGUC":3},"folder":null,"sort":0,"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.3.13","coreVersion":"10.291","createdTime":1671050458426,"modifiedTime":1671050514673,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"}}
{"_id":"lHdfav9mvs68yj7J","name":"1er soins - Blessure légère","type":"tache","flags":{"core":{"sourceId":"Compendium.foundryvtt-reve-de-dragon.taches-courantes.lHdfav9mvs68yj7J"}},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_chirurgie.webp","effects":[],"system":{"description":"<p><span class=\"fontstyle0\">Effectuer les premiers soins consiste &agrave; obtenir le nombre de points de t&acirc;che demand&eacute; par la blessure. Un minimum de mat&eacute;riel est n&eacute;cessaire : de l&rsquo;eau, des chiffons propres pour servir de pansements.</span></p>\n<p>&nbsp;</p>","descriptionmj":"","carac":"dexterite","competence":"Chirurgie","periodicite":"1 round","fatigue":0,"difficulte":-2,"points_de_tache":2,"points_de_tache_courant":0,"nb_jet_echec":0,"nb_jet_succes":0,"cacher_points_de_tache":false},"ownership":{"default":0,"Q2G6GTdrotKzYGUC":3},"folder":null,"sort":0,"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.3.13","coreVersion":"10.291","createdTime":1671050458426,"modifiedTime":1671050514673,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"}}
{"_id":"nbkuXbhgSxHwXD4t","name":"1er soins - Blessure grave","type":"tache","flags":{"core":{"sourceId":"Compendium.foundryvtt-reve-de-dragon.taches-courantes.nbkuXbhgSxHwXD4t"}},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_chirurgie.webp","effects":[],"system":{"description":"<p><span class=\"fontstyle0\">Effectuer les premiers soins consiste &agrave; obtenir le nombre de points de t&acirc;che demand&eacute; par la blessure. Un minimum de mat&eacute;riel est n&eacute;cessaire : de l&rsquo;eau, des chiffons propres pour servir de pansements.</span></p>\n<p>&nbsp;</p>","descriptionmj":"","carac":"dexterite","competence":"Chirurgie","periodicite":"1 round","fatigue":0,"difficulte":-4,"points_de_tache":4,"points_de_tache_courant":0,"nb_jet_echec":0,"nb_jet_succes":0,"cacher_points_de_tache":false},"ownership":{"default":0,"Q2G6GTdrotKzYGUC":3},"folder":null,"sort":0,"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.3.13","coreVersion":"10.291","createdTime":1671050458427,"modifiedTime":1671050514673,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"}}

View File

@ -776,7 +776,7 @@ input:is(.blessure-premiers_soins, .blessure-soins_complets) {
} }
.rdd-diviseur{ .rdd-diviseur{
border-radius: 6px; padding: 3px; border-radius: 6px; padding: 3px;
background: var(--gradient-silver-light); background: var(--gradient-red);
} }
.rdd-niveau-requis{ .rdd-niveau-requis{

View File

@ -1,8 +1,8 @@
{ {
"id": "foundryvtt-reve-de-dragon", "id": "foundryvtt-reve-de-dragon",
"title": "Rêve de Dragon", "title": "Rêve de Dragon",
"version": "11.1.2", "version": "11.1.3",
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-11.1.2.zip", "download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-11.1.3.zip",
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v11/system.json", "manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v11/system.json",
"changelog": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/branch/v11/changelog.md", "changelog": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/branch/v11/changelog.md",
"compatibility": { "compatibility": {

View File

@ -12,7 +12,7 @@
<li class="item flexrow"> <li class="item flexrow">
<label class="generic-label"> <label class="generic-label">
Niveaux {{numberFormat archetype.niveau decimals=0 sign=true}} : {{archetype.nombre}} / {{archetype.nombreMax}} Niveaux {{plusMoins archetype.niveau}} : {{archetype.nombre}} / {{archetype.nombreMax}}
</label> </label>
</li> </li>
{{/each}} {{/each}}

View File

@ -68,7 +68,7 @@
</li> </li>
<li class="caracteristique flexrow list-item" > <li class="caracteristique flexrow list-item" >
<label class="carac-label">Bonus dom.</label> <label class="carac-label">Bonus dom.</label>
<input class="derivee-value" type="text" disabled value="{{numberFormat system.attributs.plusdom.value decimals=0 sign=true}}"/> <input class="derivee-value" type="text" disabled value="{{plusMoins system.attributs.plusdom.value}}"/>
</li> </li>
<li class="caracteristique flexrow list-item" > <li class="caracteristique flexrow list-item" >
<label class="carac-label">Malus armure</label> <label class="carac-label">Malus armure</label>

View File

@ -20,8 +20,8 @@
</a> </a>
({{arme.system.competence}}) ({{arme.system.competence}})
</span> </span>
<span class="competence-value">{{numberFormat arme.system.niveau decimals=0 sign=true}}</span> <span class="competence-value">{{plusMoins arme.system.niveau}}</span>
<span class="competence-value">{{numberFormat arme.system.dommagesReels decimals=0 sign=true}}</span> <span class="competence-value">{{plusMoins arme.system.dommagesReels}}</span>
<span class="competence-value"></span> <span class="competence-value"></span>
<span class="initiative-value arme-initiative"><a>{{arme.system.initiative}}</a></span> <span class="initiative-value arme-initiative"><a>{{arme.system.initiative}}</a></span>
</li> </li>
@ -34,7 +34,7 @@
<span>{{esq.name}}</span> <span>{{esq.name}}</span>
</a> </a>
</span> </span>
<span class="competence-value">{{numberFormat esq.system.niveau decimals=0 sign=true}}</span> <span class="competence-value">{{plusMoins esq.system.niveau}}</span>
<span class="competence-value"></span> <span class="competence-value"></span>
<span class="competence-value"></span> <span class="competence-value"></span>
<span class="initiative-value"></span> <span class="initiative-value"></span>

View File

@ -11,13 +11,13 @@
{{#unless @root.options.vueDetaillee}}disabled{{/unless}}/> {{#unless @root.options.vueDetaillee}}disabled{{/unless}}/>
<input class="competence-value creature-niveau" type="text" data-dtype="number" <input class="competence-value creature-niveau" type="text" data-dtype="number"
compname="{{comp.name}}" name="{{comp._id}}.niveau" compname="{{comp.name}}" name="{{comp._id}}.niveau"
value="{{numberFormat comp.system.niveau decimals=0 sign=true}}" value="{{plusMoins comp.system.niveau}}"
{{#unless @root.options.vueDetaillee}}disabled{{/unless}} {{#unless @root.options.vueDetaillee}}disabled{{/unless}}
/> />
<input class="competence-damage creature-dommages" type="text" data-dtype="number" <input class="competence-damage creature-dommages" type="text" data-dtype="number"
{{#if comp.isdommages}} {{#if comp.isdommages}}
compname="{{comp.name}}" name="{{comp._id}}.dommages" compname="{{comp.name}}" name="{{comp._id}}.dommages"
value="{{numberFormat comp.system.dommages decimals=0 sign=true}}" value="{{plusMoins comp.system.dommages}}"
{{#unless @root.options.vueDetaillee}}disabled{{/unless}} {{#unless @root.options.vueDetaillee}}disabled{{/unless}}
{{else}}disabled{{/if}} {{else}}disabled{{/if}}
/> />

View File

@ -13,7 +13,7 @@
{{/if}} {{/if}}
<input class="competence-value" type="text" compname="{{name}}" name="comp-value-{{name}}" <input class="competence-value" type="text" compname="{{name}}" name="comp-value-{{name}}"
value="{{numberFormat system.niveau decimals=0 sign=true}}" data-dtype="number" value="{{plusMoins system.niveau}}" data-dtype="number"
{{#if (or (not @root.options.vueDetaillee) @root.options.vueArchetype)}}disabled{{/if}} /> {{#if (or (not @root.options.vueDetaillee) @root.options.vueArchetype)}}disabled{{/if}} />
{{#if @root.options.vueDetaillee}} {{#if @root.options.vueDetaillee}}
@ -42,7 +42,7 @@
<i class="far fa-circle"></i> <i class="far fa-circle"></i>
{{/if}} {{/if}}
<input class="competence-archetype niveau-archetype" type="text" compname="{{name}}" name="comp-archetype-{{name}}" <input class="competence-archetype niveau-archetype" type="text" compname="{{name}}" name="comp-archetype-{{name}}"
value="{{numberFormat system.niveau_archetype decimals=0 sign=true}}" data-dtype="number" value="{{plusMoins system.niveau_archetype}}" data-dtype="number"
{{#if (not @root.options.vueArchetype)}}disabled{{/if}} /> {{#if (not @root.options.vueArchetype)}}disabled{{/if}} />
<a class="item-edit" title="Modifier"><i class="fas fa-edit"></i></a> <a class="item-edit" title="Modifier"><i class="fas fa-edit"></i></a>
{{#if @root.options.isGM}} {{#if @root.options.isGM}}

View File

@ -63,11 +63,9 @@
{{/unless}} {{/unless}}
<a class='chat-card-button' id='encaisser-button' data-attackerId='{{attackerId}}' <a class='chat-card-button' id='encaisser-button' data-attackerId='{{attackerId}}'
data-defenderTokenId='{{defenderTokenId}}'> data-defenderTokenId='{{defenderTokenId}}'>
Encaisser à {{#if (eq dmg.mortalite 'non-mortel')~}} Encaisser à {{plusMoins dmg.total}}
({{numberFormat dmg.total decimals=0 sign=true}}) {{#if (eq dmg.mortalite 'non-mortel')~}}
{{~else~}} (non-mortel) !
{{numberFormat dmg.total decimals=0 sign=true}}
{{~/if}} !
</a> </a>
</span> </span>
</div> </div>

View File

@ -1,6 +1,6 @@
<div> <div>
<span {{#if ajustements}}class="tooltip tooltip-dotted" {{/if}}> <span {{#if ajustements}}class="tooltip tooltip-dotted" {{/if}}>
{{rolled.caracValue}} à {{numberFormat rolled.finalLevel decimals=0 sign=true}} {{rolled.caracValue}} à {{plusMoins rolled.finalLevel}}
{{#if ajustements}} {{#if ajustements}}
<div class="tooltiptext ttt-ajustements"> <div class="tooltiptext ttt-ajustements">
{{#each ajustements as |item key|}} {{#each ajustements as |item key|}}
@ -9,7 +9,7 @@
{{#if item.descr}} {{#if item.descr}}
{{{item.descr}}} {{{item.descr}}}
{{else}} {{else}}
{{item.label}}: {{numberFormat item.value decimals=0 sign=true}} {{item.label}}: {{plusMoins item.value}}
{{/if}} {{/if}}
</div> </div>
{{/if}} {{/if}}
@ -19,10 +19,13 @@
{{#if rolled.factorHtml}}<span class="rdd-diviseur">&times;{{{rolled.factorHtml}}}</span>{{/if}} {{#if rolled.factorHtml}}<span class="rdd-diviseur">&times;{{{rolled.factorHtml}}}</span>{{/if}}
</span> </span>
<span>= {{rolled.score}}%</span> <span>= {{rolled.score}}%</span>
{{#if rolled.factorHtml}}
<span class="rdd-diviseur">&times;{{{rolled.factorHtml}}}</span>
{{/if}}
</div> </div>
<div> <div>
<span>{{rolled.roll}} : </span><span class="rdd-roll-{{rolled.code}} strong-text">{{rolled.quality}}</span> <span>{{rolled.roll}} : </span><span class="rdd-roll-{{rolled.code}} strong-text">{{rolled.quality}}</span>
{{#if rolled.ajustementNecessaire}} {{#if rolled.ajustementNecessaire}}
<span class="rdd-niveau-requis">(Réussite si {{numberFormat rolled.niveauNecessaire decimals=0 sign=true}} / avec niveau {{numberFormat rolled.ajustementNecessaire decimals=0 sign=true}}) </span> <span class="rdd-niveau-requis">(Réussite si {{plusMoins rolled.niveauNecessaire}} / avec niveau {{plusMoins rolled.ajustementNecessaire}}) </span>
{{/if}} {{/if}}
</div> </div>

View File

@ -20,11 +20,11 @@
{{#if rolled.isSuccess}} {{#if rolled.isSuccess}}
<span><strong>{{show.cible}}</strong> doit se défendre à <strong>{{diffLibre}}</strong>, ou encaisser à <span><strong>{{show.cible}}</strong> doit se défendre à <strong>{{diffLibre}}</strong>, ou encaisser à
{{~#if (eq dmg.mortalite 'non-mortel')}} {{~#if (eq dmg.mortalite 'non-mortel')}}
<span class="rdd-roll-norm">({{numberFormat dmg.total decimals=0 sign=true}})</span> (dommages non-mortel) <span class="rdd-roll-norm">({{plusMoins dmg.total}})</span> (non-mortel)
{{else if (eq dmg.mortalite 'mortel')}} {{else if (eq dmg.mortalite 'mortel')}}
<span class="rdd-roll-echec">{{numberFormat dmg.total decimals=0 sign=true}}</span> <span class="rdd-roll-echec">{{plusMoins dmg.total}}</span>
{{else}} {{else}}
<span class="rdd-roll-etotal">{{numberFormat dmg.total decimals=0 sign=true}}</span> (entités de cauchemar) <span class="rdd-roll-etotal">{{plusMoins dmg.total}}</span> (entités de cauchemar)
{{~/if}}. {{~/if}}.
{{#if show.isRecul}}Si votre adversaire n'esquive pas, il devra résister à l'impact ou reculer sous le choc!{{/if}} {{#if show.isRecul}}Si votre adversaire n'esquive pas, il devra résister à l'impact ou reculer sous le choc!{{/if}}
</span> </span>

View File

@ -10,7 +10,7 @@
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}} {{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
<hr> <hr>
<div> <div>
<span>{{#if rolled.ptTache}}{{rolled.ptTache}} points de tâche{{/if}}{{#if rolled.ptQualite}}{{#if rolled.ptTache}},{{/if}} Qualité ajustée de {{numberFormat rolled.ptQualite decimals=0 sign=true}}{{/if}}</span> <span>{{#if rolled.ptTache}}{{rolled.ptTache}} points de tâche{{/if}}{{#if rolled.ptQualite}}{{#if rolled.ptTache}},{{/if}} Qualité ajustée de {{rolled.ptQualite}}{{/if}}</span>
</div> </div>
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-info-appel-au-moral.html"}} {{> "systems/foundryvtt-reve-de-dragon/templates/chat-info-appel-au-moral.html"}}
{{~#if show.explications}} {{~#if show.explications}}

View File

@ -10,7 +10,7 @@
{{else}} {{else}}
<h4>{{alias}} encaisse à <h4>{{alias}} encaisse à
<span> <span>
{{numberFormat dmg.total decimals=0 sign=true}} {{plusMoins dmg.total}}
{{#if (eq dmg.mortalite 'non-mortel')~}}(coups non mortels) {{#if (eq dmg.mortalite 'non-mortel')~}}(coups non mortels)
{{~else if (eq dmg.mortalite 'entiteincarnee')}}(entité incarnée) {{~else if (eq dmg.mortalite 'entiteincarnee')}}(entité incarnée)
{{~/if}} {{~/if}}

View File

@ -5,13 +5,13 @@
{{alias}} {{#if show.title}}{{show.title}}: {{/if}} {{alias}} {{#if show.title}}{{show.title}}: {{/if}}
{{#if selectedCarac}}{{selectedCarac.label}} {{#if selectedCarac}}{{selectedCarac.label}}
{{#if competence}}{{#unless (eq selectedCarac.label competence.name)}} / {{competence.name}}{{/unless}}{{/if}} {{#if competence}}{{#unless (eq selectedCarac.label competence.name)}} / {{competence.name}}{{/unless}}{{/if}}
à {{diffLibre}} à {{plusMoins diffLibre}}
{{/if}} {{/if}}
</h4> </h4>
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}} {{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
<hr> <hr>
<div> <div>
<span>{{#if rolled.ptTache}}{{rolled.ptTache}} points de tâche{{/if}}{{#if rolled.ptQualite}}{{#if rolled.ptTache}},{{/if}} ajustement Qualité {{numberFormat rolled.ptQualite decimals=0 sign=true}}{{/if}}</span> <span>{{#if rolled.ptTache}}{{rolled.ptTache}} points de tâche{{/if}}{{#if rolled.ptQualite}}{{#if rolled.ptTache}},{{/if}} ajustement Qualité {{rolled.ptQualite}}{{/if}}</span>
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-info-appel-au-moral.html"}} {{> "systems/foundryvtt-reve-de-dragon/templates/chat-info-appel-au-moral.html"}}
</div> </div>
{{~#if show.explications}} {{~#if show.explications}}

View File

@ -3,7 +3,7 @@
<ul> <ul>
<li>Vent: {{lowerFirst vent.description}} {{apostrophe 'de' vent.direction}}, force {{vent.force}}</li> <li>Vent: {{lowerFirst vent.description}} {{apostrophe 'de' vent.direction}}, force {{vent.force}}</li>
<li>Mer {{lowerFirst mer.description}}, {{apostrophe 'de' mer.direction}}, force {{mer.force}}</li> <li>Mer {{lowerFirst mer.description}}, {{apostrophe 'de' mer.direction}}, force {{mer.force}}</li>
<li>Température {{lowerFirst temperature.description}} ({{numberFormat temperature.force decimals=0 sign=true}})</li> <li>Température {{lowerFirst temperature.description}} ({{plusMoins temperature.force}})</li>
<li>Couverture nuageuse: {{lowerFirst nuage.description}}</li> <li>Couverture nuageuse: {{lowerFirst nuage.description}}</li>
<li>Pluie: {{lowerFirst pluie.description}}</li> <li>Pluie: {{lowerFirst pluie.description}}</li>
</div> </div>

View File

@ -64,14 +64,17 @@
{{/if}} {{/if}}
{{#if (gt item.system.qualite 0)}} {{#if (gt item.system.qualite 0)}}
{{#if (gt item.system.qualite cuisine.system.niveau)}} {{#if (gt item.system.qualite cuisine.system.niveau)}}
<p>La qualité du plat est telle qu'un jet de Goût/Cuisine à {{numberFormat item.system.qualite decimals=0 sign=true}} <p>La qualité du plat est telle qu'un jet de Goût réussi vous permettra un jet de moral heureux.</p>
vous permettra un jet de moral heureux.</p>
{{/if}} {{/if}}
{{/if}} {{/if}}
{{#if (or (lt item.system.qualite 0) (lt item.system.exotisme 0))}} {{#if (or (lt item.system.qualite 0) (lt item.system.exotisme 0))}}
<p> <p>
Pour surmonter {{#if (lt item.system.qualite 0)}}le mauvais goût{{else}}l'exotisme{{/if}}, vous devez effectuer un jet de Volonté/Cuisine à {{numberFormat (min item.system.exotisme item.system.qualite) decimals=0 sign=true}}. {{#if (lt item.system.qualite 0)}}
Pour surmonter le mauvais goût, vous devez effectuer un jet de Volonté à {{plusMoins (min item.system.exotisme item.system.qualite)}}.
{{else}}
Pour surmonter l'exotisme, vous devez effectuer un jet de Volonté/Cuisine à {{plusMoins (min item.system.exotisme)}}.
{{/if}}
<br/> <br/>
<input class="attribute-value se-forcer" type="checkbox" name="se-forcer" {{#if choix.seForcer}}checked{{/if}}> <input class="attribute-value se-forcer" type="checkbox" name="se-forcer" {{#if choix.seForcer}}checked{{/if}}>
<label for="se-forcer">En cas d'échec, voulez-vous vous forcer à manger (et subir un jet de moral en situation malheureuse)?</label> <label for="se-forcer">En cas d'échec, voulez-vous vous forcer à manger (et subir un jet de moral en situation malheureuse)?</label>

View File

@ -19,14 +19,17 @@
{{/if}} {{/if}}
{{#if (gt item.system.qualite 0)}} {{#if (gt item.system.qualite 0)}}
{{#if (gt item.system.qualite cuisine.system.niveau)}} {{#if (gt item.system.qualite cuisine.system.niveau)}}
<p>La qualité du plat est telle qu'un jet de Goût/Cuisine à {{numberFormat item.system.qualite decimals=0 sign=true}} <p>La qualité du plat est telle qu'un jet de Goût vous permettra un jet de moral heureux.</p>
vous permettra un jet de moral heureux.</p>
{{/if}} {{/if}}
{{/if}} {{/if}}
{{#if (or (lt item.system.qualite 0) (lt item.system.exotisme 0))}} {{#if (or (lt item.system.qualite 0) (lt item.system.exotisme 0))}}
<p> <p>
Pour surmonter {{#if (lt item.system.qualite 0)}}le mauvais goût{{else}}l'exotisme{{/if}}, vous devez effectuer un jet de Volonté/Cuisine à {{numberFormat (min item.system.exotisme item.system.qualite) decimals=0 sign=true}}. {{#if (lt item.system.qualite 0)}}
Pour surmonter le mauvais goût, vous devez effectuer un jet de Volonté à {{plusMoins (min item.system.exotisme item.system.qualite)}}.
{{else}}
Pour surmonter l'exotisme, vous devez effectuer un jet de Volonté/Cuisine à {{plusMoins (min item.system.exotisme)}}.
{{/if}}
<br/> <br/>
<input class="attribute-value se-forcer" type="checkbox" name="se-forcer" {{#if choix.seForcer}}checked{{/if}}> <input class="attribute-value se-forcer" type="checkbox" name="se-forcer" {{#if choix.seForcer}}checked{{/if}}>
<label for="se-forcer">En cas d'échec, voulez-vous vous forcer à manger (et subir un jet de moral en situation malheureuse)?</label> <label for="se-forcer">En cas d'échec, voulez-vous vous forcer à manger (et subir un jet de moral en situation malheureuse)?</label>

View File

@ -6,7 +6,7 @@
<div class="grid grid-2col"> <div class="grid grid-2col">
<label>{{alchimie.tache}}:</label><label class="flex-grow">{{alchimie.texte}}</label> <label>{{alchimie.tache}}:</label><label class="flex-grow">{{alchimie.texte}}</label>
<label>Caractéristique: </label><label class="flex-grow">{{selectedCarac.label}}</label> <label>Caractéristique: </label><label class="flex-grow">{{selectedCarac.label}}</label>
<label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.system.niveau decimals=0 sign=true}}</label></label> <label>{{competence.name}}:</label><label class="flex-grow">{{plusMoins competence.system.niveau}}</label></label>
</div> </div>
</div> </div>
<div class="flex-group-left"> <div class="flex-group-left">

View File

@ -6,7 +6,7 @@
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" /> <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
<div class="grid grid-2col"> <div class="grid grid-2col">
<label>Caractéristique: </label><label class="flex-grow">{{selectedCarac.label}}</label> <label>Caractéristique: </label><label class="flex-grow">{{selectedCarac.label}}</label>
<label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.system.niveau decimals=0 sign=true}}</label></label> <label>{{competence.name}}:</label><label class="flex-grow">{{plusMoins competence.system.niveau}}</label></label>
</div> </div>
{{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.system}} {{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.system}}
</div> </div>

View File

@ -6,7 +6,7 @@
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" /> <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
<div class="grid grid-2col"> <div class="grid grid-2col">
<label for="carac">Caractéristique:</label>{{>"systems/foundryvtt-reve-de-dragon/templates/partial-select-carac.html"}} <label for="carac">Caractéristique:</label>{{>"systems/foundryvtt-reve-de-dragon/templates/partial-select-carac.html"}}
<label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.system.niveau decimals=0 sign=true}}</label></label> <label>{{competence.name}}:</label><label class="flex-grow">{{plusMoins competence.system.niveau}}</label></label>
</div> </div>
{{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.system}} {{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.system}}
</div> </div>

View File

@ -7,7 +7,7 @@
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/> <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/>
<div class="grid grid-2col"> <div class="grid grid-2col">
<label for="carac">{{selectedCarac.label}}:</label><label class="flex-grow" name="carac">{{selectedCarac.value}}</label> <label for="carac">{{selectedCarac.label}}:</label><label class="flex-grow" name="carac">{{selectedCarac.value}}</label>
<label for="competence">{{competence.name}}:</label><label class="flex-grow" name="competence">{{numberFormat competence.system.niveau decimals=0 sign=true}}</label> <label for="competence">{{competence.name}}:</label><label class="flex-grow" name="competence">{{plusMoins competence.system.niveau}}</label>
</div> </div>
</div> </div>
<div class="flex-group-left"> <div class="flex-group-left">

View File

@ -9,7 +9,7 @@
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/> <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/>
<div class="grid grid-2col"> <div class="grid grid-2col">
<label for="carac">Rêve actuel:</label><label class="flex-grow" name="carac">{{selectedCarac.value}}</label> <label for="carac">Rêve actuel:</label><label class="flex-grow" name="carac">{{selectedCarac.value}}</label>
<label for="competence">{{competence.name}}:</label><label class="flex-grow" name="competence">{{numberFormat competence.system.niveau decimals=0 sign=true}}</label> <label for="competence">{{competence.name}}:</label><label class="flex-grow" name="competence">{{plusMoins competence.system.niveau}}</label>
</div> </div>
</div> </div>
<div class="flex-group-left"> <div class="flex-group-left">

View File

@ -4,7 +4,7 @@
<select class="competence-value flex-shrink" name="modificateurDegats" data-dtype="number"> <select class="competence-value flex-shrink" name="modificateurDegats" data-dtype="number">
{{#select modificateurDegats}} {{#select modificateurDegats}}
{{#each ajustementsEncaissement as |key|}} {{#each ajustementsEncaissement as |key|}}
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option> <option value={{key}}>{{plusMoins key}}</option>
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>

View File

@ -7,7 +7,7 @@
<div class="grid grid-2col"> <div class="grid grid-2col">
<label>Type:</label><label class="flex-grow">{{oeuvre.system.type}}</label> <label>Type:</label><label class="flex-grow">{{oeuvre.system.type}}</label>
<label for="carac">Caractéristique:</label>{{>"systems/foundryvtt-reve-de-dragon/templates/partial-select-carac.html"}} <label for="carac">Caractéristique:</label>{{>"systems/foundryvtt-reve-de-dragon/templates/partial-select-carac.html"}}
<label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.system.niveauReel decimals=0 sign=true}}</label></label> <label>{{competence.name}}:</label><label class="flex-grow">{{plusMoins competence.system.niveauReel}}</label></label>
<label>Niveau de base:</label><label class="flex-grow">{{oeuvre.system.base}}</label> <label>Niveau de base:</label><label class="flex-grow">{{oeuvre.system.base}}</label>
</div> </div>
</div> </div>

View File

@ -10,7 +10,7 @@
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/> <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/>
<div class="grid grid-2col"> <div class="grid grid-2col">
<label for="carac">Rêve actuel:</label><label class="flex-grow" name="carac">{{selectedCarac.value}}</label> <label for="carac">Rêve actuel:</label><label class="flex-grow" name="carac">{{selectedCarac.value}}</label>
<label for="draconic">{{competence.name}}:</label><label class="flex-grow" name="draconic">{{numberFormat competence.system.niveau decimals=0 sign=true}}</label> <label for="draconic">{{competence.name}}:</label><label class="flex-grow" name="draconic">{{plusMoins competence.system.niveau}}</label>
</div> </div>
</div> </div>
<div class="flex-group-left"> <div class="flex-group-left">

View File

@ -11,7 +11,7 @@
<label>Durée: 60 minutes</label> <label>Durée: 60 minutes</label>
<hr> <hr>
<label>Intellect / {{competence.name}}: <label>Intellect / {{competence.name}}:
{{numberFormat carac.intellect.value decimals=0 sign=false}} / {{numberFormat competence.system.niveau decimals=0 sign=true}}</label> {{numberFormat carac.intellect.value decimals=0 sign=false}} / {{plusMoins competence.system.niveau}}</label>
</div> </div>
</div> </div>
<div class="flex-group-left"> <div class="flex-group-left">

View File

@ -6,7 +6,7 @@
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" /> <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
<div class="grid grid-2col"> <div class="grid grid-2col">
<label>Caractéristique: </label><label class="flex-grow">{{selectedCarac.label}}</label> <label>Caractéristique: </label><label class="flex-grow">{{selectedCarac.label}}</label>
<label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.system.niveau decimals=0 sign=true}}</label></label> <label>{{competence.name}}:</label><label class="flex-grow">{{plusMoins competence.system.niveau}}</label></label>
</div> </div>
{{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.system}} {{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.system}}
</div> </div>

View File

@ -7,7 +7,7 @@
<div class="grid grid-2col"> <div class="grid grid-2col">
<label>Caractéristique: </label><label class="flex-grow">{{selectedCarac.label}} <label>Caractéristique: </label><label class="flex-grow">{{selectedCarac.label}}
</label> </label>
<label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.system.niveau decimals=0 sign=true}}</label></label> <label>{{competence.name}}:</label><label class="flex-grow">{{plusMoins competence.system.niveau}}</label></label>
</div> </div>
{{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.system}} {{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.system}}
</div> </div>

View File

@ -9,7 +9,7 @@
<label>Caractéristique: </label><label>{{selectedCarac.label}}</label> <label>Caractéristique: </label><label>{{selectedCarac.label}}</label>
</div> </div>
<div class="flexrow"> <div class="flexrow">
<label>{{competence.name}}: </label><label>{{numberFormat competence.system.niveau decimals=0 sign=true}}</label></label> <label>{{competence.name}}: </label><label>{{plusMoins competence.system.niveau}}</label></label>
</div> </div>
<div class="flexrow"> <div class="flexrow">
<label>Exotisme: </label><label>{{oeuvre.system.exotisme}}</label> <label>Exotisme: </label><label>{{oeuvre.system.exotisme}}</label>

View File

@ -5,7 +5,7 @@
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/> <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/>
<div class="grid grid-2col"> <div class="grid grid-2col">
<label for="carac">Rêve actuel:</label><label class="flex-grow" name="carac">{{selectedCarac.value}}</label> <label for="carac">Rêve actuel:</label><label class="flex-grow" name="carac">{{selectedCarac.value}}</label>
<label for="competence">{{competence.name}}:</label><label class="flex-grow" name="competence">{{numberFormat competence.system.niveau decimals=0 sign=true}}</label> <label for="competence">{{competence.name}}:</label><label class="flex-grow" name="competence">{{plusMoins competence.system.niveau}}</label>
</div> </div>
</div> </div>
<div class="flex-group-left"> <div class="flex-group-left">

View File

@ -24,7 +24,7 @@
<select name="competence" class="roll-draconic" data-dtype="String"> <select name="competence" class="roll-draconic" data-dtype="String">
{{#select draconic}} {{#select draconic}}
{{#each draconicList as |draconic key|}} {{#each draconicList as |draconic key|}}
<option value={{key}}>{{draconic.name}} : {{numberFormat draconic.system.niveau decimals=0 sign=true}} <option value={{key}}>{{draconic.name}} : {{plusMoins draconic.system.niveau}}
</option> </option>
{{/each}} {{/each}}
{{/select}} {{/select}}

View File

@ -43,7 +43,7 @@
<select name="competence" class="roll-draconic" data-dtype="String"> <select name="competence" class="roll-draconic" data-dtype="String">
{{#select draconic}} {{#select draconic}}
{{#each draconicList as |draconic key|}} {{#each draconicList as |draconic key|}}
<option value={{key}}>{{draconic.name}} : {{numberFormat draconic.system.niveau decimals=0 sign=true}} <option value={{key}}>{{draconic.name}} : {{plusMoins draconic.system.niveau}}
</option> </option>
{{/each}} {{/each}}
{{/select}} {{/select}}
@ -54,11 +54,11 @@
<select name="diffLibre" class="div-sort-difficulte-var" data-dtype="number"> <select name="diffLibre" class="div-sort-difficulte-var" data-dtype="number">
{{#select diffLibre}} {{#select diffLibre}}
{{#each difficultesLibres as |key|}} {{#each difficultesLibres as |key|}}
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option> <option value={{key}}>{{plusMoins key}}</option>
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>
<label class="div-sort-difficulte-fixe">{{numberFormat selectedSort.system.difficulte decimals=0 sign=true}}</label> <label class="div-sort-difficulte-fixe">{{plusMoins selectedSort.system.difficulte}}</label>
</div> </div>
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffCondition.html"}} {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffCondition.html"}}
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-forcer.html"}} {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-forcer.html"}}

View File

@ -20,22 +20,22 @@
{{/if}} {{/if}}
<hr> <hr>
{{#if encaissement.dmg.total}} {{#if encaissement.dmg.total}}
<div>+dom encaissement: {{numberFormat rollData.dmg.total decimals=0 sign=true}}</div> <div>+dom encaissement: {{plusMoins rollData.dmg.total}}</div>
{{/if}} {{/if}}
{{#if rollData.dmg.dmgArme}} {{#if rollData.dmg.dmgArme}}
<div>+dom arme: {{numberFormat rollData.dmg.dmgArme decimals=0 sign=true}}</div> <div>+dom arme: {{plusMoins rollData.dmg.dmgArme}}</div>
{{/if}} {{/if}}
{{#if rollData.dmg.dmgActor}} {{#if rollData.dmg.dmgActor}}
<div>+dom attaquant: {{numberFormat rollData.dmg.dmgActor decimals=0 sign=true}}</div> <div>+dom attaquant: {{plusMoins rollData.dmg.dmgActor}}</div>
{{/if}} {{/if}}
{{#if rollData.dmg.dmgParticuliere}} {{#if rollData.dmg.dmgParticuliere}}
<div>+dom particulière: {{numberFormat rollData.dmg.dmgParticuliere decimals=0 sign=true}}</div> <div>+dom particulière: {{plusMoins rollData.dmg.dmgParticuliere}}</div>
{{/if}} {{/if}}
{{#if rollData.dmg.dmgTactique}} {{#if rollData.dmg.dmgTactique}}
<div>+dom tactique: {{numberFormat rollData.dmg.dmgTactique decimals=0 sign=true}}</div> <div>+dom tactique: {{plusMoins rollData.dmg.dmgTactique}}</div>
{{/if}} {{/if}}
{{#if rollData.dmg.dmgSurprise}} {{#if rollData.dmg.dmgSurprise}}
<div>+dom surprise: {{numberFormat rollData.dmg.dmgSurprise decimals=0 sign=true}}</div> <div>+dom surprise: {{plusMoins rollData.dmg.dmgSurprise}}</div>
{{/if}} {{/if}}
</div> </div>
</span> </span>

View File

@ -3,7 +3,7 @@
{{!-- Sheet Body --}} {{!-- Sheet Body --}}
<section class="sheet-body"> <section class="sheet-body">
<div class="form-group"> <div class="form-group">
<label for="xp">Caractéristique</label> <label for="system.carac">Caractéristique</label>
<select name="system.carac" data-dtype="String"> <select name="system.carac" data-dtype="String">
{{#select system.carac}} {{#select system.carac}}
{{#each caracList as |carac key|}} {{#each caracList as |carac key|}}
@ -13,7 +13,7 @@
</select> </select>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="xp">Compétence</label> <label for="system.competence">Compétence</label>
<select name="system.competence" data-dtype="String"> <select name="system.competence" data-dtype="String">
{{#select system.competence}} {{#select system.competence}}
<option value="">Sans compétence</option> <option value="">Sans compétence</option>
@ -22,47 +22,47 @@
</select> </select>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="xp">Difficulté</label> <label for="system.difficulte">Difficulté</label>
<input class="attribute-value" type="text" name="system.difficulte" value="{{system.difficulte}}" data-dtype="Number"/> <input class="attribute-value" type="text" name="system.difficulte" value="{{system.difficulte}}" data-dtype="Number"/>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="xp">Périodicité</label> <label for="system.periodicite">Périodicité</label>
<input class="attribute-value" type="text" name="system.periodicite" value="{{system.periodicite}}" data-dtype="String"/> <input class="attribute-value" type="text" name="system.periodicite" value="{{system.periodicite}}" data-dtype="String"/>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="xp">Fatigue</label> <label for="system.fatigue">Fatigue</label>
<input class="attribute-value" type="text" name="system.fatigue" value="{{system.fatigue}}" data-dtype="Number"/> <input class="attribute-value" type="text" name="system.fatigue" value="{{system.fatigue}}" data-dtype="Number"/>
</div> </div>
{{#if options.isGM}} {{#if options.isGM}}
<div class="form-group"> <div class="form-group">
<label for="xp">Cacher les Points de Tâches nécessaires au joueur</label> <label for="system.cacher_points_de_tache">Cacher les Points de Tâches nécessaires au joueur</label>
<input class="attribute-value" type="checkbox" name="system.cacher_points_de_tache" value="{{system.cacher_points_de_tache}}" {{checked system.cacher_points_de_tache}}/> <input class="attribute-value" ²type="checkbox" name="system.cacher_points_de_tache" {{checked system.cacher_points_de_tache}}/>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="xp">Points de tâches nécessaires</label> <label for="system.points_de_tache">Points de tâches nécessaires (MJ)</label>
<input class="attribute-value" type="text" name="system.points_de_tache" value="{{system.points_de_tache}}" data-dtype="Number"/> <input class="attribute-value" type="text" name="system.points_de_tache" value="{{system.points_de_tache}}" data-dtype="Number"/>
</div> </div>
{{else}} {{else}}
<div class="form-group"> <div class="form-group">
<label for="xp">Points de tâches nécessaires</label> {{#if system.cacher_points_de_tache}}
{{#if system.cacher_points_de_tache}} <label for="system.points_de_tache">Points de tâches nécessaires inconnus</label>
<input class="attribute-value" type="text" value="?????" data-dtype="Number" disabled/> {{else}}
{{else}} <label for="system.points_de_tache">Points de tâches nécessaires</label>
<input class="attribute-value" type="text" name="system.points_de_tache" value="{{system.points_de_tache}}" data-dtype="Number"/> <input class="attribute-value" type="text" name="system.points_de_tache" value="{{system.points_de_tache}}" data-dtype="Number"/>
{{/if}} {{/if}}
</div> </div>
{{/if}} {{/if}}
<hr> <hr>
<div class="form-group"> <div class="form-group">
<label for="xp">Points de tâches obtenus</label> <label for="system.points_de_tache_courant">Points de tâches obtenus</label>
<input class="attribute-value" type="text" name="system.points_de_tache_courant" value="{{system.points_de_tache_courant}}" data-dtype="Number"/> <input class="attribute-value" type="text" name="system.points_de_tache_courant" value="{{system.points_de_tache_courant}}" data-dtype="Number"/>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="xp">Nombre de Succès</label> <label for="system.nb_jet_succes">Nombre de Succès</label>
<input class="attribute-value" type="text" name="system.nb_jet_succes" value="{{system.nb_jet_succes}}" data-dtype="Number" {{#if options.isGM}}{{else}}disabled{{/if}}/> <input class="attribute-value" type="text" name="system.nb_jet_succes" value="{{system.nb_jet_succes}}" data-dtype="Number" {{#if options.isGM}}{{else}}disabled{{/if}}/>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="xp">Nombre d'Echecs</label> <label for="system.nb_jet_echec">Nombre d'Echecs</label>
<input class="attribute-value" type="text" name="system.nb_jet_echec" value="{{system.nb_jet_echec}}" data-dtype="Number" {{#if options.isGM}}{{else}}disabled{{/if}}/> <input class="attribute-value" type="text" name="system.nb_jet_echec" value="{{system.nb_jet_echec}}" data-dtype="Number" {{#if options.isGM}}{{else}}disabled{{/if}}/>
</div> </div>

View File

@ -1,7 +1,7 @@
<div class="table-ajustement"> <div class="table-ajustement">
<span class="tooltip tooltip-dotted"> <span class="tooltip tooltip-dotted">
<span>Ajustement Final:</span> <span>Ajustement Final:</span>
<span class="roll-param-resolution">{{selectedCarac.value}} / {{numberFormat finalLevel decimals=0 sign=true}}</span> <span class="roll-param-resolution">{{selectedCarac.value}} / {{plusMoins finalLevel}}</span>
<div class="tooltiptext ttt-ajustements"> <div class="tooltiptext ttt-ajustements">
{{#each ajustements as |item key|}} {{#each ajustements as |item key|}}
{{#if item.used}} {{#if item.used}}
@ -9,7 +9,7 @@
{{#if item.descr}} {{#if item.descr}}
{{{item.descr}}} {{{item.descr}}}
{{else}} {{else}}
{{item.label}}: {{numberFormat item.value decimals=0 sign=true}} {{item.label}}: {{plusMoins item.value}}
{{/if}} {{/if}}
</div> </div>
{{/if}} {{/if}}

View File

@ -2,8 +2,8 @@
<label for="diffConditions">Conditions</label> <label for="diffConditions">Conditions</label>
<select name="diffConditions" data-dtype="number" {{#unless use.conditions}}disabled{{/unless}}> <select name="diffConditions" data-dtype="number" {{#unless use.conditions}}disabled{{/unless}}>
{{#select diffConditions}} {{#select diffConditions}}
{{#each ajustementsConditions as |key|}} {{#each ajustementsConditions as |key|}}
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option> <option value={{key}}>{{plusMoins key}}</option>
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>

View File

@ -1,4 +1,4 @@
<div class="flexrow"> <div class="flexrow">
<label>Difficulté imposée</label> <label>Difficulté imposée</label>
<label>{{numberFormat diffLibre decimals=0 sign=true}}</label> <label>{{plusMoins diffLibre}}</label>
</div> </div>

View File

@ -3,7 +3,7 @@
<select name="diffLibre" data-dtype="number" {{#unless use.libre}}disabled{{/unless}}> <select name="diffLibre" data-dtype="number" {{#unless use.libre}}disabled{{/unless}}>
{{#select diffLibre}} {{#select diffLibre}}
{{#each difficultesLibres as |key|}} {{#each difficultesLibres as |key|}}
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option> <option value={{key}}>{{plusMoins key}}</option>
{{/each}} {{/each}}
{{/select}} {{/select}}
</select> </select>

View File

@ -7,7 +7,7 @@
<th class="table-resolution-level">...</th> <th class="table-resolution-level">...</th>
{{/if}} {{/if}}
{{#each cols as |col|}} {{#each cols as |col|}}
<th class="table-resolution-level">{{numberFormat col decimals=0 sign=true}}</th> <th class="table-resolution-level">{{plusMoins col}}</th>
{{/each}} {{/each}}
</tr> </tr>
{{#each rows as |row|}} {{#each rows as |row|}}

View File

@ -5,7 +5,7 @@
</strong> sur {{rolled.score}}% </strong> sur {{rolled.score}}%
{{#if (and rolled.caracValue rolled.finalLevel)}} {{#if (and rolled.caracValue rolled.finalLevel)}}
({{#if (gt rolled.diviseurSignificative 1)}}1/{{rolled.diviseurSignificative}}{{/if}} ({{#if (gt rolled.diviseurSignificative 1)}}1/{{rolled.diviseurSignificative}}{{/if}}
de {{rolled.caracValue}} à {{numberFormat rolled.finalLevel decimals=0 sign=true}}) de {{rolled.caracValue}} à {{plusMoins rolled.finalLevel}})
{{/if}} {{/if}}
<strong>{{rolled.quality}}</strong> <strong>{{rolled.quality}}</strong>
</p> </p>

View File

@ -43,7 +43,7 @@
{{#each ajustementActeur.ajustements as |ajustement|}} {{#each ajustementActeur.ajustements as |ajustement|}}
<td>{{#if (ne ajustement.ajustement 0)}} <td>{{#if (ne ajustement.ajustement 0)}}
<strong> <strong>
{{numberFormat ajustement.ajustement decimals=0 sign=true}} {{plusMoins ajustement.ajustement}}
</strong> </strong>
{{else}} {{else}}
<div class="dimmed"> <div class="dimmed">