Quantcast

Separate class spell information from functions and UI elements.

Johnny C. Lam [07-13-14 - 11:29]
Separate class spell information from functions and UI elements.

This allows the spell information to be re-used in other scripts without
also including unwanted functions or UI elements (checkboxes and lists).

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1523 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
OvaleSimulationCraft.lua
scripts/files.xml
scripts/ovale_common.lua
scripts/ovale_deathknight.lua
scripts/ovale_deathknight_common.lua
scripts/ovale_deathknight_spells.lua
scripts/ovale_druid.lua
scripts/ovale_druid_common.lua
scripts/ovale_druid_spells.lua
scripts/ovale_hunter.lua
scripts/ovale_hunter_common.lua
scripts/ovale_hunter_spells.lua
scripts/ovale_items.lua
scripts/ovale_mage.lua
scripts/ovale_mage_common.lua
scripts/ovale_mage_spells.lua
scripts/ovale_monk.lua
scripts/ovale_monk_common.lua
scripts/ovale_monk_spells.lua
scripts/ovale_paladin.lua
scripts/ovale_paladin_common.lua
scripts/ovale_paladin_spells.lua
scripts/ovale_priest.lua
scripts/ovale_priest_common.lua
scripts/ovale_priest_spells.lua
scripts/ovale_racials.lua
scripts/ovale_rogue.lua
scripts/ovale_rogue_common.lua
scripts/ovale_rogue_spells.lua
scripts/ovale_shaman.lua
scripts/ovale_shaman_common.lua
scripts/ovale_shaman_spells.lua
scripts/ovale_warlock.lua
scripts/ovale_warlock_common.lua
scripts/ovale_warlock_spells.lua
scripts/ovale_warrior.lua
scripts/ovale_warrior_common.lua
scripts/ovale_warrior_spells.lua
scripts/simulationcraft_deathknight_frost_1h_t16h.lua
scripts/simulationcraft_deathknight_frost_2h_t16h.lua
scripts/simulationcraft_deathknight_unholy_t16h.lua
scripts/simulationcraft_druid_balance_t16h.lua
scripts/simulationcraft_druid_feral_t16h.lua
scripts/simulationcraft_druid_feral_t16h_adv_rotation.lua
scripts/simulationcraft_hunter_bm_t16h.lua
scripts/simulationcraft_hunter_mm_t16h.lua
scripts/simulationcraft_hunter_sv_t16h.lua
scripts/simulationcraft_mage_arcane_t16h.lua
scripts/simulationcraft_mage_fire_t16h.lua
scripts/simulationcraft_mage_frost_t16h.lua
scripts/simulationcraft_monk_windwalker_1h_t16h.lua
scripts/simulationcraft_monk_windwalker_2h_t16h.lua
scripts/simulationcraft_paladin_protection_t16h.lua
scripts/simulationcraft_paladin_retribution_t16h.lua
scripts/simulationcraft_priest_shadow_t16h.lua
scripts/simulationcraft_rogue_assassination_t16h.lua
scripts/simulationcraft_rogue_combat_t16h.lua
scripts/simulationcraft_rogue_subtlety_t16h.lua
scripts/simulationcraft_shaman_elemental_t16h.lua
scripts/simulationcraft_shaman_enhancement_t16h.lua
scripts/simulationcraft_warlock_affliction_t16h.lua
scripts/simulationcraft_warlock_demonology_t16h.lua
scripts/simulationcraft_warlock_destruction_t16h.lua
scripts/simulationcraft_warrior_arms_t16h.lua
scripts/simulationcraft_warrior_fury_1h_t16h.lua
scripts/simulationcraft_warrior_fury_2h_t16h.lua
scripts/simulationcraft_warrior_protection_t16h.lua
diff --git a/OvaleSimulationCraft.lua b/OvaleSimulationCraft.lua
index 9b9b4ff..2abfc28 100644
--- a/OvaleSimulationCraft.lua
+++ b/OvaleSimulationCraft.lua
@@ -207,9 +207,8 @@ do
 		end

 		self:Append(script, "")
-		self:Append(script, "Include(ovale_items)")
-		self:Append(script, "Include(ovale_racials)")
-		self:Append(script, format("Include(ovale_%s_spells)", profile.class))
+		self:Append(script, "Include(ovale_common)")
+		self:Append(script, format("Include(ovale_%s_common)", profile.class))

 		if profile.actionList then
 			for listName, actionList in pairs(profile.actionList) do
@@ -250,6 +249,7 @@ do
 			self:Append(script, [[	OvaleScripts:RegisterScript("%s", name, desc, code, "reference")]], strupper(profile.class))
 		end
 		self:Append(script, "end")
+		self:Append(script, "")

 		return script
 	end
diff --git a/scripts/files.xml b/scripts/files.xml
index 1a94f89..7faf3ed 100644
--- a/scripts/files.xml
+++ b/scripts/files.xml
@@ -1,28 +1,40 @@
 <Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
+	<Script file="ovale_common.lua" />
 	<Script file="ovale_items.lua" />
 	<Script file="ovale_racials.lua" />

 	<Script file="ovale_deathknight.lua" />
+	<Script file="ovale_deathknight_common.lua" />
 	<Script file="ovale_deathknight_spells.lua" />
 	<Script file="ovale_druid.lua" />
+	<Script file="ovale_druid_common.lua" />
 	<Script file="ovale_druid_spells.lua" />
 	<Script file="ovale_hunter.lua" />
+	<Script file="ovale_hunter_common.lua" />
 	<Script file="ovale_hunter_spells.lua" />
 	<Script file="ovale_mage.lua" />
+	<Script file="ovale_mage_common.lua" />
 	<Script file="ovale_mage_spells.lua" />
 	<Script file="ovale_monk.lua" />
+	<Script file="ovale_monk_common.lua" />
 	<Script file="ovale_monk_spells.lua" />
 	<Script file="ovale_paladin.lua" />
+	<Script file="ovale_paladin_common.lua" />
 	<Script file="ovale_paladin_spells.lua" />
 	<Script file="ovale_priest.lua" />
+	<Script file="ovale_priest_common.lua" />
 	<Script file="ovale_priest_spells.lua" />
 	<Script file="ovale_rogue.lua" />
+	<Script file="ovale_rogue_common.lua" />
 	<Script file="ovale_rogue_spells.lua" />
 	<Script file="ovale_shaman.lua" />
+	<Script file="ovale_shaman_common.lua" />
 	<Script file="ovale_shaman_spells.lua" />
 	<Script file="ovale_warlock.lua" />
+	<Script file="ovale_warlock_common.lua" />
 	<Script file="ovale_warlock_spells.lua" />
 	<Script file="ovale_warrior.lua" />
+	<Script file="ovale_warrior_common.lua" />
 	<Script file="ovale_warrior_spells.lua" />

 	<Script file="leafkiller_druid.lua" />
