冇人答你 咁我答下你: E個係模擬閃避 後既動作 姐係觸技
MISS 1:
function MISS_2Conditions takes nothing returns boolean
return GetEventDamage() == 1
endfunction
function Trig_MISS_2Actions takes nothing returns nothing
local texttag tx = CreateTextTagUnitBJ( "失誤", GetEventDamageSource(), 0, 10, 100, 0, 0, 0 )
call SetTextTagVelocity( tx, 0, 0.05 )
call SetTextTagPermanent( tx, false )
call SetTextTagFadepoint( tx, 0.75 )
call SetTextTagLifespan( tx, 1.0 )
endfunction
//===========================================================================
function InitTrig_MISS_2 takes nothing returns nothing
set gg_trg_MISS_2 = CreateTrigger()
call TriggerAddCondition(gg_trg_MISS_2, Condition(function MISS_2Conditions))
call YDWESyStemAnyUnitDamagedRegistTrigger( gg_trg_MISS_2 )
call TriggerAddAction(gg_trg_MISS_2, function Trig_MISS_2Actions)
endfunction
MISS 2:
function MISSConditions takes nothing returns boolean
return GetEventDamage() == 1
endfunction
function MISSActions takes nothing returns nothing
local unit u = CreateUnit(GetOwningPlayer(GetTriggerUnit()), 'o000', GetUnitX(GetTriggerUnit()), GetUnitY(GetTriggerUnit()), 0)
call UnitAddAbility( u, 'A001' )
call SetUnitAbilityLevel( u, 'A001', GetUnitAbilityLevel(GetTriggerUnit(), 'A000') )
call IssueTargetOrder(u, "thunderbolt", GetEventDamageSource() )
call YDWETimerRemoveUnit(1.00, u)
call UnitDamageTarget( GetTriggerUnit(), GetEventDamageSource(),I2R(GetHeroAgi(GetTriggerUnit(), true)), true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_UNKNOWN, WEAPON_TYPE_WHOKNOWS )
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl",GetEventDamageSource(),"origin"))
call SetUnitX(GetTriggerUnit(),GetUnitX(GetEventDamageSource()))
call SetUnitY(GetTriggerUnit(),GetUnitY(GetEventDamageSource()))
set u = null
endfunction
//===========================================================================
function InitTrig_MISS takes nothing returns nothing
set gg_trg_MISS = CreateTrigger()
call TriggerAddCondition(gg_trg_MISS, Condition(function MISSConditions))
call YDWESyStemAnyUnitDamagedRegistTrigger( gg_trg_MISS )
call TriggerAddAction(gg_trg_MISS, function MISSActions)
endfunction
移除蝗蟲群技能 咪就係移除技能 伸手-.-?