Quantcast

- prediction for enhancement shaman, feral druid and fire & arcane mage

Sidoine De Wispelaere [11-29-09 - 19:14]
- prediction for enhancement shaman, feral druid and fire & arcane mage
- some PTR changes in comments

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@145 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
Condition.lua
Ovale.lua
defaut/Chaman.lua
defaut/Chasseur.lua
defaut/Druide.lua
defaut/Mage.lua
diff --git a/Condition.lua b/Condition.lua
index e7851cc..21ecf10 100644
--- a/Condition.lua
+++ b/Condition.lua
@@ -470,31 +470,31 @@ Ovale.conditions=
 		if (condition[1] == "more") then
 			local _,className = UnitClass("player")
 			if (className == "ROGUE" or (className == "DRUID" and GetShapeshiftForm(true) == 3)) then
-				local current = UnitPower("player")
+				local current = Ovale.state.mana
 				if (current > condition[2]) then
-					return 0
+					if condition[1]=="more"  then
+						return 0
+					else
+						return nil
+					end
 				else
 					local rate= 10
 					if (className == "ROGUE") then
-						local i=1
 						local rush = Ovale:GetSpellInfoOrNil(13750)
-						while (true) do
-							local name = UnitBuff("player", i)
-							if (not name) then
-								break
-							end
-							if (name == rush) then
-								rate = rate * 2
-								break
-							end
-							i = i + 1
+						if UnitBuff("player", rush) then
+							rate = rate * 2
 						end
 					end
-					return (condition[2] - current) / rate
+					local limit = math.ceil((condition[2] - current) / rate + Ovale.maintenant)
+					if condition[1]=="more" then
+						return limit
+					else
+						return 0, limit
+					end
 				end
 			end
 		end
-		return compare(UnitPower("player"), condition[1], condition[2])
+		return compare(Ovale.state.mana, condition[1], condition[2])
 	end,
 	ManaPercent = function(condition)
 		return compare(UnitPower("player")/UnitPowerMax("player"), condition[1], condition[2]/100)
diff --git a/Ovale.lua b/Ovale.lua
index ffd8d1c..be0cef8 100644
--- a/Ovale.lua
+++ b/Ovale.lua
@@ -848,6 +848,11 @@ function Ovale:AddSpellToStack(spellName, startCast, endCast, nextCast)
 	if spellName then
 		newSpellInfo = self.spellInfo[spellName]
 	end
+
+	if startCast>Ovale.maintenant then
+		local _, _, _, cost = GetSpellInfo(spellName)
+		self.state.mana = self.state.mana - cost
+	end

 	self.attenteFinCast = nextCast
 	self.currentSpellName = spellName
@@ -880,7 +885,7 @@ function Ovale:AddSpellToStack(spellName, startCast, endCast, nextCast)
 			end
 		end
 	end
-
+
 	if newSpellInfo then
 		local cd = self:GetCD(spellName)
 		if cd then
@@ -932,6 +937,7 @@ function Ovale:InitCalculerMeilleureAction()
 	self.attenteFinCast = Ovale.maintenant
 	self.spellStack.length = 0
 	self.state.combo = GetComboPoints("player")
+	self.state.mana = UnitPower("player")
 	if self.className == "DEATHKNIGHT" then
 		for i=1,6 do
 			self.state.rune[i].type = GetRuneType(i)
diff --git a/defaut/Chaman.lua b/defaut/Chaman.lua
index 057f322..12b55b7 100644
--- a/defaut/Chaman.lua
+++ b/defaut/Chaman.lua
@@ -70,6 +70,11 @@ SpellAddBuff(CHAINLIGHTNING MAELSTROMWEAPON=0)
 SpellAddTargetDebuff(FLAMESHOCK FLAMESHOCK=18)
 ScoreSpells(WATERSHIELD FLAMESHOCK LAVABURST CHAINLIGHTNING LIGHTNINGBOLT LAVALASH EARTHSHOCK LIGHTNINGSHIELD
 	STORMSTRIKE)
+SpellInfo(EARTHSHOCK cd=6 sharedcd=shock)
+SpellInfo(FLAMESHOCK cd=6 sharedcd=shock)
+SpellAddBuff(LIGHTNINGSHIELD LIGHTNINGSHIELD=600)
+SpellInfo(LAVALASH cd=6)
+SpellInfo(STORMSTRIKE cd=8)

 AddIcon help=main
 {
diff --git a/defaut/Chasseur.lua b/defaut/Chasseur.lua
index c158794..148b803 100644
--- a/defaut/Chasseur.lua
+++ b/defaut/Chasseur.lua
@@ -16,6 +16,7 @@ Define(LOCKANDLOAD 56453)
 Define(TALENTEXPLOSIVESHOT 2145)
 Define(CALLOFTHEWILD 53434)
 Define(CHIMERASHOT 53209)
+Define(READINESS 23989)

 SpellAddTargetDebuff(EXPLOSIVESHOT EXPLOSIVESHOT=2)
 SpellInfo(EXPLOSIVESHOT cd=6)
@@ -28,6 +29,7 @@ SpellInfo(CHIMERASHOT cd=10)
 SpellInfo(RAPIDFIRE cd=300)
 SpellInfo(KILLCOMMAND cd=60)
 SpellInfo(BESTIALWRATH cd=120)
+SpellInfo(ARCANESHOT cd=6)
 SpellAddTargetDebuff(HUNTERSMARK HUNTERSMARK=300)

 AddCheckBox(multi SpellName(MULTISHOT))
@@ -56,5 +58,6 @@ AddIcon help=cd
 	Item(Trinket1Slot usable=1)
 	Spell(CALLOFTHEWILD usable=1)
 	Spell(RAPIDFIRE)
+	Spell(READINESS)
 }
 ]]
