|
function Trig_B_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'AHtc' ) ) then
return false
endif
return true
endfunction
function Trig_B_Actions takes nothing returns nothing
local unit T_unit = GetSpellAbilityUnit()
local location P_T_unit = GetUnitLoc(GetSpellAbilityUnit())
local integer LV = GetUnitAbilityLevelSwapped('AHtc', GetSpellAbilityUnit())
local array location P_random
local array unit crearunit
local rect creatarea = RectFromCenterSizeBJ(P_T_unit, 800.00, 800.00)
call TriggerSleepAction( 1.20 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = ( LV * 2 )
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set P_random[GetForLoopIndexA()] = GetRandomLocInRect(creatarea)
call CreateNUnitsAtLoc( 1, 'h00R', GetOwningPlayer(T_unit), P_random[GetForLoopIndexA()], bj_UNIT_FACING )
set crearunit[GetForLoopIndexA()] = GetLastCreatedUnit()
call UnitApplyTimedLifeBJ( 3.00, 'BHwe', crearunit[GetForLoopIndexA()] )
call UnitAddAbilityBJ( 'AHtc', udg_UNITA[GetForLoopIndexA()] )
call IssueImmediateOrder( crearunit[GetForLoopIndexA()], "thunderclap" )
call RemoveLocation( P_random[GetForLoopIndexA()] )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveRect( creatarea )
call RemoveLocation( uP_random )
endfunction
//===========================================================================
function InitTrig_B takes nothing returns nothing
set gg_trg_B = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_B, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_B, Condition( function Trig_B_Conditions ) )
call TriggerAddAction( gg_trg_B, function Trig_B_Actions )
endfunction
这段JASS错误怎么这么多啊? 我看了好9不知道怎么回事呢
求教~`` |
|