diff --git a/scripts/ovale_common.lua b/scripts/ovale_common.lua
new file mode 100644
index 0000000..8ffedba
--- /dev/null
+++ b/scripts/ovale_common.lua
@@ -0,0 +1,79 @@
+local _, Ovale = ...
+local OvaleScripts = Ovale.OvaleScripts
+
+do
+	local name = "ovale_common"
+	local desc = "[5.4] Ovale: Common functions"
+	local code = [[
+# Common functions and UI elements for default scripts.
+
+Include(ovale_items)
+Include(ovale_racials)
+
+###
+### Use potions.
+###
+AddCheckBox(opt_potions "Use potions" default)
+
+AddFunction UsePotionAgility
+{
+	if CheckBoxOn(opt_potions) and target.Classification(worldboss) Item(virmens_bite_potion usable=1)
+}
+
+AddFunction UsePotionIntellect
+{
+	if CheckBoxOn(opt_potions) and target.Classification(worldboss) Item(jade_serpent_potion usable=1)
+}
+
+AddFunction UsePotionStrength
+{
+	if CheckBoxOn(opt_potions) and target.Classification(worldboss) Item(mogu_power_potion usable=1)
+}
+
+###
+### Use glove tinker and trinkets.
+###
+AddCheckBox(opt_use_trinket0 "Use trinket 0" default)
+AddCheckBox(opt_use_trinket1 "Use trinket 1" default)
+
+AddFunction UseItemActions
+{
+	Item(HandsSlot usable=1)
+	if CheckBoxOn(opt_use_trinket0) Item(Trinket0Slot usable=1)
+	if CheckBoxOn(opt_use_trinket1) Item(Trinket1Slot usable=1)
+}
+
+###
+### Racial actions.
+###
+AddFunction UseRacialActions
+{
+	Spell(berserking)
+	Spell(blood_fury)
+}
+
+AddFunction UseRacialInterruptActions
+{
+	if target.IsFriend(no) and target.IsInterruptible()
+	{
+		if target.Classification(worldboss no)
+		{
+			Spell(arcane_torrent_chi)
+			Spell(arcane_torrent_energy)
+			Spell(arcane_torrent_focus)
+			Spell(arcane_torrent_mana)
+			Spell(arcane_torrent_rage)
+			Spell(arcane_torrent_runicpower)
+			if target.InRange(quaking_palm) Spell(quaking_palm)
+		}
+	}
+}
+
+AddFunction UseRacialSurvivalActions
+{
+	Spell(stoneform)
+}
+]]
+
+	OvaleScripts:RegisterScript(nil, name, desc, code, "include")
+end
diff --git a/scripts/ovale_deathknight.lua b/scripts/ovale_deathknight.lua
index a9b1173..3ff38ba 100644
--- a/scripts/ovale_deathknight.lua
+++ b/scripts/ovale_deathknight.lua
@@ -7,9 +7,8 @@ do
 	local code = [[
 # Ovale death knight script based on SimulationCraft.

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_deathknight_spells)
+Include(ovale_common)
+Include(ovale_deathknight_common)

 AddCheckBox(opt_aoe L(AOE) default)
 AddCheckBox(opt_icons_left "Left icons")
diff --git a/scripts/ovale_deathknight_common.lua b/scripts/ovale_deathknight_common.lua
new file mode 100644
index 0000000..7b2d98a
--- /dev/null
+++ b/scripts/ovale_deathknight_common.lua
@@ -0,0 +1,43 @@
+local _, Ovale = ...
+local OvaleScripts = Ovale.OvaleScripts
+
+do
+	local name = "ovale_deathknight_common"
+	local desc = "[5.4.7] Ovale: Common death knight functions"
+	local code = [[
+# Common functions and UI elements for default death knight scripts.
+
+Include(ovale_deathknight_spells)
+
+###
+### Common functions for all specializations.
+###
+
+AddFunction Interrupt
+{
+	if target.IsFriend(no) and target.IsInterruptible()
+	{
+		if target.InRange(mind_freeze) Spell(mind_freeze)
+		if target.Classification(worldboss no)
+		{
+			if TalentPoints(asphyxiate_talent) and target.InRange(asphyxiate) Spell(asphyxiate)
+			if target.InRange(strangulate) Spell(strangulate)
+		}
+	}
+}
+
+AddFunction BloodTap
+{
+	# Blood Tap requires a minimum of five stacks of Blood Charge to be on the player.
+	if TalentPoints(blood_tap_talent) and BuffStacks(blood_charge_buff) >= 5 Spell(blood_tap)
+}
+
+AddFunction PlagueLeech
+{
+	# Plague Leech requires both Blood Plague and Frost Fever to exist on the target.
+	if TalentPoints(plague_leech_talent) and target.DebuffPresent(blood_plague_debuff) and target.DebuffPresent(frost_fever_debuff) Spell(plague_leech)
+}
+
+]]
+	OvaleScripts:RegisterScript("DEATHKNIGHT", name, desc, code, "include")
+end
diff --git a/scripts/ovale_deathknight_spells.lua b/scripts/ovale_deathknight_spells.lua
index 316364a..9c94089 100644
--- a/scripts/ovale_deathknight_spells.lua
+++ b/scripts/ovale_deathknight_spells.lua
@@ -215,31 +215,6 @@ Define(vampiric_blood_buff 55233)
 Define(will_of_the_necropolis 81164)
 Define(will_of_the_necropolis_buff 96171)
 	SpellInfo(will_of_the_necropolis_buff duration=8)
-
-AddFunction Interrupt
-{
-	if target.IsFriend(no) and target.IsInterruptible()
-	{
-		if target.InRange(mind_freeze) Spell(mind_freeze)
-		if target.Classification(worldboss no)
-		{
-			if TalentPoints(asphyxiate_talent) and target.InRange(asphyxiate) Spell(asphyxiate)
-			if target.InRange(strangulate) Spell(strangulate)
-		}
-	}
-}
-
-AddFunction BloodTap
-{
-	# Blood Tap requires a minimum of five stacks of Blood Charge to be on the player.
-	if TalentPoints(blood_tap_talent) and BuffStacks(blood_charge_buff) >= 5 Spell(blood_tap)
-}
-
-AddFunction PlagueLeech
-{
-	# Plague Leech requires both Blood Plague and Frost Fever to exist on the target.
-	if TalentPoints(plague_leech_talent) and target.DebuffPresent(blood_plague_debuff) and target.DebuffPresent(frost_fever_debuff) Spell(plague_leech)
-}
 ]]
 	OvaleScripts:RegisterScript("DEATHKNIGHT", name, desc, code, "include")
 end
diff --git a/scripts/ovale_druid.lua b/scripts/ovale_druid.lua
index 023b992..0de7dc8 100644
--- a/scripts/ovale_druid.lua
+++ b/scripts/ovale_druid.lua
@@ -7,9 +7,8 @@ do
 	local code = [[
 # Ovale druid script based on SimulationCraft.

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_druid_spells)
+Include(ovale_common)
+Include(ovale_druid_common)

 AddCheckBox(opt_aoe L(AOE) default)
 AddCheckBox(opt_icons_left "Left icons")
diff --git a/scripts/ovale_druid_common.lua b/scripts/ovale_druid_common.lua
new file mode 100644
index 0000000..df15731
--- /dev/null
+++ b/scripts/ovale_druid_common.lua
@@ -0,0 +1,86 @@
+local _, Ovale = ...
+local OvaleScripts = Ovale.OvaleScripts
+
+do
+	local name = "ovale_druid_common"
+	local desc = "[5.4.7] Ovale: Common druid functions"
+	local code = [[
+# Common functions and UI elements for default druid scripts.
+
+Include(ovale_druid_spells)
+
+###
+### Common functions for all specializations.
+###
+
+AddFunction FaerieFire
+{
+	if TalentPoints(faerie_swarm_talent) Spell(faerie_swarm)
+	if not TalentPoints(faerie_swarm_talent) Spell(faerie_fire)
+}
+
+AddFunction SavageRoar
+{
+    if Glyph(glyph_of_savagery) Spell(savage_roar_glyphed)
+    if Glyph(glyph_of_savagery no) and ComboPoints() >0 Spell(savage_roar)
+}
+
+###
+### Interrupt actions for each specialization.
+###
+
+AddFunction BalanceInterrupt
+{
+	if not target.IsFriend() and target.IsInterruptible()
+	{
+		if not target.Classification(worldboss)
+		{
+			if TalentPoints(mighty_bash_talent) and target.InRange(mighty_bash) Spell(mighty_bash)
+			if TalentPoints(typhoon_talent) Spell(typhoon)
+			Spell(solar_beam)
+		}
+	}
+}
+
+AddFunction FeralInterrupt
+{
+	if not target.IsFriend() and target.IsInterruptible()
+	{
+		if target.InRange(skull_bash_cat) Spell(skull_bash_cat)
+		if not target.Classification(worldboss)
+		{
+			if TalentPoints(mighty_bash_talent) and target.InRange(mighty_bash) Spell(mighty_bash)
+			if TalentPoints(typhoon_talent) and target.InRange(skull_bash_cat) Spell(typhoon)
+			if ComboPoints() > 0 and target.InRange(maim) Spell(maim)
+		}
+	}
+}
+
+AddFunction GuardianInterrupt
+{
+	if not target.IsFriend() and target.IsInterruptible()
+	{
+		if target.InRange(skull_bash_bear) Spell(skull_bash_bear)
+		if TalentPoints(typhoon_talent) and target.InRange(skull_bash_bear) Spell(typhoon)
+		if not target.Classification(worldboss) and TalentPoints(mighty_bash_talent) and target.InRange(mighty_bash)
+		{
+			Spell(mighty_bash)
+		}
+	}
+}
+
+AddFunction RestorationInterrupt
+{
+	if not target.IsFriend() and target.IsInterruptible()
+	{
+		if not target.Classification(worldboss)
+		{
+			if TalentPoints(typhoon_talent) Spell(typhoon)
+			if TalentPoints(mighty_bash_talent) and target.InRange(mighty_bash) Spell(mighty_bash)
+		}
+	}
+}
+]]
+
+	OvaleScripts:RegisterScript("DRUID", name, desc, code, "include")
+end
diff --git a/scripts/ovale_druid_spells.lua b/scripts/ovale_druid_spells.lua
index c9f84bc..c93f8a1 100644
--- a/scripts/ovale_druid_spells.lua
+++ b/scripts/ovale_druid_spells.lua
@@ -403,45 +403,6 @@ Define(wild_mushroom_heal 145205)
 Define(wrath 5176)
 	SpellInfo(wrath eclipse=-15 nature=1)

-AddFunction FaerieFire
-{
-	if TalentPoints(faerie_swarm_talent) Spell(faerie_swarm)
-	if not TalentPoints(faerie_swarm_talent) Spell(faerie_fire)
-}
-
-AddFunction SavageRoar
-{
-    if Glyph(glyph_of_savagery) Spell(savage_roar_glyphed)
-    if Glyph(glyph_of_savagery no) and ComboPoints() >0 Spell(savage_roar)
-}
-
-AddFunction BalanceInterrupt
-{
-	if not target.IsFriend() and target.IsInterruptible()
-	{
-		if not target.Classification(worldboss)
-		{
-			if TalentPoints(mighty_bash_talent) and target.InRange(mighty_bash) Spell(mighty_bash)
-			if TalentPoints(typhoon_talent) Spell(typhoon)
-			Spell(solar_beam)
-		}
-	}
-}
-
-AddFunction FeralInterrupt
-{
-	if not target.IsFriend() and target.IsInterruptible()
-	{
-		if target.InRange(skull_bash_cat) Spell(skull_bash_cat)
-		if not target.Classification(worldboss)
-		{
-			if TalentPoints(mighty_bash_talent) and target.InRange(mighty_bash) Spell(mighty_bash)
-			if TalentPoints(typhoon_talent) and target.InRange(skull_bash_cat) Spell(typhoon)
-			if ComboPoints() > 0 and target.InRange(maim) Spell(maim)
-		}
-	}
-}
-
 ### Moonfire
 AddFunction BalanceMoonfireTickDamage asValue=1
 {
@@ -523,31 +484,6 @@ AddFunction FeralThrashCatHitDamage asValue=1
 {
 	{ 1232 + 0.191 * AttackPower() } * target.DamageMultiplier(thrash_cat) * FeralMasteryDamageMultiplier()
 }
-
-AddFunction GuardianInterrupt
-{
-	if not target.IsFriend() and target.IsInterruptible()
-	{
-		if target.InRange(skull_bash_bear) Spell(skull_bash_bear)
-		if TalentPoints(typhoon_talent) and target.InRange(skull_bash_bear) Spell(typhoon)
-		if not target.Classification(worldboss) and TalentPoints(mighty_bash_talent) and target.InRange(mighty_bash)
-		{
-			Spell(mighty_bash)
-		}
-	}
-}
-
-AddFunction RestorationInterrupt
-{
-	if not target.IsFriend() and target.IsInterruptible()
-	{
-		if not target.Classification(worldboss)
-		{
-			if TalentPoints(typhoon_talent) Spell(typhoon)
-			if TalentPoints(mighty_bash_talent) and target.InRange(mighty_bash) Spell(mighty_bash)
-		}
-	}
-}
 ]]

 	OvaleScripts:RegisterScript("DRUID", name, desc, code, "include")
