|
function Trig_thunder_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A006' ) ) then
return false
endif
return true
endfunction
function Trig_thunder_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitType(udg_thunderaim, UNIT_TYPE_DEAD) == true ) ) then
return false
endif
return true
endfunction
function Trig_thunder_Actions takes nothing returns nothing
set udg_thunderlv = GetUnitAbilityLevelSwapped('A006', GetTriggerUnit())
set udg_thunderaim = GetSpellTargetUnit()
call TriggerSleepAction( 0.50 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_thunder_Func004Func001C() ) then
call DoNothing( )
else
call AddLightningLoc( "CHIM", GetLocationX(GetUnitLoc(udg_thunderaim)), GetLocationY(GetUnitLoc(udg_thunderaim)), 0, GetLocationX(GetUnitLoc(udg_thunderaim)), GetLocationY(GetUnitLoc(udg_thunderaim)), 999.00 )
call UnitDamageTargetBJ( GetTriggerUnit(), udg_thunderaim, ( 20.00 * I2R(udg_thunderlv) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC )
call TriggerSleepAction( 0.02 )
call DestroyLightning( GetLastCreatedLightningBJ() )
call AddSpecialEffectTargetUnitBJ( "origin", udg_thunderaim, "Abilities\\Spells\\Orc\\Purge\\PurgeBuffTarget.mdl" )
call TriggerSleepAction( 0.03 )
call DestroyEffect( GetLastCreatedEffectBJ() )
call TriggerSleepAction( 0.95 )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_thunder takes nothing returns nothing
set gg_trg_thunder = CreateTrigger( )
call DisableTrigger( gg_trg_thunder )
call TriggerRegisterAnyUnitEventBJ( gg_trg_thunder, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_thunder, Condition( function Trig_thunder_Conditions ) )
call TriggerAddAction( gg_trg_thunder, function Trig_thunder_Actions )
endfunction
他说第48行即call UnitDamageTargetBJ( GetTriggerUnit(), udg_thunderaim, ( 20.00 * I2R(udg_thunderlv) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC )中有无效的变量数字。。?为什么? |
|