Code not working, but i can't find the error
anyone can help me?
+ rep
JASS:
function ArcCod takes nothing returns boolean
return GetSpellAbilityId()=='ZZZZ'
endfunction
function ArcDam takes nothing returns nothing
local unit Target = GetSpellTargetUnit()
local unit Caster = GetTriggerUnit()
local real d1 = I2R(GetHeroInt(Caster,true)) * 2.5
call UnitDamageTarget(Caster, Target, d1, false, true, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
endfunction
// ------------------------- Init Trigger----------------------------
function InitTrig_Arcane_Blast takes nothing returns nothing
local trigger t
set t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition(t, Condition( function ArcCod ) )
call TriggerAddAction(t, function ArcDam )
endfunction
anyone can help me?
+ rep