Untitled

Anonymous
lua
01/28/2026 12:27 AM
3.2 KB
8
Indexable
aa.curing.strategies.passive.duel.enemy_class.infernal["000300_ignore_resto_applies"] = function()
  -- Setting max time they are off eq or bal
  local their_eqbal_timeleft
  if aa.target().bals.bal:expected_in() >= aa.target().bals.eq:expected_in() then
    local their_eqbal_timeleft = aa.target().bals.bal:expected_in()
  else
    local their_eqbal_timeleft = aa.target().bals.eq:expected_in()
  end

  -- We need to know if we are factoring in a potential limb break
  local limbs = {
    "right leg",
    "left leg",
    "right arm",
    "left arm"
  }

  -- 15 is used as a static value because that is the damage for handaxe
  local limb_prepped = false
  for _,limb in ipairs(limbs) do
    if aa.self.aff:limb_prepped(limb, 15) then
      limb_prepped = true
    end
  end

  -- Depending on our broken limb state, we have different timings we need to consider
  local broken_limbs = aa.self.affs:broken_limb_count()
  local total_time_left

  -- 1.8s for handaxe, 1.9s for DSL, 3.7s for Trample
  if broken_limbs == 4 then
    total_time_left = their_eqbal_timeleft
  elseif broken_limbs == 3 then
    total_time_left = their_eqbal_timeleft + 1.8
  elseif broken_limbs == 2 then
    if limb_prepped then
      total_time_left = their_eqbal_timeleft + 1.8
    else
      total_time_left = their_eqbal_timeleft + 1.9
    end
  elseif broken_limbs == 1 then
    if limb_prepped then
      total_time_left = their_eqbal_timeleft + 1.9
    else
      total_time_left = their_eqbal_timeleft + 3.7
    end
  end

  -- Now total_time_left should give us time remaining until they can attack again + the fastest bal they can use to meet Vivisect requirements on eq/bal
  -- If we are not getting eq back (for restore) before the above, then we need to hold resto applies
  if not aa.self.bals.eq:before(total_time_left) then

    aa.curing.prios:unset("damagedleftleg")
    aa.curing.prios:unset("damagedrightleg")
    aa.curing.prios:unset("mangledleftleg")
    aa.curing.prios:unset("mangledrightleg")

    aa.curing.prios:unset("damagedleftarm")
    aa.curing.prios:unset("damagedrightarm")
    aa.curing.prios:unset("mangledleftarm")
    aa.curing.prios:unset("mangledrightarm")

    aa.curing.prios:unset("mildtrauma")
    aa.curing.prios:unset("serioustrauma")
    aa.curing.prios:unset("damagedhead")
    aa.curing.prios:unset("mangledhead")
  end
end
Editor is loading...
Leave a Comment