diff --git a/scripts/ovale_hunter.lua b/scripts/ovale_hunter.lua
index 4b7a59a..7e45b07 100644
--- a/scripts/ovale_hunter.lua
+++ b/scripts/ovale_hunter.lua
@@ -7,9 +7,8 @@ do
 	local code = [[
 # Ovale hunter script based on SimulationCraft.

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_hunter_spells)
+Include(ovale_common)
+Include(ovale_hunter_common)

 AddCheckBox(opt_aoe L(AOE) default)
 AddCheckBox(opt_icons_left "Left icons")
diff --git a/scripts/ovale_hunter_common.lua b/scripts/ovale_hunter_common.lua
new file mode 100644
index 0000000..a472ace
--- /dev/null
+++ b/scripts/ovale_hunter_common.lua
@@ -0,0 +1,39 @@
+local _, Ovale = ...
+local OvaleScripts = Ovale.OvaleScripts
+
+do
+	local name = "ovale_hunter_common"
+	local desc = "[5.4.7] Ovale: Common hunter functions"
+	local code = [[
+# Common functions and UI elements for default hunter scripts.
+
+Include(ovale_hunter_spells)
+
+###
+### Common functions for all specializations.
+###
+
+AddFunction Interrupt
+{
+	if not target.IsFriend() and target.IsInterruptible()
+	{
+		Spell(silencing_shot)
+		Spell(counter_shot)
+	}
+}
+
+AddFunction SummonPet
+{
+	if pet.Present(no) Texture(ability_hunter_beastcall help=SummonPet)
+	if pet.IsDead() Spell(revive_pet)
+}
+
+AddFunction KillCommand
+{
+	# Only suggest Kill Command if the pet can attack.
+	if pet.Present() and pet.IsIncapacitated(no) and pet.IsFeared(no) and pet.IsStunned(no) Spell(kill_command)
+}
+]]
+
+	OvaleScripts:RegisterScript("HUNTER", name, desc, code, "include")
+end
diff --git a/scripts/ovale_hunter_spells.lua b/scripts/ovale_hunter_spells.lua
index 51ff901..088a763 100644
--- a/scripts/ovale_hunter_spells.lua
+++ b/scripts/ovale_hunter_spells.lua
@@ -160,27 +160,6 @@ Define(thrill_of_the_hunt_buff 34720)
 	SpellInfo(thrill_of_the_hunt_buff duration=15)
 Define(thrill_of_the_hunt_talent 12)
 Define(trap_mastery 63458)
-
-AddFunction Interrupt
-{
-	if not target.IsFriend() and target.IsInterruptible()
-	{
-		Spell(silencing_shot)
-		Spell(counter_shot)
-	}
-}
-
-AddFunction SummonPet
-{
-	if pet.Present(no) Texture(ability_hunter_beastcall help=SummonPet)
-	if pet.IsDead() Spell(revive_pet)
-}
-
-AddFunction KillCommand
-{
-	# Only suggest Kill Command if the pet can attack.
-	if pet.Present() and pet.IsIncapacitated(no) and pet.IsFeared(no) and pet.IsStunned(no) Spell(kill_command)
-}
 ]]

 	OvaleScripts:RegisterScript("HUNTER", name, desc, code, "include")
diff --git a/scripts/ovale_items.lua b/scripts/ovale_items.lua
index 5d3e683..13787d0 100644
--- a/scripts/ovale_items.lua
+++ b/scripts/ovale_items.lua
@@ -25,23 +25,6 @@ Define(virmens_bite_potion 76089)
 Define(virmens_bite_potion_buff 105697)
 	SpellInfo(virmens_bite_potion_buff duration=25)

-AddCheckBox(potions "Use potions" default)
-
-AddFunction UsePotionAgility
-{
-	if CheckBoxOn(potions) and target.Classification(worldboss) Item(virmens_bite_potion usable=1)
-}
-
-AddFunction UsePotionIntellect
-{
-	if CheckBoxOn(potions) and target.Classification(worldboss) Item(jade_serpent_potion usable=1)
-}
-
-AddFunction UsePotionStrength
-{
-	if CheckBoxOn(potions) and target.Classification(worldboss) Item(mogu_power_potion usable=1)
-}
-
 ###
 ### Trinkets (Mists of Pandaria only)
 ###
@@ -75,16 +58,6 @@ Define(cooldown_reduction_agility_buff 146019)
 Define(cooldown_reduction_strength_buff 145955)
 Define(cooldown_reduction_tank_buff 146025)

-AddCheckBox(opt_use_trinket0 "Use trinket 0" default)
-AddCheckBox(opt_use_trinket1 "Use trinket 1" default)
-
-AddFunction UseItemActions
-{
-	Item(HandsSlot usable=1)
-	if CheckBoxOn(opt_use_trinket0) Item(Trinket0Slot usable=1)
-	if CheckBoxOn(opt_use_trinket1) Item(Trinket1Slot usable=1)
-}
-
 ###
 ### Legendary Meta Gem
 ###
