Quantcast

balance druid: fixes with eclispe

Sidoine De Wispelaere [03-27-11 - 21:40]
balance druid: fixes with eclispe
a lot of fixes allowing to use the second icon (the option was mostly broken)
bug fix for the nored=1 option

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@386 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
Condition.lua
Ovale.lua
OvaleFrame.lua
defaut/Chaman.lua
defaut/Chasseur.lua
defaut/Chevalier.lua
defaut/Demoniste.lua
defaut/Druide.lua
defaut/Guerrier.lua
defaut/Mage.lua
defaut/Paladin.lua
defaut/Voleur.lua
diff --git a/Condition.lua b/Condition.lua
index 578d61b..52432e8 100644
--- a/Condition.lua
+++ b/Condition.lua
@@ -486,7 +486,7 @@ Ovale.conditions=
 		return compare(points, condition[1], condition[2])
 	end,
 	Counter = function(condition)
-		return compare(Ovale.counter[condition[1]], condition[2], condition[3])
+		return compare(Ovale:GetCounterValue(condition[1]), condition[2], condition[3])
 	end,
 	CreatureFamily = function(condition)
 		return testbool(UnitCreatureFamily(getTarget(condition.target)) == LBCT[condition[1]], condition[2])
diff --git a/Ovale.lua b/Ovale.lua
index c13020c..5753e2d 100644
--- a/Ovale.lua
+++ b/Ovale.lua
@@ -51,7 +51,7 @@ Ovale.buff = {}
 Ovale.className = nil
 --the state in the current frame
 --TODO: really, the simulator should be in its own class
-Ovale.state = {rune={}, cd = {}}
+Ovale.state = {rune={}, cd = {}, counter={}}
 --spells that count for scoring
 Ovale.scoreSpell = {}
 --tracks debuffs on the units that are not the current target
@@ -1006,6 +1006,16 @@ function Ovale:AddSpellToList(spellId, lineId, startTime, endTime, channeled)
 	end
 end

+function Ovale:GetCounterValue(id)
+	if self.state.counter[id] then
+		return self.state.counter[id]
+	elseif self.counter[id] then
+		return self.counter[id]
+	else
+		return 0
+	end
+end
+
 function Ovale:UNIT_SPELLCAST_CHANNEL_START(event, unit, name, rank, lineId, spellId)
 	if unit=="player" then
 		--self:Print("UNIT_SPELLCAST_CHANNEL_START "..event.." name="..name.." lineId="..lineId.." spellId="..spellId)
@@ -1256,6 +1266,13 @@ function Ovale:GetCD(spellId)
 	end
 end

+function Ovale:AddEclipse(endCast, spellId)
+	local newAura = self:GetAura("player", "HELPFUL", spellId)
+	newAura.start = endCast + 0.5
+	newAura.stacks = 1
+	newAura.ending = nil
+end
+
 -- Cast a spell in the simulator
 -- spellId : the spell id
 -- startCast : temps du cast
@@ -1284,7 +1301,22 @@ function Ovale:AddSpellToStack(spellId, startCast, endCast, nextCast, nocd)
 	end

 	if Ovale.trace then
