diff --git a/fonts/heures_draconiques.ttf b/fonts/heures_draconiques.ttf deleted file mode 100644 index 2200a65e..00000000 Binary files a/fonts/heures_draconiques.ttf and /dev/null differ diff --git a/fonts/heuresdraconiques2.ttf b/fonts/heuresdraconiques2.ttf new file mode 100644 index 00000000..93828e89 Binary files /dev/null and b/fonts/heuresdraconiques2.ttf differ diff --git a/fonts/heuresdraconiques2.woff b/fonts/heuresdraconiques2.woff new file mode 100644 index 00000000..327b0c96 Binary files /dev/null and b/fonts/heuresdraconiques2.woff differ diff --git a/fonts/heuresdraconiques2.woff2 b/fonts/heuresdraconiques2.woff2 new file mode 100644 index 00000000..96e35cc0 Binary files /dev/null and b/fonts/heuresdraconiques2.woff2 differ diff --git a/icons/heures/hdragon.webp b/icons/heures/hdragon.webp deleted file mode 100644 index 48659c68..00000000 Binary files a/icons/heures/hdragon.webp and /dev/null differ diff --git a/module/actor.js b/module/actor.js index 105984cb..01f8f2c3 100644 --- a/module/actor.js +++ b/module/actor.js @@ -1483,7 +1483,7 @@ export class RdDActor extends Actor { async ethylismeTest() { const actorData = Misc.data(this); let rollData = { - vieValue: actorData.data.sante.vie.value, + vieValue: actorData.data.sante.vie.max, etat: this.getEtatGeneral() - Math.min(0, actorData.data.compteurs.ethylisme.value), // Pour les jets d'Ethylisme, on ignore le degré d'éthylisme (p.162) diffNbDoses: -Number(actorData.data.compteurs.ethylisme.nb_doses || 0), finalLevel: 0, diff --git a/module/rdd-calendrier.js b/module/rdd-calendrier.js index 2c16a3a1..58843ba1 100644 --- a/module/rdd-calendrier.js +++ b/module/rdd-calendrier.js @@ -11,9 +11,9 @@ const dossierIconesHeures = 'systems/foundryvtt-reve-de-dragon/icons/heures/' const heuresList = ["vaisseau", "sirene", "faucon", "couronne", "dragon", "epees", "lyre", "serpent", "poissonacrobate", "araignee", "roseau", "chateaudormant"]; const heuresDef = { "vaisseau": { label: "Vaisseau", lettreFont: 'v', saison: "printemps", heure: 0, icon: 'hd01.svg' }, - "sirene": { label: "Sirène", lettreFont: 'S', saison: "printemps", heure: 1, icon: 'hd02.svg' }, + "sirene": { label: "Sirène", lettreFont: 'i', saison: "printemps", heure: 1, icon: 'hd02.svg' }, "faucon": { label: "Faucon", lettreFont: 'f', saison: "printemps", heure: 2, icon: 'hd03.svg' }, - "couronne": { label: "Couronne", lettreFont: 'C', saison: "ete", heure: 3, icon: 'hd04.svg' }, + "couronne": { label: "Couronne", lettreFont: '', saison: "ete", heure: 3, icon: 'hd04.svg' }, "dragon": { label: "Dragon", lettreFont: 'd', saison: "ete", heure: 4, icon: 'hd05.svg' }, "epees": { label: "Epées", lettreFont: 'e', saison: "ete", heure: 5, icon: 'hd06.svg' }, "lyre": { label: "Lyre", lettreFont: 'l', saison: "automne", heure: 6, icon: 'hd07.svg' }, diff --git a/module/rdd-commands.js b/module/rdd-commands.js index bce05efc..a4b8bf85 100644 --- a/module/rdd-commands.js +++ b/module/rdd-commands.js @@ -165,11 +165,25 @@ export class RdDCommands { } /* -------------------------------------------- */ - help(msg, table = undefined) { + async help(msg) { + this.help(msg, undefined); + } + async help(msg, table) { let list = [] this._buildSubTableHelp(list, table || this.commandsTable); - const messageAide = list.reduce((a, b) => a + '
  • ' + b); - RdDCommands._chatAnswer(msg, `Commandes disponibles`); + + let html = await renderTemplate("systems/foundryvtt-reve-de-dragon/templates/settings/dialog-aide-commands.html", { commands: list }); + let d = new Dialog( + { + title: "Commandes disponibles dans le tchat", + content: html, + buttons: {}, + }, + { + width: 600, height: 500, + }); + + d.render(true); } /* -------------------------------------------- */ @@ -220,23 +234,23 @@ export class RdDCommands { } let actors = canvas.tokens.controlled.map(it => it.actor).filter(it => it); - if (actors && actors.length > 0){ + if (actors && actors.length > 0) { let length = params.length; - let diff = Number(params[length-1]); - if (Number.isInteger(Number(diff))){ - length --; + let diff = Number(params[length - 1]); + if (Number.isInteger(Number(diff))) { + length--; } else { diff = 0; } const caracName = params[0]; - const compName = length>1 ? params.slice(1, length).reduce((a, b) => `${a} ${b}`): undefined; + const compName = length > 1 ? params.slice(1, length).reduce((a, b) => `${a} ${b}`) : undefined; for (let actor of actors) { await actor.rollCaracCompetence(caracName, compName, diff); } return; } - else{ + else { ui.notifications.warn("Sélectionnez au moins un personnage pour lancer les dés") } } diff --git a/module/rdd-dice.js b/module/rdd-dice.js index 3e978531..1ff54eb4 100644 --- a/module/rdd-dice.js +++ b/module/rdd-dice.js @@ -6,18 +6,15 @@ function img(src) { return `` } -function iconHeure(heure){ - if (heure<10) { - heure = '0'+heure; +function iconHeure(heure) { + if (heure < 10) { + heure = '0' + heure; } return `systems/foundryvtt-reve-de-dragon/icons/heures/hd${heure}.webp` } +const imagesHeures = [1, 2, 3, 4, 5, 6, 7, 9, 9, 10, 11, 12].map(it => iconHeure(it)); -const signeDragon = 'systems/foundryvtt-reve-de-dragon/icons/heures/hdragon.webp'; -const imgSigneDragon = img(signeDragon); -const labelsDeDragon = ['1', '2', '3', '4', '5', '6', signeDragon, '0']; -const bumpsDeDragon = [, , , , , , signeDragon,]; -const signeHeure = 'systems/foundryvtt-reve-de-dragon/icons/heures/hd'; +const imgSigneDragon = img(imagesHeures[4]); /** De7 pour les jets de rencontre */ export class De7 extends Die { @@ -25,7 +22,13 @@ export class De7 extends Die { static DENOMINATION = "7"; static diceSoNiceData(system) { - return { type: "d7", labels: labelsDeDragon, bumpMaps: bumpsDeDragon, system: system } + return { + type: "d7", + font: "HeuresDraconiques", + fontScale : 0.7, + labels: ['1', '2', '3', '4', '5', '6', 'd', '0'], + system: system + } } constructor(termData) { @@ -45,7 +48,7 @@ export class De7 extends Die { static getResultLabel(result) { switch (result) { - case 7: return imgSigneDragon + case 7: return imgSigneDragon; } return result; } @@ -56,7 +59,13 @@ export class DeDraconique extends Die { static DENOMINATION = "r"; static diceSoNiceData(system) { - return { type: "dr", labels: labelsDeDragon, bumpMaps: bumpsDeDragon, system: system } + return { + type: "dr", + font: "HeuresDraconiques", + fontScale : 0.7, + labels: ['1', '2', '3', '4', '5', '6', 'd', '0'], + system: system + } } constructor(termData) { @@ -76,14 +85,13 @@ export class DeDraconique extends Die { static getResultLabel(result) { switch (result) { - case 7: return imgSigneDragon + case 7: return imgSigneDragon; + case 8: return 0; } return result; } } -const imagesHeures = [1, 2, 3, 4, 5, 6, 7, 9, 9, 10, 11, 12].map(it => iconHeure(it)); - /** De 12 avec les heures */ export class DeHeure extends Die { @@ -93,8 +101,8 @@ export class DeHeure extends Die { static diceSoNiceData(system) { return { type: "dh", - labels: imagesHeures, - bumpMaps: imagesHeures, + font: "HeuresDraconiques", + labels: ['v', 'i', 'f', 'o', 'd', 'e', 'l', 's', 'p', 'a', 'r', 'c'], system: system } } @@ -105,7 +113,7 @@ export class DeHeure extends Die { } static getResultLabel(result) { - return img(imagesHeures[result]); + return img(imagesHeures[result-1]); } } diff --git a/styles/simple.css b/styles/simple.css index 74932217..07dbc76d 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -20,10 +20,15 @@ src: url('../fonts/CaslonAntique.ttf') format("truetype"); } @font-face { - font-family: "heures Draconiques"; - src: url('../fonts/heures_draconiques.ttf') format("truetype"); - } - + font-family: 'HeuresDraconiques'; + src: + url('../fonts/heuresdraconiques2.woff') format('woff'), + url('../fonts/heuresdraconiques2.woff2') format('woff2'), + url('../fonts/heuresdraconiques2.ttf') format('truetype'); + font-weight: normal; + font-style: normal; +} + :root { /* =================== 1. ACTOR SHEET FONT STYLES =========== */ --window-header-title-font-family: CaslonAntique; diff --git a/templates/settings/dialog-aide-commands.html b/templates/settings/dialog-aide-commands.html new file mode 100644 index 00000000..8d39f597 --- /dev/null +++ b/templates/settings/dialog-aide-commands.html @@ -0,0 +1,20 @@ +

    Dés spéciaux

    + +

    Commandes disponibles

    + \ No newline at end of file