
local SPELL_SHIELD_BLOCK = "Shield Block"
local SPELL_SHIELD_BARRIER = "Shield Barrier"
local SPELL_THUNDER_CLAP = "Thunder Clap"
local SPELL_SHIELD_SLAM = "Shield Slam"
local SPELL_BATTLE_SHOUT = "Battle Shout"
local SPELL_COMMANDING_SHOUT = "Commanding Shout"
local SPELL_REVENGE = "Revenge"
local SPELL_DEVASTATE = "Devastate"
local SPELL_THROW = "Throw"
local SPELL_HEROIC_THROW = "Heroic Throw"
local SPELL_HEROIC_STRIKE = "Heroic Strike"
local SPELL_CLEAVE = "Cleave"
local SPELL_VICTORY_RUSH = "Victory Rush"
local SPELL_IMPENDING_VICTORY = "Impending Victory"
local SPELL_BERSERKER_RAGE = "Berserker Rage"
local SPELL_EXECUTE = "Execute"
local SPELL_PUMMEL = "Pummel"
local SPELL_DISRUPTING_SHOUT = "Disrupting Shout"
local SPELL_DEADLY_CALM = "Deadly Calm"
local SPELL_SHOCKWAVE = "Shockwave"
local SPELL_SUNDER_ARMOR = "Sunder Armor"
local SPELL_CHARGE = "Charge"
local SPELL_INTERVENE = "Intervene"

local BUFF_POWER_WORD_FORTITUDE = "Power Word: Fortitude"
local BUFF_IMP_BLOOD_PACT = "Blood Pact"
local BUFF_QIRAJI_FORTITUDE = "Qiraji Fortitude"
local BUFF_HORN_OF_WINTER = "Horn of Winter"
local BUFF_TRUESHOT_AURA = "Trueshot Aura"
local BUFF_SWORD_AND_BOARD = "Sword and Board"
local BUFF_ULTIMATUM = "Ultimatum"
local BUFF_DEADLY_CALM = SPELL_DEADLY_CALM
local BUFF_SHIELD_BARRIER = SPELL_SHIELD_BARRIER
local BUFF_SHIELD_BLOCK = SPELL_SHIELD_BLOCK
local BUFF_INCITE = "Incite"

local DEBUFF_WEAKENED_BLOWS = "Weakened Blows"
local DEBUFF_WEAKENED_ARMOR = "Weakened Armor"