diff --git a/scripts/ovale_mage.lua b/scripts/ovale_mage.lua
index 66d56c5..583330d 100644
--- a/scripts/ovale_mage.lua
+++ b/scripts/ovale_mage.lua
@@ -7,9 +7,8 @@ do
 	local code = [[
 # Ovale mage script based on SimulationCraft.

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_mage_spells)
+Include(ovale_common)
+Include(ovale_mage_common)

 AddCheckBox(opt_aoe L(AOE) default)
 AddCheckBox(opt_icons_left "Left icons")
diff --git a/scripts/ovale_mage_common.lua b/scripts/ovale_mage_common.lua
new file mode 100644
index 0000000..b3ddff5
--- /dev/null
+++ b/scripts/ovale_mage_common.lua
@@ -0,0 +1,38 @@
+local _, Ovale = ...
+local OvaleScripts = Ovale.OvaleScripts
+
+do
+	local name = "ovale_mage_common"
+	local desc = "[5.4.7] Ovale: Common mage functions"
+	local code = [[
+# Common functions and UI elements for default mage scripts.
+
+Include(ovale_mage_spells)
+
+AddFunction ConjureManaGem
+{
+	if Glyph(glyph_of_mana_gem) and ItemCharges(brilliant_mana_gem) <10 Spell(conjure_brilliant_mana_gem)
+	if Glyph(glyph_of_mana_gem no) and ItemCharges(mana_gem) <3 Spell(conjure_mana_gem)
+}
+
+AddFunction UseManaGem
+{
+	if Glyph(glyph_of_mana_gem) Item(brilliant_mana_gem)
+	if Glyph(glyph_of_mana_gem no) Item(mana_gem)
+}
+
+AddFunction IcyVeins
+{
+	if Glyph(glyph_of_icy_veins) Spell(icy_veins_glyphed)
+	if Glyph(glyph_of_icy_veins no) Spell(icy_veins)
+}
+
+AddFunction IcyVeinsCooldownRemains
+{
+	if Glyph(glyph_of_icy_veins) SpellCooldown(icy_veins_glyphed)
+	if Glyph(glyph_of_icy_veins no) SpellCooldown(icy_veins)
+}
+]]
+
+	OvaleScripts:RegisterScript("MAGE", name, desc, code, "include")
+end
diff --git a/scripts/ovale_mage_spells.lua b/scripts/ovale_mage_spells.lua
index f099228..e552709 100644
--- a/scripts/ovale_mage_spells.lua
+++ b/scripts/ovale_mage_spells.lua
@@ -42,6 +42,7 @@ Define(blizzard 10)
 	SpellInfo(blizzard channel=8 haste=spell)
 Define(brain_freeze_buff 57761)
 	SpellInfo(brain_freeze_buff duration=15)
+Define(brilliant_mana_gem 81901)
 Define(cold_snap 11958)
 	SpellInfo(cold_snap cd=180)
 Define(cold_snap_talent 12)
@@ -156,6 +157,7 @@ Define(living_bomb_debuff 44457)
 Define(living_bomb_talent 14)
 Define(mage_armor 6117)
 Define(mage_armor_buff 6117)
+Define(mana_gem 36799)
 Define(mirror_image 55342)
 	SpellInfo(mirror_image cd=180)
 Define(molten_armor 30482)
@@ -204,33 +206,6 @@ Define(water_elemental 31687)
 	SpellInfo(water_elemental cd=60)
 Define(water_elemental_freeze 33395)
 	SpellInfo(water_elemental_freeze cd=25)
-
-Define(brilliant_mana_gem 81901)
-Define(mana_gem 36799)
-
-AddFunction ConjureManaGem
-{
-	if Glyph(glyph_of_mana_gem) and ItemCharges(brilliant_mana_gem) <10 Spell(conjure_brilliant_mana_gem)
-	if Glyph(glyph_of_mana_gem no) and ItemCharges(mana_gem) <3 Spell(conjure_mana_gem)
-}
-
-AddFunction UseManaGem
-{
-	if Glyph(glyph_of_mana_gem) Item(brilliant_mana_gem)
-	if Glyph(glyph_of_mana_gem no) Item(mana_gem)
-}
-
-AddFunction IcyVeins
-{
-	if Glyph(glyph_of_icy_veins) Spell(icy_veins_glyphed)
-	if Glyph(glyph_of_icy_veins no) Spell(icy_veins)
-}
-
-AddFunction IcyVeinsCooldownRemains
-{
-	if Glyph(glyph_of_icy_veins) SpellCooldown(icy_veins_glyphed)
-	if Glyph(glyph_of_icy_veins no) SpellCooldown(icy_veins)
-}
 ]]

 	OvaleScripts:RegisterScript("MAGE", name, desc, code, "include")
diff --git a/scripts/ovale_monk.lua b/scripts/ovale_monk.lua
index 6fdea7e..5a62c2e 100644
--- a/scripts/ovale_monk.lua
+++ b/scripts/ovale_monk.lua
@@ -7,9 +7,8 @@ do
 	local code = [[
 # Ovale monk script based on SimulationCraft.

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_monk_spells)
+Include(ovale_common)
+Include(ovale_monk_common)

 AddCheckBox(opt_aoe L(AOE) default)
 AddCheckBox(opt_icons_left "Left icons")
diff --git a/scripts/ovale_monk_common.lua b/scripts/ovale_monk_common.lua
new file mode 100644
index 0000000..2be806c
--- /dev/null
+++ b/scripts/ovale_monk_common.lua
@@ -0,0 +1,27 @@
+local _, Ovale = ...
+local OvaleScripts = Ovale.OvaleScripts
+
+do
+	local name = "ovale_monk_common"
+	local desc = "[5.4.7] Ovale: Common monk functions"
+	local code = [[
+# Common functions and UI elements for default monk scripts.
+
+Include(ovale_monk_spells)
+
+###
+### Common functions for all specializations.
+###
+
+AddFunction Interrupt
+{
+	if target.IsFriend(no) and target.IsInterruptible()
+	{
+		if target.InRange(spear_hand_strike) Spell(spear_hand_strike)
+		if target.Classification(worldboss no) and target.InRange(paralysis) Spell(paralysis)
+	}
+}
+]]
+
+	OvaleScripts:RegisterScript("MONK", name, desc, code, "include")
+end
diff --git a/scripts/ovale_monk_spells.lua b/scripts/ovale_monk_spells.lua
index b827fb3..fa4a600 100644
--- a/scripts/ovale_monk_spells.lua
+++ b/scripts/ovale_monk_spells.lua
@@ -216,15 +216,6 @@ Define(zen_sphere 124081)
 Define(zen_sphere_buff 124081)
 	SpellInfo(zen_sphere_buff duration=16 haste=spell tick=2)
 Define(zen_sphere_talent 5)
-
-AddFunction Interrupt
-{
-	if target.IsFriend(no) and target.IsInterruptible()
-	{
-		if target.InRange(spear_hand_strike) Spell(spear_hand_strike)
-		if target.Classification(worldboss no) and target.InRange(paralysis) Spell(paralysis)
-	}
-}
 ]]

 	OvaleScripts:RegisterScript("MONK", name, desc, code, "include")
diff --git a/scripts/ovale_paladin.lua b/scripts/ovale_paladin.lua
index 568e62b..2072b3f 100644
--- a/scripts/ovale_paladin.lua
+++ b/scripts/ovale_paladin.lua
@@ -7,9 +7,8 @@ do
 	local code = [[
 # Ovale paladin script based on SimulationCraft.

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_paladin_spells)
+Include(ovale_common)
+Include(ovale_paladin_common)

 AddCheckBox(opt_aoe L(AOE) default)
 AddCheckBox(opt_icons_left "Left icons")
diff --git a/scripts/ovale_paladin_common.lua b/scripts/ovale_paladin_common.lua
new file mode 100644
index 0000000..8209213
--- /dev/null
+++ b/scripts/ovale_paladin_common.lua
@@ -0,0 +1,40 @@
+local _, Ovale = ...
+local OvaleScripts = Ovale.OvaleScripts
+
+do
+	local name = "ovale_paladin_common"
+	local desc = "[5.4.7] Ovale: Common paladin functions"
+	local code = [[
+# Common functions and UI elements for default paladin scripts.
+
+Include(ovale_paladin_spells)
+
+###
+### Common functions for all specializations.
+###
+
+AddFunction Interrupt
+{
+	if not target.IsFriend() and target.IsInterruptible()
+	{
+		if target.InRange(rebuke) Spell(rebuke)
+		if target.Classification(worldboss no)
+		{
+			if TalentPoints(fist_of_justice_talent) Spell(fist_of_justice)
+			if not TalentPoints(fist_of_justice_talent) and target.InRange(hammer_of_justice) Spell(hammer_of_justice)
+			#Spell(blinding_light)
+		}
+	}
+}
+
+AddFunction RaidBuffActions
+{
+	#blessing_of_kings,if=(!aura.str_agi_int.up)&(aura.mastery.up)
+	if BuffExpires(str_agi_int any=1) and BuffPresent(mastery any=1) and BuffExpires(mastery) Spell(blessing_of_kings)
+	#blessing_of_might,if=!aura.mastery.up
+	if BuffExpires(mastery any=1) Spell(blessing_of_might)
+}
+]]
+
+	OvaleScripts:RegisterScript("PALADIN", name, desc, code, "include")
+end
diff --git a/scripts/ovale_paladin_spells.lua b/scripts/ovale_paladin_spells.lua
index 99b8d21..7173a32 100644
--- a/scripts/ovale_paladin_spells.lua
+++ b/scripts/ovale_paladin_spells.lua
@@ -234,28 +234,6 @@ Define(word_of_glory 85673)
 	SpellAddBuff(word_of_glory bastion_of_power_buff=0 if_spell=shield_of_the_righteous itemset=T16_tank itemcount=4)
 	SpellAddBuff(word_of_glory divine_purpose_buff=0 talent=divine_purpose_talent)
 SpellList(word_of_glory_no_holy_power_buff bastion_of_power_buff divine_purpose_buff)
-
-AddFunction Interrupt
-{
-	if not target.IsFriend() and target.IsInterruptible()
-	{
-		if target.InRange(rebuke) Spell(rebuke)
-		if target.Classification(worldboss no)
-		{
-			if TalentPoints(fist_of_justice_talent) Spell(fist_of_justice)
-			if not TalentPoints(fist_of_justice_talent) and target.InRange(hammer_of_justice) Spell(hammer_of_justice)
-			#Spell(blinding_light)
-		}
-	}
-}
-
-AddFunction RaidBuffActions
-{
-	#blessing_of_kings,if=(!aura.str_agi_int.up)&(aura.mastery.up)
-	if BuffExpires(str_agi_int any=1) and BuffPresent(mastery any=1) and BuffExpires(mastery) Spell(blessing_of_kings)
-	#blessing_of_might,if=!aura.mastery.up
-	if BuffExpires(mastery any=1) Spell(blessing_of_might)
-}
 ]]

 	OvaleScripts:RegisterScript("PALADIN", name, desc, code, "include")
