function PestAuxLogic(spEffect, increment) if env(GetSpEffectID, spEffect) == FALSE then return FALSE end local stacks = GetSpEffectStackCount(spEffect) for i = 1, stacks do act(ClearSpEffect, spEffect) end for _, aux in pairs(StatusEffects) do local info = GetStatusEffectInfo(aux) if not info.IsImmune() then local currentValue = GetPointerValue(info.current) local maxValue = GetPointerValue(info.maximum) for i = 1, stacks, 1 do if currentValue == maxValue then -- only affect when there is existing buildup break end IncreaseStatusBuildup(info, increment) end end end return TRUE end function ToxicRupture() if env(GetSpEffectID, 1728200) == FALSE then return FALSE end act(ClearSpEffect, 1728200) local spEffects = GetSpEffectsInfo() local damage = 0 for _, spEffect in ipairs(spEffects) do local stateInfo = GetParamValue(PARAM.SpEffectParam.STATE_INFO, spEffect.ID) if stateInfo == 2 or stateInfo == 5 then act(ClearSpEffect, spEffect.ID) local interval = GetParamValue(PARAM.SpEffectParam.TRIGGER_INTERVAL, spEffect.ID) local percentageValue = GetParamValue(PARAM.SpEffectParam.CHANGE_HP_PERCENTAGE, spEffect.ID) / 100 local flatDmg = GetParamValue(PARAM.SpEffectParam.CHANGE_HP_FLAT, spEffect.ID) local remainingTicks = math.floor(spEffect.RemainingDuration / interval) local percentageDamage = math.floor((env(GetMaxHP) * percentageValue) + 0.5) damage = damage + ((percentageDamage + flatDmg) * remainingTicks) if stateInfo == 2 then -- Visuals act(AddSpEffect, 1728210) elseif stateInfo == 5 then act(AddSpEffect, 1728220) end end end if damage > 0 then local multiplier = 1 local isQuicksilverHusk = GetEntityId() == 17000850 if isQuicksilverHusk then multiplier = 0.5 end local finalDamage = damage * 0.5 * multiplier DealCalculatedDamage(finalDamage) if not isQuicksilverHusk or env(GetSpEffectID, 10466) == TRUE then ExecNewDamageDefault(DAMAGE_LEVEL_LARGE) end return TRUE end return FALSE end -- CUT ABILITY -- function RotJewel_OnImmuneStatusAttempt() -- if env(GetSpEffectID, 392320) == FALSE then -- Enemy detector: Player has Jewel equipped -- return -- end -- if g_PoisonImmuneSpEffectID > 0 and env(GetSpEffectID, 392370) == TRUE then -- Poison Apply Attempt on Immune Enemy -- act(ClearSpEffect, 392370) -- act(AddSpEffect, 392310) -- Damage -- end -- if g_RotImmuneSpEffectID > 0 and env(GetSpEffectID, 392371) == TRUE then -- Rot Apply Attempt on Immune Enemy -- act(ClearSpEffect, 392371) -- act(AddSpEffect, 392310) -- Damage -- end -- if g_BlightImmuneSpEffectID > 0 and env(GetSpEffectID, 392372) == TRUE then -- Blight Apply Attempt on Immune Enemy -- act(ClearSpEffect, 392372) -- act(AddSpEffect, 392310) -- Damage -- end -- if g_BleedImmuneSpEffectID > 0 and env(GetSpEffectID, 392373) == TRUE then -- Bleed Apply Attempt on Immune Enemy -- act(ClearSpEffect, 392373) -- act(AddSpEffect, 392310) -- Damage -- end -- end -- function RotJewel_StatusApplicationDetection_WeaponBuffs() -- if env(GetSpEffectID, Jewel_of_the_Sealed) == FALSE then -- return -- end -- if c_Style ~= HAND_LEFT_BOTH then -- Right Hand Active -- RotJewel_WeaponDealsStatusCheck(c_WeaponRight, 6401, 392380, { 831, 3175, 3177 , 1723000 }) -- Poison -- RotJewel_WeaponDealsStatusCheck(c_WeaponRight, 6451, 392381, { 3310, 3312 }) -- Rot -- RotJewel_WeaponDealsStatusCheck(c_WeaponRight, 6551, 392382, { 1791 }) -- Blight -- RotJewel_WeaponDealsStatusCheck(c_WeaponRight, 6501, 392383, { 1755, 3190, 3192, 7022310 }) -- Bleed -- end -- if c_Style ~= HAND_RIGHT_BOTH then -- Left Hand Active -- RotJewel_WeaponDealsStatusCheck(c_WeaponLeft, 6401, 392385, { 833, 3179, 3181 }) -- Poison -- RotJewel_WeaponDealsStatusCheck(c_WeaponLeft, 6451, 392386, { 3314, 3316 }) -- Rot -- RotJewel_WeaponDealsStatusCheck(c_WeaponLeft, 6551, 392387, { 1793 }) -- Blight -- RotJewel_WeaponDealsStatusCheck(c_WeaponLeft, 6501, 392388, { 1758, 3194, 3196, 7022315 }) -- Bleed -- end -- end -- function RotJewel_WeaponDealsStatusCheck(paramId, messageId, spEffectIfTrue, weaponBuffList) -- for i = 0, 2 do -- local spEffectMessageId = GetParamValue(PARAM.EquipParamWeapon.SPEFFECT_MESSAGE_ID(i), paramId) -- if spEffectMessageId == messageId then -- act(AddSpEffect, spEffectIfTrue) -- return -- end -- end -- for _, buffId in ipairs(weaponBuffList) do -- if env(GetSpEffectID, buffId) == TRUE then -- act(AddSpEffect, spEffectIfTrue) -- return -- end -- end -- end function AspectOfTheScorpion_WeaponBuff(spEffect, hand, disableTwoHand, cooldown) if env(GetSpEffectID, 1729000) == FALSE then if env(GetSpEffectID, spEffect) == TRUE then -- Bloodflame Blade act(ClearSpEffect, spEffect) end return elseif env(GetSpEffectID, spEffect) == TRUE or c_Style == disableTwoHand then return end cooldown[1] = cooldown[1] + 1 if cooldown[1] > 3 then cooldown[1] = 0 else return end local weaponId = GetWeaponID(hand) local isBuffable = GetParamValue(PARAM.EquipParamWeapon.IS_BUFFABLE, weaponId) if isBuffable == FALSE then return end act(AddSpEffect, spEffect) end