diff --git a/defaut/Druide.lua b/defaut/Druide.lua
index 8248dd7..96c43f7 100644
--- a/defaut/Druide.lua
+++ b/defaut/Druide.lua
@@ -31,6 +31,7 @@ AddCheckBox(mangle SpellName(MANGLECAT) default)
 AddCheckBox(demo SpellName(DEMOROAR) default)
 AddCheckBox(lucioles SpellName(FAERIEFIRE) default)
 AddCheckBox(wrath SpellName(WRATH))
+AddCheckBox(shred SpellName(SHRED) default)

 ScoreSpells(FAERIEFERAL DEMOROAR MANGLEBEAR LACERATE SAVAGEROAR RIP
 		TIGERSFURY MANGLECAT RAKE SHRED FEROCIOUSBITE INSECTSWARM MOONFIRE
@@ -46,6 +47,15 @@ SpellAddTargetDebuff(MANGLECAT MANGLECAT=12)
 SpellAddTargetDebuff(RAKE RAKE=9)
 SpellAddTargetDebuff(INSECTSWARM INSECTSWARM=12)
 SpellAddTargetDebuff(MOONFIRE MOONFIRE=12)
+SpellInfo(TIGERSFURY cd=30)
+SpellInfo(BERSERK cd=180)
+SpellInfo(FORCEOFNATURE cd=180)
+SpellInfo(MANGLECAT combo=1)
+SpellInfo(RAKE combo=1)
+SpellInfo(SHRED combo=1)
+SpellInfo(SAVAGEROAR combo=-5)
+SpellInfo(RIP combo=-5)
+SpellInfo(FEROCIOUSBITE combo=-5)

 AddIcon help=main
 {
@@ -89,10 +99,10 @@ AddIcon help=main
 				Spell(MANGLECAT)
 			if TargetDebuffExpires(RAKE 0 mine=1) and Mana(more 34)
 				Spell(RAKE)
-			if Mana(more 42) Spell(SHRED)
+			if Mana(more 42) and CheckBoxOn(shred) Spell(SHRED)
 		}

-		if BuffPresent(CLEARCASTING) Spell(SHRED)
+		if BuffPresent(CLEARCASTING) and CheckBoxOn(shred) Spell(SHRED)

 		if ComboPoints(more 4) and Mana(more 34)
 		{
@@ -100,7 +110,7 @@ AddIcon help=main
 				Spell(FEROCIOUSBITE)
 			if TargetDeadIn(less 7)
 				Spell(FEROCIOUSBITE)
-			if Mana(more 90)
+			if Mana(more 90) and CheckBoxOn(shred)
 				Spell(SHRED)
 		}
 	}
diff --git a/defaut/Mage.lua b/defaut/Mage.lua
index d185f75..11d19a2 100644
--- a/defaut/Mage.lua
+++ b/defaut/Mage.lua
@@ -17,6 +17,7 @@ Define(FIREBALL 133)
 Define(ARCANEBARRAGE 44425)
 Define(ARCANEMISSILES 5143)
 Define(ARCANEBLAST 30451)
+Define(DEEPFREEZE 44572)
 Define(ARCANEPOWER 12042)

 Define(COMBUSTION 11129)
@@ -27,9 +28,17 @@ Define(PRESENCEOFMIND 12043)

 AddCheckBox(scorch SpellName(SCORCH))

+SpellAddDebuff(PYROBLAST HOTSTREAK=0)
 SpellAddDebuff(ARCANEBLAST ARCANEBLAST=10)
+SpellAddDebuff(ARCANEMISSILES ARCANEBLAST=0)
 SpellAddTargetDebuff(SCORCH IMPROVEDSCORCH=30)
 SpellAddTargetDebuff(LIVINGBOMB LIVINGBOMB=12)
+SpellInfo(MIRRORIMAGE cd=180)
+SpellInfo(ARCANEPOWER cd=84)
+SpellInfo(COMBUSTION cd=180)
+SpellInfo(ICYVEINS cd=144)
+SpellInfo(SUMMONWATERELEMENTAL cd=180)
+
 ScoreSpells(SCORCH PYROBLAST LIVINGBOMB FROSTFIREBOLT FIREBALL SUMMONWATERELEMENTAL FROSTBOLT ARCANEBLAST ARCANEMISSILES)

 AddIcon help=main
@@ -38,6 +47,7 @@ AddIcon help=main
        {
               #Fire spec
               if TargetDebuffExpires(IMPROVEDSCORCH 6 stacks=5) and CheckBoxOn(scorch) and TargetDeadIn(more 15) Spell(SCORCH)
+              #PTR if TargetDebuffExpires(IMPROVEDSCORCH 6) and CheckBoxOn(scorch) and TargetDeadIn(more 15) Spell(SCORCH)
               if BuffPresent(HOTSTREAK) Spell(PYROBLAST)
               if TargetDebuffExpires(LIVINGBOMB 0 mine=1) and TargetDeadIn(more 12) Spell(LIVINGBOMB)
               if TalentPoints(TALENTPIERCINGICE more 0)
@@ -50,6 +60,7 @@ AddIcon help=main
        {
               #Frost spec
               Spell(SUMMONWATERELEMENTAL)
+              #PTR : Spell(DEEPFREEZE)
               Spell(FROSTBOLT)
        }