|
发表于 2006-4-20 17:02:35
|
显示全部楼层
试试
function Trig_bagua_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == \'A04T\' ) ) then
return false
endif
return true
endfunction
function Trig_bagua_Func003Func005001002001 takes nothing returns boolean
return ( IsPlayerAlly(GetOwningPlayer(GetFilterUnit()), GetTriggerPlayer()) == true )
endfunction
function Trig_bagua_Func003Func005001002002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) != true )
endfunction
function Trig_bagua_Func003Func005001002 takes nothing returns boolean
return GetBooleanAnd( Trig_bagua_Func003Func005001002001(), Trig_bagua_Func003Func005001002002() )
endfunction
function Trig_bagua_Func003Func005A takes nothing returns nothing
call UnitAddAbilityBJ( \'A051\', GetEnumUnit() )
call AddSpecialEffectTargetUnitBJ( \"overhead\", GetEnumUnit(), \"Abilities\\\\Spells\\\\NightElf\\\\FaerieDragonInvis\\\\FaerieDragon_Invis.mdl\" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
endfunction
function Trig_bagua_Func003C takes nothing returns boolean
if ( not ( ( ( ( GetHeroStatBJ(bj_HEROSTAT_INT, GetTriggerUnit(), true) + GetRandomInt(1, 12) ) - ( GetHeroStatBJ(bj_HEROSTAT_INT, udg_unit1sthero[GetConvertedPlayerId(ForcePickRandomPlayer(GetPlayersEnemies(GetTriggerPlayer())))], true) + ( 5 + GetRandomInt(1, 7) ) ) ) + 1 ) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_bagua_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call PanCameraToTimedLocForPlayer( udg_playerexist[GetForLoopIndexA()], GetUnitLoc(GetSpellTargetUnit()), 1.00 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerSleepAction( 2 )
if ( Trig_bagua_Func003C() ) then
call DisplayTextToForce( GetPlayersAll(), ( ( \"|c0000ff00\" + ( GetUnitName(GetTriggerUnit()) + \"|r\" ) ) + ( \"的\" + ( ( GetAbilityName(GetSpellAbilityId()) + \"使用成功\" ) + \"\" ) ) ) )
call CreateTextTagLocBJ( \"TRIGSTR_1867\", GetUnitLoc(GetSpellTargetUnit()), 0, 60.00, 0.00, 100, 50.00, 100.00 )
call SetTextTagLifespanBJ( GetLastCreatedTextTag(), 5 )
call ForGroupBJ( GetUnitsInRectMatching(RectFromCenterSizeBJ(GetUnitLoc(GetSpellTargetUnit()), 300.00, 400.00), Condition(function Trig_bagua_Func003Func005001002)), function Trig_bagua_Func003Func005A )
else
call DisplayTextToForce( GetPlayersAll(), ( ( \"|c0000ff00\" + ( GetUnitName(GetTriggerUnit()) + \"|r\" ) ) + ( \"的\" + ( ( GetAbilityName(GetSpellAbilityId()) + \"使用失败\" ) + \"\" ) ) ) )
endif
endfunction
//===========================================================================
function InitTrig_bagua takes nothing returns nothing
set gg_trg_bagua = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_bagua, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_bagua, Condition( function Trig_bagua_Conditions ) )
call TriggerAddAction( gg_trg_bagua, function Trig_bagua_Actions )
endfunction |
|