Quantcast

contributed rogue default script

Sidoine De Wispelaere [04-17-11 - 13:20]
contributed rogue default script
fixed spell haste effect on channeled spells

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@399 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
Condition.lua
Ovale.lua
defaut/Demoniste.lua
defaut/Voleur.lua
diff --git a/Condition.lua b/Condition.lua
index a61a29e..e2aab46 100644
--- a/Condition.lua
+++ b/Condition.lua
@@ -87,9 +87,9 @@ local function avecHate(temps, hate)
 	if (not hate) then
 		return temps
 	elseif (hate == "spell") then
-		return temps/(1+Ovale.spellHaste/100)
+		return temps/Ovale.spellHaste
 	elseif (hate == "melee") then
-		return temps/(1+Ovale.meleeHaste/100)
+		return temps/Ovale.meleeHaste
 	else
 		return temps
 	end
@@ -190,7 +190,7 @@ local function GetManaAndRate(withBerserker)
 	local rate

 	if className == "ROGUE" or (className == "DRUID" and GetShapeshiftForm(true) == 3) then
-		rate = 10 * (100 + Ovale.meleeHaste)/100
+		rate = 10 * Ovale.meleeHaste
 		if (className == "ROGUE") then
 			local rush = Ovale:GetAura("player", "HELPFUL", 13750)
 			if rush.stacks>0 then
@@ -203,7 +203,7 @@ local function GetManaAndRate(withBerserker)
 			end
 		end
 	elseif className == "HUNTER" then
-		rate = 4 * (100 + Ovale.meleeHaste) /100
+		rate = 4 * Ovale.meleeHaste
 	else
 		rate = 0
 	end
diff --git a/Ovale.lua b/Ovale.lua
index 5e506c0..7c995cf 100644
--- a/Ovale.lua
+++ b/Ovale.lua
@@ -35,10 +35,10 @@ Ovale.bug = false
 Ovale.trace=false
 --in combat?
 Ovale.enCombat = false
---current computed spell haste
-Ovale.spellHaste = 0
+--current computed spell haste. "2" means 2 times faster
+Ovale.spellHaste = 1
 --current computed melee haste TODO: why I don't use character sheet value anyway?
-Ovale.meleeHaste = 0
+Ovale.meleeHaste = 1
 --current auras
 Ovale.aura = { player = {}, target = {}}
 --allow to track the current target
@@ -638,9 +638,9 @@ function Ovale:WithHaste(temps, hate)
 	if (not hate) then
 		return temps
 	elseif (hate == "spell") then
-		return temps/(1+self.spellHaste/100)
+		return temps/self.spellHaste
 	elseif (hate == "melee") then
-		return temps/(1+self.meleeHaste/100)
+		return temps/self.meleeHaste
 	else
 		return temps
 	end
@@ -955,8 +955,8 @@ function Ovale:UNIT_AURA(event, unit)
 			end
 		end

-		self.spellHaste = hateBase + hateCommune + hateSorts + hateHero + hateClasse
-		self.meleeHaste = hateBase + hateCommune + hateCaC + hateHero + hateClasse
+		self.spellHaste = 1 + (hateBase + hateCommune + hateSorts + hateHero + hateClasse)/100
+		self.meleeHaste = 1 + (hateBase + hateCommune + hateCaC + hateHero + hateClasse)/100

 		self.refreshNeeded = true
 --		self.rangedHaste = hateBase + hateCommune + hateHero + hateClasse -- TODO ajouter le bidule du chasseur en spé bête
@@ -1668,7 +1668,7 @@ function Ovale:GetGCD(spellId)
 			if not cd then
 				cd = 1.5
 			end
-			cd = cd /(1+self.spellHaste/100)
+			cd = cd / self.spellHaste
 			if (cd<1) then
 				cd = 1
 			end
@@ -1683,7 +1683,7 @@ function Ovale:GetGCD(spellId)
 		return 1.0
 	elseif self.className == "MAGE" or self.className == "WARLOCK" or self.className == "PRIEST" or
 			(self.className == "DRUID" and GetShapeshiftForm(true) ~= 1) then
-		local cd = 1.5 /(1+self.spellHaste/100)
+		local cd = 1.5 / self.spellHaste
 		if (cd<1) then
 			cd = 1
 		end
@@ -1915,7 +1915,7 @@ function Ovale:CalculerMeilleureAction(element)
 					else
 						--TODO: pas exact, parce que si ce sort est reporté de par exemple 0,5s par un debuff
 						--ça tombera entre deux ticks
