Compare commits

...

33 Commits

Author SHA1 Message Date
6de34178b3 Sync version 2023-11-12 00:35:51 +01:00
0c90fba346 Merge pull request 'Préparation 11.1.5' (#680) from VincentVk/foundryvtt-reve-de-dragon:v11 into v11
Reviewed-on: public/foundryvtt-reve-de-dragon#680
2023-11-12 00:35:06 +01:00
f43b7ac651 Préparation Changelog 11.1.5 2023-11-12 00:33:25 +01:00
ac436bbb25 Fix: Recevoir une queue annulait l'insomnie 2023-11-12 00:24:42 +01:00
9093eadb23 Fix: urgence draconique 2023-11-12 00:22:29 +01:00
5821fc611f Fix: case pour trou noir 2023-11-11 22:33:51 +01:00
381242c8d0 Fix: le jet de vie indique la mort
Jusque là, le 20 indiquait la mort, mais ne diminuait pas la vie
en dessous de - SConst

Désormais:
- la vie passe à -SConst - 1 sur 20 au jet de vie
- Le message indique que le personnage est mort si sa vie est
  inférieure à -SConst
- le jet de vie n'est pas fait si le personnage est déjà mort
2023-11-11 21:30:25 +01:00
3ca33e85b7 Fix case pour réserve extensible 2023-11-11 21:30:02 +01:00
01399e922a Suppression de certains warnings 2023-11-11 20:38:16 +01:00
c6afb8d445 Fix demande defense 2023-11-11 20:23:07 +01:00
4d68318d85 Fix release 2023-11-11 09:07:28 +01:00
7811eae728 Merge pull request 'v11.1.3 - Werther de Zloth l'Onirique' (#679) from VincentVk/foundryvtt-reve-de-dragon:v11 into v11
Reviewed-on: public/foundryvtt-reve-de-dragon#679
2023-11-11 09:06:00 +01:00
2e74ccd1fe Fix: tooltip TMR par dessus les autres sprites 2023-11-11 00:52:57 +01:00
f98ece4ffd Version 11.1.3 2023-11-11 00:44:45 +01:00
ed068a8ddd Affichage du facteur significative 2023-11-11 00:44:11 +01:00
c938778267 Fix: afficher "0" au lieu de "+0" 2023-11-11 00:44:08 +01:00
9056514951 Fix: un plat raté est mauvais, pas exotique 2023-11-11 00:33:20 +01:00
1047720c24 Fix: jet d'appréciation sans compétence 2023-11-10 23:23:28 +01:00
43bcf1c336 Fix: afficher/masquer points de tâche 2023-11-10 23:22:45 +01:00
14d4638e56 Fix: error dans les logs si aucune scène active 2023-11-10 19:56:25 +01:00
c761aeceb3 Fix: calcul de l'état général 2023-11-10 19:54:32 +01:00
1759e6d1c3 Fix: tooltips sorts TMRs 2023-11-10 03:39:35 +01:00
ecb47addba Fix changelog 2023-11-10 01:27:52 +01:00
b18f93fbfb Merge pull request 'v11.1.2' (#678) from VincentVk/foundryvtt-reve-de-dragon:v11 into v11
Reviewed-on: public/foundryvtt-reve-de-dragon#678
2023-11-09 17:02:31 +01:00
19bfee7ea5 Release fix 2023-11-09 08:51:39 +01:00
93e44bb982 Version 11.1.2 2023-11-09 00:53:03 +01:00
12df910b3a Macro "Mon Personnage" pour les joueurs 2023-11-09 00:53:03 +01:00
2a3989ac2e Fix: les jets d'encaissement 2023-11-09 00:53:03 +01:00
ab884713f6 Merge pull request 'v11' (#677) from VincentVk/foundryvtt-reve-de-dragon:v11 into v11
Reviewed-on: public/foundryvtt-reve-de-dragon#677
2023-11-06 23:22:18 +01:00
940237852b Version 11.1.1 2023-11-06 23:06:02 +01:00
78ee23da96 Fix: proportions du gibier cuisiné 2023-11-06 23:06:02 +01:00
862a267683 Fix: ouvrir contenants des véhicules/créatures 2023-11-06 23:06:02 +01:00
2373acc295 Fix: afficher les vues détaillées 2023-11-06 23:06:02 +01:00
70 changed files with 455 additions and 402 deletions

View File

@@ -1,4 +1,36 @@
# v11.0 # v11.0
## v11.1.5 - Werther de Zloth l'Onirique
- Fixes:
- la demande de défense ne marchait plus
- la tête réserve extensible crée bien une case de réserve extensible (à modifier)
- le souffle trou noir ajoute bien une case de trou noir
- la queue urgence draconique ne se transforme plus en idée fixe s'il y a des sorts en réserve
- l'ajout d'une nouvelle queue ne supprime plus l'insomnie
- Amélioration des jets de vie
- un 1 sur le jet de vie est une réussite même si le personnage est dans le coma
- le temps avant le prochain jet est calculé et affiché
- un 20 sur le jet de vie signifie la mort immédiate
- si on dépasse le S.Const, le personnage est bien indiqué comme mort
- pas de jets de vie pour les morts
## v11.1.4 - 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
## v11.1.1 - Les fumebols de Werther de Zloth
- Fix: on peut de nouveau afficher les vues détaillées
- Fix: on peut ouvrir les sacs et contenants portés par les véhicules et créatures
- Fix: cuisiner du gibier prend maintenant bien les proportaions en compte
## v11.1.0 - Les choix de Werther de Zloth ## v11.1.0 - Les choix de Werther de Zloth
- Les options suivantes peuvent être désactivées: - Les options suivantes peuvent être désactivées:
- La transformation de stress à Château Dormant - La transformation de stress à Château Dormant

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

View File

@@ -26,15 +26,10 @@ export class RdDActorSheet extends RdDBaseActorReveSheet {
/** @override */ /** @override */
static get defaultOptions() { static get defaultOptions() {
RdDUtility.initAfficheContenu(); return mergeObject(RdDBaseActorReveSheet.defaultOptions, {
return mergeObject(super.defaultOptions, {
classes: ["rdd", "sheet", "actor"],
template: "systems/foundryvtt-reve-de-dragon/templates/actor-sheet.html", template: "systems/foundryvtt-reve-de-dragon/templates/actor-sheet.html",
width: 550, width: 550,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "carac" }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: undefined }],
showCompNiveauBase: false, showCompNiveauBase: false,
vueDetaillee: false,
vueArchetype: false, vueArchetype: false,
}); });
} }
@@ -131,6 +126,13 @@ export class RdDActorSheet extends RdDBaseActorReveSheet {
this.actor.conjurerPossession(poss) this.actor.conjurerPossession(poss)
}) })
this.html.find('.subacteur-label a').click(async event => {
let actorId = RdDSheetUtility.getEventItemData(event, 'actor-id');
let actor = game.actors.get(actorId);
if (actor) {
actor.sheet.render(true);
}
});
this.html.find('.subacteur-delete').click(async event => { this.html.find('.subacteur-delete').click(async event => {
const li = RdDSheetUtility.getEventElement(event); const li = RdDSheetUtility.getEventElement(event);
const actorId = li.data("actor-id"); const actorId = li.data("actor-id");
@@ -169,9 +171,7 @@ export class RdDActorSheet extends RdDBaseActorReveSheet {
this.html.find('.creer-blessure-legere').click(async event => RdDItemBlessure.createBlessure(this.actor, 2)); this.html.find('.creer-blessure-legere').click(async event => RdDItemBlessure.createBlessure(this.actor, 2));
this.html.find('.creer-blessure-grave').click(async event => RdDItemBlessure.createBlessure(this.actor, 4)); this.html.find('.creer-blessure-grave').click(async event => RdDItemBlessure.createBlessure(this.actor, 4));
this.html.find('.creer-blessure-critique').click(async event => RdDItemBlessure.createBlessure(this.actor, 6)); this.html.find('.creer-blessure-critique').click(async event => RdDItemBlessure.createBlessure(this.actor, 6));
this.html.find('.creer-une-oeuvre').click(async event => { this.html.find('.creer-une-oeuvre').click(async event => this.selectTypeOeuvreToCreate());
this.selectTypeOeuvreToCreate();
});
this.html.find('.blessure-premierssoins-done').change(async event => { this.html.find('.blessure-premierssoins-done').change(async event => {
const blessure = this.getBlessure(event); const blessure = this.getBlessure(event);
@@ -232,13 +232,6 @@ export class RdDActorSheet extends RdDBaseActorReveSheet {
this.html.find('.recettecuisine-label a').click(async event => { this.html.find('.recettecuisine-label a').click(async event => {
this.actor.rollRecetteCuisine(RdDSheetUtility.getItemId(event)); this.actor.rollRecetteCuisine(RdDSheetUtility.getItemId(event));
}); });
this.html.find('.subacteur-label a').click(async event => {
let actorId = RdDSheetUtility.getEventItemData(event, 'actor-id');
let actor = game.actors.get(actorId);
if (actor) {
actor.sheet.render(true);
}
});
// Boutons spéciaux MJs // Boutons spéciaux MJs
this.html.find('.forcer-tmr-aleatoire').click(async event => { this.html.find('.forcer-tmr-aleatoire').click(async event => {
@@ -325,11 +318,6 @@ export class RdDActorSheet extends RdDBaseActorReveSheet {
this.render(true); this.render(true);
}); });
this.html.find('.vue-detaillee').click(async event => {
this.options.vueDetaillee = !this.options.vueDetaillee;
this.render(true);
});
// On pts de reve change // On pts de reve change
this.html.find('.pointsreve-value').change(async event => { this.html.find('.pointsreve-value').change(async event => {
let reveValue = event.currentTarget.value; let reveValue = event.currentTarget.value;
@@ -360,7 +348,7 @@ export class RdDActorSheet extends RdDBaseActorReveSheet {
}); });
this.html.find('.jet-vie').click(async event => { this.html.find('.jet-vie').click(async event => {
this.actor.jetVie(); this.actor.jetDeVie();
}); });
this.html.find('.jet-endurance').click(async event => { this.html.find('.jet-endurance').click(async event => {
await this.jetEndurance(); await this.jetEndurance();

View File

@@ -35,15 +35,6 @@ import { ExperienceLog, XP_TOPIC } from "./actor/experience-log.js";
import { TYPES } from "./item.js"; import { TYPES } from "./item.js";
import { RdDBaseActorSang } from "./actor/base-actor-sang.js"; import { RdDBaseActorSang } from "./actor/base-actor-sang.js";
const POSSESSION_SANS_DRACONIC = {
img: 'systems/foundryvtt-reve-de-dragon/icons/entites/possession.webp',
name: 'Sans draconic',
system: {
niveau: 0,
defaut_carac: "reve-actuel",
}
};
export const MAINS_DIRECTRICES = ['Droitier', 'Gaucher', 'Ambidextre'] export const MAINS_DIRECTRICES = ['Droitier', 'Gaucher', 'Ambidextre']
/* -------------------------------------------- */ /* -------------------------------------------- */
@@ -118,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
} }
@@ -332,7 +323,9 @@ export class RdDActor extends RdDBaseActorSang {
} }
async setInfoSommeilInsomnie() { async setInfoSommeilInsomnie() {
await this.update({ 'system.sommeil.insomnie': EffetsDraconiques.isSujetInsomnie(this) }); if (EffetsDraconiques.isSujetInsomnie(this)) {
await this.update({ 'system.sommeil.insomnie': true });
}
} }
async setInfoSommeilMoral(situationMoral) { async setInfoSommeilMoral(situationMoral) {
@@ -542,7 +535,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
@@ -1187,17 +1180,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 = {
@@ -1213,10 +1195,27 @@ export class RdDActor extends RdDBaseActorSang {
new RdDRollDialogEthylisme(html, rollData, this, r => this.saouler(r.forceAlcool)).render(true); new RdDRollDialogEthylisme(html, rollData, this, r => this.saouler(r.forceAlcool)).render(true);
} }
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 }
switch (item.type) {
case TYPES.potion: return await this.consommerPotion(item, onActionItem);
case TYPES.livre: return await this.actionLire(item);
case TYPES.conteneur: return await item.sheet.render(true);
case TYPES.herbe: return await this.actionHerbe(item, onActionItem);
case TYPES.queue: case TYPES.ombre: return await this.actionRefoulement(item);
}
return undefined
}
async actionNourritureboisson(item, onActionItem) { async actionNourritureboisson(item, onActionItem) {
switch (item.getUtilisationCuisine()) { switch (item.getUtilisationCuisine()) {
case 'brut': { case 'brut': {
let d = new Dialog({ const utilisation = new Dialog({
title: "Nourriture brute", title: "Nourriture brute",
content: `Que faire de votre ${item.name}`, content: `Que faire de votre ${item.name}`,
buttons: { buttons: {
@@ -1224,17 +1223,14 @@ export class RdDActor extends RdDBaseActorSang {
'manger': { icon: '<i class="fas fa-check"></i>', label: 'Manger cru', callback: async () => await this.mangerNourriture(item, onActionItem) } 'manger': { icon: '<i class="fas fa-check"></i>', label: 'Manger cru', callback: async () => await this.mangerNourriture(item, onActionItem) }
} }
}); });
d.render(true); return utilisation.render(true);
return true;
} }
case 'pret': case 'pret':
await this.mangerNourriture(item, onActionItem); return await this.mangerNourriture(item, onActionItem);
return true;
} }
return false; return undefined;
} }
async mangerNourriture(item, onActionItem) { async mangerNourriture(item, onActionItem) {
return (await DialogConsommer.create(this, item, onActionItem)).render(true); return (await DialogConsommer.create(this, item, onActionItem)).render(true);
} }
@@ -1309,17 +1305,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');
} }
@@ -1796,20 +1801,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),
@@ -2065,7 +2063,7 @@ export class RdDActor extends RdDBaseActorSang {
type: 'recettecuisine', type: 'recettecuisine',
img: item.img, img: item.img,
system: { system: {
sust: 1, sust: item.system.sust,
exotisme: item.system.exotisme, exotisme: item.system.exotisme,
ingredients: item.name ingredients: item.name
} }
@@ -2074,7 +2072,7 @@ export class RdDActor extends RdDBaseActorSang {
verbe: 'Préparer', verbe: 'Préparer',
compName: 'cuisine', compName: 'cuisine',
proportions: 1, proportions: 1,
proportionsMax: Math.min(50, item.system.sust), proportionsMax: Math.min(50, item.system.quantite),
ajouterEquipement: true ajouterEquipement: true
}; };
await this._rollArt(artData, 'odoratgout', nourriture, async (cuisine) => { await this._rollArt(artData, 'odoratgout', nourriture, async (cuisine) => {

View File

@@ -8,7 +8,14 @@ import { RdDBaseActorSheet } from "./base-actor-sheet.js";
*/ */
export class RdDBaseActorReveSheet extends RdDBaseActorSheet { export class RdDBaseActorReveSheet extends RdDBaseActorSheet {
/* -------------------------------------------- */ /** @override */
static get defaultOptions() {
return mergeObject(RdDBaseActorSheet.defaultOptions, {
width: 550
});
}
/* -------------------------------------------- */
/** @override */ /** @override */
activateListeners(html) { activateListeners(html) {
super.activateListeners(html); super.activateListeners(html);
@@ -16,11 +23,6 @@ export class RdDBaseActorReveSheet extends RdDBaseActorSheet {
// Everything below here is only needed if the sheet is editable // Everything below here is only needed if the sheet is editable
if (!this.options.editable) return; if (!this.options.editable) return;
this.html.find('.item-action').click(async event => {
const item = RdDSheetUtility.getItem(event, this.actor);
item?.actionPrincipale(this.actor, async () => this.render())
});
this.html.find('.encaisser-direct').click(async event => { this.html.find('.encaisser-direct').click(async event => {
this.actor.encaisser(); this.actor.encaisser();
}) })
@@ -51,25 +53,6 @@ export class RdDBaseActorReveSheet extends RdDBaseActorSheet {
} }
}); });
if (this.options.vueDetaillee) {
// On carac change
this.html.find('.carac-value').change(async event => {
let caracName = event.currentTarget.name.replace(".value", "").replace("system.carac.", "");
this.actor.updateCarac(caracName, parseInt(event.target.value));
});
// On competence change
this.html.find('.competence-value').change(async event => {
let compName = event.currentTarget.attributes.compname.value;
//console.log("Competence changed :", compName);
this.actor.updateCompetence(compName, parseInt(event.target.value));
});
}
this.html.find('.vue-detaillee').click(async event => {
this.options.vueDetaillee = !this.options.vueDetaillee;
this.render(true);
});
this.html.find('.endurance-plus').click(async event => { this.html.find('.endurance-plus').click(async event => {
this.actor.santeIncDec("endurance", 1); this.actor.santeIncDec("endurance", 1);
}); });

View File

@@ -17,7 +17,7 @@ import { Targets } from "../targets.js";
import { RdDPossession } from "../rdd-possession.js"; import { RdDPossession } from "../rdd-possession.js";
import { RdDCombat } from "../rdd-combat.js"; import { RdDCombat } from "../rdd-combat.js";
import { RdDConfirm } from "../rdd-confirm.js"; import { RdDConfirm } from "../rdd-confirm.js";
import { ENTITE_INCARNE, SYSTEM_RDD } from "../constants.js"; import { ENTITE_INCARNE, SHOW_DICE, SYSTEM_RDD } from "../constants.js";
import { RdDItemArme } from "../item-arme.js"; import { RdDItemArme } from "../item-arme.js";
const POSSESSION_SANS_DRACONIC = { const POSSESSION_SANS_DRACONIC = {

View File

@@ -60,13 +60,21 @@ export class RdDBaseActorSang extends RdDBaseActorReve {
return this.system.sante.vie.value < -this.getSConst() return this.system.sante.vie.value < -this.getSConst()
} }
nbBlessuresLegeres() {
return this.itemTypes[TYPES.blessure].filter(it => it.isLegere()).length;
}
nbBlessuresGraves() {
return this.itemTypes[TYPES.blessure].filter(it => it.isGrave()).length;
}
nbBlessuresCritiques() {
return this.itemTypes[TYPES.blessure].filter(it => it.isCritique()).length;
}
/* -------------------------------------------- */ /* -------------------------------------------- */
computeResumeBlessure() { computeResumeBlessure() {
const blessures = this.filterItems(it => it.system.gravite > 0, 'blessure') const nbLegeres = this.nbBlessuresLegeres()
const nbGraves = this.nbBlessuresGraves()
const nbLegeres = blessures.filter(it => it.isLegere()).length; const nbCritiques = this.nbBlessuresCritiques()
const nbGraves = blessures.filter(it => it.isGrave()).length;
const nbCritiques = blessures.filter(it => it.isCritique()).length;
if (nbLegeres + nbGraves + nbCritiques == 0) { if (nbLegeres + nbGraves + nbCritiques == 0) {
return "Aucune blessure"; return "Aucune blessure";
@@ -206,26 +214,36 @@ export class RdDBaseActorSang extends RdDBaseActorReve {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
async jetVie() { async jetDeVie() {
let roll = await RdDDice.roll("1d20"); if (this.isDead()) {
let msgText = "Jet de Vie : " + roll.total + " / " + this.system.sante.vie.value + "<br>"; ChatMessage.create({ content: `Jet de Vie: ${this.name} est déjà mort, ce n'est pas la peine d'en rajouter !!!!!`, whisper: ChatMessage.getWhisperRecipients(this.name) });
if (roll.total <= this.system.sante.vie.value) { return
msgText += "Jet réussi, pas de perte de point de vie (prochain jet dans 1 round pour 1 critique, SC minutes pour une grave)";
if (roll.total == 1) {
msgText += "La durée entre 2 jets de vie est multipliée par 20 (20 rounds pour une critique, SCx20 minutes pour une grave)";
}
} else {
msgText += "Jet échoué, vous perdez 1 point de vie";
await this.santeIncDec("vie", -1);
if (roll.total == 20) {
msgText += "Votre personnage est mort !!!!!";
}
} }
const message = { const jetDeVie = await RdDDice.roll("1d20");
content: msgText,
whisper: ChatMessage.getWhisperRecipients(this.name) const sConst = this.getSConst();
}; const vie = this.system.sante.vie.value;
ChatMessage.create(message); const isCritique = this.nbBlessuresCritiques() > 0;
const isGrave = this.nbBlessuresGraves();
const isEchecTotal = jetDeVie.total == 20;
const isSuccess = jetDeVie.total == 1 || jetDeVie.total <= vie;
const perte = isSuccess ? 0 : 1 + (isEchecTotal ? vie + sConst : 0)
const prochainJet = (jetDeVie.total == 1 && vie > 0 ? 20 : 1) * (isCritique ? 1 : isGrave > 0 ? sConst : 0)
let msgText = `Jet de Vie: <strong>${jetDeVie.total} / ${vie}</strong>`
if (isSuccess) {
msgText += "<br>Réussi, pas de perte de point de vie."
} else {
msgText += `<br>Echoué, perte ${perte} point de vie`;
await this.santeIncDec("vie", -perte);
}
if (this.isDead()) {
msgText += `<br><strong>${this.name} est mort !!!!</strong>`;
}
else if (prochainJet > 0) {
msgText += `<br>Prochain jet de vie dans ${prochainJet} ${isCritique ? 'round' : 'minute'}${prochainJet > 1 ? 's' : ''} ${isCritique ? '(état critique)' : '(état grave)'}`
}
ChatMessage.create({ content: msgText, whisper: ChatMessage.getWhisperRecipients(this.name) });
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@@ -238,7 +256,6 @@ export class RdDBaseActorSang extends RdDBaseActorReve {
return { jetEndurance, sonne } return { jetEndurance, sonne }
} }
async finDeRoundBlessures() { async finDeRoundBlessures() {
const nbGraves = this.filterItems(it => it.isGrave(), 'blessure').length; const nbGraves = this.filterItems(it => it.isGrave(), 'blessure').length;
if (nbGraves > 0) { if (nbGraves > 0) {
@@ -269,7 +286,6 @@ export class RdDBaseActorSang extends RdDBaseActorReve {
} }
malusEthylisme() { return 0 } malusEthylisme() { return 0 }
malusFatigue() { return 0 }
} }

View File

@@ -16,13 +16,10 @@ export class RdDBaseActorSheet extends ActorSheet {
/** @override */ /** @override */
static get defaultOptions() { static get defaultOptions() {
RdDUtility.initAfficheContenu(); RdDUtility.initAfficheContenu();
return mergeObject(super.defaultOptions, { return mergeObject(ActorSheet.defaultOptions, {
classes: ["rdd", "sheet", "actor"], classes: ["rdd", "sheet", "actor"],
template: "systems/foundryvtt-reve-de-dragon/templates/actor-sheet.html",
width: 550,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "carac" }], tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "carac" }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: undefined }], dragDrop: [{ dragSelector: ".item-list .item", dropSelector: undefined }],
showCompNiveauBase: false,
vueDetaillee: false vueDetaillee: false
}); });
} }
@@ -135,6 +132,13 @@ export class RdDBaseActorSheet extends ActorSheet {
super.activateListeners(html); super.activateListeners(html);
this.html = html; this.html = html;
if (!this.options.editable) return;
this.html.find('.item-action').click(async event => {
const item = RdDSheetUtility.getItem(event, this.actor);
item?.actionPrincipale(this.actor, async () => this.render())
});
this.html.find('.conteneur-name a').click(async event => { this.html.find('.conteneur-name a').click(async event => {
RdDUtility.toggleAfficheContenu(this.getItemId(event)); RdDUtility.toggleAfficheContenu(this.getItemId(event));
this.render(true); this.render(true);
@@ -167,6 +171,26 @@ export class RdDBaseActorSheet extends ActorSheet {
this.html.find('.nettoyer-conteneurs').click(async event => { this.html.find('.nettoyer-conteneurs').click(async event => {
this.actor.nettoyerConteneurs(); this.actor.nettoyerConteneurs();
}); });
this.html.find('.vue-detaillee').click(async event => {
this.options.vueDetaillee = !this.options.vueDetaillee;
this.render(true);
});
if (this.options.vueDetaillee) {
// On carac change
this.html.find('.carac-value').change(async event => {
let caracName = event.currentTarget.name.replace(".value", "").replace("system.carac.", "");
this.actor.updateCarac(caracName, parseInt(event.target.value));
});
// On competence change
this.html.find('.competence-value').change(async event => {
let compName = event.currentTarget.attributes.compname.value;
//console.log("Competence changed :", compName);
this.actor.updateCompetence(compName, parseInt(event.target.value));
});
}
} }
_rechercherKeyup(event) { _rechercherKeyup(event) {

View File

@@ -2,6 +2,7 @@ import { ChatUtility } from "../chat-utility.js";
import { SYSTEM_SOCKET_ID } from "../constants.js"; import { SYSTEM_SOCKET_ID } from "../constants.js";
import { Grammar } from "../grammar.js"; import { Grammar } from "../grammar.js";
import { Monnaie } from "../item-monnaie.js"; import { Monnaie } from "../item-monnaie.js";
import { TYPES } from "../item.js";
import { Misc } from "../misc.js"; import { Misc } from "../misc.js";
import { RdDAudio } from "../rdd-audio.js"; import { RdDAudio } from "../rdd-audio.js";
import { RdDConfirm } from "../rdd-confirm.js"; import { RdDConfirm } from "../rdd-confirm.js";
@@ -687,4 +688,12 @@ export class RdDBaseActor extends Actor {
async jetEthylisme() { this.actionImpossible("jet d'éthylisme") } async jetEthylisme() { this.actionImpossible("jet d'éthylisme") }
async rollAppelChance() { this.actionImpossible("appel à la chance") } async rollAppelChance() { this.actionImpossible("appel à la chance") }
async jetDeMoral() { this.actionImpossible("jet de moral") } async jetDeMoral() { this.actionImpossible("jet de moral") }
async actionPrincipale(item, onActionItem = async () => { }) {
switch (item.type) {
case TYPES.conteneur: return await item.sheet.render(true);
}
return undefined
}
} }

View File

@@ -12,12 +12,9 @@ export class RdDCommerceSheet extends RdDBaseActorSheet {
/** @override */ /** @override */
static get defaultOptions() { static get defaultOptions() {
return mergeObject(super.defaultOptions, { return mergeObject(super.defaultOptions, {
classes: ["rdd", "sheet", "actor"],
template: "systems/foundryvtt-reve-de-dragon/templates/actor/commerce-actor-sheet.html", template: "systems/foundryvtt-reve-de-dragon/templates/actor/commerce-actor-sheet.html",
width: 600, width: 600, height: 720,
height: 720, tabs: []
tabs: [],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: undefined }]
}); });
} }
get title() { get title() {

View File

@@ -1,20 +1,16 @@
import { RdDActorSheet } from "../actor-sheet.js"; import { RdDBaseActorReveSheet } from "./base-actor-reve-sheet.js";
/** /**
* Extend the basic ActorSheet with some very simple modifications * Extend the basic ActorSheet with some very simple modifications
* @extends {ActorSheet} * @extends {ActorSheet}
*/ */
export class RdDCreatureSheet extends RdDActorSheet { export class RdDCreatureSheet extends RdDBaseActorReveSheet {
/** @override */ /** @override */
static get defaultOptions() { static get defaultOptions() {
return mergeObject(super.defaultOptions, { return mergeObject(RdDBaseActorReveSheet.defaultOptions, {
classes: ["rdd", "sheet", "actor"],
template: "systems/foundryvtt-reve-de-dragon/templates/actor-creature-sheet.html", template: "systems/foundryvtt-reve-de-dragon/templates/actor-creature-sheet.html",
width: 640, width: 640, height: 720
height: 720,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "carac" }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: undefined }]
}); });
} }

View File

@@ -6,15 +6,12 @@ export class RdDActorEntiteSheet extends RdDBaseActorReveSheet {
/** @override */ /** @override */
static get defaultOptions() { static get defaultOptions() {
return mergeObject(super.defaultOptions, { return mergeObject(RdDBaseActorReveSheet.defaultOptions, {
classes: ["rdd", "sheet", "actor"],
template: "systems/foundryvtt-reve-de-dragon/templates/actor-entite-sheet.html", template: "systems/foundryvtt-reve-de-dragon/templates/actor-entite-sheet.html",
width: 640, width: 640, height: 720,
height: 720,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "carac" }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: undefined }]
}); });
} }
async getData() { async getData() {
let formData = await super.getData(); let formData = await super.getData();
formData.resonances = this.actor.system.sante.resonnance.actors.map(actorId => game.actors.get(actorId)) formData.resonances = this.actor.system.sante.resonnance.actors.map(actorId => game.actors.get(actorId))

View File

@@ -8,13 +8,9 @@ export class RdDActorVehiculeSheet extends RdDBaseActorSheet {
static get defaultOptions() { static get defaultOptions() {
RdDUtility.initAfficheContenu(); RdDUtility.initAfficheContenu();
return mergeObject(super.defaultOptions, { return mergeObject(RdDBaseActorSheet.defaultOptions, {
classes: ["rdd", "sheet", "actor"],
template: "systems/foundryvtt-reve-de-dragon/templates/actor-vehicule-sheet.html", template: "systems/foundryvtt-reve-de-dragon/templates/actor-vehicule-sheet.html",
width: 640, width: 640, height: 720,
height: 720,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "carac" }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: undefined }]
}); });
} }

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

@@ -498,11 +498,11 @@ export class RdDItem extends Item {
if (this.actor?.isPersonnage()) { if (this.actor?.isPersonnage()) {
const warn = options.warnIfNot; const warn = options.warnIfNot;
if (this.getUtilisationCuisine() == 'brut') { if (this.getUtilisationCuisine() == 'brut') {
return 'Utiliser'; return 'Cuisiner';
} }
switch (this.type) { switch (this.type) {
case TYPES.nourritureboisson: return this._actionOrWarnQuantiteZero(this.system.boisson ? 'Boire' : 'Manger', warn); case TYPES.nourritureboisson: return this._actionOrWarnQuantiteZero(this.system.boisson ? 'Boire' : 'Manger', warn);
case TYPES.potion: return this._actionOrWarnQuantiteZero('Boire', warn); case TYPES.potion: return this._actionOrWarnQuantiteZero('Consommer', warn);
case TYPES.livre: return this._actionOrWarnQuantiteZero('Lire', warn); case TYPES.livre: return this._actionOrWarnQuantiteZero('Lire', warn);
case TYPES.herbe: return this.isHerbeAPotion() ? this._actionOrWarnQuantiteZero('Décoction', warn) : undefined; case TYPES.herbe: return this.isHerbeAPotion() ? this._actionOrWarnQuantiteZero('Décoction', warn) : undefined;
case TYPES.queue: case TYPES.ombre: return this.system.refoulement > 0 ? 'Refouler' : undefined; case TYPES.queue: case TYPES.ombre: return this.system.refoulement > 0 ? 'Refouler' : undefined;
@@ -513,19 +513,8 @@ export class RdDItem extends Item {
/* -------------------------------------------- */ /* -------------------------------------------- */
async actionPrincipale(actor, onActionItem = async () => { }) { async actionPrincipale(actor, onActionItem = async () => { }) {
if (!this.getActionPrincipale()) { if (!this.getActionPrincipale()) { return }
return; await actor?.actionPrincipale(this, onActionItem);
}
if (await actor.actionNourritureboisson(this, onActionItem)) {
return;
}
switch (this.type) {
case TYPES.potion: return await actor.consommerPotion(this, onActionItem);
case TYPES.livre: return await actor.actionLire(this);
case TYPES.conteneur: return await this.sheet.render(true);
case TYPES.herbe: return await actor.actionHerbe(this, onActionItem);
case TYPES.queue: case TYPES.ombre: return await actor.actionRefoulement(this);
}
} }
_actionOrWarnQuantiteZero(actionName, warn) { _actionOrWarnQuantiteZero(actionName, warn) {
@@ -808,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}`]
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@@ -817,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

@@ -518,7 +518,7 @@ export class RdDCombat {
let token = canvas.tokens.placeables.find(t => t.id == tokenId) let token = canvas.tokens.placeables.find(t => t.id == tokenId)
const actor = token?.actor ?? game.actors.get(actorId); const actor = token?.actor ?? game.actors.get(actorId);
if (actor?.isOwner) { if (actor?.isOwner) {
actor.jetVie(); actor.jetDeVie();
} }
} }

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

@@ -290,6 +290,7 @@ export class RdDUtility {
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,61 +119,74 @@ 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);
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);
} }
} }
onShowTooltip(event, sprite) { onShowTooltip(event) {
if (sprite.tooltip) { if (!this.carteTMR.isOver) {
if (!sprite.isOver) { this.setTooltipPosition(event);
sprite.tooltip.x = sprite.x; this.pixiApp.stage.addChild(this.tooltip);
sprite.tooltip.y = sprite.y; this.tooltip.text = this.computeTooltip(event);
this.pixiApp.stage.addChild(sprite.tooltip); }
} this.carteTMR.isOver = true;
sprite.isOver = true; }
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'))
} }
} }
onHideTooltip(event, sprite) { setTooltipPosition(event) {
if (sprite.tooltip) { var { x, y } = TMRUtility.computeEventPosition(event);
if (sprite.isOver) { const oddq = TMRUtility.computeOddq(x, y);
this.pixiApp.stage.removeChild(sprite.tooltip);
} this.tooltip.x = x + (oddq.col > 8 ? -3 * tmrConstants.full : tmrConstants.half);
sprite.isOver = false; 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;
} }
} }
setPosition(sprite, oddq) { removeToken(token) {
let decallagePairImpair = (oddq.col % 2 == 0) ? tmrConstants.col1_y : tmrConstants.col2_y; if (token.sprite) {
let dx = (sprite.decallage == undefined) ? 0 : sprite.decallage.x; this.pixiApp.stage.removeChild(token.sprite)
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) {

View File

@@ -13,8 +13,8 @@ export class ReserveExtensible extends Draconique {
manualMessage() { return "Vous pouvez re-configurer votre Réserve extensible" } manualMessage() { return "Vous pouvez re-configurer votre Réserve extensible" }
async onActorCreateOwned(actor, tete) { async onActorCreateOwned(actor, tete) {
const existants = actor.items.filter(it => this.isCase(it)).map(it => it.system.coord); const existants = actor.items.filter(it => this.isCase(it)).map(it => it.system.coord);
const tmr = await TMRUtility.getTMRAleatoire(it => !(it.type == 'fleuve' || existants.includes(it.system.coord))); const selectedTMR = await TMRUtility.getTMRAleatoire(tmr => !(tmr.type == 'fleuve' || existants.includes(tmr.coord)));
await this.createCaseTmr(actor, "Nouvelle Réserve extensible", tmr, tete.id); await this.createCaseTmr(actor, "Nouvelle Réserve extensible", selectedTMR, tete.id);
} }
code() { return 'reserve_extensible' } code() { return 'reserve_extensible' }

View File

@@ -14,8 +14,8 @@ export class TrouNoir extends Draconique {
async onActorCreateOwned(actor, souffle) { async onActorCreateOwned(actor, souffle) {
const existants = actor.items.filter(it => this.isCase(it)).map(it => it.system.coord); const existants = actor.items.filter(it => this.isCase(it)).map(it => it.system.coord);
const tmr = await TMRUtility.getTMRAleatoire(it => !(TMRUtility.isCaseHumide(it) || existants.includes(it.system.coord))); const selectedTMR = await TMRUtility.getTMRAleatoire(tmr => !(TMRUtility.isCaseHumide(tmr) || existants.includes(tmr.coord)));
await this.createCaseTmr(actor, 'Trou noir: ' + tmr.label, tmr, souffle.id); await this.createCaseTmr(actor, 'Trou noir: ' + selectedTMR.label, selectedTMR, souffle.id);
} }
code() { return 'trounoir' } code() { return 'trounoir' }

View File

@@ -8,15 +8,11 @@ import { Draconique } from "./draconique.js";
export class UrgenceDraconique extends Draconique { export class UrgenceDraconique extends Draconique {
constructor() {
super();
}
type() { return 'queue' } type() { return 'queue' }
match(item) { return Draconique.isQueueDragon(item) && Grammar.toLowerCaseNoAccent(item.name).includes('urgence draconique'); } match(item) { return Draconique.isQueueDragon(item) && Grammar.toLowerCaseNoAccent(item.name).includes('urgence draconique'); }
manualMessage() { return false } manualMessage() { return false }
async onActorCreateOwned(actor, queue) { async onActorCreateOwned(actor, queue) {
const coordSortsReserve = (actor.system.reve.reserve?.list.map(it => it.coord)) ?? []; const coordSortsReserve = actor.itemTypes[TYPES.sortreserve].map(it => it.system.coord) ?? [];
if (coordSortsReserve.length == 0) { if (coordSortsReserve.length == 0) {
// La queue se transforme en idée fixe // La queue se transforme en idée fixe
const ideeFixe = await RdDRollTables.getIdeeFixe(); const ideeFixe = await RdDRollTables.getIdeeFixe();
@@ -26,7 +22,6 @@ export class UrgenceDraconique extends Draconique {
}); });
await actor.createEmbeddedDocuments('Item', [ideeFixe]); await actor.createEmbeddedDocuments('Item', [ideeFixe]);
await actor.deleteEmbeddedDocuments('Item', [queue.id]); await actor.deleteEmbeddedDocuments('Item', [queue.id]);
return;
} }
else { else {
const demiReve = actor.getDemiReve(); const demiReve = actor.getDemiReve();

File diff suppressed because one or more lines are too long

View File

@@ -1,13 +1,14 @@
{"name":"Jet de moral","type":"script","author":"Hp9ImM4o9YRTSdfu","img":"icons/magic/control/mouth-smile-deception-purple.webp","scope":"global","command":"const selected = game.system.rdd.RdDUtility.getSelectedActor();\nif (!selected) {\n ui.notifications.info('Pas de personnage sélectionné');\n return;\n}\n\nconst dialogMoral = new Dialog({\n title: `Jet de moral`,\n content: `Jet de moral en situation`,\n buttons: {\n malheureuse: { label: `malheureuse`, icon: \"<i class='fa-regular fa-face-frown'></i>\", callback: () => selected.jetDeMoral('malheureuse') },\n neutre: { label: `neutre`, icon: \"<i class='fa-regular fa-face-meh'></i>\", callback: () => selected.jetDeMoral('neutre') },\n heureuse: { label: `heureuse`, icon: \"<i class='fa-regular fa-face-smile'></i>\", callback: () => selected.jetDeMoral('heureuse') }\n },\n});\n\ndialogMoral.render(true)","ownership":{"default":0,"Hp9ImM4o9YRTSdfu":3},"flags":{"core":{"sourceId":"Macro.aJ0QGnXAXT0WiXbk"}},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.3.15","coreVersion":"10.291","createdTime":1671235038906,"modifiedTime":1671236054480,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"2VvH2rmxV33jGjMU"} {"name":"Jet de moral","type":"script","author":"Hp9ImM4o9YRTSdfu","img":"icons/magic/control/mouth-smile-deception-purple.webp","scope":"global","command":"const selected = game.system.rdd.RdDUtility.getSelectedActor();\nif (!selected) {\n ui.notifications.info('Pas de personnage sélectionné');\n return;\n}\n\nconst dialogMoral = new Dialog({\n title: `Jet de moral`,\n content: `Jet de moral en situation`,\n buttons: {\n malheureuse: { label: `malheureuse`, icon: \"<i class='fa-regular fa-face-frown'></i>\", callback: () => selected.jetDeMoral('malheureuse') },\n neutre: { label: `neutre`, icon: \"<i class='fa-regular fa-face-meh'></i>\", callback: () => selected.jetDeMoral('neutre') },\n heureuse: { label: `heureuse`, icon: \"<i class='fa-regular fa-face-smile'></i>\", callback: () => selected.jetDeMoral('heureuse') }\n },\n});\n\ndialogMoral.render(true)","ownership":{"default":0,"Hp9ImM4o9YRTSdfu":3},"flags":{"core":{"sourceId":"Macro.aJ0QGnXAXT0WiXbk"}},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"11.1.0","coreVersion":"10.291","createdTime":1671235038906,"modifiedTime":1671236054480,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"2VvH2rmxV33jGjMU"}
{"name":"Repos","type":"script","scope":"global","author":"Hp9ImM4o9YRTSdfu","img":"icons/svg/sleep.svg","command":"const selected = game.system.rdd.RdDUtility.getSelectedActor();\nif (selected) {\n selected.repos();\n}\nelse {\n ui.notifications.info('Pas de personnage sélectionné');\n}","ownership":{"default":0,"Hp9ImM4o9YRTSdfu":3},"flags":{"core":{"sourceId":"Macro.XHNbjnGKXaCiCadq"}},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.3.15","coreVersion":"10.291","createdTime":1671220038331,"modifiedTime":1671234271278,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"6LRZ8DOVfqotIEsi"} {"name":"Repos","type":"script","scope":"global","author":"Hp9ImM4o9YRTSdfu","img":"icons/svg/sleep.svg","command":"const selected = game.system.rdd.RdDUtility.getSelectedActor();\nif (selected) {\n selected.repos();\n}\nelse {\n ui.notifications.info('Pas de personnage sélectionné');\n}","ownership":{"default":0,"Hp9ImM4o9YRTSdfu":3},"flags":{"core":{"sourceId":"Macro.XHNbjnGKXaCiCadq"}},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"11.1.0","coreVersion":"10.291","createdTime":1671220038331,"modifiedTime":1671234271278,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"6LRZ8DOVfqotIEsi"}
{"name":"Météo marine","type":"chat","author":"Hp9ImM4o9YRTSdfu","img":"icons/magic/air/wind-weather-sailing-ship.webp","scope":"global","command":"/meteo","flags":{"core":{"sourceId":"Macro.EPhCYk7PFMPlIFhS"}},"ownership":{"default":0,"Hp9ImM4o9YRTSdfu":3},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.3.15","coreVersion":"10.291","createdTime":1671237060687,"modifiedTime":1671237060687,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"9mYZfKoi4ZYHydxa"} {"name":"Météo marine","type":"chat","author":"Hp9ImM4o9YRTSdfu","img":"icons/magic/air/wind-weather-sailing-ship.webp","scope":"global","command":"/meteo","flags":{"core":{"sourceId":"Macro.EPhCYk7PFMPlIFhS"}},"ownership":{"default":0,"Hp9ImM4o9YRTSdfu":3},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"11.1.0","coreVersion":"10.291","createdTime":1671237060687,"modifiedTime":1671237060687,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"9mYZfKoi4ZYHydxa"}
{"name":"Chuchoter aux joueurs","type":"script","author":"Hp9ImM4o9YRTSdfu","img":"icons/svg/deaf.svg","scope":"global","command":"/** \n * Provides a dialog to whisper specific players. If you have tokens selected, it will automatically default to try and whisper those players.\n * @Author: Nelson#3570\n */\n\nlet applyChanges = false;\n\nlet users = game.users.filter(user => user.active);\nlet checkOptions = \"\"\nlet playerTokenIds = users.map(u => u.character?.id).filter(id => id !== undefined);\nlet selectedPlayerIds = canvas.tokens.controlled.map(token => {\n if (playerTokenIds.includes(token.actor.id)) return token.actor.id;\n});\n\n// Build checkbox list for all active players\nusers.forEach(user => {\n let checked = !!user.character && selectedPlayerIds.includes(user.character.id) && 'checked';\n checkOptions+=`\n <br>\n <input type=\"checkbox\" name=\"${user.id}\" id=\"${user.id}\" value=\"${user.name}\" ${checked}>\\n\n <label for=\"${user.id}\">${user.name}</label>\n `\n});\n\nnew Dialog({\n title:\"Whisper\",\n content:`Whisper To: ${checkOptions} <br>\n <label for=\"message\">Message:</label>\n <textarea id=\"message\" name=\"message\" rows=\"4\" cols=\"50\"></textarea><br>`,\n buttons:{\n whisper:{ \n label:\"Whisper\",\n callback: (html) => createMessage(html)\n }\n }\n}).render(true);\n\nfunction createMessage(html) {\n var targets = [];\n // build list of selected players ids for whispers target\n for ( let user of users ) {\n if (html.find('[name=\"'+user.id+'\"]')[0].checked){\n applyChanges=true;\n targets.push(user.id);\n }\n var messageText = html.find('[name=\"message\"]')[0].value\n }\nif(!applyChanges)return;\n ChatMessage.create({\n content: messageText,\n whisper: targets\n });\n}","flags":{"core":{"sourceId":"Compendium.foundry_community_macros.community-macros-misc.QTDeg4HOYCAmr4dK"}},"ownership":{"default":2,"Hp9ImM4o9YRTSdfu":3},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.3.15","coreVersion":"10.291","createdTime":1671237211578,"modifiedTime":1671237211578,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"ALAVJEEP3iJosOoi"} {"name":"Chuchoter aux joueurs","type":"script","author":"Hp9ImM4o9YRTSdfu","img":"icons/svg/deaf.svg","scope":"global","command":"/** \n * Provides a dialog to whisper specific players. If you have tokens selected, it will automatically default to try and whisper those players.\n * @Author: Nelson#3570\n */\n\nlet applyChanges = false;\n\nlet users = game.users.filter(user => user.active);\nlet checkOptions = \"\"\nlet playerTokenIds = users.map(u => u.character?.id).filter(id => id !== undefined);\nlet selectedPlayerIds = canvas.tokens.controlled.map(token => {\n if (playerTokenIds.includes(token.actor.id)) return token.actor.id;\n});\n\n// Build checkbox list for all active players\nusers.forEach(user => {\n let checked = !!user.character && selectedPlayerIds.includes(user.character.id) && 'checked';\n checkOptions+=`\n <br>\n <input type=\"checkbox\" name=\"${user.id}\" id=\"${user.id}\" value=\"${user.name}\" ${checked}>\\n\n <label for=\"${user.id}\">${user.name}</label>\n `\n});\n\nnew Dialog({\n title:\"Whisper\",\n content:`Whisper To: ${checkOptions} <br>\n <label for=\"message\">Message:</label>\n <textarea id=\"message\" name=\"message\" rows=\"4\" cols=\"50\"></textarea><br>`,\n buttons:{\n whisper:{ \n label:\"Whisper\",\n callback: (html) => createMessage(html)\n }\n }\n}).render(true);\n\nfunction createMessage(html) {\n var targets = [];\n // build list of selected players ids for whispers target\n for ( let user of users ) {\n if (html.find('[name=\"'+user.id+'\"]')[0].checked){\n applyChanges=true;\n targets.push(user.id);\n }\n var messageText = html.find('[name=\"message\"]')[0].value\n }\nif(!applyChanges)return;\n ChatMessage.create({\n content: messageText,\n whisper: targets\n });\n}","flags":{"core":{"sourceId":"Compendium.foundry_community_macros.community-macros-misc.QTDeg4HOYCAmr4dK"}},"ownership":{"default":2,"Hp9ImM4o9YRTSdfu":3},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"11.1.0","coreVersion":"10.291","createdTime":1671237211578,"modifiedTime":1671237211578,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"ALAVJEEP3iJosOoi"}
{"name":"Terres médianes du rêve","type":"script","scope":"global","author":"Hp9ImM4o9YRTSdfu","img":"systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-normal.svg","command":"const selected = game.system.rdd.RdDUtility.getSelectedActor();\nif (!selected) {\n ui.notifications.info('Pas de personnage sélectionné');\n return;\n}\nif (!selected.isHautRevant()) {\n ui.notifications.info(`Le personnage ${selected.name} n'a pas le don de haut-rêve`);\n return;\n}\n\nconst dialogMoral = new Dialog({\n title: `Monter dans les TMR`,\n content: `Monter dans les TMR`,\n buttons: {\n normale: { label: `normale`, icon: `<img class=\"button-img\" src=\"systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-normal.svg\" alt=\"Montée dans les Terres M&eacute;dianes !\"/>`, callback: () => selected.displayTMR(\"normal\") },\n rapide: { label: `rapide`, icon: `<img class=\"button-img\" src=\"systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-rapide.svg\" alt=\"Montée accélérée dans les Terres M&eacute;dianes !\"/>`, callback: () => selected.displayTMR(\"rapide\") },\n },\n});\n\ndialogMoral.render(true)","ownership":{"default":0,"Hp9ImM4o9YRTSdfu":3},"flags":{"core":{"sourceId":"Macro.zCAQxg2duk0j3s5r"}},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.3.15","coreVersion":"10.291","createdTime":1669250715114,"modifiedTime":1671236057731,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"ERsBfwsodzH6UX4x"} {"name":"Terres médianes du rêve","type":"script","scope":"global","author":"Hp9ImM4o9YRTSdfu","img":"systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-normal.svg","command":"const selected = game.system.rdd.RdDUtility.getSelectedActor();\nif (!selected) {\n ui.notifications.info('Pas de personnage sélectionné');\n return;\n}\nif (!selected.isHautRevant()) {\n ui.notifications.info(`Le personnage ${selected.name} n'a pas le don de haut-rêve`);\n return;\n}\n\nconst dialogMoral = new Dialog({\n title: `Monter dans les TMR`,\n content: `Monter dans les TMR`,\n buttons: {\n normale: { label: `normale`, icon: `<img class=\"button-img\" src=\"systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-normal.svg\" alt=\"Montée dans les Terres M&eacute;dianes !\"/>`, callback: () => selected.displayTMR(\"normal\") },\n rapide: { label: `rapide`, icon: `<img class=\"button-img\" src=\"systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-rapide.svg\" alt=\"Montée accélérée dans les Terres M&eacute;dianes !\"/>`, callback: () => selected.displayTMR(\"rapide\") },\n },\n});\n\ndialogMoral.render(true)","ownership":{"default":0,"Hp9ImM4o9YRTSdfu":3},"flags":{"core":{"sourceId":"Macro.zCAQxg2duk0j3s5r"}},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"11.1.0","coreVersion":"10.291","createdTime":1669250715114,"modifiedTime":1671236057731,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"ERsBfwsodzH6UX4x"}
{"name":"Signe draconique","type":"chat","author":"Hp9ImM4o9YRTSdfu","img":"systems/foundryvtt-reve-de-dragon/icons/tmr/signe_draconique.webp","scope":"global","command":"/signe +","flags":{"core":{"sourceId":"Macro.RmOLbONUNnINcqCO"}},"ownership":{"default":0,"klwAm8zAKxw8YBLf":3,"Hp9ImM4o9YRTSdfu":3},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.3.15","coreVersion":"10.291","createdTime":1671237375774,"modifiedTime":1671237375774,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"MJByzsEdneZ64P56"} {"name":"Signe draconique","type":"chat","author":"Hp9ImM4o9YRTSdfu","img":"systems/foundryvtt-reve-de-dragon/icons/tmr/signe_draconique.webp","scope":"global","command":"/signe +","flags":{"core":{"sourceId":"Macro.RmOLbONUNnINcqCO"}},"ownership":{"default":0,"klwAm8zAKxw8YBLf":3,"Hp9ImM4o9YRTSdfu":3},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"11.1.0","coreVersion":"10.291","createdTime":1671237375774,"modifiedTime":1671237375774,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"MJByzsEdneZ64P56"}
{"name":"Appel à la chance","type":"script","scope":"global","author":"Hp9ImM4o9YRTSdfu","img":"icons/commodities/flowers/clover.webp","command":"const selected = game.system.rdd.RdDUtility.getSelectedActor();\nif (selected) {\n selected.rollAppelChance();\n}\nelse {\n ui.notifications.info('Pas de personnage sélectionné');\n}","ownership":{"default":0,"Hp9ImM4o9YRTSdfu":3},"flags":{"core":{"sourceId":"Macro.XHNbjnGKXaCiCadq"}},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.3.15","coreVersion":"10.291","createdTime":1671220038331,"modifiedTime":1671233849101,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"UzAWljmFq5sY702w"} {"name":"Appel à la chance","type":"script","scope":"global","author":"Hp9ImM4o9YRTSdfu","img":"icons/commodities/flowers/clover.webp","command":"const selected = game.system.rdd.RdDUtility.getSelectedActor();\nif (selected) {\n selected.rollAppelChance();\n}\nelse {\n ui.notifications.info('Pas de personnage sélectionné');\n}","ownership":{"default":0,"Hp9ImM4o9YRTSdfu":3},"flags":{"core":{"sourceId":"Macro.XHNbjnGKXaCiCadq"}},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"11.1.0","coreVersion":"10.291","createdTime":1671220038331,"modifiedTime":1671233849101,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"UzAWljmFq5sY702w"}
{"name":"Encaissement","type":"script","scope":"global","author":"Hp9ImM4o9YRTSdfu","img":"icons/svg/bones.svg","command":"const selected = game.system.rdd.RdDUtility.getSelectedActor();\nif (selected) {\n selected.encaisser();\n}\nelse {\n ui.notifications.info('Pas de personnage sélectionné');\n}","ownership":{"default":0,"Hp9ImM4o9YRTSdfu":3},"flags":{"core":{"sourceId":"Macro.XHNbjnGKXaCiCadq"}},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.3.15","coreVersion":"10.291","createdTime":1671220038331,"modifiedTime":1671234017623,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"WD6T8AdRbX2Ylxqe"} {"name":"Encaissement","type":"script","scope":"global","author":"Hp9ImM4o9YRTSdfu","img":"icons/svg/bones.svg","command":"const selected = game.system.rdd.RdDUtility.getSelectedActor();\nif (selected) {\n selected.encaisser();\n}\nelse {\n ui.notifications.info('Pas de personnage sélectionné');\n}","ownership":{"default":0,"Hp9ImM4o9YRTSdfu":3},"flags":{"core":{"sourceId":"Macro.XHNbjnGKXaCiCadq"}},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"11.1.0","coreVersion":"10.291","createdTime":1671220038331,"modifiedTime":1671234017623,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"WD6T8AdRbX2Ylxqe"}
{"name":"Jet quelconque","type":"script","scope":"global","author":"Hp9ImM4o9YRTSdfu","img":"icons/sundries/gaming/dice-runed-tan.webp","command":"const selected = game.system.rdd.RdDUtility.getSelectedActor();\nif (selected) {\n selected.roll();\n}\nelse {\n ui.notifications.info('Pas de personnage sélectionné');\n}","ownership":{"default":0,"Hp9ImM4o9YRTSdfu":3},"flags":{"core":{"sourceId":"Macro.XHNbjnGKXaCiCadq"}},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.3.15","coreVersion":"10.291","createdTime":1671220038331,"modifiedTime":1671233500655,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"bnJnbKDHpbqY8Pr9"} {"name":"Jet quelconque","type":"script","scope":"global","author":"Hp9ImM4o9YRTSdfu","img":"icons/sundries/gaming/dice-runed-tan.webp","command":"const selected = game.system.rdd.RdDUtility.getSelectedActor();\nif (selected) {\n selected.roll();\n}\nelse {\n ui.notifications.info('Pas de personnage sélectionné');\n}","ownership":{"default":0,"Hp9ImM4o9YRTSdfu":3},"flags":{"core":{"sourceId":"Macro.XHNbjnGKXaCiCadq"}},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"11.1.0","coreVersion":"10.291","createdTime":1671220038331,"modifiedTime":1671233500655,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"bnJnbKDHpbqY8Pr9"}
{"name":"Recherche et tirage","type":"script","scope":"global","author":"Hp9ImM4o9YRTSdfu","img":"icons/tools/scribal/magnifying-glass.webp","command":"game.system.rdd.commands.tirage()","ownership":{"default":0,"Hp9ImM4o9YRTSdfu":3},"flags":{"core":{"sourceId":"Macro.ZFWPNdQBjQs9z0YW"}},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.5.4","coreVersion":"10.291","createdTime":1673472449426,"modifiedTime":1673655461651,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"iVZnxOxhCMpkvYh3"} {"name":"Recherche et tirage","type":"script","scope":"global","author":"Hp9ImM4o9YRTSdfu","img":"icons/tools/scribal/magnifying-glass.webp","command":"game.system.rdd.commands.tirage()","ownership":{"default":0,"Hp9ImM4o9YRTSdfu":3},"flags":{"core":{"sourceId":"Macro.ZFWPNdQBjQs9z0YW"}},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.5.4","coreVersion":"10.291","createdTime":1673472449426,"modifiedTime":1673655461651,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"iVZnxOxhCMpkvYh3"}
{"name":"Thème astral","type":"script","scope":"global","author":"Hp9ImM4o9YRTSdfu","img":"icons/magic/nature/symbol-moon-stars-white.webp","command":"game.system.rdd.AppAstrologie.create()","ownership":{"default":0,"Hp9ImM4o9YRTSdfu":3},"flags":{"core":{"sourceId":"Macro.oA0HPFeFK6YMspAX"}},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.6.19","coreVersion":"10.291","createdTime":1678127868791,"modifiedTime":1678237392810,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"koqhiDJSGP4gQ4vf"} {"name":"Thème astral","type":"script","scope":"global","author":"Hp9ImM4o9YRTSdfu","img":"icons/magic/nature/symbol-moon-stars-white.webp","command":"game.system.rdd.AppAstrologie.create()","ownership":{"default":0,"Hp9ImM4o9YRTSdfu":3},"flags":{"core":{"sourceId":"Macro.oA0HPFeFK6YMspAX"}},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.6.19","coreVersion":"10.291","createdTime":1678127868791,"modifiedTime":1678237392810,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"koqhiDJSGP4gQ4vf"}
{"name":"Jet d'éthylisme","type":"script","scope":"global","author":"Hp9ImM4o9YRTSdfu","img":"icons/consumables/drinks/alcohol-beer-stein-wooden-metal-brown.webp","command":"const selected = game.system.rdd.RdDUtility.getSelectedActor();\nif (selected) {\n selected.jetEthylisme();\n}\nelse {\n ui.notifications.info('Pas de personnage sélectionné');\n}","ownership":{"default":0,"Hp9ImM4o9YRTSdfu":3},"flags":{"core":{"sourceId":"Macro.XHNbjnGKXaCiCadq"}},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.3.15","coreVersion":"10.291","createdTime":1671220038331,"modifiedTime":1671233646086,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"mvub1dRHNFmWjRr7"} {"name":"Jet d'éthylisme","type":"script","scope":"global","author":"Hp9ImM4o9YRTSdfu","img":"icons/consumables/drinks/alcohol-beer-stein-wooden-metal-brown.webp","command":"const selected = game.system.rdd.RdDUtility.getSelectedActor();\nif (selected) {\n selected.jetEthylisme();\n}\nelse {\n ui.notifications.info('Pas de personnage sélectionné');\n}","ownership":{"default":0,"Hp9ImM4o9YRTSdfu":3},"flags":{"core":{"sourceId":"Macro.XHNbjnGKXaCiCadq"}},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"11.1.0","coreVersion":"10.291","createdTime":1671220038331,"modifiedTime":1671233646086,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"mvub1dRHNFmWjRr7"}
{"name":"Tirer le tarot","type":"chat","scope":"global","author":"Hp9ImM4o9YRTSdfu","img":"systems/foundryvtt-reve-de-dragon/icons/tarots/dos-tarot.webp","command":"/tirer tarot","ownership":{"default":0,"Hp9ImM4o9YRTSdfu":3},"flags":{"core":{"sourceId":"Macro.HBZSKR9OHCQbLcTC"}},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"10.3.15","coreVersion":"10.291","createdTime":1669469547231,"modifiedTime":1671237401618,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"vTfJTFYYiRu8X5LM"} {"name":"Tirer le tarot","type":"chat","scope":"global","author":"Hp9ImM4o9YRTSdfu","img":"systems/foundryvtt-reve-de-dragon/icons/tarots/dos-tarot.webp","command":"/tirer tarot","ownership":{"default":0,"Hp9ImM4o9YRTSdfu":3},"flags":{"core":{"sourceId":"Macro.HBZSKR9OHCQbLcTC"}},"_stats":{"systemId":"foundryvtt-reve-de-dragon","systemVersion":"11.1.0","coreVersion":"10.291","createdTime":1669469547231,"modifiedTime":1671237401618,"lastModifiedBy":"Hp9ImM4o9YRTSdfu"},"folder":null,"sort":0,"_id":"vTfJTFYYiRu8X5LM"}
{"name": "Mon personnage","type": "script","author": "Hp9ImM4o9YRTSdfu","img": "systems/foundryvtt-reve-de-dragon/icons/voyageurs/token_hr_dilettante.webp","scope": "global","command": "if (game.user.isGM) {\n ui.notifications.warn(\"En tant que gardien, vous n'avez pas de personnage attitré\")\n return\n}\nconst actor = game.users.get(game.userId)?.character\nif (!actor) {\n ui.notifications.warn(\"Vous n'avez pas de personnage attitré\")\n return\n}\nactor.sheet.render(true)","folder": null,"flags": {"core": {},"exportSource": {"world": "graine","system": "foundryvtt-reve-de-dragon","coreVersion": "11.313","systemVersion": "11.1.1"}},"_stats": {"systemId": "foundryvtt-reve-de-dragon","systemVersion": "11.1.1","coreVersion": "11.313","createdTime": 1699477824379,"modifiedTime": 1699485023429,"lastModifiedBy": "Hp9ImM4o9YRTSdfu"}}

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.0", "version": "11.1.5",
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-11.1.0.zip", "download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-11.1.5.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

@@ -2,11 +2,11 @@
{{#if effects}} {{#if effects}}
{{#each effects as |effect key|}} {{#each effects as |effect key|}}
<span class="active-effect" data-effect="{{effect.flags.core.statusId}}"> <span class="active-effect" data-effect="{{effect.flags.core.statusId}}">
<img class="button-effect-img {{#if @root.options.isGM}}delete-active-effect{{/if}}" src="{{effect.icon}}" alt="{{localize effect.label}}" width="24" height="24" /> <img class="button-effect-img {{#if @root.options.isGM}}delete-active-effect{{/if}}" src="{{effect.icon}}" alt="{{localize effect.name}}" width="24" height="24" />
</span> </span>
{{/each}} {{/each}}
{{#if calc.surprise}}<span>{{calc.surprise}}!</span>{{/if}} {{#if calc.surprise}}<span>{{calc.surprise}}!</span>{{/if}}
{{else}} {{else}}
Aucun effet actif Aucun effet actif
{{/if}} {{/if}}
</div> </div>

View File

@@ -63,11 +63,10 @@
{{/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}}
{{~/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

@@ -7,8 +7,8 @@
{{else}} {{else}}
<input class="resource-content select-effect" type="checkbox" name="{{effect.id}}" {{#if effect.active}}checked{{/if}}/> <input class="resource-content select-effect" type="checkbox" name="{{effect.id}}" {{#if effect.active}}checked{{/if}}/>
{{/if}} {{/if}}
<img class="button-effect-img" height="16" width="16" src="{{effect.icon}}" alt="{{localize effect.label}}" /> <img class="button-effect-img" height="16" width="16" src="{{effect.icon}}" alt="{{localize effect.name}}" />
<label>{{localize effect.label}}</label> <label>{{localize effect.name}}</label>
</li> </li>
{{/each}} {{/each}}
</ul> </ul>

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">