If target has modification do something

Basically I am trying to apply a debuff, and when a target with that debuff is healed, I reduce that healing by a %, I was told to use filters, and I need to be able to see from the filter if the target is afflcted with the debuff, unsure how to do that heres the code:

function ArenaBattle:FilterHeal( filterTable ) print("hello from filter") local healer_index = filterTable["entindex_healer_const"] local target_index = filterTable["entindex_target_const"] local source_index = filterTable["entindex_inflictor_const"] local heal = filterTable["heal"]

local healer, target, source local params = {healer = healer, target = target, heal = heal, ability = source}

if healer_index then healer = EntIndexToHScript( healer_index ) end if target_index then target = EntIndexToHScript( target_index ) end if source_index then source = EntIndexToHScript( source_index ) end

if target then print("--target--") tprint(target) for _, modifier in ipairs( target:FindAllModifiers() ) do print("--mod--") tprint(modifier) tprint(modifier:GetStatusEffectName()) if modifier.GetModifierMortal_Wound then -- healFactorSelf = healFactorSelf + (modifier:GetModifierHealAmplify_Percentage( params ) or 0 )/100 print("mortal wound found") end if modifier.GetModifiermortal_wound then -- healFactorSelf = healFactorSelf + (modifier:GetModifierHealAmplify_Percentage( params ) or 0 )/100 print("mortal wound found2") end end end end

Any documentation on this stuff would help greatly, im having a hard time finding any information on a lot of what im trying to do. thank you guys