|
主要是游戏缓存方面通不过,不知道是什么原因
function H2I takes handle h returns integer
return h
return 0
endfunction
function I2H takes integer i returns trigger
return i
return null
endfunction
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_Func005A takes nothing returns nothing
local real int
local integer exp
local unit china
set exp = GetStoredinteger(udg_GC,"one","one1"))
set china = I2S(I2H(exp))
if ( Trig_xjh03_Func005Func001C() ) then
set int = ( ( I2R(GetHeroAgi(china, true)) / 100.00 ) + 1.00 )
else
set int = 1.00
endif
call Storereal(udg_GC,"one","one01",int)
set int = 0.00
set exp = 0
set china =null
endfunction
function Trig_xjh03_Actions takes nothing returns nothing
local unit china
local location ti
local location array unit01
local group unit02
local integer exp
local real int
local effect array look
local lightning array look01
call InitGameCacheBJ( "Mapgc.w3v" )
set udg_GC = GetLastCreatedGameCacheBJ()
set china = GetTriggerUnit()
set ti = GetUnitLoc(GetTriggerUnit())
set unit02 = GetUnitsInRangeOfLocAll(400.00, ti)
set exp = 1
set int = 0.00
loop
exitwhen exp > 12
set unit01[exp] = PolarProjectionBJ(ti, 450.00, int)
set unit01[( exp + 12 )] = PolarProjectionBJ(ti, 200.00, int)
set int = ( int + 30.00 )
set exp = exp + 1
endloop
set unit01[25] = ti
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
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 Storeinteger(udg_GC,"one","one01",I2S(H2I(china)))
call ForGroupBJ( unit02, function Trig_xjh03_Func005A )
set int = GetStoredreal(udg_GC,"one","one1"))
call UnitDamagePointLoc( china, 0.20, 400.00, ti, ( ( I2R(GetHeroAgi(china, true)) *2.00) * int ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
call PolledWait( 1.50 )
set exp = 1
loop
exitwhen exp > 25
call RemoveLocation( unit01[exp] )
set exp = exp + 1
endloop
set exp = 1
loop
exitwhen exp > 37
call DestroyEffect( look[exp] )
set exp = exp + 1
endloop
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
call FlushStoredMission(udg_GC,"one")
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 |
|