From 944dd103d26c4cfa0567e1febcb1bf9a36e41a61 Mon Sep 17 00:00:00 2001
From: Vincent Vandemeulebrouck <vincent.vandemeulebrouck@itiviti.com>
Date: Sun, 28 Feb 2021 01:40:32 +0100
Subject: [PATCH] =?UTF-8?q?Ajout=20commande=20id=C3=A9e=20fixe/d=C3=A9sir?=
 =?UTF-8?q?=20lancinant?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 module/rdd-commands.js   |  2 ++
 module/rdd-rolltables.js | 12 ++++++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/module/rdd-commands.js b/module/rdd-commands.js
index 317b62bf..dddfdb2c 100644
--- a/module/rdd-commands.js
+++ b/module/rdd-commands.js
@@ -24,6 +24,8 @@ export class RdDCommands {
       rddCommands.registerCommand({ path: ["/aide"], func: (content, msg, params) => rddCommands.help(msg), descr: "Affiche l'aide pour toutes les commandes" });
       rddCommands.registerCommand({ path: ["/help"], func: (content, msg, params) => rddCommands.help(msg), descr: "Affiche l'aide pour toutes les commandes" });
       rddCommands.registerCommand({ path: ["/table", "queues"], func: (content, msg, params) => RdDRollTables.getQueue(true), descr: "Tire une Queue de Dragon" });
+      rddCommands.registerCommand({ path: ["/table", "ideefixe"], func: (content, msg, params) => RdDRollTables.getIdeeFixe(true), descr: "Tire une Idée fixe" });
+      rddCommands.registerCommand({ path: ["/table", "desir"], func: (content, msg, params) => RdDRollTables.getDesirLancinant(true), descr: "Tire un Désir Lancinant" });
       rddCommands.registerCommand({ path: ["/table", "ombre"], func: (content, msg, params) => RdDRollTables.getOmbre(true), descr: "Tire une Ombre de Dragon" });
       rddCommands.registerCommand({ path: ["/table", "tetehr"], func: (content, msg, params) => RdDRollTables.getTeteHR(true), descr: "Tire une Tête de Dragon pour Hauts Revants" });
       rddCommands.registerCommand({ path: ["/table", "tete"], func: (content, msg, params) => RdDRollTables.getTete(true), descr: "Tire une Tête de Dragon" });
diff --git a/module/rdd-rolltables.js b/module/rdd-rolltables.js
index 957c130a..74d06152 100644
--- a/module/rdd-rolltables.js
+++ b/module/rdd-rolltables.js
@@ -48,14 +48,22 @@ export class RdDRollTables {
   static async getQueue(toChat = false) {
     let queue = await RdDRollTables.drawItemFromRollTable("Queues de dragon", toChat);
     if (queue.name.toLowerCase().includes('lancinant') ) {
-      queue = await RdDRollTables.drawItemFromRollTable("Désirs lancinants", toChat);
+      return await RdDRollTables.getDesirLancinant(toChat);
     }
     if (queue.name.toLowerCase().includes('fixe') ) {
-      queue =  await RdDRollTables.drawItemFromRollTable("Idées fixes", toChat);
+      return await RdDRollTables.getIdeeFixe(toChat);
     }
     return queue;
   }
 
+  static async getDesirLancinant(toChat = false) {
+    return await RdDRollTables.drawItemFromRollTable("Désirs lancinants", toChat);
+  }
+  
+  static async getIdeeFixe(toChat = false) {
+    return await RdDRollTables.drawItemFromRollTable("Idées fixes", toChat);
+  }
+
   /* -------------------------------------------- */
   static async getTeteHR(toChat = false) {
     return await RdDRollTables.drawItemFromRollTable("Têtes de Dragon pour haut-rêvants", toChat);