Quantcast

Removed unused configuration options (all elemental specific), added Elemental Blast

Taracque [08-29-16 - 12:20]
Removed unused configuration options (all elemental specific), added Elemental Blast
Filename
modules/elemental.lua
diff --git a/modules/elemental.lua b/modules/elemental.lua
index 18297a0..315e514 100755
--- a/modules/elemental.lua
+++ b/modules/elemental.lua
@@ -4,34 +4,6 @@ Elementarist:RegisterModule("elemental");

 Elementarist.elemental = {
 	["Configuration"] = {
-			["Behavior"] = {
-			["type"]	= "DropDown",
-			["vposition"] =  -70,
-			["hposition"] =  38,
-			["label"]	=	L.CONFIG_BEHAVIOR,
-			["options"]	= {
-				{text	=	L.BEHAVIOR_KEEP_FS_UP},
-				{text	=	L.BEHAVIOR_FS_BEFORE_LVB}
-			}
-		},
-		["enableEQ"] = {
-			["type"]	=	"CheckBox",
-			["vposition"] =  -215,
-			["hposition"] =  10,
-			["label"]	=	L.CONFIG_ENABLE_EQ_SPELL
-		},
-		["showHealingStream"] = {
-			["type"]	=	"CheckBox",
-			["vposition"] =  -245,
-			["hposition"] =  10,
-			["label"]	=	L.CONFIG_ENABLE_HS_TOTEM
-		},
-		["disableLM"] = {
-			["type"]	=	"CheckBox",
-			["vposition"] =  -185,
-			["hposition"] =  10,
-			["label"]	=	L.CONFIG_DISABLE_LM_SPELL
-		},
 	};
 	Initialize = function(self)
 		Elementarist:LoadSpells({
@@ -41,10 +13,9 @@ Elementarist.elemental = {
 			["Healing Stream Totem"] = GetSpellInfo(5394),
 			["Liquid Magma"] = GetSpellInfo(152255),
 			["Enhanced Chain Lightning"]  = GetSpellInfo(157766),
-			["Storm Elemental Totem"] = GetSpellInfo(152256),
 			["Flame Shock"] = GetSpellInfo(188389),
-			["Ember Totem"] = GetSpellInfo(210658),
 			["Totem Mastery"] = GetSpellInfo(210643),
+			["Fire Elemental"] = GetSpellInfo(198067)
 		});

 		Elementarist.role = "DPS";
@@ -65,10 +36,6 @@ Elementarist.elemental = {
 		local lastSpell
 		local boostFSpriority = false
 		local _
-		local EBTalent = (Elementarist.tier4Talent == 1)
-		local UFTalent = (Elementarist.tier6Talent == 21773)
-		local EFTalent = (Elementarist.tier7Talent == 21198)
-		local LMTalent = (Elementarist.tier7Talent == 21200)
 		local fsRefreshPercentage=0.3
 		if Elementarist.hasT18_Class_Trinket then
 			fsRefreshPercentage=fsRefreshPercentage + 0.48
@@ -201,7 +168,7 @@ Elementarist.elemental = {
 		end

 		-- Elemental Blast if available
-		if (EBTalent) then
+		if (Elementarist.talents[4] == 1) then
 			if ((Elementarist:ZeroCount(Elementarist.SpellList["Elemental Blast"],spellInCast,exspell1,exspell2) ) and
 				(IsSpellInRange(Elementarist.SpellList["Elemental Blast"], "target") == 1) ) then
 				d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Elemental Blast"])
@@ -228,9 +195,20 @@ Elementarist.elemental = {
 		end

 		-- Earthquake if 3 or more targets
+		if (Elementarist.person["foeCount"]>=3) and Elementarist:SpellAvailable(Elementarist.SpellList["Earthquake"]) then
+			if (Elementarist:Count(Elementarist.SpellList["Earthquake"],spellInCast,exspell1,exspell2) == 0) then
+				return Elementarist.SpellList["Earthquake"]
+			end
+		end

 		-- Earth Shock if Maelstrom > 90
-
+		if (UnitPower("player",11)>=90) and (Elementarist:ZeroCount(Elementarist.SpellList["Earth Shock"],spellInCast,exspell1,exspell2)) then
+			d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Earth Shock"])
+			if ((d - timeshift) <= 0) then
+				return Elementarist.SpellList["Earth Shock"]
+			end
+		end
+
 		-- Chain Lightning for more than 1 targets
 		if (Elementarist.person["foeCount"]>1) and Elementarist:SpellAvailable(Elementarist.SpellList["Chain Lightning"]) then
 			return Elementarist.SpellList["Chain Lightning"]
@@ -246,8 +224,8 @@ Elementarist.elemental = {
 	end;
 	MiscSpell = function(self)
 		-- Miscelaneous spell order:
-		-- Lightning Shield
-		-- Searing Totem
+		-- Fire Elemental
+		-- Ascendance
 		-- Elemental Mastery
 		-- Berserking troll racial (if available)
 		-- Blood Fury orc racial
@@ -312,40 +290,11 @@ Elementarist.elemental = {
 			end
 		end

-		-- Lightning Shield
-		if Elementarist:SpellAvailable(Elementarist.SpellList["Lightning Shield"]) then
-			name, _, _, _, _, _, expirationTime = Elementarist:hasBuff("player", Elementarist.SpellList["Lightning Shield"]);
-			if (name == nil) or (expirationTime < 1) then
-				return Elementarist.SpellList["Lightning Shield"]
-			end
-		end
-
-		-- Fire Elemental Totem
-		if Elementarist:SpellAvailable(Elementarist.SpellList["Fire Elemental Totem"]) then
-			d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Fire Elemental Totem"])
+		-- Fire Elemental
+		if Elementarist:SpellAvailable(Elementarist.SpellList["Fire Elemental"]) then
+			d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Fire Elemental"])
 			if d <= 0.5 then
-				return Elementarist.SpellList["Fire Elemental Totem"]
-			end
-		end
-
-		-- Storm Elemental Totem
-		if (Elementarist.tier7Talent == 21199) then
-			if Elementarist:SpellAvailable(Elementarist.SpellList["Storm Elemental Totem"]) then
-				d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Storm Elemental Totem"])
-				if d <= 0.5 then
-					return Elementarist.SpellList["Storm Elemental Totem"]
-				end
-			end
-		end
-
-		-- Liquid Magma if not in rotation and Tier7 talent is Liquid Magma and fire totem has 10 sec or more
-		if (Elementarist.tier7Talent == 21200) and (ElementaristDB.disableLM) then
-			local haveFireTotem,fireTotemName,fireTotemStart,fireTotemDuration = GetTotemInfo(1);
-			if (fireTotemName ~= "") and (fireTotemDuration and (fireTotemStart + fireTotemDuration - GetTime() ) >= 10) then
-				d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Liquid Magma"])
-				if (d<=0.5) then
-					return Elementarist.SpellList["Liquid Magma"]
-				end
+				return Elementarist.SpellList["Fire Elemental"]
 			end
 		end

@@ -384,39 +333,17 @@ Elementarist.elemental = {
 			end
 		end

-		-- Healing Stream Totem
-		if (ElementaristDB.showHealingStream) and (Elementarist:SpellAvailable(Elementarist.SpellList["Healing Stream Totem"])) then
-			local haveWaterTotem,waterTotemName,_,_ = GetTotemInfo(3)
-			if (waterTotemName == "") then
-				e = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Healing Stream Totem"]);
-				if (e < 1) then
-					return Elementarist.SpellList["Healing Stream Totem"];
-				end;
-			end
-		end
 		return ""
 	end;
 	IntSpell = function(self)
 		-- interruptions, purge, and AoE on target
 		local d
-		local eclBuff, _, _, _, _, _, eclExp = Elementarist:hasBuff("player",Elementarist.SpellList["Enhanced Chain Lightning"])
-
-		---- Earthquake with Enhanced chain lightning buff
-		if Elementarist:SpellAvailable(Elementarist.SpellList["Earthquake"]) then
-			if (eclBuff) then
-				d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Earthquake"])
-				if (d) and (d<0.5) then
-					return Elementarist.SpellList["Earthquake"]
-				end
-			end
-		end
-
+
 		if Elementarist:SpellAvailable(Elementarist.SpellList["Wind Shear"]) then
 			d = Elementarist:GetSpellCooldownRemaining(Elementarist.SpellList["Wind Shear"])
 			if ( (IsSpellInRange(Elementarist.SpellList["Wind Shear"], "target") == 1) and (d) and (d<0.5)  ) then
 				local _, status, threatpct, _, _ = UnitDetailedThreatSituation("player", "target")

-
 				--- windshear to drop threat
 				if ( (status) and (threatpct>80) and (Elementarist.person["friendCount"]>1) and (Elementarist.inParty>0)) then
 					return Elementarist.SpellList["Wind Shear"]
@@ -436,8 +363,6 @@ Elementarist.elemental = {
 			end
 		end

-
-
 		if (Elementarist.person["foeCount"]>2) then
 			----  Lava beam if available
 			if Elementarist:SpellAvailable(Elementarist.SpellList["Lava Beam"]) then