|
发表于 2010-4-11 01:15:53
|
显示全部楼层
[jass]
function Trig_KOF97xiuluodao_Conditions takes nothing returns boolean
return GetUnitTypeId(GetAttacker()) == 'H000'
endfunction
function Trig_KOF97xiuluodao_A takes nothing returns boolean
return GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE)>0.00 and IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetAttacker()))
endfunction
function Trig_KOF97xiuluodao_B takes nothing returns nothing
local unit u = GetEnumUnit()
local integer zhushuxing = GetHeroAgi(GetAttacker(), true)
local integer dengji = GetHeroAgi(GetAttacker(), true)
call UnitDamageTarget( GetAttacker(), u, ( I2R(zhushuxing) * ( I2R(dengji) * 0.05 ) ), true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_WHOKNOWS )
call DestroyEffect( AddSpecialEffect ( "Abilities\\\\Spells\\\\Other\\\\Monsoon\\\\MonsoonBoltTarget.mdl", GetUnitX(u),GetUnitY(u)))
set u = null
endfunction
function Trig_KOF97xiuluodao_Actions takes nothing returns nothing
local group g=CreateGroup()
call GroupEnumUnitsInRange(g,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),500,Condition(function Trig_KOF97xiuluodao_A))
call ForGroup(g, function Trig_KOF97xiuluodao_B )
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_KOF97xiuluodao takes nothing returns nothing
set gg_trg_KOF97xiuluodao = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_KOF97xiuluodao, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_KOF97xiuluodao, Condition( function Trig_KOF97xiuluodao_Conditions ) )
call TriggerAddAction( gg_trg_KOF97xiuluodao, function Trig_KOF97xiuluodao_Actions )
endfunction
[/jass] |
|