|
[codes=jass]function Trig_JN11_Func001Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == udg_JINENG_putong[GetForLoopIndexA()] ) ) then
return false
endif
return true
endfunction
function Trig_JN11_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 5
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_JN11_Func001Func001C() ) then
local unit jnsbshifa
local unit jnsbmubiao
local integer jnneigong
set jnsbshifa = GetSpellAbilityUnit()
set jnsbmubiao = GetSpellTargetUnit()
set jnneigong = ( GetHeroStatBJ(bj_HEROSTAT_INT, jnsbshifa, true) * 50 )
call UnitDamageTargetBJ( jnsbshifa, jnsbmubiao, I2R(jnneigong), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC )
set jnsbshifa = null
set jnsbmubiao = null
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_JN11 takes nothing returns nothing
set gg_trg_JN11 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_JN11, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddAction( gg_trg_JN11, function Trig_JN11_Actions )
endfunction[/codes]
请帮我看下有什么问题啊这个写法 |
|