|
楼主 |
发表于 2007-10-25 11:19:24
|
显示全部楼层
以下是我先用T做的再转成的J:
[codes=jass]function Trig_FrostNova_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'AUfn' ) ) then
return false
endif
return true
endfunction
function Trig_FrostNova_Actions takes nothing returns nothing
set udg_rect = RectFromCenterSizeBJ(GetSpellTargetLoc(), ( 400.00 * SinBJ(GetRandomReal(-180.00, 180.00)) ), ( 400.00 * SinBJ(GetRandomReal(-180.00, 180.00)) ))
set udg_x = GetLocationX(GetRectCenter(udg_rect))
set udg_y = GetLocationY(GetRectCenter(udg_rect))
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddSpecialEffectLocBJ( GetRandomLocInRect(udg_rect), "Abilities\\\\Spells\\\\Undead\\\\FrostNova\\\\FrostNovaTarget.mdl" )
call TriggerSleepAction( 0.10 )
call DestroyEffect( GetLastCreatedEffectBJ() )
call UnitDamagePoint( GetTriggerUnit(), 0, 400.00, udg_x, udg_y, 20.00, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_FrostNova takes nothing returns nothing
set gg_trg_FrostNova = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_FrostNova, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_FrostNova, Condition( function Trig_FrostNova_Conditions ) )
call TriggerAddAction( gg_trg_FrostNova, function Trig_FrostNova_Actions )
endfunction[/codes]
发现简短多了。。。。打击太大了,闭门吃饭先。。。 |
|