Skip to content

Instantly share code, notes, and snippets.

@Sammyjroberts
Created September 18, 2018 04:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sammyjroberts/d838e5ab76c8a4c776bdc317e99e547a to your computer and use it in GitHub Desktop.
Save Sammyjroberts/d838e5ab76c8a4c776bdc317e99e547a to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment