|
[codes=jass]
function Trig_smfj_2_C takes nothing returns boolean
return GetBooleanAnd( ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_STRUCTURE) == false ),( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true ))
endfunction
function Trig_smfj_2_Do takes nothing returns nothing
call UnitDamageTarget( GetTriggerUnit(), GetTriggerUnit(), 80, true, false, ATTACK_TYPE_HERO, DAMAGE_TYPE_DIVINE, WEAPON_TYPE_WHOKNOWS )
endfunction
function Trig____________________001_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRangeOfLocMatching(250.00, GetUnitLoc(GetTriggerUnit()), Condition(function Trig_smfj_2_C)), function Trig_smfj_2_Do )
endfunction
function Trig_smfj_2_Actions takes nothing returns nothing
local unit Tunit=GetTriggerUnit()
local real X=GetUnitX(Tunit)
local real Y=GetUnitY(Tunit)
local location Tpoint=GetUnitLoc(Tunit)
local integer Lv=GetUnitAbilityLevel(Tunit,'A02L')
local player Tplayer=GetOwningPlayer(Tunit)
local real damage=GetEventDamage()
local real will=700.00-(I2R(Lv)*100.00)
local integer do=1
local unit Sunit
set udg_Damage[0]=udg_Damage[0]+damage
if(udg_Damage[0]>will)then
loop
exitwhen do>R2I(udg_Damage[0]/will)
set Sunit=CreateUnit(Tplayer,'e00G',X,Y,0)
call UnitApplyTimedLife(Sunit,'BHwe',1.50)
call ForGroupBJ( GetUnitsInRangeOfLocMatching(250.00, Tpoint, Condition(function Trig_smfj_2_C)), function Trig_smfj_2_Do )
set do=do+1
endloop
set udg_Damage[0]=0
endif
call RemoveLocation(Tpoint)
endfunction
//===========================================================================
function InitTrig_smfj_2 takes nothing returns nothing
set gg_trg_smfj_2 = CreateTrigger( )
call TriggerAddAction( gg_trg_smfj_2, function Trig_smfj_2_Actions )
endfunction
[/codes]
是一个被动反击技能 每受到多少伤害的时候就对周围敌人造成一次伤害 4级的时候一减掉300血就被弹出游戏 不知道怎么的
|
|