Lmfaocj
Active Member
- Reaction score
- 1
I know that you can't detect a buff level because it only returns one but can someone help me find out a way to make this work.
JASS:
function Trig_Dark_Aura_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetEventDamageSource(), 039;B007039;) == true ) ) then
return false
endif
return true
endfunction
function Trig_Dark_Aura_Actions takes nothing returns nothing
call UnitDamageTargetEx(GetEventDamageSource(),GetTriggerUnit(),GetEventDamage() * (I2R(GetUnitAbilityLevel(GetEventDamageSource(),039;B007039;)) * 0.02), true, true, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
endfunction
//===========================================================================
function InitTrig_Dark_Aura takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerAddCondition( t, Condition( function Trig_Dark_Aura_Conditions ) )
call TriggerAddAction( t, function Trig_Dark_Aura_Actions )
call Damage_RegisterEvent(t)
endfunction