From ff34050aa0dc76335ddb021ef2d543d84febaca6 Mon Sep 17 00:00:00 2001
From: Ivaria <ivaria@vuhdo.io>
Date: Sat, 14 May 2016 23:34:56 +0000
Subject: [PATCH] Added new power types and associated power colors for Astral
 Power, Maelstrom and Insanity.

---
 VuhDoBouquetValidators.lua                   |  2 +-
 VuhDoConst.lua                               | 15 +++--
 VuhDoDefaults.lua                            | 15 +++--
 VuhDoOptions/VuhDoLocalization_de.lua        |  9 +++
 VuhDoOptions/VuhDoLocalization_en.lua        |  8 +++
 VuhDoOptions/VuhDoLocalization_es.lua        |  9 +++
 VuhDoOptions/VuhDoLocalization_fr.lua        |  9 +++
 VuhDoOptions/VuhDoLocalization_ru.lua        |  9 +++
 VuhDoOptions/VuhDoLocalization_zhCN.lua      |  9 +++
 VuhDoOptions/VuhDoLocalization_zhTW.lua      |  9 +++
 VuhDoOptions/VuhDoNewOptionsColorsPowers.xml | 59 ++++++++++++++++++--
 VuhDoRoleChecker.lua                         | 20 +++----
 changelog.txt                                |  1 +
 13 files changed, 146 insertions(+), 28 deletions(-)

diff --git a/VuhDoBouquetValidators.lua b/VuhDoBouquetValidators.lua
index 14f43ed..21cf4a4 100644
--- a/VuhDoBouquetValidators.lua
+++ b/VuhDoBouquetValidators.lua
@@ -1702,7 +1702,7 @@ VUHDO_BOUQUET_BUFFS_SPECIAL = {
 		["validator"] = VUHDO_customFlagValidator, 
 		["custom_type"] = VUHDO_BOUQUET_CUSTOM_TYPE_CUSTOM_FLAG,
 		["updateCyclic"] = true,
-		["interests"] = { VUHDO_UPDATE_INC, VUHDO_UPDATE_HEALTH, VUHDO_UPDATE_RANGE, VUHDO_UPDATE_HEALTH_MAX, VUHDO_UPDATE_ALIVE },
+		["interests"] = { VUHDO_UPDATE_INC, VUHDO_UPDATE_HEALTH, VUHDO_UPDATE_RANGE, VUHDO_UPDATE_HEALTH_MAX, VUHDO_UPDATE_ALIVE }, --ignoring some for now (eg. VUHDO_UPDATE_MANA, VUHDO_UPDATE_DC, etc.)
 	},
 
 };
diff --git a/VuhDoConst.lua b/VuhDoConst.lua
index 58662e0..51a5aa9 100644
--- a/VuhDoConst.lua
+++ b/VuhDoConst.lua
@@ -272,12 +272,15 @@ VUHDO_UPDATE_SHIELD = 36;
 
 
 -- Unit power types (== Blizzard defined types)
-VUHDO_UNIT_POWER_MANA = 0;
-VUHDO_UNIT_POWER_RAGE = 1;
-VUHDO_UNIT_POWER_FOCUS = 2;
-VUHDO_UNIT_POWER_ENERGY = 3;
-VUHDO_UNIT_POWER_HAPPINESS = 4;
-VUHDO_UNIT_POWER_RUNES = 6;
+VUHDO_UNIT_POWER_MANA = SPELL_POWER_MANA;
+VUHDO_UNIT_POWER_RAGE = SPELL_POWER_RAGE;
+VUHDO_UNIT_POWER_FOCUS = SPELL_POWER_FOCUS;
+VUHDO_UNIT_POWER_ENERGY = SPELL_POWER_ENERGY;
+VUHDO_UNIT_POWER_HAPPINESS = SPELL_POWER_COMBO_POINTS;
+VUHDO_UNIT_POWER_RUNES = SPELL_POWER_RUNIC_POWER;
+VUHDO_UNIT_POWER_LUNAR_POWER = SPELL_POWER_LUNAR_POWER;
+VUHDO_UNIT_POWER_MAELSTROM = SPELL_POWER_MAELSTROM;
+VUHDO_UNIT_POWER_INSANITY = SPELL_POWER_INSANITY;
 
 
 
