Quantcast

- druid: fixes for balance

Sidoine De Wispelaere [05-08-09 - 09:28]
- druid: fixes for balance
- elemental shaman fixes
- added TotemExpires() condition

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@56 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
Condition.lua
defaut/Chaman.lua
defaut/Druide.lua
diff --git a/Condition.lua b/Condition.lua
index 39bb292..17ce316 100644
--- a/Condition.lua
+++ b/Condition.lua
@@ -8,6 +8,14 @@ local runeType =
 	death = 4
 }

+local totemType =
+{
+	fire = 1,
+	earth = 2,
+	water = 3,
+	air = 4
+}
+
 local function avecHate(temps, hate)
 	if (not hate) then
 		return temps
@@ -338,8 +346,9 @@ Ovale.conditions=
 	-- mine : 1 means that the debuff must be yours
 	TargetDebuffPresent = function(condition)
 		local timeLeft, stacksLeft = GetTargetAura(condition, "HARMFUL", "target")
+		local tempsMin = avecHate(condition[2], condition.haste)

-		if (timeLeft and (condition[2]==nil or timeLeft>condition[2])) then
+		if (timeLeft and (condition[2]==nil or timeLeft>tempsMin)) then
 			if (stacksLeft~=0 and condition.stacks and stacksLeft<condition.stacks) then
 				return nil
 			else
@@ -372,5 +381,20 @@ Ovale.conditions=
 	-- 1 : "yes" (it should be the player) or "no"
 	TargetTargetIsPlayer = function(condition)
 		return testbool(UnitIsUnit("player","targettarget"), condition[1])
+	end,
+	TotemExpires = function(condition)
+		local haveTotem, totemName, startTime, duration = GetTotemInfo(totemType[condition[1]])
+		if (totemName==nil) then
+			return 0
+		end
+		if (condition.totem and Ovale:GetSpellInfoOrNil(condition.totem)~=totemName) then
+			return 0
+		end
+		local timeLeft = duration - (Ovale.maintenant - startTime)
+		if (condition[2] and timeLeft<condition[2]) then
+			return 0
+		else
+			return timeLeft
+		end
 	end
 }
\ No newline at end of file
diff --git a/defaut/Chaman.lua b/defaut/Chaman.lua
index 3383a61..9768782 100644
--- a/defaut/Chaman.lua
+++ b/defaut/Chaman.lua
@@ -15,9 +15,51 @@ Define(ELEMENTALMASTERY 16166)
 Define(SHAMANISTICRAGE 30823)
 Define(THUNDERSTORM 51490)
 Define(FERALSPIRIT 51533)
+Define(HEROISM 32182)
+Define(BLOODLUST 2825)
+
+#Fire
+Define(TOTEMOFWRATH 30706)
+Define(FIREELEMENTALTOTEM 2894)
+Define(FIRENOVATOTEM 1535)
+Define(FLAMETONGTOTEM 8227)
+Define(FROSTRESISTANCETOTEM 8181)
+Define(MAGMATOTEM 8190)
+Define(SEARINGTOTEM 3599)
+#Water
+Define(CLEANSINGTOTEM 8170)
+Define(FIRERESISTANCETOTEM 8184)
+Define(HEALINGSTREAMTOTEM 5394)
+Define(MANASPRINGTOTEM 5675)
+#Air
+Define(GROUNDINGTOTEM 8177)
+Define(NATURERESISTANCETOTEM 10595)
+Define(WINDFURYTOTEM 8512)
+Define(WRATHOFAIRTOTEM 3738)
+#Earth
+Define(STONESKINTOTEM 8071)
+Define(STRENGTHOFEARTHTOTEM 8075)
+Define(TREMORTOTEM 8143)

 AddCheckBox(chain SpellName(CHAINLIGHTNING))
 AddCheckBox(melee L(Melee))
