|
楼主 |
发表于 2009-5-18 21:55:39
|
显示全部楼层
[codes=jass]function Trig_JSlinghunlian_Func003001 takes nothing returns boolean
return ( GetSpellAbilityId() == 'Aspl' )
endfunction
function Trig_JSlinghunlian_Func003002 takes nothing returns boolean
return ( GetUnitAbilityLevel(GetTriggerUnit(), 'Aspl') == 8 )
endfunction
function Trig_JSlinghunlian_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_JSlinghunlian_Func003001(), Trig_JSlinghunlian_Func003002() ) ) then
return false
endif
return true
endfunction
function Trig_JSlinghunlian_Func002001003001 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == false )
endfunction
function Trig_JSlinghunlian_Func002001003002 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'Bspl') == true )
endfunction
function Trig_JSlinghunlian_Func002001003 takes nothing returns boolean
return GetBooleanAnd( Trig_JSlinghunlian_Func002001003001(), Trig_JSlinghunlian_Func002001003002() )
endfunction
function Trig_JSlinghunlian_Func002A takes nothing returns nothing
call UnitAddAbility( GetEnumUnit() , 'A01C' )
endfunction
function Trig_abc takes nothing returns nothing
call UnitRemoveAbility( GetEnumUnit() , 'A01C' )
endfunction
function Trig_JSlinghunlian_Actions takes nothing returns nothing
local location a
local unit b
local group c
set b = GetSpellTargetUnit()
set a = GetUnitLoc( b )
set c = GetUnitsInRangeOfLocMatching(800.00, a , Condition(function Trig_JSlinghunlian_Func002001003))
call TriggerSleepAction( 0.30 )
call ForGroupBJ( c , function Trig_JSlinghunlian_Func002A )
call TriggerSleepAction( 20.00 )
call ForGroupBJ( c , function Trig_abc )
call DestroyGroup( c )
call RemoveLocation( a )
set b = null
endfunction
//===========================================================================
function InitTrig_JSlinghunlian takes nothing returns nothing
set gg_trg_JSlinghunlian = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_JSlinghunlian, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_JSlinghunlian, Condition( function Trig_JSlinghunlian_Conditions ) )
call TriggerAddAction( gg_trg_JSlinghunlian, function Trig_JSlinghunlian_Actions )
endfunction[/codes]
其中Aspl是灵魂锁链的技能ID,Bspl是灵魂锁链魔法效果,为什么这段代码没效果呢? |
|