ilivath

Untitled

Jul 18th, 2020
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 50.17 KB | None | 0 0
  1. -- PaladinRetribution.lua
  2. -- May 2018
  3.  
  4. local addon, ns = ...
  5. local Hekili = _G[ addon ]
  6.  
  7. local class = Hekili.Class
  8. local state = Hekili.State
  9.  
  10.  
  11. local PTR = ns.PTR
  12.  
  13.  
  14. if UnitClassBase( 'player' ) == 'PALADIN' then
  15.     local spec = Hekili:NewSpecialization( 70 )
  16.  
  17.     spec:RegisterResource( Enum.PowerType.HolyPower )
  18.     spec:RegisterResource( Enum.PowerType.Mana )
  19.  
  20.     -- Talents
  21.     spec:RegisterTalents( {
  22.         zeal = 22590, -- 269569
  23.         righteous_verdict = 22557, -- 267610
  24.         execution_sentence = 22175, -- 267798
  25.  
  26.         fires_of_justice = 22319, -- 203316
  27.         blade_of_wrath = 22592, -- 231832
  28.         empyrean_power = 22593, -- 326732
  29.  
  30.         fist_of_justice = 22896, -- 234299
  31.         repentance = 22180, -- 20066
  32.         blinding_light = 21811, -- 115750
  33.  
  34.         unbreakable_spirit = 22185, -- 114154
  35.         cavalier = 22595, -- 230332
  36.         eye_for_an_eye = 22186, -- 205191
  37.        
  38.         divine_purpose = 22591, -- 223817
  39.         holy_avenger = 11111, --105809
  40.         seraphim = 11111, --152262
  41.  
  42.         selfless_healer = 23167, -- 85804
  43.         justicars_vengeance = 22483, -- 215661
  44.         healing_hands = 23086, -- 326734
  45.  
  46.         sanctified_wrath = 111111, -- 317866
  47.         crusade = 22215, -- 231895
  48.         inquisition = 22634, -- 84963
  49.     } )
  50.  
  51.  
  52.     -- PvP Talents
  53.     spec:RegisterPvpTalents( {
  54.         relentless = 3446, -- 196029
  55.         adaptation = 3445, -- 214027
  56.         gladiators_medallion = 3444, -- 208683
  57.        
  58.         blessing_of_sanctuary = 752, -- 210256
  59.         cleansing_light = 3055, -- 236186
  60.         divine_punisher = 755, -- 204914
  61.         hammer_of_reckoning = 756, -- 247675
  62.         jurisdiction = 757, -- 204979
  63.         law_and_order = 858, -- 204934
  64.         lawbringer = 754, -- 246806
  65.         luminescence = 81, -- 199428
  66.         ultimate_retribution = 753, -- 287947
  67.         unbound_freedom = 641, -- 305394
  68.         vengeance_aura = 751, -- 210323
  69.     } )
  70.  
  71.     -- Auras
  72.     spec:RegisterAuras( {
  73.         avenging_wrath = {
  74.             id = 31884,
  75.             duration = function () return azerite.lights_decree.enabled and 25 or 20 end,
  76.             max_stack = 1,
  77.         },
  78.  
  79.         avenging_wrath_autocrit = {
  80.             id = 294027,
  81.             duration = 20,
  82.             max_stack = 1,
  83.             copy = "avenging_wrath_crit"
  84.         },
  85.  
  86.         blade_of_wrath = {
  87.             id = 281178,
  88.             duration = 10,
  89.             max_stack = 1,
  90.         },
  91.  
  92.         blessing_of_freedom = {
  93.             id = 1044,
  94.             duration = 8,
  95.             type = "Magic",
  96.             max_stack = 1,
  97.         },
  98.  
  99.         blessing_of_protection = {
  100.             id = 1022,
  101.             duration = 10,
  102.             type = "Magic",
  103.             max_stack = 1,
  104.         },
  105.  
  106.         crusade = {
  107.             id = 231895,
  108.             duration = 25,
  109.             type = "Magic",
  110.             max_stack = 10,
  111.         },
  112.  
  113.         divine_purpose = {
  114.             id = 223819,
  115.             duration = 12,
  116.             max_stack = 1,
  117.         },
  118.  
  119.         divine_shield = {
  120.             id = 642,
  121.             duration = 8,
  122.             type = "Magic",
  123.             max_stack = 1,
  124.         },
  125.  
  126.         divine_steed = {
  127.             id = 221886,
  128.             duration = 3,
  129.             max_stack = 1,
  130.         },
  131.  
  132.         execution_sentence = {
  133.             id = 267799,
  134.             duration = 12,
  135.             max_stack = 1,
  136.         },
  137.  
  138.         fires_of_justice = {
  139.             id = 209785,
  140.             duration = 15,
  141.             max_stack = 1,
  142.             copy = "the_fires_of_justice" -- backward compatibility
  143.         },
  144.  
  145.         hammer_of_justice = {
  146.             id = 853,
  147.             duration = 6,
  148.             type = "Magic",
  149.             max_stack = 1,
  150.         },
  151.  
  152.         hand_of_hindrance = {
  153.             id = 183218,
  154.             duration = 10,
  155.             type = "Magic",
  156.             max_stack = 1,
  157.         },
  158.  
  159.         hand_of_reckoning = {
  160.             id = 62124,
  161.             duration = 3,
  162.             max_stack = 1,
  163.         },
  164.  
  165.         inquisition = {
  166.             id = 84963,
  167.             duration = 45,
  168.             max_stack = 1,
  169.         },
  170.  
  171.         judgment = {
  172.             id = 197277,
  173.             duration = 15,
  174.             max_stack = 1,
  175.         },
  176.  
  177.         righteous_verdict = {
  178.             id = 267611,
  179.             duration = 6,
  180.             max_stack = 1,
  181.         },
  182.  
  183.         selfless_healer = {
  184.             id = 114250,
  185.             duration = 15,
  186.             max_stack = 4,
  187.         },
  188.  
  189.         shield_of_vengeance = {
  190.             id = 184662,
  191.             duration = 15,
  192.             max_stack = 1,
  193.         },
  194.  
  195.         wake_of_ashes = {
  196.             id = 255937,
  197.             duration = 5,
  198.             max_stack = 1,
  199.         },
  200.  
  201.         zeal = {
  202.             id = 217020,
  203.             duration = 12,
  204.             max_stack = 3
  205.         },
  206.  
  207.         -- Shadowlands Legendaries. This might be RegisterGear stuff idk
  208.         final_verdict= {
  209.             id = 337228,
  210.             duration = 15,
  211.             max_stack = 1,
  212.         }
  213.  
  214.         -- Azerite Powers
  215.         empyreal_ward = {
  216.             id = 287731,
  217.             duration = 60,
  218.             max_stack = 1,
  219.         },
  220.  
  221.         empyrean_power = {
  222.             id = 286393,
  223.             duration = 15,
  224.             max_stack = 1
  225.         },
  226.  
  227.         -- PvP
  228.         reckoning = {
  229.             id = 247677,
  230.             max_stack = 30,
  231.             duration = 30
  232.         },
  233.     } )
  234.  
  235.     spec:RegisterGear( 'tier19', 138350, 138353, 138356, 138359, 138362, 138369 )
  236.     spec:RegisterGear( 'tier20', 147160, 147162, 147158, 147157, 147159, 147161 )
  237.         spec:RegisterAura( 'sacred_judgment', {
  238.             id = 246973,
  239.             duration = 8
  240.         } )
  241.  
  242.     spec:RegisterGear( 'tier21', 152151, 152153, 152149, 152148, 152150, 152152 )
  243.         spec:RegisterAura( 'hidden_retribution_t21_4p', {
  244.             id = 253806,
  245.             duration = 15
  246.         } )
  247.  
  248.     spec:RegisterGear( 'class', 139690, 139691, 139692, 139693, 139694, 139695, 139696, 139697 )
  249.     spec:RegisterGear( 'truthguard', 128866 )
  250.     spec:RegisterGear( 'whisper_of_the_nathrezim', 137020 )
  251.         spec:RegisterAura( 'whisper_of_the_nathrezim', {
  252.             id = 207633,
  253.             duration = 3600
  254.         } )
  255.  
  256.     spec:RegisterGear( 'justice_gaze', 137065 )
  257.     spec:RegisterGear( 'ashes_to_dust', 51745 )
  258.         spec:RegisterAura( 'ashes_to_dust', {
  259.             id = 236106,
  260.             duration = 6
  261.         } )
  262.  
  263.     spec:RegisterGear( 'aegisjalmur_the_armguards_of_awe', 140846 )
  264.     spec:RegisterGear( 'chain_of_thrayn', 137086 )
  265.         spec:RegisterAura( 'chain_of_thrayn', {
  266.             id = 236328,
  267.             duration = 3600
  268.         } )
  269.  
  270.     spec:RegisterGear( 'liadrins_fury_unleashed', 137048 )
  271.         spec:RegisterAura( 'liadrins_fury_unleashed', {
  272.             id = 208410,
  273.             duration = 3600,
  274.         } )
  275.  
  276.     spec:RegisterGear( "soul_of_the_highlord", 151644 )
  277.     spec:RegisterGear( "pillars_of_inmost_light", 151812 )
  278.     spec:RegisterGear( "scarlet_inquisitors_expurgation", 151813 )
  279.         spec:RegisterAura( "scarlet_inquisitors_expurgation", {
  280.             id = 248289,
  281.             duration = 3600,
  282.             max_stack = 3
  283.         } )
  284.    
  285.     spec:RegisterHook( 'spend', function( amt, resource )
  286.         if amt > 0 and resource == "holy_power" and talent.crusade.enabled and buff.crusade.up then
  287.             addStack( "crusade", buff.crusade.remains, amt )
  288.         end
  289.     end )
  290.  
  291.  
  292.  
  293.     -- Abilities
  294.     spec:RegisterAbilities( {
  295.         ashen_hollow = {
  296.             id = 316958,
  297.             cast = function () return 1.5 * haste end,
  298.             cooldown = 120,
  299.             gcd = "spell",
  300.  
  301.             toggle = 'cooldowns',
  302.  
  303.             startsCombat = false,
  304.             texture = 3565722,
  305.         },
  306.  
  307.  
  308.         avenging_wrath = {
  309.             id = 31884,
  310.             cast = 0,
  311.             cooldown = function () return ( essence.vision_of_perfection.enabled and 0.87 or 1 ) * 120 end,
  312.             gcd = "spell",
  313.  
  314.             toggle = 'cooldowns',
  315.             notalent = 'crusade',
  316.  
  317.             startsCombat = true,
  318.             texture = 135875,
  319.  
  320.             nobuff = 'avenging_wrath',
  321.  
  322.             handler = function ()
  323.                 applyBuff( 'avenging_wrath' )
  324.                 applyBuff( "avenging_wrath_crit" )
  325.                 if level < 115 then
  326.                     if equipped.liadrins_fury_unleashed then gain( 1, 'holy_power' ) end
  327.                 end
  328.             end,
  329.         },
  330.  
  331.  
  332.         blade_of_justice = {
  333.             id = 184575,
  334.             cast = 0,
  335.             cooldown = function () return 12 * haste end,
  336.             gcd = "spell",
  337.  
  338.             spend = -2,
  339.             spendType = 'holy_power',
  340.  
  341.             notalent = 'divine_hammer',
  342.             bind = 'divine_hammer',
  343.  
  344.             startsCombat = true,
  345.             texture = 1360757,
  346.  
  347.             handler = function ()
  348.                 removeBuff( "blade_of_wrath" )
  349.                 removeBuff( 'sacred_judgment' )
  350.                 gain( buff.holy_avenger.up and 3 or 2, 'holy_power' )
  351.             end,
  352.         },
  353.  
  354.  
  355.         blessing_of_freedom = {
  356.             id = 1044,
  357.             cast = 0,
  358.             charges = 1,
  359.             cooldown = 25,
  360.             recharge = 25,
  361.             gcd = "spell",
  362.  
  363.             spend = 0.07,
  364.             spendType = "mana",
  365.  
  366.             startsCombat = false,
  367.             texture = 135968,
  368.  
  369.             handler = function ()
  370.                 applyBuff( 'blessing_of_freedom' )
  371.             end,
  372.         },
  373.  
  374.  
  375.         blessing_of_protection = {
  376.             id = 1022,
  377.             cast = 0,
  378.             charges = 1,
  379.             cooldown = 300,
  380.             recharge = 300,
  381.             gcd = "spell",
  382.  
  383.             spend = 0.15,
  384.             spendType = "mana",
  385.  
  386.             startsCombat = false,
  387.             texture = 135964,
  388.  
  389.             readyTime = function () return debuff.forbearance.remains end,
  390.  
  391.             handler = function ()
  392.                 applyBuff( 'blessing_of_protection' )
  393.                 applyDebuff( 'player', 'forbearance' )
  394.             end,
  395.         },
  396.  
  397.  
  398.         blinding_light = {
  399.             id = 115750,
  400.             cast = 0,
  401.             cooldown = 90,
  402.             gcd = "spell",
  403.  
  404.             spend = 0.06,
  405.             spendType = "mana",
  406.  
  407.             talent = 'blinding_light',
  408.  
  409.             startsCombat = true,
  410.             texture = 571553,
  411.  
  412.             handler = function ()
  413.                 applyDebuff( 'target', 'blinding_light', 6 )
  414.                 active_dot.blinding_light = active_enemies
  415.             end,
  416.         },
  417.  
  418.  
  419.         cleanse_toxins = {
  420.             id = 213644,
  421.             cast = 0,
  422.             cooldown = 8,
  423.             gcd = "spell",
  424.  
  425.             spend = 0.06,
  426.             spendType = "mana",
  427.  
  428.             startsCombat = false,
  429.             texture = 135953,
  430.  
  431.             handler = function ()
  432.             end,
  433.         },
  434.  
  435.  
  436.         consecration = {
  437.             id = 26573,
  438.             cast = 0,
  439.             cooldown = 9,
  440.             gcd = "spell",
  441.  
  442.             talent = 'consecration',
  443.  
  444.             startsCombat = true,
  445.             texture = 135926,
  446.  
  447.             handler = function ()
  448.             end,
  449.         },
  450.  
  451.  
  452.         crusade = {
  453.             id = 231895,
  454.             cast = 0,
  455.             cooldown = 120,
  456.             gcd = "spell",
  457.  
  458.             talent = 'crusade',
  459.             toggle = 'cooldowns',
  460.  
  461.             startsCombat = false,
  462.             texture = 236262,
  463.  
  464.             nobuff = 'crusade',
  465.  
  466.             usable = function () return not buff.crusade.up end,
  467.             handler = function ()
  468.                 applyBuff( 'crusade' )
  469.             end,
  470.         },
  471.  
  472.  
  473.         crusader_strike = {
  474.             id = 35395,
  475.             cast = 0,
  476.             charges = 2,
  477.             cooldown = function () return 6 * ( talent.fires_of_justice.enabled and 0.85 or 1 ) * haste end,
  478.             recharge = function () return 6 * ( talent.fires_of_justice.enabled and 0.85 or 1 ) * haste end,
  479.             gcd = "spell",
  480.  
  481.             spend = -1,
  482.             spendType = 'holy_power',
  483.  
  484.             spend = 0.12,
  485.             spendType = "mana",
  486.  
  487.             startsCombat = true,
  488.             texture = 135891,
  489.  
  490.             handler = function ()
  491.             end,
  492.         },
  493.  
  494.  
  495.         divine_shield = {
  496.             id = 642,
  497.             cast = 0,
  498.             cooldown = function () return 300 * ( talent.unbreakable_spirit.enabled and 0.7 or 1 ) end,
  499.             gcd = "spell",
  500.  
  501.             startsCombat = false,
  502.             texture = 524354,
  503.  
  504.             readyTime = function () return debuff.forbearance.remains end,
  505.  
  506.             handler = function ()
  507.                 applyBuff( 'divine_shield' )
  508.                 applyDebuff( 'player', 'forbearance' )
  509.             end,
  510.         },
  511.  
  512.  
  513.         divine_steed = {
  514.             id = 190784,
  515.             cast = 0,
  516.             charges = function () return talent.cavalier.enabled and 2 or nil end,
  517.             cooldown = 60,
  518.             recharge = 60,
  519.             gcd = "spell",
  520.  
  521.             startsCombat = true,
  522.             texture = 1360759,
  523.  
  524.             handler = function ()
  525.                 applyBuff( 'divine_steed' )
  526.             end,
  527.         },
  528.  
  529.  
  530.         divine_storm = {
  531.             id = 53385,
  532.             cast = 0,
  533.             cooldown = 0,
  534.             gcd = "spell",
  535.  
  536.             spend = function ()
  537.                 if buff.divine_purpose.up then return 0 end
  538.                 if buff.empyrean_power.up then return 0 end
  539.                 return 3 - ( buff.fires_of_justice.up and 1 or 0 ) - ( buff.the_arbiters_judgment.up and 1 or 0 )
  540.             end,
  541.             spendType = "holy_power",
  542.  
  543.             startsCombat = true,
  544.             texture = 236250,
  545.  
  546.             handler = function ()
  547.                 if buff.empyrean_power.up then removeBuff( 'empyrean_power' )
  548.                 elseif buff.divine_purpose.up then removeBuff( 'divine_purpose' )
  549.                 else
  550.                     removeBuff( 'fires_of_justice' )
  551.                     removeBuff( 'the_arbiters_judgment' )
  552.                 end
  553.  
  554.                 if buff.avenging_wrath_crit.up then removeBuff( "avenging_wrath_crit" ) end
  555.  
  556.                 if level < 116 then
  557.                     if equipped.whisper_of_the_nathrezim then applyBuff( 'whisper_of_the_nathrezim', 4 ) end
  558.                 end
  559.             end,
  560.         },
  561.  
  562.  
  563.         divine_toll = {
  564.             id = 3565448,
  565.             cast = 0,
  566.             cooldown = 60,
  567.             gcd = "spell",
  568.  
  569.             spend = function ()
  570.                 idklol,
  571.             spendType = "holy_power",
  572.  
  573.             spend = 0.15,
  574.             spendType = "mana",
  575.  
  576.             startsCombat = true,
  577.             texture = 3578228,
  578.         },
  579.  
  580.  
  581.         execution_sentence = {
  582.             id = 267798,
  583.             cast = 0,
  584.             cooldown = 30,
  585.             gcd = "spell",
  586.  
  587.             spend = function ()
  588.                 if buff.divine_purpose.up then return 0 end
  589.                 return 3 - ( buff.fires_of_justice.up and 1 or 0 ) - ( buff.the_arbiters_judgment.up and 1 or 0 )
  590.             end,
  591.             spendType = "holy_power",
  592.  
  593.             talent = 'execution_sentence',
  594.  
  595.             startsCombat = true,
  596.             texture = 613954,
  597.  
  598.             handler = function ()
  599.                 if buff.divine_purpose.up then removeBuff( 'divine_purpose' )
  600.                 else
  601.                     removeBuff( 'fires_of_justice' )
  602.                     removeBuff( 'the_arbiters_judgment' )
  603.                 end
  604.                 applyDebuff( 'target', 'execution_sentence', 12 )
  605.             end,
  606.         },
  607.  
  608.  
  609.         eye_for_an_eye = {
  610.             id = 205191,
  611.             cast = 0,
  612.             cooldown = 60,
  613.             gcd = "spell",
  614.  
  615.             talent = 'eye_for_an_eye',
  616.  
  617.             startsCombat = false,
  618.             texture = 135986,
  619.  
  620.             handler = function ()
  621.                 applyBuff( 'eye_for_an_eye' )
  622.             end,
  623.         },
  624.  
  625.  
  626.         final_verdict = {
  627.             id = 336872,
  628.             cast = 0,
  629.             cooldown = 0,
  630.             gcd = "spell",
  631.  
  632.             spend = function ()
  633.                 if buff.divine_purpose.up then return 0 end
  634.                 return 3 - ( buff.fires_of_justice.up and 1 or 0 ) - ( buff.the_arbiters_judgment.up and 1 or 0 )
  635.             end,
  636.             spendType = "holy_power",
  637.  
  638.             startsCombat = true,
  639.             texture = 461860,
  640.  
  641.             handler = function ()
  642.                 if buff.divine_purpose.up then removeBuff( 'divine_purpose' )                
  643.                 else
  644.                     removeBuff( 'fires_of_justice' )
  645.                     removeBuff( 'the_arbiters_judgment' )
  646.                 end
  647.                 if buff.avenging_wrath_crit.up then removeBuff( "avenging_wrath_crit" ) end
  648.                 if talent.righteous_verdict.enabled then applyBuff( 'righteous_verdict' ) end
  649.                 if level < 115 and equipped.whisper_of_the_nathrezim then applyBuff( 'whisper_of_the_nathrezim', 4 ) end
  650.             end,
  651.         },
  652.  
  653.  
  654.         flash_of_light = {
  655.             id = 19750,
  656.             cast = function () return ( 1.5 - ( buff.selfless_healer.stack * 0.5 ) ) * haste end,
  657.             cooldown = 0,
  658.             gcd = "spell",
  659.  
  660.             spend = 0.22,
  661.             spendType = "mana",
  662.  
  663.             startsCombat = true,
  664.             texture = 135907,
  665.  
  666.             handler = function ()
  667.                 removeBuff( 'selfless_healer' )
  668.             end,
  669.         },
  670.  
  671.  
  672.         hammer_of_justice = {
  673.             id = 853,
  674.             cast = 0,
  675.             cooldown = function ()
  676.                 if equipped.justice_gaze and target.health.percent > 75 then
  677.                     return 15
  678.                 end
  679.                 return 60
  680.             end,
  681.             gcd = "spell",
  682.  
  683.             spend = 0.035,
  684.             spendType = "mana",
  685.  
  686.             startsCombat = true,
  687.             texture = 135963,
  688.  
  689.             handler = function ()
  690.                 applyDebuff( 'target', 'hammer_of_justice' )
  691.                 if equipped.justice_gaze and target.health.percent > 75 then
  692.                     gain( 1, 'holy_power' )
  693.                 end
  694.             end,
  695.         },
  696.  
  697.  
  698.         hammer_of_reckoning = {
  699.             id = 247675,
  700.             cast = 0,
  701.             cooldown = 60,
  702.             gcd = "spell",
  703.  
  704.             startsCombat = true,
  705.             -- texture = ???,
  706.  
  707.             pvptalent = "hammer_of_reckoning",
  708.  
  709.             usable = function () return buff.reckoning.stack >= 50 end,
  710.             handler = function ()
  711.                 removeStack( "reckoning", 50 )
  712.                 if talent.crusade.enabled then
  713.                     applyBuff( "crusade", 12 )
  714.                 else
  715.                     applyBuff( "avenging_wrath", 6 )
  716.                 end
  717.             end,
  718.         },
  719.  
  720.  
  721.         hammer_of_wrath = {
  722.             id = 24275,
  723.             cast = 0,
  724.             cooldown = function () return 7.5 * haste end,
  725.             gcd = "spell",
  726.  
  727.             spend = -1,
  728.             spendType = 'holy_power',
  729.  
  730.             startsCombat = true,
  731.             texture = 613533,
  732.  
  733.             usable = function () return target.health_pct < 20 or buff.avenging_wrath.up or buff.crusade.up or buff.final_verdict.up end, --Ashen Hollow allows use but does not provide a buff
  734.             handler = function ()    
  735.                 if buff.final_verdict.up then removeBuff( 'final_verdict' )          
  736.             end,
  737.         },
  738.  
  739.  
  740.         hand_of_hindrance = {
  741.             id = 183218,
  742.             cast = 0,
  743.             cooldown = 30,
  744.             gcd = "spell",
  745.  
  746.             spend = 0.1,
  747.             spendType = "mana",
  748.  
  749.             startsCombat = true,
  750.             texture = 1360760,
  751.  
  752.             handler = function ()
  753.                 applyDebuff( 'target', 'hand_of_hindrance' )
  754.             end,
  755.         },
  756.  
  757.  
  758.         hand_of_reckoning = {
  759.             id = 62124,
  760.             cast = 0,
  761.             cooldown = 8,
  762.             gcd = "spell",
  763.  
  764.             spend = 0.03,
  765.             spendType = "mana",
  766.  
  767.             startsCombat = true,
  768.             texture = 135984,
  769.  
  770.             handler = function ()
  771.                 applyDebuff( 'target', 'hand_of_reckoning' )
  772.             end,
  773.         },
  774.  
  775.  
  776.         holy_avenger = {
  777.             id = 105809,
  778.             cast = 0,
  779.             cooldown = 180,
  780.             gcd = "spell",
  781.  
  782.             talent = 'holy_avenger',
  783.             toggle = 'cooldowns',
  784.  
  785.             startsCombat = false,
  786.             texture = 571555,
  787.  
  788.             handler = function ()
  789.                 applyBuff( 'holy_avenger' )
  790.             end,
  791.         },
  792.  
  793.  
  794.         inquisition = {
  795.             id = 84963,
  796.             cast = 0,
  797.             cooldown = 0,
  798.             gcd = "spell",
  799.  
  800.             spend = 0,
  801.             spendType = "holy_power",
  802.  
  803.             talent = 'inquisition',
  804.  
  805.             startsCombat = true,
  806.             texture = 461858,
  807.  
  808.             usable = function () return buff.fires_of_justice.up or holy_power.current > 0 end,
  809.             handler = function ()
  810.                 if buff.fires_of_justice.up then
  811.                     local hopo = min( 2, holy_power.current )
  812.                     spend( hopo, 'holy_power' )                    
  813.                     applyBuff( 'inquisition', 15 * ( hopo + 1 ) )
  814.                     return
  815.                 end
  816.                 local hopo = min( 3, holy_power.current )
  817.                 spend( hopo, 'holy_power' )                    
  818.                 applyBuff( 'inquisition', 15 * hopo )
  819.             end,
  820.         },
  821.  
  822.  
  823.         judgment = {
  824.             id = 20271,
  825.             cast = 0,
  826.             charges = 1,
  827.             cooldown = function () return 12 * haste end,
  828.             gcd = "spell",
  829.  
  830.             spend = -1,
  831.             spendType = "holy_power",
  832.  
  833.             startsCombat = true,
  834.             texture = 135959,
  835.  
  836.             handler = function ()
  837.                 applyDebuff( 'target', 'judgment' )
  838.                 if talent.zeal.enabled then applyBuff( 'zeal', 20, 3 ) end
  839.                 if set_bonus.tier20_2pc > 0 then applyBuff( 'sacred_judgment' ) end
  840.                 if set_bonus.tier21_4pc > 0 then applyBuff( 'hidden_retribution_t21_4p', 15 ) end
  841.                 if talent.sacred_judgment.enabled then applyBuff( 'sacred_judgment' ) end                
  842.             end,
  843.         },
  844.  
  845.  
  846.         justicars_vengeance = {
  847.             id = 215661,
  848.             cast = 0,
  849.             cooldown = 0,
  850.             gcd = "spell",
  851.  
  852.             spend = function ()
  853.                 if buff.divine_purpose.up then return 0 end
  854.                 return 5 - ( buff.fires_of_justice.up and 1 or 0 ) - ( buff.the_arbiters_judgment.up and 1 or 0 )
  855.             end,
  856.             spendType = "holy_power",
  857.  
  858.             startsCombat = true,
  859.             texture = 135957,
  860.  
  861.             handler = function ()
  862.                 if buff.divine_purpose.up then removeBuff( 'divine_purpose' )
  863.                 else
  864.                     removeBuff( 'fires_of_justice' )
  865.                     removeBuff( 'the_arbiters_judgment' )
  866.                 end
  867.             end,
  868.         },
  869.  
  870.  
  871.         lay_on_hands = {
  872.             id = 633,
  873.             cast = 0,
  874.             cooldown = function () return 600 * ( talent.unbreakable_spirit.enabled and 0.7 or 1 ) end,
  875.             gcd = "off",
  876.  
  877.             startsCombat = false,
  878.             texture = 135928,
  879.  
  880.             readyTime = function () return debuff.forbearance.remains end,
  881.  
  882.             handler = function ()
  883.                 gain( health.max, "health" )
  884.                 applyDebuff( 'player', 'forbearance', 30 )
  885.                 if azerite.empyreal_ward.enabled then applyBuff( "empyreal_ward" ) end
  886.             end,
  887.         },
  888.  
  889.  
  890.         rebuke = {
  891.             id = 96231,
  892.             cast = 0,
  893.             cooldown = 15,
  894.             gcd = "off",
  895.  
  896.             toggle = 'interrupts',
  897.  
  898.             startsCombat = true,
  899.             texture = 523893,
  900.  
  901.             debuff = "casting",
  902.             readyTime = state.timeToInterrupt,
  903.  
  904.             handler = function ()
  905.                 interrupt()
  906.             end,
  907.         },
  908.  
  909.  
  910.         redemption = {
  911.             id = 7328,
  912.             cast = function () return 10 * haste end,
  913.             cooldown = 0,
  914.             gcd = "spell",
  915.  
  916.             spend = 0.04,
  917.             spendType = "mana",
  918.  
  919.             startsCombat = true,
  920.             texture = 135955,
  921.  
  922.             handler = function ()
  923.             end,
  924.         },
  925.  
  926.  
  927.         repentance = {
  928.             id = 20066,
  929.             cast = function () return 1.7 * haste end,
  930.             cooldown = 15,
  931.             gcd = "spell",
  932.  
  933.             spend = 0.06,
  934.             spendType = "mana",
  935.  
  936.             startsCombat = false,
  937.             texture = 135942,
  938.  
  939.             handler = function ()
  940.                 interrupt()
  941.                 applyDebuff( 'target', 'repentance', 60 )
  942.             end,
  943.         },
  944.  
  945.  
  946.         seraphim = {
  947.             id = 152262,
  948.             cast = 0,
  949.             cooldown = 45,
  950.             gcd = "spell",
  951.  
  952.             talent = 'seraphim',
  953.             toggle = 'cooldowns',
  954.  
  955.             startsCombat = false,
  956.             texture = 1030103,
  957.  
  958.             handler = function ()
  959.                 applyBuff( 'seraphim' )
  960.             end,
  961.         },
  962.  
  963.  
  964.         shield_of_vengeance = {
  965.             id = 184662,
  966.             cast = 0,
  967.             cooldown = 120,
  968.             gcd = "spell",
  969.  
  970.             startsCombat = true,
  971.             texture = 236264,
  972.  
  973.             usable = function () return incoming_damage_3s > 0.2 * health.max, "incoming damage over 3s is less than 20% of max health" end,
  974.             handler = function ()
  975.                 applyBuff( 'shield_of_vengeance' )
  976.             end,
  977.         },
  978.  
  979.  
  980.         templars_verdict = {
  981.             id = 85256,
  982.             cast = 0,
  983.             cooldown = 0,
  984.             gcd = "spell",
  985.  
  986.             spend = function ()
  987.                 if buff.divine_purpose.up then return 0 end
  988.                 return 3 - ( buff.fires_of_justice.up and 1 or 0 ) - ( buff.the_arbiters_judgment.up and 1 or 0 )
  989.             end,
  990.             spendType = "holy_power",
  991.  
  992.             startsCombat = true,
  993.             texture = 461860,
  994.  
  995.             handler = function ()
  996.                 if buff.divine_purpose.up then removeBuff( 'divine_purpose' )                
  997.                 else
  998.                     removeBuff( 'fires_of_justice' )
  999.                     removeBuff( 'the_arbiters_judgment' )
  1000.                 end
  1001.                 if buff.avenging_wrath_crit.up then removeBuff( "avenging_wrath_crit" ) end
  1002.                 if talent.righteous_verdict.enabled then applyBuff( 'righteous_verdict' ) end
  1003.                 if level < 115 and equipped.whisper_of_the_nathrezim then applyBuff( 'whisper_of_the_nathrezim', 4 ) end
  1004.             end,
  1005.         },
  1006.  
  1007.         turn_evil = {
  1008.             id = 10326,
  1009.             cast = function () return 1.5 * haste end,
  1010.             cooldown = 15,
  1011.             gcd = "spell",
  1012.  
  1013.             startsCombat = false,
  1014.             texture = 571559,
  1015.         },
  1016.  
  1017.  
  1018.         vanquishers_hammer = {
  1019.             id = 328204,
  1020.             cast = 0,
  1021.             cooldown = 30,
  1022.             gcd = "spell",
  1023.  
  1024.             spend = function ()
  1025.                 return 1
  1026.             end,
  1027.             spendType = "holy_power",
  1028.  
  1029.             startsCombat = true,
  1030.             texture = 3578228,
  1031.  
  1032.             handler = function ()
  1033.                 if buff.judgment.up then removeBuff( 'judgment' )
  1034.         },
  1035.  
  1036.  
  1037.         wake_of_ashes = {
  1038.             id = 255937,
  1039.             cast = 0,
  1040.             cooldown = 45,
  1041.             gcd = "spell",
  1042.  
  1043.             spend = -3,
  1044.             spendType = 'holy_power',
  1045.  
  1046.             startsCombat = true,
  1047.             texture = 1112939,
  1048.  
  1049.             usable = function ()
  1050.                 if settings.check_wake_range and not ( target.exists and target.within12 ) then return false, "target is outside of 12 yards" end
  1051.                 return true
  1052.             end,
  1053.  
  1054.             handler = function ()
  1055.                 if target.is_undead or target.is_demon then applyDebuff( 'target', 'wake_of_ashes' ) end
  1056.                 if level < 115 and equipped.ashes_to_dust then
  1057.                     applyDebuff( 'target', 'ashes_to_dust' )
  1058.                     active_dot.ashes_to_dust = active_enemies
  1059.                 end
  1060.             end,
  1061.         },
  1062.  
  1063.  
  1064.         --[[ wartime_ability = {
  1065.             id = 264739,
  1066.             cast = 0,
  1067.             cooldown = 0,
  1068.             gcd = "spell",
  1069.  
  1070.             startsCombat = true,
  1071.             texture = 1518639,
  1072.  
  1073.             handler = function ()
  1074.             end,
  1075.         }, ]]
  1076.  
  1077.  
  1078.         word_of_glory = {
  1079.             id = 85673,
  1080.             cast = 0,
  1081.             gcd = "spell",
  1082.  
  1083.             spend = function ()
  1084.                 if buff.divine_purpose.up then return 0 end
  1085.                 return 3 - ( buff.fires_of_justice.up and 1 or 0 ) - ( buff.the_arbiters_judgment.up and 1 or 0 )
  1086.             end,
  1087.             spendType = "holy_power",
  1088.  
  1089.             startsCombat = true,
  1090.             texture = 133192,
  1091.  
  1092.             handler = function ()
  1093.                 if buff.divine_purpose.up then removeBuff( 'divine_purpose' )
  1094.                 else
  1095.                     removeBuff( 'fires_of_justice' )
  1096.                     removeBuff( 'the_arbiters_judgment' )
  1097.                 end
  1098.                 gain( 1.33 * stat.spell_power * 8, 'health' )
  1099.             end,
  1100.         },
  1101.     } )
  1102.  
  1103.  
  1104.     spec:RegisterPack( "Retribution""potion_of_focused_resolve",
  1105.  
  1106.         package = "Retribution",
  1107.     } )
  1108.  
  1109.  
  1110.     spec:RegisterSetting( "check_wake_range", false, {
  1111.         name = "Check |T1112939:0|t Wake of Ashes Range",
  1112.         desc = "If checked, when your target is outside of |T1112939:0|t Wake of Ashes' range, it will not be recommended.",
  1113.         type = "toggle",
  1114.         width = 1.5
  1115.     } )
  1116.  
  1117.  
  1118. end
Add Comment
Please, Sign In to add comment