Quantcast

- added lua inline functions. ex [return GetCombatRating(11)] will return the spell critical rating

Sidoine De Wispelaere [03-12-11 - 14:17]
- added lua inline functions. ex [return GetCombatRating(11)] will return the spell critical rating
- balance druid: some changes to match simulationcraft
- fire mage, frost mage: minor changes to match simulationcraft
- added T11 balance druid
- fixes for AddFunction command
- checkboxes and lists can be moved

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@376 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
Condition.lua
Ovale.lua
Ovale.toc
OvaleCompile.lua
OvaleEquipement.lua
OvaleFrame.lua
defaut/Druide.lua
defaut/Guerrier.lua
defaut/Mage.lua
diff --git a/Condition.lua b/Condition.lua
index f213c34..da968df 100644
--- a/Condition.lua
+++ b/Condition.lua
@@ -739,6 +739,9 @@ Ovale.conditions=
 	maxHealth = function(condition)
 		return UnitMaxHealth(getTarget(condition.target))
 	end,
+	maxMana = function(condition)
+		return UnitPowerMax(getTarget(condition.target))
+	end,
 	NextSwing = function(condition)
 		local ret = OvaleSwing:GetNext(condition[1])
 		if condition[2] and ret then
diff --git a/Ovale.lua b/Ovale.lua
index e495fb0..dfb71c5 100644
--- a/Ovale.lua
+++ b/Ovale.lua
@@ -269,6 +269,24 @@ local options =
 					get = function(info) return Ovale.db.profile.apparence.margin end,
 					set = function(info,value) Ovale.db.profile.apparence.margin = value; Ovale:UpdateFrame() end
 				},