diff --git a/scripts/ovale_priest.lua b/scripts/ovale_priest.lua
index b890ccb..061fb6b 100644
--- a/scripts/ovale_priest.lua
+++ b/scripts/ovale_priest.lua
@@ -7,9 +7,8 @@ do
 	local code = [[
 # Ovale shadow script based on SimulationCraft.

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_priest_spells)
+Include(ovale_common)
+Include(ovale_priest_common)

 AddCheckBox(opt_aoe L(AOE) default)
 AddCheckBox(opt_icons_left "Left icons")
diff --git a/scripts/ovale_priest_common.lua b/scripts/ovale_priest_common.lua
new file mode 100644
index 0000000..0130dc5
--- /dev/null
+++ b/scripts/ovale_priest_common.lua
@@ -0,0 +1,23 @@
+local _, Ovale = ...
+local OvaleScripts = Ovale.OvaleScripts
+
+do
+	local name = "ovale_priest_common"
+	local desc = "[5.4.7] Ovale: Common priest functions"
+	local code = [[
+# Common functions and UI elements for default priest scripts.
+
+Include(ovale_priest_spells)
+
+###
+### Common functions for all specializations.
+###
+
+AddFunction Interrupt
+{
+	if target.IsFriend(no) and target.IsInterruptible() Spell(silence)
+}
+]]
+
+	OvaleScripts:RegisterScript("PRIEST", name, desc, code, "include")
+end
diff --git a/scripts/ovale_priest_spells.lua b/scripts/ovale_priest_spells.lua
index 6265dae..5327ff3 100644
--- a/scripts/ovale_priest_spells.lua
+++ b/scripts/ovale_priest_spells.lua
@@ -80,11 +80,6 @@ Define(vampiric_touch 34914)
 Define(vampiric_touch_debuff 34914)
 	SpellInfo(vampiric_touch_debuff duration=15 haste=spell tick=3)
 	SpellInfo(vampiric_touch_debuff addduration=3 itemset=T14_caster itemcount=4)
-
-AddFunction Interrupt
-{
-	if target.IsFriend(no) and target.IsInterruptible() Spell(silence)
-}
 ]]

 	OvaleScripts:RegisterScript("PRIEST", name, desc, code, "include")
diff --git a/scripts/ovale_racials.lua b/scripts/ovale_racials.lua
index cacd12c..52e5244 100644
--- a/scripts/ovale_racials.lua
+++ b/scripts/ovale_racials.lua
@@ -35,34 +35,6 @@ Define(stoneform 20594)
 	SpellAddBuff(stoneform stoneform_buff=1)
 Define(stoneform_buff 20594)
 	SpellInfo(stoneform_buff duration=8)
-
-AddFunction UseRacialActions
-{
-	Spell(berserking)
-	Spell(blood_fury)
-}
-
-AddFunction UseRacialInterruptActions
-{
-	if target.IsFriend(no) and target.IsInterruptible()
-	{
-		if target.Classification(worldboss no)
-		{
-			Spell(arcane_torrent_chi)
-			Spell(arcane_torrent_energy)
-			Spell(arcane_torrent_focus)
-			Spell(arcane_torrent_mana)
-			Spell(arcane_torrent_rage)
-			Spell(arcane_torrent_runicpower)
-			if target.InRange(quaking_palm) Spell(quaking_palm)
-		}
-	}
-}
-
-AddFunction UseRacialSurvivalActions
-{
-	Spell(stoneform)
-}
 ]]

 	OvaleScripts:RegisterScript(nil, name, desc, code, "include")
