Quantcast

Rogue: Add default scripts for Assassination, Combat, and Subtlety.

Johnny C. Lam [05-03-14 - 00:26]
Rogue: Add default scripts for Assassination, Combat, and Subtlety.

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1360 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
OvaleSimulationCraft.lua
scripts/files.xml
scripts/ovale_rogue.lua
scripts/ovale_rogue_spells.lua
diff --git a/OvaleSimulationCraft.lua b/OvaleSimulationCraft.lua
index ddb3d3c..4563688 100644
--- a/OvaleSimulationCraft.lua
+++ b/OvaleSimulationCraft.lua
@@ -279,6 +279,17 @@ do
 				["arcane_torrent"] = "arcane_torrent_mana",
 			},
 		},
+		rogue = {
+			assassination = {
+				["arcane_torrent"] = "arcane_torrent_energy",
+			},
+			combat = {
+				["arcane_torrent"] = "arcane_torrent_energy",
+			},
+			subtlety = {
+				["arcane_torrent"] = "arcane_torrent_energy",
+			},
+		},
 		shaman = {
 			elemental = {
 				["ascendance"] = "ascendance_caster",
@@ -360,9 +371,14 @@ do
 		["^shadowform$"] = "if not Stance(priest_shadowform) Spell(shadowform)",
 		["^shadow_word_death$"] = "Spell(shadow_word_death usable=1)",
 		-- Rogue
-		["^apply_poison$"] = false,	-- XXX
+		["^ambush$"] = "Spell(ambush usable=1)",
+		["^apply_poison$"] = "ApplyPoisons()",
+		["^backstab$"] = "Spell(backstab usable=1)",
+		["^dispatch$"] = "Spell(dispatch usable=1)",
 		["^kick$"] = "if target.IsInterruptible() Spell(kick)",
-		["^stealth$"] = "if Stealthed(no) Spell(stealth)",
+		["^premeditation$"] = "Spell(premeditation usable=1)",
+		["^stealth$"] = "if not IsStealthed() Spell(stealth)",
+		["^tricks_of_the_trade$"] = "TricksOfTheTrade()",
 		-- Shaman
 		["^bloodlust$"] = "Bloodlust()",
 		["^wind_shear$"] = "Interrupt()",
diff --git a/scripts/files.xml b/scripts/files.xml
index 0bfbe66..a1487e8 100644
--- a/scripts/files.xml
+++ b/scripts/files.xml
@@ -14,6 +14,8 @@
 	<Script file="ovale_paladin_spells.lua" />
 	<Script file="ovale_priest.lua" />
 	<Script file="ovale_priest_spells.lua" />
+	<Script file="ovale_rogue.lua" />
+	<Script file="ovale_rogue_spells.lua" />
 	<Script file="ovale_shaman.lua" />
 	<Script file="ovale_shaman_spells.lua" />

diff --git a/scripts/ovale_rogue.lua b/scripts/ovale_rogue.lua
new file mode 100644
index 0000000..42104a5
--- /dev/null
+++ b/scripts/ovale_rogue.lua
@@ -0,0 +1,605 @@
+local _, Ovale = ...
+local OvaleScripts = Ovale.OvaleScripts
+
+do
+	local name = "Ovale"
+	local desc = "[5.4.7] Ovale: Assassination, Combat, Subtlety"
+	local code = [[
+# Ovale rogue script based on SimulationCraft.
+#	Last updated: 2014-04-28
+
+Include(ovale_items)
+Include(ovale_racials)
+Include(ovale_rogue_spells)
+
+AddCheckBox(opt_aoe L(AOE) default)
+AddCheckBox(opt_icons_left "Left icons")
+AddCheckBox(opt_icons_right "Right icons")
+
+###
+### Assassination
+###
+# Based on SimulationCraft profile "Rogue_Assassination_T16H".
+#	class=rogue
+#	spec=assassination
+#	talents=http://us.battle.net/wow/en/tool/talent-calculator#ca!200002
+#	glyphs=vendetta
+
+AddFunction AssassinationDefaultActions
+{
+	#auto_attack
+	#arcane_torrent,if=energy<60
+	if Energy() < 60 Spell(arcane_torrent_energy)
+	#mutilate,if=buff.stealth.up
+	if Stealthed() Spell(mutilate)
+	#slice_and_dice,if=buff.slice_and_dice.remains<2
+	if BuffRemains(slice_and_dice_buff) < 2 Spell(slice_and_dice)
+	#dispatch,if=dot.rupture.ticks_remain<2&energy>90
+	if target.TicksRemain(rupture_debuff) < 2 and Energy() > 90 Spell(dispatch usable=1)
+	#mutilate,if=dot.rupture.ticks_remain<2&energy>90
+	if target.TicksRemain(rupture_debuff) < 2 and Energy() > 90 Spell(mutilate)
+	#marked_for_death,if=talent.marked_for_death.enabled&combo_points=0
+	if TalentPoints(marked_for_death_talent) and ComboPoints() == 0 Spell(marked_for_death)
+	#rupture,if=ticks_remain<2|(combo_points=5&ticks_remain<3)
+	if target.TicksRemain(rupture_debuff) < 2 or { ComboPoints() == 5 and target.TicksRemain(rupture_debuff) < 3 } Spell(rupture)
+	#envenom,if=combo_points>4
+	if ComboPoints() > 4 Spell(envenom)
+	#envenom,if=combo_points>=2&buff.slice_and_dice.remains<3
+	if ComboPoints() >= 2 and BuffRemains(slice_and_dice_buff) < 3 Spell(envenom)
+	#dispatch,if=combo_points<5
+	if ComboPoints() < 5 Spell(dispatch usable=1)
+	#mutilate
+	Spell(mutilate)
+	#tricks_of_the_trade
+	TricksOfTheTrade()
+}
+
+AddFunction AssassinationDefaultAoeActions
+{
+	#auto_attack
+	#arcane_torrent,if=energy<60
+	if Energy() < 60 Spell(arcane_torrent_energy)
+	#mutilate,if=buff.stealth.up
+	if Stealthed() Spell(mutilate)
+	#slice_and_dice,if=buff.slice_and_dice.remains<2
+	if BuffRemains(slice_and_dice_buff) < 2 Spell(slice_and_dice)
+	#dispatch,if=dot.rupture.ticks_remain<2&energy>90
+	if target.TicksRemain(rupture_debuff) < 2 and Energy() > 90 Spell(dispatch usable=1)
+	#mutilate,if=dot.rupture.ticks_remain<2&energy>90
+	if target.TicksRemain(rupture_debuff) < 2 and Energy() > 90 Spell(mutilate)
+	#marked_for_death,if=talent.marked_for_death.enabled&combo_points=0
+	if TalentPoints(marked_for_death_talent) and ComboPoints() == 0 Spell(marked_for_death)
+	#rupture,if=ticks_remain<2|(combo_points=5&ticks_remain<3)
+	if target.TicksRemain(rupture_debuff) < 2 or { ComboPoints() == 5 and target.TicksRemain(rupture_debuff) < 3 } Spell(rupture)
+	#fan_of_knives,if=combo_points<5&active_enemies>=4
+	if ComboPoints() < 5 Spell(fan_of_knives)
+	#envenom,if=combo_points>4
+	if ComboPoints() > 4 Spell(envenom)
+	#envenom,if=combo_points>=2&buff.slice_and_dice.remains<3
+	if ComboPoints() >= 2 and BuffRemains(slice_and_dice_buff) < 3 Spell(envenom)
+}
+
+AddFunction AssassinationDefaultShortCdActions
+{
+	#vanish,if=time>10&!buff.stealth.up&!buff.shadow_blades.up
+	if TimeInCombat() > 10 and not Stealthed() and not BuffPresent(shadow_blades_buff) Spell(vanish)
+}
+
+AddFunction AssassinationDefaultCdActions
+{
+	#virmens_bite_potion,if=buff.bloodlust.react|target.time_to_die<40
+	if BuffPresent(burst_haste any=1) or target.TimeToDie() < 40 UsePotionAgility()
+	#kick
+	Interrupt()
+	UseRacialInterruptActions()
+	#preparation,if=!buff.vanish.up&cooldown.vanish.remains>60
+	if not BuffPresent(vanish_buff) and SpellCooldown(vanish) > 60 Spell(preparation)
+	#use_item,slot=hands
+	UseItemActions()
+	#blood_fury
+	Spell(blood_fury)
+	#berserking
+	Spell(berserking)
+
+	unless { Energy() < 60 and Spell(arcane_torrent_energy) }
+		or { TimeInCombat() > 10 and not Stealthed() and not BuffPresent(shadow_blades_buff) and Spell(vanish) }
+		or { Stealthed() and Spell(mutilate) }
+		or { BuffRemains(slice_and_dice_buff) < 2 and Spell(slice_and_dice) }
+		or { target.TicksRemain(rupture_debuff) < 2 and Energy() > 90 and Spell(dispatch usable=1) }
+		or { target.TicksRemain(rupture_debuff) < 2 and Energy() > 90 and Spell(mutilate) }
+		or { TalentPoints(marked_for_death_talent) and ComboPoints() == 0 and Spell(marked_for_death) }
+		or { target.TicksRemain(rupture_debuff) < 2 or { ComboPoints() == 5 and target.TicksRemain(rupture_debuff) < 3 } and Spell(rupture) }
+	{
+		#vendetta
+		Spell(vendetta)
+	}
+}
+
+AddFunction AssassinationPrecombatActions
+{
+	#flask,type=spring_blossoms
+	#food,type=sea_mist_rice_noodles
+	#apply_poison,lethal=deadly
+	ApplyPoisons()
+	#snapshot_stats
+	#slice_and_dice,if=talent.marked_for_death.enabled
+	if TalentPoints(marked_for_death_talent) Spell(slice_and_dice)
+}
+
+AddFunction AssassinationPrecombatShortCdActions
+{
+	#stealth
+	if not IsStealthed() Spell(stealth)
+	#marked_for_death,if=talent.marked_for_death.enabled
+	if TalentPoints(marked_for_death_talent) Spell(marked_for_death)
+}
+
+AddFunction AssassinationPrecombatCdActions
+{
+	#virmens_bite_potion
+	if Stealthed(no) UsePotionAgility()
+}
+
+### Assassination icons.
+AddIcon mastery=assassination size=small checkboxon=opt_icons_left
+{
+	Spell(tricks_of_the_trade)
+}
+
+AddIcon mastery=assassination size=small checkboxon=opt_icons_left
+{
+	Spell(redirect)
+}
+
+AddIcon mastery=assassination help=shortcd
+{
+	if InCombat(no) AssassinationPrecombatShortCdActions()
+	AssassinationDefaultShortCdActions()
+}
+
+AddIcon mastery=assassination help=main
+{
+	if InCombat(no) AssassinationPrecombatActions()
+	AssassinationDefaultActions()
+}
+
+AddIcon mastery=assassination help=aoe checkboxon=opt_aoe
+{
+	if InCombat(no) AssassinationPrecombatActions()
+	AssassinationDefaultAoeActions()
+}
+
+AddIcon mastery=assassination help=cd
+{
+	if InCombat(no) AssassinationPrecombatCdActions()
+	AssassinationDefaultCdActions()
+}
+
+AddIcon mastery=assassination help=cd size=small checkboxon=opt_icons_right
+{
+	Spell(feint)
+	UseRacialSurvivalActions()
+}
+
+AddIcon mastery=assassination help=cd size=small checkboxon=opt_icons_right
+{
+	Spell(cloak_of_shadows)
+}
+
+###
+### Combat
+###
+# Based on SimulationCraft profile "Rogue_Combat_T16H".
+#	class=rogue
+#	spec=combat
+#	talents=http://us.battle.net/wow/en/tool/talent-calculator#cZ!200002
+
+AddFunction CombatFinisherActions
+{
+	#rupture,if=ticks_remain<2&target.time_to_die>=26&(active_enemies<2|!buff.blade_flurry.up)
+	if target.TicksRemain(rupture_debuff) < 2 and target.TimeToDie() >= 26 Spell(rupture)
+	#eviscerate
+	Spell(eviscerate)
+}
+
+AddFunction CombatFinisherAoeActions
+{
+	#crimson_tempest,if=active_enemies>=7&dot.crimson_tempest_dot.ticks_remain<=2
+	if Enemies() >= 7 and target.TicksRemain(crimson_tempest_dot_debuff) <= 2 Spell(crimson_tempest)
+	#eviscerate
+	Spell(eviscerate)
+}
+
+AddFunction CombatGeneratorActions
+{
+	#revealing_strike,if=ticks_remain<2
+	if target.TicksRemain(revealing_strike_debuff) < 2 Spell(revealing_strike)
+	#sinister_strike
+	Spell(sinister_strike)
+}
+
+AddFunction CombatGeneratorAoeActions
+{
+	#fan_of_knives,line_cd=5,if=active_enemies>=4
+	# XXX line_cd?
+	Spell(fan_of_knives)
+	#revealing_strike,if=ticks_remain<2
+	if target.TicksRemain(revealing_strike_debuff) < 2 Spell(revealing_strike)
+	#sinister_strike
+	Spell(sinister_strike)
+}
+
+AddFunction CombatDefaultActions
+{
+	#auto_attack
+	#arcane_torrent,if=energy<60
+	if Energy() < 60 Spell(arcane_torrent_energy)
+	#ambush
+	Spell(ambush usable=1)
+	#slice_and_dice,if=buff.slice_and_dice.remains<2|(buff.slice_and_dice.remains<15&buff.bandits_guile.stack=11&combo_points>=4)
+	if BuffRemains(slice_and_dice_buff) < 2 or { BuffRemains(slice_and_dice_buff) < 15 and BuffStacks(bandits_guile_buff) == 11 and ComboPoints() >= 4 } Spell(slice_and_dice)
+	#marked_for_death,if=talent.marked_for_death.enabled&(combo_points<=1&dot.revealing_strike.ticking)
+	if TalentPoints(marked_for_death_talent) and { ComboPoints() <= 1 and target.DebuffPresent(revealing_strike_debuff) } Spell(marked_for_death)
+	#run_action_list,name=generator,if=combo_points<5|(talent.anticipation.enabled&anticipation_charges<=4&!dot.revealing_strike.ticking)
+	if ComboPoints() < 5 or { TalentPoints(anticipation_talent) and BuffStacks(anticipation_buff) <= 4 and not target.DebuffPresent(revealing_strike_debuff) } CombatGeneratorActions()
+	#run_action_list,name=finisher,if=!talent.anticipation.enabled|buff.deep_insight.up|cooldown.shadow_blades.remains<=11|anticipation_charges>=4|(buff.shadow_blades.up&anticipation_charges>=3)
+	# XXX possible bug in SimC action list in missing combo_points==5
+	if ComboPoints() == 5 and { not TalentPoints(anticipation_talent) or BuffPresent(deep_insight_buff) or SpellCooldown(shadow_blades) <= 11 or BuffStacks(anticipation_buff) >= 4 or { BuffPresent(shadow_blades_buff) and BuffStacks(anticipation_buff) >= 3 } } CombatFinisherActions()
+	#run_action_list,name=generator,if=energy>60|buff.deep_insight.down|buff.deep_insight.remains>5-combo_points
+	if Energy() > 60 or BuffExpires(deep_insight_buff) or BuffRemains(deep_insight_buff) > 5 - ComboPoints() CombatGeneratorActions()
+	TricksOfTheTrade()
+}
+
+AddFunction CombatDefaultAoeActions
+{
+	#auto_attack
+	#arcane_torrent,if=energy<60
+	if Energy() < 60 Spell(arcane_torrent_energy)
+	#blade_flurry,if=(active_enemies>=2&!buff.blade_flurry.up)|(active_enemies<2&buff.blade_flurry.up)
+	if not BuffPresent(blade_flurry_buff) Spell(blade_flurry)
+	#ambush
+	Spell(ambush usable=1)
+	#slice_and_dice,if=buff.slice_and_dice.remains<2|(buff.slice_and_dice.remains<15&buff.bandits_guile.stack=11&combo_points>=4)
+	if BuffRemains(slice_and_dice_buff) < 2 or { BuffRemains(slice_and_dice_buff) < 15 and BuffStacks(bandits_guile_buff) == 11 and ComboPoints() >= 4 } Spell(slice_and_dice)
+	#marked_for_death,if=talent.marked_for_death.enabled&(combo_points<=1&dot.revealing_strike.ticking)
+	if TalentPoints(marked_for_death_talent) and { ComboPoints() <= 1 and target.DebuffPresent(revealing_strike_debuff) } Spell(marked_for_death)
+	#run_action_list,name=generator,if=combo_points<5|(talent.anticipation.enabled&anticipation_charges<=4&!dot.revealing_strike.ticking)
+	if ComboPoints() < 5 or { TalentPoints(anticipation_talent) and BuffStacks(anticipation_buff) <= 4 and not target.DebuffPresent(revealing_strike_debuff) } CombatGeneratorAoeActions()
+	#run_action_list,name=finisher,if=!talent.anticipation.enabled|buff.deep_insight.up|cooldown.shadow_blades.remains<=11|anticipation_charges>=4|(buff.shadow_blades.up&anticipation_charges>=3)
+	if ComboPoints() == 5 and { not TalentPoints(anticipation_talent) or BuffPresent(deep_insight_buff) or SpellCooldown(shadow_blades) <= 11 or BuffStacks(anticipation_buff) >= 4 or { BuffPresent(shadow_blades_buff) and BuffStacks(anticipation_buff) >= 3 } } CombatFinisherAoeActions()
+	#run_action_list,name=generator,if=energy>60|buff.deep_insight.down|buff.deep_insight.remains>5-combo_points
+	if Energy() > 60 or BuffExpires(deep_insight_buff) or BuffRemains(deep_insight_buff) > 5 - ComboPoints() CombatGeneratorAoeActions()
+	TricksOfTheTrade()
+}
+
+AddFunction CombatDefaultShortCdActions
+{
+	#vanish,if=time>10&(combo_points<3|(talent.anticipation.enabled&anticipation_charges<3)|(buff.shadow_blades.down&(combo_points<4|(talent.anticipation.enabled&anticipation_charges<4))))&((talent.shadow_focus.enabled&buff.adrenaline_rush.down&energy<20)|(talent.subterfuge.enabled&energy>=90)|(!talent.shadow_focus.enabled&!talent.subterfuge.enabled&energy>=60))
+	if TimeInCombat() > 10 and { ComboPoints() < 3 or { TalentPoints(anticipation_talent) and BuffStacks(anticipation_buff) < 3 } or { BuffExpires(shadow_blades_buff) and { ComboPoints() < 4 or { TalentPoints(anticipation_talent) and BuffStacks(anticipation_buff) < 4 } } } } and { { TalentPoints(shadow_focus_talent) and BuffExpires(adrenaline_rush_buff) and Energy() < 20 } or { TalentPoints(subterfuge_talent) and Energy() >= 90 } or { not TalentPoints(shadow_focus_talent) and not TalentPoints(subterfuge_talent) and Energy() >= 60 } } Spell(vanish)
+	#killing_spree,if=energy<45
+	if Energy() < 45 Spell(killing_spree)
+}
+
+AddFunction CombatDefaultCdActions
+{
+	#virmens_bite_potion,if=buff.bloodlust.react|target.time_to_die<40
+	if BuffPresent(burst_haste any=1) or target.TimeToDie() < 40 UsePotionAgility()
+	#kick
+	Interrupt()
+	UseRacialInterruptActions()
+	#preparation,if=!buff.vanish.up&cooldown.vanish.remains>60
+	if not BuffPresent(vanish_buff) and SpellCooldown(vanish) > 60 Spell(preparation)
+	#use_item,slot=hands,if=time=0|buff.shadow_blades.up
+	if TimeInCombat() == 0 or BuffPresent(shadow_blades_buff) UseItemActions()
+	#blood_fury,if=time=0|buff.shadow_blades.up
+	if TimeInCombat() == 0 or BuffPresent(shadow_blades_buff) Spell(blood_fury)
+	#berserking,if=time=0|buff.shadow_blades.up
+	if TimeInCombat() == 0 or BuffPresent(shadow_blades_buff) Spell(berserking)
+
+	unless { Energy() < 60 and Spell(arcane_torrent_energy) }
+		or Spell(ambush usable=1)
+		or { TimeInCombat() > 10 and { ComboPoints() < 3 or { TalentPoints(anticipation_talent) and BuffStacks(anticipation_buff) < 3 } or { BuffExpires(shadow_blades_buff) and { ComboPoints() < 4 or { TalentPoints(anticipation_talent) and BuffStacks(anticipation_buff) < 4 } } } } and { { TalentPoints(shadow_focus_talent) and BuffExpires(adrenaline_rush_buff) and Energy() < 20 } or { TalentPoints(subterfuge_talent) and Energy() >= 90 } or { not TalentPoints(shadow_focus_talent) and not TalentPoints(subterfuge_talent) and Energy() >= 60 } } and Spell(vanish) }
+	{
+		#shadow_blades,if=time>5
+		if TimeInCombat() > 5 Spell(shadow_blades)
+
+		unless { Energy() < 45 and Spell(killing_spree) }
+		{
+			#adrenaline_rush,if=energy<35|buff.shadow_blades.up
+			if Energy() < 35 or BuffPresent(shadow_blades_buff) Spell(adrenaline_rush)
+		}
+	}
+}
+
+AddFunction CombatPrecombatActions
+{
+	#flask,type=spring_blossoms
+	#food,type=sea_mist_rice_noodles
+	#apply_poison,lethal=deadly
+	ApplyPoisons()
+	#snapshot_stats
+	#slice_and_dice,if=talent.marked_for_death.enabled
+	if TalentPoints(marked_for_death_talent) Spell(slice_and_dice)
+}
+
+AddFunction CombatPrecombatShortCdActions
+{
+	#stealth
+	if not IsStealthed() Spell(stealth)
+	#marked_for_death,if=talent.marked_for_death.enabled
+	if TalentPoints(marked_for_death_talent) Spell(marked_for_death)
+}
+
+AddFunction CombatPrecombatCdActions
+{
+	#virmens_bite_potion
+	if Stealthed(no) UsePotionAgility()
+}
+
+AddFunction CombatPrecombatCdActions
+{
+	#virmens_bite_potion
+	UsePotionAgility()
+}
+
+### Combat icons.
+AddIcon mastery=combat size=small checkboxon=opt_icons_left
+{
+	Spell(tricks_of_the_trade)
+}
+
+AddIcon mastery=combat size=small checkboxon=opt_icons_left
+{
+	if BuffPresent(blade_flurry_buff) Texture(ability_warrior_punishingblow)
+	Spell(redirect)
+}
+
+AddIcon mastery=combat help=shortcd
+{
+	if InCombat(no) CombatPrecombatShortCdActions()
+	CombatDefaultShortCdActions()
+}
+
+AddIcon mastery=combat help=main
+{
+	if InCombat(no) CombatPrecombatActions()
+	CombatDefaultActions()
+}
+
+AddIcon mastery=combat help=Predictive
+{
+	if InCombat(no) CombatPrecombatActions()
+	CombatDefaultAoeActions()
+}
+
+AddIcon mastery=combat help=cd
+{
+	if InCombat(no) CombatPrecombatCdActions()
+	CombatDefaultCdActions()
+}
+
+AddIcon mastery=combat help=cd size=small checkboxon=opt_icons_right
+{
+	Spell(feint)
+	UseRacialSurvivalActions()
+}
+
+AddIcon mastery=combat help=cd size=small checkboxon=opt_icons_right
+{
+	Spell(cloak_of_shadows)
+}
+
+###
+### Subtlety
+###
+# Based on SimulationCraft profile "Rogue_Subtlety_T16H".
+#	class=rogue
+#	spec=subtlety
+#	talents=http://us.battle.net/wow/en/tool/talent-calculator#cb!200002
+
+AddFunction SubtletyPoolActions
+{
+	#preparation,if=!buff.vanish.up&cooldown.vanish.remains>60
+	if not BuffPresent(vanish_buff) and SpellCooldown(vanish) > 60 Spell(preparation)
+}
+
+AddFunction SubtletyPrecombatActions
+{
+	#flask,type=spring_blossoms
+	#food,type=sea_mist_rice_noodles
+	#apply_poison,lethal=deadly
+	ApplyPoisons()
+	#snapshot_stats
+	#premeditation
+	Spell(premeditation)
+	#slice_and_dice
+	Spell(slice_and_dice)
+}
+
+AddFunction SubtletyPrecombatShortCdActions
+{
+	#stealth
+	if not IsStealthed() Spell(stealth)
+}
+
+AddFunction SubtletyPrecombatCdActions
+{
+	#virmens_bite_potion
+	if Stealthed(no) UsePotionAgility()
+}
+
+AddFunction SubtletyGeneratorActions
+{
+	#run_action_list,name=pool,if=buff.master_of_subtlety.down&buff.shadow_dance.down&debuff.find_weakness.down&(energy+cooldown.shadow_dance.remains*energy.regen<80|energy+cooldown.vanish.remains*energy.regen<60)
+	if BuffExpires(master_of_subtlety_buff) and BuffExpires(shadow_dance_buff) and target.DebuffExpires(find_weakness_debuff) and { Energy() + SpellCooldown(shadow_dance) * EnergyRegen() < 80 or Energy() + SpellCooldown(vanish) * EnergyRegen() < 60 } SubtletyPoolActions()
+	#hemorrhage,if=remains<3|position_front
+	if target.DebuffRemains(hemorrhage_debuff) < 3 or False(position_front) Spell(hemorrhage)
+	#shuriken_toss,if=talent.shuriken_toss.enabled&(energy<65&energy.regen<16)
+	if TalentPoints(shuriken_toss_talent) and { Energy() < 65 and EnergyRegen() < 16 } Spell(shuriken_toss)
+	#backstab
+	Spell(backstab usable=1)
+	#run_action_list,name=pool
+	SubtletyPoolActions()
+}
+
+AddFunction SubtletyGeneratorAoeActions
+{
+	#run_action_list,name=pool,if=buff.master_of_subtlety.down&buff.shadow_dance.down&debuff.find_weakness.down&(energy+cooldown.shadow_dance.remains*energy.regen<80|energy+cooldown.vanish.remains*energy.regen<60)
+	if BuffExpires(master_of_subtlety_buff) and BuffExpires(shadow_dance_buff) and target.DebuffExpires(find_weakness_debuff) and { Energy() + SpellCooldown(shadow_dance) * EnergyRegen() < 80 or Energy() + SpellCooldown(vanish) * EnergyRegen() < 60 } SubtletyPoolActions()
+	#fan_of_knives,if=active_enemies>=4
+	Spell(fan_of_knives)
+}
+
+AddFunction SubtletyFinisherActions
+{
+	#slice_and_dice,if=buff.slice_and_dice.remains<4
+	if BuffRemains(slice_and_dice_buff) < 4 Spell(slice_and_dice)
+	#rupture,if=ticks_remain<2&active_enemies<3
+	if target.TicksRemain(rupture_debuff) < 2 Spell(rupture)
+	#eviscerate,if=active_enemies<4|(active_enemies>3&dot.crimson_tempest_dot.ticks_remain>=2)
+	Spell(eviscerate)
+	#run_action_list,name=pool
+	SubtletyPoolActions()
+}
+
+AddFunction SubtletyFinisherAoeActions
+{
+	#slice_and_dice,if=buff.slice_and_dice.remains<4
+	if BuffRemains(slice_and_dice_buff) < 4 Spell(slice_and_dice)
+	#rupture,if=ticks_remain<2&active_enemies<3
+	if target.TicksRemain(rupture_debuff) < 2 and Enemies() < 3 Spell(rupture)
+	#crimson_tempest,if=(active_enemies>1&dot.crimson_tempest_dot.ticks_remain<=2&combo_points=5)|active_enemies>=5
+	if { Enemies() > 1 and target.TicksRemain(crimson_tempest_dot_debuff) <= 2 and ComboPoints() == 5 } or Enemies() >= 5 Spell(crimson_tempest)
+	#eviscerate,if=active_enemies<4|(active_enemies>3&dot.crimson_tempest_dot.ticks_remain>=2)
+	if Enemies() < 4 or { Enemies() > 3 and target.TicksRemain(crimson_tempest_dot_debuff) >= 2 } Spell(eviscerate)
+	#run_action_list,name=pool
+	SubtletyPoolActions()
+}
+
+AddFunction SubtletyDefaultActions
+{
+	#arcane_torrent,if=energy<60
+	if Energy() < 60 Spell(arcane_torrent_energy)
+	#premeditation,if=combo_points<=4
+	if ComboPoints() <= 4 Spell(premeditation usable=1)
+	#pool_resource,for_next=1
+	#ambush,if=combo_points<5|(talent.anticipation.enabled&anticipation_charges<3)|(buff.sleight_of_hand.up&buff.sleight_of_hand.remains<=gcd)
+	if ComboPoints() < 5 or { TalentPoints(anticipation_talent) and BuffStacks(anticipation_buff) < 3 } or { BuffPresent(sleight_of_hand_buff) and BuffRemains(sleight_of_hand_buff) <= GCD(ambush) } wait Spell(ambush usable=1)
+	#marked_for_death,if=talent.marked_for_death.enabled&combo_points=0
+	if TalentPoints(marked_for_death_talent) and ComboPoints() == 0 Spell(marked_for_death)
+	#run_action_list,name=generator,if=talent.anticipation.enabled&anticipation_charges<4&buff.slice_and_dice.up&dot.rupture.remains>2&(buff.slice_and_dice.remains<6|dot.rupture.remains<4)
+	if TalentPoints(anticipation_talent) and BuffStacks(anticipation_buff) < 4 and BuffPresent(slice_and_dice_buff) and target.DebuffRemains(rupture_debuff) > 2 and { BuffRemains(slice_and_dice_buff) < 6 or target.DebuffRemains(rupture_debuff) < 4 } SubtletyGeneratorActions()
+	#run_action_list,name=finisher,if=combo_points=5
+	if ComboPoints() == 5 SubtletyFinisherActions()
+	#run_action_list,name=generator,if=combo_points<4|energy>80|talent.anticipation.enabled
+	if ComboPoints() < 4 or Energy() > 80 or TalentPoints(anticipation_talent) SubtletyGeneratorActions()
+	#run_action_list,name=pool
+	SubtletyPoolActions()
+}
+
+AddFunction SubtletyDefaultAoeActions
+{
+	#arcane_torrent,if=energy<60
+	if Energy() < 60 Spell(arcane_torrent_energy)
+	#premeditation,if=combo_points<=4
+	if ComboPoints() <= 4 Spell(premeditation usable=1)
+	#pool_resource,for_next=1
+	#ambush,if=combo_points<5|(talent.anticipation.enabled&anticipation_charges<3)|(buff.sleight_of_hand.up&buff.sleight_of_hand.remains<=gcd)
+	if ComboPoints() < 5 or { TalentPoints(anticipation_talent) and BuffStacks(anticipation_buff) < 3 } or { BuffPresent(sleight_of_hand_buff) and BuffRemains(sleight_of_hand_buff) <= GCD(ambush) } wait Spell(ambush usable=1)
+	#marked_for_death,if=talent.marked_for_death.enabled&combo_points=0
+	if TalentPoints(marked_for_death_talent) and ComboPoints() == 0 Spell(marked_for_death)
+	#run_action_list,name=generator,if=talent.anticipation.enabled&anticipation_charges<4&buff.slice_and_dice.up&dot.rupture.remains>2&(buff.slice_and_dice.remains<6|dot.rupture.remains<4)
+	if TalentPoints(anticipation_talent) and BuffStacks(anticipation_buff) < 4 and BuffPresent(slice_and_dice_buff) and target.DebuffRemains(rupture_debuff) > 2 and { BuffRemains(slice_and_dice_buff) < 6 or target.DebuffRemains(rupture_debuff) < 4 } SubtletyGeneratorAoeActions()
+	#run_action_list,name=finisher,if=combo_points=5
+	if ComboPoints() == 5 SubtletyFinisherAoeActions()
+	#run_action_list,name=generator,if=combo_points<4|energy>80|talent.anticipation.enabled
+	if ComboPoints() < 4 or Energy() > 80 or TalentPoints(anticipation_talent) SubtletyGeneratorAoeActions()
+	#run_action_list,name=pool
+	SubtletyPoolActions()
+}
+
+AddFunction SubtletyDefaultShortCdActions
+{
+	unless { Energy() < 60 and Spell(arcane_torrent_energy) }
+		or { ComboPoints() <= 4 and Spell(premeditation usable=1) }
+		or { { ComboPoints() < 5 or { TalentPoints(anticipation_talent) and BuffStacks(anticipation_buff) < 3 } or { BuffPresent(sleight_of_hand_buff) and BuffRemains(sleight_of_hand_buff) <= GCD(ambush) } } and Spell(ambush usable=1) }
+	{
+		#pool_resource,for_next=1,extra_amount=75
+		#shadow_dance,if=energy>=75&buff.stealth.down&buff.vanish.down&debuff.find_weakness.down
+		if Spell(shadow_dance) and Stealthed(no) and BuffExpires(vanish_buff) and target.DebuffExpires(find_weakness_debuff) wait if Energy() >= 75 Spell(shadow_dance)
+		#pool_resource,for_next=1,extra_amount=45
+		#vanish,if=energy>=45&energy<=75&combo_points<=3&buff.shadow_dance.down&buff.master_of_subtlety.down&debuff.find_weakness.down
+		if Spell(vanish) and Energy() <= 75 and ComboPoints() <= 3 and BuffExpires(shadow_dance_buff) and BuffExpires(master_of_subtlety_buff) and target.DebuffExpires(find_weakness_debuff) wait if Energy() >= 45 Spell(vanish)
+	}
+}
+
+AddFunction SubtletyDefaultCdActions
+{
+	#virmens_bite_potion,if=buff.bloodlust.react|target.time_to_die<40
+	if BuffPresent(burst_haste any=1) or target.TimeToDie() < 40 UsePotionAgility()
+	#kick
+	Interrupt()
+	UseRacialInterruptActions()
+	#use_item,slot=hands,if=buff.shadow_dance.up
+	if BuffPresent(shadow_dance_buff) UseItemActions()
+	#blood_fury,if=buff.shadow_dance.up
+	if BuffPresent(shadow_dance_buff) Spell(blood_fury)
+	#berserking,if=buff.shadow_dance.up
+	if BuffPresent(shadow_dance_buff) Spell(berserking)
+
+	unless { Energy() < 60 and Spell(arcane_torrent_energy) }
+	{
+		#shadow_blades
+		Spell(shadow_blades)
+	}
+}
+
+### Subtlety icons.
+AddIcon mastery=subtlety size=small checkboxon=opt_icons_left
+{
+	Spell(tricks_of_the_trade)
+}
+
+AddIcon mastery=subtlety size=small checkboxon=opt_icons_left
+{
+	Spell(redirect)
+}
+
+AddIcon mastery=subtlety help=shortcd
+{
+	if InCombat(no) SubtletyPrecombatShortCdActions()
+	SubtletyDefaultShortCdActions()
+}
+
+AddIcon mastery=subtlety help=main
+{
+	if InCombat(no) SubtletyPrecombatActions()
+	SubtletyDefaultActions()
+}
+
+AddIcon mastery=subtlety help=aoe checkboxon=opt_aoe
+{
+	if InCombat(no) SubtletyPrecombatActions()
+	SubtletyDefaultAoeActions()
+}
+
+AddIcon mastery=subtlety help=cd
+{
+	if InCombat(no) SubtletyPrecombatCdActions()
+	SubtletyDefaultCdActions()
+}
+
+AddIcon mastery=subtlety help=cd size=small checkboxon=opt_icons_right
+{
+	Spell(feint)
+	UseRacialSurvivalActions()
+}
+
+AddIcon mastery=subtlety help=cd size=small checkboxon=opt_icons_right
+{
+	Spell(cloak_of_shadows)
+}
+]]
+
+	OvaleScripts:RegisterScript("ROGUE", name, desc, code)
+end
diff --git a/scripts/ovale_rogue_spells.lua b/scripts/ovale_rogue_spells.lua
new file mode 100644
index 0000000..4190191
--- /dev/null
+++ b/scripts/ovale_rogue_spells.lua
@@ -0,0 +1,271 @@
+local _, Ovale = ...
+local OvaleScripts = Ovale.OvaleScripts
+
+do
+	local name = "ovale_rogue_spells"
+	local desc = "[5.4.7] Ovale: Rogue spells"
+	local code = [[
+# Rogue spells and functions.
+#	Last updated: 2014-04-28
+
+Define(adrenaline_rush 13750)
+	SpellInfo(adrenaline_rush cd=180)
+	SpellAddBuff(adrenaline_rush adrenaline_rush_buff=1)
+Define(adrenaline_rush_buff 13750)
+	SpellInfo(adrenaline_rush_buff duration=15)
+Define(ambush 8676)
+	SpellInfo(ambush combo=2 energy=60)
+	SpellInfo(ambush critcombo=1 if_spell=seal_fate)
+	SpellInfo(ambush buff_combo=shadow_blades_buff if_spell=shadow_blades)
+	SpellInfo(ambush buff_energy_less15=shadow_blades_buff if_spell=shadow_blades itemset=T15_melee itemcount=4)
+	SpellInfo(ambush buff_energy_less75=stealth_buff if_spell=shadow_focus)
+	SpellInfo(ambush buff_energy=shadow_dance_buff buff_energy_amount=-20 if_spell=shadow_dance)
+	SpellAddBuff(ambush sleight_of_hand_buff=0 itemset=T16_melee itemcount=4)
+	SpellAddTargetDebuff(ambush find_weakness_debuff=1 if_spell=find_weakness)
+Define(anticipation 114015)
+Define(anticipation_buff 115189)
+	SpellInfo(anticipation_buff duration=15)
+Define(anticipation_talent 18)
+Define(backstab 53)
+	SpellInfo(backstab combo=1 energy=35)
+	SpellInfo(backstab buff_combo=shadow_blades_buff if_spell=shadow_blades)
+	SpellInfo(backstab buff_energy_less15=shadow_blades_buff if_spell=shadow_blades itemset=T15_melee itemcount=4)
+	SpellInfo(backstab buff_energy_less75=stealth_buff if_spell=shadow_focus)
+Define(bandits_guile_buff 84654)
+	SpellInfo(bandits_guile_buff duration=15)
+Define(blade_flurry 13877)
+	SpellInfo(blade_flurry cd=10)
+Define(blade_flurry_buff 13877)
+Define(blindside 121152)
+Define(blindside_buff 121153)
+	SpellInfo(blindside_buff duration=10)
+Define(cheap_shot 1833)
+	SpellInfo(cheap_shot combo=2 energy=40)
+	SpellInfo(cheap_shot critcombo=1 if_spell=seal_fate)
+	SpellInfo(cheap_shot buff_combo=shadow_blades_buff if_spell=shadow_blades)
+	SpellInfo(cheap_shot buff_energy_less15=shadow_blades_buff if_spell=shadow_blades itemset=T15_melee itemcount=4)
+	SpellInfo(cheap_shot buff_energy_less75=stealth_buff if_spell=shadow_focus)
+	SpellAddTargetDebuff(cheap_shot find_weakness_debuff=1 if_spell=find_weakness)
+Define(cloak_of_shadows 31224)
+	SpellInfo(cloak_of_shadows cd=60)
+Define(crimson_tempest 121411)
+	SpellInfo(crimson_tempest combo=finisher energy=35)
+	SpellInfo(crimson_tempest buff_energy_less15=shadow_blades_buff if_spell=shadow_blades itemset=T15_melee itemcount=4)
+	SpellInfo(crimson_tempest buff_energy_less75=stealth_buff if_spell=shadow_focus)
+	SpellAddBuff(crimson_tempest anticipation_buff=0 if_spell=anticipation)
+	SpellAddTargetDebuff(crimson_tempest crimson_tempest_dot_debuff=1)
+Define(crimson_tempest_dot_debuff 122233)
+	SpellInfo(crimson_tempest_dot duration=12 tick=2)
+Define(crippling_poison 3408)
+	SpellAddBuff(crippling_poison crippling_poison_buff=1)
+Define(crippling_poison_buff 3408)
+	SpellInfo(crippling_poison duration=3600)
+Define(cut_to_the_chase 51667)
+Define(deadly_poison 2823)
+	SpellAddBuff(deadly_poison deadly_poison_buff=1)
+Define(deadly_poison_buff 2823)
+	SpellInfo(deadly_poison_buff duration=3600)
+Define(deep_insight_buff 84747)
+	SpellInfo(deep_insight_buff duration=15)
+Define(dispatch 111240)
+	SpellInfo(dispatch combo=1 energy=30)
+	SpellInfo(dispatch critcombo=1 if_spell=seal_fate)
+	SpellInfo(dispatch buff_combo=shadow_blades_buff if_spell=shadow_blades)
+	SpellInfo(dispatch buff_energy_less15=shadow_blades_buff if_spell=shadow_blades itemset=T15_melee itemcount=4)
+	SpellInfo(dispatch buff_energy_less75=stealth_buff if_spell=shadow_focus)
+	SpellInfo(dispatch buff_energy_none=blindside_buff if_spell=blindside)
+	SpellAddBuff(dispatch blindside_buff=0 if_spell=blindside)
+Define(envenom 32645)
+	SpellInfo(envenom combo=finisher energy=35)
+	SpellInfo(envenom buff_energy_less15=shadow_blades_buff if_spell=shadow_blades itemset=T15_melee itemcount=4)
+	SpellInfo(envenom buff_energy_less75=stealth_buff if_spell=shadow_focus)
+	SpellAddBuff(envenom anticipation_buff=0 if_spell=anticipation)
+	SpellAddBuff(envenom slice_and_dice=refresh if_spell=cut_to_the_chase)
+Define(eviscerate 2098)
+	SpellInfo(eviscerate combo=finisher energy=35)
+	SpellInfo(eviscerate buff_energy_less15=shadow_blades_buff if_spell=shadow_blades itemset=T15_melee itemcount=4)
+	SpellInfo(eviscerate buff_energy_less75=stealth_buff if_spell=shadow_focus)
+	SpellAddBuff(eviscerate anticipation_buff=0 if_spell=anticipation)
+Define(fan_of_knives 51723)
+	SpellInfo(fan_of_knives combo=1 energy=35)
+	SpellInfo(fan_of_knives buff_energy_less15=shadow_blades_buff if_spell=shadow_blades itemset=T15_melee itemcount=4)
+	SpellInfo(fan_of_knives buff_energy_less75=stealth_buff if_spell=shadow_focus)
+	SpellInfo(fan_of_knives buff_combo=shadow_blades_buff if_spell=shadow_blades)
+Define(feint 1966)
+	SpellInfo(feint energy=20)
+	SpellInfo(feint buff_energy_less15=shadow_blades_buff if_spell=shadow_blades itemset=T15_melee itemcount=4)
+	SpellInfo(feint buff_energy_less75=stealth_buff if_spell=shadow_focus)
+Define(find_weakness 91023)
+Define(find_weakness_debuff 91021)
+	SpellInfo(find_weakness_debuff duration=10)
+Define(glyph_of_kick 56805)
+Define(glyph_of_redirect 146629)
+Define(glyph_of_stealth 63253)
+Define(glyph_of_tricks_of_the_trade 63256)
+Define(glyph_of_vanish 89758)
+Define(hemorrhage 16511)
+	SpellInfo(hemorrhage combo=1 energy=30)
+	SpellInfo(hemorrhage buff_combo=shadow_blades_buff if_spell=shadow_blades)
+	SpellInfo(hemorrhage buff_energy_less15=shadow_blades_buff if_spell=shadow_blades itemset=T15_melee itemcount=4)
+	SpellInfo(hemorrhage buff_energy_less75=stealth_buff if_spell=shadow_focus)
+	SpellAddTargetDebuff(hemorrhage hemorrhage_debuff=1)
+Define(hemorrhage_debuff 89775)
+	SpellInfo(hemorrhage_debuff duration=24 tick=3)
+Define(kick 1766)
+	SpellInfo(kick cd=15)
+	SpellInfo(kick addcd=4 glyph=glyph_of_kick)
+Define(kidney_shot 408)
+	SpellInfo(kidney_shot cd=20 combo=finisher energy=25)
+	SpellInfo(kidney_shot buff_energy_less15=shadow_blades_buff if_spell=shadow_blades itemset=T15_melee itemcount=4)
+	SpellInfo(kidney_shot buff_energy_less75=stealth_buff if_spell=shadow_focus)
+	SpellAddBuff(kidney_shot anticipation_buff=0 if_spell=anticipation)
+Define(killing_spree 51690)
+	SpellInfo(killing_spree cd=120)
+Define(leeching_poison 108211)
+	SpellAddBuff(leeching_poison leeching_poison_buff=1)
+Define(leeching_poison_buff 108211)
+	SpellInfo(leeching_poison_buff duration=3600)
+Define(leeching_poison_talent 8)
+SpellList(lethal_poison_buff deadly_poison_buff wound_poison_buff)
+Define(marked_for_death 137619)
+	SpellInfo(marked_for_death cd=60 combo=5)
+Define(marked_for_death_talent 17)
+Define(master_of_subtlety_buff 31665)
+Define(mind_numbing_poison 5761)
+	SpellAddBuff(mind_numbing_poison mind_numbing_poison_buff=1)
+Define(mind_numbing_poison_buff 5761)
+	SpellInfo(mind_numbing_poison_buff duration=3600)
+Define(mutilate 1329)
+	SpellInfo(mutilate combo=2 energy=55)
+	SpellInfo(mutilate critcombo=1 if_spell=seal_fate)
+	SpellInfo(mutilate buff_energy_less15=shadow_blades_buff if_spell=shadow_blades itemset=T15_melee itemcount=4)
+	SpellInfo(mutilate buff_energy_less75=stealth_buff if_spell=shadow_focus)
+	SpellInfo(mutilate buff_combo=shadow_blades_buff if_spell=shadow_blades)
+SpellList(non_lethal_poison_buff crippling_poison_buff leeching_poison_buff mind_numbing_poison_buff paralytic_poison_buff)
+Define(paralytic_poison 108215)
+	SpellAddBuff(paralytic_poison paralytic_poison_buff=1)
+Define(paralytic_poison_buff 108215)
+	SpellInfo(paralytic_poison_buff duration=3600)
+Define(paralytic_poison_talent 14)
+Define(premeditation 14183)
+	SpellInfo(premeditation cd=20 combo=2)
+Define(preparation 14185)
+	SpellInfo(preparation cd=300)
+Define(redirect 73981)
+	SpellInfo(redirect cd=60)
+	SpellInfo(redirect addcd=-50 glyph=glyph_of_redirect)
+Define(revealing_strike 84617)
+	SpellInfo(revealing_strike combo=1 energy=40)
+	SpellInfo(revealing_strike buff_combo=shadow_blades_buff if_spell=shadow_blades)
+	SpellInfo(revealing_strike buff_energy_less15=shadow_blades_buff if_spell=shadow_blades itemset=T15_melee itemcount=4)
+	SpellInfo(revealing_strike buff_energy_less75=stealth_buff if_spell=shadow_focus)
+	SpellAddTargetDebuff(revealing_strike revealing_strike_debuff=1)
+Define(revealing_strike_debuff 84617)
+	SpellInfo(revealing_strike_debuff duration=24 tick=3)
+Define(rupture 1943)
+	SpellInfo(rupture combo=finisher energy=25)
+	SpellInfo(rupture buff_energy_less15=shadow_blades_buff if_spell=shadow_blades itemset=T15_melee itemcount=4)
+	SpellInfo(rupture buff_energy_less75=stealth_buff if_spell=shadow_focus)
+	SpellAddBuff(rupture anticipation_buff=0 if_spell=anticipation)
+	SpellAddTargetDebuff(rupture rupture_debuff=1)
+Define(rupture_debuff 1943)
+	SpellInfo(rupture_debuff adddurationcp=4 duration=4 tick=2)
+Define(seal_fate 14190)
+Define(shadow_blades 121471)
+	SpellInfo(shadow_blades cd=180)
+	SpellAddBuff(shadow_blades shadow_blades_buff=1)
+Define(shadow_blades_buff 121471)
+	SpellInfo(shadow_blades_buff duration=12)
+	SpellInfo(shadow_blades_buff addduration=12 itemset=T14 itemcount=4)
+Define(shadow_dance 51713)
+	SpellInfo(shadow_dance cd=60)
+	SpellAddBuff(shadow_dance shadow_dance_buff=1)
+Define(shadow_dance_buff 51713)
+	SpellInfo(shadow_dance_buff duration=8)
+Define(shadow_focus 108209)
+Define(shadow_focus_talent 3)
+Define(shuriken_toss 114014)
+	SpellInfo(shuriken_toss combo=1 energy=40)
+	SpellInfo(shuriken_toss critcombo=1 if_spell=seal_fate)
+	SpellInfo(shuriken_toss buff_combo=shadow_blades_buff if_spell=shadow_blades)
+	SpellInfo(shuriken_toss buff_energy_less15=shadow_blades_buff if_spell=shadow_blades itemset=T15_melee itemcount=4)
+	SpellInfo(shuriken_toss buff_energy_less75=stealth_buff if_spell=shadow_focus)
+Define(shuriken_toss_talent 16)
+Define(sinister_strike 1752)
+	SpellInfo(sinister_strike combo=1 energy=50)
+	SpellInfo(sinister_strike buff_combo=shadow_blades_buff if_spell=shadow_blades)
+	SpellInfo(sinister_strike buff_energy_less15=shadow_blades_buff if_spell=shadow_blades itemset=T15_melee itemcount=4)
+	SpellInfo(sinister_strike buff_energy_less75=stealth_buff if_spell=shadow_focus)
+Define(sleight_of_hand_buff 145211)
+	SpellInfo(sleight_of_hand_buff duration=10)
+Define(slice_and_dice 5171)
+	SpellInfo(slice_and_dice combo=finisher energy=25)
+	SpellInfo(slice_and_dice buff_energy_less15=shadow_blades_buff if_spell=shadow_blades itemset=T15_melee itemcount=4)
+	SpellInfo(slice_and_dice buff_energy_less75=stealth_buff if_spell=shadow_focus)
+	SpellAddBuff(slice_and_dice slice_and_dice_buff=1)
+	SpellAddBuff(slice_and_dice anticipation_buff=0 if_spell=anticipation)
+Define(slice_and_dice_buff 5171)
+	SpellInfo(slice_and_dice adddurationcp=6 duration=6 tick=3)
+Define(stealth 1784)
+	SpellInfo(stealth cd=6)
+	SpellInfo(stealth addcd=-4 glyph=glyph_of_stealth)
+SpellList(steath_buff 1784 11327)
+Define(subterfuge_talent 2)
+Define(tricks_of_the_trade 57934)
+	SpellInfo(tricks_of_the_trade cd=30 energy=15)
+	SpellInfo(tricks_of_the_trade energy=0 glyph=glyph_of_tricks_of_the_trade)
+	SpellInfo(tricks_of_the_trade buff_energy_less15=shadow_blades_buff if_spell=shadow_blades itemset=T15_melee itemcount=4)
+	SpellInfo(tricks_of_the_trade buff_energy_less75=stealth_buff if_spell=shadow_focus)
+Define(vanish 1856)
+	SpellInfo(vanish cd=120)
+	SpellAddBuff(vanish vanish_buff=1)
+Define(vanish_buff 11327)
+	SpellInfo(vanish_buff duration=3)
+	SpellInfo(vanish_buff addduration=2 glyph=glyph_of_vanish)
+Define(vendetta 79140)
+	SpellInfo(vendetta cd=120)
+Define(wound_poison 8679)
+	SpellAddBuff(wound_poison wound_poison_buff=1)
+Define(wound_poison_buff 8679)
+	SpellInfo(wound_poison_buff duration=3600)
+
+AddFunction ApplyPoisons
+{
+	if InCombat(no)
+	{
+		if BuffExpires(lethal_poison_buff 600) Spell(deadly_poison)
+		if BuffExpires(non_lethal_poison_buff 600)
+		{
+			if TalentPoints(leeching_poison_talent) Spell(leeching_poison)
+			Spell(mind_numbing_poison)
+		}
+	}
+	if BuffExpires(lethal_poison_buff) Spell(deadly_poison)
+}
+
+AddFunction IsStealthed
+{
+	Stealthed() or BuffPresent(vanish_buff) or BuffPresent(shadow_dance_buff)
+}
+
+AddCheckBox(opt_tricks_of_the_trade SpellName(tricks_of_the_trade) default)
+AddFunction TricksOfTheTrade
+{
+	#tricks_of_the_trade
+	if CheckBoxOn(opt_tricks_of_the_trade) and Glyph(glyph_of_tricks_of_the_trade no) Spell(tricks_of_the_trade)
+}
+
+AddFunction Interrupt
+{
+	if not target.IsFriend() and target.IsInterruptible()
+	{
+		if IsStealthed() and target.InRange(cheap_shot) Spell(cheap_shot)
+		if target.InRange(kick) Spell(kick)
+		if not target.Classification(worldboss) and target.InRange(kidney_shot) Spell(kidney_shot)
+	}
+}
+
+]]
+
+	OvaleScripts:RegisterScript("ROGUE", name, desc, code, "include")
+end