# Boilerplate script snippets.

# Need to find a way to include Arcane Torrent into the racials.
Define(arcane_torrent_chi 129597)
	SpellInfo(arcane_torrent_chi cd=120 chi=1)
Define(arcane_torrent_energy 25046)
	SpellInfo(arcane_torrent_energy cd=120 energy=-15)
Define(arcane_torrent_focus 80483)
	SpellInfo(arcane_torrent_focus cd=120 focus=-15)
Define(arcane_torrent_mana 28730)
	SpellInfo(arcane_torrent_mana cd=120)
Define(arcane_torrent_rage 69179)
	SpellInfo(arcane_torrent_rage cd=120 rage=-15)
Define(arcane_torrent_runic_power 50613)
	SpellInfo(arcane_torrent_runicpower cd=120 runicpower=-15)

# Items
Define(golemblood_potion 58146)
Define(golemblood_potion_buff 79634)
	SpellInfo(golemblood_potion_buff duration=25)
Define(mogu_power_potion 76095)
Define(mogu_power_potion_buff 105706)
	SpellInfo(mogu_power_potion_buff duration=25)
Define(virmens_bite_potion 76089)
Define(virmens_bite_potion_buff 105697)
	SpellInfo(virmens_bite_potion_buff duration=25)
Define(jade_serpent_potion 76093)
Define(jade_serpent_potion_buff 105702)
	SpellInfo(jade_serpent_potion_buff duration=25)
Define(tolvir_potion 58145)
Define(tolvir_potion_buff 79633)
	SpellInfo(tolvir_potion_buff duration=25)
Define(volcanic_potion 58091)
Define(volcanic_potion_buff 79476)
	SpellInfo(volcanic_potion_buff duration=25)

# Racials
Define(berserking 26297)
	SpellInfo(berserking cd=180 duration=10)
	SpellAddBuff(berserking berserking=1)
Define(blood_fury 20572)
	SpellInfo(blood_fury cd=120 duration=15)
	SpellAddBuff(blood_fury blood_fury=1)
Define(stoneform 20594)
	SpellInfo(stoneform cd=120 duration=8)
	SpellAddBuff(stoneform stoneform=1)

AddFunction UseRacialActions
{
	Spell(berserking)
	Spell(blood_fury)
}

AddFunction UseRacialInterruptActions
{
	if not TargetClassification(worldboss) and TargetInRange(quaking_palm) Spell(quaking_palm)
}

AddFunction UseRacialSurvivalActions
{
	Spell(stoneform)
}

AddCheckBox(aoe L(AOE))
AddCheckBox(potions "Use potions" default)

# Trinket CDs
AddListItem(trinketcd0 000s "Trinket 0 CD - none" default)
AddListItem(trinketcd0 060s "Trinket 0 CD - 1 min")
AddListItem(trinketcd0 090s "Trinket 0 CD - 1 min 30s")
AddListItem(trinketcd0 120s "Trinket 0 CD - 2 min")
AddListItem(trinketcd1 000s "Trinket 1 CD - none" default)
AddListItem(trinketcd1 060s "Trinket 1 CD - 1 min")
AddListItem(trinketcd1 090s "Trinket 1 CD - 1 min 30s")
AddListItem(trinketcd1 120s "Trinket 1 CD - 2 min")

AddFunction UseItemActions
{
	Item(HandsSlot usable=1)
	unless List(trinketcd0 000s) Item(Trinket0Slot usable=1)
	unless List(trinketcd1 000s) Item(Trinket1Slot usable=1)
}

# Trinket procs that affect DoTs.
Define(breath_of_many_minds 138898) # Breath of the Hydra (T15)
	SpellInfo(breath_of_many_minds duration=20 list=trinket_proc_intellect)
Define(mastermind 139133) # Cha-Ye's Essence of Brilliance (T15)
	SpellInfo(mastermind duration=10 list=trinket_proc_intellect)
Define(wushoolays_lightning 138786) # Wushoolay's Final Choice (T15)
	SpellInfo(wushoolays_lightning duration=20 list=trinket_proc_intellect)
Define(blessing_of_the_celestials_intellect 128985) # Relic of Yu'lon (T14)
	SpellInfo(blessing_of_the_celestials_intellect duration=15 list=trinket_proc_intellect)
Define(inner_brilliance 126577) # Light of the Cosmos (T14)
	SpellInfo(inner_brilliance duration=20 list=trinket_proc_intellect)
Define(now_is_the_time 127923) # Mithril Wristwatch (spellpower)
	SpellInfo(now_is_the_time duration=10 list=trinket_proc_intellect)

Define(blades_of_renataki 138756) # Renataki's Soul Charm (T15)
	SpellInfo(blades_of_renataki duration=20 list=trinket_proc_agility)
Define(juju_madness 138938) # Bad Juju (T15)
	SpellInfo(juju_madness duration=20 list=trinket_proc_agility)
Define(superluminal 138699) # Vicious Talisman of the Shado-Pan Assault (T15)
	SpellInfo(superluminal duration=20 list=trinket_proc_agility)
Define(agile 126554) # Bottle of Infinite Stars (T14)
	SpellInfo(agile duration=20 list=trinket_proc_agility)
Define(blessing_of_the_celestials_agility 126554) # Relic of Xuen (T14)
	SpellInfo(blessing_of_the_celestials_agility duration=15 list=trinket_proc_agility)
Define(reflection_of_torment 127928) # Coren's Cold Chromium Coaster (attack power)
	SpellInfo(reflection_of_torment duration=10 list=trinket_proc_agility)

Define(acceleration 138703) # Volatile Talisman of the Shado-Pan Assault (T15, intellect)
	SpellInfo(acceleration duration=10 list=trinket_proc_haste)
Define(quickened_tongues 126659) # Essence of Terror (T14, intellect)
	SpellInfo(quickened_tongues duration=20 list=trinket_proc_haste)

Define(perfect_aim 138963) # Unerring Vision of Lei Shen (T15, intellect)
	SpellInfo(perfect_aim duration=4 list=trinket_proc_crit)
Define(blossom 126605) # Jade Magistrate Figurine (T14, intellect, on-use)
	SpellInfo(blossom duration=15 list=trinket_proc_crit)
