Cleanup & Reformatage

This commit is contained in:
Vincent Vandemeulebrouck 2022-11-05 18:06:30 +01:00
parent d183ce505a
commit e198cb60b1
21 changed files with 1111 additions and 1175 deletions

View File

@ -1,14 +1,9 @@
import { RdDActorSheet } from "./actor-sheet.js";
/**
* Extend the basic ActorSheet with some very simple modifications
* @extends {ActorSheet}
*/
import { RdDUtility } from "./rdd-utility.js";
import { RdDActorSheet } from "./actor-sheet.js";
import { RdDCarac } from "./rdd-carac.js";
/* -------------------------------------------- */
export class RdDActorCreatureSheet extends RdDActorSheet {
/** @override */
@ -19,7 +14,7 @@ export class RdDActorCreatureSheet extends RdDActorSheet {
width: 640,
height: 720,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "carac" }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }]
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: undefined }]
});
}

View File

@ -1,6 +1,4 @@
import { RdDActorSheet } from "./actor-sheet.js";
import { HtmlUtility } from "./html-utility.js";
import { RdDUtility } from "./rdd-utility.js";
export class RdDActorEntiteSheet extends RdDActorSheet {
@ -12,7 +10,7 @@ export class RdDActorEntiteSheet extends RdDActorSheet {
width: 640,
height: 720,
tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "carac"}],
dragDrop: [{dragSelector: ".item-list .item", dropSelector: null}]
dragDrop: [{dragSelector: ".item-list .item", dropSelector: undefined}]
});
}

View File

@ -1,8 +1,3 @@
/**
* Extend the basic ActorSheet with some very simple modifications
* @extends {ActorSheet}
*/
import { RdDUtility } from "./rdd-utility.js";
import { HtmlUtility } from "./html-utility.js";
import { RdDItemArme } from "./item-arme.js";
@ -18,6 +13,10 @@ import { RdDSheetUtility } from "./rdd-sheet-utility.js";
import { STATUSES } from "./status-effects.js";
/* -------------------------------------------- */
/**
* Extend the basic ActorSheet with some very simple modifications
* @extends {ActorSheet}
*/
export class RdDActorSheet extends ActorSheet {
/** @override */
@ -28,7 +27,7 @@ export class RdDActorSheet extends ActorSheet {
template: "systems/foundryvtt-reve-de-dragon/templates/actor-sheet.html",
width: 640,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "carac" }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: undefined }],
showCompNiveauBase: false,
vueDetaillee: false
});

View File

@ -1,5 +1,4 @@
import { RdDUtility } from "./rdd-utility.js";
import { RdDSheetUtility } from "./rdd-sheet-utility.js";
import { RdDActorSheet } from "./actor-sheet.js";
/* -------------------------------------------- */
@ -15,7 +14,7 @@ export class RdDActorVehiculeSheet extends RdDActorSheet {
width: 640,
height: 720,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "carac" }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }]
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: undefined }]
});
}

View File

