Name | Type | is_array | initial_value |
AnySheep | unit | No | |
calculatinggold | integer | No | |
LE | integer | Yes | |
LE2 | integer | No | |
LE3 | integer | No | |
LE4 | integer | No | |
LEmaker | string | No | |
Playere | player | No | |
RegrowingTreesPoint | location | No | |
Sheep | force | No | |
Sheeps | group | No | |
Spirit | force | No | |
Spirits | group | No | |
TimePassed | integer | No | |
Timer | timer | No | |
TimerWindow | timerdialog | No | |
Version | string | No | |
Wolf | force | No | |
wolf1 | unit | No | |
wolf2 | unit | No | |
wolf3 | unit | No | |
Wolfs | group | No |
function Trig_Regrow_Trees1_Conditions takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("dispel") ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'e002' ) ) then
return false
endif
return true
endfunction
function Trig_Regrow_Trees1_Actions takes nothing returns nothing
set udg_RegrowingTreesPoint = GetOrderPointLoc()
endfunction
//===========================================================================
function InitTrig_Regrow_Trees1 takes nothing returns nothing
set gg_trg_Regrow_Trees1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Regrow_Trees1, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddCondition( gg_trg_Regrow_Trees1, Condition( function Trig_Regrow_Trees1_Conditions ) )
call TriggerAddAction( gg_trg_Regrow_Trees1, function Trig_Regrow_Trees1_Actions )
endfunction
function Trig_Tree_Animation_Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'eC23' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'eC02' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'eC03' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'eC04' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'eC08' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'eC01' ) ) then
return true
endif
return false
endfunction
function Trig_Tree_Animation_Conditions takes nothing returns boolean
if ( not Trig_Tree_Animation_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Tree_Animation_Actions takes nothing returns nothing
call SetUnitAnimationWithRarity( GetTriggerUnit(), "stand", RARITY_FREQUENT )
endfunction
//===========================================================================
function InitTrig_Tree_Animation takes nothing returns nothing
set gg_trg_Tree_Animation = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Tree_Animation, EVENT_PLAYER_UNIT_CONSTRUCT_FINISH )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Tree_Animation, EVENT_PLAYER_UNIT_UPGRADE_FINISH )
call TriggerAddCondition( gg_trg_Tree_Animation, Condition( function Trig_Tree_Animation_Conditions ) )
call TriggerAddAction( gg_trg_Tree_Animation, function Trig_Tree_Animation_Actions )
endfunction
function Trig_Regrow_Trees2_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00F' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'e002' ) ) then
return false
endif
return true
endfunction
function Trig_Regrow_Trees2_Func001003 takes nothing returns nothing
call DestructableRestoreLife( GetEnumDestructable(), GetDestructableMaxLife(GetEnumDestructable()), true )
endfunction
function Trig_Regrow_Trees2_Actions takes nothing returns nothing
call EnumDestructablesInCircleBJ( 200.00, udg_RegrowingTreesPoint, function Trig_Regrow_Trees2_Func001003 )
endfunction
//===========================================================================
function InitTrig_Regrow_Trees2 takes nothing returns nothing
set gg_trg_Regrow_Trees2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Regrow_Trees2, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Regrow_Trees2, Condition( function Trig_Regrow_Trees2_Conditions ) )
call TriggerAddAction( gg_trg_Regrow_Trees2, function Trig_Regrow_Trees2_Actions )
endfunction