|
楼主 |
发表于 2008-7-21 17:35:02
|
显示全部楼层
Shadowstrike:
function Trig_Shadowstrike_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'AEsh' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Ewar' ) ) then
return false
endif
return true
endfunction
function Trig_Shadowstrike_Func001001003001001 takes nothing returns boolean
return ( GetFilterUnit() != GetSpellTargetUnit() )
endfunction
function Trig_Shadowstrike_Func001001003001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Shadowstrike_Func001001003001 takes nothing returns boolean
return GetBooleanAnd( Trig_Shadowstrike_Func001001003001001(), Trig_Shadowstrike_Func001001003001002() )
endfunction
function Trig_Shadowstrike_Func001001003002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Shadowstrike_Func001001003002002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Shadowstrike_Func001001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Shadowstrike_Func001001003002001(), Trig_Shadowstrike_Func001001003002002() )
endfunction
function Trig_Shadowstrike_Func001001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Shadowstrike_Func001001003001(), Trig_Shadowstrike_Func001001003002() )
endfunction
function Trig_Shadowstrike_Func001A takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'e00A', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "shadowstrike", GetEnumUnit() )
call UnitApplyTimedLifeBJ( 1.00, 'BEfn', GetLastCreatedUnit() )
endfunction
function Trig_Shadowstrike_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRangeOfLocMatching(500.00, GetUnitLoc(GetSpellTargetUnit()), Condition(function Trig_Shadowstrike_Func001001003)), function Trig_Shadowstrike_Func001A )
call GroupClear( GetLastCreatedGroup() )
endfunction
//===========================================================================
function InitTrig_Shadowstrike takes nothing returns nothing
set gg_trg_Shadowstrike = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Shadowstrike, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Shadowstrike, Condition( function Trig_Shadowstrike_Conditions ) )
call TriggerAddAction( gg_trg_Shadowstrike, function Trig_Shadowstrike_Actions )
endfunction |
|