Merge branch 'master-misc' into 'master'
Utiliser des polices pour les dés See merge request LeRatierBretonnien/foundryvtt-reve-de-dragon!223
This commit is contained in:
commit
c31202fbd3
Binary file not shown.
BIN
fonts/heuresdraconiques2.ttf
Normal file
BIN
fonts/heuresdraconiques2.ttf
Normal file
Binary file not shown.
BIN
fonts/heuresdraconiques2.woff
Normal file
BIN
fonts/heuresdraconiques2.woff
Normal file
Binary file not shown.
BIN
fonts/heuresdraconiques2.woff2
Normal file
BIN
fonts/heuresdraconiques2.woff2
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 2.1 KiB |
@ -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,
|
||||
|
@ -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' },
|
||||
|
@ -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 + '</li><li class="list-item">' + b);
|
||||
RdDCommands._chatAnswer(msg, `Commandes disponibles<ul class="alterne-list"><li class="list-item">${messageAide}</li></ul>`);
|
||||
|
||||
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")
|
||||
}
|
||||
}
|
||||
|
@ -6,18 +6,15 @@ function img(src) {
|
||||
return `<img src="${src}" class="dice-img" />`
|
||||
}
|
||||
|
||||
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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
20
templates/settings/dialog-aide-commands.html
Normal file
20
templates/settings/dialog-aide-commands.html
Normal file
@ -0,0 +1,20 @@
|
||||
<h3>Dés spéciaux</h3>
|
||||
<ul class="alterne-list">
|
||||
<li class="list-item">
|
||||
<strong>/roll 1d7</strong>: lance un dé de rencontre
|
||||
</li>
|
||||
<li class="list-item">
|
||||
<strong>/roll 1dr</strong>: lance un dé draconique (de 0à 7, relance et additionne en cas de 7)
|
||||
</li>
|
||||
<li class="list-item">
|
||||
<strong>/roll 1dh</strong>: lance le dé des heures (de 1 à 12)
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Commandes disponibles</h3>
|
||||
<ul class="alterne-list">
|
||||
{{#each commands as |command key|}}
|
||||
<li class="list-item">
|
||||
{{{command}}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
Loading…
Reference in New Issue
Block a user