-		Ovale:Print("add spell "..spellId.." at "..startCast.." currentTime = "..self.currentTime.. " nextCast="..self.attenteFinCast)
+		Ovale:Print("add spell "..spellId.." at "..startCast.." currentTime = "..self.currentTime.. " nextCast="..self.attenteFinCast .. " endCast="..endCast)
+	end
+
+	--Effet du sort au moment du début du cast
+	--(donc si cast déjà commencé, on n'en tient pas compte)
+	if startCast >= self.maintenant then
+		if newSpellInfo then
+			if newSpellInfo.inccounter then
+				local id = newSpellInfo.inccounter
+				self.state.counter[id] = self:GetCounterValue(id) + 1
+			end
+
+			if newSpellInfo.resetcounter then
+				self.state.counter[newSpellInfo.resetcounter] = 0
+			end
+		end
 	end

 	--Effet du sort au moment où il est lancé
@@ -1297,6 +1329,7 @@ function Ovale:AddSpellToStack(spellId, startCast, endCast, nextCast, nocd)
 		end

 		if newSpellInfo then
+
 			if newSpellInfo.mana then
 				self.state.mana = self.state.mana - newSpellInfo.mana
 			end
@@ -1382,16 +1415,11 @@ function Ovale:AddSpellToStack(spellId, startCast, endCast, nextCast, nocd)
 			self.state.eclipse = self.state.eclipse + newSpellInfo.eclipse
 			if self.state.eclipse < -100 then
 				self.state.eclipse = -100
+				self:AddEclipse(endCast, 48518)
 			elseif self.state.eclipse > 100 then
 				self.state.eclipse = 100
+				self:AddEclipse(endCast, 48517)
 			end
-			--[[self.state.nextEclipse = self.state.eclipse + newSpellInfo.eclipse
-			if self.state.nextEclipse < -100 then
-				self.state.nextEclipse = -100
-			elseif self.state.nextEclipse > 100 then
-				self.state.nextEclipse = 100
-			end
-			self.state.nextEclipseTime = endCast + 0.5]]
 		end
 		if newSpellInfo.starsurge then
 			local buffAura = self:GetAura("player", "HELPFUL", 48517) --Solar
@@ -1413,8 +1441,10 @@ function Ovale:AddSpellToStack(spellId, startCast, endCast, nextCast, nocd)
 			end
 			if self.state.eclipse < -100 then
 				self.state.eclipse = -100
+				self:AddEclipse(endCast, 48518)
 			elseif self.state.eclipse > 100 then
 				self.state.eclipse = 100
+				self:AddEclipse(endCast, 48517)
 			end
 		end

@@ -1430,6 +1460,8 @@ function Ovale:AddSpellToStack(spellId, startCast, endCast, nextCast, nocd)
 						--Optionnellement, on va regarder la durée du buff
 						if auraSpellId and self.spellInfo[auraSpellId] and self.spellInfo[auraSpellId].duration then
 							duration = self.spellInfo[auraSpellId].duration
+						elseif stacks~="refresh" and stacks > 0 then
+							stacks = 1
 						end
 						if stacks=="refresh" then
 							if newAura.ending then
@@ -1451,11 +1483,11 @@ function Ovale:AddSpellToStack(spellId, startCast, endCast, nextCast, nocd)
 							end
 						elseif newAura.ending and newAura.ending >= endCast then
 							newAura.ending = endCast + duration
-							newAura.stacks = newAura.stacks + 1
+							newAura.stacks = newAura.stacks + stacks
 						else
 							newAura.start = endCast
 							newAura.ending = endCast + duration
-							newAura.stacks = 1
+							newAura.stacks = stacks
 						end
 						if Ovale.trace then
 							if auraSpellId then
@@ -1509,41 +1541,27 @@ function Ovale:InitCalculerMeilleureAction()
 		v.toggled = nil
 	end

---	if (Ovale.db.profile.apparence.latencyCorrection) then
-		for i,v in ipairs(self.lastSpell) do
-			if not self.spellInfo[v.spellId] or not self.spellInfo[v.spellId].toggle then
-				--[[local spell, rank, displayName, icon, startTime, endTime, isTradeSkill = UnitCastingInfo("player")
-				if spell and spell == v.name and startTime/1000 - v.start < 0.5 and v.stop~=endTime/1000 then
-					print("ancien = "..v.stop)
-					v.stop = endTime/1000
-					print("changement de v.stop en "..v.stop.." "..v.start)
-				end]]
-				self:Log("self.maintenant = " ..self.maintenant.." spellId="..v.spellId.." v.stop="..v.stop)
-				if self.maintenant - v.stop<5 then
-					self:AddSpellToStack(v.spellId, v.start, v.stop, v.stop, v.nocd)
-				else
-					--self:Print("Removing obsolete "..v.spellId)
-					table.remove(self.lastSpell, i)
-				end
-			end
-		end
-
-		--local spell, rank, displayName, icon, startTime, endTime, isTradeSkill = UnitChannelInfo("player")
-		--if (spell) then
-		--	self:AddSpellToStack(spell, startTime/1000, endTime/1000, endTime/1000)
-		--end
-	--[[else
-		-- On attend que le sort courant soit fini
-		local spell, rank, displayName, icon, startTime, endTime, isTradeSkill = UnitCastingInfo("player")
-		if (spell) then
-			self:AddSpellToStack(spell, startTime/1000, endTime/1000, endTime/1000)
-		else
-			local spell, rank, displayName, icon, startTime, endTime, isTradeSkill = UnitChannelInfo("player")
-			if (spell) then
-				self:AddSpellToStack(spell, startTime/1000, endTime/1000, endTime/1000)
+	for k,v in pairs(self.state.counter) do
+		self.state.counter[k] = self.counter[k]
+	end
+
+	for i,v in ipairs(self.lastSpell) do
+		if not self.spellInfo[v.spellId] or not self.spellInfo[v.spellId].toggle then
+			--[[local spell, rank, displayName, icon, startTime, endTime, isTradeSkill = UnitCastingInfo("player")
+			if spell and spell == v.name and startTime/1000 - v.start < 0.5 and v.stop~=endTime/1000 then
+				print("ancien = "..v.stop)
+				v.stop = endTime/1000
+				print("changement de v.stop en "..v.stop.." "..v.start)
+			end]]
+			self:Log("self.maintenant = " ..self.maintenant.." spellId="..v.spellId.." v.stop="..v.stop)
+			if self.maintenant - v.stop<5 then
+				self:AddSpellToStack(v.spellId, v.start, v.stop, v.stop, v.nocd)
+			else
+				--self:Print("Removing obsolete "..v.spellId)
+				table.remove(self.lastSpell, i)
 			end
 		end
-	end]]
+	end
 end

 local function printTime(temps)
diff --git a/OvaleFrame.lua b/OvaleFrame.lua
index c6d4468..731ae97 100644
--- a/OvaleFrame.lua
+++ b/OvaleFrame.lua
@@ -154,13 +154,18 @@ do
 			end
 			Ovale:InitCalculerMeilleureAction()
 			local start, ending, priorite, element = Ovale:CalculerMeilleureAction(node)
-
+			if start then
+				Ovale:Log("CalculerMeilleureAction start = "..start)
+			end
 			local action = self.actions[k]

 			local actionTexture, actionInRange, actionCooldownStart, actionCooldownDuration,
 					actionUsable, actionShortcut, actionIsCurrent, actionEnable, spellId, actionTarget, noRed = Ovale:GetActionInfo(element)
 			if noRed then
 				start = actionCooldownStart + actionCooldownDuration
+				if start < Ovale.currentTime then
+					start = Ovale.currentTime
+				end
 			end

 			-- Dans le cas de canStopChannelling, on risque de demander d'interrompre le channelling courant, ce qui est stupide
@@ -215,7 +220,7 @@ do
 						nextCast = start + gcd
 					end
 					if Ovale.trace then
-						Ovale:Print("****Second icon")
+						Ovale:Print("****Second icon " .. start)
 					end
 					Ovale:AddSpellToStack(spellId, start, start + castTime, nextCast)
 					start, ending, priorite, element = Ovale:CalculerMeilleureAction(node)
diff --git a/defaut/Chaman.lua b/defaut/Chaman.lua
index caa1aab..53b2e4a 100644
--- a/defaut/Chaman.lua
+++ b/defaut/Chaman.lua
@@ -1,14 +1,20 @@
 Ovale.defaut["SHAMAN"] =
 [[
 Define(BLOODLUST 2825)
+	SpellInfo(BLOODLUST cd=300)
+	SpellAddBuff(BLOODLUST BLOODLUST=40)
 Define(CHAINLIGHTNING 421)
 	SpellInfo(CHAINLIGHTNING cd=3)
 	SpellAddBuff(CHAINLIGHTNING MAELSTROMWEAPON=0)
 Define(EARTHQUAKE 61882)
 Define(EARTHSHOCK 8042)
 	SpellInfo(EARTHSHOCK cd=6 sharedcd=shock)
+	SpellAddTargetDebuff(EARTHSHOCK EARTHSHOCK=8)
 Define(ELEMENTALMASTERY 16166)
+	SpellInfo(ELEMENTALMASTERY cd=180)
+	SpellAddBuff(ELEMENTALMASTERY ELEMENTALMASTERY=30)
 Define(FERALSPIRIT 51533)
+	SpellInfo(FERALSPIRIT cd=120)
 Define(FIRENOVA 1535)
 	SpellInfo(FIRENOVA cd=10)
 Define(FLAMESHOCK 8050)
@@ -16,28 +22,43 @@ Define(FLAMESHOCK 8050)
 	SpellAddTargetDebuff(FLAMESHOCK FLAMESHOCK=18)
 Define(FLAMETHONGWEAPON 8024)
 Define(FROSTSHOCK 8056)
+	SpellInfo(FROSTSHOCK cd=6 sharedcd=shock)
+	SpellAddTargetDebuff(FROSTSHOCK FROSTSHOCK=8)
 Define(FROSTBANDWEAPON 8033)
 Define(HEROISM 32182)
+	SpellInfo(HEROISM cd=300)
+	SpellAddBuff(HEROISM HEROISM=40)
 Define(LAVABURST 51505)
 	SpellInfo(LAVABURST cd=8)
 Define(LAVALASH 60103)
-	SpellInfo(LAVALASH cd=6)
+	SpellInfo(LAVALASH cd=10)
 Define(LIGHTNINGBOLT 403)
 	SpellAddBuff(LIGHTNINGBOLT MAELSTROMWEAPON=0)
 Define(LIGHTNINGSHIELD 324)
 	SpellAddBuff(LIGHTNINGSHIELD LIGHTNINGSHIELD=600)
 Define(PRIMALSTRIKE 73899)
+	SpellInfo(PRIMALSTRIKE cd=8)
 Define(ROCKBITERWEAPON 8017)
 Define(SHAMANISTICRAGE 30823)
+	SpellInfo(SHAMANISTICRAGE cd=60)
+	SpellAddBuff(SHAMANISTICRAGE SHAMANISTICRAGE=15)
 Define(SPIRITWALKERSGRACE 79206)
+	SpellInfo(SPIRITWALKERSGRACE cd=120)
+	SpellAddBuff(SPIRITWALKERSGRACE SPIRITWALKERSGRACE=15)
 Define(STORMSTRIKE 17364)
 	SpellInfo(STORMSTRIKE cd=8)
+	SpellAddTargetDebuff(STORMSTRIKE STORMSTRIKE=15)
 Define(THUNDERSTORM 51490)
+	SpellInfo(THUNDERSTORM cd=45)
 Define(UNLEASHELEMENTS 73680)
+	SpellInfo(UNLEASHELEMENTS cd=15)
 Define(UNLEASHFLAME 73683)
+	SpellInfo(UNLEASHFLAME cd=15)
+	SpellAddBuff(UNLEASHFLAME UNLEASHFLAME=8)
 Define(WATERSHIELD 52127)
 	SpellAddBuff(WATERSHIELD WATERSHIELD=600)
 Define(WINDSHEAR 57994)
+	SpellInfo(WINDSHEAR cd=6)
 Define(WINDFURYWEAPON 8232)

 #Buff
@@ -49,6 +70,7 @@ Define(FIREELEMENTALTOTEM 2894)
 Define(MAGMATOTEM 8190)
 	SpellInfo(MAGMATOTEM cd=20)
 Define(SEARINGTOTEM 3599)
+	SpellInfo(SEARINGTOTEM cd=10) #Fake CD so it won't be displayed twice
 Define(FLAMETHONGTOTEM 8227)

 Define(TOTEMOFWRATH 30706)
diff --git a/defaut/Chasseur.lua b/defaut/Chasseur.lua
index 423a433..c9856d6 100644
--- a/defaut/Chasseur.lua
+++ b/defaut/Chasseur.lua
@@ -2,46 +2,58 @@ Ovale.defaut["HUNTER"] =
 [[
 #Spells
 Define(AIMEDSHOT 19434)
-	SpellInfo(AIMEDSHOT resetcounter=ss)
+	SpellInfo(AIMEDSHOT resetcounter=ss mana=50)
 	SpellAddBuff(AIMEDSHOT FIRE=0)
 Define(ARCANESHOT 3044)
-	SpellInfo(ARCANESHOT resetcounter=ss)
+	SpellInfo(ARCANESHOT resetcounter=ss mana=25)
 Define(ASPECTOFTHEFOX 82661)
+	SpellAddBuff(ASPECTOFTHEFOX ASPECTOFTHEFOX=1000)
 Define(ASPECTOFTHEHAWK 13165)
+	SpellAddBuff(ASPECTOFTHEHAWK ASPECTOFTHEHAWK=1000)
 Define(BESTIALWRATH 19574)
 	SpellInfo(BESTIALWRATH cd=120)
+	SpellAddBuff(BESTIALWRATH BESTIALWRATH=10)
 Define(BLACKARROW 3674)
-	SpellInfo(BLACKARROW cd=26)
+	SpellInfo(BLACKARROW cd=30 mana=35)
 	SpellAddTargetDebuff(BLACKARROW BLACKARROW=15)
 Define(CALLOFTHEWILD 53434)
+	SpellInfo(CALLOFTHEWILD cd=300)
+	SpellAddBuff(CALLOFTHEWILD CALLOFTHEWILD=20)
 Define(CHIMERASHOT 53209)
-	SpellInfo(CHIMERASHOT cd=10 resetcounter=ss)
+	SpellInfo(CHIMERASHOT cd=10 resetcounter=ss mana=50)
+	SpellAddTargetDebuff(CHIMERASHOT SERPENTSTING=refresh)
 Define(COBRASHOT 77767)
+	SpellInfo(COBRASHOT mana=-9)
+	SpellAddTargetDebuff(COBRASHOT SERPENTSTING=refresh)
 Define(EXPLOSIVESHOT 53301)
-	SpellInfo(EXPLOSIVESHOT cd=6 buffnocd=LOCKANDLOAD)
+	SpellInfo(EXPLOSIVESHOT cd=6 mana=50 buffnocd=LOCKANDLOAD)
 	SpellAddTargetDebuff(EXPLOSIVESHOT EXPLOSIVESHOT=2)
 	SpellAddBuff(EXPLOSIVESHOT LOCKANDLOAD=-1)
 Define(FERVOR 82726)
-	Spellinfo(FERVOR mana=-50)
+	SpellInfo(FERVOR mana=-50 cd=120)
 Define(FOCUSFIRE 82692)
+	SpellInfo(FOCUSFIRE cd=15)
+	SpellAddBuff(FOCUSFIRE FOCUSFIRE=15)
 Define(KILLCOMMAND 34026)
-	SpellInfo(KILLCOMMAND cd=6 resetcounter=ss)
+	SpellInfo(KILLCOMMAND cd=6 mana=40 resetcounter=ss)
 Define(KILLSHOT 53351)
-	SpellInfo(KILLSHOT cd=15 resetcounter=ss)
+	SpellInfo(KILLSHOT cd=10 resetcounter=ss)
 Define(HUNTERSMARK 1130)
 	SpellAddTargetDebuff(HUNTERSMARK HUNTERSMARK=300)
 Define(MULTISHOT 2643)
+	SpellInfo(MULTISHOT mana=40)
 Define(RAPIDFIRE 3045)
-	SpellAddBuff(RAPIDFIRE RAPIDFIRE=10)
+	SpellAddBuff(RAPIDFIRE RAPIDFIRE=15)
 	SpellInfo(RAPIDFIRE cd=300 resetcounter=ss)
 Define(READINESS 23989)
+	SpellInfo(READINESS cd=180)
 Define(SERPENTSTING 1978)
-	SpellInfo(SERPENTSTING resetcounter=ss)
+	SpellInfo(SERPENTSTING resetcounter=ss duration=15 mana=25)
 	SpellAddTargetDebuff(SERPENTSTING SERPENTSTING=15)
 Define(STEADYSHOT 56641)
 	SpellInfo(STEADYSHOT inccounter=ss mana=-9)
 Define(SILENCINGSHOT 34490)
-	SpellInfo(SILENCINGSHOT resetcounter=ss)
+	SpellInfo(SILENCINGSHOT cd=20 resetcounter=ss)

 #Pet spells
 Define(GROWL 2649)
diff --git a/defaut/Chevalier.lua b/defaut/Chevalier.lua
index f3fc2fc..09780d3 100644
--- a/defaut/Chevalier.lua
+++ b/defaut/Chevalier.lua
@@ -1,64 +1,84 @@
 Ovale.defaut["DEATHKNIGHT"] = [[
 #Abilities
 Define(ARMYOFTHEDEAD 42650)
-	SpellInfo(ARMYOFTHEDEAD cd=600)
+	SpellInfo(ARMYOFTHEDEAD cd=600 mana=-15)
 Define(BLOODBOIL 48721)
+	SpellInfo(BLOODBOIL blood=-1 mana=-10)
 	SpellAddTargetDebuff(BLOODBOIL SCARLETFEVER=30)
 Define(BLOODPRESENCE 48263)
 Define(BLOODSTRIKE 45902)
-	SpellInfo(BLOODSTRIKE blood=-1)
+	SpellInfo(BLOODSTRIKE blood=-1 mana=-10)
 Define(BLOODTAP 45529)
+	SpellInfo(BLOODTAP cd=60 mana=-10)
 Define(BONESHIELD 49222) #blood
+	SpellInfo(BONESHIELD unholy=-1 mana=-10)
 	SpellAddBuff(BONESHIELD BONESHIELD=300)
 Define(DANCINGRUNEWEAPON 49028) #blood
+	SpellInfo(DANCINGRUNEWEAPON cd=90)
 Define(DARKTRANSFORMATION 63560) #unholy
+	SpellInfo(DARKTRANSFORMATION unholy=-1 cd=30 mana=-10) #fake cd
 Define(DEATHANDDECAY 43265)
+	SpellInfo(DEATHANDDECAY unholy=-1 cd=30 mana=-10)
 Define(DEATHCOIL 47541)
+	SpellInfo(DEATHCOIL mana=40)
 Define(DEATHPACT 48743)
+	SpellInfo(DEATHPACT cd=120 mana=40)
 Define(DEATHSTRIKE 49998)
-	SpellInfo(DEATHSTRIKE unholy=-1 frost=-1)
+	SpellInfo(DEATHSTRIKE unholy=-1 frost=-1 mana=-15)
 Define(EMPOWERRUNEWEAPON 47568)
+	SpellInfo(EMPOWERRUNEWEAPON cd=300 unholy=1 frost=1 blood=1 mana=-25)
 Define(FESTERINGSTRIKE 85948) #1 frost 1 blood
+	SpellInfo(FESTERINGSTRIKE blood=-1 frost=-1 mana=-15)
+	SpellAddTargetDebuff(FESTERINGSTRIKE BLOODPLAGUE=refresh FROSTFEVER=refresh)
 Define(FROSTPRESENCE 48266)
 Define(FROSTSTRIKE 49143) #frost
 	SpellInfo(FROSTSTRIKE mana=40)
 Define(HEARTSTRIKE 55050) #blood
-	SpellInfo(HEARTSTRIKE blood=-1)
+	SpellInfo(HEARTSTRIKE blood=-1 mana=-10)
 Define(HORNOFWINTER 57330)
-	SpellInfo(HORNOFWINTER cd=20)
+	SpellInfo(HORNOFWINTER cd=20 mana=-10)
 Define(HOWLINGBLAST 49184) #frost
-	SpellInfo(HOWLINGBLAST frost=-1 cd=8)
+	SpellInfo(HOWLINGBLAST frost=-1 mana=-10)
 	SpellAddBuff(HOWLINGBLAST FREEZINGFOG=0)
 	SpellAddTargetDebuff(HOWLINGBLAST FROSTFEVER=15 glyph=GLYPHHOWLINGBLAST)
 Define(ICEBOUNDFORTITUDE 48792)
+	SpellInfo(ICEBOUNDFORTITUDE cd=180)
 	SpellAddBuff(ICEBOUNDFORTITUDE ICEBOUNDFORTITUDE=18)
 Define(ICYTOUCH 45477)
-	SpellInfo(ICYTOUCH frost=-1)
+	SpellInfo(ICYTOUCH frost=-1 mana=-10)
 	SpellAddTargetDebuff(ICYTOUCH FROSTFEVER=15)
 	SpellAddBuff(ICYTOUCH FREEZINGFOG=0)
 Define(OBLITERATE 49020)
-	SpellInfo(OBLITERATE unholy=-1 frost=-1)
+	SpellInfo(OBLITERATE unholy=-1 frost=-1 mana=-15)
 Define(OUTBREAK 77575)
+	SpellInfo(OUTBREAK cd=60)
+	SpellAddTargetDebuff(OUTBREAK FROSTFEVER=15 BLOODPLAGUE=15)
 Define(PESTILENCE 50842)
+	SpellInfo(PESTILENCE blood=-1 mana=-10)
 Define(PILLAROFFROST 51271) #frost
+	SpellInfo(PILLAROFFROST frost=-1 mana=-10)
+	SpellAddBuff(PILLAROFFROST PILLAROFFROST=20)
 Define(PLAGUESTRIKE 45462)
-	SpellInfo(PLAGUESTRIKE unholy=-1)
+	SpellInfo(PLAGUESTRIKE unholy=-1 mana=-10)
 	SpellAddTargetDebuff(PLAGUESTRIKE BLOODPLAGUE=15)
 Define(RAISEDEAD 46584)
+	SpellInfo(RAISEDEAD cd=180)
 Define(RUNESTRIKE 56815)
-	SpellInfo(RUNESTRIKE mana=20)
+	SpellInfo(RUNESTRIKE mana=30 cd=6) #fake cd, not usable two times in a row
 Define(RUNETAP 48982) #blood
-	SpellInfo(RUNETAP blood=-1)
+	SpellInfo(RUNETAP blood=-1 cd=30 mana=-10)
 Define(SCOURGESTRIKE 55090) #unholy
-	SpellInfo(SCOURGESTRIKE unholy=-1)
+	SpellInfo(SCOURGESTRIKE unholy=-1 mana=-10)
 Define(SUMMONGARGOYLE 49206) #unholy
-	SpellInfo(SUMMONGARGOYLE cd=180)
+	SpellInfo(SUMMONGARGOYLE cd=180 mana=60)
 Define(UNHOLYBLIGHT 49194)
 Define(UNHOLYFRENZY 49016)
 	SpellInfo(UNHOLYFRENZY cd=300)
+	SpellAddBuff(UNHOLYFRENZY UNHOLYFRENZY=30)
 Define(UNHOLYPRESENCE 48265)
 Define(VAMPIRICBLOOD 55233) #blood
-	SpellInfo(VAMPIRICBLOOD blood=-1)
+	SpellInfo(VAMPIRICBLOOD cd=60)
+	SpellAddBuff(VAMPIRICBLOOD VAMPIRICBLOOD=10)

 #Talents
 #Define(TALENTDEATSTRIKE 2259)
diff --git a/defaut/Demoniste.lua b/defaut/Demoniste.lua
index b0d7d1e..f056bd0 100644
--- a/defaut/Demoniste.lua
+++ b/defaut/Demoniste.lua
@@ -5,6 +5,7 @@ Define(BANEOFAGONY 980)
 Define(BANEOFDOOM 603)
 	SpellAddTargetDebuff(BANEOFDOOM BANEOFDOOM=60)
 Define(BANEOFHAVOC 80240)
+	SpellAddTargetDebuff(BANEOFHAVOC BANEOFHAVOC=300)
 Define(CHAOSBOLT 50796)
 	SpellInfo(CHAOSBOLT cd=12)
 Define(CONFLAGRATE 17962)
@@ -14,53 +15,75 @@ Define(CORRUPTION 172)
 Define(CURSEELEMENTS 1490)
 	SpellAddTargetDebuff(CURSEELEMENTS CURSEELEMENTS=300)
 Define(CURSETONGUES 1714)
+	SpellAddTargetDebuff(CURSETONGUES CURSETONGUES=30)
 Define(CURSEWEAKNESS 702)
+	SpellAddTargetDebuff(CURSEWEAKNESS CURSEWEAKNESS=120)
 Define(DARKINTENT 80398)
 Define(DEATHCOIL 6789)
+	SpellInfo(DEATHCOIL cd=120)
 Define(DEMONARMOR 687)
+	SpellAddBuff(DEMONARMOR DEMONARMOR=1000)
 Define(DEMONICEMPOWERMENT 47193)
+	SpellInfo(DEMONICEMPOWERMENT cd=60)
 Define(DEMONSOUL 77801)
+	SpellInfo(DEMONSOUL cd=120)
 Define(DRAINLIFE 689)
 	SpellInfo(DRAINLIFE canStopChannelling=3)
+	SpellAddTargetDebuff(DRAINLIFE DRAINLIFE=3)
 	SpellAddBuff(DRAINLIFE SOULBURN=0)
 Define(DRAINSOUL 1120)
 	SpellInfo(DRAINSOUL canStopChannelling=5)
+	SpellAddTargetDebuff(DRAINSOUL DRAINSOUL=15)
 Define(FELARMOR 28176)
+	SpellAddBuff(FELARMOR FELARMOR=1000)
 Define(FELFLAME 77799)
+	SpellAddTargetDebuff(FELFLAME IMMOLATE=refresh UNSTABLEAFFLICTION=refresh)
 Define(HANDOFGULDAN 71521)
 	SpellInfo(HANDOFGULDAN cd=12)
 	SpellAddTargetDebuff(HANDOFGULDAN IMMOLATE=refresh)
 Define(HAUNT 48181)
 	SpellInfo(HAUNT cd=8)
+	SpellAddBuff(HAUNT HAUNT=12)
 Define(IMMOLATE 348)
 	SpellInfo(IMMOLATE duration=15)
 	SpellAddTargetDebuff(IMMOLATE IMMOLATE=15)
 	SpellAddBuff(IMMOLATE MOLTENCORE=-1)
 Define(IMMOLATIONAURA 50589)
 	SpellInfo(IMMOLATIONAURA cd=30)
+	SpellAddBuff(IMMOLATIONAURA IMMOLATIONAURA=15)
 Define(INCINERATE 29722)
 	SpellAddBuff(INCINERATE MOLTENCORE=-1)
 Define(LIFETAP 1454)
+	SpellInfo(LIFETAP cd=10) #fake
 Define(METAMORPHOSIS 47241)
+	SpellInfo(METAMORPHOSIS cd=180)
+	SpellAddBuff(METAMORPHOSIS METAMORPHOSIS=30)
 Define(SEARINGPAIN 5676)
 Define(SEEDOFCORRUPTION 27243)
+	SpellAddTargetDebuff(SEEDOFCORRUPTION SEEDOFCORRUPTION=18)
 Define(SHADOWBOLT 686)
-	SpellAddTargetDebuff(SHADOWBOLT SHADOWEMBRACE=12)
-	SpellAddTargetDebuff(SHADOWBOLT SHADOWANDFLAMEDEBUFF=30)
+	SpellAddTargetDebuff(SHADOWBOLT SHADOWEMBRACE=12 SHADOWANDFLAMEDEBUFF=30)
 Define(SHADOWBURN 17877)
+	SpellInfo(SHADOWBURN cd=15)
 Define(SHADOWFLAME 47897)
+	SpellInfo(SHADOWFLAME cd=12)
 Define(SOULFIRE 6353)
-	SpellAddBuff(SOULFIRE IMPROVEDSOULFIREBUFF=15)
-	SpellAddBuff(SOULFIRE SOULBURN=0)
+	SpellAddBuff(SOULFIRE IMPROVEDSOULFIREBUFF=15 SOULBURN=0)
 Define(SOULBURN 74434)
 	SpellInfo(SOULBURN cd=45)
 	SpellAddBuff(SOULBURN SOULBURN=15)
 Define(SUMMONINFERNAL 1122)
+	SpellInfo(SUMMONINFERNAL cd=600)
 Define(SUMMONDOOMGUARD 18540)
+	SpellInfo(SUMMONDOOMGUARD cd=600)
 Define(SUMMONFELGUARD 30146)
+	SpellInfo(SUMMONFELGUARD cd=600) #fake
 Define(SUMMONFELHUNTER 691)
+	SpellInfo(SUMMONFELHUNTER cd=600) #fake
 Define(SUMMONIMP 688)
+	SpellInfo(SUMMONIMP cd=600) #fake
 Define(SUMMONSUCCUBUS 712)
+	SpellInfo(SUMMONSUCCUBUS cd=600) #fake
 Define(UNSTABLEAFFLICTION 30108)
 	SpellAddTargetDebuff(UNSTABLEAFFLICTION UNSTABLEAFFLICTION=15)

@@ -248,7 +271,7 @@ AddIcon help=main mastery=3
 	#/shadowflame
 	if CheckBoxOn(shadowflame) Spell(SHADOWFLAME)
 	#/soul_fire,if=buff.empowered_imp.react&buff.empowered_imp.remains<(buff.improved_soul_fire.remains+action.soul_fire.travel_time)
-	if TalentPoints(IMPROVEDSOULFIRE more 0) and BuffExpires(IMPROVEDSOULFIREBUFF) and BuffExpires(EMPOWEREDIMP 0) Spell(SOULFIRE)
+	if TalentPoints(IMPROVEDSOULFIRE more 0) and BuffExpires(IMPROVEDSOULFIREBUFF 0) and BuffExpires(EMPOWEREDIMP 0) Spell(SOULFIRE)
 	#/chaos_bolt
 	Spell(CHAOSBOLT)
 	#/soul_fire,if=buff.improved_soul_fire.remains<(cast_time+travel_time+action.incinerate.cast_time+gcd)&!in_flight
diff --git a/defaut/Druide.lua b/defaut/Druide.lua
index 22bb67d..8803304 100644
--- a/defaut/Druide.lua
+++ b/defaut/Druide.lua
@@ -1,13 +1,16 @@
 Ovale.defaut["DRUID"] =
 [[
 Define(BARKSKIN 22812)
+	SpellInfo(BARKSKIN cd=60)
+	SpellAddBuff(BARKSKIN BARKSKIN=12)
 Define(BERSERK 50334) #cat+bear cd buff
 	SpellInfo(BERSERK cd=180)
 Define(CLAW 16827) #cat no positionning
-	SpellInfo(CLAW combo=1)
+	SpellInfo(CLAW combo=1 mana=25)
 Define(DEMOROAR 99) #bear
 	SpellAddTargetDebuff(DEMOROAR DEMOROAR=30)
 Define(ENRAGE 5229) #bear
+	SpellInfo(ENRAGE cd=60)
 Define(FAERIEFIRE 770) #moonkin
 	SpellAddTargetDebuff(FAERIEFIRE FAERIEFIREDEBUFF=300)
 Define(FAERIEFERAL 16857) #bear+cat
@@ -17,50 +20,68 @@ Define(FEROCIOUSBITE 22568) #cat finish 35-70 mana
 Define(FORCEOFNATURE 33831) #moonkin cd
 	SpellInfo(FORCEOFNATURE cd=180)
 Define(FRENZIEDREGENERATION 22842) #bear
+	SpellInfo(FRENZIEDREGENERATION cd=180)
+	SpellAddBuff(FRENZIEDREGENERATION FRENZIEDREGENERATION=20)
 Define(INNERVATE 29166)
+	SpellInfo(INNERVATE cd=180)
+	SpellAddBuff(INNERVATE INNERVATE=10)
 Define(INSECTSWARM 5570) #moonkin
 	SpellAddTargetDebuff(INSECTSWARM INSECTSWARM=12)
 Define(LACERATE 33745) #bear bleed*3
+	SpellInfo(LACERATE mana=15)
+	SpellAddTargetDebuff(LACERATE LACERATE=15)
 Define(MANGLECAT 33876) #cat bleed+debuff
-	SpellInfo(MANGLECAT combo=1)
-	SpellAddTargetDebuff(MANGLECAT MANGLECAT=12)
+	SpellInfo(MANGLECAT combo=1 mana=35)
+	SpellAddTargetDebuff(MANGLECAT MANGLECAT=60)
 Define(MANGLEBEAR 33878) #bear bleed+debuff
+	SpellInfo(MANGLEBEAR cd=6 mana=15)
+	SpellAddTargetDebuff(MANGLEBEAR MANGLEBEAR=60)
 Define(MAUL 6807) #bear
+	SpellInfo(MAUL cd=3 mana=30)
 Define(MOONFIRE 8921) #moonkin
 	SpellAddTargetDebuff(MOONFIRE MOONFIRE=12)
 Define(PULVERIZE 80313) #bear after lacerate*3
+	SpellInfo(PULVERIZE mana=15)
+	SpellAddTargetDebuff(PULVERIZE LACERATE=0)
 Define(RAKE 1822) #cat bleed
-	SpellInfo(RAKE combo=1)
+	SpellInfo(RAKE combo=1 mana=35)
 	SpellAddTargetDebuff(RAKE RAKE=9)
 Define(RAVAGE 6785) #cat behind+(prowling or stampede)
-	SpellInfo(RAVAGE combo=1)
+	SpellInfo(RAVAGE combo=1 mana=60)
 	SpellAddBuff(RAVAGE STAMPEDE=0)
 Define(RIP 1079) #cat bleed
-	SpellInfo(RIP combo=-5 duration=12 resetcounter=ripshreds)
+	SpellInfo(RIP combo=-5 duration=16 resetcounter=ripshreds)
 	SpellInfo(RIP glyph=GLYPHOFSHRED addduration=6)
-	SpellInfo(RIP glyph=GLYPHOFRIP addduration=4)
-	SpellAddTargetDebuff(RIP RIP=12)
+	SpellAddTargetDebuff(RIP RIP=16)
 Define(SAVAGEROAR 52610) #cat damage buff
-	SpellInfo(SAVAGEROAR combo=-5)
-	SpellAddBuff(SAVAGEROAR SAVAGEROAR=14)
+	SpellInfo(SAVAGEROAR combo=-5 mana=25)
+	SpellAddBuff(SAVAGEROAR SAVAGEROAR=9)
 Define(SHRED 5221) #cat behind
-	SpellInfo(SHRED combo=1 inccounter=ripshreds)
+	SpellInfo(SHRED mana=40 combo=1 inccounter=ripshreds)
 Define(STARFALL 48505) #moonkin cd aoe
+	SpellInfo(STARFALL cd=90)
+	SpellAddBuff(STARFALL STARFALL=10)
 Define(STARFIRE 2912) #moonkin
 	SpellInfo(STARFIRE eclipse=20)
 Define(STARSURGE 78674) #moonkin 15 lunar+solar
 	SpellInfo(STARSURGE cd=15 starsurge=15)
 	SpellAddBuff(STARSURGE SHOOTINGSTARS=0)
 Define(SUNFIRE 93402)
-	SpellAddTargetDebuff(SUNFIRE SUNFIRE=18)
+	SpellAddTargetDebuff(SUNFIRE SUNFIRE=12)
 Define(SURVIVALINSTINCTS 61336) #cat+bear surv cd
+	SpellInfo(SURVIVALINSTINCTS cd=180)
+	SpellAddBuff(SURVIVALINSTINCTS SURVIVALINSTINCTS=12)
 Define(SWIPEBEAR 779) #bear aoe
 	SpellInfo(SWIPEBEAR cd=6)
 Define(SWIPECAT 62078) #cat aoe
 Define(THRASH 77758) #bear aoe bleed
+	SpellInfo(THRASH cd=6 mana=25)
+	SpellAddTargetDebuff(THRASH THRASH=6)
 Define(TIGERSFURY 5217) #cat buff
 	SpellInfo(TIGERSFURY cd=30)
+	SpellAddBuff(TIGERSFURY TIGERSFURY=6)
 Define(TYPHOON 50516)
+	SpellInfo(TYPHOON cd=20)
 Define(WRATH 5176) #moonkin
 	SpellInfo(WRATH eclipse=-13)

@@ -130,7 +151,7 @@ AddIcon help=main mastery=1
 		if BuffPresent(ECLIPSESOLAR) and TargetDebuffExpires(MOONFIRE 0 mine=1) and TargetDebuffExpires(SUNFIRE 2 mine=1)
 			Spell(SUNFIRE nored=1)
 		#/moonfire,if=!ticking&buff.t11_4pc_caster.down&!dot.sunfire.remains>0
-		if TargetDebuffExpires(MOONFIRE 2 mine=1) and TargetDebuffExpires(SUNFIRE 0 mine=1)
+		if TargetDebuffExpires(MOONFIRE 2 mine=1) and TargetDebuffExpires(SUNFIRE 0 mine=1) and BuffExpires(ECLIPSESOLAR)
 			Spell(MOONFIRE nored=1)
 	}

diff --git a/defaut/Guerrier.lua b/defaut/Guerrier.lua
index 7b18394..d5ed053 100644
--- a/defaut/Guerrier.lua
+++ b/defaut/Guerrier.lua
@@ -2,24 +2,34 @@ Ovale.defaut["WARRIOR"] =
 [[
 #Spells
 Define(BATTLESHOUT 6673)
+	SpellInfo(BATTLESHOUT cd=30)
 	SpellAddBuff(BATTLESHOUT BATTLESHOUT=120)
 Define(BATTLESTANCE 2457)
 Define(BERSERKERRAGE 18499)
+	SpellInfo(BERSERKERRAGE cd=30)
 Define(BERSERKERSTANCE 2458)
 Define(BLADESTORM 46924)
+	SpellInfo(BLADESTORM cd=90)
 Define(BLOODTHIRST 23881)
 	SpellInfo(BLOODTHIRST cd=3)
 Define(CHARGE 100)
+	SpellInfo(CHARGE cd=15)
 Define(CLEAVE 845)
 	SpellInfo(CLEAVE cd=3)
 Define(COLOSSUSSMASH 86346)
-	SpellInfo(COLOSSSUSSMASH cd=20)
+	SpellInfo(COLOSSUSSMASH cd=20)
+	SpellAddTargetDebuff(COLOSSUSSMASH COLOSSUSSMASH=6)
 Define(COMMANDINGSHOUT 469)
+	SpellInfo(COMMANDINGSHOUT cd=30)
 	SpellAddBuff(COMMANDINGSHOUT cd=60 COMMANDINGSHOUT=120)
 Define(CONCUSSIONBLOW 12809)
+	SpellInfo(CONCUSSIONBLOW cd=30)
 Define(DEADLYCALM 85730)
+	SpellInfo(DEADLYCALM cd=120)
+	SpellAddBuff(DEADLYCALM DEADLYCALM=10)
 Define(DEATHWISH 12292)
 	SpellInfo(DEATHWISH cd=180)
+	SpellAddBuff(DEATHWISH DEATHWISH=30)
 Define(DEFENSIVESTANCE 71)
 Define(DEMOSHOUT 1160)
 	SpellAddTargetDebuff(DEMOSHOUT DEMOSHOUT=45)
@@ -28,34 +38,57 @@ Define(DEVASTATE 20243)
 Define(EXECUTE 5308)
 	SpellAddBuff(EXECUTE EXECUTIONER=9)
 Define(HEROICLEAP 6544)
+	SpellInfo(HEROICLEAP cd=60)
 Define(HEROICSTRIKE 78)
 	SpellInfo(HEROICSTRIKE cd=3)
 Define(HEROICTHROW 57755)
+	SpellInfo(HEROICTHROW cd=60)
 Define(HEROICFURY 60970)
+	SpellInfo(HEROICFURY cd=60)
 Define(INNERRAGE 1134)
+	SpellInfo(INNERRAGE cd=30)
+	SpellAddBuff(INNERRAGE INNERRAGE=15)
 Define(INTERCEPT 20252)
+	SpellInfo(INTERCEPT cd=30)
 Define(INTERVENE 3411)
+	SpellInfo(INTERVENE cd=30)
 Define(LASTSTAND 12975)
+	SpellInfo(LASTSTAND cd=180)
 Define(MORTALSTRIKE 12294)
 	SpellInfo(MORTALSTRIKE cd=4.5)
 Define(OVERPOWER 7384)
 	SpellInfo(OVERPOWER cd=1)
+	SpellAddBuff(OVERPOWER TASTEFORBLOOD=0)
 Define(PUMMEL 6552)
+	SpellInfo(PUMMEL cd=10)
 Define(RAGINGBLOW 85288)
 	SpellInfo(RAGINGBLOW cd=6)
 Define(RECKLESSNESS 1719)
+	SpellInfo(RECKLESSNESS cd=300)
+	SpellAddBuff(RECKLESSNESS RECKLESSNESS=12)
 Define(REND 772)
 	SpellAddTargetDebuff(REND RENDDEBUFF=15)
 Define(RETALIATION 20230)
+	SpellInfo(RETALIATION cd=300)
+	SpellAddBuff(RETALIATION RETALIATION=12)
 Define(REVENGE 6572)
 	SpellInfo(REVENGE cd=5)
 Define(SHATTERINGTHROW 64382)
+	SpellInfo(SHATTERINGTHROW cd=300)
+	SpellAddTargetDebuff(SHATTERINGTHROW SHATTERINGTHROW=10)
 Define(SHIELDBASH 72)
+	SpellInfo(SHIELDBASH cd=12)
 Define(SHIELDBLOCK 2565)
+	SpellInfo(SHIELDBLOCK cd=60)
+	SpellAddBuff(SHIELDBLOCK SHIELDBLOCK=10)
 Define(SHIELDWALL 871)
+	SpellInfo(SHIELDWALL cd=300)
+	SpellAddBuff(SHIELDWALL SHIELDWALL=12)
 Define(SHIELDSLAM 23922)
 	SpellInfo(SHIELDSLAM cd=6)
 Define(SHOCKWAVE 46968)
+	SpellInfo(SHOCKWAVE cd=20)
+	SpellAddBuff(SHOCKWAVE THUNDERSTRUCK=0)
 Define(SLAM 1464)
 	SpellAddBuff(SLAM BLOODSURGE=-1)
 Define(STRIKE 88161)
@@ -63,11 +96,14 @@ Define(STRIKE 88161)
 Define(SUNDERARMOR 7386)
 	SpellAddTargetDebuff(SUNDERARMOR SUNDERARMORDEBUFF=30)
 Define(SWEEPINGSTRIKES 12328)
+	SpellInfo(SWEEPINGSTRIKES cd=60)
 Define(THUNDERCLAP 6343)
+	SpellInfo(THUNDERCLAP cd=6)
 	SpellAddTargetDebuff(THUNDERCLAP THUNDERCLAP=30)
 Define(VICTORYRUSH 34428)
+	SpellAddBuff(VICTORYRUSH VICTORIOUS=0)
 Define(WHIRLWIND 1680)
-	SpellInfo(WHIRLWIND cd=8)
+	SpellInfo(WHIRLWIND cd=10)

 #Buffs
 Define(BLOODSURGE 46916)
@@ -80,6 +116,7 @@ Define(INCITE 86627)
 Define(BATTLETRANCE 12964)
 Define(SLAUGHTER 84584)
 Define(THUNDERSTRUCK 87096)
+Define(VICTORIOUS 32216)

 #Talents
 Define(SLAMTALENT 2233)
@@ -209,7 +246,7 @@ AddIcon help=main mastery=2
 			Spell(RAGINGBLOW)
 	}

-	Spell(VICTORYRUSH usable=1)
+	if BuffPresent(VICTORIOUS) Spell(VICTORYRUSH)
 	#/battle_shout,if=rage<70
 	if Mana(less 70) Spell(BATTLESHOUT priority=2)
 }
@@ -241,7 +278,7 @@ AddIcon help=main mastery=3
     if List(shout battle) and {Mana(less 20) or BuffExpires(strengthagility 3)} Spell(BATTLESHOUT nored=1)
 	if CheckBoxOn(demo) and TargetDebuffExpires(lowerphysicaldamage 2) Spell(DEMOSHOUT nored=1)

-	if LifePercent(less 75) Spell(VICTORYRUSH usable=1)
+	if LifePercent(less 75) and BuffPresent(VICTORIOUS) Spell(VICTORYRUSH usable=1)
 	if CheckBoxOn(multi)
 	{
 		if TargetDebuffExpires(RENDDEBUFF mine=1) Spell(REND)
diff --git a/defaut/Mage.lua b/defaut/Mage.lua
index de140a3..da9d917 100644
--- a/defaut/Mage.lua
+++ b/defaut/Mage.lua
@@ -3,6 +3,7 @@ Ovale.defaut["MAGE"]=
 #Contributed by Hinalover
 #Spells
 Define(ARCANEBARRAGE 44425) #arcane instant
+	SpellInfo(ARCANEBARRAGE cd=4)
     SpellAddDebuff(ARCANEBARRAGE ARCANEBLASTDEBUFF=0)
 Define(ARCANEBLAST 30451) #arcane stacks*4 cost increased
     SpellAddDebuff(ARCANEBLAST ARCANEBLASTDEBUFF=10)
@@ -10,25 +11,31 @@ Define(ARCANEMISSILES 5143) #arcane channel
     SpellAddDebuff(ARCANEMISSILES ARCANEBLASTDEBUFF=0 ARCANEMISSILEBUFF=0)
 Define(ARCANEPOWER 12042) #arcane cd
     SpellInfo(ARCANEPOWER cd=84)
+	SpellAddBuff(ARCANEPOWER ARCANEPOWER=15)
 Define(COLDSNAP 11958) #frost reset cd
     SpellInfo(COLDSNAP cd=384)
 Define(COMBUSTION 11129) #fire cd consume dot
-    SpellInfo(COMBUSTION cd=180)
+    SpellInfo(COMBUSTION cd=120)
 Define(CONJUREMANAGEM 759)
+	SpellInfo(CONJUREMANAGEM cd=10) #fake
 Define(COUNTERSPELL 2139)
     SpellInfo(COUNTERSPELL cd=24)
 Define(DEEPFREEZE 44572) #frost instant
+	SpellInfo(DEEPFREEZE cd=30)
     SpellAddBuff(DEEPFREEZE FINGERSOFFROST=-1)
 Define(EVOCATION 12051)
     SpellInfo(EVOCATION cd=240)
 Define(FIREBLAST 2136) #fire instant
+	SpellInfo(FIREBLAST cd=8)
 Define(FIREBALL 133) #fire 2.5
 Define(FLAMEORB 82731)
     SpellInfo(FLAMEORB cd=60)
 Define(FROSTBOLT 116) #frost
 Define(FROSTFIREBOLT 44614) #frost+fire
+	SpellAddTargetDebuff(FROSTFIREBOLT FROSTFIREBOLT=9)
     SpellAddBuff(FROSTFIREBOLT BRAINFREEZE=-1 FINGERSOFFROST=-1)
 Define(ICEARMOR 7302)
+	SpellAddBuff(ICEARMOR ICEARMOR=1800)
 Define(ICELANCE 30455) #frost instant
     SpellAddBuff(ICELANCE FINGERSOFFROST=-1)
 Define(ICYVEINS 12472) #frost cd
@@ -36,9 +43,11 @@ Define(ICYVEINS 12472) #frost cd
 Define(LIVINGBOMB 44457) #fire dot
     SpellAddTargetDebuff(LIVINGBOMB LIVINGBOMB=12)
 Define(MAGEARMOR 6117)
+	SpellAddBuff(MAGEARMOR MAGEARMOR=1800)
 Define(MIRRORIMAGE 55342)
     SpellInfo(MIRRORIMAGE cd=180)
 Define(MOLTENARMOR 30482)
+	SpellAddBuff(MOLTENARMOR MOLTENARMOR=1800)
 Define(PYROBLAST 11366) #fire dot
     SpellAddTargetDebuff(PYROBLAST PYROBLAST=12)
     SpellAddBuff(PYROBLAST HOTSTREAK=0)
@@ -49,10 +58,12 @@ Define(SUMMONWATERELEMENTAL 31687) #frost pet

 Define(PETFREEZE 33395) #Frost pet freeze ability
     SpellInfo(PETFREEZE cd=25)
-
+	SpellAddBuff(PETFREEZE FINGERSOFFROST=2)
+
 #Buff
 Define(BRAINFREEZE 57761) #frost (instant fireball/frostfire bolt)
 Define(FINGERSOFFROST 44544) #frost boost ice lance/deep freeze
+	SpellInfo(FINGERSOFFROST duration=14)
 Define(HOTSTREAK 48108) #fire instant pyroblast
 Define(ARCANEBLASTDEBUFF 36032)
 Define(ARCANEMISSILEBUFF 79683)
@@ -125,7 +136,7 @@ AddIcon help=cd mastery=1
 		#action_list_str += "/arcane_power,if=(cooldown.evocation.remains<30&buff.arcane_blast.stack=4)|target.time_to_die<40";
 		Spell(ARCANEPOWER)
 		#action_list_str += "/mana_gem,if=(cooldown.evocation.remains<30&buff.arcane_blast.stack=4)|target.time_to_die<40";
-		Spell(MANAGEM)
+		Item(MANAGEMITEM)
 	}

     #action_list_str += "/mirror_image,if=buff.arcane_power.up|(cooldown.arcane_power.remains>20&target.time_to_die>15)";
diff --git a/defaut/Paladin.lua b/defaut/Paladin.lua
index 3fb44f7..49e57a4 100644
--- a/defaut/Paladin.lua
+++ b/defaut/Paladin.lua
@@ -1,41 +1,56 @@
 Ovale.defaut["PALADIN"] =
 [[
 Define(AVENGERSSHIELD 31935)
+	SpellInfo(AVENGERSSHIELD cd=15)
 Define(AVENGINGWRATH 31884)
 	SpellInfo(AVENGINGWRATH cd=180)
+	SpellAddBuff(AVENGINGWRATH AVENGINGWRATH=20)
 Define(CONSECRATE 26573)
 	SpellInfo(CONSECRATE cd=8)
 Define(CRUSADERSTRIKE 35395)
-	SpellInfo(CRUSADERSTRIKE cd=4)
+	SpellInfo(CRUSADERSTRIKE cd=4 holy=1)
 Define(DIVINEFAVOR 31842)
 	SpellInfo(DIVINEFAVOR cd=180)
+	SpellAddBuff(DIVINEFAVOR DIVINEFAVOR=20)
 Define(DIVINEPLEA 54428)
-	SpellInfo(DIVINEPLEA cd=60)
-	SpellAddBuff(DIVINEPLEA DIVINEPLEA=15)
+	SpellInfo(DIVINEPLEA cd=120)
+	SpellAddBuff(DIVINEPLEA DIVINEPLEA=9)
 Define(DIVINEPROTECTION 498)
+	SpellInfo(DIVINEPROTECTION cd=60)
+	SpellAddBuff(DIVINEPROTECTION DIVINEPROTECTION=10)
 Define(DIVINESTORM 53385)
+	SpellInfo(DIVINESTORM cd=4.5)
 Define(EXORCISM 879)
 	SpellAddBuff(EXORCISM THEARTOFWAR=0)
 Define(GUARDIANOFANCIENTKINGS 86150)
+	SpellInfo(GUARDIANOFANCIENTKINGS cd=300)
 Define(HAMMEROFWRATH 24275)
 	SpellInfo(HAMMEROFWRATH cd=6)
 Define(HAMMEROFTHERIGHTEOUS 53595)
-	SpellInfo(HAMMEROFTHERIGHTEOUS cd=6)
+	SpellInfo(HAMMEROFTHERIGHTEOUS cd=4.5 holy=1)
 Define(HOLYSHOCK 20473)
 	SpellInfo(HOLYSHOCK cd=6)
 Define(HOLYWRATH 2812)
-	SpellInfo(HOLYWRATH cd=30)
+	SpellInfo(HOLYWRATH cd=15)
 Define(INQUISITION 84963)
+	SpellInfo(INQUISITION holy=-3)
+	SpellAddBuff(INQUISITION INQUISITION=12 DIVINEPURPOSE=0)
 Define(JUDGEMENT 20271)
+	SpellInfo(JUDGEMENT cd=8)
 Define(RIGHTEOUSFURY 25780)
 Define(SEALRIGHTEOUSNESS 20154)
 	SpellAddBuff(SEALRIGHTEOUSNESS SEALRIGHTEOUSNESS=1800)
 Define(SEALOFTRUTH 31801)
 	SpellAddBuff(SEALOFTRUTH SEALOFTRUTH=1800)
 Define(SHIELDOFTHERIGHTEOUS 53600)
-	SpellInfo(SHIELDOFTHERIGHTEOUS cd=6)
+	SpellInfo(SHIELDOFTHERIGHTEOUS cd=6 holy=-3)
+	SpellAddBuff(SHIELDOFTHERIGHTEOUS DIVINEPURPOSE=0)
 Define(TEMPLARSVERDICT 85256)
+	SpellInfo(TEMPLARSVERDICT holy=-3)
+	SpellAddBuff(TEMPLARSVERDICT DIVINEPURPOSE=0)
 Define(ZEALOTRY 85696)
+	SpellInfo(ZEALOTRY cd=120)
+	SpellAddBuff(ZEALOTRY ZEALOTRY=20)

 #Buff
 Define(THEARTOFWAR 59578)
@@ -72,7 +87,7 @@ AddIcon help=main mastery=2

 	if CheckBoxOn(aoe)
 	{
-		if HolyPower(more 0) and BuffExpires(INQUISITION) Spell(INQUISITION)
+		if HolyPower(more 0) and BuffExpires(INQUISITION 0) Spell(INQUISITION)
 		Spell(HAMMEROFTHERIGHTEOUS)
 		Spell(CONSECRATE)
 		Spell(HOLYWRATH)
diff --git a/defaut/Voleur.lua b/defaut/Voleur.lua
index ee56966..f116654 100644
--- a/defaut/Voleur.lua
+++ b/defaut/Voleur.lua
@@ -7,38 +7,42 @@ Define(ADRENALINERUSH 13750)
 Define(AMBUSH 8676)
 	SpellInfo(AMBUSH combo=2 mana=60)
 Define(BACKSTAB 53)
-	SpellInfo(BACKSTAB combo=1)
+	SpellInfo(BACKSTAB combo=1 mana=60)
 Define(BLADEFLURRY 13877)
-	SpellAddBuff(BLADEFLURRY BLADEFLURRY=15 cd=30)
+	SpellAddBuff(BLADEFLURRY BLADEFLURRY=1000 cd=10)
 Define(CLOACKOFSHADOWS 31224)
 	SpellInfo(CLOACKOFSHADOWS cd=90)
 Define(COLDBLOOD 14177)
 	SpellInfo(COLDBLOOD cd=120)
+	SpellAddBuff(COLDBLOOD COLDBLOOD=100)
 Define(ENVENOM 32645)
 	SpellInfo(ENVENOM combo=-5)
+	SpellAddBuff(ENVENOM ENVENOM=5 mana=35)
 Define(EVISCERATE 2098)
-	SpellInfo(EVISCERATE combo=-5)
+	SpellInfo(EVISCERATE combo=-5 mana=35)
 Define(HEMORRHAGE 16511)
-	SpellInfo(HEMORRHAGE combo=1)
+	SpellInfo(HEMORRHAGE combo=1 mana=35)
+	SpellAddTargetDebuff(HEMORRHAGE HEMORRHAGE=60)
 Define(KILLINGSPREE 51690)
 	SpellInfo(KILLINGSPREE cd=120)
 	SpellAddBuff(KILLINGSPREE KILLINGSPREE=2)
 Define(GARROTE 703)
+	SpellInfo(GARROTE combo=1 mana=45)
 	SpellAddTargetDebuff(GARROTE GARROTE=18)
 Define(MUTILATE 1329)
-	SpellInfo(MUTILATE combo=1)
+	SpellInfo(MUTILATE combo=1 mana=60)
 Define(PREMEDITATION 14183)
-	SpellInfo(PREMEDITATION cd=20)
+	SpellInfo(PREMEDITATION cd=20 combo=2)
 Define(PREPARATION 14185)
 	SpellInfo(PREPARATION cd=300)
 Define(REVEALINGSTRIKE 84617)
-	SpellInfo(REVEALINGSTRIKE combo=1)
+	SpellInfo(REVEALINGSTRIKE combo=1 mana=40)
 	SpellAddTargetDebuff(REVEALINGSTRIKE REVEALINGSTRIKE=15)
 Define(RUPTURE 1943)
-	SpellInfo(RUPTURE combo=-5)
+	SpellInfo(RUPTURE combo=-5 mana=25)
 	SpellAddTargetDebuff(RUPTURE RUPTURE=8)
 Define(SINISTERSTRIKE 1752)
-	SpellInfo(SINISTERSTRIKE combo=1)
+	SpellInfo(SINISTERSTRIKE combo=1 mana=45)
 Define(SHADOWDANCE 51713)
 	SpellInfo(SHADOWDANCE cd=60)
 	SpellAddBuff(SHADOWDANCE SHADOWDANCE=6)
@@ -46,7 +50,7 @@ Define(SHADOWSTEP 36554)
 	SpellInfo(SHADOWSTEP cd=20)
 	SpellAddBuff(SHADOWSTEP SHADOWSTEPBUFF=10)
 Define(SLICEANDDICE 5171)
-	SpellInfo(SLICEANDDICE combo=-5)
+	SpellInfo(SLICEANDDICE combo=-5 mana=25)
 	SpellAddBuff(SLICEANDDICE SLICEANDDICE=10)
 Define(STEALTH 1784)
 Define(TRICKSOFTHETRADE 57934)
@@ -141,6 +145,12 @@ AddIcon help=main mastery=2
 	if ComboPoints(less 5) Spell(SINISTERSTRIKE)
 }

+AddIcon help=aoe mastery=2
+{
+	Spell(BLADEFLURRY)
+	unless BuffPresent(ADRENALINERUSH) Spell(KILLINGSPREE)
+}
+
 AddIcon help=cd mastery=2
 {
 	#adrenaline_rush,if=energy<20
@@ -149,12 +159,6 @@ AddIcon help=cd mastery=2
 	Item(Trinket1Slot usable=1)
 }

-AddIcon help=aoe mastery=2
-{
-	Spell(BLADEFLURRY)
-	unless BuffPresent(ADRENALINERUSH) Spell(KILLINGSPREE)
-}
-
 AddIcon help=main mastery=3
 {
 	unless InCombat()