Created
September 18, 2018 04:01
-
-
Save Sammyjroberts/d838e5ab76c8a4c776bdc317e99e547a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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