WhatsNext.defaultCastSequences["WARRIOR"][3] = {
	{	spell = SPELL_PUMMEL,
		checks = {
			{ type = "In Combat"},
			{ type = "In Range", spellName = SPELL_SHIELD_SLAM},
			{ type = "Target Is Interruptable"}
	}},
	{	spell = SPELL_DISRUPTING_SHOUT,
		checks = {
			{ type = "In Combat"},
			{ type = "In Range", spellName = SPELL_SHIELD_SLAM},
			{ type = "Target Is Interruptable"}
	}},
	{	spell = SPELL_IMPENDING_VICTORY,
		checks = {
			{ type = "In Combat"},
			{ type = "In Range", spellName = SPELL_SHIELD_SLAM},
			{ type = "Maximum Health Percent", unit = "player" , amount = .6}
	}},
	{	spell = SPELL_VICTORY_RUSH,
		checks = {
			{ type = "In Combat"},
			{ type = "In Range", spellName = SPELL_SHIELD_SLAM},
			{ type = "Maximum Health Percent", unit = "player" , amount = .6}
	}},
	{	spell = SPELL_SHIELD_BLOCK,
		checks = {
			{ type = "Tanking"},
			{ type = "Taking Blockable Damage", time = 4},
			{ type = "Player Buffed", buffName = BUFF_SHIELD_BLOCK, count = 1, invert = true}
	}},
	{	spell = SPELL_SHIELD_BARRIER,
		checks = {
			{ type = "Tanking"},
			{ type = "Taking Unblockable Damage", time = 4},
			{ type = "Taking Blockable Damage", time=4, invert = true},
			{ type = "Player Buffed", buffName = BUFF_SHIELD_BARRIER, count = 1, invert = true}
	}},
	{	spell = SPELL_SHIELD_BARRIER,
		checks = {
			{ type = "Tanking"},
			{ type = "Maximum Health Percent", amount = .2}
	}},
	{	spell = SPELL_THUNDER_CLAP,
		checks = {
			{ type = "In Combat"},
			{ type = "Attackable Target"},
			{ type = "Target In 11.11 Yards"},
			{ type = "In Range", spellName = SPELL_CHARGE, invert = true},
			{ type = "Target Need Debuff", debuffName = DEBUFF_WEAKENED_BLOWS, count = 1, time = 2}
	}},
	{	spell = SPELL_DEVASTATE,
		checks = {
			{ type = "In Combat"},
			{ type = "In Range", spellName = SPELL_SHIELD_SLAM},
			{ type = "Target Need Debuff", debuffName = DEBUFF_WEAKENED_ARMOR, count = 1, time = 2}
	}},
	{	spell = SPELL_SHIELD_SLAM,
		checks = {
			{ type = "In Combat"},
			{ type = "In Range", spellName = SPELL_SHIELD_SLAM},
			{ type = "Excess Power", spellName = SPELL_SHIELD_SLAM, invert = true},
	}},
	{	spell = SPELL_SHIELD_SLAM,
		checks = {
			{ type = "In Combat"},
			{ type = "In Range", spellName = SPELL_SHIELD_SLAM},
			{ type = "Combat Time", time = 4, invert = true},
	}},
	{	spell = SPELL_COMMANDING_SHOUT,
		checks = {
			{ type = "In Combat"},
			{ type = "Excess Power", spellName = SPELL_COMMANDING_SHOUT, invert = true},
			{ type = "Player Buffed", buffName = BUFF_POWER_WORD_FORTITUDE, count = 1, invert = true},
			{ type = "Player Buffed", buffName = BUFF_IMP_BLOOD_PACT, count = 1, invert = true},
			{ type = "Player Buffed", buffName = BUFF_QIRAJI_FORTITUDE, count = 1, invert = true}
	}},
	{	spell = SPELL_BATTLE_SHOUT,
		checks = {
			{ type = "In Combat"},
			{ type = "Excess Power", spellName = SPELL_BATTLE_SHOUT, invert = true},
	}},
	{	spell = SPELL_REVENGE,
		checks = {
			{ type = "In Combat"},
			{ type = "In Range", spellName = SPELL_SHIELD_SLAM},
			{ type = "Excess Power", spellName = SPELL_REVENGE, invert = true},
	}},
	{	spell = SPELL_THUNDER_CLAP,
		checks = {
			{ type = "In Combat"},
			{ type = "Attackable Target"},
			{ type = "Target In 11.11 Yards"},
			{ type = "In Range", spellName = SPELL_CHARGE, invert = true},
			{ type = "Minimum Enemy Count", amount = 2},
	}},
	{	spell = SPELL_SHOCKWAVE,
		checks = {
			{ type = "In Combat"},
			{ type = "In Range", spellName = SPELL_SHIELD_SLAM},
			{ type = "Minimum Enemy Count", amount = 2},
	}},
	{	spell = SPELL_EXECUTE,
		checks = {
			{ type = "In Combat"},
			{ type = "In Range", spellName = SPELL_SHIELD_SLAM},
			{ type = "Minimum Resultant Power", spellName = SPELL_EXECUTE, amount = 60},
	}},
	{	spell = SPELL_DEADLY_CALM,
		checks = {
			{ type = "In Combat"},
			{ type = "In Range", spellName = SPELL_SHIELD_SLAM},
			{ type = "Minimum Power", amount = 90},
	}},
	{	spell = SPELL_CLEAVE,
		checks = {
			{ type = "In Combat"},
			{ type = "In Range", spellName = SPELL_SHIELD_SLAM},
			{ type = "Minimum Enemy Count", amount = 2},
			{ type = "Maximum Cost", spellName = SPELL_CLEAVE, amount = 0},
	}},
	{	spell = SPELL_CLEAVE,
		checks = {
			{ type = "In Combat"},
			{ type = "In Range", spellName = SPELL_SHIELD_SLAM},
			{ type = "Minimum Enemy Count", amount = 2},
			{ type = "Minimum Resultant Power", spellName = SPELL_CLEAVE, amount = 60},
	}},
	{	spell = SPELL_HEROIC_STRIKE,
		checks = {
			{ type = "In Combat"},
			{ type = "In Range", spellName = SPELL_SHIELD_SLAM},
			{ type = "Maximum Cost", spellName = SPELL_HEROIC_STRIKE, amount = 0},
	}},
	{	spell = SPELL_HEROIC_STRIKE,
		checks = {
			{ type = "In Combat"},
			{ type = "In Range", spellName = SPELL_SHIELD_SLAM},
			{ type = "Minimum Resultant Power", spellName = SPELL_HEROIC_STRIKE, amount = 60},
	}},
	{	spell = SPELL_SHIELD_SLAM,
		checks = {
			{ type = "In Combat"},
			{ type = "In Range", spellName = SPELL_SHIELD_SLAM},
	}},
	{	spell = SPELL_REVENGE,
		checks = {
			{ type = "In Combat"},
			{ type = "In Range", spellName = SPELL_SHIELD_SLAM},
	}},
	{	spell = SPELL_DEVASTATE,
		checks = {
			{ type = "In Combat"},
			{ type = "In Range", spellName = SPELL_SHIELD_SLAM},
			{ type = "Ability Cooldown", spellName = SPELL_SHIELD_SLAM, time = 3},
	}},
	{	spell = SPELL_BERSERKER_RAGE,
		checks = {
			{ type = "In Combat"},
			{ type = "Excess Power", spellName = SPELL_BERSERKER_RAGE, invert = true},
	}},
	{	spell = SPELL_BERSERKER_RAGE,
		checks = {
			{ type = "In Combat"},
			{ type = "Player Crowd Controlled"}
	}},
	{	spell = SPELL_THUNDER_CLAP,
		checks = {
			{ type = "In Combat"},
			{ type = "Attackable Target"},
			{ type = "Target In 11.11 Yards"},
			{ type = "In Range", spellName = SPELL_CHARGE, invert = true},
			{ type = "Target Need Debuff", debuffName = DEBUFF_WEAKENED_BLOWS, count = 1, time = 6}
	}},
	{	spell = SPELL_DEVASTATE,
		checks = {
			{ type = "In Combat"},
			{ type = "In Range", spellName = SPELL_SHIELD_SLAM},
	}},
	{	spell = SPELL_HEROIC_THROW,
		checks = {
			{ type = "In Combat"},
			{ type = "In Range", spellName = SPELL_HEROIC_THROW	},
	}},
	{	spell = SPELL_COMMANDING_SHOUT,
		checks = {
			{ type = "Raid Buffed", buffName = SPELL_COMMANDING_SHOUT, yards = 100, invert = true},
			{ type = "Raid Buffed", buffName = BUFF_POWER_WORD_FORTITUDE, yards = 100, invert = true},
			{ type = "Raid Buffed", buffName = BUFF_IMP_BLOOD_PACT, yards = 100, invert = true},
			{ type = "Raid Buffed", buffName = BUFF_QIRAJI_FORTITUDE, yards = 100, invert = true}
	}},
	{	spell = SPELL_BATTLE_SHOUT,
		checks = {
			{ type = "Player Buffed By Player", buffName = SPELL_COMMANDING_SHOUT, count = 1, invert = true},
			{ type = "Raid Buffed", buffName = SPELL_BATTLE_SHOUT, yards = 100, invert = true},
			{ type = "Raid Buffed", buffName = BUFF_HORN_OF_WINTER, yards = 100, invert = true},
			{ type = "Raid Buffed", buffName = BUFF_TRUESHOT_AURA, yards = 100, invert = true},
	}},
}