+				iconShiftX =
+				{
+					order = 5.6,
+					type = "range",
+					name = L["Décalage horizontal des options"],
+					min = -256, max = 256, step = 1,
+					get = function(info) return Ovale.db.profile.apparence.iconShiftX end,
+					set = function(info,value) Ovale.db.profile.apparence.iconShiftX = value; Ovale:UpdateFrame() end
+				},
+				iconShiftY =
+				{
+					order = 5.7,
+					type = "range",
+					name = L["Décalage vertical des options"],
+					min = -256, max = 256, step = 1,
+					get = function(info) return Ovale.db.profile.apparence.iconShiftY end,
+					set = function(info,value) Ovale.db.profile.apparence.iconShiftY = value; Ovale:UpdateFrame() end
+				},
 				raccourcis =
 				{
 					order = 6,
@@ -2066,6 +2084,10 @@ function Ovale:CalculerMeilleureAction(element)
 				end
 			end
 		end
+	elseif element.type == "lua" then
+		local ret = loadstring(element.lua)()
+		self:Log("lua "..nilstring(ret))
+		return ret, 0, 0
 	elseif (element.type == "group") then
 		local meilleurTempsFils
 		local bestEnd
@@ -2077,6 +2099,10 @@ function Ovale:CalculerMeilleureAction(element)
 			self:Print(element.type.." ["..element.nodeId.."]")
 		end

+		if #element.nodes == 1 then
+			return Ovale:CalculerMeilleureAction(element.nodes[1])
+		end
+
 		for k, v in ipairs(element.nodes) do
 			local newStart, newEnd, priorite, nouveauElement = Ovale:CalculerMeilleureAction(v)
 			if newStart~=nil and newStart<Ovale.currentTime then
@@ -2161,7 +2187,7 @@ function Ovale:ChargerDefaut()
 			top = 500,
 			check = {},
 			list = {},
-			apparence = {enCombat=false, iconScale = 2, margin = 4, fontScale = 0.5,
+			apparence = {enCombat=false, iconScale = 2, margin = 4, fontScale = 0.5, iconShiftX = 0, iconShiftY = 0,
 				smallIconScale=1, raccourcis=true, numeric=false, avecCible = false,
 				verrouille = false, vertical = false, predictif=false, highlightIcon = true, clickThru = false,
 				latencyCorrection=true, hideVehicule=true, flashIcon=true, targetText = "●"},
diff --git a/Ovale.toc b/Ovale.toc
index a62bfd0..c67905f 100644
--- a/Ovale.toc
+++ b/Ovale.toc
@@ -3,7 +3,7 @@
 ## Notes: Show the icon of the next spell to cast
 ## Notes-frFR: Affiche l'icône du prochain sort à lancer
 ## Author: Sidoine
-## Version: 4.0.29
+## Version: 4.0.30
 ## OptionalDeps: Ace3, ButtonFacade, Recount, Skada, LibBabble-CreatureType-3.0, LibRangeCheck-2.0
 ## SavedVariables: OvaleDB
 ## SavedVariablesPerCharacter: OvaleDBPC
diff --git a/OvaleCompile.lua b/OvaleCompile.lua
index d60c4a8..b6b4358 100644
--- a/OvaleCompile.lua
+++ b/OvaleCompile.lua
@@ -45,22 +45,24 @@ local function ParseNumber(dummy, value)
 end

 local function ParseFunction(prefix, func, params)
-	if not prefix and not params and customFunctions[func] then
-		return customFunctions[func]
-	end
-
 	local paramList = ParseParameters(params)
 	if func ~= "" then
 		paramList.target = prefix
 	else
 		func = prefix
 	end
+
 	if string.find(func, "Target") == 1 then
 		if not paramList.target then
 			paramList.target = "target"
 		end
 		func = string.sub(func, 7)
 	end
+
+	if customFunctions[func] then
+		return customFunctions[func]
+	end
+
 	local newNode = { type="function", func=func, params=paramList}
 	return AddNode(newNode)
 end
@@ -285,8 +287,14 @@ local function ParseDefine(key, value)
 	return ""
 end

+local function ParseLua(text)
+	local newNode = {type="lua", lua = string.sub(text, 2, string.len(text)-1)}
+	return AddNode(newNode)
+end
+
 local function ParseCommands(text)
 	local original = text
+	text = string.gsub(text,"(%b[])", ParseLua)
 	while (1==1) do
 		local was = text
 		text = string.gsub(text, "(%w+)%.?(%w*)%s*%((.-)%)", ParseFunction)
@@ -429,7 +437,7 @@ function Ovale:Compile(text)
 	for p,t in string.gmatch(text, "AddFunction%s+(%w+)%s*(%b{})") do
 		local newNode = ParseCommands(t)
 		if newNode then
-			customFunction[p] = newNode
+			customFunctions[p] = "node"..newNode
 		end
 	end

@@ -480,6 +488,10 @@ function Ovale:DebugNode(node)
 		text = node.comparison.." than "..self:DebugNode(node.time).." "..self:DebugNode(node.a)
 	elseif (node.type == "time") then
 		text = node.value.."s"
+	elseif node.type == "operator" then
+		text = self:DebugNode(node.a)..node.operator..self:DebugNode(node.b)
+	elseif node.type == "lua" then
+		text = "["..node.lua.."]"
 	else
 		text = "#unknown node type#"
 	end
diff --git a/OvaleEquipement.lua b/OvaleEquipement.lua
index 171d3c1..2c5979f 100644
--- a/OvaleEquipement.lua
+++ b/OvaleEquipement.lua
@@ -32,6 +32,17 @@ local itemTier =
 	[65191] = "T11",
 	[65192] = "T11",
 	[65193] = "T11",
+	--Balance druid
+	[60284] = "T11",
+	[60281] = "T11",
+	[60283] = "T11",
+	[60282] = "T11",
+	[60285] = "T11",
+	[65203] = "T11",
+	[65202] = "T11",
+	[65201] = "T11",
+	[65200] = "T11",
+	[65199] = "T11",
 	--Fury/Arm warrior
 	[60323] = "T11",
 	[60324] = "T11",
diff --git a/OvaleFrame.lua b/OvaleFrame.lua
index 96d65a5..c6d4468 100644
--- a/OvaleFrame.lua
+++ b/OvaleFrame.lua
@@ -335,15 +335,15 @@ do
 		if (Ovale.db.profile.apparence.vertical) then
 			self.barre:SetWidth(maxHeight - margin)
 			self.barre:SetHeight(BARRE)
-			self.frame:SetWidth(maxHeight)
-			self.frame:SetHeight(maxWidth+BARRE+margin)
-			self.content:SetPoint("TOPLEFT",self.frame,"TOPLEFT",maxHeight,0)
+			self.frame:SetWidth(maxHeight + Ovale.db.profile.apparence.iconShiftY)
+			self.frame:SetHeight(maxWidth+BARRE+margin + Ovale.db.profile.apparence.iconShiftX)
+			self.content:SetPoint("TOPLEFT",self.frame,"TOPLEFT",maxHeight + Ovale.db.profile.apparence.iconShiftX,Ovale.db.profile.apparence.iconShiftY)
 		else
 			self.barre:SetWidth(maxWidth - margin)
 			self.barre:SetHeight(BARRE)
-			self.frame:SetWidth(maxWidth)
-			self.frame:SetHeight(maxHeight+BARRE+margin)
-			self.content:SetPoint("TOPLEFT",self.frame,"TOPLEFT",maxWidth,0)
+			self.frame:SetWidth(maxWidth) -- + Ovale.db.profile.apparence.iconShiftX
+			self.frame:SetHeight(maxHeight+BARRE+margin) -- + Ovale.db.profile.apparence.iconShiftY
+			self.content:SetPoint("TOPLEFT",self.frame,"TOPLEFT",maxWidth + Ovale.db.profile.apparence.iconShiftX,Ovale.db.profile.apparence.iconShiftY)
 		end
 	end

diff --git a/defaut/Druide.lua b/defaut/Druide.lua
index ba259c5..bc43742 100644
--- a/defaut/Druide.lua
+++ b/defaut/Druide.lua
@@ -74,10 +74,10 @@ Define(SHOOTINGSTARS 93400)
 Define(STAMPEDE 81022)
 Define(FAERIEFIREDEBUFF 91565)
 Define(STRENGTHOFTHEPANTHER 90166) #feral T11 4-pieces bonus
+Define(ASTRALALIGNMENT 90164) #balance T11 4-pieces bonus

 AddCheckBox(multi L(AOE))
 AddCheckBox(lucioles SpellName(FAERIEFIRE) default)
-AddCheckBox(wrath SpellName(WRATH) mastery=1)
 AddCheckBox(mangle SpellName(MANGLECAT) default mastery=2)
 AddCheckBox(demo SpellName(DEMOROAR) default mastery=2)
 AddCheckBox(shred SpellName(SHRED) default mastery=2)
@@ -89,12 +89,13 @@ ScoreSpells(FAERIEFERAL DEMOROAR MANGLEBEAR LACERATE SAVAGEROAR RIP

 AddIcon help=main mastery=1
 {
-	#Contributed by Grabielz
+	#/faerie_fire,if=debuff.faerie_fire.stack<3&!(debuff.sunder_armor.up|debuff.expose_armor.up)
 	if CheckBoxOn(lucioles) and TargetDebuffExpires(FAERIEFIREDEBUFF 3 mine=1 stacks=3) and TargetDebuffExpires(lowerarmor 2 mine=0) and TargetDeadIn(more 15)
 		Spell(FAERIEFIRE nored=1)

 	if Speed(more 0)
 	{
+		#/typhoon,moving=1
 		Spell(TYPHOON)
 		if BuffPresent(SHOOTINGSTARS) Spell(STARSURGE)
 		if TargetDebuffExpires(INSECTSWARM 4 mine=1) and TargetDeadIn(more 6)
@@ -103,47 +104,43 @@ AddIcon help=main mastery=1
 			Spell(SUNFIRE)
 		Spell(MOONFIRE)
 	}
-
+
+	#/insect_swarm,if=!ticking
+	if TargetDebuffExpires(INSECTSWARM 0 mine=1) and TargetDeadIn(more 6)
+		Spell(INSECTSWARM nored=1)
+
 	if TargetDebuffExpires(MOONFIRE 1 mine=1) and TargetDebuffExpires(SUNFIRE 1 mine=1) and TargetDeadIn(more 6)
+			and BuffExpires(ASTRALALIGNMENT)
 	{
+		#/sunfire,if=!ticking&buff.t11_4pc_caster.down&!dot.moonfire.remains>0
 		if BuffPresent(ECLIPSESOLAR)
 			Spell(SUNFIRE nored=1)
+		#/moonfire,if=!ticking&buff.t11_4pc_caster.down&!dot.sunfire.remains>0
 		Spell(MOONFIRE nored=1)
 	}
-
-	if TargetDebuffExpires(INSECTSWARM 1 mine=1) and TargetDeadIn(more 6)
-		Spell(INSECTSWARM nored=1)

-	if TargetDebuffExpires(INSECTSWARM 3 mine=1) and TargetDeadIn(more 6) and BuffPresent(ECLIPSESOLAR) and Eclipse(less 16)
-		Spell(INSECTSWARM nored=1)
+	#/starsurge,if=!((eclipse<=-87&eclipse_dir=-1)|(eclipse>=80&eclipse_dir=1))
+	unless {Eclipse(less -88) and BuffExpires(ECLIPSELUNAR)} or {Eclipse(more 79) and BuffExpires(ECLIPSESOLAR)}
+		Spell(STARSURGE)

-	Spell(STARSURGE)
-
-	if BuffPresent(ECLIPSELUNAR) or Eclipse(equal -100)
-	{
-		Spell(STARFIRE)
-	}
-
-	if BuffPresent(ECLIPSESOLAR) or Eclipse(equal 100)
-	{
-		Spell(WRATH)
-	}
-
-	if TargetDebuffExpires(INSECTSWARM 0 mine=1) and TargetDeadIn(more 6)
-		Spell(INSECTSWARM)
-
-
-	if {Eclipse(equal 0) and CheckBoxOn(wrath)} or Eclipse(less 0)
-		Spell(WRATH)
-
-	if {Eclipse(equal 0) and CheckBoxOff(wrath)} or Eclipse(more 0)
-		Spell(STARFIRE)
+	#/innervate,if=mana_pct<50
+	if ManaPercent(less 50) Spell(INNERVATE)
+	#/starfire,if=eclipse_dir=1
+	if BuffPresent(ECLIPSELUNAR) or Eclipse(equal -100) Spell(STARFIRE)
+	#/wrath,if=eclipse_dir=-1
+	if BuffPresent(ECLIPSESOLAR) or Eclipse(equal 100) Spell(WRATH)
+	if Eclipse(more 0) Spell(STARFIRE)
+	if Eclipse(less 0) Spell(WRATH)
+	#/starfire
+	Spell(STARFIRE)
 }

 AddIcon help=cd mastery=1
 {
-	Spell(FORCEOFNATURE)
-    Spell(STARFALL)
+	#/starfall,if=buff.lunar_eclipse.up&buff.t11_4pc_caster.down
+	if BuffPresent(ECLIPSELUNAR) and BuffExpires(ASTRALALIGNMENT) Spell(STARFALL)
+	#/treants,time>=5
+	if TimeInCombat(more 5) Spell(FORCEOFNATURE)
 	Item(Trinket0Slot usable=1)
 	Item(Trinket1Slot usable=1)
 }
diff --git a/defaut/Guerrier.lua b/defaut/Guerrier.lua
index f661eeb..7b18394 100644
--- a/defaut/Guerrier.lua
+++ b/defaut/Guerrier.lua
@@ -239,7 +239,7 @@ AddIcon help=main mastery=3
 {
 	if List(shout command) and {Mana(less 20) or BuffExpires(stamina 3)} Spell(COMMANDINGSHOUT nored=1)
     if List(shout battle) and {Mana(less 20) or BuffExpires(strengthagility 3)} Spell(BATTLESHOUT nored=1)
-	if TargetClassification(worldboss) and CheckBoxOn(demo) and TargetDebuffExpires(lowerphysicaldamage 2) Spell(DEMOSHOUT nored=1)
+	if CheckBoxOn(demo) and TargetDebuffExpires(lowerphysicaldamage 2) Spell(DEMOSHOUT nored=1)

 	if LifePercent(less 75) Spell(VICTORYRUSH usable=1)
 	if CheckBoxOn(multi)
diff --git a/defaut/Mage.lua b/defaut/Mage.lua
index f30777f..de140a3 100644
--- a/defaut/Mage.lua
+++ b/defaut/Mage.lua
@@ -73,11 +73,9 @@ Define(FIRESTARTERTALENT 11431)
 Define(CRITICALMASSTALENT 10541)
 Define(IMPROVEDSCORCH 10547)

-#CheckBoxes
-AddListItem(fb fb SpellName(FIREBALL) default)
-AddListItem(fb ffb SpellName(FROSTFIREBOLT) mastery=2)
-AddListItem(frb frb SpellName(FROSTBOLT) default)
-AddListItem(frb ffb SpellName(FROSTFIREBOLT) mastery=3)
+#Glyphs
+Define(GLYPHOFFROSTFIRE 61205)
+Define(GLYPHOFFROSTBOLT 56370)

 ScoreSpells(SCORCH PYROBLAST LIVINGBOMB FROSTFIREBOLT FIREBALL SUMMONWATERELEMENTAL PETFREEZE FROSTBOLT ARCANEBLAST ARCANEMISSILES ARCANEBARRAGE
             DEEPFREEZE ICELANCE)
@@ -136,40 +134,41 @@ AddIcon help=cd mastery=1
     if TargetDeadIn(more 10) Spell(FLAMEORB)
 	#/presence_of_mind,arcane_blast
     Spell(PRESENCEOFMIND)
-
 }

 AddIcon help=main mastery=2
 {
     unless InCombat() if BuffExpires(MAGEARMOR 400) and BuffExpires(MOLTENARMOR 400) and BuffExpires(ICEARMOR 400) Spell(MOLTENARMOR)
-
-    if TalentPoints(CRITICALMASSTALENT more 0) and TargetDebuffExpires(CRITICALMASS) and TargetDebuffExpires(SHADOWANDFLAME) Spell(SCORCH)
-    if TargetDebuffPresent(LIVINGBOMB mine=1) and TargetDebuffPresent(IGNITE mine=1)
-            and TargetDebuffPresent(PYROBLAST mine=1)
+	#/scorch,debuff=1
+    if TalentPoints(CRITICALMASSTALENT more 0) and TargetDebuffExpires(magicalcrittaken 0) Spell(SCORCH)
+	#/combustion,if=dot.living_bomb.ticking&dot.ignite.ticking&dot.pyroblast.ticking
+    if TargetDebuffPresent(LIVINGBOMB mine=1) and TargetDebuffPresent(IGNITE mine=1) and TargetDebuffPresent(PYROBLAST mine=1)
         Spell(COMBUSTION)
+	#/living_bomb,if=!ticking
     if TargetDebuffExpires(LIVINGBOMB 0 mine=1) and TargetDeadIn(more 12) Spell(LIVINGBOMB)
+	#/pyroblast_hs,if=buff.hot_streak.react
     if BuffPresent(HOTSTREAK) Spell(PYROBLAST)
+	#/mage_armor,if=mana_pct<5
+	if BuffExpires(MAGEARMOR 0) and ManaPercent(less 5) Spell(MAGEARMOR)
     if TalentPoints(FIRESTARTERTALENT more 0) and Speed(more 0) Spell(SCORCH)
-    if ManaPercent(less 5) Spell(SCORCH)
-    if List(fb fb) and TargetDeadIn(less 60) Spell(FIREBALL)
-    if List(fb ffb) and TargetDeadIn(less 60) Spell(FROSTFIREBOLT)
-    if List(fb fb) and ManaPercent(more 39) Spell(FIREBALL)
-    if List(fb ffb) and ManaPercent(more 39) Spell(FROSTFIREBOLT)
-    if ManaPercent(less 95) and TalentPoints(IMPROVEDSCORCH more 0)
-    {
-           unless 60s before Spell(EVOCATION) Spell(SCORCH)
-    }
-    Spell(EVOCATION)
-    if TalentPoints(IMPROVEDSCORCH more 0) Spell(SCORCH)
+	#/frostfire_bolt
+    if Glyph(GLYPHOFFROSTFIRE) Spell(FROSTFIREBOLT usable=1)
+	#/fireball
+	Spell(FIREBALL usable=1)
+    Spell(SCORCH)
 }

 AddIcon help=cd mastery=2
 {
-    if BuffPresent(heroism) or TargetDeadIn(less 40) Item(VOLCANICPOTION)
-    if TargetBuffStealable(yes) Spell(SPELLSTEAL)
+	if TargetBuffStealable(yes) Spell(SPELLSTEAL)
     if TargetIsInterruptible(yes) Spell(COUNTERSPELL)
+
+	#if BuffPresent(heroism) or TargetDeadIn(less 40) Item(VOLCANICPOTION)
+    #/mana_gem,if=mana_deficit>12500
     if ManaPercent(less 85) Item(MANAGEMITEM)
-    if TargetDeadIn(more 24) Spell(MIRRORIMAGE)
+	#/mirror_image,if=target.time_to_die>=25
+	if TargetDeadIn(more 24) Spell(MIRRORIMAGE)
+    #/flame_orb,if=target.time_to_die>=12
     if TargetDeadIn(more 11) Spell(FLAMEORB)
     Item(Trinket0Slot usable=1)
     Item(Trinket1Slot usable=1)
@@ -178,37 +177,54 @@ AddIcon help=cd mastery=2
 AddIcon help=main mastery=3
 {
     unless InCombat() if BuffExpires(MAGEARMOR 400) and BuffExpires(MOLTENARMOR 400) and BuffExpires(ICEARMOR 400) Spell(MOLTENARMOR)
-
     if PetPresent(no) Spell(SUMMONWATERELEMENTAL)
-    if BuffPresent(FINGERSOFFROST stacks=1) Spell(DEEPFREEZE)
-    if BuffPresent(BRAINFREEZE) and BuffPresent(FINGERSOFFROST) Spell(FROSTFIREBOLT)
+
+	#/deep_freeze
+    Spell(DEEPFREEZE)
+	#/frostfire_bolt,if=buff.brain_freeze.react&buff.fingers_of_frost.react
+    if BuffPresent(BRAINFREEZE) and BuffPresent(FINGERSOFFROST) {Spell(FROSTFIREBOLT) Spell(FIREBALL)}
+	#/ice_lance,if=buff.fingers_of_frost.stack>1
     if BuffPresent(FINGERSOFFROST stacks=2) Spell(ICELANCE)
+	#/ice_lance,if=buff.fingers_of_frost.react&pet.water_elemental.cooldown.freeze.remains<gcd
     unless BuffPresent(FINGERSOFFROST) Spell(PETFREEZE)
-    if BuffPresent(FINGERSOFFROST stacks=2) Spell(ICELANCE)
-    if BuffPresent(MOLTENARMOR) and {{manaPercent()*8} < target.timeToDie()} Spell(MAGEARMOR)
-    if ManaPercent(less 5) and TargetDeadIn(less 60) Spell(EVOCATION)
-    if List(frb frb) Spell(FROSTBOLT)
-    if List(frb ffb) Spell(FROSTFIREBOLT)
+	#/mage_armor,if=(mana_pct*12)<target.time_to_die
+    if Glyph(GLYPHOFFROSTBOLT) and BuffPresent(MOLTENARMOR) and {{manaPercent()*12} < target.timeToDie()} Spell(MAGEARMOR)
+	#/mage_armor,if=(mana_pct*15)<target.time_to_die
+	if Glyph(GLYPHOFFROSTBOLT no) and BuffPresent(MOLTENARMOR) and {{manaPercent()*15} < target.timeToDie()} Spell(MAGEARMOR)
+	#/evocation,if=mana_pct<5&target.time_to_die>60
+    if ManaPercent(less 5) and TargetDeadIn(more 60) Spell(EVOCATION)
+	#/ice_lance,moving=1
     if Speed(more 0) Spell(ICELANCE)
+	#/fire_blast,moving=1
     if Speed(more 0) Spell(FIREBLAST)
+	#/frostbolt
+	if Glyph(GLYPHOFFROSTBOLT) Spell(FROSTBOLT)
+    if Glyph(GLYPHOFFROSTBOLT no)
+	{
+		#/frostbolt,if=!cooldown.early_frost.remains
+		if castTime(FROSTBOLT) < timeWithHaste(1.5) Spell(FROSTBOLT)
+		#/frostfire_bolt
+		Spell(FROSTFIREBOLT)
+		Spell(FROSTBOLT)
+	}
 }

 AddIcon help=cd mastery=3
 {
-    if BuffPresent(heroism) or TargetDeadIn(less 40) Item(VOLCANICPOTION)
+    #if BuffPresent(heroism) or TargetDeadIn(less 40) Item(VOLCANICPOTION)
     if TargetBuffStealable(yes) Spell(SPELLSTEAL)
     if TargetIsInterruptible(yes) Spell(COUNTERSPELL)
+
+	#/mana_gem,if=mana_deficit>12500
     if ManaPercent(less 85) Item(MANAGEMITEM)
-    unless 15s before Spell(DEEPFREEZE)
-    {
-          unless 30s before Spell(FLAMEORB)
-          {
-               unless 30s before Spell(ICYVEINS)  Spell(COLDSNAP)
-          }
-    }
+	#/cold_snap,if=cooldown.deep_freeze.remains>15&cooldown.frostfire_orb.remains>30&cooldown.icy_veins.remains>30
+    unless 15s before Spell(DEEPFREEZE) or 30s before Spell(FLAMEORB) or 30s before Spell(ICYVEINS) Spell(COLDSNAP)
+	#/frostfire_orb,if=target.time_to_die>=12
     if TargetDeadIn(more 11) Spell(FLAMEORB)
+	#/mirror_image,if=target.time_to_die>=25
     if TargetDeadIn(more 24) Spell(MIRRORIMAGE)
-    unless BuffPresent(ICYVEINS) Spell(ICYVEINS)
+	#/icy_veins,if=buff.icy_veins.down&buff.bloodlust.down
+    if BuffExpires(ICYVEINS 0) and BuffExpires(heroism 0) Spell(ICYVEINS)
     Item(Trinket0Slot usable=1)
     Item(Trinket1Slot usable=1)
 }