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

View File

@ -269,7 +269,6 @@ export class RdDBaseActorSang extends RdDBaseActorReve {
}
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('.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('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) => {
let actor = this._getEventActor(event);
@ -256,7 +257,7 @@ export class RdDItemSheet extends ItemSheet {
if (this.item.isCompetence()) {
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.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>Fatigue</b>: ${this.system.fatigue}`,
`<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}`]
}
/* -------------------------------------------- */
@ -806,7 +806,7 @@ export class RdDItem extends Item {
`<b>Compétence</b>: ${this.system.competence}`,
`<b>Auteur</b>: ${this.system.auteur}`,
`<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()
]
}

View File

@ -62,8 +62,8 @@ export class RdDTMRDialog extends Dialog {
this.loadCasesSpeciales();
this.allTokens = [];
this.rencontreState = 'aucune';
this.pixiApp = new PIXI.Application({ width: 720, height: 860 });
this.pixiTMR = new PixiTMR(this, this.pixiApp);
this.pixiTMR = new PixiTMR(this);
this.subdialog = undefined
this.callbacksOnAnimate = [];
@ -128,7 +128,7 @@ export class RdDTMRDialog extends Dialog {
/* -------------------------------------------- */
createPixiSprites() {
EffetsDraconiques.carteTmr.createSprite(this.pixiTMR);
this.pixiTMR.setup()
this.updateTokens();
this.forceDemiRevePositionView();
}
@ -139,13 +139,9 @@ export class RdDTMRDialog extends Dialog {
this.demiReve = this._tokenDemiReve();
this._trackToken(this.demiReve);
}
let tokens = this._getTokensCasesTmr()
.concat(this._getTokensRencontres())
.concat(this._getTokensSortsReserve());
for (let t of tokens) {
this._trackToken(t);
}
this._getTokensCasesTmr().forEach(t => this._trackToken(t))
this._getTokensRencontres().forEach(t => this._trackToken(t))
this._getTokensSortsReserve().forEach(t => this._trackToken(t))
}
/* -------------------------------------------- */
@ -204,6 +200,7 @@ export class RdDTMRDialog extends Dialog {
if (this.subdialog) {
return this.forceTMRContinueAction();
}
let oddq = TMRUtility.coordTMRToOddq(this._getActorCoord());
if (move == 'top') oddq.row -= 1;
@ -230,7 +227,8 @@ export class RdDTMRDialog extends Dialog {
document.getElementsByClassName("tmr-row")
.item(0)
.insertCell(0).append(this.pixiApp.view);
.insertCell(0)
.append(this.pixiTMR.view);
if (this.viewOnly) {
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(".lire-signe-draconique"), this.actor.isResonanceSigneDraconique(this._getActorCoord()));
this.html.find('tr.tmr-row *').click((event) => {
this.subdialog?.bringToTop();
});
this.html.find('tr.tmr-row *').click(event => this.subdialog?.bringToTop());
// Roll Sort
this.html.find('.lancer-sort').click((event) => {
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('#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"));
this.html.find('.lancer-sort').click(event => 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('#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
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) {
this.currentRencontre.graphics = []; // Keep track of rectangles to delete it
this.currentRencontre.locList = duplicate(listCoordTMR); // And track of allowed location
for (let coordTMR of listCoordTMR) {
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
}
this.currentRencontre.graphics = listCoordTMR.map(coordTMR => this.pixiTMR.addMarkTMR(coordTMR))
}
/* -------------------------------------------- */
@ -907,15 +887,11 @@ export class RdDTMRDialog extends Dialog {
/* -------------------------------------------- */
nettoyerRencontre() {
if (!this.currentRencontre) return; // Sanity check
if (this.currentRencontre.graphics) {
for (let drawRect of this.currentRencontre.graphics) {
// Suppression des dessins des zones possibles
this.pixiApp.stage.removeChild(drawRect);
}
}
this.currentRencontre = undefined; // Nettoyage de la structure
this.rencontreState = 'aucune'; // Et de l'état
// Suppression des dessins des zones possibles
this.currentRencontre?.graphics?.forEach(graphic => this.pixiTMR.removeGraphic(graphic))
// Nettoyage de la structureet de l'état
this.currentRencontre = undefined;
this.rencontreState = 'aucune';
}
/* -------------------------------------------- */
@ -1106,18 +1082,10 @@ export class RdDTMRDialog extends Dialog {
await this.postRencontre(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) {
const tokensToRemove = this.allTokens.filter(filter);
for (let token of tokensToRemove) {
this.pixiApp.stage.removeChild(token.sprite);
}
this.allTokens.filter(filter).forEach(token => this.pixiTMR.removeToken(token))
}
/* -------------------------------------------- */
@ -1125,7 +1093,9 @@ export class RdDTMRDialog extends Dialog {
if (this.demiReve === token && this.isDemiReveCache()) {
return;
}
this.pixiTMR.setPosition(token.sprite, TMRUtility.coordTMRToOddq(token.coordTMR()));
this.allTokens.push(token);
this.pixiTMR.positionToken(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('isFieldInventaireModifiable', (type, field) => RdDItem.isFieldInventaireModifiable(type, 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));
return loadTemplates(templatePaths);

View File

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

View File

@ -1,3 +1,4 @@
import { TMRUtility } from "../tmr-utility.js";
import { Draconique } from "./draconique.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' }
createSprite(pixiTMR) {
const img = PixiTMR.getImgFromCode(this.code())
const sprite = new PIXI.Sprite(PIXI.utils.TextureCache[img]);
// Setup the position of the TMR
@ -28,10 +28,12 @@ export class CarteTmr extends Draconique {
sprite.anchor.set(0);
sprite.buttonMode = true;
sprite.tmrObject = pixiTMR;
pixiTMR.addTooltip(sprite, (e,s) => this.computeTooltip(e,s));
pixiTMR.pixiApp.stage.addChild(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.
*/
token(pixiTMR, linkData, coordTMR, type = undefined) {
const tooltip = this.tooltip(linkData);
const token = {
sprite: this.createSprite(pixiTMR),
coordTMR: coordTMR
coordTMR: coordTMR,
tooltip: tooltip
};
token[type ?? this.code()] = linkData;
this.linkData = linkData;
if (this.tooltip(linkData)) {
pixiTMR.addTooltip(token.sprite, (e, s) => this.computeTooltip(e, s));
}
return token;
}

View File

@ -1,6 +1,8 @@
import { Misc } from "../misc.js";
import { RdDTMRDialog } from "../rdd-tmr-dialog.js";
import { tmrConstants, tmrTokenZIndex } from "../tmr-constants.js";
import { TMRUtility } from "../tmr-utility.js";
import { EffetsDraconiques } from "./effets-draconiques.js";
export const tooltipStyle = new PIXI.TextStyle({
fontFamily: 'CaslonAntique',
@ -15,11 +17,35 @@ export class PixiTMR {
static textures = []
constructor(tmrObject, pixiApp) {
this.tmrObject = tmrObject;
this.pixiApp = pixiApp ?? tmrObject.pixiApp;
this.pixiApp.stage.sortableChildren = true;
constructor(tmrDialog) {
this.tmrDialog = tmrDialog;
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) => { }) {
@ -46,6 +72,22 @@ export class PixiTMR {
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 = {}) {
let img = PixiTMR.getImgFromCode(code)
const texture = PIXI.utils.TextureCache[img];
@ -67,7 +109,7 @@ export class PixiTMR {
return sprite;
}
circle(name, options = {}) {
circle(code, options = {}) {
let sprite = new PIXI.Graphics();
sprite.beginFill(options.color, options.opacity);
sprite.drawCircle(0, 0, (options.taille ?? 12) / 2);
@ -77,63 +119,76 @@ export class PixiTMR {
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) {
if (!this.viewOnly) {
this.tmrObject.onClickTMR(event)
this.tmrDialog.onClickTMR(event)
}
}
onPointerMove(event, sprite, computeTooltip) {
if (sprite.isOver && sprite.tooltip) {
var { x, y } = TMRUtility.computeEventPosition(event);
const oddq = TMRUtility.computeOddq(x, y);
onPointerMove(event) {
if (this.carteTMR.isOver) {
this.setTooltipPosition(event);
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)
sprite.tooltip.y = y + (oddq.row > 10 ? - tmrConstants.half : tmrConstants.half)
sprite.tooltip.text = computeTooltip(event, sprite);
onHideTooltip(event) {
if (this.carteTMR.isOver) {
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) {
if (sprite.tooltip) {
if (!sprite.isOver) {
sprite.tooltip.x = sprite.x;
sprite.tooltip.y = sprite.y;
this.pixiApp.stage.addChild(sprite.tooltip);
}
sprite.isOver = true;
setTooltipPosition(event) {
var { x, y } = TMRUtility.computeEventPosition(event);
const oddq = TMRUtility.computeOddq(x, y);
this.tooltip.x = x + (oddq.col > 8 ? -3 * tmrConstants.full : tmrConstants.half);
this.tooltip.y = y + (oddq.row > 10 ? -tmrConstants.half : tmrConstants.half);
}
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) {
if (sprite.tooltip) {
if (sprite.isOver) {
this.pixiApp.stage.removeChild(sprite.tooltip);
}
sprite.isOver = false;
removeToken(token) {
if (token.sprite) {
this.pixiApp.stage.removeChild(token.sprite)
}
}
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) {
let decallagePairImpair = (oddq.col % 2 == 0) ? tmrConstants.col1_y : tmrConstants.col2_y;
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{
border-radius: 6px; padding: 3px;
background: var(--gradient-silver-light);
background: var(--gradient-red);
}
.rdd-niveau-requis{

View File

@ -1,8 +1,8 @@
{
"id": "foundryvtt-reve-de-dragon",
"title": "Rêve de Dragon",
"version": "11.1.2",
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-11.1.2.zip",
"version": "11.1.3",
"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",
"changelog": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/branch/v11/changelog.md",
"compatibility": {

View File

@ -12,7 +12,7 @@
<li class="item flexrow">
<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>
</li>
{{/each}}

View File

@ -68,7 +68,7 @@
</li>
<li class="caracteristique flexrow list-item" >
<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 class="caracteristique flexrow list-item" >
<label class="carac-label">Malus armure</label>

View File

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

View File

@ -11,13 +11,13 @@
{{#unless @root.options.vueDetaillee}}disabled{{/unless}}/>
<input class="competence-value creature-niveau" type="text" data-dtype="number"
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}}
/>
<input class="competence-damage creature-dommages" type="text" data-dtype="number"
{{#if comp.isdommages}}
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}}
{{else}}disabled{{/if}}
/>

View File

@ -13,7 +13,7 @@
{{/if}}
<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 @root.options.vueDetaillee}}
@ -42,7 +42,7 @@
<i class="far fa-circle"></i>
{{/if}}
<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}} />
<a class="item-edit" title="Modifier"><i class="fas fa-edit"></i></a>
{{#if @root.options.isGM}}

View File

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

View File

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

View File

@ -20,11 +20,11 @@
{{#if rolled.isSuccess}}
<span><strong>{{show.cible}}</strong> doit se défendre à <strong>{{diffLibre}}</strong>, ou encaisser à
{{~#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')}}
<span class="rdd-roll-echec">{{numberFormat dmg.total decimals=0 sign=true}}</span>
<span class="rdd-roll-echec">{{plusMoins dmg.total}}</span>
{{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 show.isRecul}}Si votre adversaire n'esquive pas, il devra résister à l'impact ou reculer sous le choc!{{/if}}
</span>

View File

@ -10,7 +10,7 @@
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
<hr>
<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>
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-info-appel-au-moral.html"}}
{{~#if show.explications}}

View File

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

View File

@ -5,13 +5,13 @@
{{alias}} {{#if show.title}}{{show.title}}: {{/if}}
{{#if selectedCarac}}{{selectedCarac.label}}
{{#if competence}}{{#unless (eq selectedCarac.label competence.name)}} / {{competence.name}}{{/unless}}{{/if}}
à {{diffLibre}}
à {{plusMoins diffLibre}}
{{/if}}
</h4>
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
<hr>
<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"}}
</div>
{{~#if show.explications}}

View File

@ -3,7 +3,7 @@
<ul>
<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>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>Pluie: {{lowerFirst pluie.description}}</li>
</div>

View File

@ -64,14 +64,17 @@
{{/if}}
{{#if (gt item.system.qualite 0)}}
{{#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}}
vous permettra un jet de moral heureux.</p>
<p>La qualité du plat est telle qu'un jet de Goût réussi vous permettra un jet de moral heureux.</p>
{{/if}}
{{/if}}
{{#if (or (lt item.system.qualite 0) (lt item.system.exotisme 0))}}
<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/>
<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>

View File

@ -19,14 +19,17 @@
{{/if}}
{{#if (gt item.system.qualite 0)}}
{{#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}}
vous permettra un jet de moral heureux.</p>
<p>La qualité du plat est telle qu'un jet de Goût vous permettra un jet de moral heureux.</p>
{{/if}}
{{/if}}
{{#if (or (lt item.system.qualite 0) (lt item.system.exotisme 0))}}
<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/>
<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>

View File

@ -6,7 +6,7 @@
<div class="grid grid-2col">
<label>{{alchimie.tache}}:</label><label class="flex-grow">{{alchimie.texte}}</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 class="flex-group-left">

View File

@ -6,7 +6,7 @@
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
<div class="grid grid-2col">
<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>
{{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.system}}
</div>

View File

@ -6,7 +6,7 @@
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
<div class="grid grid-2col">
<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>
{{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.system}}
</div>

View File

@ -7,7 +7,7 @@
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/>
<div class="grid grid-2col">
<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 class="flex-group-left">

View File

@ -9,7 +9,7 @@
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/>
<div class="grid grid-2col">
<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 class="flex-group-left">

View File

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

View File

@ -7,7 +7,7 @@
<div class="grid grid-2col">
<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>{{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>
</div>
</div>

View File

@ -10,7 +10,7 @@
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/>
<div class="grid grid-2col">
<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 class="flex-group-left">

View File

@ -11,7 +11,7 @@
<label>Durée: 60 minutes</label>
<hr>
<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 class="flex-group-left">

View File

@ -6,7 +6,7 @@
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
<div class="grid grid-2col">
<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>
{{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.system}}
</div>

View File

@ -7,7 +7,7 @@
<div class="grid grid-2col">
<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>
{{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" oeuvre.system}}
</div>

View File

@ -9,7 +9,7 @@
<label>Caractéristique: </label><label>{{selectedCarac.label}}</label>
</div>
<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 class="flexrow">
<label>Exotisme: </label><label>{{oeuvre.system.exotisme}}</label>

View File

@ -5,7 +5,7 @@
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/>
<div class="grid grid-2col">
<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 class="flex-group-left">

View File

@ -24,7 +24,7 @@
<select name="competence" class="roll-draconic" data-dtype="String">
{{#select draconic}}
{{#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>
{{/each}}
{{/select}}

View File

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

View File

@ -20,22 +20,22 @@
{{/if}}
<hr>
{{#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 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 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 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 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 rollData.dmg.dmgSurprise}}
<div>+dom surprise: {{numberFormat rollData.dmg.dmgSurprise decimals=0 sign=true}}</div>
<div>+dom surprise: {{plusMoins rollData.dmg.dmgSurprise}}</div>
{{/if}}
</div>
</span>

View File

@ -3,7 +3,7 @@
{{!-- Sheet Body --}}
<section class="sheet-body">
<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 system.carac}}
{{#each caracList as |carac key|}}
@ -13,7 +13,7 @@
</select>
</div>
<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 system.competence}}
<option value="">Sans compétence</option>
@ -22,47 +22,47 @@
</select>
</div>
<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"/>
</div>
<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"/>
</div>
<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"/>
</div>
{{#if options.isGM}}
<div class="form-group">
<label for="xp">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}}/>
<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" {{checked system.cacher_points_de_tache}}/>
</div>
<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"/>
</div>
{{else}}
<div class="form-group">
<label for="xp">Points de tâches nécessaires</label>
{{#if system.cacher_points_de_tache}}
<input class="attribute-value" type="text" value="?????" data-dtype="Number" disabled/>
{{else}}
<input class="attribute-value" type="text" name="system.points_de_tache" value="{{system.points_de_tache}}" data-dtype="Number"/>
{{/if}}
</div>
<div class="form-group">
{{#if system.cacher_points_de_tache}}
<label for="system.points_de_tache">Points de tâches nécessaires inconnus</label>
{{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"/>
{{/if}}
</div>
{{/if}}
<hr>
<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"/>
</div>
<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}}/>
</div>
<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}}/>
</div>

View File

@ -1,7 +1,7 @@
<div class="table-ajustement">
<span class="tooltip tooltip-dotted">
<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">
{{#each ajustements as |item key|}}
{{#if item.used}}
@ -9,7 +9,7 @@
{{#if item.descr}}
{{{item.descr}}}
{{else}}
{{item.label}}: {{numberFormat item.value decimals=0 sign=true}}
{{item.label}}: {{plusMoins item.value}}
{{/if}}
</div>
{{/if}}

View File

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

View File

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

View File

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

View File

@ -7,7 +7,7 @@
<th class="table-resolution-level">...</th>
{{/if}}
{{#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}}
</tr>
{{#each rows as |row|}}

View File

@ -5,7 +5,7 @@
</strong> sur {{rolled.score}}%
{{#if (and rolled.caracValue rolled.finalLevel)}}
({{#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}}
<strong>{{rolled.quality}}</strong>
</p>

View File

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