-						local ticks = self.spellInfo[self.currentSpellId].canStopChannelling
+						local ticks = floor(self.spellHaste * self.spellInfo[self.currentSpellId].canStopChannelling + 0.5)
 						local tickLength = (self.attenteFinCast - self.startCast) / ticks
 						local tickTime = self.startCast + tickLength
 						if (Ovale.trace) then
diff --git a/defaut/Demoniste.lua b/defaut/Demoniste.lua
index ef17e8d..3858fc6 100644
--- a/defaut/Demoniste.lua
+++ b/defaut/Demoniste.lua
@@ -201,7 +201,7 @@ AddIcon help=main mastery=2

 	#unless Glyph(GLYPHOFLASHOFPAIN) or Glyph(GLYPHOFIMP) Spell(DEMONSOUL)
 	#/immolation,if=buff.metamorphosis.remains>10
-	if BuffPresent(METAMORPHOSIS 10) Spell(IMMOLATIONAURA)
+	if BuffPresent(METAMORPHOSIS 10) and TargetInRange(DEATHCOIL) Spell(IMMOLATIONAURA)
 	#/bane_of_doom,if=!ticking&target.time_to_die>=15&miss_react
 	if TargetDebuffExpires(BANEOFDOOM 0 mine=1) and TargetDebuffExpires(BANEOFAGONY 0 mine=1)
 	{
@@ -215,7 +215,7 @@ AddIcon help=main mastery=2
 	#/fel_flame,if=buff.tier11_4pc_caster.react
 	if ArmorSetParts(T11 more 3) Spell(FELFLAME)
 	#/shadowflame
-	if CheckBoxOn(shadowflame) Spell(SHADOWFLAME)
+	if CheckBoxOn(shadowflame) and TargetInRange(DEATHCOIL) Spell(SHADOWFLAME)
 	#/demon_soul
 	#if Glyph(GLYPHOFIMP) Spell(DEMONSOUL)
 	#/hand_of_guldan
diff --git a/defaut/Voleur.lua b/defaut/Voleur.lua
index ddaaf83..2ab2b4b 100644
--- a/defaut/Voleur.lua
+++ b/defaut/Voleur.lua
@@ -23,6 +23,7 @@ Define(EVISCERATE 2098)
 Define(HEMORRHAGE 16511)
 	SpellInfo(HEMORRHAGE combo=1 mana=35)
 	SpellAddTargetDebuff(HEMORRHAGE HEMORRHAGE=60)
+Define(KICK 1766)
 Define(KILLINGSPREE 51690)
 	SpellInfo(KILLINGSPREE cd=120)
 	SpellAddBuff(KILLINGSPREE KILLINGSPREE=2)
@@ -65,6 +66,10 @@ Define(VENDETTA 79140)
 #Buffs
 Define(SHADOWSTEPBUFF 36563)
 Define(VANISHBUFF 11327)
+Define(SHALLOWINSIGHT 84745)
+Define(MODERATEINSIGHT 84746)
+Define(DEEPINSIGHT 84747)
+Define(OVERKILL 58426)

 #Items
 Define(INSTANTPOISON 6947)
@@ -73,88 +78,121 @@ Define(DEADLYPOISON 2892)
 #Talents
 Define(TALENTCUTTOTHECHASE 2070)

+SpellList(insight 84745 84746 84747)
+
 ScoreSpells(SLICEANDDICE HUNGERFORBLOOD ENVENOM RUPTURE EVISCERATE MUTILATE SINISTERSTRIKE)

 AddIcon help=main mastery=1
 {
 	unless InCombat()
 	{
-		if WeaponEnchantExpires(mainhand 400) Item(INSTANTPOISON)
-		if WeaponEnchantExpires(offhand 400) Item(DEADLYPOISON)
+		if WeaponEnchantExpires(mainhand 300) Item(INSTANTPOISON)
+		if WeaponEnchantExpires(offhand 300) Item(DEADLYPOISON)
 	}
-
+
+	#actions+=/garrote
 	if BuffPresent(STEALTH) Spell(GARROTE)
+
+	#actions+=/slice_and_dice,if=buff.slice_and_dice.down
 	unless BuffPresent(SLICEANDDICE) if ComboPoints(more 0)	Spell(SLICEANDDICE)
+
+	#actions+=/vendetta
 	if TargetDebuffExpires(VENDETTA) and TargetDeadIn(more 20) Spell(VENDETTA)
-
+
 	if ComboPoints(more 3)
 	{
-		#rupture,if=!ticking&combo_points>=4&target.time_to_die>15&buff.slice_and_dice.remains>6
-		if TargetDebuffExpires(RUPTURE 0 mine=1) and TargetDeadIn(more 15) and BuffPresent(SLICEANDDICE 6)
+		#actions+=/rupture,if=!ticking&time<6
+		#actions+=/rupture,if=!ticking&buff.slice_and_dice.remains>6
+		if TargetDebuffExpires(RUPTURE 0 mine=1) and BuffPresent(SLICEANDDICE 6)
 			Spell(RUPTURE)
-		#envenom,if=combo_points>=4&buff.envenom.down
-		#envenom,if=combo_points>=4&energy>90
+		#actions+=/envenom,if=combo_points>=4&buff.envenom.down
+		#actions+=/envenom,if=combo_points>=4&energy>90
 		if BuffExpires(ENVENOM 0) or Mana(more 89) Spell(ENVENOM)
 	}
-
-	#envenom,if=combo_points>=2&buff.slice_and_dice.remains<2
-	if TalentPoints(TALENTCUTTOTHECHASE more 0) and ComboPoints(more 1) and BuffExpires(SLICEANDDICE 2)
+
+	#actions+=/cold_blood,sync=envenom
+	#if ComboPoints(more 4) and BuffPresent(SLICEANDDICE 6) and TargedDebuffPresent(RUPTURE 5)
+	#	Spell(COLDBLOOD)
+
+	#actions+=/envenom,if=combo_points>=2&buff.slice_and_dice.remains<3
+	if TalentPoints(TALENTCUTTOTHECHASE more 0) and ComboPoints(more 1) and BuffExpires(SLICEANDDICE 3)
 		Spell(ENVENOM)
+
+	#actions+=/backstab,if=combo_points<5&target.health_pct<35
+	if ComboPoints(less 5) and TargetLifePercent(less 35) Spell(BACKSTAB)
+	#actions+=/mutilate,if=combo_points<4&target.health_pct>=35
+	if ComboPoints(less 4) and TargetLifePercent(more 35) Spell(MUTILATE)

-	if ComboPoints(less 4)
-	{
-		#backstab,if=combo_points<4&target.health_pct<35
-		if TargetLifePercent(less 35) Spell(BACKSTAB)
-		Spell(MUTILATE)
-	}
 }

 AddIcon help=cd mastery=1
 {
+	#actions+=/kick
+	if TargetIsInterruptible(yes) and TargetInRange(KICK) Spell(KICK)
 	if Mana(less 70) Spell(COLDBLOOD)
+	#actions+=/vanish,if=time>30&energy>50
+	if {spell(VANISH)>30} and Mana(more 50) unless BuffPresent(OVERKILL) Spell(VANISH)
 	Item(Trinket0Slot usable=1)
 	Item(Trinket1Slot usable=1)
-	if Mana(more 50) Spell(VANISH)
 }

 AddIcon help=main mastery=2
 {
 	unless InCombat()
 	{
-		if WeaponEnchantExpires(mainhand 400) Item(INSTANTPOISON)
-		if WeaponEnchantExpires(offhand 400) Item(DEADLYPOISON)
+		if WeaponEnchantExpires(mainhand 300) Item(INSTANTPOISON)
+		if WeaponEnchantExpires(offhand 300) Item(DEADLYPOISON)
 	}

-	#slice_and_dice,if=buff.slice_and_dice.down&time<4
-	#slice_and_dice,if=buff.slice_and_dice.remains<2&combo_points>=3
-	if {BuffExpires(SLICEANDDICE 0) and ComboPoints(more 0)} or {BuffExpires(SLICEANDDICE 2) and ComboPoints(more 2)}
+	#actions+=/slice_and_dice,if=buff.slice_and_dice.down
+	#actions+=/slice_and_dice,if=buff.slice_and_dice.remains<2
+	if {BuffExpires(SLICEANDDICE 0) and ComboPoints(more 0)} or {BuffExpires(SLICEANDDICE 2) and ComboPoints(more 1)}
 		Spell(SLICEANDDICE)
-
-	#rupture,if=!ticking&combo_points=5&target.time_to_die>10
+
+	#actions+=/killing_spree,if=energy<35&buff.slice_and_dice.remains>4&buff.adrenaline_rush.down
+	unless BuffPresent(ADRENALINERUSH) if Mana(less 35) and BuffPresent(SLICEANDDICE 4) and BuffPresent(DEEPINSIGHT 5) Spell(KILLINGSPREE)
+
+	#actions+=/adrenaline_rush,if=energy<35
+	unless BuffPresent(KILLINGSPREE) if Mana(less 20) Spell(ADRENALINERUSH)
+
+	#actions+=/eviscerate,if=combo_points=5&buff.bandits_guile.stack>=12
+	if ComboPoints(more 4) and BuffPresent(SLICEANDDICE 4) and BuffPresent(insight)
+		{
+			if TargetDebuffPresent(bleed) and TargetDebuffExpires(RUPTURE 0 mine=1) Spell(RUPTURE)
+			Spell(EVISCERATE)
+		}
+
+	#actions+=/rupture,if=!ticking&combo_points=5&target.time_to_die>10
 	if ComboPoints(more 4) and TargetDebuffExpires(RUPTURE 0 mine=1) and TargetDeadIn(more 10) Spell(RUPTURE)
-	#eviscerate,if=combo_points=5&buff.slice_and_dice.remains>7&dot.rupture.remains>6
-	if ComboPoints(more 4) and BuffPresent(SLICEANDDICE 7) and TargetDebuffPresent(RUPTURE 6 mine=1) Spell(EVISCERATE)
-	#eviscerate,if=combo_points>=4&buff.slice_and_dice.remains>4&energy>40&dot.rupture.remains>5
-	if ComboPoints(more 3) and BuffPresent(SLICEANDDICE 4) and Mana(more 40) and TargetDebuffPresent(RUPTURE 5 mine=1)
-		Spell(EVISCERATE)
-	#eviscerate,if=combo_points=5&target.time_to_die<10
-	if ComboPoints(more 4) and TargetDeadIn(less 10) Spell(EVISCERATE)
-	#revealing_strike,if=combo_points=4&buff.slice_and_dice.remains>8
-	if ComboPoints(equal 4) and BuffPresent(SLICEANDDICE 8) Spell(REVEALINGSTRIKE)
-	#sinister_strike,if=combo_points<5
+
+	#actions+=/eviscerate,if=combo_points=5
+	if ComboPoints(equal 5) Spell(EVISCERATE)
+
+	#actions+=/revealing_strike,if=combo_points=4&buff.revealing_strike.down
+	if ComboPoints(equal 4) and TargetDebuffExpires(REVEALINGSTRIKE 0 mine=1) Spell(REVEALINGSTRIKE)
+
+	#actions+=/sinister_strike,if=combo_points<5
 	if ComboPoints(less 5) Spell(SINISTERSTRIKE)
 }

 AddIcon help=aoe mastery=2
 {
 	Spell(BLADEFLURRY)
-	unless BuffPresent(ADRENALINERUSH) Spell(KILLINGSPREE)
+	if BuffPresent(insight)
+	{
+		unless BuffPresent(ADRENALINERUSH) Spell(KILLINGSPREE)
+	}
 }

 AddIcon help=cd mastery=2
 {
+	#actions+=/kick
+	if TargetIsInterruptible(yes) and TargetInRange(KICK) Spell(KICK)
 	#adrenaline_rush,if=energy<20
-	unless BuffPresent(KILLINGSPREE) if Mana(less 20) Spell(ADRENALINERUSH)
+	if BuffPresent(insight)
+	{
+		unless BuffPresent(KILLINGSPREE) if Mana(less 20) Spell(ADRENALINERUSH)
+	}
 	Item(Trinket0Slot usable=1)
 	Item(Trinket1Slot usable=1)
 }
@@ -193,6 +231,8 @@ AddIcon help=main mastery=3

 AddIcon help=cd mastery=3
 {
+	#actions+=/kick
+	if TargetIsInterruptible(yes) and TargetInRange(KICK) Spell(KICK)
 	#shadow_dance,if=time>10&energy>75&combo_points<=1&cooldown.shadowstep.remains<=0
 	if Mana(more 75) and ComboPoints(less 2) and Spell(SHADOWSTEP) Spell(SHADOWDANCE)
 	#vanish,if=time>10&energy>60&combo_points<=1&cooldown.shadowstep.remains<=0&!buff.shadow_dance.up