|
正常放还好的技能
在时间变为夜晚的瞬间会非常卡
而且在夜晚伤害似乎变得无效了
技能本身没有问题
以上就是最重要的问题了
技能效果为 献祭开启后 范围敌人会得到一个技能 该技能为魔法书
里面包含伤害自己的永久献祭
同时不断检查是否有受到灼伤的单位的友军在他身边
如果有则该单位也会受到灼伤
代码如下
//单位检查传染火焰伤害
function UnStopFire takes nothing returns nothing
if ( IsUnitAliveBJ(GetFilterUnit()) == true ) and ( GetUnitAbilityLevel(GetFilterUnit(), 'A02N') == 0 ) and ( IsPlayerEnemy(GetOwningPlayer(GetFilterUnit()), GetOwningPlayer(udg_Unit)) == false )then
call UnitAddAbility( GetFilterUnit(), 'A02N' )
call SetUnitAbilityLevel( GetFilterUnit(), 'A02M', GetUnitAbilityLevel(udg_Unit, 'A02M'))
call ExecuteFunc( "FireBridge")
endif
endfunction
function AddUnStopFire takes nothing returns nothing
local timer t1 =GetExpiredTimer()
local unit ua =GetHandleUnit(t1,"Fire_ua1")
if ( GetUnitAbilityLevel(ua, 'A02N') != 0 ) then
set udg_Unit = ua
call GroupEnumUnitsInRange(udg_G_TempGroup, GetUnitX(ua), GetUnitY(ua) , 300, Condition(function UnStopFire) )
else
call PauseTimer( t1 )
call DestroyTimer( t1 )
call UnitRemoveAbility( ua , 'A02N' )
set t1 = null
endif
endfunction
//单位检查传染火焰伤害
//单位删除火焰伤害
function DelUnStopFire takes nothing returns nothing
local timer t2 =GetExpiredTimer()
local unit ua =GetHandleUnit(t2,"Fire_ua2")
call PauseTimer( t2 )
call DestroyTimer( t2 )
call UnitRemoveAbility( ua , 'A02N' )
set t2 = null
endfunction
//单位删除火焰伤害
//单位添加火焰伤害
function Fire_Working takes unit ua returns nothing
local timer t1 = CreateTimer()
local timer t2 = CreateTimer()
local integer lv = GetUnitAbilityLevel(ua, 'A02M')
call SetHandleHandle(t1,"Fire_ua1",ua)
call TimerStart(t1,1.0,true,function AddUnStopFire)
call SetHandleHandle(t2,"Fire_ua2",ua)
call TimerStart(t2,15.0,false,function DelUnStopFire)
set t1 = null
set t2 = null
endfunction
//单位添加火焰伤害
function FireBridge takes nothing returns nothing
call Fire_Working(GetFilterUnit())
endfunction
function Fire takes nothing returns nothing
if ( IsUnitAliveBJ(GetFilterUnit()) == true ) and ( GetUnitAbilityLevel(GetFilterUnit(), 'A02N') == 0 ) and ( IsPlayerEnemy(GetOwningPlayer(GetFilterUnit()), GetOwningPlayer(udg_Unit)) == true ) then
call UnitAddAbility( GetFilterUnit(), 'A02N' )
call SetUnitAbilityLevel( GetFilterUnit(), 'A02M', GetUnitAbilityLevel(udg_Unit, 'A02L'))
call Fire_Working(GetFilterUnit())
endif
endfunction
function EmUnStopFire takes nothing returns nothing
local timer t =GetExpiredTimer()
local unit ua =GetHandleUnit(t,"Fire_ua")
if ( GetUnitAbilityLevel(ua, 'BNeg') != 0 ) then
set udg_Unit = ua
call GroupEnumUnitsInRange(udg_G_TempGroup, GetUnitX(ua), GetUnitY(ua) , 300, Condition(function Fire) )
else
call PauseTimer(t)
call DestroyTimer(t)
set t = null
endif
endfunction
function UnStopFire_Actions takes unit ua returns nothing
local timer t = CreateTimer()
call SetHandleHandle(t,"Fire_ua",ua)
call TimerStart(t,0.75,true,function EmUnStopFire)
set t = null
endfunction
function UnStopFire_Conditions takes nothing returns nothing
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Nfir' ) and ( GetIssuedOrderIdBJ() == String2OrderIdBJ("immolation")) ) then
call UnStopFire_Actions(GetTriggerUnit())
endif
endfunction
//===========================================================================
function InitTrig_UnStopFire takes nothing returns nothing
set gg_trg_UnStopFire = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_UnStopFire, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_UnStopFire, Condition( function UnStopFire_Conditions ) )
endfunction |
|