diff --git a/icons/heures/hd01.webp b/icons/heures/hd01.webp
new file mode 100644
index 00000000..abf0f41c
Binary files /dev/null and b/icons/heures/hd01.webp differ
diff --git a/icons/heures/hd02.webp b/icons/heures/hd02.webp
new file mode 100644
index 00000000..dad93fcc
Binary files /dev/null and b/icons/heures/hd02.webp differ
diff --git a/icons/heures/hd03.webp b/icons/heures/hd03.webp
new file mode 100644
index 00000000..6983d86d
Binary files /dev/null and b/icons/heures/hd03.webp differ
diff --git a/icons/heures/hd04.webp b/icons/heures/hd04.webp
new file mode 100644
index 00000000..284e3754
Binary files /dev/null and b/icons/heures/hd04.webp differ
diff --git a/icons/heures/hd05.webp b/icons/heures/hd05.webp
new file mode 100644
index 00000000..f243eb93
Binary files /dev/null and b/icons/heures/hd05.webp differ
diff --git a/icons/heures/hd06.webp b/icons/heures/hd06.webp
new file mode 100644
index 00000000..0c2d1952
Binary files /dev/null and b/icons/heures/hd06.webp differ
diff --git a/icons/heures/hd07.webp b/icons/heures/hd07.webp
new file mode 100644
index 00000000..e13f5a38
Binary files /dev/null and b/icons/heures/hd07.webp differ
diff --git a/icons/heures/hd08.webp b/icons/heures/hd08.webp
new file mode 100644
index 00000000..abda8b9b
Binary files /dev/null and b/icons/heures/hd08.webp differ
diff --git a/icons/heures/hd09.webp b/icons/heures/hd09.webp
new file mode 100644
index 00000000..d9f66574
Binary files /dev/null and b/icons/heures/hd09.webp differ
diff --git a/icons/heures/hd10.webp b/icons/heures/hd10.webp
new file mode 100644
index 00000000..9ef3279d
Binary files /dev/null and b/icons/heures/hd10.webp differ
diff --git a/icons/heures/hd11.webp b/icons/heures/hd11.webp
new file mode 100644
index 00000000..6b4b8ccc
Binary files /dev/null and b/icons/heures/hd11.webp differ
diff --git a/icons/heures/hd12.webp b/icons/heures/hd12.webp
new file mode 100644
index 00000000..9bb28205
Binary files /dev/null and b/icons/heures/hd12.webp differ
diff --git a/module/rdd-dice.js b/module/rdd-dice.js
index 464a73f5..62ffcd9b 100644
--- a/module/rdd-dice.js
+++ b/module/rdd-dice.js
@@ -2,25 +2,37 @@ import { ChatUtility } from "./chat-utility.js";
import { SYSTEM_RDD } from "./constants.js";
import { Misc } from "./misc.js";
+function img(src) {
+ return ``
+}
+
+function iconHeure(heure){
+ if (heure<10) {
+ heure = '0'+heure;
+ }
+ return `systems/foundryvtt-reve-de-dragon/icons/heures/hd${heure}.webp`
+}
+
const signeDragon = 'systems/foundryvtt-reve-de-dragon/icons/heures/hdragon.webp';
-const imgSigneDragon = ``;
+const imgSigneDragon = img(signeDragon);
const labelsDeDragon = ['1', '2', '3', '4', '5', '6', signeDragon, '0'];
-const bumpsDeDragon = [, , , , , , signeDragon, ];
+const bumpsDeDragon = [, , , , , , signeDragon,];
+const signeHeure = 'systems/foundryvtt-reve-de-dragon/icons/heures/hd';
/** De7 pour les jets de rencontre */
export class De7 extends Die {
/** @override */
static DENOMINATION = "7";
-
+
static diceSoNiceData(system) {
return { type: "d7", labels: labelsDeDragon, bumpMaps: bumpsDeDragon, system: system }
}
-
+
constructor(termData) {
termData.faces = 8;
super(termData);
}
-
+
evaluate() {
super.evaluate();
this.explode("x=8");
@@ -70,16 +82,45 @@ export class DeDraconique extends Die {
}
}
+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 {
+
+ /** @override */
+ static DENOMINATION = "h";
+
+ static diceSoNiceData(system) {
+ return {
+ type: "dh",
+ labels: imagesHeures,
+ bumpMaps: imagesHeures,
+ system: system
+ }
+ }
+
+ constructor(termData) {
+ termData.faces = 12;
+ super(termData);
+ }
+
+ static getResultLabel(result) {
+ return img(imagesHeures[result]);
+ }
+}
+
export class RdDDice {
static init() {
CONFIG.Dice.terms[De7.DENOMINATION] = De7;
CONFIG.Dice.terms[DeDraconique.DENOMINATION] = DeDraconique;
+ CONFIG.Dice.terms[DeHeure.DENOMINATION] = DeHeure;
}
static diceSoNiceReady(dice3d) {
for (const system of Object.keys(dice3d.DiceFactory.systems)) {
dice3d.addDicePreset(De7.diceSoNiceData(system));
dice3d.addDicePreset(DeDraconique.diceSoNiceData(system));
+ dice3d.addDicePreset(DeHeure.diceSoNiceData(system));
}
}