|
楼主 |
发表于 2007-6-29 10:50:38
|
显示全部楼层
function Trig_Backtrack_Conditions takes nothing returns boolean
return GetLearnedSkill()=='技能代码'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function Backtrack_Main takes nothing returns nothing
local unit u=GetTriggerUnit()
local real damage=GetEventDamage()
if(damage>0)then
if(GetRandomInt(1,100)<='概率')then
set damage=(1-'百分比')*damage
call SetUnitState(u,UNIT_STATE_LIFE,GetUnitState(lfo,UNIT_STATE_LIFE)+damage)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\\\Weapons\\\\WingedSerpentMissile\\\\WingedSerpentMissile.mdl",lfo,"hand,left"))
endif
endif
endfunction
function Trig_Backtrack_Actions takes nothing returns nothing
local trigger ltt
if GetUnitAbilityLevel(GetTriggerUnit(),'技能代码')==1 then
set ltt=CreateTrigger()
call TriggerRegisterUnitEvent(ltt,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
call TriggerAddAction(ltt,function Backtrack_Main)
endif
endfunction
function StartTrigger_Backtrack takes nothing returns nothing
set gg_trg_Backtrack=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Backtrack,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(gg_trg_Backtrack,Condition(function Trig_Backtrack_Conditions))
call TriggerAddAction(gg_trg_Backtrack,function Trig_Backtrack_Actions)
存下东西 |
|