|
楼主 |
发表于 2008-3-10 19:29:01
|
显示全部楼层
function Trig_xjh03_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A004' ) ) then
return false
endif
return true
endfunction
function Trig_xjh03_Func005Func001C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetTriggerUnit(), 'B000') == true ) ) then
return false
endif
return true
endfunction
function Trig_xjh03_Func021A takes unit china returns real
local real int
local unit china
set china = GetTriggerUnit()
if ( Trig_xjh03_Func021Func001C() ) then
set int = ( ( I2R(GetHeroAgi(china, true)) / 100.00 ) + 1.00 )
else
set int = 1.00
endif
set china = null
return int
endfunction
function Trig_xjh03_Actions takes nothing returns nothing
local unit china
local location array unit01
local location ti]
local integer int01
local integer exp
local effect array look
local lightning array look01
local group unit02
set china = GetTriggerUnit()
set ti = GetUnitLoc(GetTriggerUnit())
set unit02 = GetUnitsInRangeOfLocAll(400.00, ti)
call ForGroupBJ( unit02, function Trig_xjh03_Func021A )
call UnitDamagePointLoc( china, 0.20, 400.00, ti, ( ( I2R(GetHeroAgi(china, true)) * 2.00 ) * int ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
set exp = 1
set int01 = 0
loop
exitwhen exp > 12
set unit01[exp] = PolarProjectionBJ(ti, 450.00, int01)
set unit01[( exp + 12 )] = PolarProjectionBJ(ti, 200.00, int01)
set int01 = ( int01 + 30.00 )
set exp = exp + 1
endloop
set unit01[25] = ti
set exp = 1
set exp = 1
loop
exitwhen exp > 12
call AddSpecialEffectLocBJ( unit01[exp], "Objects\\\\Spawnmodels\\\\Undead\\\\UDeathSmall\\\\UDeathSmall.mdl" )
set look[exp] = bj_lastCreatedEffect
call AddSpecialEffectLocBJ( unit01[( exp + 12 )], "Objects\\\\Spawnmodels\\\\Undead\\\\UndeadDissipate\\\\UndeadDissipate.mdl" )
set look[( exp + 12 )] = bj_lastCreatedEffect
call AddSpecialEffectLocBJ( unit01[( exp + 12 )], "Abilities\\\\Spells\\\\Undead\\\\DeathPact\\\\DeathPactTarget.mdl" )
set look[( exp + 25 )] = bj_lastCreatedEffect
set exp = exp + 1
endloop
call AddSpecialEffectLocBJ( unit01[25], "Abilities\\\\Spells\\\\Human\\\\Resurrect\\\\ResurrectCaster.mdl" )
set look[25] = bj_lastCreatedEffect
call PolledWait( 0.15 )
set exp = 1
set exp = 1
loop
exitwhen exp > 11
call AddLightningLoc( "FORK", unit01[exp], unit01[( exp + 1 )] )
set look01[exp] = bj_lastCreatedLightning
set exp = exp + 1
endloop
call AddLightningLoc( "FORK", unit01[12], unit01[1] )
set look01[12] = bj_lastCreatedLightning
call PolledWait( 1.50 )
set exp = 1
set exp = 1
loop
exitwhen exp > 25
call RemoveLocation( unit01[exp] )
set exp = exp + 1
endloop
set exp = 1
set exp = 1
loop
exitwhen exp > 37
call DestroyEffect( look[exp] )
set exp = exp + 1
endloop
set exp = 1
set exp = 1
loop
exitwhen exp > 12
call DestroyLightning( look01[exp] )
set exp = exp + 1
endloop
call RemoveLocation( ti )
call GroupClear( unit02 )
call DestroyGroup( unit02 )
set int = 0.00
set exp = 0
set china = null
endfunction
//===========================================================================
function InitTrig_xjh03 takes nothing returns nothing
set gg_trg_xjh03 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_xjh03, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_xjh03, Condition( function Trig_xjh03_Conditions ) )
call TriggerAddAction( gg_trg_xjh03, function Trig_xjh03_Actions )
endfunction |
|