local _, Ovale = ... local OvaleScripts = Ovale.OvaleScripts do local name = "ovale_deathknight_spells" local desc = "[5.4.7] Ovale: Death Knight spells" local code = [[ # Death Knight spells and functions. Define(antimagic_shell 48707) SpellInfo(antimagic_shell cd=45) SpellInfo(antimagic_shell buff_cdr=cooldown_reduction_strength_buff mastery=frost) SpellInfo(antimagic_shell buff_cdr=cooldown_reduction_strength_buff mastery=unholy) SpellInfo(antimagic_shell buff_cdr=cooldown_reduction_tank_buff mastery=blood) Define(army_of_the_dead 42650) SpellInfo(army_of_the_dead blood=1 frost=1 unholy=1 cd=600) SpellInfo(army_of_the_dead buff_cdr=cooldown_reduction_strength_buff mastery=frost) SpellInfo(army_of_the_dead buff_cdr=cooldown_reduction_strength_buff mastery=unholy) SpellAddBuff(army_of_the_dead army_of_the_dead_buff=1) Define(army_of_the_dead_buff 42650) SpellInfo(army_of_the_dead_buff duration=40) Define(asphyxiate 108194) SpellInfo(asphyxiate cd=30) Define(asphyxiate_talent 9) Define(blood_boil 48721) SpellInfo(blood_boil blood=1) SpellInfo(blood_boil buff_runes_none=crimson_scourge_buff if_spell=crimson_scourge) SpellAddTargetDebuff(blood_boil blood_plague_debuff=refresh frost_fever_debuff=refresh if_spell=scarlet_fever) Define(blood_charge_buff 114851) SpellInfo(blood_charge_buff duration=25 maxstacks=12) Define(blood_plague 59879) Define(blood_plague_debuff 55078) SpellInfo(blood_plague_debuff duration=30 tick=3) Define(blood_presence 48263) Define(blood_tap 45529) SpellAddBuff(blood_tap blood_charge_buff=-5) Define(blood_tap_talent 13) Define(bone_shield 49222) SpellInfo(bone_shield cd=60) SpellInfo(bone_shield buff_cdr=cooldown_reduction_tank_buff mastery=blood) SpellAddBuff(bone_shield bone_shield_buff=1) Define(bone_shield_buff 49222) SpellInfo(bone_shield_buff duration=300) Define(crimson_scourge 81136) Define(crimson_scourge_buff 81141) SpellInfo(crimson_scourge_buff duration=15) Define(dancing_rune_weapon 49028) SpellInfo(dancing_rune_weapon cd=90) SpellInfo(dancing_rune_weapon buff_cdr=cooldown_reduction_tank_buff mastery=blood) SpellAddBuff(dancing_rune_weapon dancing_rune_weapon_buff=1) Define(dancing_rune_weapon_buff 81256) SpellInfo(dancing_rune_weapon_buff duration=12) Define(dark_simulacrum 77606) SpellInfo(dark_simulacrum cd=60) SpellInfo(dark_simulacrum addcd=-30 glyph=glyph_of_dark_simulacrum) Define(dark_simulacrum_buff 77606) SpellInfo(dark_simulacrum_buff duration=8) SpellInfo(dark_simulacrum_buff addduration=4 glyph=glyph_of_dark_simulacrum) Define(dark_transformation 63560) SpellInfo(dark_transformation unholy=1) SpellAddBuff(dark_transformation dark_transformation_buff=1 shadow_infusion_buff=-5) Define(dark_transformation_buff 63560) SpellInfo(dark_transformation_buff duration=30) Define(death_and_decay 43265) SpellInfo(death_and_decay unholy=1 cd=30) SpellInfo(death_and_decay buff_runes_none=crimson_scourge_buff if_spell=crimson_scourge) Define(death_coil 47541) SpellInfo(death_coil runicpower=40) SpellInfo(death_coil runicpower=32 if_spell=sudden_doom) SpellInfo(death_coil buff_runicpower_none=sudden_doom_buff if_spell=sudden_doom) SpellAddBuff(death_coil blood_charge_buff=2 talent=blood_tap_talent) Define(death_grip 49576) SpellInfo(death_grip cd=25) Define(death_pact 48743) SpellInfo(death_pact cd=120) Define(death_pact_talent 10) Define(death_siphon 108196) SpellInfo(death_siphon death=1) Define(death_siphon_talent 10) Define(death_strike 49998) SpellInfo(death_strike frost=1 unholy=1) Define(ebon_plaguebringer 51160) Define(empower_rune_weapon 47568) SpellInfo(empower_rune_weapon cd=300 runicpower=-25) SpellInfo(empower_rune_weapon buff_cdr=cooldown_reduction_strength_buff mastery=frost) Define(festering_strike 85948) SpellInfo(festering_strike blood=1 frost=1) Define(frost_fever_debuff 55095) SpellInfo(frost_fever_debuff duration=30 tick=3) Define(frost_presence 48266) Define(frost_strike 49143) SpellInfo(frost_strike runicpower=35) SpellInfo(frost_strike runicpower=20 if_spell=improved_frost_presence if_stance=deathknight_frost_presence) SpellAddBuff(frost_strike killing_machine_buff=0 if_spell=killing_machine) SpellAddBuff(frost_strike blood_charge_buff=2 talent=blood_tap_talent) Define(glyph_of_dark_simulacrum 63331) Define(glyph_of_icebound_fortitude 58673) Define(glyph_of_mind_freeze 58686) Define(glyph_of_outbreak 59332) Define(glyph_of_the_loud_horn 146646) Define(heart_strike 55050) SpellInfo(heart_strike blood=1) Define(horn_of_winter 57330) SpellInfo(horn_of_winter cd=20 runicpower=-10) SpellInfo(horn_of_winter cd=40 runicpower=-20 glyph=glyph_of_the_loud_horn) Define(howling_blast 49184) SpellInfo(howling_blast frost=1) SpellInfo(howling_blast buff_runes_none=rime_buff if_spell=rime) SpellAddBuff(howling_blast rime_buff=0 if_spell=rime) SpellAddTargetDebuff(howling_blast frost_fever_debuff=1) Define(icebound_fortitude 48792) SpellInfo(icebound_fortitude cd=180) SpellInfo(icebound_fortitude cd=90 glyph=glyph_of_icebound_fortitude) SpellInfo(icebound_fortitude buff_cdr=cooldown_reduction_strength_buff mastery=frost) SpellInfo(icebound_fortitude buff_cdr=cooldown_reduction_strength_buff mastery=unholy) SpellInfo(icebound_fortitude buff_cdr=cooldown_reduction_tank_buff mastery=blood) SpellAddBuff(icebound_fortitude icebound_fortitude_buff=1) Define(icebound_fortitude_buff 48792) SpellInfo(icebound_fortitude_buff duration=12) SpellInfo(icebound_fortitude_buff duration=3 glyph=glyph_of_icebound_fortitude) Define(icy_touch 45477) SpellInfo(icy_touch frost=1) SpellInfo(icy_touch buff_runes_none=rime_buff if_spell=rime) SpellAddBuff(icy_touch rime_buff=0 if_spell=rime) SpellAddTargetDebuff(icy_touch frost_fever_debuff=1) Define(improved_frost_presence 50385) Define(killing_machine 51128) Define(killing_machine_buff 51124) SpellInfo(killing_machine_buff duration=10) Define(master_of_ghouls 52143) Define(mind_freeze 47528) SpellInfo(mind_freeze cd=15) SpellInfo(mind_freeze addcd=-1 runicpower=10 glyph=glyph_of_mind_freeze) Define(obliterate 49020) SpellInfo(obliterate frost=1 unholy=1) SpellAddBuff(obliterate killing_machine_buff=0 if_spell=killing_machine) Define(outbreak 77575) SpellInfo(outbreak cd=60 glyph=!glyph_of_outbreak) SpellInfo(outbreak runicpower=30 glyph=glyph_of_outbreak) SpellInfo(outbreak buff_cdr=cooldown_reduction_strength_buff mastery=frost) SpellInfo(outbreak buff_cdr=cooldown_reduction_strength_buff mastery=unholy) SpellInfo(outbreak buff_cdr=cooldown_reduction_tank_buff mastery=blood) SpellAddTargetDebuff(outbreak blood_plague_debuff=1 frost_fever_debuff=1) Define(pestilence 50842) SpellInfo(pestilence blood=1) Define(pillar_of_frost 51271) SpellInfo(pillar_of_frost cd=60 frost=1) SpellInfo(pillar_of_frost buff_cdr=cooldown_reduction_strength_buff mastery=frost) SpellAddBuff(pillar_of_frost pillar_of_frost_buff=1) Define(pillar_of_frost_buff 51271) SpellInfo(pillar_of_frost duration=20) Define(plague_leech 123693) SpellInfo(plague_leech cd=25) SpellAddTargetDebuff(plague_leech blood_plague_debuff=0 frost_fever_debuff=0) Define(plague_leech_talent 2) Define(plague_strike 45462) SpellInfo(plague_strike unholy=1) SpellAddTargetDebuff(plague_strike blood_plague_debuff=1) SpellAddTargetDebuff(plague_strike frost_fever_debuff=1 if_spell=ebon_plaguebringer) Define(raise_dead 46584) SpellInfo(raise_dead cd=120) SpellInfo(raise_dead addcd=-60 if_spell=master_of_ghouls) Define(rime 59057) Define(rime_buff 59052) SpellInfo(rime_buff duration=15) Define(roiling_blood_talent 1) Define(rune_strike 56815) SpellInfo(rune_strike runicpower=30) SpellAddBuff(rune_strike blood_charge_buff=2 talent=blood_tap_talent) Define(rune_tap 48982) SpellInfo(rune_tap blood=1 cd=30) SpellInfo(rune_tap blood=0 addcd=-10 itemset=T15_tank itemcount=2) SpellInfo(rune_tap buff_runes_none=will_of_the_necropolis_buff if_spell=will_of_the_necropolis) SpellAddBuff(rune_tap will_of_the_necropolis_buff=0 if_spell=will_of_the_necropolis) Define(runic_corruption_buff 51460) SpellInfo(runic_corruption_buff duration=3) Define(runic_corruption_talent 15) Define(runic_empowerment_talent 14) Define(scarlet_fever 81132) Define(scourge_strike 55090) SpellInfo(scourge_strike unholy=1) Define(shadow_infusion_buff 91342) SpellInfo(shadow_infusion_buff duration=30 maxstacks=5) Define(soul_reaper_blood 114866) SpellInfo(soul_reaper_blood blood=1 cd=6) SpellAddBuff(soul_reaper_blood killing_machine_buff=0 if_spell=killing_machine itemset=T15_melee itemcount=4) Define(soul_reaper_frost 130735) SpellInfo(soul_reaper_frost frost=1 cd=6) SpellAddBuff(soul_reaper_frost killing_machine_buff=0 if_spell=killing_machine itemset=T15_melee itemcount=4) Define(soul_reaper_unholy 130736) SpellInfo(soul_reaper_unholy unholy=1 cd=6) SpellAddBuff(soul_reaper_unholy killing_machine_buff=0 if_spell=killing_machine itemset=T15_melee itemcount=4) Define(strangulate 47476) SpellInfo(strangulate blood=1 cd=60) Define(sudden_doom 49530) Define(sudden_doom_buff 81340) SpellInfo(sudden_doom_buff duration=10) Define(summon_gargoyle 49206) SpellInfo(summon_gargoyle cd=180) SpellInfo(summon_gargoyle buff_cdr=cooldown_reduction_strength_buff mastery=unholy) Define(unholy_blight 115989) SpellInfo(unholy_blight cd=90) Define(unholy_blight_talent 3) Define(unholy_frenzy 49016) SpellInfo(unholy_frenzy cd=180) SpellInfo(unholy_frenzy buff_cdr=cooldown_reduction_strength_buff mastery=unholy) Define(unholy_presence 48265) Define(vampiric_blood 55233) SpellInfo(vampiric_blood cd=60) SpellInfo(vampiric_blood addcd=-10 itemset=T14_tank itemcount=2) SpellInfo(vampiric_blood buff_cdr=cooldown_reduction_tank_buff mastery=blood) SpellAddBuff(vampiric_blood vampiric_blood_buff=1) Define(vampiric_blood_buff 55233) SpellInfo(vampiric_blood_buff duration=10) 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