function CheckNight takes nothing returns boolean
return GetBooleanOr( Day_Abil(), Night_Abil() )
endfunction
function Night_Action takes nothing returns nothing
local unit Hunter GetTriggerUnit()
call UnitRemoveAbilityBJ( Day(), Hunter )
call UnitAddAbilityBJ( Night(), Hunter )
set Hunter = null
endfunction
//===========================================================================
function InitTrig_Hunter_at_Night takes nothing returns nothing
set gg_trg_Hunter_at_Night = CreateTrigger( )
call TriggerAddCondition( gg_trg_Hunter_at_Night, Condition( function CheckNight ) )
call TriggerRegisterGameStateEventTimeOfDay( gg_trg_Hunter_at_Night, GREATER_THAN_OR_EQUAL, 18.00 )
call TriggerRegisterGameStateEventTimeOfDay( gg_trg_Hunter_at_Night, LESS_THAN_OR_EQUAL, 6.00 )
call TriggerAddAction( gg_trg_Hunter_at_Night, function Night_Action )
endfunction