diff --git a/VuhDoDefaults.lua b/VuhDoDefaults.lua
index 51c5a60..dff2a4b 100644
--- a/VuhDoDefaults.lua
+++ b/VuhDoDefaults.lua
@@ -718,12 +718,15 @@ local VUHDO_DEFAULT_CU_DE_STORED_SETTINGS = {
 
 
 VUHDO_DEFAULT_POWER_TYPE_COLORS = {
-	[VUHDO_UNIT_POWER_MANA]      = VUHDO_makeFullColor(0,   0,   1,    1,   0,   0,   1,    1),
-	[VUHDO_UNIT_POWER_RAGE]      = VUHDO_makeFullColor(1,   0,   0,    1,   1,   0,   0,    1),
-	[VUHDO_UNIT_POWER_FOCUS]     = VUHDO_makeFullColor(1,   0.5, 0.25, 1,   1,   0.5, 0.25, 1),
-	[VUHDO_UNIT_POWER_ENERGY]    = VUHDO_makeFullColor(1,   1,   0,    1,   1,   1,   0,    1),
-	[VUHDO_UNIT_POWER_HAPPINESS] = VUHDO_makeFullColor(0,   1,   1,    1,   0,   1,   1,    1),
-	[VUHDO_UNIT_POWER_RUNES]     = VUHDO_makeFullColor(0.5, 0.5, 0.5,  1,   0.5, 0.5, 0.5,  1),
+	[VUHDO_UNIT_POWER_MANA]        = VUHDO_makeFullColor(0,     0,     1,    1,  0,     0,     1,    1),
+	[VUHDO_UNIT_POWER_RAGE]        = VUHDO_makeFullColor(1,     0,     0,    1,  1,     0,     0,    1),
+	[VUHDO_UNIT_POWER_FOCUS]       = VUHDO_makeFullColor(1,     0.5,   0.25, 1,  1,     0.5,   0.25, 1),
+	[VUHDO_UNIT_POWER_ENERGY]      = VUHDO_makeFullColor(1,     1,     0,    1,  1,     1,     0,    1),
+	[VUHDO_UNIT_POWER_HAPPINESS]   = VUHDO_makeFullColor(0,     1,     1,    1,  0,     1,     1,    1),
+	[VUHDO_UNIT_POWER_RUNES]       = VUHDO_makeFullColor(0.5,   0.5,   0.5,  1,  0.5,   0.5,   0.5,  1),
+	[VUHDO_UNIT_POWER_LUNAR_POWER] = VUHDO_makeFullColor(0.87,  0.95,  1,    1,  0.87,  0.95,  1,    1),
+	[VUHDO_UNIT_POWER_MAELSTROM]   = VUHDO_makeFullColor(0.09,  0.56,  1,    1,  0.09,  0.56,  1,    1),
+	[VUHDO_UNIT_POWER_INSANITY]    = VUHDO_makeFullColor(0.15,  0.97,  1,    1,  0.15,  0.97,  1,    1),
 };
 
 
diff --git a/VuhDoOptions/VuhDoLocalization_de.lua b/VuhDoOptions/VuhDoLocalization_de.lua
index 3ac9e39..98a362d 100644
--- a/VuhDoOptions/VuhDoLocalization_de.lua
+++ b/VuhDoOptions/VuhDoLocalization_de.lua
@@ -614,6 +614,10 @@ VUHDO_I18N_TT.K555 = "Check to allow the VuhDo menu command to be bound even whe
 VUHDO_I18N_TT.K556 = "Check this to have an extra panel for boss encounter NPCs (eg. shards on Tectus, mushrooms on Brackenspore).";
 VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == VUHDO_unitInfo\[\"name\"\])";
 VUHDO_I18N_TT.K558 = "Hide buff watch while out of combat.";
+VUHDO_I18N_TT.K559 = "Click to select focus bar color.";
+VUHDO_I18N_TT.K560 = "Click to select astral power bar color.";
+VUHDO_I18N_TT.K561 = "Click to select maelstrom bar color.";
+VUHDO_I18N_TT.K562 = "Click to select insanity bar color.";
 
 VUHDO_I18N_DEFAULT_PROFILE = "Default Profile";
 VUHDO_I18N_DEFAULT_LAYOUT = "Default Layout";
@@ -1094,3 +1098,8 @@ VUHDO_I18N_HIDE_OUT_OF_COMBAT = "Show Only\nIn Combat";
 VUHDO_I18N_IMPORT = "Import";
 VUHDO_I18N_IMPORT_STRING_INVALID = "Import string was invalid.";
 VUHDO_I18N_REALLY_IMPORT = "Do you really want to import?\n\nYou should only import strings from known and\nreputable sources. Never import a string whose\nsource is not trusted.";
+
+VUHDO_I18N_LUNAR_POWER = "Astral Power";
+VUHDO_I18N_MAELSTROM = "Maelstrom";
+VUHDO_I18N_INSANITY = "Insanity";
+
diff --git a/VuhDoOptions/VuhDoLocalization_en.lua b/VuhDoOptions/VuhDoLocalization_en.lua
index 4828bda..9d70c60 100644
--- a/VuhDoOptions/VuhDoLocalization_en.lua
+++ b/VuhDoOptions/VuhDoLocalization_en.lua
@@ -613,6 +613,10 @@ VUHDO_I18N_TT.K555 = "Check to allow the VuhDo menu command to be bound even whe
 VUHDO_I18N_TT.K556 = "Check this to have an extra panel for boss encounter NPCs (eg. shards on Tectus, mushrooms on Brackenspore).";
 VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == VUHDO_unitInfo\[\"name\"\])";
 VUHDO_I18N_TT.K558 = "Hide buff watch while out of combat.";
+VUHDO_I18N_TT.K559 = "Click to select focus bar color.";
+VUHDO_I18N_TT.K560 = "Click to select astral power bar color.";
+VUHDO_I18N_TT.K561 = "Click to select maelstrom bar color.";
+VUHDO_I18N_TT.K562 = "Click to select insanity bar color.";
 
 VUHDO_I18N_DEFAULT_PROFILE = "Default Profile";
 VUHDO_I18N_DEFAULT_LAYOUT = "Default Layout";
@@ -1094,3 +1098,7 @@ VUHDO_I18N_HIDE_OUT_OF_COMBAT = "Show Only\nIn Combat";
 VUHDO_I18N_IMPORT = "Import";
 VUHDO_I18N_IMPORT_STRING_INVALID = "Import string was invalid.";
 VUHDO_I18N_REALLY_IMPORT = "Do you really want to import?\n\nYou should only import strings from known and\nreputable sources. Never import a string whose\nsource is not trusted.";
+
+VUHDO_I18N_LUNAR_POWER = "Astral Power";
+VUHDO_I18N_MAELSTROM = "Maelstrom";
+VUHDO_I18N_INSANITY = "Insanity";
diff --git a/VuhDoOptions/VuhDoLocalization_es.lua b/VuhDoOptions/VuhDoLocalization_es.lua
index 8f5d0b7..7d2d08b 100644
--- a/VuhDoOptions/VuhDoLocalization_es.lua
+++ b/VuhDoOptions/VuhDoLocalization_es.lua
@@ -621,6 +621,10 @@ VUHDO_I18N_TT.K555 = "Check to allow the VuhDo menu command to be bound even whe
 VUHDO_I18N_TT.K556 = "Check this to have an extra panel for boss encounter NPCs (eg. shards on Tectus, mushrooms on Brackenspore).";
 VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == VUHDO_unitInfo\[\"name\"\])";
 VUHDO_I18N_TT.K558 = "Hide buff watch while out of combat.";
+VUHDO_I18N_TT.K559 = "Click to select focus bar color.";
+VUHDO_I18N_TT.K560 = "Click to select astral power bar color.";
+VUHDO_I18N_TT.K561 = "Click to select maelstrom bar color.";
+VUHDO_I18N_TT.K562 = "Click to select insanity bar color.";
 
 VUHDO_I18N_DEFAULT_PROFILE = "Default Profile";
 VUHDO_I18N_DEFAULT_LAYOUT = "Default Layout";
@@ -1109,3 +1113,8 @@ VUHDO_I18N_HIDE_OUT_OF_COMBAT = "Show Only\nIn Combat";
 VUHDO_I18N_IMPORT = "Import";
 VUHDO_I18N_IMPORT_STRING_INVALID = "Import string was invalid.";
 VUHDO_I18N_REALLY_IMPORT = "Do you really want to import?\n\nYou should only import strings from known and\nreputable sources. Never import a string whose\nsource is not trusted.";
+
+VUHDO_I18N_LUNAR_POWER = "Astral Power";
+VUHDO_I18N_MAELSTROM = "Maelstrom";
+VUHDO_I18N_INSANITY = "Insanity";
+
diff --git a/VuhDoOptions/VuhDoLocalization_fr.lua b/VuhDoOptions/VuhDoLocalization_fr.lua
index e990128..76c05c2 100644
--- a/VuhDoOptions/VuhDoLocalization_fr.lua
+++ b/VuhDoOptions/VuhDoLocalization_fr.lua
@@ -623,6 +623,10 @@ VUHDO_I18N_TT.K555 = "Check to allow the VuhDo menu command to be bound even whe
 VUHDO_I18N_TT.K556 = "Check this to have an extra panel for boss encounter NPCs (eg. shards on Tectus, mushrooms on Brackenspore).";
 VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == VUHDO_unitInfo\[\"name\"\])";
 VUHDO_I18N_TT.K558 = "Hide buff watch while out of combat.";
+VUHDO_I18N_TT.K559 = "Click to select focus bar color.";
+VUHDO_I18N_TT.K560 = "Click to select astral power bar color.";
+VUHDO_I18N_TT.K561 = "Click to select maelstrom bar color.";
+VUHDO_I18N_TT.K562 = "Click to select insanity bar color.";
 
 VUHDO_I18N_DEFAULT_PROFILE = "Default Profile";
 VUHDO_I18N_DEFAULT_LAYOUT = "Default Layout";
@@ -1110,3 +1114,8 @@ VUHDO_I18N_HIDE_OUT_OF_COMBAT = "Show Only\nIn Combat";
 VUHDO_I18N_IMPORT = "Import";
 VUHDO_I18N_IMPORT_STRING_INVALID = "Import string was invalid.";
 VUHDO_I18N_REALLY_IMPORT = "Do you really want to import?\n\nYou should only import strings from known and\nreputable sources. Never import a string whose\nsource is not trusted.";
+
+VUHDO_I18N_LUNAR_POWER = "Astral Power";
+VUHDO_I18N_MAELSTROM = "Maelstrom";
+VUHDO_I18N_INSANITY = "Insanity";
+
diff --git a/VuhDoOptions/VuhDoLocalization_ru.lua b/VuhDoOptions/VuhDoLocalization_ru.lua
index 765c7e5..d20a7c9 100644
--- a/VuhDoOptions/VuhDoLocalization_ru.lua
+++ b/VuhDoOptions/VuhDoLocalization_ru.lua
@@ -721,6 +721,10 @@ VUHDO_I18N_TT.K555 = "Check to allow the VuhDo menu command to be bound even whe
 VUHDO_I18N_TT.K556 = "Check this to have an extra panel for boss encounter NPCs (eg. shards on Tectus, mushrooms on Brackenspore).";
 VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == VUHDO_unitInfo\[\"name\"\])";
 VUHDO_I18N_TT.K558 = "Hide buff watch while out of combat.";
+VUHDO_I18N_TT.K559 = "Click to select focus bar color.";
+VUHDO_I18N_TT.K560 = "Click to select astral power bar color.";
+VUHDO_I18N_TT.K561 = "Click to select maelstrom bar color.";
+VUHDO_I18N_TT.K562 = "Click to select insanity bar color.";
 
 VUHDO_I18N_DEFAULT_PROFILE = "Default Profile";
 VUHDO_I18N_DEFAULT_LAYOUT = "Default Layout";
@@ -1274,3 +1278,8 @@ VUHDO_I18N_HIDE_OUT_OF_COMBAT = "Show Only\nIn Combat";
 VUHDO_I18N_IMPORT = "Import";
 VUHDO_I18N_IMPORT_STRING_INVALID = "Import string was invalid.";
 VUHDO_I18N_REALLY_IMPORT = "Do you really want to import?\n\nYou should only import strings from known and\nreputable sources. Never import a string whose\nsource is not trusted.";
+
+VUHDO_I18N_LUNAR_POWER = "Astral Power";
+VUHDO_I18N_MAELSTROM = "Maelstrom";
+VUHDO_I18N_INSANITY = "Insanity";
+
diff --git a/VuhDoOptions/VuhDoLocalization_zhCN.lua b/VuhDoOptions/VuhDoLocalization_zhCN.lua
index 8548bc8..9f48287 100644
--- a/VuhDoOptions/VuhDoLocalization_zhCN.lua
+++ b/VuhDoOptions/VuhDoLocalization_zhCN.lua
@@ -615,6 +615,10 @@ VUHDO_I18N_TT.K555 = "Check to allow the VuhDo menu command to be bound even whe
 VUHDO_I18N_TT.K556 = "Check this to have an extra panel for boss encounter NPCs (eg. shards on Tectus, mushrooms on Brackenspore).";
 VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == VUHDO_unitInfo\[\"name\"\])";
 VUHDO_I18N_TT.K558 = "Hide buff watch while out of combat.";
+VUHDO_I18N_TT.K559 = "Click to select focus bar color.";
+VUHDO_I18N_TT.K560 = "Click to select astral power bar color.";
+VUHDO_I18N_TT.K561 = "Click to select maelstrom bar color.";
+VUHDO_I18N_TT.K562 = "Click to select insanity bar color.";
 
 VUHDO_I18N_DEFAULT_PROFILE = "Default Profile";
 VUHDO_I18N_DEFAULT_LAYOUT = "Default Layout";
@@ -1096,3 +1100,8 @@ VUHDO_I18N_HIDE_OUT_OF_COMBAT = "Show Only\nIn Combat";
 VUHDO_I18N_IMPORT = "Import";
 VUHDO_I18N_IMPORT_STRING_INVALID = "Import string was invalid.";
 VUHDO_I18N_REALLY_IMPORT = "Do you really want to import?\n\nYou should only import strings from known and\nreputable sources. Never import a string whose\nsource is not trusted.";
+
+VUHDO_I18N_LUNAR_POWER = "Astral Power";
+VUHDO_I18N_MAELSTROM = "Maelstrom";
+VUHDO_I18N_INSANITY = "Insanity";
+
diff --git a/VuhDoOptions/VuhDoLocalization_zhTW.lua b/VuhDoOptions/VuhDoLocalization_zhTW.lua
index 0983e2b..79315ec 100644
--- a/VuhDoOptions/VuhDoLocalization_zhTW.lua
+++ b/VuhDoOptions/VuhDoLocalization_zhTW.lua
@@ -615,6 +615,10 @@ VUHDO_I18N_TT.K555 = "Check to allow the VuhDo menu command to be bound even whe
 VUHDO_I18N_TT.K556 = "Check this to have an extra panel for boss encounter NPCs (eg. shards on Tectus, mushrooms on Brackenspore).";
 VUHDO_I18N_TT.K557 = "Body of the custom flag function. Must return true or false. Example: return (\"YOURNAME\" == VUHDO_unitInfo\[\"name\"\])";
 VUHDO_I18N_TT.K558 = "Hide buff watch while out of combat.";
+VUHDO_I18N_TT.K559 = "Click to select focus bar color.";
+VUHDO_I18N_TT.K560 = "Click to select astral power bar color.";
+VUHDO_I18N_TT.K561 = "Click to select maelstrom bar color.";
+VUHDO_I18N_TT.K562 = "Click to select insanity bar color.";
 
 VUHDO_I18N_DEFAULT_PROFILE = "Default Profile";
 VUHDO_I18N_DEFAULT_LAYOUT = "Default Layout";
@@ -1096,3 +1100,8 @@ VUHDO_I18N_HIDE_OUT_OF_COMBAT = "Show Only\nIn Combat";
 VUHDO_I18N_IMPORT = "Import";
 VUHDO_I18N_IMPORT_STRING_INVALID = "Import string was invalid.";
 VUHDO_I18N_REALLY_IMPORT = "Do you really want to import?\n\nYou should only import strings from known and\nreputable sources. Never import a string whose\nsource is not trusted.";
+
+VUHDO_I18N_LUNAR_POWER = "Astral Power";
+VUHDO_I18N_MAELSTROM = "Maelstrom";
+VUHDO_I18N_INSANITY = "Insanity";
+
diff --git a/VuhDoOptions/VuhDoNewOptionsColorsPowers.xml b/VuhDoOptions/VuhDoNewOptionsColorsPowers.xml
index dd444ff..7aaafa7 100644
--- a/VuhDoOptions/VuhDoNewOptionsColorsPowers.xml
+++ b/VuhDoOptions/VuhDoNewOptionsColorsPowers.xml
@@ -3,12 +3,12 @@
 		<Frames>
 			<Frame name="$parentPowerTypesPanel" inherits="VuhDoPanelTemplate">
 				<Size>
-					<AbsDimension x="126" y="249" />
+					<AbsDimension x="126" y="359" />
 				</Size>
 				<Anchors>
 					<Anchor point="TOPLEFT">
 						<Offset>
-							<AbsDimension x="146" y="-72" />
+							<AbsDimension x="146" y="-42" />
 						</Offset>
 					</Anchor>
 				</Anchors>
@@ -102,12 +102,63 @@
 						<Scripts>
 							<OnLoad>
 								VUHDO_lnfSetModel(self, "VUHDO_POWER_TYPE_COLORS.##2");
-								VUHDO_lnfInitColorSwatch(self, "Energy", "Energy");
-								VUHDO_lnfSetTooltip(self, nil);
+								VUHDO_lnfInitColorSwatch(self, VUHDO_I18N_FOCUS, VUHDO_I18N_FOCUS);
+								VUHDO_lnfSetTooltip(self, VUHDO_I18N_TT.K559);
 							</OnLoad>
 						</Scripts>
 					</Frame>
 
+					<Frame name="$parentLunarPowerTexture" inherits="VuhDoColorSwatchTexture">
+						<Anchors>
+							<Anchor point="TOPLEFT">
+								<Offset>
+									<AbsDimension x="13" y="-240" />
+								</Offset>
+							</Anchor>
+						</Anchors>
+						<Scripts>
+							<OnLoad>
+								VUHDO_lnfSetModel(self, "VUHDO_POWER_TYPE_COLORS.##8");
+								VUHDO_lnfInitColorSwatch(self, VUHDO_I18N_LUNAR_POWER, VUHDO_I18N_LUNAR_POWER);
+								VUHDO_lnfSetTooltip(self, VUHDO_I18N_TT.K560);
+							</OnLoad>
+						</Scripts>
+					</Frame>
+
+					<Frame name="$parentMaelstromTexture" inherits="VuhDoColorSwatchTexture">
+						<Anchors>
+							<Anchor point="TOPLEFT">
+								<Offset>
+									<AbsDimension x="13" y="-278" />
+								</Offset>
+							</Anchor>
+						</Anchors>
+						<Scripts>
+							<OnLoad>
+								VUHDO_lnfSetModel(self, "VUHDO_POWER_TYPE_COLORS.##11");
+								VUHDO_lnfInitColorSwatch(self, VUHDO_I18N_MAELSTROM, VUHDO_I18N_MAELSTROM);
+								VUHDO_lnfSetTooltip(self, VUHDO_I18N_TT.K561);
+							</OnLoad>
+						</Scripts>
+					</Frame>
+
+					<Frame name="$parentInsanityTexture" inherits="VuhDoColorSwatchTexture">
+						<Anchors>
+							<Anchor point="TOPLEFT">
+								<Offset>
+									<AbsDimension x="13" y="-316" />
+								</Offset>
+							</Anchor>
+						</Anchors>
+						<Scripts>
+							<OnLoad>
+								VUHDO_lnfSetModel(self, "VUHDO_POWER_TYPE_COLORS.##13");
+								VUHDO_lnfInitColorSwatch(self, VUHDO_I18N_INSANITY, VUHDO_I18N_INSANITY);
+								VUHDO_lnfSetTooltip(self, VUHDO_I18N_TT.K562);
+							</OnLoad>
+						</Scripts>
+					</Frame>
+					
 				</Frames>
 			</Frame>
 		</Frames>
diff --git a/VuhDoRoleChecker.lua b/VuhDoRoleChecker.lua
index e213613..a2be780 100644
--- a/VuhDoRoleChecker.lua
+++ b/VuhDoRoleChecker.lua
@@ -305,8 +305,8 @@ function VUHDO_determineRole(aUnit)
 		end
 
 	elseif 28 == tClassId then -- VUHDO_ID_PRIESTS
-		_, _, tBuffExist = UnitBuff(aUnit, VUHDO_SPELL_ID.SHADOWFORM);
-		if (tBuffExist) then
+		tPowerType = UnitPowerType(aUnit);
+		if VUHDO_UNIT_POWER_INSANITY == tPowerType then
 			VUHDO_FIX_ROLES[tName] = 62; -- VUHDO_ID_RANGED_DAMAGE
 			return 62; -- VUHDO_ID_RANGED_DAMAGE
 		else
@@ -326,13 +326,10 @@ function VUHDO_determineRole(aUnit)
 	elseif 27 == tClassId then -- VUHDO_ID_DRUIDS
 		tPowerType = UnitPowerType(aUnit);
 		if VUHDO_UNIT_POWER_MANA == tPowerType then
-			_, _, tBuffExist = UnitBuff(aUnit, VUHDO_SPELL_ID.MOONKIN_FORM);
-			if tBuffExist then
-				VUHDO_FIX_ROLES[tName] = 62; -- VUHDO_ID_RANGED_DAMAGE
-				return 62; -- VUHDO_ID_RANGED_DAMAGE
-			else
-				return 63; -- VUHDO_ID_RANGED_HEAL
-			end
+			return 63; -- VUHDO_ID_RANGED_HEAL
+		elseif VUHDO_UNIT_POWER_LUNAR_POWER == tPowerType then
+			VUHDO_FIX_ROLES[tName] = 62; --	VUHDO_ID_RANGED_DAMAGE
+			return 62; -- VUHDO_ID_RANGED_DAMAGE
 		elseif VUHDO_UNIT_POWER_RAGE == tPowerType then
 			VUHDO_FIX_ROLES[tName] = 60; -- VUHDO_ID_MELEE_TANK
 			return 60; -- VUHDO_ID_MELEE_TANK
@@ -370,10 +367,11 @@ function VUHDO_determineRole(aUnit)
 		if tAgility > tIntellect then
 			return 61; -- VUHDO_ID_MELEE_DAMAGE
 		else
-			if VUHDO_DF_TOOL_ROLES[tName] == 61 then -- VUHDO_ID_MELEE_DAMAGE
+			tPowerType = UnitPowerType(aUnit);
+			if VUHDO_UNIT_POWER_MAELSTROM == tPowerType then -- VUHDO_ID_RANGED_DAMAGE
 				return 62; -- VUHDO_ID_RANGED_DAMAGE
 			else
-				return 63; -- Can't tell, assume its a healer -- VUHDO_ID_RANGED_HEAL
+				return 63; -- VUHDO_ID_RANGED_HEAL
 			end
 		end
 	end
diff --git a/changelog.txt b/changelog.txt
index ecc190b..3c6b397 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -28,6 +28,7 @@ Bugfixes:
 
 
 Improvements:
+-- Added new power types and power colors (Astral Power, Maelstrom, Insanity)
 
 
 --------------------------------------------------------------
-- 
GitLab