|
本帖最后由 o0木子0o 于 2013-7-27 21:14 编辑
我想做个离中心越近伤害越大的技能
与是出现了这个技能
由于可以用魔兽争霸的网吧被查封了,所以我无法验证这技能是否可行
大家帮看看可行不
function Trig_______uConditions takes nothing returns boolean
return ( ( GetSpellAbilityId() == 'AHfs' ) ) //'AHfs' 这是烈焰风暴
endfunction
function Trig_______uActions takes nothing returns nothing
if ( ( GetUnitAbilityLevel(GetSpellAbilityUnit(), 'AHfs') == 1 ) ) then
local integer a = 10
loop
set a =a+1
call CreateNUnitsAtLoc(1, 'hfoo', Player(0), GetSpellTargetLoc(), bj_UNIT_FACING)
call UnitApplyTimedLife(GetLastCreatedUnit(), 'BHwe', 1.00)
call UnitDamagePointLoc(GetTriggerUnit(), 0.10, a, GetSpellTargetLoc(), a, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_DIVINE)
exitwhnen (a==500)
else
endif
endfunction
发现了一个问题那就是如果按上面的话,单位要创建489次.........大问题....卡死你
下面是我修改后的
function Trig_______uConditions takes nothing returns boolean
return ( ( GetSpellAbilityId() == 'AHfs' ) ) //'AHfs' 这是烈焰风暴
endfunction
function Trig_______uActions takes nothing returns nothing
if ( ( GetUnitAbilityLevel(GetSpellAbilityUnit(), 'AHfs') == 1 ) ) then
local integer a = 10
call CreateNUnitsAtLoc(1, 'hfoo', Player(0), GetSpellTargetLoc(), bj_UNIT_FACING)
call UnitApplyTimedLife(GetLastCreatedUnit(), 'BHwe', 1.00)
loop
call UnitDamagePointLoc(GetTriggerUnit(), 0.10, AAA, GetSpellTargetLoc(), AAA, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_DIVINE)
set AAA =a+10
exitwhnen (a==500)
else
endif
endfunction
OK了.....要我翻译成T吗
|
|