+AddListItem(fire wrath SpellName(TOTEMOFWRATH))
+AddListItem(fire nova SpellName(FIRENOVATOTEM))
+AddListItem(fire tong SpellName(FLAMETONGTOTEM))
+AddListItem(fire frost SpellName(FROSTRESISTANCETOTEM))
+AddListItem(fire magma SpellName(MAGMATOTEM))
+AddListItem(fire searing SpellName(SEARINGTOTEM))
+AddListItem(water clean SpellName(CLEANSINGTOTEM))
+AddListItem(water fire SpellName(FIRERESISTANCETOTEM))
+AddListItem(water heal SpellName(HEALINGSTREAMTOTEM))
+AddListItem(water mana SpellName(MANASPRINGTOTEM))
+AddListItem(air ground SpellName(GROUNDINGTOTEM))
+AddListItem(air nature SpellName(NATURERESISTANCETOTEM))
+AddListItem(air wind SpellName(WINDFURYTOTEM))
+AddListItem(air wrath SpellName(WRATHOFAIRTOTEM))
+AddListItem(earth stone SpellName(STONESKINTOTEM))
+AddListItem(earth strength SpellName(STRENGTHOFEARTHTOTEM))
+AddListItem(earth tremor SpellName(TREMORTOTEM))

 AddIcon
 {
@@ -33,10 +75,12 @@ AddIcon
 	if CheckBoxOn(melee)
 	{
 		if TargetDebuffExpires(FLAMESHOCK 0) Spell(FLAMESHOCK)
+		if TargetDebuffExpires(FLAMESHOCK 1.5 haste=spell) and 1.5s before Spell(LAVALASH)
+			Spell(FLAMESHOCK)
 		if TargetDebuffPresent(FLAMESHOCK 5) Spell(EARTHSHOCK)
 		if BuffExpires(LIGHTNINGSHIELD 0) Spell(LIGHTNINGSHIELD)
 		Spell(STORMSTRIKE)
-		Spell(LAVALASH)
+		if TargetDebuffPresent(FLAMESHOCK 1.5 haste=spell) Spell(LAVALASH)
 		if CheckBoxOn(chain) and BuffPresent(MAELSTROMWEAPON stacks=5) Spell(CHAINLIGHTNING doNotRepeat=1)
 		if BuffPresent(MAELSTROMWEAPON stacks=5) Spell(LIGHTNINGBOLT doNotRepeat=1)
 	}
@@ -46,6 +90,7 @@ AddIcon
 {
 	Spell(ELEMENTALMASTERY)
 	Spell(FERALSPIRIT)
+	Spell(FIREELEMENTALTOTEM)
 }

 AddIcon size=small
@@ -55,4 +100,43 @@ AddIcon size=small
 	if ManaPercent(less 50)
 		Spell(THUNDERSTORM)
 }
+
+AddIcon size=small
+{
+	Spell(HEROISM)
+	Spell(BLOODLUST)
+}
+
+AddIcon size=small
+{
+	if TotemExpires(fire)
+	{
+		if List(fire wrath) Spell(TOTEMOFWRATH)
+		if List(fire nova) Spell(FIRENOVATOTEM)
+		if List(fire tong) Spell(FLAMETONGTOTEM)
+		if List(fire frost) Spell(FROSTRESISTANCETOTEM)
+		if List(fire magma) Spell(MAGMATOTEM)
+		if List(fire searing) Spell(SEARINGTOTEM)
+	}
+	if TotemExpires(water)
+	{
+		if List(water clean) Spell(CLEANSINGTOTEM)
+		if List(water fire) Spell(FIRERESISTANCETOTEM)
+		if List(water heal) Spell(HEALINGSTREAMTOTEM)
+		if List(water mana) Spell(MANASPRINGTOTEM)
+	}
+	if TotemExpires(air)
+	{
+		if List(air ground) Spell(GROUNDINGTOTEM)
+		if List(air nature) Spell(NATURERESISTANCETOTEM)
+		if List(air wind) Spell(WINDFURYTOTEM)
+		if List(air wrath) Spell(WRATHOFAIRTOTEM)
+	}
+	if TotemExpires(earth)
+	{
+		if List(earth stone) Spell(STONESKINTOTEM)
+		if List(earth strength) Spell(STRENGTHOFEARTHTOTEM)
+		if List(earth tremor) Spell(TREMORTOTEM)
+	}
+}
 ]]
\ No newline at end of file
diff --git a/defaut/Druide.lua b/defaut/Druide.lua
index eaaad5f..e1d6e9d 100644
--- a/defaut/Druide.lua
+++ b/defaut/Druide.lua
@@ -27,6 +27,7 @@ AddCheckBox(multi L(AOE))
 AddCheckBox(blood L(Blood))
 AddCheckBox(demo SpellName(DEMOROAR))
 AddCheckBox(lucioles SpellName(FAERIEFIRE))
+AddCheckBox(wrath SpellName(WRATH))

 AddIcon
 {
@@ -73,16 +74,25 @@ AddIcon
 	unless Stance(1) or Stance(3)
 	{
 		if CheckBoxOn(lucioles) and TargetDebuffExpires(FAERIEFIRE 2)
-		Spell(FAERIEFIRE)
+			Spell(FAERIEFIRE)

-		if TargetDebuffExpires(MOONFIRE 0)
-			Spell(MOONFIRE)
 		if TargetDebuffExpires(INSECTSWARM 0)
 			Spell(INSECTSWARM)
+		if TargetDebuffExpires(MOONFIRE 0)
+			Spell(MOONFIRE)

-		unless BuffPresent(ECLIPSEWRATH)
+		if CheckBoxOff(wrath)
+		{
+			if BuffPresent(ECLIPSEWRATH)
+				Spell(WRATH)
 			Spell(STARFIRE)
-		Spell(WRATH)
+		}
+		if CheckBoxOn(wrath)
+		{
+			if BuffPresent(ECLIPSESTARFIRE)
+				Spell(STARFIRE)
+			Spell(WRATH)
+		}
 	}
 }