diff --git a/scripts/ovale_rogue.lua b/scripts/ovale_rogue.lua
index 5d2eb9a..8ce139d 100644
--- a/scripts/ovale_rogue.lua
+++ b/scripts/ovale_rogue.lua
@@ -7,9 +7,8 @@ do
 	local code = [[
 # Ovale rogue script based on SimulationCraft.

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_rogue_spells)
+Include(ovale_common)
+Include(ovale_rogue_common)

 AddCheckBox(opt_aoe L(AOE) default)
 AddCheckBox(opt_icons_left "Left icons")
diff --git a/scripts/ovale_rogue_common.lua b/scripts/ovale_rogue_common.lua
new file mode 100644
index 0000000..f4ee168
--- /dev/null
+++ b/scripts/ovale_rogue_common.lua
@@ -0,0 +1,54 @@
+local _, Ovale = ...
+local OvaleScripts = Ovale.OvaleScripts
+
+do
+	local name = "ovale_rogue_common"
+	local desc = "[5.4.7] Ovale: Common rogue functions"
+	local code = [[
+# Common functions and UI elements for default rogue scripts.
+
+Include(ovale_rogue_spells)
+
+###
+### Common functions for all specializations.
+###
+
+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
diff --git a/scripts/ovale_rogue_spells.lua b/scripts/ovale_rogue_spells.lua
index ddb8b94..d8c284f 100644
--- a/scripts/ovale_rogue_spells.lua
+++ b/scripts/ovale_rogue_spells.lua
@@ -238,43 +238,6 @@ 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")
diff --git a/scripts/ovale_shaman.lua b/scripts/ovale_shaman.lua
index a5a9dde..c7e21b9 100644
--- a/scripts/ovale_shaman.lua
+++ b/scripts/ovale_shaman.lua
@@ -7,9 +7,8 @@ do
 	local code = [[
 # Ovale shaman script based on SimulationCraft.

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_shaman_spells)
+Include(ovale_common)
+Include(ovale_shaman_common)

 AddCheckBox(opt_aoe L(AOE) default)
 AddCheckBox(opt_icons_left "Left icons")
diff --git a/scripts/ovale_shaman_common.lua b/scripts/ovale_shaman_common.lua
new file mode 100644
index 0000000..bc2f45e
--- /dev/null
+++ b/scripts/ovale_shaman_common.lua
@@ -0,0 +1,32 @@
+local _, Ovale = ...
+local OvaleScripts = Ovale.OvaleScripts
+
+do
+	local name = "ovale_shaman_common"
+	local desc = "[5.4.7] Ovale: Common shaman functions"
+	local code = [[
+# Common functions and UI elements for default shaman scripts.
+
+Include(ovale_shaman_spells)
+
+###
+### Common functions for all specializations.
+###
+
+AddFunction Bloodlust
+{
+	if DebuffExpires(burst_haste_debuff any=1)
+	{
+		Spell(bloodlust)
+		Spell(heroism)
+	}
+}
+
+AddFunction Interrupt
+{
+	if target.IsFriend(no) and target.IsInterruptible() Spell(wind_shear)
+}
+]]
+
+	OvaleScripts:RegisterScript("SHAMAN", name, desc, code, "include")
+end
diff --git a/scripts/ovale_shaman_spells.lua b/scripts/ovale_shaman_spells.lua
index eb94990..d38385b 100644
--- a/scripts/ovale_shaman_spells.lua
+++ b/scripts/ovale_shaman_spells.lua
@@ -198,20 +198,6 @@ Define(pet_reinforce 118347)
 	SpellAddBuff(pet_reinforce pet_reinforce_buff=1)
 Define(pet_reinforce_buff 118347)
 	SpellInfo(pet_reinforce_buff duration=60)
-
-AddFunction Bloodlust
-{
-	if DebuffExpires(burst_haste_debuff any=1)
-	{
-		Spell(bloodlust)
-		Spell(heroism)
-	}
-}
-
-AddFunction Interrupt
-{
-	if target.IsFriend(no) and target.IsInterruptible() Spell(wind_shear)
-}
 ]]

 	OvaleScripts:RegisterScript("SHAMAN", name, desc, code, "include")
diff --git a/scripts/ovale_warlock.lua b/scripts/ovale_warlock.lua
index 0e774c5..9c7e0bc 100644
--- a/scripts/ovale_warlock.lua
+++ b/scripts/ovale_warlock.lua
@@ -7,9 +7,8 @@ do
 	local code = [[
 # Ovale warlock script based on SimulationCraft.

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_warlock_spells)
+Include(ovale_common)
+Include(ovale_warlock_common)

 AddCheckBox(opt_aoe L(AOE) default)
 AddCheckBox(opt_icons_left "Left icons")
diff --git a/scripts/ovale_warlock_common.lua b/scripts/ovale_warlock_common.lua
new file mode 100644
index 0000000..e673e78
--- /dev/null
+++ b/scripts/ovale_warlock_common.lua
@@ -0,0 +1,28 @@
+local _, Ovale = ...
+local OvaleScripts = Ovale.OvaleScripts
+
+do
+	local name = "ovale_warlock_common"
+	local desc = "[5.4.7] Ovale: Common warlock functions"
+	local code = [[
+# Common functions and UI elements for default warlock scripts.
+
+Include(ovale_warlock_spells)
+
+###
+### Common functions for all specializations.
+###
+
+AddFunction SummonPet
+{
+	if pet.Present(no) Texture(spell_nature_removecurse help=SummonPet)
+}
+
+AddFunction ServicePet
+{
+	if TalentPoints(grimoire_of_service_talent) and Spell(grimoire_of_service) Texture(spell_nature_removecurse help=ServicePet)
+}
+]]
+
+	OvaleScripts:RegisterScript("WARLOCK", name, desc, code, "include")
+end
diff --git a/scripts/ovale_warlock_spells.lua b/scripts/ovale_warlock_spells.lua
index dbb70fe..7fdccbc 100644
--- a/scripts/ovale_warlock_spells.lua
+++ b/scripts/ovale_warlock_spells.lua
@@ -202,16 +202,6 @@ Define(wrathguard_wrathstorm 115831)
 Define(wrathguard_wrathstorm_buff 89751)
 	SpellInfo(wrathguard_wrathstorm_buff duration=6)

-AddFunction SummonPet
-{
-	if pet.Present(no) Texture(spell_nature_removecurse help=SummonPet)
-}
-
-AddFunction ServicePet
-{
-	if TalentPoints(grimoire_of_service_talent) and Spell(grimoire_of_service) Texture(spell_nature_removecurse help=ServicePet)
-}
-
 AddFunction AfflictionMasteryDamageMultiplier asValue=1 { 1 + MasteryEffect() / 100 }
 AddFunction AfflictionAgonyTickDamage asValue=1
 {
diff --git a/scripts/ovale_warrior.lua b/scripts/ovale_warrior.lua
index 9397a9e..9102fd3 100644
--- a/scripts/ovale_warrior.lua
+++ b/scripts/ovale_warrior.lua
@@ -7,9 +7,8 @@ do
 	local code = [[
 # Ovale warrior script based on SimulationCraft.

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_warrior_spells)
+Include(ovale_common)
+Include(ovale_warrior_common)

 AddCheckBox(opt_aoe L(AOE) default)
 AddCheckBox(opt_icons_left "Left icons")
diff --git a/scripts/ovale_warrior_common.lua b/scripts/ovale_warrior_common.lua
new file mode 100644
index 0000000..31bfb31
--- /dev/null
+++ b/scripts/ovale_warrior_common.lua
@@ -0,0 +1,39 @@
+local _, Ovale = ...
+local OvaleScripts = Ovale.OvaleScripts
+
+do
+	local name = "ovale_warrior_common"
+	local desc = "[5.4.7] Ovale: Common warrior functions"
+	local code = [[
+# Common functions and UI elements for default warrior scripts.
+
+Include(ovale_warrior_spells)
+
+###
+### Common functions for all specializations.
+###
+
+AddFunction Interrupt
+{
+	if target.IsFriend(no) and target.IsInterruptible()
+	{
+		if target.InRange(pummel) Spell(pummel)
+		if Glyph(glyph_of_gag_order) and target.InRange(heroic_throw) Spell(heroic_throw)
+		Spell(disrupting_shout)
+	}
+}
+
+AddCheckBox(opt_heroic_leap_dps SpellName(heroic_leap) mastery=!protection)
+AddFunction HeroicLeap
+{
+	if CheckBoxOn(opt_heroic_leap_dps) Spell(heroic_leap)
+}
+
+AddFunction RagingBlow
+{
+	if BuffPresent(raging_blow_buff) Spell(raging_blow)
+}
+]]
+
+	OvaleScripts:RegisterScript("WARRIOR", name, desc, code, "include")
+end
diff --git a/scripts/ovale_warrior_spells.lua b/scripts/ovale_warrior_spells.lua
index bc8517f..5095fc4 100644
--- a/scripts/ovale_warrior_spells.lua
+++ b/scripts/ovale_warrior_spells.lua
@@ -277,27 +277,6 @@ Define(wild_strike 100130)
 	SpellInfo(wild_strike rage=30)
 	SpellInfo(wild_strike buff_rage_none=bloodsurge_buff if_spell=bloodsurge)
 	SpellAddBuff(wild_strike bloodsurge_buff=-1)
-
-AddFunction Interrupt
-{
-	if target.IsFriend(no) and target.IsInterruptible()
-	{
-		if target.InRange(pummel) Spell(pummel)
-		if Glyph(glyph_of_gag_order) and target.InRange(heroic_throw) Spell(heroic_throw)
-		Spell(disrupting_shout)
-	}
-}
-
-AddCheckBox(opt_heroic_leap_dps SpellName(heroic_leap) mastery=!protection)
-AddFunction HeroicLeap
-{
-	if CheckBoxOn(opt_heroic_leap_dps) Spell(heroic_leap)
-}
-
-AddFunction RagingBlow
-{
-	if BuffPresent(raging_blow_buff) Spell(raging_blow)
-}
 ]]

 	OvaleScripts:RegisterScript("WARRIOR", name, desc, code, "include")
diff --git a/scripts/simulationcraft_deathknight_frost_1h_t16h.lua b/scripts/simulationcraft_deathknight_frost_1h_t16h.lua
index 91a0cbc..d343585 100644
--- a/scripts/simulationcraft_deathknight_frost_1h_t16h.lua
+++ b/scripts/simulationcraft_deathknight_frost_1h_t16h.lua
@@ -11,9 +11,8 @@ do
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#dZ!1...0.
 #	glyphs=loud_horn

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_deathknight_spells)
+Include(ovale_common)
+Include(ovale_deathknight_common)

 AddFunction FrostAoeActions
 {
@@ -177,4 +176,4 @@ AddIcon mastery=frost help=main
 # unholy_blight_talent
 ]]
 	OvaleScripts:RegisterScript("DEATHKNIGHT", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_deathknight_frost_2h_t16h.lua b/scripts/simulationcraft_deathknight_frost_2h_t16h.lua
index e892a96..b4d4061 100644
--- a/scripts/simulationcraft_deathknight_frost_2h_t16h.lua
+++ b/scripts/simulationcraft_deathknight_frost_2h_t16h.lua
@@ -11,9 +11,8 @@ do
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#dZ!1...0.
 #	glyphs=loud_horn

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_deathknight_spells)
+Include(ovale_common)
+Include(ovale_deathknight_common)

 AddFunction FrostAoeActions
 {
@@ -188,4 +187,4 @@ AddIcon mastery=frost help=main
 # unholy_blight_talent
 ]]
 	OvaleScripts:RegisterScript("DEATHKNIGHT", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_deathknight_unholy_t16h.lua b/scripts/simulationcraft_deathknight_unholy_t16h.lua
index 855bdcf..e050591 100644
--- a/scripts/simulationcraft_deathknight_unholy_t16h.lua
+++ b/scripts/simulationcraft_deathknight_unholy_t16h.lua
@@ -10,9 +10,8 @@ do
 #	spec=unholy
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#db!2...0.

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_deathknight_spells)
+Include(ovale_common)
+Include(ovale_deathknight_common)

 AddFunction UnholyAoeActions
 {
@@ -200,4 +199,4 @@ AddIcon mastery=unholy help=main
 # unholy_presence
 ]]
 	OvaleScripts:RegisterScript("DEATHKNIGHT", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_druid_balance_t16h.lua b/scripts/simulationcraft_druid_balance_t16h.lua
index be4af07..e44ce32 100644
--- a/scripts/simulationcraft_druid_balance_t16h.lua
+++ b/scripts/simulationcraft_druid_balance_t16h.lua
@@ -10,9 +10,8 @@ do
 #	spec=balance
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#Ua!.0.1.0

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_druid_spells)
+Include(ovale_common)
+Include(ovale_druid_common)

 AddFunction BalanceDefaultActions
 {
@@ -121,4 +120,4 @@ AddIcon mastery=balance help=main
 # wrath
 ]]
 	OvaleScripts:RegisterScript("DRUID", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_druid_feral_t16h.lua b/scripts/simulationcraft_druid_feral_t16h.lua
index 4ffe241..49b7f6d 100644
--- a/scripts/simulationcraft_druid_feral_t16h.lua
+++ b/scripts/simulationcraft_druid_feral_t16h.lua
@@ -11,9 +11,8 @@ do
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#UZ!...2.1
 #	glyphs=savagery/cat_form

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_druid_spells)
+Include(ovale_common)
+Include(ovale_druid_common)

 AddFunction FeralFillerActions
 {
@@ -300,4 +299,4 @@ AddIcon mastery=feral help=main
 # weakened_armor_debuff
 ]]
 	OvaleScripts:RegisterScript("DRUID", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_druid_feral_t16h_adv_rotation.lua b/scripts/simulationcraft_druid_feral_t16h_adv_rotation.lua
index 5510cea..32a9de5 100644
--- a/scripts/simulationcraft_druid_feral_t16h_adv_rotation.lua
+++ b/scripts/simulationcraft_druid_feral_t16h_adv_rotation.lua
@@ -11,9 +11,8 @@ do
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#UZ!...2.1
 #	glyphs=savagery/cat_form

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_druid_spells)
+Include(ovale_common)
+Include(ovale_druid_common)

 AddFunction FeralFillerActions
 {
@@ -300,4 +299,4 @@ AddIcon mastery=feral help=main
 # weakened_armor_debuff
 ]]
 	OvaleScripts:RegisterScript("DRUID", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_hunter_bm_t16h.lua b/scripts/simulationcraft_hunter_bm_t16h.lua
index aaaaa29..7ff6c90 100644
--- a/scripts/simulationcraft_hunter_bm_t16h.lua
+++ b/scripts/simulationcraft_hunter_bm_t16h.lua
@@ -10,9 +10,8 @@ do
 #	spec=beast_mastery
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#Ya!...100

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_hunter_spells)
+Include(ovale_common)
+Include(ovale_hunter_common)

 AddFunction BeastMasteryDefaultActions
 {
@@ -133,4 +132,4 @@ AddIcon mastery=beast_mastery help=main
 # virmens_bite_potion
 ]]
 	OvaleScripts:RegisterScript("HUNTER", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_hunter_mm_t16h.lua b/scripts/simulationcraft_hunter_mm_t16h.lua
index 44c2985..915f488 100644
--- a/scripts/simulationcraft_hunter_mm_t16h.lua
+++ b/scripts/simulationcraft_hunter_mm_t16h.lua
@@ -10,9 +10,8 @@ do
 #	spec=marksmanship
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#YZ!...000

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_hunter_spells)
+Include(ovale_common)
+Include(ovale_hunter_common)

 AddFunction MarksmanshipCarefulAimActions
 {
@@ -147,4 +146,4 @@ AddIcon mastery=marksmanship help=main
 # virmens_bite_potion
 ]]
 	OvaleScripts:RegisterScript("HUNTER", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_hunter_sv_t16h.lua b/scripts/simulationcraft_hunter_sv_t16h.lua
index 305dcc8..4083696 100644
--- a/scripts/simulationcraft_hunter_sv_t16h.lua
+++ b/scripts/simulationcraft_hunter_sv_t16h.lua
@@ -10,9 +10,8 @@ do
 #	spec=survival
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#Yb!...200

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_hunter_spells)
+Include(ovale_common)
+Include(ovale_hunter_common)

 AddFunction SurvivalDefaultActions
 {
@@ -130,4 +129,4 @@ AddIcon mastery=survival help=main
 # virmens_bite_potion
 ]]
 	OvaleScripts:RegisterScript("HUNTER", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_mage_arcane_t16h.lua b/scripts/simulationcraft_mage_arcane_t16h.lua
index 20584da..71973fc 100644
--- a/scripts/simulationcraft_mage_arcane_t16h.lua
+++ b/scripts/simulationcraft_mage_arcane_t16h.lua
@@ -11,9 +11,8 @@ do
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#ea!0...11
 #	glyphs=mana_gem/mirror_image/arcane_power

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_mage_spells)
+Include(ovale_common)
+Include(ovale_mage_common)

 AddFunction ArcaneAoeActions
 {
@@ -147,4 +146,4 @@ AddIcon mastery=arcane help=main
 # trinket_stat_intellect_buff
 ]]
 	OvaleScripts:RegisterScript("MAGE", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_mage_fire_t16h.lua b/scripts/simulationcraft_mage_fire_t16h.lua
index 3e1af69..521f7b9 100644
--- a/scripts/simulationcraft_mage_fire_t16h.lua
+++ b/scripts/simulationcraft_mage_fire_t16h.lua
@@ -11,9 +11,8 @@ do
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#eZ!0...11
 #	glyphs=combustion/counterspell

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_mage_spells)
+Include(ovale_common)
+Include(ovale_mage_common)

 AddFunction FireDefaultActions
 {
@@ -125,4 +124,4 @@ AddIcon mastery=fire help=main
 # time_warp
 ]]
 	OvaleScripts:RegisterScript("MAGE", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_mage_frost_t16h.lua b/scripts/simulationcraft_mage_frost_t16h.lua
index c7977cd..23c7cc0 100644
--- a/scripts/simulationcraft_mage_frost_t16h.lua
+++ b/scripts/simulationcraft_mage_frost_t16h.lua
@@ -11,9 +11,8 @@ do
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#eb!0...11
 #	glyphs=evocation/icy_veins/splitting_ice

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_mage_spells)
+Include(ovale_common)
+Include(ovale_mage_common)

 AddFunction FrostDefaultActions
 {
@@ -125,4 +124,4 @@ AddIcon mastery=frost help=main
 # water_elemental
 ]]
 	OvaleScripts:RegisterScript("MAGE", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_monk_windwalker_1h_t16h.lua b/scripts/simulationcraft_monk_windwalker_1h_t16h.lua
index c14aa26..a02efb0 100644
--- a/scripts/simulationcraft_monk_windwalker_1h_t16h.lua
+++ b/scripts/simulationcraft_monk_windwalker_1h_t16h.lua
@@ -10,9 +10,8 @@ do
 #	spec=windwalker
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#fb!002221

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_monk_spells)
+Include(ovale_common)
+Include(ovale_monk_common)

 AddFunction WindwalkerAoeActions
 {
@@ -138,4 +137,4 @@ AddIcon mastery=windwalker help=main
 # zen_sphere_talent
 ]]
 	OvaleScripts:RegisterScript("MONK", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_monk_windwalker_2h_t16h.lua b/scripts/simulationcraft_monk_windwalker_2h_t16h.lua
index 6313cc4..9b0d78c 100644
--- a/scripts/simulationcraft_monk_windwalker_2h_t16h.lua
+++ b/scripts/simulationcraft_monk_windwalker_2h_t16h.lua
@@ -10,9 +10,8 @@ do
 #	spec=windwalker
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#fb!002221

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_monk_spells)
+Include(ovale_common)
+Include(ovale_monk_common)

 AddFunction WindwalkerAoeActions
 {
@@ -138,4 +137,4 @@ AddIcon mastery=windwalker help=main
 # zen_sphere_talent
 ]]
 	OvaleScripts:RegisterScript("MONK", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_paladin_protection_t16h.lua b/scripts/simulationcraft_paladin_protection_t16h.lua
index ab37f40..d69d017 100644
--- a/scripts/simulationcraft_paladin_protection_t16h.lua
+++ b/scripts/simulationcraft_paladin_protection_t16h.lua
@@ -11,9 +11,8 @@ do
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#bZ!201121
 #	glyphs=focused_shield/alabaster_shield/divine_protection

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_paladin_spells)
+Include(ovale_common)
+Include(ovale_paladin_common)

 AddFunction ProtectionDefaultActions
 {
@@ -133,4 +132,4 @@ AddIcon mastery=protection help=main
 # str_agi_int
 ]]
 	OvaleScripts:RegisterScript("PALADIN", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_paladin_retribution_t16h.lua b/scripts/simulationcraft_paladin_retribution_t16h.lua
index 70e5186..205c76e 100644
--- a/scripts/simulationcraft_paladin_retribution_t16h.lua
+++ b/scripts/simulationcraft_paladin_retribution_t16h.lua
@@ -11,9 +11,8 @@ do
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#bb!110112
 #	glyphs=double_jeopardy/mass_exorcism

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_paladin_spells)
+Include(ovale_common)
+Include(ovale_paladin_common)

 AddFunction RetributionDefaultActions
 {
@@ -151,4 +150,4 @@ AddIcon mastery=retribution help=main
 # tier15_4pc_melee_buff
 ]]
 	OvaleScripts:RegisterScript("PALADIN", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_priest_shadow_t16h.lua b/scripts/simulationcraft_priest_shadow_t16h.lua
index a72c10c..b066cad 100644
--- a/scripts/simulationcraft_priest_shadow_t16h.lua
+++ b/scripts/simulationcraft_priest_shadow_t16h.lua
@@ -11,9 +11,8 @@ do
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#Xb!002202
 #	glyphs=inner_sanctum/mind_flay/dark_archangel/shadowy_friends/shadow_ravens

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_priest_spells)
+Include(ovale_common)
+Include(ovale_priest_common)

 AddFunction ShadowDefaultActions
 {
@@ -153,4 +152,4 @@ AddIcon mastery=shadow help=main
 # vampiric_touch_debuff
 ]]
 	OvaleScripts:RegisterScript("PRIEST", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_rogue_assassination_t16h.lua b/scripts/simulationcraft_rogue_assassination_t16h.lua
index 3389f82..215a517 100644
--- a/scripts/simulationcraft_rogue_assassination_t16h.lua
+++ b/scripts/simulationcraft_rogue_assassination_t16h.lua
@@ -11,9 +11,8 @@ do
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#ca!200002
 #	glyphs=vendetta

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_rogue_spells)
+Include(ovale_common)
+Include(ovale_rogue_common)

 AddFunction AssassinationDefaultActions
 {
@@ -114,4 +113,4 @@ AddIcon mastery=assassination help=main
 # virmens_bite_potion
 ]]
 	OvaleScripts:RegisterScript("ROGUE", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_rogue_combat_t16h.lua b/scripts/simulationcraft_rogue_combat_t16h.lua
index 0eb01a7..62acba8 100644
--- a/scripts/simulationcraft_rogue_combat_t16h.lua
+++ b/scripts/simulationcraft_rogue_combat_t16h.lua
@@ -10,9 +10,8 @@ do
 #	spec=combat
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#cZ!200002

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_rogue_spells)
+Include(ovale_common)
+Include(ovale_rogue_common)

 AddFunction CombatFinisherActions
 {
@@ -138,4 +137,4 @@ AddIcon mastery=combat help=main
 # virmens_bite_potion
 ]]
 	OvaleScripts:RegisterScript("ROGUE", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_rogue_subtlety_t16h.lua b/scripts/simulationcraft_rogue_subtlety_t16h.lua
index 86fe4e1..355ab5d 100644
--- a/scripts/simulationcraft_rogue_subtlety_t16h.lua
+++ b/scripts/simulationcraft_rogue_subtlety_t16h.lua
@@ -10,9 +10,8 @@ do
 #	spec=subtlety
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#cb!200002

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_rogue_spells)
+Include(ovale_common)
+Include(ovale_rogue_common)

 AddFunction SubtletyPoolActions
 {
@@ -151,4 +150,4 @@ AddIcon mastery=subtlety help=main
 # virmens_bite_potion
 ]]
 	OvaleScripts:RegisterScript("ROGUE", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_shaman_elemental_t16h.lua b/scripts/simulationcraft_shaman_elemental_t16h.lua
index c8ab790..56ddd3c 100644
--- a/scripts/simulationcraft_shaman_elemental_t16h.lua
+++ b/scripts/simulationcraft_shaman_elemental_t16h.lua
@@ -11,9 +11,8 @@ do
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#Wa!...2.0
 #	glyphs=chain_lightning

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_shaman_spells)
+Include(ovale_common)
+Include(ovale_shaman_common)

 AddFunction ElementalAoeActions
 {
@@ -157,4 +156,4 @@ AddIcon mastery=elemental help=main
 # wind_shear
 ]]
 	OvaleScripts:RegisterScript("SHAMAN", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_shaman_enhancement_t16h.lua b/scripts/simulationcraft_shaman_enhancement_t16h.lua
index f10bd6d..41a51ae 100644
--- a/scripts/simulationcraft_shaman_enhancement_t16h.lua
+++ b/scripts/simulationcraft_shaman_enhancement_t16h.lua
@@ -11,9 +11,8 @@ do
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#WZ!...0.1
 #	glyphs=chain_lightning

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_shaman_spells)
+Include(ovale_common)
+Include(ovale_shaman_common)

 AddFunction EnhancementAoeActions
 {
@@ -208,4 +207,4 @@ AddIcon mastery=enhancement help=main
 # windfury_weapon
 ]]
 	OvaleScripts:RegisterScript("SHAMAN", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_warlock_affliction_t16h.lua b/scripts/simulationcraft_warlock_affliction_t16h.lua
index 145c477..9d0ffc1 100644
--- a/scripts/simulationcraft_warlock_affliction_t16h.lua
+++ b/scripts/simulationcraft_warlock_affliction_t16h.lua
@@ -12,9 +12,8 @@ do
 #	glyphs=siphon_life
 #	pet=felhunter

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_warlock_spells)
+Include(ovale_common)
+Include(ovale_warlock_common)

 AddFunction AfflictionAoeActions
 {
@@ -152,4 +151,4 @@ AddIcon mastery=affliction help=main
 # unstable_affliction_debuff
 ]]
 	OvaleScripts:RegisterScript("WARLOCK", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_warlock_demonology_t16h.lua b/scripts/simulationcraft_warlock_demonology_t16h.lua
index 76cf53f..16d47fe 100644
--- a/scripts/simulationcraft_warlock_demonology_t16h.lua
+++ b/scripts/simulationcraft_warlock_demonology_t16h.lua
@@ -11,9 +11,8 @@ do
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#VZ!....10
 #	pet=felguard

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_warlock_spells)
+Include(ovale_common)
+Include(ovale_warlock_common)

 AddFunction DemonologyAoeActions
 {
@@ -156,4 +155,4 @@ AddIcon mastery=demonology help=main
 # wrathguard_wrathstorm
 ]]
 	OvaleScripts:RegisterScript("WARLOCK", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_warlock_destruction_t16h.lua b/scripts/simulationcraft_warlock_destruction_t16h.lua
index 6fd190a..8102463 100644
--- a/scripts/simulationcraft_warlock_destruction_t16h.lua
+++ b/scripts/simulationcraft_warlock_destruction_t16h.lua
@@ -11,9 +11,8 @@ do
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#Vb!....20
 #	pet=felhunter

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_warlock_spells)
+Include(ovale_common)
+Include(ovale_warlock_common)

 AddFunction DestructionAoeActions
 {
@@ -133,4 +132,4 @@ AddIcon mastery=destruction help=main
 # trinket_stacking_proc_intellect_buff
 ]]
 	OvaleScripts:RegisterScript("WARLOCK", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_warrior_arms_t16h.lua b/scripts/simulationcraft_warrior_arms_t16h.lua
index ae4b21b..39c6f2d 100644
--- a/scripts/simulationcraft_warrior_arms_t16h.lua
+++ b/scripts/simulationcraft_warrior_arms_t16h.lua
@@ -11,9 +11,8 @@ do
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#Za!122011
 #	glyphs=unending_rage/death_from_above/sweeping_strikes/resonating_power

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_warrior_spells)
+Include(ovale_common)
+Include(ovale_warrior_common)

 AddFunction ArmsAoeActions
 {
@@ -168,4 +167,4 @@ AddIcon mastery=arms help=main
 # trinket_stacking_stat_crit_buff
 ]]
 	OvaleScripts:RegisterScript("WARRIOR", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_warrior_fury_1h_t16h.lua b/scripts/simulationcraft_warrior_fury_1h_t16h.lua
index 08896bd..0f5b343 100644
--- a/scripts/simulationcraft_warrior_fury_1h_t16h.lua
+++ b/scripts/simulationcraft_warrior_fury_1h_t16h.lua
@@ -11,9 +11,8 @@ do
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#ZZ!122212
 #	glyphs=unending_rage/death_from_above/bull_rush

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_warrior_spells)
+Include(ovale_common)
+Include(ovale_warrior_common)

 AddFunction FurySingleTargetActions
 {
@@ -269,4 +268,4 @@ AddIcon mastery=fury help=main
 # wild_strike
 ]]
 	OvaleScripts:RegisterScript("WARRIOR", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_warrior_fury_2h_t16h.lua b/scripts/simulationcraft_warrior_fury_2h_t16h.lua
index f97a858..f323d87 100644
--- a/scripts/simulationcraft_warrior_fury_2h_t16h.lua
+++ b/scripts/simulationcraft_warrior_fury_2h_t16h.lua
@@ -11,9 +11,8 @@ do
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#ZZ!122012
 #	glyphs=unending_rage/death_from_above/bull_rush

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_warrior_spells)
+Include(ovale_common)
+Include(ovale_warrior_common)

 AddFunction FurySingleTargetActions
 {
@@ -272,4 +271,4 @@ AddIcon mastery=fury help=main
 # wild_strike
 ]]
 	OvaleScripts:RegisterScript("WARRIOR", name, desc, code, "reference")
-end
\ No newline at end of file
+end
diff --git a/scripts/simulationcraft_warrior_protection_t16h.lua b/scripts/simulationcraft_warrior_protection_t16h.lua
index a294ff7..5cd8c17 100644
--- a/scripts/simulationcraft_warrior_protection_t16h.lua
+++ b/scripts/simulationcraft_warrior_protection_t16h.lua
@@ -11,9 +11,8 @@ do
 #	talents=http://us.battle.net/wow/en/tool/talent-calculator#Zb!.00110
 #	glyphs=unending_rage/hold_the_line/heavy_repercussions

-Include(ovale_items)
-Include(ovale_racials)
-Include(ovale_warrior_spells)
+Include(ovale_common)
+Include(ovale_warrior_common)

 AddFunction ProtectionDpsCdsActions
 {
@@ -151,4 +150,4 @@ AddIcon mastery=protection help=main
 # weakened_blows_debuff
 ]]
 	OvaleScripts:RegisterScript("WARRIOR", name, desc, code, "reference")
-end
\ No newline at end of file
+end