So, my first attemp Ever in Jass:
It does not work. Why? What is wrong.... I just have no idea.
JASS:
function Trig_Net_Cast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A013' ) ) then
return false
endif
return true
endfunction
function Actions takes nothing returns nothing
local unit NetCaster = GetSpellAbilityUnit()
local unit NetTarget = GetSpellTargetUnit()
local integer NetInt
loop
set NetInt = NetInt + 1
call UnitDamageTargetBJ( NetCaster, NetTarget, ( GetHeroStatBJ(bj_HEROSTAT_AGI, NetCaster, true) * 1.00 ), ATTACK_TYPE_CHAOS, DAMAGE_TYPE_FORCE )
call TriggerSleepAction(1.00)
exitwhen NetInt>6
endloop
set NetCaster = null
set NetTarget = null
endfunction
//===========================================================================
function InitTrig_Net_Cast takes nothing returns nothing
set gg_trg_Net_Cast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Net_Cast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Net_Cast, Condition( function Trig_Net_Cast_Conditions ) )
call TriggerAddAction( gg_trg_Net_Cast, function Actions )
endfunction
It does not work. Why? What is wrong.... I just have no idea.