@ -56,6 +56,7 @@ export class RdDActor extends Actor {
/* -------------------------------------------- */
static init() {
Hooks.on("preUpdateItem", (item, change, options, id) => RdDActor.getParentActor(item)?.onPreUpdateItem(item, change, options, id));
// TODO: replace with pre-hooks?
Hooks.on("createItem", (item, options, id) => RdDActor.getParentActor(item)?.onCreateItem(item, options, id));
Hooks.on("deleteItem", (item, options, id) => RdDActor.getParentActor(item)?.onDeleteItem(item, options, id));
Hooks.on("updateActor", (actor, change, options, actorId) => actor.onUpdateActor(change, options, actorId));

View File

@ -6,7 +6,7 @@ const LATEST_USED_JOURNAL_ID = "chronologie-dernier-journal";
export class DialogChronologie extends Dialog {
static onInit() {
static init() {
game.settings.register(SYSTEM_RDD, LATEST_USED_JOURNAL_ID, {
name: "Dernier article de journal utilisé pour enregistrer la chronologie",
scope: "client",

View File

@ -4,7 +4,6 @@ import { RdDAlchimie } from "./rdd-alchimie.js";
import { RdDItemCompetence } from "./item-competence.js";
import { RdDHerbes } from "./rdd-herbes.js";
import { RdDGemme } from "./rdd-gemme.js";
import { Misc } from "./misc.js";
import { HtmlUtility } from "./html-utility.js";
import { ReglesOptionelles } from "./regles-optionelles.js";
import { SYSTEM_RDD } from "./constants.js";
@ -67,8 +66,6 @@ export class RdDItemSheet extends ItemSheet {
img: this.item.img,
name: this.item.name,
system: this.item.system,
// TODO: v10 remove
data: this.item.system,
isGM: game.user.isGM,
actorId: this.actor?.id,
owner: this.item.isOwner,

View File

@ -301,8 +301,7 @@ export class RdDItem extends Item {
async postItem(modeOverride) {
console.log(this);
let chatData = duplicate(this);
const properties = this.getProprietes();
chatData["properties"] = properties
chatData["properties"] = this.getProprietes();
if (this.actor) {
chatData.actor = { id: this.actor.id };
}
@ -325,254 +324,204 @@ export class RdDItem extends Item {
/* -------------------------------------------- */
_objetChatData() {
const tplData = this.system
let properties = [].concat(
RdDItem.propertyIfDefined('Résistance', tplData.resistance, tplData.resistance),
RdDItem.propertyIfDefined('Qualité', tplData.qualite, tplData.qualite),
RdDItem.propertyIfDefined('Encombrement', tplData.encombrement),
return [].concat(
RdDItem.propertyIfDefined('Résistance', this.system.resistance, this.system.resistance),
RdDItem.propertyIfDefined('Qualité', this.system.qualite, this.system.qualite),
RdDItem.propertyIfDefined('Encombrement', this.system.encombrement),
);
return properties;
}
/* -------------------------------------------- */
_nourritureboissonChatData() {
const tplData = this.system
let properties = [].concat(
RdDItem.propertyIfDefined('Sustentation', tplData.sust, tplData.sust > 0),
RdDItem.propertyIfDefined('Désaltère', tplData.desaltere, tplData.boisson),
RdDItem.propertyIfDefined('Force alcool', tplData.force, tplData.boisson && tplData.alcoolise),
RdDItem.propertyIfDefined('Exotisme', tplData.exotisme, tplData.exotisme < 0),
RdDItem.propertyIfDefined('Qualité', tplData.qualite, tplData.qualite),
RdDItem.propertyIfDefined('Encombrement', tplData.encombrement),
return [].concat(
RdDItem.propertyIfDefined('Sustentation', this.system.sust, this.system.sust > 0),
RdDItem.propertyIfDefined('Désaltère', this.system.desaltere, this.system.boisson),
RdDItem.propertyIfDefined('Force alcool', this.system.force, this.system.boisson && this.system.alcoolise),
RdDItem.propertyIfDefined('Exotisme', this.system.exotisme, this.system.exotisme < 0),
RdDItem.propertyIfDefined('Qualité', this.system.qualite, this.system.qualite),
RdDItem.propertyIfDefined('Encombrement', this.system.encombrement),
);
return properties;
}
/* -------------------------------------------- */
_armeChatData() {
const tplData = this.system
let properties = [
`<b>Compétence</b>: ${tplData.competence}`,
`<b>Dommages</b>: ${tplData.dommages}`,
`<b>Force minimum</b>: ${tplData.force}`,
`<b>Resistance</b>: ${tplData.resistance}`,
`<b>Encombrement</b>: ${tplData.encombrement}`
return [
`<b>Compétence</b>: ${this.system.competence}`,
`<b>Dommages</b>: ${this.system.dommages}`,
`<b>Force minimum</b>: ${this.system.force}`,
`<b>Resistance</b>: ${this.system.resistance}`,
`<b>Encombrement</b>: ${this.system.encombrement}`
]
return properties;
}
/* -------------------------------------------- */
_conteneurChatData() {
const tplData = this.system
let properties = [
`<b>Capacité</b>: ${tplData.capacite} Enc.`,
`<b>Encombrement</b>: ${tplData.encombrement}`
return [
`<b>Capacité</b>: ${this.system.capacite} Enc.`,
`<b>Encombrement</b>: ${this.system.encombrement}`
]
return properties;
}
/* -------------------------------------------- */
_munitionChatData() {
const tplData = this.system
let properties = [
`<b>Encombrement</b>: ${tplData.encombrement}`
return [
`<b>Encombrement</b>: ${this.system.encombrement}`
]
return properties;
}
/* -------------------------------------------- */
_armureChatData() {
const tplData = this.system
let properties = [
`<b>Protection</b>: ${tplData.protection}`,
`<b>Détérioration</b>: ${tplData.deterioration}`,
`<b>Malus armure</b>: ${tplData.malus}`,
`<b>Encombrement</b>: ${tplData.encombrement}`
return [
`<b>Protection</b>: ${this.system.protection}`,
`<b>Détérioration</b>: ${this.system.deterioration}`,
`<b>Malus armure</b>: ${this.system.malus}`,
`<b>Encombrement</b>: ${this.system.encombrement}`
]
return properties;
}
/* -------------------------------------------- */
_competenceChatData() {
const tplData = this.system
let properties = [
`<b>Catégorie</b>: ${tplData.categorie}`,
`<b>Niveau</b>: ${tplData.niveau}`,
`<b>Caractéristique par défaut</b>: ${tplData.carac_defaut}`,
`<b>XP</b>: ${tplData.xp}`
return [
`<b>Catégorie</b>: ${this.system.categorie}`,
`<b>Niveau</b>: ${this.system.niveau}`,
`<b>Caractéristique par défaut</b>: ${this.system.carac_defaut}`,
`<b>XP</b>: ${this.system.xp}`
]
return properties;
}
/* -------------------------------------------- */
_competencecreatureChatData() {
const tplData = this.system
let properties = [
`<b>Catégorie</b>: ${tplData.categorie}`,
`<b>Niveau</b>: ${tplData.niveau}`,
`<b>Caractéristique</b>: ${tplData.carac_value}`,
`<b>XP</b>: ${tplData.xp}`
return [
`<b>Catégorie</b>: ${this.system.categorie}`,
`<b>Niveau</b>: ${this.system.niveau}`,
`<b>Caractéristique</b>: ${this.system.carac_value}`,
`<b>XP</b>: ${this.system.xp}`
]
return properties;
}
/* -------------------------------------------- */
_sortChatData() {
const tplData = this.system
let properties = [
`<b>Draconic</b>: ${tplData.draconic}`,
`<b>Difficulté</b>: ${tplData.difficulte}`,
`<b>Case TMR</b>: ${tplData.caseTMR}`,
`<b>Points de Rêve</b>: ${tplData.ptreve}`
return [
`<b>Draconic</b>: ${this.system.draconic}`,
`<b>Difficulté</b>: ${this.system.difficulte}`,
`<b>Case TMR</b>: ${this.system.caseTMR}`,
`<b>Points de Rêve</b>: ${this.system.ptreve}`
]
return properties;
}
/* -------------------------------------------- */
_herbeChatData() {
const tplData = this.system
let properties = [
`<b>Milieu</b>: ${tplData.milieu}`,
`<b>Rareté</b>: ${tplData.rarete}`,
`<b>Catégorie</b>: ${tplData.categorie}`,
return [
`<b>Milieu</b>: ${this.system.milieu}`,
`<b>Rareté</b>: ${this.system.rarete}`,
`<b>Catégorie</b>: ${this.system.categorie}`,
]
return properties;
}
/* -------------------------------------------- */
_ingredientChatData() {
const tplData = this.system
let properties = [
`<b>Milieu</b>: ${tplData.milieu}`,
`<b>Rareté</b>: ${tplData.rarete}`,
`<b>Catégorie</b>: ${tplData.categorie}`,
return [
`<b>Milieu</b>: ${this.system.milieu}`,
`<b>Rareté</b>: ${this.system.rarete}`,
`<b>Catégorie</b>: ${this.system.categorie}`,
]
return properties;
}
/* -------------------------------------------- */
_tacheChatData() {
const tplData = this.system
let properties = [
`<b>Caractéristique</b>: ${tplData.carac}`,
`<b>Compétence</b>: ${tplData.competence}`,
`<b>Périodicité</b>: ${tplData.periodicite}`,
`<b>Fatigue</b>: ${tplData.fatigue}`,
`<b>Difficulté</b>: ${tplData.difficulte}`
return [
`<b>Caractéristique</b>: ${this.system.carac}`,
`<b>Compétence</b>: ${this.system.competence}`,
`<b>Périodicité</b>: ${this.system.periodicite}`,
`<b>Fatigue</b>: ${this.system.fatigue}`,
`<b>Difficulté</b>: ${this.system.difficulte}`
].concat([
tplData.cacher_points_de_tache ? [] :`<b>Points de Tâche</b>: ${tplData.points_de_tache}`
this.system.cacher_points_de_tache ? [] :`<b>Points de Tâche</b>: ${this.system.points_de_tache}`
]).concat([
`<b>Points de Tâche atteints</b>: ${tplData.points_de_tache_courant}`]
`<b>Points de Tâche atteints</b>: ${this.system.points_de_tache_courant}`]
);
return properties;
}
/* -------------------------------------------- */
_livreChatData() {
const tplData = this.system
let properties = [
`<b>Compétence</b>: ${tplData.competence}`,
`<b>Auteur</b>: ${tplData.auteur}`,
`<b>Difficulté</b>: ${tplData.difficulte}`,
`<b>Points de Tâche</b>: ${tplData.points_de_tache}`,
`<b>Encombrement</b>: ${tplData.encombrement}`
return [
`<b>Compétence</b>: ${this.system.competence}`,
`<b>Auteur</b>: ${this.system.auteur}`,
`<b>Difficulté</b>: ${this.system.difficulte}`,
`<b>Points de Tâche</b>: ${this.system.points_de_tache}`,
`<b>Encombrement</b>: ${this.system.encombrement}`
]
return properties;
}
/* -------------------------------------------- */
_potionChatData() {
const tplData = this.system
let properties = [
`<b>Rareté</b>: ${tplData.rarete}`,
`<b>Catégorie</b>: ${tplData.categorie}`,
`<b>Encombrement</b>: ${tplData.encombrement}`,
return [
`<b>Rareté</b>: ${this.system.rarete}`,
`<b>Catégorie</b>: ${this.system.categorie}`,
`<b>Encombrement</b>: ${this.system.encombrement}`,
]
return properties;
}
/* -------------------------------------------- */
_queueChatData() {
const tplData = this.system
let properties = [
`<b>Refoulement</b>: ${tplData.refoulement}`
return [
`<b>Refoulement</b>: ${this.system.refoulement}`
]
return properties;
}
/* -------------------------------------------- */
_ombreChatData() {
const tplData = this.system
let properties = [
`<b>Refoulement</b>: ${tplData.refoulement}`
return [
`<b>Refoulement</b>: ${this.system.refoulement}`
]
return properties;
}
/* -------------------------------------------- */
_souffleChatData() {
const tplData = this.system
let properties = [];
return properties;
return [];
}
/* -------------------------------------------- */
_teteChatData() {
const tplData = this.system
let properties = [];
return properties;
return [];
}
/* -------------------------------------------- */
_tarotChatData() {
const tplData = this.system
let properties = [
`<b>Concept</b>: ${tplData.concept}`,
`<b>Aspect</b>: ${tplData.aspect}`,
return [
`<b>Concept</b>: ${this.system.concept}`,
`<b>Aspect</b>: ${this.system.aspect}`,
]
return properties;
}
/* -------------------------------------------- */
_nombreastralChatData() {
const tplData = this.system
let properties = [
`<b>Valeur</b>: ${tplData.value}`,
`<b>Jour</b>: ${tplData.jourlabel}`,
return [
`<b>Valeur</b>: ${this.system.value}`,
`<b>Jour</b>: ${this.system.jourlabel}`,
]
return properties;
}
/* -------------------------------------------- */
_monnaieChatData() {
const tplData = this.system
let properties = [
`<b>Valeur en Deniers</b>: ${tplData.valeur_deniers}`,
`<b>Encombrement</b>: ${tplData.encombrement}`
return [
`<b>Valeur en Deniers</b>: ${this.system.valeur_deniers}`,
`<b>Encombrement</b>: ${this.system.encombrement}`
]
return properties;
}
/* -------------------------------------------- */
_meditationChatData() {
const tplData = this.system
let properties = [
`<b>Thème</b>: ${tplData.theme}`,
`<b>Compétence</b>: ${tplData.competence}`,
`<b>Support</b>: ${tplData.support}`,
`<b>Heure</b>: ${tplData.heure}`,
`<b>Purification</b>: ${tplData.purification}`,
`<b>Vêture</b>: ${tplData.veture}`,
`<b>Comportement</b>: ${tplData.comportement}`,
`<b>Case TMR</b>: ${tplData.tmr}`
return [
`<b>Thème</b>: ${this.system.theme}`,
`<b>Compétence</b>: ${this.system.competence}`,
`<b>Support</b>: ${this.system.support}`,
`<b>Heure</b>: ${this.system.heure}`,
`<b>Purification</b>: ${this.system.purification}`,
`<b>Vêture</b>: ${this.system.veture}`,
`<b>Comportement</b>: ${this.system.comportement}`,
`<b>Case TMR</b>: ${this.system.tmr}`
]
return properties;
}
/* -------------------------------------------- */
_casetmrChatData() {
const tplData = this.system
let properties = [
`<b>Coordonnée</b>: ${tplData.coord}`,
`<b>Spécificité</b>: ${tplData.specific}`
return [
`<b>Coordonnée</b>: ${this.system.coord}`,
`<b>Spécificité</b>: ${this.system.specific}`
]
return properties;
}
/* -------------------------------------------- */
_maladieChatData() {
const tplData = this.system
let properties
if (tplData.identifie) {
properties = [
`<b>Malignité</b>: ${tplData.malignite}`,
`<b>Périodicité</b>: ${tplData.periodicite}`,
`<b>Dommages</b>: ${tplData.dommages}`
]
if (tplData.remedesconnus) {
properties.push(`<b>Remedes</b>: ${tplData.remedes}`)
if (!this.system.identifie) {
return [`<b>Inconnue</b>`]
}
} else {
properties = [
`<b>Inconnue</b>`]
let properties = [
`<b>Malignité</b>: ${this.system.malignite}`,
`<b>Périodicité</b>: ${this.system.periodicite}`,
`<b>Dommages</b>: ${this.system.dommages}`
]
if (this.system.remedesconnus) {
properties.push(`<b>Remedes</b>: ${this.system.remedes}`)
}
return properties;
}
@ -584,15 +533,13 @@ export class RdDItem extends Item {
/* -------------------------------------------- */
_gemmeChatData() {
const tplData = this.system
let properties = [
`<b>Pureté</b>: ${tplData.purete}`,
`<b>Taille</b>: ${tplData.taille}`,
`<b>Inertie</b>: ${tplData.inertie}`,
`<b>Enchantabilité</b>: ${tplData.enchantabilite}`,
`<b>Prix</b>: ${tplData.cout}`,
return [
`<b>Pureté</b>: ${this.system.purete}`,
`<b>Taille</b>: ${this.system.taille}`,
`<b>Inertie</b>: ${this.system.inertie}`,
`<b>Enchantabilité</b>: ${this.system.enchantabilite}`,
`<b>Prix</b>: ${this.system.cout}`,
]
return properties;
}

View File

@ -458,7 +458,7 @@ export class RdDCalendrier extends Application {
function check() {
let elmnt = document.getElementById("calendar-time-container");
if (elmnt) {
elmnt.style.bottom = null;
elmnt.style.bottom = undefined;
let xPos = (pos.left) > window.innerWidth ? window.innerWidth - 200 : pos.left;
let yPos = (pos.top) > window.innerHeight - 20 ? window.innerHeight - 100 : pos.top;
elmnt.style.top = (yPos) + "px";
@ -615,16 +615,16 @@ export class RdDCalendrier extends Application {
pos3 = e.clientX;
pos4 = e.clientY;
// set the element's new position:
elmnt.style.bottom = null
elmnt.style.bottom = undefined
elmnt.style.top = (elmnt.offsetTop - pos2) + "px";
elmnt.style.left = (elmnt.offsetLeft - pos1) + "px";
}
function closeDragElement() {
// stop moving when mouse button is released:
elmnt.onmousedown = null;
document.onmouseup = null;
document.onmousemove = null;
elmnt.onmousedown = undefined;
document.onmouseup = undefined;
document.onmousemove = undefined;
let xPos = (elmnt.offsetLeft - pos1) > window.innerWidth ? window.innerWidth - 200 : (elmnt.offsetLeft - pos1);
let yPos = (elmnt.offsetTop - pos2) > window.innerHeight - 20 ? window.innerHeight - 100 : (elmnt.offsetTop - pos2)
xPos = xPos < 0 ? 0 : xPos;

View File

@ -121,7 +121,7 @@ export class RdDCombatManager extends Combat {
{
speaker: {
scene: canvas.scene._id,
actor: combatant.actor ? combatant.actor._id : null,
actor: combatant.actor?._id,
token: combatant.token._id,
alias: combatant.token.name,
sound: CONFIG.sounds.dice,
@ -498,7 +498,7 @@ export class RdDCombat {
let defender = canvas.tokens.get(msg.defenderTokenId).actor;
if (Misc.isOwnerPlayerOrUniqueConnectedGM()) {
let attackerRoll = msg.attackerRoll;
let attacker = msg.attackerId ? game.actors.get(msg.attackerId) : null;
let attacker = msg.attackerId ? game.actors.get(msg.attackerId) : undefined;
defender.encaisserDommages(attackerRoll, attacker);
const rddCombat = RdDCombat.createForAttackerAndDefender(msg.attackerId, msg.defenderTokenId);

View File

@ -32,10 +32,11 @@ export class RddCompendiumOrganiser {
const type = entity?.type
if (documentName === 'Actor' || documentName === 'Item') {
const label = CONFIG[documentName]?.typeLabels?.[type] ?? type;
return game.i18n.has(label) ? game.i18n.localize(label) : t;
if (game.i18n.has(label)) {
return game.i18n.localize(label);
}
}
return type;
}
}

View File

@ -241,7 +241,7 @@ export class RdDDice {
}
static _getWhisperBlind(options) {
let whisper = null;
let whisper = undefined;
let blind = false;
let rollMode = options.rollMode ?? game.settings.get("core", "rollMode");
switch (rollMode) {

View File

@ -143,8 +143,6 @@ Hooks.once("init", async function () {
default: "aucun"
});
DialogChronologie.onInit();
/* -------------------------------------------- */
// Set an initiative formula for the system
CONFIG.Combat.initiative = {
@ -197,6 +195,7 @@ Hooks.once("init", async function () {
CONFIG.Combat.documentClass = RdDCombatManager;
// préparation des différents modules
DialogChronologie.init();
ReglesOptionelles.init();
RdDUtility.init();
RdDDice.init();

View File

@ -54,7 +54,7 @@ export class RdDResolutionTable {
/* -------------------------------------------- */
static explain(rolled) {
let message = "<br>Jet : <strong>" + rolled.roll + "</strong> sur " + rolled.score + "% ";
if (rolled.caracValue != null && rolled.finalLevel != null) {
if (rolled.caracValue != undefined && rolled.finalLevel != undefined) {
message += (rolled.diviseurSignificative > 1 ? `(1/${rolled.diviseurSignificative} de ` : "(")
+ rolled.caracValue + " à " + Misc.toSignedString(rolled.finalLevel) + ") ";
}
@ -116,7 +116,7 @@ export class RdDResolutionTable {
static _updateChancesFactor(chances, diviseur) {
if (chances.level > -11 && diviseur && diviseur > 1) {
let newScore = Math.floor(chances.score / diviseur);
mergeObject(chances, this._computeCell(null, newScore), { overwrite: true });
mergeObject(chances, this._computeCell(undefined, newScore), { overwrite: true });
}
}
@ -124,7 +124,7 @@ export class RdDResolutionTable {
static _updateChancesWithBonus(chances, bonus, finalLevel) {
if (bonus && finalLevel>-11) {
let newScore = Number(chances.score) + bonus;
mergeObject(chances, this._computeCell(null, newScore), { overwrite: true });
mergeObject(chances, this._computeCell(undefined, newScore), { overwrite: true });
}
}

View File

@ -364,9 +364,7 @@ export class RdDTMRDialog extends Dialog {
/* -------------------------------------------- */
async quitterLesTMRInconscient() {
if (this.currentRencontre?.isPersistant) {
await this.refouler();
}
this.close();
}

View File

@ -13,7 +13,6 @@ import { Monnaie } from "./item-monnaie.js";
import { RdDPossession } from "./rdd-possession.js";
import { RdDNameGen } from "./rdd-namegen.js";
import { RdDConfirm } from "./rdd-confirm.js";
import { RdDActor } from "./actor.js";
import { RdDCalendrier } from "./rdd-calendrier.js";
/* -------------------------------------------- */

View File

@ -1,5 +1,4 @@
import { Grammar } from "./grammar.js";
import { Misc } from "./misc.js";
import { RdDDice } from "./rdd-dice.js";
import { TMRUtility } from "./tmr-utility.js";
import { TMRType } from "./tmr-utility.js";
@ -45,13 +44,13 @@ const typeRencontres = {
tmrDialog.choisirCasePortee(rencData.tmr.coord, rencData.rencontre.force);
},
poesieSucces: {
reference: "Femmes damnées (2), Charles Baudelaire",
reference: "Le bateau ivre, Arthur Rimbaud",
extrait: `Comme je descendais des Fleuves impassibles,
<br>Je ne me sentis plus guidé par les haleurs :
<br>Des Peaux-Rouges criards les avaient pris pour cibles,
<br>Les ayant cloués nus aux poteaux de couleurs.`},
poesieEchec: {
reference: "Le bateau ivre, Arthur Rimbaud",
reference: "Femmes damnées (2), Charles Baudelaire",
extrait: `Loin des peuples vivants, errantes, condamnées,
<br>A travers les déserts courez comme les loups ;
<br>Faites votre destin, âmes désordonnées,

View File

@ -77,6 +77,10 @@
--gradient-violet: linear-gradient(150deg, rgba(100, 45, 124, 0.6), rgba(216, 157, 192, 0.3), rgba(177, 157, 216, 0.5), rgba(107, 62, 121, 0.3), rgba(100, 45, 124, 0.6));
--gradient-purple-black: linear-gradient(150deg, rgba(0, 0, 0, 0.7), rgba(100, 45, 124, 0.4), rgba(82, 17, 131, 0.3),rgba(100, 45, 124, 0.4), rgba(0, 0, 0, 0.7));
--gradient-silver-light: linear-gradient(30deg, rgba(61, 55, 93, 0.2), rgba(178, 179, 196, 0.1), rgba(59, 62, 63, 0.2), rgba(206, 204, 199, 0.1), rgba(61, 46, 49, 0.2));
--background-custom-button: linear-gradient(to bottom, rgba(33, 55, 74, 0.988) 5%, rgba(21, 40, 51, 0.671) 100%);
--background-custom-button-hover: linear-gradient(to bottom, rgb(128, 0, 0) 5%, rgb(62, 1, 1) 100%);
--background-tooltip: rgba(220,220,210,0.95);
}
/*@import url("https://fonts.googleapis.com/css2?family=Martel:wght@400;800&family=Roboto:wght@300;400;500&display=swap");*/
@ -316,7 +320,6 @@ input:is(.blessure-premiers_soins, .blessure-soins_complets) {
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start;
margin-bottom: 10px;
}
.foundryvtt-reve-de-dragon .sheet-header .profile-img {
@ -1596,7 +1599,7 @@ display: inline-flex;
.tooltip .ttt-ajustements {
width: 150px;
background: rgba(220,220,210,0.95);
background: var(--background-tooltip);
border-radius: 6px;
font-size: 0.9rem;
padding: 3px 0;
@ -1606,7 +1609,7 @@ display: inline-flex;
text-align: justify;
width: 100%;
top: 30px;
background: rgba(220,220,210,0.95);
background: var(--background-tooltip);
border-radius: 6px;
font-size: 0.9rem;
padding: 3px;
@ -1614,7 +1617,7 @@ display: inline-flex;
.tooltip :is(.ttt-xp,.ttt-levelup) {
width: 250px;
background: rgba(220,220,210,0.95) !important;
background: var(--background-tooltip) !important;
border-radius: 6px;
font-size: 0.9rem;
padding: 3px 0;
@ -1628,7 +1631,7 @@ display: inline-flex;
.chat-card-button {
box-shadow: inset 0px 1px 0px 0px #a6827e;
background: linear-gradient(to bottom, #21374afc 5%, #152833ab 100%);
background: var(--background-custom-button);
background-color: #7d5d3b00;
border-radius: 3px;
border: 2px ridge #846109;
@ -1644,10 +1647,12 @@ display: inline-flex;
margin:5px;
}
.chat-card-button:hover {
background: linear-gradient(to bottom, #800000 5%, #3e0101 100%);
background: var(--background-custom-button-hover);
background-color: red;
}
.chat-card-button:active {
position:relative;
top:1px;

View File

@ -6,7 +6,7 @@
</header>
<label>&nbsp;&nbsp;Conditions</label>
<select name="diffConditions" id="diffConditions" data-dtype="number">
<select name="diffConditions" id="diffConditions" data-dtype="Number">
{{#select diffConditions}}
{{#each ajustementsConditions as |key|}}
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option>
@ -14,7 +14,7 @@
{{/select}}
</select>
<label>&nbsp;&nbsp;Jours</label>
<select name="joursAstrologie" id="joursAstrologie" data-dtype="number">
<select name="joursAstrologie" id="joursAstrologie" data-dtype="Number">
{{#select joursSuivants}}
{{#each dates as |date key|}}
<option value={{date.index}}>{{date.label}}</option>

View File

@ -2,7 +2,6 @@
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.html"}}
<section class="sheet-body">
{{log 'sortreserve' this}}
{{#if (and system.sortid sort)}}
<div class="form-group">
<label>Sort</label>