function Debug takes string str returns nothing
call DisplayTextToForce(GetPlayersAll(), str )
endfunction
function GetCreepIndex takes unit u returns integer
local integer i = 0
loop
if ( u == udg_creep[i]) then
return i
endif
set i = i + 1
exitwhen i == 84
endloop
return 0
endfunction
function GetComboPoints takes unit u returns integer
if ( UnitHasBuffBJ(u, 'B01I') ) then
return 1
elseif ( UnitHasBuffBJ(u, 'B031') ) then
return 2
elseif ( UnitHasBuffBJ(u, 'B033') ) then
return 3
elseif ( UnitHasBuffBJ(u, 'B034') ) then
return 4
elseif ( UnitHasBuffBJ(u, 'B035') ) then
return 5
else
return 0
endif
endfunction
function ClearComboPoints takes unit u returns nothing
call UnitRemoveBuffBJ('B01I', u)
call UnitRemoveBuffBJ('B031', u)
call UnitRemoveBuffBJ('B033', u)
call UnitRemoveBuffBJ('B034', u)
call UnitRemoveBuffBJ('B035', u)
endfunction
function H2I takes handle H returns integer
return H
return 0
endfunction
function handlevars takes nothing returns gamecache
return udg_handlevars
endfunction
function SetHandleHandle takes handle subject, string name, handle value returns nothing
if value==null then
call FlushStoredInteger(handlevars(),I2S(H2I(subject)),name)
else
call StoreInteger(handlevars(), I2S(H2I(subject)), name, H2I(value))
endif
endfunction
function GetHandleHandle takes handle subject, string name returns handle
return GetStoredInteger(handlevars(), I2S(H2I(subject)), name)
return null
endfunction
function SetHandleInt takes handle subject, string name, integer value returns nothing
if value==0 then
call FlushStoredInteger(handlevars(),I2S(H2I(subject)),name)
else
call StoreInteger(handlevars(), I2S(H2I(subject)), name, value)
endif
endfunction
function GetHandleInt takes handle subject, string name returns integer
return GetStoredInteger(handlevars(), I2S(H2I(subject)), name)
endfunction
function SetHandleReal takes handle subject, string name, real value returns nothing
if value==0 then
call FlushStoredReal(handlevars(),I2S(H2I(subject)),name)
else
call StoreReal(handlevars(), I2S(H2I(subject)), name, value)
endif
endfunction
function GetHandleReal takes handle subject, string name returns real
return GetStoredReal(handlevars(), I2S(H2I(subject)), name)
endfunction
function SetHandleString takes handle subject, string name, string value returns nothing
if value==null then
call FlushStoredString(handlevars(), I2S(H2I(subject)), name)
else
call StoreString(handlevars(), I2S(H2I(subject)), name, value)
endif
endfunction
function GetHandleString takes handle subject, string name returns string
return GetStoredString(handlevars(), I2S(H2I(subject)), name)
endfunction
function GetOrder takes unit u returns nothing
call Debug( GetUnitName(u) + ": " + OrderId2String(GetHandleInt( u, "order" ) ) )
endfunction
function IssueLastOrder takes unit u returns nothing
local string ordertype = GetHandleString( u, "ordertype" )
// if (ordertype == "immediateorder") then
// call IssueImmediateOrderById( u, GetHandleInt(u, "order" ) )
// endif
if (ordertype == "pointorder") then
call IssuePointOrderById( u, GetHandleInt(u, "order"), GetHandleReal(u, "ordertargetX"), GetHandleReal(u, "ordertargetY") )
endif
endfunction
function IsTidesTree takes destructable tocheck returns boolean
local integer id = GetDestructableTypeId(tocheck)
if (((id == 'LTlt') or (id == 'VTlt') or (id == 'ATtr') or (id == 'ATtc') or (id == 'B002')) and (IsDestructableDeadBJ(tocheck) == false)) then
return true
endif
return false
endfunction
function CountTreesEnum takes nothing returns nothing
if (IsTidesTree(GetEnumDestructable()) == true ) then
call SetHandleInt(gg_unit_E006_0044,"trees", GetHandleInt(gg_unit_E006_0044 , "trees") + 1 )
endif
endfunction
function CountTrees takes unit u, real radius returns integer
local location loc = GetUnitLoc(u)
call SetHandleInt(gg_unit_E006_0044, "trees",0)
call EnumDestructablesInCircleBJ( radius, loc, function CountTreesEnum )
call RemoveLocation(loc)
set loc = null
return GetHandleInt(u, "trees")
endfunction
function GetAffinityLevel takes unit u returns integer
local integer i = 0
local integer array skills
set skills[0] = 'A06C'
set skills[1] = 'A06D'
set skills[2] = 'A06E'
set skills[3] = 'A06G'
loop
if (GetUnitAbilityLevel(u, skills[i]) > 0) then
return skills[i]
endif
set i = i + 1
exitwhen i == 4
endloop
return 0
endfunction
function GetDryadRadius takes nothing returns real
local unit dryad = gg_unit_E006_0044
return I2R(GetUnitAbilityLevel(dryad,'A066') *75 + 300)
endfunction
Name | Type | is_array | initial_value |
Abhoerboolean | boolean | Yes | |
adminvar | integer | Yes | |
altarvariable | integer | Yes | 2 |
Board_vargold | integer | Yes | 0 |
Board_varkills | integer | Yes | 0 |
Board_varlevel | integer | Yes | 0 |
bol_Trollmeltbool | boolean | Yes | false |
bounty | integer | Yes | |
Caminteger | integer | Yes | |
creep | unit | Yes | |
creepposi | location | Yes | |
creeptype | unitcode | Yes | |
dorfgruppe | group | No | |
EvilGroup | force | No | |
evilherogroup | group | No | |
Forestwalkdood | destructable | Yes | |
g_genericinteger | integer | Yes | |
g_genericplayer | player | Yes | |
g_genericpoint | location | Yes | |
g_genericreal | real | Yes | |
g_genericsfx | effect | Yes | |
g_generictimer | timer | Yes | |
g_genericunit | unit | Yes | |
g_genericunittype | unitcode | Yes | |
g_playercount | integer | Yes | |
g_skilllevelvars | integer | Yes | |
gameclock | timer | No | |
gameover | boolean | No | |
gamestats | multiboard | No | |
gametime | real | No | 1.00 |
GoodGroup | force | No | |
goodherogroup | group | No | |
handlevars | gamecache | No | |
heroboolean | boolean | Yes | |
HeroID | unit | Yes | |
herolevel | integer | No | |
heropick | boolean | Yes | true |
heropicked | boolean | Yes | |
heropicker | player | No | |
heroselecter | unit | Yes | |
HintGroup | force | No | |
hints | string | Yes | |
mentalistservant | unit | Yes | |
minengruppe | group | No | |
mode_ar | boolean | No | |
mode_au | boolean | No | |
mode_ir | boolean | No | |
mode_iu | boolean | No | |
mode_nr | boolean | No | |
mode_nu | boolean | No | |
mode_sm | boolean | No | |
modeschecker | string | Yes | |
modvar | integer | Yes | |
multiboardrow | integer | Yes | |
multiboardrownummer | integer | No | |
Playerkick | dialog | No | |
Playerkick_Button | button | Yes | |
playername | string | Yes | |
playerscore | integer | Yes | |
randomeventvisibility | fogmodifier | Yes | |
RemnantsDropBoolean | boolean | Yes | true |
ressourcenprozent | real | Yes | |
revivetime | integer | Yes | |
revivetimer | timer | Yes | |
setitem | itemcode | Yes | |
setitemchecker | boolean | Yes | |
spawn_additional | integer | Yes | |
spawngruppe | group | Yes | |
Spawntimer | timer | No | |
stats | integer | Yes | |
stats_avghero | integer | No | |
stats_buildings | integer | Yes | |
stats_deaths | integer | Yes | |
stats_heroes | integer | Yes | |
stats_techlevel | integer | Yes | |
stats_time | integer | Yes | |
stats_units | integer | Yes | |
tankboolean | boolean | No | |
Weather | weathereffect | Yes |
function Trig_HeroinfonachpickStrings_Actions takes nothing returns nothing
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "|cffc3dbff *** Your hero is an |c00CC0000ASSASSIN|r.|cffc3dbff Please type -info for more information about it, e.g. items you can use etc." )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "|cffc3dbff *** Your hero is a |c00CC0000CASTER|r|cffc3dbff hero. Please type -info for more information about it, e.g. items you can use etc." )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "|cffc3dbff *** Your hero is a |c00CC0000RANGER|r|cffc3dbff hero. Please type -info for more information about it, e.g. items you can use etc." )
call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), "|cffc3dbff *** Your hero is a |c00CC0000WARRIOR|r|cffc3dbff hero. Please type -info for more information about it, e.g. items you can use etc." )
endfunction
//===========================================================================
function InitTrig_HeroinfonachpickStrings takes nothing returns nothing
set gg_trg_HeroinfonachpickStrings = CreateTrigger( )
call DisableTrigger( gg_trg_HeroinfonachpickStrings )
call TriggerAddAction( gg_trg_HeroinfonachpickStrings, function Trig_HeroinfonachpickStrings_Actions )
endfunction
function Trig_Mage_Select_Conditions takes nothing returns boolean
if ( not ( udg_heroboolean[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_Hblm_0180 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_selectMAGE, udg_heroselecter[GetConvertedPlayerId(GetTriggerPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Mage_Select_Actions takes nothing returns nothing
if ( udg_mode_ar == false ) then
set udg_heropicker = GetTriggerPlayer()
else
call DoNothing( )
endif
set udg_heroboolean[GetConvertedPlayerId(udg_heropicker)] = false
call RemoveUnit( udg_heroselecter[GetConvertedPlayerId(udg_heropicker)] )
call SetUnitPositionLoc( gg_unit_Hblm_0180, GetRectCenter(gg_rct_gGoodRevive) )
call SetUnitAnimation( gg_unit_Hblm_0180, "stand" )
call SetUnitOwner( gg_unit_Hblm_0180, udg_heropicker, true )
call UnitRemoveAbilityBJ( 'Avul', gg_unit_Hblm_0180 )
call SetPlayerName( udg_heropicker, ( GetPlayerName(udg_heropicker) + ( " (" + ( GetUnitName(gg_unit_Hblm_0180) + ")" ) ) ) )
call PanCameraToTimedLocForPlayer( udg_heropicker, GetRectCenter(gg_rct_gGoodRevive), 1.00 )
call AddSpecialEffectTargetUnitBJ( "origin", gg_unit_Hblm_0180, "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl" )
call CreateNUnitsAtLoc( 1, 'Hblm', Player(PLAYER_NEUTRAL_PASSIVE), PolarProjectionBJ(GetRectCenter(gg_rct_selectMAGE), 150.00, 180.00), 0.00 )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100, 100, 100, 60.00 )
call DisplayTextToForce( GetForceOfPlayer(udg_heropicker), "|cffc3dbff *** Your hero is a |c00CC0000CASTER|r|cffc3dbff hero. Please type -info for more information about it, e.g. items you can use etc." )
set udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)] = 100
set udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)] = 1
set udg_g_playercount[4] = ( udg_g_playercount[4] + 1 )
set udg_heropick[1] = false
set udg_heropicked[GetConvertedPlayerId(udg_heropicker)] = true
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemIconBJ( udg_gamestats, 1, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], "ReplaceableTextures\\CommandButtons\\BTNHeroBloodElfPrince.blp" )
call KillDestructable( gg_dest_DTfx_3018 )
if ( udg_mode_sm == true ) then
call SetHeroLevelBJ( gg_unit_Hblm_0180, 20, true )
else
call DoNothing( )
endif
call DisableTrigger( gg_trg_Mage_Select )
call DisableTrigger( gg_trg_Mage_Off )
call DisableTrigger( gg_trg_Mage_On )
endfunction
//===========================================================================
function InitTrig_Mage_Select takes nothing returns nothing
set gg_trg_Mage_Select = CreateTrigger( )
call DisableTrigger( gg_trg_Mage_Select )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Mage_Select, GetOwningPlayer(gg_unit_e000_0146), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Mage_Select, GetOwningPlayer(gg_unit_e000_0143), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Mage_Select, GetOwningPlayer(gg_unit_e000_0145), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Mage_Select, GetOwningPlayer(gg_unit_e000_0001), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Mage_Select, GetOwningPlayer(gg_unit_e000_0144), true )
call TriggerAddCondition( gg_trg_Mage_Select, Condition( function Trig_Mage_Select_Conditions ) )
call TriggerAddAction( gg_trg_Mage_Select, function Trig_Mage_Select_Actions )
endfunction
function Trig__Sorceress_Select_Conditions takes nothing returns boolean
if ( not ( udg_heroboolean[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_Hjai_0433 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_selectSORC, udg_heroselecter[GetConvertedPlayerId(GetTriggerPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig__Sorceress_Select_Actions takes nothing returns nothing
if ( udg_mode_ar == false ) then
set udg_heropicker = GetTriggerPlayer()
else
call DoNothing( )
endif
set udg_heroboolean[GetConvertedPlayerId(udg_heropicker)] = false
call RemoveUnit( udg_heroselecter[GetConvertedPlayerId(udg_heropicker)] )
call SetUnitPositionLoc( gg_unit_Hjai_0433, GetRectCenter(gg_rct_gGoodRevive) )
call SetUnitAnimation( gg_unit_Hjai_0433, "stand" )
call SetUnitOwner( gg_unit_Hjai_0433, udg_heropicker, true )
call UnitRemoveAbilityBJ( 'Avul', gg_unit_Hjai_0433 )
call SetPlayerName( udg_heropicker, ( GetPlayerName(udg_heropicker) + ( " (" + ( GetUnitName(gg_unit_Hjai_0433) + ")" ) ) ) )
call PanCameraToTimedLocForPlayer( udg_heropicker, GetRectCenter(gg_rct_gGoodRevive), 1.00 )
call AddSpecialEffectTargetUnitBJ( "origin", gg_unit_Hjai_0433, "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl" )
call CreateNUnitsAtLoc( 1, 'Hjai', Player(PLAYER_NEUTRAL_PASSIVE), PolarProjectionBJ(GetRectCenter(gg_rct_selectSORC), 150.00, 180.00), 0.00 )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100, 100, 100, 60.00 )
call DisplayTextToForce( GetForceOfPlayer(udg_heropicker), "|cffc3dbff *** Your hero is a |c00CC0000CASTER|r|cffc3dbff hero. Please type -info for more information about it, e.g. items you can use etc." )
set udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)] = 100
set udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)] = 1
set udg_g_playercount[4] = ( udg_g_playercount[4] + 1 )
set udg_heropick[2] = false
set udg_heropicked[GetConvertedPlayerId(udg_heropicker)] = true
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemIconBJ( udg_gamestats, 1, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], "ReplaceableTextures\\CommandButtons\\BTNJaina.blp" )
call KillDestructable( gg_dest_DTfx_3017 )
if ( udg_mode_sm == true ) then
call SetHeroLevelBJ( gg_unit_Hjai_0433, 20, true )
else
call DoNothing( )
endif
call DisableTrigger( gg_trg_Sorceress_Select )
call DisableTrigger( gg_trg_Sorceress_On )
call DisableTrigger( gg_trg_Sorceress_Off )
endfunction
//===========================================================================
function InitTrig_Sorceress_Select takes nothing returns nothing
set gg_trg_Sorceress_Select = CreateTrigger( )
call DisableTrigger( gg_trg_Sorceress_Select )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Sorceress_Select, GetOwningPlayer(gg_unit_e000_0146), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Sorceress_Select, GetOwningPlayer(gg_unit_e000_0143), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Sorceress_Select, GetOwningPlayer(gg_unit_e000_0145), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Sorceress_Select, GetOwningPlayer(gg_unit_e000_0001), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Sorceress_Select, GetOwningPlayer(gg_unit_e000_0144), true )
call TriggerAddCondition( gg_trg_Sorceress_Select, Condition( function Trig__Sorceress_Select_Conditions ) )
call TriggerAddAction( gg_trg_Sorceress_Select, function Trig__Sorceress_Select_Actions )
endfunction
function Trig__Mountain_King_Select_Conditions takes nothing returns boolean
if ( not ( udg_heroboolean[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_Hmkg_0022 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_selectMKING, udg_heroselecter[GetConvertedPlayerId(GetTriggerPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig__Mountain_King_Select_Actions takes nothing returns nothing
if ( udg_mode_ar == false ) then
set udg_heropicker = GetTriggerPlayer()
else
call DoNothing( )
endif
set udg_heroboolean[GetConvertedPlayerId(udg_heropicker)] = false
call RemoveUnit( udg_heroselecter[GetConvertedPlayerId(udg_heropicker)] )
call SetUnitPositionLoc( gg_unit_Hmkg_0022, GetRectCenter(gg_rct_gGoodRevive) )
call SetUnitOwner( gg_unit_Hmkg_0022, udg_heropicker, true )
call SetUnitAnimation( gg_unit_Hmkg_0022, "stand" )
call UnitRemoveAbilityBJ( 'Avul', gg_unit_Hmkg_0022 )
call SetPlayerName( udg_heropicker, ( GetPlayerName(udg_heropicker) + ( " (" + ( GetUnitName(gg_unit_Hmkg_0022) + ")" ) ) ) )
call PanCameraToTimedLocForPlayer( udg_heropicker, GetRectCenter(gg_rct_gGoodRevive), 1.00 )
call AddSpecialEffectTargetUnitBJ( "origin", gg_unit_Hmkg_0022, "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl" )
call CreateNUnitsAtLoc( 1, 'Hmkg', Player(PLAYER_NEUTRAL_PASSIVE), PolarProjectionBJ(GetRectCenter(gg_rct_selectMKING), 150.00, 90.00), 270.00 )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100, 100, 100, 60.00 )
call DisplayTextToForce( GetForceOfPlayer(udg_heropicker), "|cffc3dbff *** Your hero is a |c00CC0000WARRIOR|r|cffc3dbff hero. Please type -info for more information about it, e.g. items you can use etc." )
set udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)] = 100
set udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)] = 1
set udg_g_playercount[4] = ( udg_g_playercount[4] + 1 )
set udg_heropick[3] = false
set udg_heropicked[GetConvertedPlayerId(udg_heropicker)] = true
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemIconBJ( udg_gamestats, 1, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], "ReplaceableTextures\\CommandButtons\\BTNHeroMountainKing.blp" )
call KillDestructable( gg_dest_DTfx_3020 )
if ( udg_mode_sm == true ) then
call SetHeroLevelBJ( gg_unit_Hmkg_0022, 20, true )
else
call DoNothing( )
endif
call DisableTrigger( gg_trg_Mountain_King_Select )
call DisableTrigger( gg_trg_Moutain_King_Off )
call DisableTrigger( gg_trg_Moutain_King_On )
endfunction
//===========================================================================
function InitTrig_Mountain_King_Select takes nothing returns nothing
set gg_trg_Mountain_King_Select = CreateTrigger( )
call DisableTrigger( gg_trg_Mountain_King_Select )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Mountain_King_Select, GetOwningPlayer(gg_unit_e000_0146), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Mountain_King_Select, GetOwningPlayer(gg_unit_e000_0143), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Mountain_King_Select, GetOwningPlayer(gg_unit_e000_0145), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Mountain_King_Select, GetOwningPlayer(gg_unit_e000_0001), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Mountain_King_Select, GetOwningPlayer(gg_unit_e000_0144), true )
call TriggerAddCondition( gg_trg_Mountain_King_Select, Condition( function Trig__Mountain_King_Select_Conditions ) )
call TriggerAddAction( gg_trg_Mountain_King_Select, function Trig__Mountain_King_Select_Actions )
endfunction
function Trig__Artillery_Select_Conditions takes nothing returns boolean
if ( not ( udg_heroboolean[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_H004_0199 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_selectARTILLERY, udg_heroselecter[GetConvertedPlayerId(GetTriggerPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig__Artillery_Select_Actions takes nothing returns nothing
if ( udg_mode_ar == false ) then
set udg_heropicker = GetTriggerPlayer()
else
call DoNothing( )
endif
set udg_heroboolean[GetConvertedPlayerId(udg_heropicker)] = false
call RemoveUnit( udg_heroselecter[GetConvertedPlayerId(udg_heropicker)] )
call SetUnitPositionLoc( gg_unit_H004_0199, GetRectCenter(gg_rct_gGoodRevive) )
call SetUnitOwner( gg_unit_H004_0199, udg_heropicker, true )
call SetUnitAnimation( gg_unit_H004_0199, "stand" )
call UnitRemoveAbilityBJ( 'Avul', gg_unit_H004_0199 )
call SetPlayerName( udg_heropicker, ( GetPlayerName(udg_heropicker) + ( " (" + ( GetUnitName(gg_unit_H004_0199) + ")" ) ) ) )
call PanCameraToTimedLocForPlayer( udg_heropicker, GetRectCenter(gg_rct_gGoodRevive), 1.00 )
call AddSpecialEffectTargetUnitBJ( "origin", gg_unit_H004_0199, "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl" )
call CreateNUnitsAtLoc( 1, 'H004', Player(PLAYER_NEUTRAL_PASSIVE), PolarProjectionBJ(GetRectCenter(gg_rct_selectARTILLERY), 150.00, 90.00), 270.00 )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100, 100, 100, 60.00 )
call DisplayTextToForce( GetForceOfPlayer(udg_heropicker), "|cffc3dbff *** Your hero is a |c00CC0000RANGER|r|cffc3dbff hero. Please type -info for more information about it, e.g. items you can use etc." )
set udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)] = 100
set udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)] = 1
set udg_g_playercount[4] = ( udg_g_playercount[4] + 1 )
set udg_heropick[4] = false
set udg_heropicked[GetConvertedPlayerId(udg_heropicker)] = true
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemIconBJ( udg_gamestats, 1, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], "ReplaceableTextures\\CommandButtons\\BTNMortarTeam.blp" )
call KillDestructable( gg_dest_DTfx_3021 )
if ( udg_mode_sm == true ) then
call SetHeroLevelBJ( gg_unit_H004_0199, 20, true )
else
call DoNothing( )
endif
call DisableTrigger( GetTriggeringTrigger() )
call DisableTrigger( gg_trg_Artillery_Off )
call DisableTrigger( gg_trg_Artillery_On )
endfunction
//===========================================================================
function InitTrig_Artillery_Select takes nothing returns nothing
set gg_trg_Artillery_Select = CreateTrigger( )
call DisableTrigger( gg_trg_Artillery_Select )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Artillery_Select, GetOwningPlayer(gg_unit_e000_0146), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Artillery_Select, GetOwningPlayer(gg_unit_e000_0143), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Artillery_Select, GetOwningPlayer(gg_unit_e000_0145), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Artillery_Select, GetOwningPlayer(gg_unit_e000_0001), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Artillery_Select, GetOwningPlayer(gg_unit_e000_0144), true )
call TriggerAddCondition( gg_trg_Artillery_Select, Condition( function Trig__Artillery_Select_Conditions ) )
call TriggerAddAction( gg_trg_Artillery_Select, function Trig__Artillery_Select_Actions )
endfunction
function Trig__Forest_Soul_Select_Conditions takes nothing returns boolean
if ( not ( udg_heroboolean[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_Emfr_0017 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_selectFORESTSOUL, udg_heroselecter[GetConvertedPlayerId(GetTriggerPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig__Forest_Soul_Select_Actions takes nothing returns nothing
if ( udg_mode_ar == false ) then
set udg_heropicker = GetTriggerPlayer()
else
call DoNothing( )
endif
set udg_heroboolean[GetConvertedPlayerId(udg_heropicker)] = false
call RemoveUnit( udg_heroselecter[GetConvertedPlayerId(udg_heropicker)] )
call SetUnitPositionLoc( gg_unit_Emfr_0017, GetRectCenter(gg_rct_gGoodRevive) )
call SetUnitOwner( gg_unit_Emfr_0017, udg_heropicker, true )
call SetUnitAnimation( gg_unit_Emfr_0017, "stand" )
call UnitRemoveAbilityBJ( 'Avul', gg_unit_Emfr_0017 )
call SetPlayerName( udg_heropicker, ( GetPlayerName(udg_heropicker) + ( " (" + ( GetUnitName(gg_unit_Emfr_0017) + ")" ) ) ) )
call PanCameraToTimedLocForPlayer( udg_heropicker, GetRectCenter(gg_rct_gGoodRevive), 1.00 )
call AddSpecialEffectTargetUnitBJ( "origin", gg_unit_Emfr_0017, "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl" )
call CreateNUnitsAtLoc( 1, 'Emfr', Player(PLAYER_NEUTRAL_PASSIVE), PolarProjectionBJ(GetRectCenter(gg_rct_selectFORESTSOUL), 150.00, 0.00), 180.00 )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100, 100, 100, 60.00 )
call DisplayTextToForce( GetForceOfPlayer(udg_heropicker), "|cffc3dbff *** Your hero is a |c00CC0000CASTER|r|cffc3dbff hero. Please type -info for more information about it, e.g. items you can use etc." )
set udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)] = 100
set udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)] = 1
set udg_g_playercount[4] = ( udg_g_playercount[4] + 1 )
set udg_heropick[6] = false
set udg_heropicked[GetConvertedPlayerId(udg_heropicker)] = true
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemIconBJ( udg_gamestats, 1, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], "ReplaceableTextures\\CommandButtons\\BTNFurion.blp" )
call KillDestructable( gg_dest_DTfx_3022 )
if ( udg_mode_sm == true ) then
call SetHeroLevelBJ( gg_unit_Emfr_0017, 20, true )
else
call DoNothing( )
endif
call DisableTrigger( gg_trg_Forest_Soul_Select )
call DisableTrigger( gg_trg_Forest_Soul_Off )
call DisableTrigger( gg_trg_Forest_Soul_On )
endfunction
//===========================================================================
function InitTrig_Forest_Soul_Select takes nothing returns nothing
set gg_trg_Forest_Soul_Select = CreateTrigger( )
call DisableTrigger( gg_trg_Forest_Soul_Select )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Forest_Soul_Select, GetOwningPlayer(gg_unit_e000_0146), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Forest_Soul_Select, GetOwningPlayer(gg_unit_e000_0143), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Forest_Soul_Select, GetOwningPlayer(gg_unit_e000_0145), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Forest_Soul_Select, GetOwningPlayer(gg_unit_e000_0001), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Forest_Soul_Select, GetOwningPlayer(gg_unit_e000_0144), true )
call TriggerAddCondition( gg_trg_Forest_Soul_Select, Condition( function Trig__Forest_Soul_Select_Conditions ) )
call TriggerAddAction( gg_trg_Forest_Soul_Select, function Trig__Forest_Soul_Select_Actions )
endfunction
function Trig_Warden_Select_Conditions takes nothing returns boolean
if ( not ( udg_heroboolean[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_E003_0188 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_selectWARDEN, udg_heroselecter[GetConvertedPlayerId(GetTriggerPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Warden_Select_Actions takes nothing returns nothing
if ( udg_mode_ar == false ) then
set udg_heropicker = GetTriggerPlayer()
else
call DoNothing( )
endif
set udg_heroboolean[GetConvertedPlayerId(udg_heropicker)] = false
call RemoveUnit( udg_heroselecter[GetConvertedPlayerId(udg_heropicker)] )
call SetUnitPositionLoc( gg_unit_E003_0188, GetRectCenter(gg_rct_gGoodRevive) )
call SetUnitOwner( gg_unit_E003_0188, udg_heropicker, true )
call SetUnitAnimation( gg_unit_E003_0188, "stand" )
call UnitRemoveAbilityBJ( 'Avul', gg_unit_E003_0188 )
call SetPlayerName( udg_heropicker, ( GetPlayerName(udg_heropicker) + ( " (" + ( GetUnitName(gg_unit_E003_0188) + ")" ) ) ) )
call PanCameraToTimedLocForPlayer( udg_heropicker, GetRectCenter(gg_rct_gGoodRevive), 1.00 )
call AddSpecialEffectTargetUnitBJ( "origin", gg_unit_E003_0188, "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl" )
call CreateNUnitsAtLoc( 1, 'E003', Player(PLAYER_NEUTRAL_PASSIVE), PolarProjectionBJ(GetRectCenter(gg_rct_selectWARDEN), 150.00, 45.00), 225.00 )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100, 100, 100, 60.00 )
call DisplayTextToForce( GetForceOfPlayer(udg_heropicker), "|cffc3dbff *** Your hero is an |c00CC0000ASSASSIN|r.|cffc3dbff Please type -info for more information about it, e.g. items you can use etc." )
set udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)] = 100
set udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)] = 1
set udg_g_playercount[4] = ( udg_g_playercount[4] + 1 )
set udg_heropick[5] = false
set udg_heropicked[GetConvertedPlayerId(udg_heropicker)] = true
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemIconBJ( udg_gamestats, 1, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], "ReplaceableTextures\\CommandButtons\\BTNHeroWarden.blp" )
call KillDestructable( gg_dest_DTfx_3023 )
if ( udg_mode_sm == true ) then
call SetHeroLevelBJ( gg_unit_E003_0188, 20, true )
else
call DoNothing( )
endif
call DisableTrigger( gg_trg_Warden_Select )
call DisableTrigger( gg_trg_Warden_Off )
call DisableTrigger( gg_trg_Warden_On )
endfunction
//===========================================================================
function InitTrig_Warden_Select takes nothing returns nothing
set gg_trg_Warden_Select = CreateTrigger( )
call DisableTrigger( gg_trg_Warden_Select )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Warden_Select, GetOwningPlayer(gg_unit_e000_0146), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Warden_Select, GetOwningPlayer(gg_unit_e000_0143), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Warden_Select, GetOwningPlayer(gg_unit_e000_0145), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Warden_Select, GetOwningPlayer(gg_unit_e000_0001), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Warden_Select, GetOwningPlayer(gg_unit_e000_0144), true )
call TriggerAddCondition( gg_trg_Warden_Select, Condition( function Trig_Warden_Select_Conditions ) )
call TriggerAddAction( gg_trg_Warden_Select, function Trig_Warden_Select_Actions )
endfunction
function Trig_Windmaster_Select_Conditions takes nothing returns boolean
if ( not ( udg_heroboolean[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_Hvwd_0195 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_selectWINDMASTER, udg_heroselecter[GetConvertedPlayerId(GetTriggerPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Windmaster_Select_Actions takes nothing returns nothing
if ( udg_mode_ar == false ) then
set udg_heropicker = GetTriggerPlayer()
else
call DoNothing( )
endif
set udg_heroboolean[GetConvertedPlayerId(udg_heropicker)] = false
call RemoveUnit( udg_heroselecter[GetConvertedPlayerId(udg_heropicker)] )
call SetUnitPositionLoc( gg_unit_Hvwd_0195, GetRectCenter(gg_rct_gGoodRevive) )
call SetUnitOwner( gg_unit_Hvwd_0195, udg_heropicker, true )
call SetUnitAnimation( gg_unit_Hvwd_0195, "stand" )
call UnitRemoveAbilityBJ( 'Avul', gg_unit_Hvwd_0195 )
call SetPlayerName( udg_heropicker, ( GetPlayerName(udg_heropicker) + ( " (" + ( GetUnitName(gg_unit_Hvwd_0195) + ")" ) ) ) )
call PanCameraToTimedLocForPlayer( udg_heropicker, GetRectCenter(gg_rct_gGoodRevive), 1.00 )
call AddSpecialEffectTargetUnitBJ( "origin", gg_unit_Hvwd_0195, "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl" )
call CreateNUnitsAtLoc( 1, 'Hvwd', Player(PLAYER_NEUTRAL_PASSIVE), PolarProjectionBJ(GetRectCenter(gg_rct_selectWINDMASTER), 150.00, 135.00), 315.00 )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100, 100, 100, 60.00 )
call DisplayTextToForce( GetForceOfPlayer(udg_heropicker), "|cffc3dbff *** Your hero is a |c00CC0000CASTER|r|cffc3dbff hero. Please type -info for more information about it, e.g. items you can use etc." )
set udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)] = 100
set udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)] = 1
set udg_g_playercount[4] = ( udg_g_playercount[4] + 1 )
set udg_heropick[8] = false
set udg_heropicked[GetConvertedPlayerId(udg_heropicker)] = true
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemIconBJ( udg_gamestats, 1, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], "ReplaceableTextures\\CommandButtons\\BTNDruidOfTheTalon.blp" )
call KillDestructable( gg_dest_DTfx_3024 )
if ( udg_mode_sm == true ) then
call SetHeroLevelBJ( gg_unit_Hvwd_0195, 20, true )
else
call DoNothing( )
endif
call DisableTrigger( gg_trg_Wind_Master_Select )
call DisableTrigger( gg_trg_Wind_Master_Off )
call DisableTrigger( gg_trg_Wind_Master_On )
endfunction
//===========================================================================
function InitTrig_Wind_Master_Select takes nothing returns nothing
set gg_trg_Wind_Master_Select = CreateTrigger( )
call DisableTrigger( gg_trg_Wind_Master_Select )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Wind_Master_Select, GetOwningPlayer(gg_unit_e000_0146), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Wind_Master_Select, GetOwningPlayer(gg_unit_e000_0143), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Wind_Master_Select, GetOwningPlayer(gg_unit_e000_0145), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Wind_Master_Select, GetOwningPlayer(gg_unit_e000_0001), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Wind_Master_Select, GetOwningPlayer(gg_unit_e000_0144), true )
call TriggerAddCondition( gg_trg_Wind_Master_Select, Condition( function Trig_Windmaster_Select_Conditions ) )
call TriggerAddAction( gg_trg_Wind_Master_Select, function Trig_Windmaster_Select_Actions )
endfunction
function Trig_Archer_Select_Conditions takes nothing returns boolean
if ( not ( udg_heroboolean[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_H01H_0198 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_selectARCHER, udg_heroselecter[GetConvertedPlayerId(GetTriggerPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Archer_Select_Actions takes nothing returns nothing
if ( udg_mode_ar == false ) then
set udg_heropicker = GetTriggerPlayer()
else
call DoNothing( )
endif
set udg_heroboolean[GetConvertedPlayerId(udg_heropicker)] = false
call RemoveUnit( udg_heroselecter[GetConvertedPlayerId(udg_heropicker)] )
call SetUnitPositionLoc( gg_unit_H01H_0198, GetRectCenter(gg_rct_gGoodRevive) )
call SetUnitAnimation( gg_unit_H01H_0198, "stand" )
call SetUnitOwner( gg_unit_H01H_0198, udg_heropicker, true )
call UnitRemoveAbilityBJ( 'Avul', gg_unit_H01H_0198 )
call SetPlayerName( udg_heropicker, ( GetPlayerName(udg_heropicker) + ( " (" + ( GetUnitName(gg_unit_H01H_0198) + ")" ) ) ) )
call PanCameraToTimedLocForPlayer( udg_heropicker, GetRectCenter(gg_rct_gGoodRevive), 1.00 )
call AddSpecialEffectTargetUnitBJ( "origin", gg_unit_H01H_0198, "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl" )
call CreateNUnitsAtLoc( 1, 'H01H', Player(PLAYER_NEUTRAL_PASSIVE), PolarProjectionBJ(GetRectCenter(gg_rct_selectARCHER), 150.00, 315.00), 135.00 )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100, 100, 100, 60.00 )
call DisplayTextToForce( GetForceOfPlayer(udg_heropicker), "|cffc3dbff *** Your hero is a |c00CC0000RANGER|r|cffc3dbff hero. Please type -info for more information about it, e.g. items you can use etc." )
set udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)] = 100
set udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)] = 1
set udg_g_playercount[4] = ( udg_g_playercount[4] + 1 )
set udg_heropick[7] = false
set udg_heropicked[GetConvertedPlayerId(udg_heropicker)] = true
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemIconBJ( udg_gamestats, 1, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], "ReplaceableTextures\\CommandButtons\\BTNSylvanusWindrunner.blp" )
call KillDestructable( gg_dest_DTfx_3026 )
if ( udg_mode_sm == true ) then
call SetHeroLevelBJ( gg_unit_H01H_0198, 20, true )
else
call DoNothing( )
endif
call DisableTrigger( gg_trg_Archer_Off )
call DisableTrigger( gg_trg_Archer_On )
call DisableTrigger( gg_trg_Archer_Select )
endfunction
//===========================================================================
function InitTrig_Archer_Select takes nothing returns nothing
set gg_trg_Archer_Select = CreateTrigger( )
call DisableTrigger( gg_trg_Archer_Select )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Archer_Select, GetOwningPlayer(gg_unit_e000_0146), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Archer_Select, GetOwningPlayer(gg_unit_e000_0143), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Archer_Select, GetOwningPlayer(gg_unit_e000_0145), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Archer_Select, GetOwningPlayer(gg_unit_e000_0001), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Archer_Select, GetOwningPlayer(gg_unit_e000_0144), true )
call TriggerAddCondition( gg_trg_Archer_Select, Condition( function Trig_Archer_Select_Conditions ) )
call TriggerAddAction( gg_trg_Archer_Select, function Trig_Archer_Select_Actions )
endfunction
function Trig_Pala_Select_Conditions takes nothing returns boolean
if ( not ( udg_heroboolean[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_Hpal_0435 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_selectPALA, udg_heroselecter[GetConvertedPlayerId(GetTriggerPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Pala_Select_Actions takes nothing returns nothing
if ( udg_mode_ar == false ) then
set udg_heropicker = GetTriggerPlayer()
else
call DoNothing( )
endif
set udg_heroboolean[GetConvertedPlayerId(udg_heropicker)] = false
call RemoveUnit( udg_heroselecter[GetConvertedPlayerId(udg_heropicker)] )
call SetUnitPositionLoc( gg_unit_Hpal_0435, GetRectCenter(gg_rct_gGoodRevive) )
call SetUnitAnimation( gg_unit_Hpal_0435, "stand" )
call SetUnitOwner( gg_unit_Hpal_0435, udg_heropicker, true )
call UnitRemoveAbilityBJ( 'Avul', gg_unit_Hpal_0435 )
call SetPlayerName( udg_heropicker, ( GetPlayerName(udg_heropicker) + ( " (" + ( GetUnitName(gg_unit_Hpal_0435) + ")" ) ) ) )
call PanCameraToTimedLocForPlayer( udg_heropicker, GetRectCenter(gg_rct_gGoodRevive), 1.00 )
call AddSpecialEffectTargetUnitBJ( "origin", gg_unit_Hpal_0435, "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl" )
call CreateNUnitsAtLoc( 1, 'Hpal', Player(PLAYER_NEUTRAL_PASSIVE), PolarProjectionBJ(GetRectCenter(gg_rct_selectPALA), 150.00, 270.00), 90.00 )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100, 100, 100, 60.00 )
call DisplayTextToForce( GetForceOfPlayer(udg_heropicker), "|cffc3dbff *** Your hero is a |c00CC0000WARRIOR|r|cffc3dbff hero. Please type -info for more information about it, e.g. items you can use etc." )
set udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)] = 100
set udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)] = 1
set udg_g_playercount[4] = ( udg_g_playercount[4] + 1 )
set udg_heropick[9] = false
set udg_heropicked[GetConvertedPlayerId(udg_heropicker)] = true
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemIconBJ( udg_gamestats, 1, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], "ReplaceableTextures\\CommandButtons\\BTNHeroPaladin.blp" )
call KillDestructable( gg_dest_DTfx_0131 )
if ( udg_mode_sm == true ) then
call SetHeroLevelBJ( gg_unit_Hpal_0435, 20, true )
else
call DoNothing( )
endif
call DisableTrigger( gg_trg_Pala_Off )
call DisableTrigger( gg_trg_Pala_On )
call DisableTrigger( gg_trg_Pala_Select )
endfunction
//===========================================================================
function InitTrig_Pala_Select takes nothing returns nothing
set gg_trg_Pala_Select = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Pala_Select, GetOwningPlayer(gg_unit_e000_0146), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Pala_Select, GetOwningPlayer(gg_unit_e000_0143), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Pala_Select, GetOwningPlayer(gg_unit_e000_0145), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Pala_Select, GetOwningPlayer(gg_unit_e000_0001), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Pala_Select, GetOwningPlayer(gg_unit_e000_0144), true )
call TriggerAddCondition( gg_trg_Pala_Select, Condition( function Trig_Pala_Select_Conditions ) )
call TriggerAddAction( gg_trg_Pala_Select, function Trig_Pala_Select_Actions )
endfunction
function Trig_Crusader_Select_Conditions takes nothing returns boolean
if ( not ( udg_heroboolean[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_H01B_0670 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_selectCRUSADER, udg_heroselecter[GetConvertedPlayerId(GetTriggerPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Crusader_Select_Actions takes nothing returns nothing
if ( udg_mode_ar == false ) then
set udg_heropicker = GetTriggerPlayer()
else
call DoNothing( )
endif
set udg_heroboolean[GetConvertedPlayerId(udg_heropicker)] = false
call RemoveUnit( udg_heroselecter[GetConvertedPlayerId(udg_heropicker)] )
call SetUnitPositionLoc( gg_unit_H01B_0670, GetRectCenter(gg_rct_gGoodRevive) )
call SetUnitAnimation( gg_unit_H01B_0670, "stand" )
call SetUnitOwner( gg_unit_H01B_0670, udg_heropicker, true )
call UnitRemoveAbilityBJ( 'Avul', gg_unit_H01B_0670 )
call SetPlayerName( udg_heropicker, ( GetPlayerName(udg_heropicker) + ( " (" + ( GetUnitName(gg_unit_H01B_0670) + ")" ) ) ) )
call PanCameraToTimedLocForPlayer( udg_heropicker, GetRectCenter(gg_rct_gGoodRevive), 1.00 )
call AddSpecialEffectTargetUnitBJ( "origin", gg_unit_H01B_0670, "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl" )
call CreateNUnitsAtLoc( 1, 'H01B', Player(PLAYER_NEUTRAL_PASSIVE), PolarProjectionBJ(GetRectCenter(gg_rct_selectCRUSADER), 150.00, 270.00), 90.00 )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100, 100, 100, 60.00 )
call DisplayTextToForce( GetForceOfPlayer(udg_heropicker), "|cffc3dbff *** Your hero is a |c00CC0000WARRIOR|r|cffc3dbff hero. Please type -info for more information about it, e.g. items you can use etc." )
set udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)] = 100
set udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)] = 1
set udg_g_playercount[4] = ( udg_g_playercount[4] + 1 )
set udg_heropick[0] = false
set udg_heropicked[GetConvertedPlayerId(udg_heropicker)] = true
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemIconBJ( udg_gamestats, 1, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], "ReplaceableTextures\\CommandButtons\\BTNBanditLord.blp" )
call KillDestructable( gg_dest_DTfx_1422 )
if ( udg_mode_sm == true ) then
call SetHeroLevelBJ( gg_unit_H01B_0670, 20, true )
else
call DoNothing( )
endif
call DisableTrigger( gg_trg_Crusader_Off )
call DisableTrigger( gg_trg_Crusader_On )
call DisableTrigger( gg_trg_Crusader_Select )
endfunction
//===========================================================================
function InitTrig_Crusader_Select takes nothing returns nothing
set gg_trg_Crusader_Select = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Crusader_Select, GetOwningPlayer(gg_unit_e000_0146), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Crusader_Select, GetOwningPlayer(gg_unit_e000_0143), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Crusader_Select, GetOwningPlayer(gg_unit_e000_0145), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Crusader_Select, GetOwningPlayer(gg_unit_e000_0001), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Crusader_Select, GetOwningPlayer(gg_unit_e000_0144), true )
call TriggerAddCondition( gg_trg_Crusader_Select, Condition( function Trig_Crusader_Select_Conditions ) )
call TriggerAddAction( gg_trg_Crusader_Select, function Trig_Crusader_Select_Actions )
endfunction
function Trig_Dryade_Select_Conditions takes nothing returns boolean
if ( not ( udg_heroboolean[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_E006_0044 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_selectDRYADE, udg_heroselecter[GetConvertedPlayerId(GetTriggerPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Dryade_Select_Actions takes nothing returns nothing
if ( udg_mode_ar == false ) then
set udg_heropicker = GetTriggerPlayer()
else
call DoNothing( )
endif
set udg_heroboolean[GetConvertedPlayerId(udg_heropicker)] = false
call RemoveUnit( udg_heroselecter[GetConvertedPlayerId(udg_heropicker)] )
call SetUnitPositionLoc( gg_unit_E006_0044, GetRectCenter(gg_rct_gGoodRevive) )
call SetUnitAnimation( gg_unit_E006_0044, "stand" )
call SetUnitOwner( gg_unit_E006_0044, udg_heropicker, true )
call UnitRemoveAbilityBJ( 'Avul', gg_unit_E006_0044 )
call SetPlayerName( udg_heropicker, ( GetPlayerName(udg_heropicker) + ( " (" + ( GetUnitName(gg_unit_E006_0044) + ")" ) ) ) )
call PanCameraToTimedLocForPlayer( udg_heropicker, GetRectCenter(gg_rct_gGoodRevive), 1.00 )
call AddSpecialEffectTargetUnitBJ( "origin", gg_unit_E006_0044, "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl" )
call CreateNUnitsAtLoc( 1, 'E006', Player(PLAYER_NEUTRAL_PASSIVE), PolarProjectionBJ(GetRectCenter(gg_rct_selectDRYADE), 150.00, 0.00), 180.00 )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100, 100, 100, 60.00 )
call DisplayTextToForce( GetForceOfPlayer(udg_heropicker), "|cffc3dbff *** Your hero is a |c00CC0000RANGER|r|cffc3dbff hero. Please type -info for more information about it, e.g. items you can use etc." )
set udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)] = 100
set udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)] = 1
set udg_g_playercount[4] = ( udg_g_playercount[4] + 1 )
set udg_heropick[10] = false
set udg_heropicked[GetConvertedPlayerId(udg_heropicker)] = true
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemIconBJ( udg_gamestats, 1, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], "ReplaceableTextures\\CommandButtons\\BTNDryad.blp" )
call KillDestructable( gg_dest_DTfx_1423 )
if ( udg_mode_sm == true ) then
call SetHeroLevelBJ( gg_unit_E006_0044, 20, true )
else
call DoNothing( )
endif
call EnableTrigger( gg_trg_Dryad_Treecounter_Updater )
call DisableTrigger( gg_trg_Dryade_Off )
call DisableTrigger( gg_trg_Dryade_On )
call DisableTrigger( gg_trg_Dryade_Select )
endfunction
//===========================================================================
function InitTrig_Dryade_Select takes nothing returns nothing
set gg_trg_Dryade_Select = CreateTrigger( )
call DisableTrigger( gg_trg_Dryade_Select )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Dryade_Select, GetOwningPlayer(gg_unit_e000_0146), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Dryade_Select, GetOwningPlayer(gg_unit_e000_0143), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Dryade_Select, GetOwningPlayer(gg_unit_e000_0145), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Dryade_Select, GetOwningPlayer(gg_unit_e000_0001), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Dryade_Select, GetOwningPlayer(gg_unit_e000_0144), true )
call TriggerAddCondition( gg_trg_Dryade_Select, Condition( function Trig_Dryade_Select_Conditions ) )
call TriggerAddAction( gg_trg_Dryade_Select, function Trig_Dryade_Select_Actions )
endfunction
function Trig_Mentalist_Select_Conditions takes nothing returns boolean
if ( not ( udg_heroboolean[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_U002_0109 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_selectMENTALIST, udg_heroselecter[GetConvertedPlayerId(GetTriggerPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Mentalist_Select_Actions takes nothing returns nothing
if ( udg_mode_ar == false ) then
set udg_heropicker = GetTriggerPlayer()
else
call DoNothing( )
endif
set udg_heroboolean[GetConvertedPlayerId(udg_heropicker)] = false
call RemoveUnit( udg_heroselecter[GetConvertedPlayerId(udg_heropicker)] )
call SetUnitPositionLoc( gg_unit_U002_0109, GetRectCenter(gg_rct_gEvilRevive) )
call SetUnitOwner( gg_unit_U002_0109, udg_heropicker, true )
call SetUnitAnimation( gg_unit_U002_0109, "stand" )
call UnitRemoveAbilityBJ( 'Avul', gg_unit_U002_0109 )
call SetPlayerName( udg_heropicker, ( GetPlayerName(udg_heropicker) + ( " (" + ( GetUnitName(gg_unit_U002_0109) + ")" ) ) ) )
call PanCameraToTimedLocForPlayer( udg_heropicker, GetRectCenter(gg_rct_gEvilRevive), 1.00 )
call AddSpecialEffectTargetUnitBJ( "origin", gg_unit_U002_0109, "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl" )
call CreateNUnitsAtLoc( 1, 'U002', Player(PLAYER_NEUTRAL_PASSIVE), PolarProjectionBJ(GetRectCenter(gg_rct_selectMENTALIST), 150.00, 90.00), 270.00 )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100, 100, 100, 60.00 )
call DisplayTextToForce( GetForceOfPlayer(udg_heropicker), "|cffc3dbff *** Your hero is a |c00CC0000CASTER|r|cffc3dbff hero. Please type -info for more information about it, e.g. items you can use etc." )
set udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)] = 100
set udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)] = 1
set udg_g_playercount[4] = ( udg_g_playercount[4] + 1 )
set udg_heropick[28] = false
set udg_heropicked[GetConvertedPlayerId(udg_heropicker)] = true
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemIconBJ( udg_gamestats, 1, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], "ReplaceableTextures\\CommandButtons\\BTNVoidWalker.blp" )
call KillDestructable( gg_dest_DTfx_3029 )
if ( udg_mode_sm == true ) then
call SetHeroLevelBJ( gg_unit_U002_0109, 20, true )
else
call DoNothing( )
endif
call DisableTrigger( gg_trg_Mentalist_Off )
call DisableTrigger( gg_trg_Mentalist_On )
call DisableTrigger( gg_trg_Mentalist_Select )
endfunction
//===========================================================================
function InitTrig_Mentalist_Select takes nothing returns nothing
set gg_trg_Mentalist_Select = CreateTrigger( )
call DisableTrigger( gg_trg_Mentalist_Select )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Mentalist_Select, GetOwningPlayer(gg_unit_e001_0149), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Mentalist_Select, GetOwningPlayer(gg_unit_e001_0147), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Mentalist_Select, GetOwningPlayer(gg_unit_e001_0148), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Mentalist_Select, GetOwningPlayer(gg_unit_e001_0150), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Mentalist_Select, GetOwningPlayer(gg_unit_e001_0151), true )
call TriggerAddCondition( gg_trg_Mentalist_Select, Condition( function Trig_Mentalist_Select_Conditions ) )
call TriggerAddAction( gg_trg_Mentalist_Select, function Trig_Mentalist_Select_Actions )
endfunction
function Trig_Wraith_Select_Conditions takes nothing returns boolean
if ( not ( udg_heroboolean[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_Ulic_0187 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_selectWRAITH, udg_heroselecter[GetConvertedPlayerId(GetTriggerPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Wraith_Select_Actions takes nothing returns nothing
if ( udg_mode_ar == false ) then
set udg_heropicker = GetTriggerPlayer()
else
call DoNothing( )
endif
set udg_heroboolean[GetConvertedPlayerId(udg_heropicker)] = false
call RemoveUnit( udg_heroselecter[GetConvertedPlayerId(udg_heropicker)] )
call SetUnitPositionLoc( gg_unit_Ulic_0187, GetRectCenter(gg_rct_gEvilRevive) )
call SetUnitOwner( gg_unit_Ulic_0187, udg_heropicker, true )
call SetUnitAnimation( gg_unit_Ulic_0187, "stand" )
call UnitRemoveAbilityBJ( 'Avul', gg_unit_Ulic_0187 )
call SetPlayerName( udg_heropicker, ( GetPlayerName(udg_heropicker) + ( " (" + ( GetUnitName(gg_unit_Ulic_0187) + ")" ) ) ) )
call PanCameraToTimedLocForPlayer( udg_heropicker, GetRectCenter(gg_rct_gEvilRevive), 1.00 )
call AddSpecialEffectTargetUnitBJ( "origin", gg_unit_Ulic_0187, "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl" )
call CreateNUnitsAtLoc( 1, 'Ulic', Player(PLAYER_NEUTRAL_PASSIVE), PolarProjectionBJ(GetRectCenter(gg_rct_selectWRAITH), 150.00, 180.00), 0.00 )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100, 100, 100, 60.00 )
call DisplayTextToForce( GetForceOfPlayer(udg_heropicker), "|cffc3dbff *** Your hero is a |c00CC0000CASTER|r|cffc3dbff hero. Please type -info for more information about it, e.g. items you can use etc." )
set udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)] = 100
set udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)] = 1
set udg_g_playercount[4] = ( udg_g_playercount[4] + 1 )
set udg_heropick[26] = false
set udg_heropicked[GetConvertedPlayerId(udg_heropicker)] = true
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemIconBJ( udg_gamestats, 1, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], "ReplaceableTextures\\CommandButtons\\BTNLichVersion2.blp" )
call KillDestructable( gg_dest_DTfx_3028 )
if ( udg_mode_sm == true ) then
call SetHeroLevelBJ( gg_unit_Ulic_0187, 20, true )
else
call DoNothing( )
endif
call DisableTrigger( gg_trg_Wraith_Off )
call DisableTrigger( gg_trg_Wraith_On )
call DisableTrigger( gg_trg_Wraith_Select )
endfunction
//===========================================================================
function InitTrig_Wraith_Select takes nothing returns nothing
set gg_trg_Wraith_Select = CreateTrigger( )
call DisableTrigger( gg_trg_Wraith_Select )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Wraith_Select, GetOwningPlayer(gg_unit_e001_0149), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Wraith_Select, GetOwningPlayer(gg_unit_e001_0147), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Wraith_Select, GetOwningPlayer(gg_unit_e001_0148), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Wraith_Select, GetOwningPlayer(gg_unit_e001_0150), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Wraith_Select, GetOwningPlayer(gg_unit_e001_0151), true )
call TriggerAddCondition( gg_trg_Wraith_Select, Condition( function Trig_Wraith_Select_Conditions ) )
call TriggerAddAction( gg_trg_Wraith_Select, function Trig_Wraith_Select_Actions )
endfunction
function Trig_Demonlord_Select_Conditions takes nothing returns boolean
if ( not ( udg_heroboolean[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_Nklj_0240 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_selectDEMONLORD, udg_heroselecter[GetConvertedPlayerId(GetTriggerPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Demonlord_Select_Actions takes nothing returns nothing
if ( udg_mode_ar == false ) then
set udg_heropicker = GetTriggerPlayer()
else
call DoNothing( )
endif
set udg_heroboolean[GetConvertedPlayerId(udg_heropicker)] = false
call RemoveUnit( udg_heroselecter[GetConvertedPlayerId(udg_heropicker)] )
call SetUnitPositionLoc( gg_unit_Nklj_0240, GetRectCenter(gg_rct_gEvilRevive) )
call SetUnitOwner( gg_unit_Nklj_0240, udg_heropicker, true )
call SetUnitAnimation( gg_unit_Nklj_0240, "stand" )
call UnitRemoveAbilityBJ( 'Avul', gg_unit_Nklj_0240 )
call SetPlayerName( udg_heropicker, ( GetPlayerName(udg_heropicker) + ( " (" + ( GetUnitName(gg_unit_Nklj_0240) + ")" ) ) ) )
call PanCameraToTimedLocForPlayer( udg_heropicker, GetRectCenter(gg_rct_gEvilRevive), 1.00 )
call AddSpecialEffectTargetUnitBJ( "origin", gg_unit_Nklj_0240, "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl" )
call CreateNUnitsAtLoc( 1, 'Nklj', Player(PLAYER_NEUTRAL_PASSIVE), PolarProjectionBJ(GetRectCenter(gg_rct_selectDEMONLORD), 150.00, 135.00), 315.00 )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100, 100, 100, 60.00 )
call DisplayTextToForce( GetForceOfPlayer(udg_heropicker), "|cffc3dbff *** Your hero is a |c00CC0000RANGER|r|cffc3dbff hero. Please type -info for more information about it, e.g. items you can use etc." )
set udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)] = 100
set udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)] = 1
set udg_g_playercount[4] = ( udg_g_playercount[4] + 1 )
set udg_heropick[27] = false
set udg_heropicked[GetConvertedPlayerId(udg_heropicker)] = true
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemIconBJ( udg_gamestats, 1, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], "ReplaceableTextures\\CommandButtons\\BTNArchimonde.blp" )
call KillDestructable( gg_dest_DTfx_3027 )
if ( udg_mode_sm == true ) then
call SetHeroLevelBJ( gg_unit_Nklj_0240, 20, true )
else
call DoNothing( )
endif
call DisableTrigger( gg_trg_Demonlord_Off )
call DisableTrigger( gg_trg_Demonlord_On )
call DisableTrigger( gg_trg_Demonlord_Select )
endfunction
//===========================================================================
function InitTrig_Demonlord_Select takes nothing returns nothing
set gg_trg_Demonlord_Select = CreateTrigger( )
call DisableTrigger( gg_trg_Demonlord_Select )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Demonlord_Select, GetOwningPlayer(gg_unit_e001_0149), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Demonlord_Select, GetOwningPlayer(gg_unit_e001_0147), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Demonlord_Select, GetOwningPlayer(gg_unit_e001_0148), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Demonlord_Select, GetOwningPlayer(gg_unit_e001_0150), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Demonlord_Select, GetOwningPlayer(gg_unit_e001_0151), true )
call TriggerAddCondition( gg_trg_Demonlord_Select, Condition( function Trig_Demonlord_Select_Conditions ) )
call TriggerAddAction( gg_trg_Demonlord_Select, function Trig_Demonlord_Select_Actions )
endfunction
function Trig_Assassin_Select_Conditions takes nothing returns boolean
if ( not ( udg_heroboolean[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_Obla_0814 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_selectASSASSIN, udg_heroselecter[GetConvertedPlayerId(GetTriggerPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Assassin_Select_Actions takes nothing returns nothing
if ( udg_mode_ar == false ) then
set udg_heropicker = GetTriggerPlayer()
else
call DoNothing( )
endif
set udg_heroboolean[GetConvertedPlayerId(udg_heropicker)] = false
call RemoveUnit( udg_heroselecter[GetConvertedPlayerId(udg_heropicker)] )
call SetUnitPositionLoc( gg_unit_Obla_0814, GetRectCenter(gg_rct_gEvilRevive) )
call SetUnitOwner( gg_unit_Obla_0814, udg_heropicker, true )
call SetUnitAnimation( gg_unit_Obla_0814, "stand" )
call UnitRemoveAbilityBJ( 'Avul', gg_unit_Obla_0814 )
call SetPlayerName( udg_heropicker, ( GetPlayerName(udg_heropicker) + ( " (" + ( GetUnitName(gg_unit_Obla_0814) + ")" ) ) ) )
call PanCameraToTimedLocForPlayer( udg_heropicker, GetRectCenter(gg_rct_gEvilRevive), 1.00 )
call AddSpecialEffectTargetUnitBJ( "origin", gg_unit_Obla_0814, "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl" )
call CreateNUnitsAtLoc( 1, 'Obla', Player(PLAYER_NEUTRAL_PASSIVE), PolarProjectionBJ(GetRectCenter(gg_rct_selectASSASSIN), 150.00, 225.00), 45.00 )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100, 100, 100, 60.00 )
call DisplayTextToForce( GetForceOfPlayer(udg_heropicker), "|cffc3dbff *** Your hero is an |c00CC0000ASSASSIN|r.|cffc3dbff Please type -info for more information about it, e.g. items you can use etc." )
set udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)] = 100
set udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)] = 1
set udg_g_playercount[4] = ( udg_g_playercount[4] + 1 )
set udg_heropick[24] = false
set udg_heropicked[GetConvertedPlayerId(udg_heropicker)] = true
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemIconBJ( udg_gamestats, 1, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], "ReplaceableTextures\\CommandButtons\\BTNForestTroll.blp" )
call KillDestructable( gg_dest_DTfx_3030 )
if ( udg_mode_sm == true ) then
call SetHeroLevelBJ( gg_unit_Obla_0814, 20, true )
else
call DoNothing( )
endif
call DisableTrigger( gg_trg_Assassin_Off )
call DisableTrigger( gg_trg_Assassin_On )
call DisableTrigger( gg_trg_Assassin_Select )
endfunction
//===========================================================================
function InitTrig_Assassin_Select takes nothing returns nothing
set gg_trg_Assassin_Select = CreateTrigger( )
call DisableTrigger( gg_trg_Assassin_Select )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Assassin_Select, GetOwningPlayer(gg_unit_e001_0149), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Assassin_Select, GetOwningPlayer(gg_unit_e001_0147), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Assassin_Select, GetOwningPlayer(gg_unit_e001_0148), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Assassin_Select, GetOwningPlayer(gg_unit_e001_0150), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Assassin_Select, GetOwningPlayer(gg_unit_e001_0151), true )
call TriggerAddCondition( gg_trg_Assassin_Select, Condition( function Trig_Assassin_Select_Conditions ) )
call TriggerAddAction( gg_trg_Assassin_Select, function Trig_Assassin_Select_Actions )
endfunction
function Trig_Executor_Select_Conditions takes nothing returns boolean
if ( not ( udg_heroboolean[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_Opgh_0239 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_selectEXECUTOR, udg_heroselecter[GetConvertedPlayerId(GetTriggerPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Executor_Select_Actions takes nothing returns nothing
if ( udg_mode_ar == false ) then
set udg_heropicker = GetTriggerPlayer()
else
call DoNothing( )
endif
set udg_heroboolean[GetConvertedPlayerId(udg_heropicker)] = false
call RemoveUnit( udg_heroselecter[GetConvertedPlayerId(udg_heropicker)] )
call SetUnitPositionLoc( gg_unit_Opgh_0239, GetRectCenter(gg_rct_gEvilRevive) )
call SetUnitOwner( gg_unit_Opgh_0239, udg_heropicker, true )
call SetUnitAnimation( gg_unit_Opgh_0239, "stand" )
call UnitRemoveAbilityBJ( 'Avul', gg_unit_Opgh_0239 )
call SetPlayerName( udg_heropicker, ( GetPlayerName(udg_heropicker) + ( " (" + ( GetUnitName(gg_unit_Opgh_0239) + ")" ) ) ) )
call PanCameraToTimedLocForPlayer( udg_heropicker, GetRectCenter(gg_rct_gEvilRevive), 1.00 )
call AddSpecialEffectTargetUnitBJ( "origin", gg_unit_Opgh_0239, "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl" )
call CreateNUnitsAtLoc( 1, 'Opgh', Player(PLAYER_NEUTRAL_PASSIVE), PolarProjectionBJ(GetRectCenter(gg_rct_selectEXECUTOR), 150.00, 0.00), 180.00 )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100, 100, 100, 60.00 )
call DisplayTextToForce( GetForceOfPlayer(udg_heropicker), "|cffc3dbff *** Your hero is a |c00CC0000WARRIOR|r|cffc3dbff hero. Please type -info for more information about it, e.g. items you can use etc." )
set udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)] = 100
set udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)] = 1
set udg_g_playercount[4] = ( udg_g_playercount[4] + 1 )
set udg_heropick[20] = false
set udg_heropicked[GetConvertedPlayerId(udg_heropicker)] = true
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemIconBJ( udg_gamestats, 1, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], "ReplaceableTextures\\CommandButtons\\BTNChaosGrom.blp" )
call KillDestructable( gg_dest_DTfx_3031 )
if ( udg_mode_sm == true ) then
call SetHeroLevelBJ( gg_unit_Opgh_0239, 20, true )
else
call DoNothing( )
endif
call DisableTrigger( gg_trg_Executor_Off )
call DisableTrigger( gg_trg_Executor_On )
call DisableTrigger( gg_trg_Executor_Select )
endfunction
//===========================================================================
function InitTrig_Executor_Select takes nothing returns nothing
set gg_trg_Executor_Select = CreateTrigger( )
call DisableTrigger( gg_trg_Executor_Select )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Executor_Select, GetOwningPlayer(gg_unit_e001_0149), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Executor_Select, GetOwningPlayer(gg_unit_e001_0147), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Executor_Select, GetOwningPlayer(gg_unit_e001_0148), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Executor_Select, GetOwningPlayer(gg_unit_e001_0150), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Executor_Select, GetOwningPlayer(gg_unit_e001_0151), true )
call TriggerAddCondition( gg_trg_Executor_Select, Condition( function Trig_Executor_Select_Conditions ) )
call TriggerAddAction( gg_trg_Executor_Select, function Trig_Executor_Select_Actions )
endfunction
function Trig_Barbarian_Select_Conditions takes nothing returns boolean
if ( not ( udg_heroboolean[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_Nbst_0169 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_selectBARB, udg_heroselecter[GetConvertedPlayerId(GetTriggerPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Barbarian_Select_Actions takes nothing returns nothing
if ( udg_mode_ar == false ) then
set udg_heropicker = GetTriggerPlayer()
else
call DoNothing( )
endif
set udg_heroboolean[GetConvertedPlayerId(udg_heropicker)] = false
call RemoveUnit( udg_heroselecter[GetConvertedPlayerId(udg_heropicker)] )
call SetUnitPositionLoc( gg_unit_Nbst_0169, GetRectCenter(gg_rct_gEvilRevive) )
call SetUnitOwner( gg_unit_Nbst_0169, udg_heropicker, true )
call SetUnitAnimation( gg_unit_Nbst_0169, "stand" )
call UnitRemoveAbilityBJ( 'Avul', gg_unit_Nbst_0169 )
call SetPlayerName( udg_heropicker, ( GetPlayerName(udg_heropicker) + ( " (" + ( GetUnitName(gg_unit_Nbst_0169) + ")" ) ) ) )
call PanCameraToTimedLocForPlayer( udg_heropicker, GetRectCenter(gg_rct_gEvilRevive), 1.00 )
call AddSpecialEffectTargetUnitBJ( "origin", gg_unit_Nbst_0169, "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl" )
call CreateNUnitsAtLoc( 1, 'Nbst', Player(PLAYER_NEUTRAL_PASSIVE), PolarProjectionBJ(GetRectCenter(gg_rct_selectBARB), 150.00, 0.00), 180.00 )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100, 100, 100, 60.00 )
call DisplayTextToForce( GetForceOfPlayer(udg_heropicker), "|cffc3dbff *** Your hero is a |c00CC0000WARRIOR|r|cffc3dbff hero. Please type -info for more information about it, e.g. items you can use etc." )
set udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)] = 100
set udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)] = 1
set udg_g_playercount[4] = ( udg_g_playercount[4] + 1 )
set udg_heropick[21] = false
set udg_heropicked[GetConvertedPlayerId(udg_heropicker)] = true
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemIconBJ( udg_gamestats, 1, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], "ReplaceableTextures\\CommandButtons\\BTNBeastMaster.blp" )
call KillDestructable( gg_dest_DTfx_3032 )
if ( udg_mode_sm == true ) then
call SetHeroLevelBJ( gg_unit_Nbst_0169, 20, true )
else
call DoNothing( )
endif
call DisableTrigger( gg_trg_Barbarian_Off )
call DisableTrigger( gg_trg_Barbarian_On )
call DisableTrigger( gg_trg_Barbarian_Select )
endfunction
//===========================================================================
function InitTrig_Barbarian_Select takes nothing returns nothing
set gg_trg_Barbarian_Select = CreateTrigger( )
call DisableTrigger( gg_trg_Barbarian_Select )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Barbarian_Select, GetOwningPlayer(gg_unit_e001_0149), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Barbarian_Select, GetOwningPlayer(gg_unit_e001_0147), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Barbarian_Select, GetOwningPlayer(gg_unit_e001_0148), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Barbarian_Select, GetOwningPlayer(gg_unit_e001_0150), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Barbarian_Select, GetOwningPlayer(gg_unit_e001_0151), true )
call TriggerAddCondition( gg_trg_Barbarian_Select, Condition( function Trig_Barbarian_Select_Conditions ) )
call TriggerAddAction( gg_trg_Barbarian_Select, function Trig_Barbarian_Select_Actions )
endfunction
function Trig_Necro_Select_Conditions takes nothing returns boolean
if ( not ( udg_heroboolean[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_O000_0234 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_selectNECRO, udg_heroselecter[GetConvertedPlayerId(GetTriggerPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Necro_Select_Actions takes nothing returns nothing
if ( udg_mode_ar == false ) then
set udg_heropicker = GetTriggerPlayer()
else
call DoNothing( )
endif
set udg_heroboolean[GetConvertedPlayerId(udg_heropicker)] = false
call RemoveUnit( udg_heroselecter[GetConvertedPlayerId(udg_heropicker)] )
call SetUnitPositionLoc( gg_unit_O000_0234, GetRectCenter(gg_rct_gEvilRevive) )
call SetUnitOwner( gg_unit_O000_0234, udg_heropicker, true )
call SetUnitAnimation( gg_unit_O000_0234, "stand" )
call UnitRemoveAbilityBJ( 'Avul', gg_unit_O000_0234 )
call SetPlayerName( udg_heropicker, ( GetPlayerName(udg_heropicker) + ( " (" + ( GetUnitName(gg_unit_O000_0234) + ")" ) ) ) )
call PanCameraToTimedLocForPlayer( udg_heropicker, GetRectCenter(gg_rct_gEvilRevive), 1.00 )
call AddSpecialEffectTargetUnitBJ( "origin", gg_unit_O000_0234, "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl" )
call CreateNUnitsAtLoc( 1, 'O000', Player(PLAYER_NEUTRAL_PASSIVE), PolarProjectionBJ(GetRectCenter(gg_rct_selectNECRO), 150.00, 180.00), 0.00 )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100, 100, 100, 60.00 )
call DisplayTextToForce( GetForceOfPlayer(udg_heropicker), "|cffc3dbff *** Your hero is a |c00CC0000CASTER|r|cffc3dbff hero. Please type -info for more information about it, e.g. items you can use etc." )
set udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)] = 100
set udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)] = 1
set udg_g_playercount[4] = ( udg_g_playercount[4] + 1 )
set udg_heropick[25] = false
set udg_heropicked[GetConvertedPlayerId(udg_heropicker)] = true
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemIconBJ( udg_gamestats, 1, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], "ReplaceableTextures\\CommandButtons\\BTNOrcWarlock.tga" )
call KillDestructable( gg_dest_DTfx_3033 )
if ( udg_mode_sm == true ) then
call SetHeroLevelBJ( gg_unit_O000_0234, 20, true )
else
call DoNothing( )
endif
call DisableTrigger( gg_trg_Necro_Off )
call DisableTrigger( gg_trg_Necro_On )
call DisableTrigger( gg_trg_Necro_Select )
endfunction
//===========================================================================
function InitTrig_Necro_Select takes nothing returns nothing
set gg_trg_Necro_Select = CreateTrigger( )
call DisableTrigger( gg_trg_Necro_Select )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Necro_Select, GetOwningPlayer(gg_unit_e001_0149), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Necro_Select, GetOwningPlayer(gg_unit_e001_0147), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Necro_Select, GetOwningPlayer(gg_unit_e001_0148), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Necro_Select, GetOwningPlayer(gg_unit_e001_0150), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Necro_Select, GetOwningPlayer(gg_unit_e001_0151), true )
call TriggerAddCondition( gg_trg_Necro_Select, Condition( function Trig_Necro_Select_Conditions ) )
call TriggerAddAction( gg_trg_Necro_Select, function Trig_Necro_Select_Actions )
endfunction
function Trig_Alche_Select_Conditions takes nothing returns boolean
if ( not ( udg_heroboolean[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_H01C_0416 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_selectALCHEMIST, udg_heroselecter[GetConvertedPlayerId(GetTriggerPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Alche_Select_Actions takes nothing returns nothing
if ( udg_mode_ar == false ) then
set udg_heropicker = GetTriggerPlayer()
else
call DoNothing( )
endif
set udg_heroboolean[GetConvertedPlayerId(udg_heropicker)] = false
call RemoveUnit( udg_heroselecter[GetConvertedPlayerId(udg_heropicker)] )
call SetUnitPositionLoc( gg_unit_H01C_0416, GetRectCenter(gg_rct_gEvilRevive) )
call SetUnitAnimation( gg_unit_H01C_0416, "stand" )
call SetUnitOwner( gg_unit_H01C_0416, udg_heropicker, true )
call UnitRemoveAbilityBJ( 'Avul', gg_unit_H01C_0416 )
call SetPlayerName( udg_heropicker, ( GetPlayerName(udg_heropicker) + ( " (" + ( GetUnitName(gg_unit_H01C_0416) + ")" ) ) ) )
call PanCameraToTimedLocForPlayer( udg_heropicker, GetRectCenter(gg_rct_gEvilRevive), 1.00 )
call AddSpecialEffectTargetUnitBJ( "origin", gg_unit_H01C_0416, "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl" )
call CreateNUnitsAtLoc( 1, 'H01C', Player(PLAYER_NEUTRAL_PASSIVE), PolarProjectionBJ(GetRectCenter(gg_rct_selectALCHEMIST), 150.00, 315.00), 135.00 )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100, 100, 100, 60.00 )
call DisplayTextToForce( GetForceOfPlayer(udg_heropicker), "|cffc3dbff *** Your hero is a |c00CC0000WARRIOR|r|cffc3dbff hero. Please type -info for more information about it, e.g. items you can use etc." )
set udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)] = 100
set udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)] = 1
set udg_g_playercount[4] = ( udg_g_playercount[4] + 1 )
set udg_heropick[12] = false
set udg_heropicked[GetConvertedPlayerId(udg_heropicker)] = true
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemIconBJ( udg_gamestats, 1, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], "ReplaceableTextures\\CommandButtons\\BTNHeroAlchemist.blp" )
call KillDestructable( gg_dest_DTfx_1431 )
if ( udg_mode_sm == true ) then
call SetHeroLevelBJ( gg_unit_H01C_0416, 20, true )
else
call DoNothing( )
endif
call DisableTrigger( gg_trg_Alche_Select )
call DisableTrigger( gg_trg_Alche_Off )
call DisableTrigger( gg_trg_Alche_On )
endfunction
//===========================================================================
function InitTrig_Alche_Select takes nothing returns nothing
set gg_trg_Alche_Select = CreateTrigger( )
call DisableTrigger( gg_trg_Alche_Select )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Alche_Select, GetOwningPlayer(gg_unit_e001_0149), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Alche_Select, GetOwningPlayer(gg_unit_e001_0147), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Alche_Select, GetOwningPlayer(gg_unit_e001_0148), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Alche_Select, GetOwningPlayer(gg_unit_e001_0150), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Alche_Select, GetOwningPlayer(gg_unit_e001_0151), true )
call TriggerAddCondition( gg_trg_Alche_Select, Condition( function Trig_Alche_Select_Conditions ) )
call TriggerAddAction( gg_trg_Alche_Select, function Trig_Alche_Select_Actions )
endfunction
function Trig_Troll_Select_Conditions takes nothing returns boolean
if ( not ( udg_heroboolean[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_Oshd_0422 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_selectTROLLSHAM, udg_heroselecter[GetConvertedPlayerId(GetTriggerPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Select_Actions takes nothing returns nothing
if ( udg_mode_ar == false ) then
set udg_heropicker = GetTriggerPlayer()
else
call DoNothing( )
endif
set udg_heroboolean[GetConvertedPlayerId(udg_heropicker)] = false
call RemoveUnit( udg_heroselecter[GetConvertedPlayerId(udg_heropicker)] )
call SetUnitPositionLoc( gg_unit_Oshd_0422, GetRectCenter(gg_rct_gEvilRevive) )
call SetUnitAnimation( gg_unit_Oshd_0422, "stand" )
call SetUnitOwner( gg_unit_Oshd_0422, udg_heropicker, true )
call UnitRemoveAbilityBJ( 'Avul', gg_unit_Oshd_0422 )
call SetPlayerName( udg_heropicker, ( GetPlayerName(udg_heropicker) + ( " (" + ( GetUnitName(gg_unit_Oshd_0422) + ")" ) ) ) )
call PanCameraToTimedLocForPlayer( udg_heropicker, GetRectCenter(gg_rct_gEvilRevive), 1.00 )
call AddSpecialEffectTargetUnitBJ( "origin", gg_unit_Oshd_0422, "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl" )
call CreateNUnitsAtLoc( 1, 'Oshd', Player(PLAYER_NEUTRAL_PASSIVE), PolarProjectionBJ(GetRectCenter(gg_rct_selectTROLLSHAM), 150.00, 270.00), 90.00 )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100, 100, 100, 60.00 )
call DisplayTextToForce( GetForceOfPlayer(udg_heropicker), "|cffc3dbff *** Your hero is a |c00CC0000RANGER|r|cffc3dbff hero. Please type -info for more information about it, e.g. items you can use etc." )
set udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)] = 100
set udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)] = 1
set udg_g_playercount[4] = ( udg_g_playercount[4] + 1 )
set udg_heropick[23] = false
set udg_heropicked[GetConvertedPlayerId(udg_heropicker)] = true
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemIconBJ( udg_gamestats, 1, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], "ReplaceableTextures\\CommandButtons\\BTNShadowHunter.blp" )
call KillDestructable( gg_dest_DTfx_4169 )
if ( udg_mode_sm == true ) then
call SetHeroLevelBJ( gg_unit_Oshd_0422, 20, true )
else
call DoNothing( )
endif
call DisableTrigger( gg_trg_Troll_Off )
call DisableTrigger( gg_trg_Troll_On )
call DisableTrigger( gg_trg_Troll_Select )
endfunction
//===========================================================================
function InitTrig_Troll_Select takes nothing returns nothing
set gg_trg_Troll_Select = CreateTrigger( )
call DisableTrigger( gg_trg_Troll_Select )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Troll_Select, GetOwningPlayer(gg_unit_e001_0149), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Troll_Select, GetOwningPlayer(gg_unit_e001_0147), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Troll_Select, GetOwningPlayer(gg_unit_e001_0148), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Troll_Select, GetOwningPlayer(gg_unit_e001_0150), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Troll_Select, GetOwningPlayer(gg_unit_e001_0151), true )
call TriggerAddCondition( gg_trg_Troll_Select, Condition( function Trig_Troll_Select_Conditions ) )
call TriggerAddAction( gg_trg_Troll_Select, function Trig_Troll_Select_Actions )
endfunction
function Trig_Troll_Ranger_Select_Conditions takes nothing returns boolean
if ( not ( udg_heroboolean[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_E002_0162 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_selectTROLLRANGER, udg_heroselecter[GetConvertedPlayerId(GetTriggerPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Ranger_Select_Actions takes nothing returns nothing
if ( udg_mode_ar == false ) then
set udg_heropicker = GetTriggerPlayer()
else
call DoNothing( )
endif
set udg_heroboolean[GetConvertedPlayerId(udg_heropicker)] = false
call RemoveUnit( udg_heroselecter[GetConvertedPlayerId(udg_heropicker)] )
call SetUnitPositionLoc( gg_unit_E002_0162, GetRectCenter(gg_rct_gEvilRevive) )
call SetUnitAnimation( gg_unit_E002_0162, "stand" )
call SetUnitOwner( gg_unit_E002_0162, udg_heropicker, true )
call UnitRemoveAbilityBJ( 'Avul', gg_unit_E002_0162 )
call SetPlayerName( udg_heropicker, ( GetPlayerName(udg_heropicker) + ( " (" + ( GetUnitName(gg_unit_E002_0162) + ")" ) ) ) )
call PanCameraToTimedLocForPlayer( udg_heropicker, GetRectCenter(gg_rct_gEvilRevive), 1.00 )
call AddSpecialEffectTargetUnitBJ( "origin", gg_unit_E002_0162, "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl" )
call CreateNUnitsAtLoc( 1, 'E002', Player(PLAYER_NEUTRAL_PASSIVE), PolarProjectionBJ(GetRectCenter(gg_rct_selectTROLLRANGER), 150.00, 270.00), 90.00 )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100, 100, 100, 60.00 )
call DisplayTextToForce( GetForceOfPlayer(udg_heropicker), "|cffc3dbff *** Your hero is a |c00CC0000RANGER|r|cffc3dbff hero. Please type -info for more information about it, e.g. items you can use etc." )
set udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)] = 100
set udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)] = 1
set udg_g_playercount[4] = ( udg_g_playercount[4] + 1 )
set udg_heropick[29] = false
set udg_heropicked[GetConvertedPlayerId(udg_heropicker)] = true
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemIconBJ( udg_gamestats, 1, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], "ReplaceableTextures\\CommandButtons\\BTNHeadHunterBerserker.blp" )
call KillDestructable( gg_dest_DTfx_6941 )
if ( udg_mode_sm == true ) then
call SetHeroLevelBJ( gg_unit_E002_0162, 20, true )
else
call DoNothing( )
endif
call DisableTrigger( gg_trg_Troll_Ranger_Off )
call DisableTrigger( gg_trg_Troll_Ranger_On )
call DisableTrigger( gg_trg_Troll_Ranger_Select )
endfunction
//===========================================================================
function InitTrig_Troll_Ranger_Select takes nothing returns nothing
set gg_trg_Troll_Ranger_Select = CreateTrigger( )
call DisableTrigger( gg_trg_Troll_Ranger_Select )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Troll_Ranger_Select, GetOwningPlayer(gg_unit_e001_0149), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Troll_Ranger_Select, GetOwningPlayer(gg_unit_e001_0147), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Troll_Ranger_Select, GetOwningPlayer(gg_unit_e001_0148), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Troll_Ranger_Select, GetOwningPlayer(gg_unit_e001_0150), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Troll_Ranger_Select, GetOwningPlayer(gg_unit_e001_0151), true )
call TriggerAddCondition( gg_trg_Troll_Ranger_Select, Condition( function Trig_Troll_Ranger_Select_Conditions ) )
call TriggerAddAction( gg_trg_Troll_Ranger_Select, function Trig_Troll_Ranger_Select_Actions )
endfunction
function Trig_Netherlord_Select_Conditions takes nothing returns boolean
if ( not ( udg_heroboolean[GetConvertedPlayerId(GetTriggerPlayer())] == true ) ) then
return false
endif
if ( not ( GetTriggerUnit() == gg_unit_E00S_0823 ) ) then
return false
endif
if ( not ( RectContainsUnit(gg_rct_selectNETHERLORD, udg_heroselecter[GetConvertedPlayerId(GetTriggerPlayer())]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Netherlord_Select_Actions takes nothing returns nothing
if ( udg_mode_ar == false ) then
set udg_heropicker = GetTriggerPlayer()
else
call DoNothing( )
endif
set udg_heroboolean[GetConvertedPlayerId(udg_heropicker)] = false
call RemoveUnit( udg_heroselecter[GetConvertedPlayerId(udg_heropicker)] )
call SetUnitPositionLoc( gg_unit_E00S_0823, GetRectCenter(gg_rct_gEvilRevive) )
call SetUnitOwner( gg_unit_E00S_0823, udg_heropicker, true )
call SetUnitAnimation( gg_unit_E00S_0823, "stand" )
call UnitRemoveAbilityBJ( 'Avul', gg_unit_E00S_0823 )
call SetPlayerName( udg_heropicker, ( GetPlayerName(udg_heropicker) + ( " (" + ( GetUnitName(gg_unit_E00S_0823) + ")" ) ) ) )
call PanCameraToTimedLocForPlayer( udg_heropicker, GetRectCenter(gg_rct_gEvilRevive), 1.00 )
call AddSpecialEffectTargetUnitBJ( "origin", gg_unit_E00S_0823, "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl" )
call CreateNUnitsAtLoc( 1, 'E00S', Player(PLAYER_NEUTRAL_PASSIVE), PolarProjectionBJ(GetRectCenter(gg_rct_selectNETHERLORD), 150.00, 90.00), 270.00 )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100, 100, 100, 60.00 )
call DisplayTextToForce( GetForceOfPlayer(udg_heropicker), "|cffc3dbff *** Your hero is a |c00CC0000CASTER|r|cffc3dbff hero. Please type -info for more information about it, e.g. items you can use etc." )
set udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)] = 100
set udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)] = 1
set udg_g_playercount[4] = ( udg_g_playercount[4] + 1 )
set udg_heropick[25] = false
set udg_heropicked[GetConvertedPlayerId(udg_heropicker)] = true
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_vargold[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], I2S(udg_Board_varlevel[GetConvertedPlayerId(udg_heropicker)]) )
call MultiboardSetItemIconBJ( udg_gamestats, 1, udg_multiboardrow[GetConvertedPlayerId(udg_heropicker)], "ReplaceableTextures\\CommandButtons\\BTNMetamorphosis.blp" )
call KillDestructable( gg_dest_DTfx_3033 )
if ( udg_mode_sm == true ) then
call SetHeroLevelBJ( gg_unit_E00S_0823, 20, true )
else
call DoNothing( )
endif
call DisableTrigger( gg_trg_Netherlord_Off )
call DisableTrigger( gg_trg_Netherlord_On )
call DisableTrigger( gg_trg_Netherlord_Select )
endfunction
//===========================================================================
function InitTrig_Netherlord_Select takes nothing returns nothing
set gg_trg_Netherlord_Select = CreateTrigger( )
call DisableTrigger( gg_trg_Netherlord_Select )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Netherlord_Select, GetOwningPlayer(gg_unit_e001_0149), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Netherlord_Select, GetOwningPlayer(gg_unit_e001_0147), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Netherlord_Select, GetOwningPlayer(gg_unit_e001_0148), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Netherlord_Select, GetOwningPlayer(gg_unit_e001_0150), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Netherlord_Select, GetOwningPlayer(gg_unit_e001_0151), true )
call TriggerAddCondition( gg_trg_Netherlord_Select, Condition( function Trig_Netherlord_Select_Conditions ) )
call TriggerAddAction( gg_trg_Netherlord_Select, function Trig_Netherlord_Select_Actions )
endfunction
function Trig_Banner_Remove_SFX_Func003C takes nothing returns boolean
if ( ( GetDestructableTypeId(GetDyingDestructable()) == 'B000' ) ) then
return true
endif
if ( ( GetDestructableTypeId(GetDyingDestructable()) == 'B001' ) ) then
return true
endif
return false
endfunction
function Trig_Banner_Remove_SFX_Conditions takes nothing returns boolean
if ( not Trig_Banner_Remove_SFX_Func003C() ) then
return false
endif
return true
endfunction
function Trig_Banner_Remove_SFX_Actions takes nothing returns nothing
local location loc
set loc = GetDestructableLoc(GetDyingDestructable())
call AddSpecialEffectLocBJ( loc, "Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl" )
call RemoveDestructable( GetDyingDestructable() )
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Banner_Remove_SFX takes nothing returns nothing
set gg_trg_Banner_Remove_SFX = CreateTrigger( )
call TriggerRegisterDestDeathInRegionEvent( gg_trg_Banner_Remove_SFX, GetPlayableMapRect() )
call TriggerAddCondition( gg_trg_Banner_Remove_SFX, Condition( function Trig_Banner_Remove_SFX_Conditions ) )
call TriggerAddAction( gg_trg_Banner_Remove_SFX, function Trig_Banner_Remove_SFX_Actions )
endfunction
function revivecreep takes integer index, real waittime returns nothing
call TriggerSleepAction( waittime )
call CreateNUnitsAtLoc( 1, udg_creeptype[index], Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_creepposi[index], GetRandomReal(0, 360.00) )
endfunction
function Trig_Creep_Revive_Test_Actions takes nothing returns nothing
local integer i = 0
local integer creeptype = GetUnitTypeId(GetDyingUnit())
local integer creeplevel = GetUnitLevel( GetDyingUnit())
local unit dyingcreep = GetDyingUnit()
local real wait = ( 60.00 + ( ( 6.00 * I2R(creeplevel) ) + GetRandomReal(0, 30.00) ) )
local integer index = GetCreepIndex(GetDyingUnit())
call revivecreep( index, wait)
endfunction
//===========================================================================
function InitTrig_Creep_Revive_Test takes nothing returns nothing
set gg_trg_Creep_Revive_Test = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Creep_Revive_Test, Player(PLAYER_NEUTRAL_AGGRESSIVE), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Creep_Revive_Test, function Trig_Creep_Revive_Test_Actions )
endfunction
function Trig_Fischerdorf_Ende_Func022C takes nothing returns boolean
if ( ( GetDyingUnit() == udg_g_genericunit[33] ) ) then
return true
endif
if ( ( GetDyingUnit() == udg_g_genericunit[34] ) ) then
return true
endif
return false
endfunction
function Trig_Fischerdorf_Ende_Conditions takes nothing returns boolean
if ( not Trig_Fischerdorf_Ende_Func022C() ) then
return false
endif
if ( not ( IsUnitAliveBJ(udg_g_genericunit[33]) == false ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(udg_g_genericunit[34]) == false ) ) then
return false
endif
return true
endfunction
function Trig_Fischerdorf_Ende_Func017002 takes nothing returns nothing
call UnitAddAbilityBJ( 'Aloc', GetEnumUnit() )
call SetUnitVertexColorBJ( GetEnumUnit(), 100, 100, 100, 100.00 )
endfunction
function Trig_Fischerdorf_Ende_Func019Func001002 takes nothing returns nothing
call SetUnitVertexColorBJ( GetEnumUnit(), 100, 100, 100, udg_g_genericreal[14] )
endfunction
function Trig_Fischerdorf_Ende_Actions takes nothing returns nothing
local location loc
set loc = PolarProjectionBJ(GetRectCenter(gg_rct_randomeventMORGOTHCENTRE), 150.00, 190.00)
call CreateNUnitsAtLoc( 1, 'nvl2', Player(PLAYER_NEUTRAL_PASSIVE), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_dorfgruppe )
set loc = PolarProjectionBJ(GetUnitLoc(GetLastCreatedUnit()), 150.00, 180.00)
call CreateTextTagLocBJ( "Now our souls may rest in peace.", loc, 75.00, 10, 100, 100, 100, 0 )
call SetTextTagPermanentBJ( GetLastCreatedTextTag(), false )
call SetTextTagLifespanBJ( GetLastCreatedTextTag(), 15.00 )
set loc = PolarProjectionBJ(GetRectCenter(gg_rct_randomeventMORGOTHCENTRE), 200.00, 110.00)
call CreateNUnitsAtLoc( 1, 'nvil', Player(PLAYER_NEUTRAL_PASSIVE), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_dorfgruppe )
set loc = PolarProjectionBJ(GetRectCenter(gg_rct_randomeventMORGOTHCENTRE), 150.00, 100.00)
call CreateNUnitsAtLoc( 1, 'nvlw', Player(PLAYER_NEUTRAL_PASSIVE), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_dorfgruppe )
set loc = PolarProjectionBJ(GetRectCenter(gg_rct_randomeventMORGOTHCENTRE), 175.00, 45.00)
call CreateNUnitsAtLoc( 1, 'nvlw', Player(PLAYER_NEUTRAL_PASSIVE), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_dorfgruppe )
set loc = PolarProjectionBJ(GetUnitLoc(GetLastCreatedUnit()), 100.00, 180.00)
call CreateTextTagLocBJ( "Thank you so much!", loc, 75.00, 10, 100, 100, 100, 0 )
call SetTextTagPermanentBJ( GetLastCreatedTextTag(), false )
call SetTextTagLifespanBJ( GetLastCreatedTextTag(), 15.00 )
set loc = GetRectCenter(gg_rct_randomeventMORGOTHCENTRE)
call CreateNUnitsAtLoc( 1, 'nvlk', Player(PLAYER_NEUTRAL_PASSIVE), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_dorfgruppe )
call ForGroupBJ( udg_dorfgruppe, function Trig_Fischerdorf_Ende_Func017002 )
set udg_g_genericreal[14] = 0.00
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call ForGroupBJ( udg_dorfgruppe, function Trig_Fischerdorf_Ende_Func019Func001002 )
set udg_g_genericreal[14] = ( udg_g_genericreal[14] + 5.00 )
call TriggerSleepAction( 0.10 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerSleepAction( 15.00 )
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 5
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
set udg_g_genericunit[37] = GroupPickRandomUnit(udg_dorfgruppe)
set udg_g_genericreal[14] = 50.00
call GroupRemoveUnitSimple( udg_g_genericunit[37], udg_dorfgruppe )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_g_genericreal[14] = ( udg_g_genericreal[14] + 5.00 )
call SetUnitVertexColorBJ( udg_g_genericunit[37], 100, 100, 100, udg_g_genericreal[14] )
call TriggerSleepAction( 0.02 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveUnit( udg_g_genericunit[37] )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Fischerdorf_Ende takes nothing returns nothing
set gg_trg_Fischerdorf_Ende = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Fischerdorf_Ende, Player(PLAYER_NEUTRAL_AGGRESSIVE), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Fischerdorf_Ende, Condition( function Trig_Fischerdorf_Ende_Conditions ) )
call TriggerAddAction( gg_trg_Fischerdorf_Ende, function Trig_Fischerdorf_Ende_Actions )
endfunction
function Trig_Enchant_Absorption_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AN' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Absorption_Cloak takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00U' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I051' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Absorption_Arcanistcrown takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I020' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I061' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Absorption_Azsharashell takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02Z' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06A' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Absorption_Depthlordgaze takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02Y' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06I' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Absorption_Gnollbelt takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02I' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06Q' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Absorption_Guardianhelm takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02V' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06U' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Absorption_Guardianmail takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02U' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06W' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Absorption_Wrathhelm takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04G' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09D' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Absorption_Kilmondmask takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02K' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I075' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Absorption_Runnercap takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00D' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07M' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Absorption_Sirenwings takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I031' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07U' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Absorption_Stalkercap takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04D' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I085' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Absorption_Nethercloak takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04E' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08D' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Absorption_Lotharhelm takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00M' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08S' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Absorption_Schild takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AK' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AM' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Absorption_Leggings takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AN' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AP' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Absorption_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Absorption_Leggings() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00W') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0AO', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Absorption_Schild() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00W') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0AL', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Absorption_Lotharhelm() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00W') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08R', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Absorption_Nethercloak() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00W') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08C', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Absorption_Stalkercap() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00W') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I084', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Absorption_Sirenwings() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00W') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07T', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Absorption_Runnercap() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00W') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07L', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Absorption_Kilmondmask() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00W') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I076', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Absorption_Wrathhelm() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00W') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I09C', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Absorption_Guardianmail() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00W') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06V', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Absorption_Guardianhelm() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00W') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06T', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Absorption_Gnollbelt() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00W') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06P', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Absorption_Cloak() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00W') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I050', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Absorption_Arcanistcrown() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00W') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I060', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Absorption_Azsharashell() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00W') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I069', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Absorption_Depthlordgaze() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00W') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06J', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Absorption takes nothing returns nothing
set gg_trg_Enchant_Absorption = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Absorption, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Absorption, Condition( function Trig_Enchant_Absorption_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Absorption, function Trig_Enchant_Absorption_Actions )
endfunction
function Trig_Enchant_Agility_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0B2' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Agility_Ring takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I018' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05J' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05H' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05L' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05K' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05I' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Agility_Entropy takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I01Y' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07B' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I078' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07C' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07A' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I079' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Agility_Rage takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I049' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07E' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07F' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07G' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07H' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07I' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Agility_Runner takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I008' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07R' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07P' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07S' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07Q' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07O' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Agility_Stalker takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04I' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07Z' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07X' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07Y' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07W' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I080' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Agility_Windrunner takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I03P' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I090' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08Y' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I091' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08W' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08Z' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Agility_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Agility_Windrunner() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I038') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08X', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Agility_Stalker() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I038') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07V', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Agility_Runner() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I038') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07N', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Agility_Rage() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I038') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07D', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Agility_Entropy() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I038') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I077', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Agility_Ring() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I038') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05G', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Agility takes nothing returns nothing
set gg_trg_Enchant_Agility = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Agility, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Agility, Condition( function Trig_Enchant_Agility_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Agility, function Trig_Enchant_Agility_Actions )
endfunction
function Trig_Enchant_Celerity_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0BF' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Celerity_Boots takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I03E' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04Y' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0B5' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Celerity_Arcanist takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05P' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I034' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AZ' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Celerity_Ranger takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00B' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05Q' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0B1' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Celerity_Gnoll takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02H' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05R' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AY' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Celerity_Guardian takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02W' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05S' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0B0' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Celerity_Wrath takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I03R' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05T' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0B3' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Celerity_Stalker takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04C' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05U' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0B2' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Celerity_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Celerity_Boots() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09K') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I09L', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Celerity_Arcanist() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09K') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I09Q', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Celerity_Ranger() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09K') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I09V', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Celerity_Gnoll() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09K') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I09X', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Celerity_Guardian() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09K') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I09Z', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Celerity_Wrath() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09K') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0A2', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Celerity_Stalker() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09K') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0A5', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Celerity takes nothing returns nothing
set gg_trg_Enchant_Celerity = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Celerity, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Celerity, Condition( function Trig_Enchant_Celerity_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Celerity, function Trig_Enchant_Celerity_Actions )
endfunction
function Trig_Enchant_Combustion_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A000' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Combustion_Gloves takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I01A' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I057' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I058' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Combustion_Kilmond takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06Y' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02L' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06Z' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Combustion_Alleria takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I03O' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05O' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I088' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Combustion_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Combustion_Alleria() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I0B4') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0B8', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Combustion_Kilmond() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I0B4') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0B7', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Combustion_Gloves() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I0B4') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0B6', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Combustion takes nothing returns nothing
set gg_trg_Enchant_Combustion = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Combustion, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Combustion, Condition( function Trig_Enchant_Combustion_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Combustion, function Trig_Enchant_Combustion_Actions )
endfunction
function Trig_Enchant_Cunning_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AX' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Cunning_Amulet takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I03A' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I052' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04W' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04X' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I053' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Cunning_Azshara takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I033' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05Z' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05W' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05X' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05Y' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Cunning_Depthlord takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02C' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06L' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06M' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06N' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06O' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Cunning_Kilmond takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I032' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I071' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I072' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I073' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I074' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Cunning_Eye takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I044' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08N' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08L' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08J' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08M' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Cunning_Firestone takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I01U' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I096' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I093' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I094' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I095' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Cunning_Tharifas takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00P' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I099' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09A' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09B' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I098' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Cunning_ShadowOrb takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AS' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AT' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AU' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AV' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AW' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Cunning_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Cunning_ShadowOrb() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01D') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0AQ', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Cunning_Tharifas() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01D') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I097', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Cunning_Firestone() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01D') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I092', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Cunning_Eye() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01D') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08K', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Cunning_Kilmond() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01D') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I070', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Cunning_Depthlord() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01D') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06K', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Cunning_Azshara() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01D') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05V', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Cunning_Amulet() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01D') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I04U', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Cunning takes nothing returns nothing
set gg_trg_Enchant_Cunning = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Cunning, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Cunning, Condition( function Trig_Enchant_Cunning_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Cunning, function Trig_Enchant_Cunning_Actions )
endfunction
function Trig_Enchant_Deadlypoison_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0BE' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Deadlypoison_Sword takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00C' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04T' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00S' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04V' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09O' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Deadlypoison_Stalkerblade takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04B' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I083' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I081' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I082' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0A3' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Deadlypoison_Hungering takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AA' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AB' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AC' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AD' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AF' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Deadlypoison_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Deadlypoison_Hungering() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09J') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0AE', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Deadlypoison_Sword() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09J') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I09S', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Deadlypoison_Stalkerblade() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09J') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0A4', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Deadlypoison takes nothing returns nothing
set gg_trg_Enchant_Deadlypoison = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Deadlypoison, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Deadlypoison, Condition( function Trig_Enchant_Deadlypoison_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Deadlypoison, function Trig_Enchant_Deadlypoison_Actions )
endfunction
function Trig_Enchant_Defence_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AT' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Defence_Cuirasse takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00A' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I056' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I055' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Defence_Wrath takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04H' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06G' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06F' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Defence_Mithril takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I022' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08V' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08U' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Defence_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Defence_Mithril() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04M') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08T', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Defence_Wrath() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04M') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06E', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Defence_Cuirasse() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04M') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I054', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Defence takes nothing returns nothing
set gg_trg_Enchant_Defence = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Defence, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Defence, Condition( function Trig_Enchant_Defence_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Defence, function Trig_Enchant_Defence_Actions )
endfunction
function Trig_Enchant_Dexterity_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AV' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Dexterity_Gloves takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I01A' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I058' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0B6' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Dexterity_Kilmond takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06Y' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06Z' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0B7' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Dexterity_Alleria takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I03O' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I088' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0B8' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Dexterity_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Dexterity_Alleria() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04N') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05O', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Dexterity_Kilmond() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04N') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I02L', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Dexterity_Gloves() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04N') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I057', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Dexterity takes nothing returns nothing
set gg_trg_Enchant_Dexterity = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Dexterity, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Dexterity, Condition( function Trig_Enchant_Dexterity_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Dexterity, function Trig_Enchant_Dexterity_Actions )
endfunction
function Trig_Enchant_Endurance_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0B3' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Endurance_Ring takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I018' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05G' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05H' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05L' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05K' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05I' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Endurance_Entropy takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I01Y' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I077' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I078' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07C' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07A' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I079' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Endurance_Rage takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I049' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07D' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07F' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07G' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07H' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07I' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Endurance_Runner takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I008' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07N' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07P' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07S' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07Q' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07O' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Endurance_Stalker takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04I' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07V' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07X' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07Y' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07W' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I080' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Endurance_Windrunner takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I03P' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08X' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08Y' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I091' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08W' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08Z' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Endurance_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Endurance_Windrunner() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I03D') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I090', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Endurance_Stalker() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I03D') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07Z', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Endurance_Runner() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I03D') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07R', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Endurance_Rage() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I03D') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07E', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Endurance_Entropy() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I03D') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07B', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Endurance_Ring() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I03D') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05J', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Endurance takes nothing returns nothing
set gg_trg_Enchant_Endurance = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Endurance, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Endurance, Condition( function Trig_Enchant_Endurance_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Endurance, function Trig_Enchant_Endurance_Actions )
endfunction
function Trig_Enchant_Essence_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AY' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Essence_Amulet takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I03A' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04U' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04W' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04X' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I053' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Essence_Azshara takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I033' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05V' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05W' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05X' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05Y' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Essence_Depthlord takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02C' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06K' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06M' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06N' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06O' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Essence_Kilmond takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I032' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I070' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I072' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I073' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I074' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Essence_Eye takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I044' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08K' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08L' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08J' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08M' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Essence_Firestone takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I01U' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I092' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I093' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I094' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I095' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Essence_ShadowOrb takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AS' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AQ' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AT' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AU' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AV' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Essence_Tharifas takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00P' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I097' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09A' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09B' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I098' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Essence_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Essence_Tharifas() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I017') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I099', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Essence_ShadowOrb() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I017') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0AW', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Essence_Firestone() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I017') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I096', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Essence_Eye() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I017') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08N', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Essence_Kilmond() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I017') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I071', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Essence_Depthlord() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I017') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06L', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Essence_Azshara() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I017') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05Z', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Essence_Amulet() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I017') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I052', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Essence takes nothing returns nothing
set gg_trg_Enchant_Essence = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Essence, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Essence, Condition( function Trig_Enchant_Essence_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Essence, function Trig_Enchant_Essence_Actions )
endfunction
function Trig_Enchant_Fieryweapon_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0B8' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Fieryweapon_Berserker takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04F' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06C' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09U' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Fieryweapon_Sword takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00C' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00S' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04V' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09S' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09O' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Fieryweapon_Stalker takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04B' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I081' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I082' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0A3' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0A3' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Fieryweapon_Blackhand takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00R' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08A' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0A7' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Fieryweapon_Doombringer takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04R' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08E' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0A8' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Fieryweapon_Hungering takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AA' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AB' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AC' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AD' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AE' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Fieryweapon_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Fieryweapon_Hungering() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I016') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0AF', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Fieryweapon_Doombringer() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I016') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08F', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Fieryweapon_Blackhand() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I016') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08B', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Fieryweapon_Stalker() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I016') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I083', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Fieryweapon_Sword() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I016') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I04T', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Fieryweapon_Berserker() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I016') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06D', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Fieryweapon takes nothing returns nothing
set gg_trg_Enchant_Fieryweapon = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Fieryweapon, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Fieryweapon, Condition( function Trig_Enchant_Fieryweapon_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Fieryweapon, function Trig_Enchant_Fieryweapon_Actions )
endfunction
function Trig_Enchant_Gimpact_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0BD' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Gimpact_Sword takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00C' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04T' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04V' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00S' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09S' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Gimpact_Staff takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I015' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05F' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05E' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I063' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Gimpact_Arcanistwand takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I01Z' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I068' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I067' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I066' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Gimpact_Berserkermace takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06D' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04F' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06C' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Gimpact_Stalkerblade takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04B' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I083' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I082' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0A4' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I081' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Gimpact_Blackhands takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00R' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08B' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08A' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Gimpact_Doomhammers takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04R' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08F' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08E' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Gimpact_Nerzhul takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02N' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05M' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05N' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09E' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Gimpact_Azshara takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I030' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06B' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Gimpact_Composition takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00E' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06H' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Gimpact_Bow takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I012' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04Z' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Gimpact_Halendor takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02Q' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08I' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Gimpact_Gnoll takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02J' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06R' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Gimpact_Crossbow takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04S' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I089' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Gimpact_Halberd takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02X' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06S' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Gimpact_Kilmond takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02D' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06X' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Gimpact_Hungering takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AA' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AB' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AD' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AE' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AF' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Gimpact_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Gimpact_Hungering() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09I') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0AC', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Gimpact_Kilmond() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09I') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0A1', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Gimpact_Halberd() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09I') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0A0', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Gimpact_Crossbow() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09I') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0A6', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Gimpact_Gnoll() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09I') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I09Y', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Gimpact_Halendor() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09I') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0A9', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Gimpact_Composition() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09I') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I09W', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Gimpact_Azshara() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09I') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I09T', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Gimpact_Nerzhul() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09I') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I09P', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Gimpact_Sword() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09I') )
call CreateItemLoc( 'I09O', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
call RemoveItem( targetitem )
else
call DoNothing( )
endif
if ( Trig_Enchant_Gimpact_Bow() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09I') )
call CreateItemLoc( 'I09M', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
call RemoveItem( targetitem )
else
call DoNothing( )
endif
if ( Trig_Enchant_Gimpact_Staff() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09I') )
call CreateItemLoc( 'I09N', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
call RemoveItem( targetitem )
else
call DoNothing( )
endif
if ( Trig_Enchant_Gimpact_Arcanistwand() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09I') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I09R', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Gimpact_Berserkermace() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09I') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I09U', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Gimpact_Stalkerblade() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09I') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0A3', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Gimpact_Blackhands() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09I') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0A7', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Gimpact_Doomhammers() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I09I') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0A8', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Gimpact takes nothing returns nothing
set gg_trg_Enchant_Gimpact = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Gimpact, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Gimpact, Condition( function Trig_Enchant_Gimpact_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Gimpact, function Trig_Enchant_Gimpact_Actions )
endfunction
function Trig_Enchant_Impact_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A09C' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Impact_Sword takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00C' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04T' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04V' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09O' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09S' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Impact_Staff takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I015' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05F' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05E' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09N' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Impact_Arcanistwand takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I01Z' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I068' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I067' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09R' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Impact_Berserkermace takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06D' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04F' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09U' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Impact_Stalkerblade takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04B' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I083' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I082' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0A4' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0A3' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Impact_Blackhands takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00R' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08B' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0A7' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Impact_Doomhammers takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04R' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08F' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0A8' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Impact_Nerzhul takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02N' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05M' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05N' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09P' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Impact_Azshara takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I030' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09T' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Impact_Composition takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00E' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09W' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Impact_Bow takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I012' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09M' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Impact_Halendor takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02Q' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0A9' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Impact_Gnoll takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02J' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09Y' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Impact_Crossbow takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04S' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0A6' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Impact_Halberd takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02X' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0A0' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Impact_Kilmond takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02D' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0A1' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Impact_Hungering takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AA' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AC' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AD' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AE' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AF' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Impact_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Impact_Hungering() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00F') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0AB', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Impact_Kilmond() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00F') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06X', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Impact_Halberd() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00F') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06S', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Impact_Crossbow() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00F') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I089', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Impact_Gnoll() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00F') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06R', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Impact_Halendor() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00F') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08I', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Impact_Composition() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00F') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06H', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Impact_Azshara() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00F') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06B', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Impact_Nerzhul() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00F') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I09E', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Impact_Sword() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00F') )
call CreateItemLoc( 'I00S', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
call RemoveItem( targetitem )
else
call DoNothing( )
endif
if ( Trig_Enchant_Impact_Bow() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00F') )
call CreateItemLoc( 'I04Z', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
call RemoveItem( targetitem )
else
call DoNothing( )
endif
if ( Trig_Enchant_Impact_Staff() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00F') )
call CreateItemLoc( 'I063', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
call RemoveItem( targetitem )
else
call DoNothing( )
endif
if ( Trig_Enchant_Impact_Arcanistwand() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00F') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I066', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Impact_Berserkermace() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00F') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06C', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Impact_Stalkerblade() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00F') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I081', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Impact_Blackhands() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00F') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08A', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Impact_Doomhammers() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00F') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08E', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Impact takes nothing returns nothing
set gg_trg_Enchant_Impact = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Impact, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Impact, Condition( function Trig_Enchant_Impact_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Impact, function Trig_Enchant_Impact_Actions )
endfunction
function Trig_Enchant_Gintellect_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0BA' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Gintellect_Staff takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I015' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05E' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I063' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Gintellect_Arcanist takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I01Z' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I067' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I066' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Gintellect_Nerzhul takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02N' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05N' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09E' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Gintellect_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Gintellect_Nerzhul() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I019') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05M', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Gintellect_Arcanist() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I019') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I068', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Gintellect_Staff() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I019') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05F', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Gintellect takes nothing returns nothing
set gg_trg_Enchant_Gintellect = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Gintellect, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Gintellect, Condition( function Trig_Enchant_Gintellect_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Gintellect, function Trig_Enchant_Gintellect_Actions )
endfunction
function Trig_Enchant_Intellect_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0B9' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Intellect_Staff takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I015' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05F' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I063' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Intellect_Arcanist takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I01Z' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I068' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I066' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Intellect_Nerzhul takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02N' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05M' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09E' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Intellect_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Intellect_Nerzhul() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04L') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05N', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Intellect_Arcanist() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04L') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I067', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Intellect_Staff() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04L') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05E', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Intellect takes nothing returns nothing
set gg_trg_Enchant_Intellect = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Intellect, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Intellect, Condition( function Trig_Enchant_Intellect_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Intellect, function Trig_Enchant_Intellect_Actions )
endfunction
function Trig_Enchant_Intelligence_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0B4' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Intelligence_Ring takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I018' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05G' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05J' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05L' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05K' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05I' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Intelligence_Entropy takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I01Y' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I077' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07B' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07C' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07A' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I079' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Intelligence_Rage takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I049' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07D' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07E' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07G' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07H' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07I' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Intelligence_Runner takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I008' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07N' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07R' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07S' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07Q' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07O' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Intelligence_Stalker takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04I' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07V' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07Z' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07Y' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07W' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I080' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Intelligence_Windrunner takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I03P' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08X' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I090' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I091' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08W' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08Z' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Intelligence_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Intelligence_Windrunner() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I039') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08Y', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Intelligence_Stalker() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I039') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07X', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Intelligence_Runner() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I039') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07P', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Intelligence_Rage() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I039') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07F', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Intelligence_Entropy() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I039') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I078', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Intelligence_Ring() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I039') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05H', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Intelligence takes nothing returns nothing
set gg_trg_Enchant_Intelligence = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Intelligence, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Intelligence, Condition( function Trig_Enchant_Intelligence_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Intelligence, function Trig_Enchant_Intelligence_Actions )
endfunction
function Trig_Enchant_Iron_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0B5' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Iron_Ring takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I018' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05G' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05J' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05H' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05K' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05I' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Iron_Entropy takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I01Y' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I077' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07B' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I078' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07A' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I079' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Iron_Rage takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I049' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07D' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07E' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07F' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07H' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07I' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Iron_Runner takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I008' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07N' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07R' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07P' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07Q' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07O' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Iron_Stalker takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04I' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07V' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07Z' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07Y' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07W' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07X' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Iron_Windrunner takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I03P' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08X' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I090' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08Y' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08W' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08Z' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Iron_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Iron_Windrunner() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04P') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I091', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Iron_Stalker() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04P') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I080', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Iron_Runner() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04P') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07S', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Iron_Rage() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04P') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07G', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Iron_Entropy() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04P') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07C', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Iron_Ring() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04P') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05L', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Iron takes nothing returns nothing
set gg_trg_Enchant_Iron = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Iron, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Iron, Condition( function Trig_Enchant_Iron_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Iron, function Trig_Enchant_Iron_Actions )
endfunction
function Trig_Enchant_Life_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AR' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Life_Cuirasse takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00A' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I054' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I056' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Life_Leather takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02T' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05A' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Life_Robe takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00V' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05C' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05D' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Life_Arcanist takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I035' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I064' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I065' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Life_Wrath takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04H' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06E' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06G' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Life_Ranger takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I009' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07K' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Life_Stalker takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04A' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I087' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Life_Dragonskin takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02R' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08H' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Life_Khadgar takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02S' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08Q' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08O' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Life_Mithril takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I022' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08T' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08V' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Life_Necroknight takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AG' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AI' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AJ' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Life_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Life_Necroknight() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I013') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0AH', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Life_Mithril() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I013') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08U', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Life_Khadgar() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I013') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08P', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Life_Dragonskin() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I013') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08G', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Life_Stalker() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I013') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I086', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Life_Ranger() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I013') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07J', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Life_Wrath() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I013') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06F', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Life_Arcanist() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I013') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I062', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Life_Robe() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I013') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05B', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Life_Cuirasse() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I013') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I055', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Life_Leather() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I013') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I059', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Life takes nothing returns nothing
set gg_trg_Enchant_Life = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Life, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Life, Condition( function Trig_Enchant_Life_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Life, function Trig_Enchant_Life_Actions )
endfunction
function Trig_Enchant_Mana_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AS' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Mana_Cuirasse takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00A' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I054' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I055' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Mana_Leather takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02T' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I059' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Mana_Robe takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00V' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05B' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05D' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Mana_Arcanist takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I035' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I062' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I065' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Mana_Wrath takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04H' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06E' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06F' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Mana_Ranger takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I009' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07J' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Mana_Stalker takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04A' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I086' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Mana_Dragonskin takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02R' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08G' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Mana_Khadgar takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02S' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08P' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08O' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Mana_Mithril takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I022' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08T' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08U' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Mana_Necroknight takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AG' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AH' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AJ' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Mana_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Mana_Necroknight() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I014') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0AI', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Mana_Mithril() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I014') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08V', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Mana_Khadgar() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I014') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08Q', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Mana_Dragonskin() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I014') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08H', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Mana_Stalker() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I014') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I087', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Mana_Ranger() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I014') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07K', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Mana_Wrath() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I014') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06G', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Mana_Arcanist() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I014') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I064', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Mana_Robe() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I014') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05C', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Mana_Cuirasse() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I014') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I056', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Mana_Leather() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I014') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05A', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Mana takes nothing returns nothing
set gg_trg_Enchant_Mana = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Mana, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Mana, Condition( function Trig_Enchant_Mana_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Mana, function Trig_Enchant_Mana_Actions )
endfunction
function Trig_Enchant_Poison_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AP' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Poison_Sword takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00C' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04T' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00S' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09S' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09O' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Poison_Stalkerblade takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04B' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I083' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I081' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0A4' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0A3' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Poison_Hungering takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AA' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AB' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AC' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AE' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AF' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Poison_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Poison_Hungering() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04K') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0AD', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Poison_Sword() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04K') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I04V', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Poison_Stalkerblade() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04K') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I082', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Poison takes nothing returns nothing
set gg_trg_Enchant_Poison = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Poison, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Poison, Condition( function Trig_Enchant_Poison_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Poison, function Trig_Enchant_Poison_Actions )
endfunction
function Trig_Enchant_Power_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AZ' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Power_Amulet takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I03A' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04U' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I052' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04X' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I053' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Power_Azshara takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I033' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05V' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05Z' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05X' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05Y' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Power_Depthlord takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02C' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06K' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06L' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06N' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06O' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Power_Kilmond takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I032' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I070' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I071' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I073' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I074' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Power_Eye takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I044' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08K' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08N' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08J' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08M' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Power_Firestone takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I01U' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I092' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I096' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I094' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I095' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Power_Tharifas takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00P' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I097' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I099' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09B' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I098' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Power_ShadowOrb takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AS' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AQ' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AU' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AV' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AW' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Power_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Power_ShadowOrb() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01V') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0AT', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Power_Tharifas() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01V') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I09A', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Power_Firestone() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01V') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I093', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Power_Eye() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01V') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08L', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Power_Kilmond() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01V') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I072', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Power_Depthlord() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01V') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06M', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Power_Azshara() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01V') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05W', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Power_Amulet() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01V') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I04W', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Power takes nothing returns nothing
set gg_trg_Enchant_Power = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Power, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Power, Condition( function Trig_Enchant_Power_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Power, function Trig_Enchant_Power_Actions )
endfunction
function Trig_Enchant_Protection_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AO' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Protection_Cloak takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00U' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I050' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Protection_Arcanistcrown takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I020' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I060' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Protection_Azsharashell takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02Z' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I069' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Protection_Depthlordgaze takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02Y' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06J' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Protection_Gnollbelt takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02I' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06P' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Protection_Guardianhelm takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02V' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06T' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Protection_Guardianmail takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02U' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06V' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Protection_Wrathhelm takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04G' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09C' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Protection_Kilmondmask takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02K' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I076' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Protection_Runnercap takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00D' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07L' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Protection_Sirenwings takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I031' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07T' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Protection_Stalkercap takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04D' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I084' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Protection_Nethercloak takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04E' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08C' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Protection_Lotharhelm takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00M' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08R' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Protection_Schild takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AK' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AL' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Protection_Leggings takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AN' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AO' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Protection_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Protection_Leggings() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00T') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0AP', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Protection_Schild() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00T') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0AM', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Protection_Lotharhelm() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00T') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08S', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Protection_Nethercloak() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00T') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08D', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Protection_Stalkercap() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00T') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I085', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Protection_Sirenwings() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00T') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07U', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Protection_Runnercap() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00T') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07M', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Protection_Kilmondmask() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00T') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I075', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Protection_Wrathhelm() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00T') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I09D', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Protection_Guardianmail() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00T') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06W', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Protection_Guardianhelm() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00T') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06U', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Protection_Gnollbelt() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00T') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06Q', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Protection_Cloak() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00T') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I051', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Protection_Arcanistcrown() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00T') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I061', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Protection_Azsharashell() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00T') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06A', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Protection_Depthlordgaze() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I00T') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06I', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Protection takes nothing returns nothing
set gg_trg_Enchant_Protection = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Protection, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Protection, Condition( function Trig_Enchant_Protection_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Protection, function Trig_Enchant_Protection_Actions )
endfunction
function Trig_Enchant_Rapidity_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A073' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Rapidity_Boots takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I03E' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04Y' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09L' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Rapidity_Arcanist takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05P' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I034' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09Q' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Rapidity_Ranger takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00B' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05Q' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09V' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Rapidity_Gnoll takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02H' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05R' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09X' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Rapidity_Guardian takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02W' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05S' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09Z' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Rapidity_Wrath takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I03R' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05T' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0A2' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Rapidity_Stalker takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04C' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05U' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0A5' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Rapidity_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Rapidity_Boots() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I0AX') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0B5', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Rapidity_Arcanist() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I0AX') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0AZ', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Rapidity_Ranger() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I0AX') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0B1', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Rapidity_Gnoll() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I0AX') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0AY', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Rapidity_Guardian() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I0AX') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0B0', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Rapidity_Wrath() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I0AX') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0B3', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Rapidity_Stalker() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I0AX') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0B2', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Rapidity takes nothing returns nothing
set gg_trg_Enchant_Rapidity = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Rapidity, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Rapidity, Condition( function Trig_Enchant_Rapidity_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Rapidity, function Trig_Enchant_Rapidity_Actions )
endfunction
function Trig_Enchant_Smiting_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AW' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Smiting_Gloves takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I01A' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I057' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0B6' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Smiting_Kilmond takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06Y' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02L' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0B7' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Smiting_Alleria takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I03O' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05O' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0B8' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Smiting_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Smiting_Alleria() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04O') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I088', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Smiting_Kilmond() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04O') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06Z', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Smiting_Gloves() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04O') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I058', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Smiting takes nothing returns nothing
set gg_trg_Enchant_Smiting = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Smiting, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Smiting, Condition( function Trig_Enchant_Smiting_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Smiting, function Trig_Enchant_Smiting_Actions )
endfunction
function Trig_Enchant_Soothing_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AU' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Soothing_Robe takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00V' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05B' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05C' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Soothing_Arcanist takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I035' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I062' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I064' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Soothing_Khadgar takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02S' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08P' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08Q' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Soothing_Necroknight takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AG' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AH' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AI' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Soothing_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Soothing_Necroknight() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04Q') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0AJ', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Soothing_Khadgar() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04Q') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08O', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Soothing_Arcanist() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04Q') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I065', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Soothing_Robe() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04Q') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05D', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Soothing takes nothing returns nothing
set gg_trg_Enchant_Soothing = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Soothing, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Soothing, Condition( function Trig_Enchant_Soothing_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Soothing, function Trig_Enchant_Soothing_Actions )
endfunction
function Trig_Enchant_Speed_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AQ' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Speed_Boots takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I03E' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09L' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0B5' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Speed_Arcanist takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05P' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09Q' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AZ' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Speed_Ranger takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00B' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09V' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0B1' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Speed_Gnoll takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02H' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09X' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AY' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Speed_Guardian takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02W' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09Z' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0B0' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Speed_Wrath takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I03R' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0A2' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0B3' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Speed_Stalker takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04C' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0A5' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0B2' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Speed_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Speed_Boots() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01B') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I04Y', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Speed_Arcanist() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01B') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I034', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Speed_Ranger() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01B') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05Q', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Speed_Gnoll() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01B') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05R', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Speed_Guardian() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01B') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05S', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Speed_Wrath() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01B') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05T', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Speed_Stalker() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01B') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05U', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Speed takes nothing returns nothing
set gg_trg_Enchant_Speed = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Speed, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Speed, Condition( function Trig_Enchant_Speed_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Speed, function Trig_Enchant_Speed_Actions )
endfunction
function Trig_Enchant_Spirit_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0B0' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Spirit_Amulet takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I03A' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04U' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I052' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04W' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I053' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Spirit_Azshara takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I033' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05V' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05Z' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05W' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05Y' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Spirit_Depthlord takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02C' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06K' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06L' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06M' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06O' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Spirit_Kilmond takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I032' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I070' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I071' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I072' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I074' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Spirit_Eye takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I044' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08K' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08N' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08L' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08M' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Spirit_Firestone takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I01U' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I092' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I096' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I093' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I095' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Spirit_Tharifas takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00P' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I097' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I099' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09A' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I098' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Spirit_ShadowOrb takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AS' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AQ' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AV' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AW' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AT' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Spirit_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Spirit_ShadowOrb() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01W') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0AU', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Spirit_Tharifas() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01W') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I09B', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Spirit_Firestone() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01W') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I094', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Spirit_Eye() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01W') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08J', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Spirit_Kilmond() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01W') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I073', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Spirit_Depthlord() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01W') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06N', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Spirit_Azshara() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01W') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05X', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Spirit_Amulet() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I01W') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I04X', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Spirit takes nothing returns nothing
set gg_trg_Enchant_Spirit = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Spirit, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Spirit, Condition( function Trig_Enchant_Spirit_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Spirit, function Trig_Enchant_Spirit_Actions )
endfunction
function Trig_Enchant_Stats_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0B6' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Stats_Ring takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I018' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05G' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05J' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05H' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05L' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05I' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Stats_Entropy takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I01Y' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I077' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07B' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I078' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07C' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I079' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Stats_Rage takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I049' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07D' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07E' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07F' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07G' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07I' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Stats_Runner takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I008' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07N' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07R' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07P' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07S' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07O' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Stats_Stalker takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04I' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07V' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07Z' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I080' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07W' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07X' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Stats_Windrunner takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I03P' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08X' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I090' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08Y' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I091' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08Z' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Stats_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Stats_Windrunner() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I03C') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08W', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Stats_Stalker() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I03C') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07Y', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Stats_Runner() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I03C') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07Q', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Stats_Rage() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I03C') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07H', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Stats_Entropy() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I03C') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07A', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Stats_Ring() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I03C') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05K', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Stats takes nothing returns nothing
set gg_trg_Enchant_Stats = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Stats, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Stats, Condition( function Trig_Enchant_Stats_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Stats, function Trig_Enchant_Stats_Actions )
endfunction
function Trig_Enchant_Strength_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0B7' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Strength_Ring takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I018' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05G' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05J' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05H' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05L' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05K' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Strength_Entropy takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I01Y' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I077' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07B' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I078' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07C' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07A' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Strength_Rage takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I049' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07D' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07E' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07F' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07G' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07H' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Strength_Runner takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I008' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07N' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07R' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07P' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07S' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07Q' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Strength_Stalker takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04I' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07V' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07Z' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I080' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07Y' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I07X' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Strength_Windrunner takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I03P' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08X' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I090' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08Y' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I091' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08W' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Strength_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Strength_Windrunner() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I03B') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08Z', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Strength_Stalker() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I03B') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07W', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Strength_Runner() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I03B') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07O', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Strength_Rage() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I03B') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I07I', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Strength_Entropy() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I03B') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I079', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Strength_Ring() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I03B') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05I', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Strength takes nothing returns nothing
set gg_trg_Enchant_Strength = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Strength, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Strength, Condition( function Trig_Enchant_Strength_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Strength, function Trig_Enchant_Strength_Actions )
endfunction
function Trig_Enchant_Vision_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0B1' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Vision_Amulet takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I03A' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04U' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I052' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04W' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I04X' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Vision_Azshara takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I033' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05V' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05Z' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05W' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I05X' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Vision_Depthlord takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I02C' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06K' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06L' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06M' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I06N' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Vision_Kilmond takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I032' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I070' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I071' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I072' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I073' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Vision_Eye takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I044' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08K' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08N' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08L' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I08J' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Vision_Firestone takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I01U' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I092' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I096' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I093' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I094' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Vision_Tharifas takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I00P' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I097' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I099' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09A' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I09B' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Vision_ShadowOrb takes nothing returns boolean
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AQ' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AS' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AT' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AW' ) then
return true
endif
if ( GetItemTypeId(GetSpellTargetItem()) == 'I0AU' ) then
return true
endif
return false
endfunction
function Trig_Enchant_Vision_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local item targetitem = GetSpellTargetItem()
local location itemloc = GetItemLoc(targetitem)
if ( Trig_Enchant_Vision_ShadowOrb() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04J') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I0AV', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Vision_Tharifas() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04J') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I098', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Vision_Firestone() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04J') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I095', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Vision_Eye() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04J') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I08M', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Vision_Kilmond() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04J') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I074', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Vision_Depthlord() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04J') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I06O', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Vision_Azshara() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04J') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I05Y', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
if ( Trig_Enchant_Vision_Amulet() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(caster, 'I04J') )
call RemoveItem( targetitem )
call CreateItemLoc( 'I053', itemloc )
call UnitAddItemSwapped( GetLastCreatedItem(), caster )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Enchant_Vision takes nothing returns nothing
set gg_trg_Enchant_Vision = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Vision, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant_Vision, Condition( function Trig_Enchant_Vision_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Vision, function Trig_Enchant_Vision_Actions )
endfunction
function Trig_Orc_L_B_Barracks takes nothing returns boolean
if ( not ( udg_gameover == false ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(gg_unit_obar_0090) == true ) ) then
return false
endif
return true
endfunction
function Trig_Orc_L_B_Lodge takes nothing returns boolean
if ( not ( IsUnitAliveBJ(gg_unit_osld_0089) == true ) ) then
return false
endif
if ( not ( udg_gameover == false ) ) then
return false
endif
return true
endfunction
function Trig_Orc_L_B_Actions takes nothing returns nothing
local location loc
call TriggerSleepAction( 5.00 )
if ( Trig_Orc_L_B_Barracks() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilLeft), -200.00, 50.00)
call CreateNUnitsAtLoc( 1, 'ogru', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[5] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilLeft), -200.00, -50.00)
call CreateNUnitsAtLoc( 1, 'ogru', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[5] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilLeft), -150.00, 50.00)
call CreateNUnitsAtLoc( 1, 'ohun', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[5] )
else
call DoNothing( )
endif
if ( Trig_Orc_L_B_Lodge() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilLeft), -100.00, -25.00)
call CreateNUnitsAtLoc( 1, 'nfsp', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[5] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilLeft), -100.00, 50.00)
call CreateNUnitsAtLoc( 1, 'oshm', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[5] )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
call TriggerSleepAction( 90.00 )
if ( Trig_Orc_L_B_Barracks() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilLeft), -200.00, 50.00)
call CreateNUnitsAtLoc( 1, 'ogru', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[5] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilLeft), -200.00, -50.00)
call CreateNUnitsAtLoc( 1, 'ogru', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[5] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilLeft), -150.00, 50.00)
call CreateNUnitsAtLoc( 1, 'ohun', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[5] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilLeft), -150.00, -50.00)
call CreateNUnitsAtLoc( 1, 'ohun', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[5] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilLeft), -250.00, 0)
call CreateNUnitsAtLoc( udg_spawn_additional[3], 'nogm', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[5] )
set loc = GetRectCenter(gg_rct_spawnEvilLeft)
call CreateNUnitsAtLoc( udg_spawn_additional[4], 'ocat', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[5] )
else
call DoNothing( )
endif
if ( Trig_Orc_L_B_Lodge() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilLeft), -150.00, 0)
call CreateNUnitsAtLoc( 1, 'nomg', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[5] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilLeft), -100.00, 25.00)
call CreateNUnitsAtLoc( 1, 'nfsp', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[5] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilLeft), -100.00, -25.00)
call CreateNUnitsAtLoc( 1, 'nfsp', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[5] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilLeft), -100.00, 50.00)
call CreateNUnitsAtLoc( 1, 'oshm', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[5] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilLeft), -100.00, -50.00)
call CreateNUnitsAtLoc( 1, 'oshm', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[5] )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Orc_L_B_Copy takes nothing returns nothing
set gg_trg_Orc_L_B_Copy = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Orc_L_B_Copy, udg_Spawntimer )
call TriggerAddAction( gg_trg_Orc_L_B_Copy, function Trig_Orc_L_B_Actions )
endfunction
function Trig_Orc_ML_B_Barracks takes nothing returns boolean
if ( not ( udg_gameover == false ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(gg_unit_obar_0088) == true ) ) then
return false
endif
return true
endfunction
function Trig_Orc_ML_B_Lodge takes nothing returns boolean
if ( not ( udg_gameover == false ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(gg_unit_osld_0093) == true ) ) then
return false
endif
return true
endfunction
function Trig_Orc_ML_B_Actions takes nothing returns nothing
local location loc
call TriggerSleepAction( 2.00 )
if ( Trig_Orc_ML_B_Barracks() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidLeft), -200.00, 50.00)
call CreateNUnitsAtLoc( 1, 'ogru', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[6] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidLeft), -200.00, -50.00)
call CreateNUnitsAtLoc( 1, 'ogru', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[6] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidLeft), -150.00, 50.00)
call CreateNUnitsAtLoc( 1, 'ohun', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[6] )
else
call DoNothing( )
endif
if ( Trig_Orc_ML_B_Lodge() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidLeft), -100.00, -25.00)
call CreateNUnitsAtLoc( 1, 'nfsp', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[6] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidLeft), -100.00, 50.00)
call CreateNUnitsAtLoc( 1, 'oshm', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[6] )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
call TriggerSleepAction( 90.00 )
if ( Trig_Orc_ML_B_Barracks() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidLeft), -200.00, 50.00)
call CreateNUnitsAtLoc( 1, 'ogru', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[6] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidLeft), -200.00, -50.00)
call CreateNUnitsAtLoc( 1, 'ogru', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[6] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidLeft), -150.00, 50.00)
call CreateNUnitsAtLoc( 1, 'ohun', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[6] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidLeft), -150.00, -50.00)
call CreateNUnitsAtLoc( 1, 'ohun', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[6] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidLeft), -250.00, 0)
call CreateNUnitsAtLoc( udg_spawn_additional[3], 'nogm', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[6] )
set loc = GetRectCenter(gg_rct_spawnEvilMidLeft)
call CreateNUnitsAtLoc( udg_spawn_additional[4], 'ocat', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[6] )
else
call DoNothing( )
endif
if ( Trig_Orc_ML_B_Lodge() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidLeft), -150.00, 0)
call CreateNUnitsAtLoc( 1, 'nomg', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[6] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidLeft), -100.00, 25.00)
call CreateNUnitsAtLoc( 1, 'nfsp', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[6] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidLeft), -100.00, -25.00)
call CreateNUnitsAtLoc( 1, 'nfsp', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[6] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidLeft), -100.00, 50.00)
call CreateNUnitsAtLoc( 1, 'oshm', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[6] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidLeft), -100.00, -50.00)
call CreateNUnitsAtLoc( 1, 'oshm', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[6] )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Orc_ML_B_Copy takes nothing returns nothing
set gg_trg_Orc_ML_B_Copy = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Orc_ML_B_Copy, udg_Spawntimer )
call TriggerAddAction( gg_trg_Orc_ML_B_Copy, function Trig_Orc_ML_B_Actions )
endfunction
function Trig_Orc_MC_B_Barracks takes nothing returns boolean
if ( not ( udg_gameover == false ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(gg_unit_obar_0114) == true ) ) then
return false
endif
return true
endfunction
function Trig_Orc_MC_B_Lodge takes nothing returns boolean
if ( not ( udg_gameover == false ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(gg_unit_osld_0115) == true ) ) then
return false
endif
return true
endfunction
function Trig_Orc_MC_B_Actions takes nothing returns nothing
local location loc
if ( Trig_Orc_MC_B_Barracks() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidCentre), -200.00, 50.00)
call CreateNUnitsAtLoc( 1, 'ogru', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[7] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidCentre), -200.00, -50.00)
call CreateNUnitsAtLoc( 1, 'ogru', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[7] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidCentre), -150.00, 50.00)
call CreateNUnitsAtLoc( 1, 'ohun', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[7] )
else
call DoNothing( )
endif
if ( Trig_Orc_MC_B_Lodge() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidCentre), -100.00, -25.00)
call CreateNUnitsAtLoc( 1, 'nfsp', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[7] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidCentre), -100.00, 50.00)
call CreateNUnitsAtLoc( 1, 'oshm', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[7] )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
call TriggerSleepAction( 90.00 )
if ( Trig_Orc_MC_B_Barracks() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidCentre), -200.00, 50.00)
call CreateNUnitsAtLoc( 1, 'ogru', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[7] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidCentre), -200.00, -50.00)
call CreateNUnitsAtLoc( 1, 'ogru', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[7] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidCentre), -150.00, 50.00)
call CreateNUnitsAtLoc( 1, 'ohun', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[7] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidCentre), -150.00, -50.00)
call CreateNUnitsAtLoc( 1, 'ohun', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[7] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidCentre), -250.00, 0)
call CreateNUnitsAtLoc( udg_spawn_additional[3], 'nogm', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[7] )
set loc = GetRectCenter(gg_rct_spawnEvilMidCentre)
call CreateNUnitsAtLoc( udg_spawn_additional[4], 'ocat', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[7] )
else
call DoNothing( )
endif
if ( Trig_Orc_MC_B_Lodge() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidCentre), -150.00, 0)
call CreateNUnitsAtLoc( 1, 'nomg', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[7] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidCentre), -100.00, 25.00)
call CreateNUnitsAtLoc( 1, 'nfsp', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[7] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidCentre), -100.00, -25.00)
call CreateNUnitsAtLoc( 1, 'nfsp', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[7] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidCentre), -100.00, 50.00)
call CreateNUnitsAtLoc( 1, 'oshm', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[7] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidCentre), -100.00, -50.00)
call CreateNUnitsAtLoc( 1, 'oshm', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[7] )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Orc_MC_B_Copy takes nothing returns nothing
set gg_trg_Orc_MC_B_Copy = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Orc_MC_B_Copy, udg_Spawntimer )
call TriggerAddAction( gg_trg_Orc_MC_B_Copy, function Trig_Orc_MC_B_Actions )
endfunction
function Trig_Orc_MR_B_Barracks takes nothing returns boolean
if ( not ( udg_gameover == false ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(gg_unit_obar_0246) == true ) ) then
return false
endif
return true
endfunction
function Trig_Orc_MR_B_Lodge takes nothing returns boolean
if ( not ( udg_gameover == false ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(gg_unit_osld_0247) == true ) ) then
return false
endif
return true
endfunction
function Trig_Orc_MR_B_Actions takes nothing returns nothing
local location loc
call TriggerSleepAction( 2.00 )
if ( Trig_Orc_MR_B_Barracks() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidRight), -200.00, 50.00)
call CreateNUnitsAtLoc( 1, 'ogru', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[8] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidRight), -200.00, -50.00)
call CreateNUnitsAtLoc( 1, 'ogru', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[8] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidRight), -150.00, 50.00)
call CreateNUnitsAtLoc( 1, 'ohun', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[8] )
else
call DoNothing( )
endif
if ( Trig_Orc_MR_B_Lodge() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidRight), -100.00, -25.00)
call CreateNUnitsAtLoc( 1, 'nfsp', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[8] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidRight), -100.00, 50.00)
call CreateNUnitsAtLoc( 1, 'oshm', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[8] )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
call TriggerSleepAction( 90.00 )
if ( Trig_Orc_MR_B_Barracks() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidRight), -200.00, 50.00)
call CreateNUnitsAtLoc( 1, 'ogru', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[8] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidRight), -200.00, -50.00)
call CreateNUnitsAtLoc( 1, 'ogru', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[8] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidRight), -150.00, 50.00)
call CreateNUnitsAtLoc( 1, 'ohun', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[8] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidRight), -150.00, -50.00)
call CreateNUnitsAtLoc( 1, 'ohun', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[8] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidRight), -250.00, 0)
call CreateNUnitsAtLoc( udg_spawn_additional[3], 'nogm', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[8] )
set loc = GetRectCenter(gg_rct_spawnEvilMidRight)
call CreateNUnitsAtLoc( udg_spawn_additional[4], 'ocat', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[8] )
else
call DoNothing( )
endif
if ( Trig_Orc_MR_B_Lodge() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidRight), -150.00, 0)
call CreateNUnitsAtLoc( 1, 'nomg', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[8] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidRight), -100.00, 25.00)
call CreateNUnitsAtLoc( 1, 'nfsp', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[8] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidRight), -100.00, -25.00)
call CreateNUnitsAtLoc( 1, 'nfsp', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[8] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidRight), -100.00, 50.00)
call CreateNUnitsAtLoc( 1, 'oshm', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[8] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilMidRight), -100.00, 50.00)
call CreateNUnitsAtLoc( 1, 'oshm', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[8] )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Orc_MR_B_Copy takes nothing returns nothing
set gg_trg_Orc_MR_B_Copy = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Orc_MR_B_Copy, udg_Spawntimer )
call TriggerAddAction( gg_trg_Orc_MR_B_Copy, function Trig_Orc_MR_B_Actions )
endfunction
function Trig_Orc_R_B_Barracks takes nothing returns boolean
if ( not ( udg_gameover == false ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(gg_unit_obar_0092) == true ) ) then
return false
endif
return true
endfunction
function Trig_Orc_R_B_Lodge takes nothing returns boolean
if ( not ( udg_gameover == false ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(gg_unit_osld_0091) == true ) ) then
return false
endif
return true
endfunction
function Trig_Orc_R_B_Actions takes nothing returns nothing
local location loc
call TriggerSleepAction( 5.00 )
if ( Trig_Orc_R_B_Barracks() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilRight), -200.00, 50.00)
call CreateNUnitsAtLoc( 1, 'ogru', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[9] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilRight), -200.00, -50.00)
call CreateNUnitsAtLoc( 1, 'ogru', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[9] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilRight), -150.00, 50.00)
call CreateNUnitsAtLoc( 1, 'ohun', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[9] )
else
call DoNothing( )
endif
if ( Trig_Orc_R_B_Lodge() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilRight), -100.00, -25.00)
call CreateNUnitsAtLoc( 1, 'nfsp', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[9] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilRight), -100.00, 50.00)
call CreateNUnitsAtLoc( 1, 'oshm', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[9] )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
call TriggerSleepAction( 90.00 )
if ( Trig_Orc_R_B_Barracks() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilRight), -200.00, 50.00)
call CreateNUnitsAtLoc( 1, 'ogru', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[9] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilRight), -200.00, -50.00)
call CreateNUnitsAtLoc( 1, 'ogru', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[9] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilRight), -150.00, 50.00)
call CreateNUnitsAtLoc( 1, 'ohun', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[9] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilRight), -150.00, -50.00)
call CreateNUnitsAtLoc( 1, 'ohun', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[9] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilRight), -250.00, 0)
call CreateNUnitsAtLoc( udg_spawn_additional[3], 'nogm', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[9] )
set loc = GetRectCenter(gg_rct_spawnEvilRight)
call CreateNUnitsAtLoc( udg_spawn_additional[4], 'ocat', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[9] )
else
call DoNothing( )
endif
if ( Trig_Orc_R_B_Lodge() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilRight), -150.00, 0)
call CreateNUnitsAtLoc( 1, 'nomg', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[9] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilRight), -100.00, 25.00)
call CreateNUnitsAtLoc( 1, 'nfsp', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[9] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilRight), -100.00, -25.00)
call CreateNUnitsAtLoc( 1, 'nfsp', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[9] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilRight), -100.00, 50.00)
call CreateNUnitsAtLoc( 1, 'oshm', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[9] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnEvilRight), -100.00, -50.00)
call CreateNUnitsAtLoc( 1, 'oshm', Player(6), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[9] )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Orc_R_B_Copy takes nothing returns nothing
set gg_trg_Orc_R_B_Copy = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Orc_R_B_Copy, udg_Spawntimer )
call TriggerAddAction( gg_trg_Orc_R_B_Copy, function Trig_Orc_R_B_Actions )
endfunction
function Trig_Human_L_B_Barracks takes nothing returns boolean
if ( not ( udg_gameover == false ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(gg_unit_hbar_0034) == true ) ) then
return false
endif
return true
endfunction
function Trig_Human_L_B_Sanctum takes nothing returns boolean
if ( not ( udg_gameover == false ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(gg_unit_hars_0031) == true ) ) then
return false
endif
return true
endfunction
function Trig_Human_L_B_Actions takes nothing returns nothing
local location loc
call TriggerSleepAction( 5.00 )
if ( Trig_Human_L_B_Barracks() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodLeft), 50.00, 200.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[0] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodLeft), 0.00, 200.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[0] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodLeft), -50.00, 200.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[0] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodLeft), 0.00, 150.00)
call CreateNUnitsAtLoc( 1, 'hrif', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[0] )
else
call DoNothing( )
endif
if ( Trig_Human_L_B_Sanctum() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodLeft), 25.00, 100.00)
call CreateNUnitsAtLoc( 1, 'hmpr', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[0] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodLeft), 50.00, 100.00)
call CreateNUnitsAtLoc( 1, 'hsor', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[0] )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
call TriggerSleepAction( 90.00 )
if ( Trig_Human_L_B_Barracks() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodLeft), 50.00, 200.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5),loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[0] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodLeft), 0.00, 200.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[0] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodLeft), -50.00, 200.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[0] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodLeft), 50.00, 150.00)
call CreateNUnitsAtLoc( 1, 'hrif', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[0] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodLeft), -50.00, 150.00)
call CreateNUnitsAtLoc( 1, 'hrif', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[0] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodLeft), 0, 225.00)
call CreateNUnitsAtLoc( udg_spawn_additional[1], 'hkni', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[0] )
set loc = GetRectCenter(gg_rct_spawnGoodLeft)
call CreateNUnitsAtLoc( udg_spawn_additional[2], 'ebal', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[0] )
else
call DoNothing( )
endif
if ( Trig_Human_L_B_Sanctum() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodLeft), 0, 150.00)
call CreateNUnitsAtLoc( 1, 'hspt', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[0] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodLeft), 25.00, 100.00)
call CreateNUnitsAtLoc( 1, 'hmpr', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[0] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodLeft), -25.00, 100.00)
call CreateNUnitsAtLoc( 1, 'hmpr', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[0] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodLeft), 50.00, 100.00)
call CreateNUnitsAtLoc( 1, 'hsor', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[0] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodLeft), -50.00, 100.00)
call CreateNUnitsAtLoc( 1, 'hsor', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[0] )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Human_L_B_Copy takes nothing returns nothing
set gg_trg_Human_L_B_Copy = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Human_L_B_Copy, udg_Spawntimer )
call TriggerAddAction( gg_trg_Human_L_B_Copy, function Trig_Human_L_B_Actions )
endfunction
function Trig_Human_ML_B_Barracks takes nothing returns boolean
if ( not ( udg_gameover == false ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(gg_unit_hbar_0035) == true ) ) then
return false
endif
return true
endfunction
function Trig_Human_ML_B_Sanctum takes nothing returns boolean
if ( not ( udg_gameover == false ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(gg_unit_hars_0032) == true ) ) then
return false
endif
return true
endfunction
function Trig_Human_ML_B_Actions takes nothing returns nothing
local location loc
call TriggerSleepAction( 2.00 )
if ( Trig_Human_ML_B_Barracks() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreLeft), 50.00, 200.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[1] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreLeft), 0.00, 200.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[1] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreLeft), -50.00, 200.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[1] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreLeft), 0.00, 150.00)
call CreateNUnitsAtLoc( 1, 'hrif', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[1] )
else
call DoNothing( )
endif
if ( Trig_Human_ML_B_Sanctum() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreLeft), 25.00, 100.00)
call CreateNUnitsAtLoc( 1, 'hmpr', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[1] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreLeft), 50.00, 100.00)
call CreateNUnitsAtLoc( 1, 'hsor', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[1] )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
call TriggerSleepAction( 90.00 )
if ( Trig_Human_ML_B_Barracks() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreLeft), 50.00, 200.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[1] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreLeft), 0.00, 200.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[1] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreLeft), -50.00, 200.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[1] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreLeft), 50.00, 150.00)
call CreateNUnitsAtLoc( 1, 'hrif', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[1] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreLeft), -50.00, 150.00)
call CreateNUnitsAtLoc( 1, 'hrif', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[1] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreLeft), 0, 225.00)
call CreateNUnitsAtLoc( udg_spawn_additional[1], 'hkni', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[1] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreLeft), 0, 0)
call CreateNUnitsAtLoc( udg_spawn_additional[2], 'ebal', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[1] )
else
call DoNothing( )
endif
if ( Trig_Human_ML_B_Sanctum() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreLeft), 0, 150.00)
call CreateNUnitsAtLoc( 1, 'hspt', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[1] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreLeft), 25.00, 100.00)
call CreateNUnitsAtLoc( 1, 'hmpr', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[1] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreLeft), -25.00, 100.00)
call CreateNUnitsAtLoc( 1, 'hmpr', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[1] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreLeft), 50.00, 100.00)
call CreateNUnitsAtLoc( 1, 'hsor', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[1] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreLeft), -50.00, 100.00)
call CreateNUnitsAtLoc( 1, 'hsor', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[1] )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Human_ML_B_Copy takes nothing returns nothing
set gg_trg_Human_ML_B_Copy = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Human_ML_B_Copy, udg_Spawntimer )
call TriggerAddAction( gg_trg_Human_ML_B_Copy, function Trig_Human_ML_B_Actions )
endfunction
function Trig_Human_MC_B_Barracks takes nothing returns boolean
if ( not ( udg_gameover == false ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(gg_unit_hbar_0067) == true ) ) then
return false
endif
return true
endfunction
function Trig_Human_MC_B_Sanctum takes nothing returns boolean
if ( not ( udg_gameover == false ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(gg_unit_hars_0073) == true ) ) then
return false
endif
return true
endfunction
function Trig_Human_MC_B_Actions takes nothing returns nothing
local location loc
if ( Trig_Human_MC_B_Barracks() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodMidCentre), 50.00, 200.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[2] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodMidCentre), 0.00, 200.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[2] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodMidCentre), -50.00, 200.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[2] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodMidCentre), 0.00, 150.00)
call CreateNUnitsAtLoc( 1, 'hrif', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[2] )
else
call DoNothing( )
endif
if ( Trig_Human_MC_B_Sanctum() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodMidCentre), 25.00, 100.00)
call CreateNUnitsAtLoc( 1, 'hmpr', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[2] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodMidCentre), 50.00, 100.00)
call CreateNUnitsAtLoc( 1, 'hsor', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[2] )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
call TriggerSleepAction( 90.00 )
if ( Trig_Human_MC_B_Barracks() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodMidCentre), 50.00, 200.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[2] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodMidCentre), 0.00, 200.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[2] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodMidCentre), -50.00, 200.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[2] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodMidCentre), 50.00, 150.00)
call CreateNUnitsAtLoc( 1, 'hrif', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[2] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodMidCentre), -50.00, 150.00)
call CreateNUnitsAtLoc( 1, 'hrif', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[2] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodMidCentre), 0, 225.00)
call CreateNUnitsAtLoc( udg_spawn_additional[1], 'hkni', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[2] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodMidCentre), 0, 0)
call CreateNUnitsAtLoc( udg_spawn_additional[2], 'ebal', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[2] )
else
call DoNothing( )
endif
if ( Trig_Human_MC_B_Sanctum() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodMidCentre), 0, 150.00)
call CreateNUnitsAtLoc( 1, 'hspt', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[2] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodMidCentre), 25.00, 100.00)
call CreateNUnitsAtLoc( 1, 'hmpr', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[2] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodMidCentre), -25.00, 100.00)
call CreateNUnitsAtLoc( 1, 'hmpr', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[2] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodMidCentre), 50.00, 100.00)
call CreateNUnitsAtLoc( 1, 'hsor', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[2] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodMidCentre), -50.00, 100.00)
call CreateNUnitsAtLoc( 1, 'hsor', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[2] )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Human_MC_B_Copy takes nothing returns nothing
set gg_trg_Human_MC_B_Copy = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Human_MC_B_Copy, udg_Spawntimer )
call TriggerAddAction( gg_trg_Human_MC_B_Copy, function Trig_Human_MC_B_Actions )
endfunction
function Trig_Human_MR_B_Barracks takes nothing returns boolean
if ( not ( udg_gameover == false ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(gg_unit_hbar_0213) == true ) ) then
return false
endif
return true
endfunction
function Trig_Human_MR_B_Sanctum takes nothing returns boolean
if ( not ( udg_gameover == false ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(gg_unit_hars_0214) == true ) ) then
return false
endif
return true
endfunction
function Trig_Human_MR_B_Actions takes nothing returns nothing
local location loc
call TriggerSleepAction( 2.00 )
if ( Trig_Human_MR_B_Barracks() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreRight), 50.00, 200.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[3] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreRight), 0.00, 200.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[3] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreRight), -50.00, 200.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[3] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreRight), 0.00, 150.00)
call CreateNUnitsAtLoc( 1, 'hrif', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[3] )
else
call DoNothing( )
endif
if ( Trig_Human_MR_B_Sanctum() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreRight), 25.00, 100.00)
call CreateNUnitsAtLoc( 1, 'hmpr', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[3] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreRight), 50.00, 100.00)
call CreateNUnitsAtLoc( 1, 'hsor', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[3] )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
call TriggerSleepAction( 90.00 )
if ( Trig_Human_MR_B_Barracks() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreRight), 50.00, 200.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[3] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreRight), 0.00, 200.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[3] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreRight), -50.00, 200.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[3] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreRight), 50.00, 150.00)
call CreateNUnitsAtLoc( 1, 'hrif', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[3] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreRight), -50.00, 150.00)
call CreateNUnitsAtLoc( 1, 'hrif', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[3] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreRight), 0, 225.00)
call CreateNUnitsAtLoc( udg_spawn_additional[1], 'hkni', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[3] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreRight), 0, 0)
call CreateNUnitsAtLoc( udg_spawn_additional[2], 'ebal', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[3] )
else
call DoNothing( )
endif
if ( Trig_Human_MR_B_Sanctum() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreRight), 0, 150.00)
call CreateNUnitsAtLoc( 1, 'hspt', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[3] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreRight), 25.00, 100.00)
call CreateNUnitsAtLoc( 1, 'hmpr', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[3] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreRight), -25.00, 100.00)
call CreateNUnitsAtLoc( 1, 'hmpr', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[3] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreRight), 50.00, 100.00)
call CreateNUnitsAtLoc( 1, 'hsor', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[3] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodCentreRight), -50.00, 100.00)
call CreateNUnitsAtLoc( 1, 'hsor', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[3] )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Human_MR_B_Copy takes nothing returns nothing
set gg_trg_Human_MR_B_Copy = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Human_MR_B_Copy, udg_Spawntimer )
call TriggerAddAction( gg_trg_Human_MR_B_Copy, function Trig_Human_MR_B_Actions )
endfunction
function Trig_Human_R_B_Barracks takes nothing returns boolean
if ( not ( udg_gameover == false ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(gg_unit_hbar_0036) == true ) ) then
return false
endif
return true
endfunction
function Trig_Human_R_B_Sanctum takes nothing returns boolean
if ( not ( udg_gameover == false ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(gg_unit_hars_0033) == true ) ) then
return false
endif
return true
endfunction
function Trig_Human_R_B_Actions takes nothing returns nothing
local location loc
call TriggerSleepAction( 5.00 )
if ( Trig_Human_R_B_Barracks() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodRight), 200.00, 50.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[4] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodRight), 200.00, 0.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[4] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodRight), 200.00, -50.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[4] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodRight), 150.00, 50.00)
call CreateNUnitsAtLoc( 1, 'hrif', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[4] )
else
call DoNothing( )
endif
if ( Trig_Human_R_B_Sanctum() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodRight), 100.00, 25.00)
call CreateNUnitsAtLoc( 1, 'hmpr', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[4] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodRight), 100.00, 50.00)
call CreateNUnitsAtLoc( 1, 'hsor', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[4] )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
call TriggerSleepAction( 90.00 )
if ( Trig_Human_R_B_Barracks() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodRight), 200.00, 50.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[4] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodRight), 200.00, 0.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[4] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodRight), 200.00, -50.00)
call CreateNUnitsAtLoc( 1, 'hfoo', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[4] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodRight), 125.00, 50.00)
call CreateNUnitsAtLoc( 1, 'hrif', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[4] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodRight), 125.00, -50.00)
call CreateNUnitsAtLoc( 1, 'hrif', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[4] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodRight), 225.00, 0.00)
call CreateNUnitsAtLoc( udg_spawn_additional[1], 'hkni', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[4] )
set loc = GetRectCenter(gg_rct_spawnGoodRight)
call CreateNUnitsAtLoc( udg_spawn_additional[2], 'ebal', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[4] )
else
call DoNothing( )
endif
if ( Trig_Human_R_B_Sanctum() ) then
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodRight), 150.00, 0.00)
call CreateNUnitsAtLoc( 1, 'hspt', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[4] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodRight), 100.00, 25.00)
call CreateNUnitsAtLoc( 1, 'hmpr', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[4] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodRight), 100.00, -25.00)
call CreateNUnitsAtLoc( 1, 'hmpr', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[4] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodRight), 100.00, 50.00)
call CreateNUnitsAtLoc( 1, 'hsor', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[4] )
set loc = OffsetLocation(GetRectCenter(gg_rct_spawnGoodRight), 100.00, -50.00)
call CreateNUnitsAtLoc( 1, 'hsor', Player(5), loc, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_spawngruppe[4] )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Human_R_B_Copy takes nothing returns nothing
set gg_trg_Human_R_B_Copy = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Human_R_B_Copy, udg_Spawntimer )
call TriggerAddAction( gg_trg_Human_R_B_Copy, function Trig_Human_R_B_Actions )
endfunction
function Trig_pathMidAlly_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nmdm' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nzep' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'hcth' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nwzg' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'orai' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'owar' ) ) then
return false
endif
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[10]) == false ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[11]) == false ) ) then
return false
endif
return true
endfunction
function Trig_pathMidAlly_Actions takes nothing returns nothing
local location loc
if ( GetOwningPlayer(GetEnteringUnit()) == Player(5) ) then
set loc = GetRectCenter(gg_rct_pathMidHorde)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
if ( GetOwningPlayer(GetEnteringUnit()) == Player(6) ) then
set loc = GetRectCenter(gg_rct_pathKnotenpunktAlly)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_pathMidAlly takes nothing returns nothing
set gg_trg_pathMidAlly = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_pathMidAlly, gg_rct_pathMidAlly )
call TriggerAddCondition( gg_trg_pathMidAlly, Condition( function Trig_pathMidAlly_Conditions ) )
call TriggerAddAction( gg_trg_pathMidAlly, function Trig_pathMidAlly_Actions )
endfunction
function Trig_pathMidHorde_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nmdm' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'hcth' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'orai' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nwzg' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'owar' ) ) then
return false
endif
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nzep' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[10]) == false ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[11]) == false ) ) then
return false
endif
return true
endfunction
function Trig_pathMidHorde_Actions takes nothing returns nothing
local location loc
if ( GetOwningPlayer(GetEnteringUnit()) == Player(5) ) then
set loc = GetRectCenter(gg_rct_pathKnotenpunktHorde)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
if ( GetOwningPlayer(GetEnteringUnit()) == Player(6) ) then
set loc = GetRectCenter(gg_rct_pathMidAlly)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_pathMidHorde takes nothing returns nothing
set gg_trg_pathMidHorde = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_pathMidHorde, gg_rct_pathMidHorde )
call TriggerAddCondition( gg_trg_pathMidHorde, Condition( function Trig_pathMidHorde_Conditions ) )
call TriggerAddAction( gg_trg_pathMidHorde, function Trig_pathMidHorde_Actions )
endfunction
function Trig_pathLAllyCamp_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nmdm' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'hcth' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'orai' ) ) then
return false
endif
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nzep' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[10]) == false ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[11]) == false ) ) then
return false
endif
return true
endfunction
function Trig_pathLAllyCamp_Actions takes nothing returns nothing
local location loc
if ( GetOwningPlayer(GetEnteringUnit()) == Player(5) ) then
set loc = GetRectCenter(gg_rct_pathLCorner)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
if ( GetOwningPlayer(GetEnteringUnit()) == Player(6) ) then
set loc = GetRectCenter(gg_rct_spawnGoodLeft)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_pathLAllyCamp takes nothing returns nothing
set gg_trg_pathLAllyCamp = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_pathLAllyCamp, gg_rct_pathLAllyCamp )
call TriggerAddCondition( gg_trg_pathLAllyCamp, Condition( function Trig_pathLAllyCamp_Conditions ) )
call TriggerAddAction( gg_trg_pathLAllyCamp, function Trig_pathLAllyCamp_Actions )
endfunction
function Trig_pathLCorner_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nmdm' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'hcth' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'orai' ) ) then
return false
endif
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nzep' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[10]) == false ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[11]) == false ) ) then
return false
endif
return true
endfunction
function Trig_pathLCorner_Actions takes nothing returns nothing
local location loc
if ( GetOwningPlayer(GetEnteringUnit()) == Player(5) ) then
set loc = GetRectCenter(gg_rct_pathLHordeCamp)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
if ( GetOwningPlayer(GetEnteringUnit()) == Player(6) ) then
set loc = GetRectCenter(gg_rct_pathLAllyCamp)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_pathLCorner takes nothing returns nothing
set gg_trg_pathLCorner = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_pathLCorner, gg_rct_pathLCorner )
call TriggerAddCondition( gg_trg_pathLCorner, Condition( function Trig_pathLCorner_Conditions ) )
call TriggerAddAction( gg_trg_pathLCorner, function Trig_pathLCorner_Actions )
endfunction
function Trig_pathLHordeCamp_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nmdm' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'hcth' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'orai' ) ) then
return false
endif
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nzep' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[10]) == false ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[11]) == false ) ) then
return false
endif
return true
endfunction
function Trig_pathLHordeCamp_Actions takes nothing returns nothing
local location loc
if ( GetOwningPlayer(GetEnteringUnit()) == Player(5) ) then
set loc = GetRectCenter(gg_rct_spawnEvilLeft)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
if ( GetOwningPlayer(GetEnteringUnit()) == Player(6) ) then
set loc = GetRectCenter(gg_rct_pathLCorner)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_pathLHordeCamp takes nothing returns nothing
set gg_trg_pathLHordeCamp = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_pathLHordeCamp, gg_rct_pathLHordeCamp )
call TriggerAddCondition( gg_trg_pathLHordeCamp, Condition( function Trig_pathLHordeCamp_Conditions ) )
call TriggerAddAction( gg_trg_pathLHordeCamp, function Trig_pathLHordeCamp_Actions )
endfunction
function Trig_pathRAllyCamp_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nmdm' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'hcth' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'orai' ) ) then
return false
endif
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nzep' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[10]) == false ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[11]) == false ) ) then
return false
endif
return true
endfunction
function Trig_pathRAllyCamp_Actions takes nothing returns nothing
local location loc
if ( GetOwningPlayer(GetEnteringUnit()) == Player(5) ) then
set loc = GetRectCenter(gg_rct_pathRCorner)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
if ( GetOwningPlayer(GetEnteringUnit()) == Player(6) ) then
set loc = GetRectCenter(gg_rct_spawnGoodRight)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_pathRAllyCamp takes nothing returns nothing
set gg_trg_pathRAllyCamp = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_pathRAllyCamp, gg_rct_pathRAllyCamp )
call TriggerAddCondition( gg_trg_pathRAllyCamp, Condition( function Trig_pathRAllyCamp_Conditions ) )
call TriggerAddAction( gg_trg_pathRAllyCamp, function Trig_pathRAllyCamp_Actions )
endfunction
function Trig_pathRCorner_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nmdm' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'hcth' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'orai' ) ) then
return false
endif
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nzep' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[10]) == false ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[11]) == false ) ) then
return false
endif
return true
endfunction
function Trig_pathRCorner_Actions takes nothing returns nothing
local location loc
if ( GetOwningPlayer(GetEnteringUnit()) == Player(5) ) then
set loc = GetRectCenter(gg_rct_pathRHordeCamp)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
if ( GetOwningPlayer(GetEnteringUnit()) == Player(6) ) then
set loc = GetRectCenter(gg_rct_pathRAllyCamp)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_pathRCorner takes nothing returns nothing
set gg_trg_pathRCorner = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_pathRCorner, gg_rct_pathRCorner )
call TriggerAddCondition( gg_trg_pathRCorner, Condition( function Trig_pathRCorner_Conditions ) )
call TriggerAddAction( gg_trg_pathRCorner, function Trig_pathRCorner_Actions )
endfunction
function Trig_pathRHordeCamp_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nmdm' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'hcth' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'orai' ) ) then
return false
endif
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nzep' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[10]) == false ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[11]) == false ) ) then
return false
endif
return true
endfunction
function Trig_pathRHordeCamp_Actions takes nothing returns nothing
local location loc
if ( GetOwningPlayer(GetEnteringUnit()) == Player(5) ) then
set loc = GetRectCenter(gg_rct_spawnEvilRight)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
if ( GetOwningPlayer(GetEnteringUnit()) == Player(6) ) then
set loc = GetRectCenter(gg_rct_pathRCorner)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_pathRHordeCamp takes nothing returns nothing
set gg_trg_pathRHordeCamp = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_pathRHordeCamp, gg_rct_pathRHordeCamp )
call TriggerAddCondition( gg_trg_pathRHordeCamp, Condition( function Trig_pathRHordeCamp_Conditions ) )
call TriggerAddAction( gg_trg_pathRHordeCamp, function Trig_pathRHordeCamp_Actions )
endfunction
function Trig_pathAllyCentreLinks_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nmdm' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'hcth' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'orai' ) ) then
return false
endif
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nzep' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[10]) == false ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[11]) == false ) ) then
return false
endif
return true
endfunction
function Trig_pathAllyCentreLinks_Actions takes nothing returns nothing
local location loc
if ( GetOwningPlayer(GetEnteringUnit()) == Player(5) ) then
set loc = GetRectCenter(gg_rct_pathCentreLinks)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
if ( GetOwningPlayer(GetEnteringUnit()) == Player(6) ) then
set loc = GetRectCenter(gg_rct_pathKnotenpunktAlly)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_pathAllyCentreLinks takes nothing returns nothing
set gg_trg_pathAllyCentreLinks = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_pathAllyCentreLinks, gg_rct_pathAllyCentreLinks )
call TriggerAddCondition( gg_trg_pathAllyCentreLinks, Condition( function Trig_pathAllyCentreLinks_Conditions ) )
call TriggerAddAction( gg_trg_pathAllyCentreLinks, function Trig_pathAllyCentreLinks_Actions )
endfunction
function Trig_pathHordeCentreLinks_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nmdm' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'hcth' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'orai' ) ) then
return false
endif
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nzep' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[10]) == false ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[11]) == false ) ) then
return false
endif
return true
endfunction
function Trig_pathHordeCentreLinks_Actions takes nothing returns nothing
local location loc
if ( GetOwningPlayer(GetEnteringUnit()) == Player(5) ) then
set loc = GetRectCenter(gg_rct_pathKnotenpunktHorde)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
if ( GetOwningPlayer(GetEnteringUnit()) == Player(6) ) then
set loc = GetRectCenter(gg_rct_pathCentreLinks)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_pathHordeCentreLinks takes nothing returns nothing
set gg_trg_pathHordeCentreLinks = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_pathHordeCentreLinks, gg_rct_pathHordeCentreLinks )
call TriggerAddCondition( gg_trg_pathHordeCentreLinks, Condition( function Trig_pathHordeCentreLinks_Conditions ) )
call TriggerAddAction( gg_trg_pathHordeCentreLinks, function Trig_pathHordeCentreLinks_Actions )
endfunction
function Trig_pathCentreLinks_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nmdm' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'hcth' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'orai' ) ) then
return false
endif
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nzep' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[10]) == false ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[11]) == false ) ) then
return false
endif
return true
endfunction
function Trig_pathCentreLinks_Actions takes nothing returns nothing
local location loc
if ( GetOwningPlayer(GetEnteringUnit()) == Player(5) ) then
set loc = GetRectCenter(gg_rct_pathHordeCentreLinks)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
if ( GetOwningPlayer(GetEnteringUnit()) == Player(6) ) then
set loc = GetRectCenter(gg_rct_pathAllyCentreLinks)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_pathCentreLinks takes nothing returns nothing
set gg_trg_pathCentreLinks = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_pathCentreLinks, gg_rct_pathCentreLinks )
call TriggerAddCondition( gg_trg_pathCentreLinks, Condition( function Trig_pathCentreLinks_Conditions ) )
call TriggerAddAction( gg_trg_pathCentreLinks, function Trig_pathCentreLinks_Actions )
endfunction
function Trig_pathAllyCentreRechts_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nmdm' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'hcth' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'orai' ) ) then
return false
endif
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nzep' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[10]) == false ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[11]) == false ) ) then
return false
endif
return true
endfunction
function Trig_pathAllyCentreRechts_Actions takes nothing returns nothing
local location loc
if ( GetOwningPlayer(GetEnteringUnit()) == Player(5) ) then
set loc = GetRectCenter(gg_rct_pathCentreRechts)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
if ( GetOwningPlayer(GetEnteringUnit()) == Player(6) ) then
set loc = GetRectCenter(gg_rct_pathKnotenpunktAlly)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_pathAllyCentreRechts takes nothing returns nothing
set gg_trg_pathAllyCentreRechts = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_pathAllyCentreRechts, gg_rct_pathAllyCentreRechts )
call TriggerAddCondition( gg_trg_pathAllyCentreRechts, Condition( function Trig_pathAllyCentreRechts_Conditions ) )
call TriggerAddAction( gg_trg_pathAllyCentreRechts, function Trig_pathAllyCentreRechts_Actions )
endfunction
function Trig_pathHordeCentreRechts_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nmdm' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'hcth' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'orai' ) ) then
return false
endif
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nzep' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[10]) == false ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[11]) == false ) ) then
return false
endif
return true
endfunction
function Trig_pathHordeCentreRechts_Actions takes nothing returns nothing
local location loc
if ( GetOwningPlayer(GetEnteringUnit()) == Player(5) ) then
set loc = GetRectCenter(gg_rct_pathKnotenpunktHorde)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
if ( GetOwningPlayer(GetEnteringUnit()) == Player(6) ) then
set loc = GetRectCenter(gg_rct_pathCentreRechts)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_pathHordeCentreRechts takes nothing returns nothing
set gg_trg_pathHordeCentreRechts = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_pathHordeCentreRechts, gg_rct_pathHordeCentreRechts )
call TriggerAddCondition( gg_trg_pathHordeCentreRechts, Condition( function Trig_pathHordeCentreRechts_Conditions ) )
call TriggerAddAction( gg_trg_pathHordeCentreRechts, function Trig_pathHordeCentreRechts_Actions )
endfunction
function Trig_pathCentreRechts_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nmdm' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'hcth' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'orai' ) ) then
return false
endif
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnteringUnit()) != Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nzep' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[10]) == false ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[11]) == false ) ) then
return false
endif
return true
endfunction
function Trig_pathCentreRechts_Actions takes nothing returns nothing
local location loc
if ( GetOwningPlayer(GetEnteringUnit()) == Player(5) ) then
set loc = GetRectCenter(gg_rct_pathHordeCentreRechts)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
if ( GetOwningPlayer(GetEnteringUnit()) == Player(6) ) then
set loc = GetRectCenter(gg_rct_pathAllyCentreRechts)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_pathCentreRechts takes nothing returns nothing
set gg_trg_pathCentreRechts = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_pathCentreRechts, gg_rct_pathCentreRechts )
call TriggerAddCondition( gg_trg_pathCentreRechts, Condition( function Trig_pathCentreRechts_Conditions ) )
call TriggerAddAction( gg_trg_pathCentreRechts, function Trig_pathCentreRechts_Actions )
endfunction
function Trig_pathKnotenpunktHorde_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnteringUnit()) == Player(5) ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nmdm' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'hcth' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'orai' ) ) then
return false
endif
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nzep' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[10]) == false ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[11]) == false ) ) then
return false
endif
return true
endfunction
function Trig_pathKnotenpunktHorde_Actions takes nothing returns nothing
local location loc
set loc = GetRectCenter(gg_rct_pathGoodGoal)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_pathKnotenpunktHorde takes nothing returns nothing
set gg_trg_pathKnotenpunktHorde = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_pathKnotenpunktHorde, gg_rct_pathKnotenpunktHorde )
call TriggerAddCondition( gg_trg_pathKnotenpunktHorde, Condition( function Trig_pathKnotenpunktHorde_Conditions ) )
call TriggerAddAction( gg_trg_pathKnotenpunktHorde, function Trig_pathKnotenpunktHorde_Actions )
endfunction
function Trig_pathKnotenpunktHorde_Redirect_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnteringUnit()) == Player(6) ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nmdm' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'hcth' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'orai' ) ) then
return false
endif
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nzep' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[10]) == false ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[11]) == false ) ) then
return false
endif
return true
endfunction
function Trig_pathKnotenpunktHorde_Redirect_Actions takes nothing returns nothing
local location loc
if ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[6]) == true ) then
set loc = GetRectCenter(gg_rct_pathHordeCentreLinks)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
if ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[8]) == true ) then
set loc = GetRectCenter(gg_rct_pathHordeCentreRechts)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
set loc = GetRectCenter(gg_rct_pathMidHorde)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
endif
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_pathKnotenpunktHorde_Redirect takes nothing returns nothing
set gg_trg_pathKnotenpunktHorde_Redirect = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_pathKnotenpunktHorde_Redirect, gg_rct_pathKnotenpunktHorde )
call TriggerAddCondition( gg_trg_pathKnotenpunktHorde_Redirect, Condition( function Trig_pathKnotenpunktHorde_Redirect_Conditions ) )
call TriggerAddAction( gg_trg_pathKnotenpunktHorde_Redirect, function Trig_pathKnotenpunktHorde_Redirect_Actions )
endfunction
function Trig_pathKnotenpunktAlly_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnteringUnit()) == Player(6) ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nmdm' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'hcth' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'orai' ) ) then
return false
endif
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nzep' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[10]) == false ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[11]) == false ) ) then
return false
endif
return true
endfunction
function Trig_pathKnotenpunktAlly_Actions takes nothing returns nothing
local location loc
set loc = GetRectCenter(gg_rct_pathEvilGoal)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_pathKnotenpunktAlly takes nothing returns nothing
set gg_trg_pathKnotenpunktAlly = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_pathKnotenpunktAlly, gg_rct_pathKnotenpunktAlly )
call TriggerAddCondition( gg_trg_pathKnotenpunktAlly, Condition( function Trig_pathKnotenpunktAlly_Conditions ) )
call TriggerAddAction( gg_trg_pathKnotenpunktAlly, function Trig_pathKnotenpunktAlly_Actions )
endfunction
function Trig_pathKnotenpunktAlly_Redirect_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnteringUnit()) == Player(5) ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nmdm' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'hcth' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'orai' ) ) then
return false
endif
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nzep' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[10]) == false ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[11]) == false ) ) then
return false
endif
return true
endfunction
function Trig_pathKnotenpunktAlly_Redirect_Actions takes nothing returns nothing
local location loc
if ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[1]) == true ) then
set loc = GetRectCenter(gg_rct_pathAllyCentreLinks)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
if ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[3]) == true ) then
set loc = GetRectCenter(gg_rct_pathAllyCentreRechts)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
else
set loc = GetRectCenter(gg_rct_pathMidAlly)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
endif
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_pathKnotenpunktAlly_Redirect takes nothing returns nothing
set gg_trg_pathKnotenpunktAlly_Redirect = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_pathKnotenpunktAlly_Redirect, gg_rct_pathKnotenpunktAlly )
call TriggerAddCondition( gg_trg_pathKnotenpunktAlly_Redirect, Condition( function Trig_pathKnotenpunktAlly_Redirect_Conditions ) )
call TriggerAddAction( gg_trg_pathKnotenpunktAlly_Redirect, function Trig_pathKnotenpunktAlly_Redirect_Actions )
endfunction
function Trig_AllyCharge_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnteringUnit()) == Player(5) ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nmdm' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'hcth' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'orai' ) ) then
return false
endif
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nzep' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[10]) == false ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[11]) == false ) ) then
return false
endif
return true
endfunction
function Trig_AllyCharge_Actions takes nothing returns nothing
local location loc
set loc = GetRectCenter(gg_rct_pathGoodGoal)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_AllyCharge takes nothing returns nothing
set gg_trg_AllyCharge = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_AllyCharge, gg_rct_spawnEvilRight )
call TriggerRegisterEnterRectSimple( gg_trg_AllyCharge, gg_rct_spawnEvilLeft )
call TriggerAddCondition( gg_trg_AllyCharge, Condition( function Trig_AllyCharge_Conditions ) )
call TriggerAddAction( gg_trg_AllyCharge, function Trig_AllyCharge_Actions )
endfunction
function Trig_HordeCharge_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnteringUnit()) == Player(6) ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nmdm' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'hcth' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'orai' ) ) then
return false
endif
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetEnteringUnit()) != 'nzep' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[10]) == false ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_spawngruppe[11]) == false ) ) then
return false
endif
return true
endfunction
function Trig_HordeCharge_Actions takes nothing returns nothing
local location loc
set loc = GetRectCenter(gg_rct_pathEvilGoal)
call IssuePointOrderLocBJ( GetEnteringUnit(), "attack", loc )
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_HordeCharge takes nothing returns nothing
set gg_trg_HordeCharge = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_HordeCharge, gg_rct_spawnGoodLeft )
call TriggerRegisterEnterRectSimple( gg_trg_HordeCharge, gg_rct_spawnGoodRight )
call TriggerAddCondition( gg_trg_HordeCharge, Condition( function Trig_HordeCharge_Conditions ) )
call TriggerAddAction( gg_trg_HordeCharge, function Trig_HordeCharge_Actions )
endfunction
function Trig_Antistuck_Abilities_Conditions takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A038' ) or ( GetSpellAbilityId() == 'A039' ) ) then
return true
endif
return false
endfunction
function Trig_Antistuck_Abilities_Actions takes nothing returns nothing
local unit caster
set caster = GetSpellAbilityUnit()
call PolledWait( 0.10 )
call IssueLastOrder( caster )
endfunction
//===========================================================================
function InitTrig_Antistuck_Abilities takes nothing returns nothing
set gg_trg_Antistuck_Abilities = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Antistuck_Abilities, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Antistuck_Abilities, Condition( function Trig_Antistuck_Abilities_Conditions ) )
call TriggerAddAction( gg_trg_Antistuck_Abilities, function Trig_Antistuck_Abilities_Actions )
endfunction
function Trig_Ordersave_object_Actions takes nothing returns nothing
call SetHandleString( GetOrderedUnit(), "ordertype", "objectorder")
call SetHandleInt(GetOrderedUnit(), "order", GetIssuedOrderId() )
call SetHandleHandle( GetOrderedUnit(), "ordertarget", GetOrderTarget())
endfunction
//===========================================================================
function InitTrig_Ordersave_object takes nothing returns nothing
set gg_trg_Ordersave_object = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ordersave_object, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerAddCondition(gg_trg_Ordersave_object, Condition(function Ordersave_Conditions) )
call TriggerAddAction( gg_trg_Ordersave_object, function Trig_Ordersave_object_Actions )
endfunction
function Ordersave_Conditions takes nothing returns boolean
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("attack") ) and ( ( GetOwningPlayer(GetOrderedUnit()) == Player(5) ) or ( GetOwningPlayer(GetOrderedUnit()) == Player(6) ) ) ) then
return true
else
return false
endif
endfunction
function Trig_Ordersave_loc_Actions takes nothing returns nothing
local location loc = GetOrderPointLoc()
local string issuedorder = OrderId2String(GetIssuedOrderIdBJ())
call SetHandleString( GetOrderedUnit(), "ordertype", "pointorder")
call SetHandleInt(GetOrderedUnit(), "order", GetIssuedOrderId() )
call SetHandleReal( GetOrderedUnit(), "ordertargetX", GetLocationX(loc))
call SetHandleReal( GetOrderedUnit(), "ordertargetY", GetLocationY(loc))
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Ordersave_loc takes nothing returns nothing
set gg_trg_Ordersave_loc = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ordersave_loc, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddCondition(gg_trg_Ordersave_loc, Condition(function Ordersave_Conditions) )
call TriggerAddAction( gg_trg_Ordersave_loc, function Trig_Ordersave_loc_Actions )
endfunction
function Trig_Ordersave_immediate_Actions takes nothing returns nothing
call SetHandleString( GetOrderedUnit(), "ordertype", "immediateorder")
call SetHandleInt(GetOrderedUnit(), "order", GetIssuedOrderId() )
endfunction
//===========================================================================
function InitTrig_Ordersave_immediate takes nothing returns nothing
set gg_trg_Ordersave_immediate = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ordersave_immediate, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition(gg_trg_Ordersave_immediate, Condition(function Ordersave_Conditions) )
call TriggerAddAction( gg_trg_Ordersave_immediate, function Trig_Ordersave_immediate_Actions )
endfunction
function Trig_Ordersave_GetOrder_Actions takes nothing returns nothing
call GetOrder( GroupPickRandomUnit(GetUnitsSelectedAll(Player(0))) )
endfunction
//===========================================================================
function InitTrig_Ordersave_GetOrder takes nothing returns nothing
set gg_trg_Ordersave_GetOrder = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Ordersave_GetOrder, Player(0), "getorder", true )
call TriggerAddAction( gg_trg_Ordersave_GetOrder, function Trig_Ordersave_GetOrder_Actions )
endfunction
function Trig_Impending_Doom_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0A5' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellAbilityUnit()) == 'nbal' ) ) then
return false
endif
return true
endfunction
function Trig_Impending_Doom_Actions takes nothing returns nothing
local unit doomtarget
local unit doomcaster
set doomtarget = GetSpellTargetUnit()
set doomcaster = GetSpellAbilityUnit()
call AddSpecialEffectTargetUnitBJ( "chest", doomtarget, "Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl" )
call TriggerSleepAction( 10.00 )
if ( UnitHasBuffBJ(doomtarget, 'B01O') ) then
call UnitRemoveBuffBJ( 'B01O', doomtarget )
call UnitDamageTargetBJ( doomcaster, doomtarget, 1000.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_LIGHTNING )
call AddSpecialEffectTargetUnitBJ( "origin", doomtarget, "Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl" )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Impending_Doom takes nothing returns nothing
set gg_trg_Impending_Doom = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Impending_Doom, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Impending_Doom, Condition( function Trig_Impending_Doom_Conditions ) )
call TriggerAddAction( gg_trg_Impending_Doom, function Trig_Impending_Doom_Actions )
endfunction
function Trig_Poison_Nova_Spawn_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03F' ) ) then
return false
endif
return true
endfunction
function Trig_Poison_Nova_Spawn_Func021002 takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnumUnit(), "move", PolarProjectionBJ(GetUnitLoc(GetEnumUnit()), 750.00, GetUnitFacing(GetEnumUnit())) )
endfunction
function Trig_Poison_Nova_Spawn_Actions takes nothing returns nothing
local integer i = 1
local location loc = GetUnitLoc(gg_unit_H01C_0416)
local group g
loop
exitwhen i == 20
call CreateNUnitsAtLoc( 1, 'e005', GetOwningPlayer(gg_unit_H01C_0416), loc, i*18 )
set i = i + 1
endloop
set g = GetUnitsOfTypeIdAll('e005')
call ForGroupBJ( g, function Trig_Poison_Nova_Spawn_Func021002 )
call RemoveLocation( loc)
set loc = null
call DestroyGroup( g)
set g = null
endfunction
//===========================================================================
function InitTrig_Poison_Nova_Spawn takes nothing returns nothing
set gg_trg_Poison_Nova_Spawn = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Poison_Nova_Spawn, gg_unit_H01C_0416, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Poison_Nova_Spawn, Condition( function Trig_Poison_Nova_Spawn_Conditions ) )
call TriggerAddAction( gg_trg_Poison_Nova_Spawn, function Trig_Poison_Nova_Spawn_Actions )
endfunction
function Trig_Decoy_Inner_Sight_Func007C takes nothing returns boolean
if ( ( GetUnitTypeId(GetSpellAbilityUnit()) == 'e00O' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetSpellAbilityUnit()) == 'e00L' ) ) then
return true
endif
return false
endfunction
function Trig_Decoy_Inner_Sight_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06Q' ) ) then
return false
endif
if ( not Trig_Decoy_Inner_Sight_Func007C() ) then
return false
endif
return true
endfunction
function Trig_Decoy_Inner_Sight_Func005001003001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Decoy_Inner_Sight_Func005001003002001 takes nothing returns boolean
return ( IsPlayerAlly(GetOwningPlayer(GetFilterUnit()), GetOwningPlayer(gg_unit_H01H_0198)) == true )
endfunction
function Trig_Decoy_Inner_Sight_Func005001003002002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Decoy_Inner_Sight_Func005001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Decoy_Inner_Sight_Func005001003002001(), Trig_Decoy_Inner_Sight_Func005001003002002() )
endfunction
function Trig_Decoy_Inner_Sight_Func005001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Decoy_Inner_Sight_Func005001003001(), Trig_Decoy_Inner_Sight_Func005001003002() )
endfunction
function Trig_Decoy_Inner_Sight_Func005A takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'h01S', GetOwningPlayer(gg_unit_H01H_0198), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "innerfire", GetEnumUnit() )
endfunction
function Trig_Decoy_Inner_Sight_Actions takes nothing returns nothing
local location loc
local group g
set loc = GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLoc( 1, 'h01P', GetOwningPlayer(gg_unit_H01H_0198), loc, bj_UNIT_FACING )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "howlofterror" )
call CreateNUnitsAtLoc( 1, 'h01S', GetOwningPlayer(gg_unit_H01H_0198), loc, bj_UNIT_FACING )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "innerfire", GetSpellAbilityUnit() )
set g = GetUnitsInRangeOfLocMatching(400.00, GetUnitLoc(GetSpellAbilityUnit()), Condition(function Trig_Decoy_Inner_Sight_Func005001003))
call ForGroupBJ( g, function Trig_Decoy_Inner_Sight_Func005A )
call DestroyGroup(g)
set g = null
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Decoy_Inner_Sight takes nothing returns nothing
set gg_trg_Decoy_Inner_Sight = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Decoy_Inner_Sight, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Decoy_Inner_Sight, Condition( function Trig_Decoy_Inner_Sight_Conditions ) )
call TriggerAddAction( gg_trg_Decoy_Inner_Sight, function Trig_Decoy_Inner_Sight_Actions )
endfunction
function Trig_Decoy_Haste_Func004C takes nothing returns boolean
if ( ( GetUnitTypeId(GetSpellAbilityUnit()) == 'e00O' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetSpellAbilityUnit()) == 'e00L' ) ) then
return true
endif
return false
endfunction
function Trig_Decoy_Haste_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06W' ) ) then
return false
endif
if ( not Trig_Decoy_Haste_Func004C() ) then
return false
endif
return true
endfunction
function Trig_Decoy_Haste_Actions takes nothing returns nothing
local location loc
set loc = GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLoc( 1, 'h01T', GetOwningPlayer(gg_unit_H01H_0198), loc, bj_UNIT_FACING )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "drunkenhaze", GetSpellAbilityUnit() )
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Decoy_Haste takes nothing returns nothing
set gg_trg_Decoy_Haste = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Decoy_Haste, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Decoy_Haste, Condition( function Trig_Decoy_Haste_Conditions ) )
call TriggerAddAction( gg_trg_Decoy_Haste, function Trig_Decoy_Haste_Actions )
endfunction
function Trig_Decoy_Strafe_Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetSpellAbilityUnit()) == 'e00O' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetSpellAbilityUnit()) == 'e00L' ) ) then
return true
endif
return false
endfunction
function Trig_Decoy_Strafe_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06R' ) ) then
return false
endif
if ( not Trig_Decoy_Strafe_Func003C() ) then
return false
endif
return true
endfunction
function Trig_Decoy_Strafe_Func001001003001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Decoy_Strafe_Func001001003002001 takes nothing returns boolean
return ( IsPlayerEnemy(GetOwningPlayer(GetFilterUnit()), GetOwningPlayer(gg_unit_H01H_0198)) == true )
endfunction
function Trig_Decoy_Strafe_Func001001003002002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Decoy_Strafe_Func001001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Decoy_Strafe_Func001001003002001(), Trig_Decoy_Strafe_Func001001003002002() )
endfunction
function Trig_Decoy_Strafe_Func001001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Decoy_Strafe_Func001001003001(), Trig_Decoy_Strafe_Func001001003002() )
endfunction
function Trig_Decoy_Strafe_Func001A takes nothing returns nothing
local location locus
set locus = GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLoc( 1, 'h01Q', GetOwningPlayer(gg_unit_H01H_0198), locus, bj_UNIT_FACING )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attack", GetEnumUnit() )
call RemoveLocation(locus)
set locus = null
endfunction
function Trig_Decoy_Strafe_Actions takes nothing returns nothing
local location loc
local group g
set loc = GetSpellTargetLoc()
set g = GetUnitsInRangeOfLocMatching(160.00, loc, Condition(function Trig_Decoy_Strafe_Func001001003))
call ForGroupBJ( g, function Trig_Decoy_Strafe_Func001A )
call DestroyGroup(g)
set g = null
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Decoy_Strafe takes nothing returns nothing
set gg_trg_Decoy_Strafe = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Decoy_Strafe, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Decoy_Strafe, Condition( function Trig_Decoy_Strafe_Conditions ) )
call TriggerAddAction( gg_trg_Decoy_Strafe, function Trig_Decoy_Strafe_Actions )
endfunction
function Trig_Haste_Cast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06V' ) ) then
return false
endif
return true
endfunction
function Trig_Haste_Cast_Actions takes nothing returns nothing
local location loc
set loc = GetUnitLoc(gg_unit_H01H_0198)
call CreateNUnitsAtLoc( 1, 'h01R', GetOwningPlayer(gg_unit_H01H_0198), loc, bj_UNIT_FACING )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "drunkenhaze", GetSpellAbilityUnit() )
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Haste_Cast takes nothing returns nothing
set gg_trg_Haste_Cast = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Haste_Cast, gg_unit_H01H_0198, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Haste_Cast, Condition( function Trig_Haste_Cast_Conditions ) )
call TriggerAddAction( gg_trg_Haste_Cast, function Trig_Haste_Cast_Actions )
endfunction
function Trig_Mark_of_the_Crusader_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A09Z' ) ) then
return false
endif
return true
endfunction
function Trig_Mark_of_the_Crusader_Effects_Func001C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A09Z', udg_HeroID[0]) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Mark_of_the_Crusader_Effects_Func002C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A09Z', udg_HeroID[0]) == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Mark_of_the_Crusader_Effects_Func003C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A09Z', udg_HeroID[0]) == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Mark_of_the_Crusader_Effects_Func004C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A09Z', udg_HeroID[0]) == 4 ) ) then
return false
endif
return true
endfunction
function Trig_Mark_of_the_Crusader_Effects_Func005C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A09Z', udg_HeroID[0]) == 5 ) ) then
return false
endif
return true
endfunction
function Trig_Mark_of_the_Crusader_Check takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetTriggerUnit(), 'B01N') == false ) ) then
return false
endif
return true
endfunction
function Trig_Mark_of_the_Crusader_Actions takes nothing returns nothing
local unit u
set u = GetSpellTargetUnit()
call UnitRemoveAbilityBJ( 'A00U', u )
call UnitRemoveAbilityBJ( 'A00X', u )
call UnitRemoveAbilityBJ( 'A018', u )
call UnitRemoveAbilityBJ( 'A01B', u )
call UnitRemoveAbilityBJ( 'A01A', u )
if ( Trig_Mark_of_the_Crusader_Effects_Func001C() ) then
call UnitAddAbilityBJ( 'A00U', u )
else
call DoNothing( )
endif
if ( Trig_Mark_of_the_Crusader_Effects_Func002C() ) then
call UnitAddAbilityBJ( 'A00X', u )
else
call DoNothing( )
endif
if ( Trig_Mark_of_the_Crusader_Effects_Func003C() ) then
call UnitAddAbilityBJ( 'A018', u )
else
call DoNothing( )
endif
if ( Trig_Mark_of_the_Crusader_Effects_Func004C() ) then
call UnitAddAbilityBJ( 'A01A', u )
else
call DoNothing( )
endif
if ( Trig_Mark_of_the_Crusader_Effects_Func005C() ) then
call UnitAddAbilityBJ( 'A01B', u )
else
call DoNothing( )
endif
call PolledWait( 60.00 )
if ( Trig_Mark_of_the_Crusader_Check() ) then
call UnitRemoveAbilityBJ( 'A00U', u )
call UnitRemoveAbilityBJ( 'A00X', u )
call UnitRemoveAbilityBJ( 'A018', u )
call UnitRemoveAbilityBJ( 'A01B', u )
call UnitRemoveAbilityBJ( 'A01A', u )
else
call DoNothing( )
endif
call PolledWait( 0.50 )
if ( Trig_Mark_of_the_Crusader_Check() ) then
call UnitRemoveAbilityBJ( 'A00U', u )
call UnitRemoveAbilityBJ( 'A00X', u )
call UnitRemoveAbilityBJ( 'A018', u )
call UnitRemoveAbilityBJ( 'A01B', u )
call UnitRemoveAbilityBJ( 'A01A', u )
else
call DoNothing( )
endif
call PolledWait( 0.50 )
if ( Trig_Mark_of_the_Crusader_Check() ) then
call UnitRemoveAbilityBJ( 'A00U', u )
call UnitRemoveAbilityBJ( 'A00X', u )
call UnitRemoveAbilityBJ( 'A018', u )
call UnitRemoveAbilityBJ( 'A01B', u )
call UnitRemoveAbilityBJ( 'A01A', u )
else
call DoNothing( )
endif
call PolledWait( 0.50 )
if ( Trig_Mark_of_the_Crusader_Check() ) then
call UnitRemoveAbilityBJ( 'A00U', u )
call UnitRemoveAbilityBJ( 'A00X', u )
call UnitRemoveAbilityBJ( 'A018', u )
call UnitRemoveAbilityBJ( 'A01B', u )
call UnitRemoveAbilityBJ( 'A01A', u )
else
call DoNothing( )
endif
call PolledWait( 0.50 )
if ( Trig_Mark_of_the_Crusader_Check() ) then
call UnitRemoveAbilityBJ( 'A00U', u )
call UnitRemoveAbilityBJ( 'A00X', u )
call UnitRemoveAbilityBJ( 'A018', u )
call UnitRemoveAbilityBJ( 'A01B', u )
call UnitRemoveAbilityBJ( 'A01A', u )
else
call DoNothing( )
endif
call PolledWait( 1.00 )
if ( Trig_Mark_of_the_Crusader_Check() ) then
call UnitRemoveAbilityBJ( 'A00U', u )
call UnitRemoveAbilityBJ( 'A00X', u )
call UnitRemoveAbilityBJ( 'A018', u )
call UnitRemoveAbilityBJ( 'A01B', u )
call UnitRemoveAbilityBJ( 'A01A', u )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Mark_of_the_Crusader takes nothing returns nothing
set gg_trg_Mark_of_the_Crusader = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mark_of_the_Crusader, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Mark_of_the_Crusader, Condition( function Trig_Mark_of_the_Crusader_Conditions ) )
call TriggerAddAction( gg_trg_Mark_of_the_Crusader, function Trig_Mark_of_the_Crusader_Actions )
endfunction
function Trig_Wrath_of_God_Init_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'oeye' ) ) then
return false
endif
return true
endfunction
function Trig_Wrath_of_God_Init_Actions takes nothing returns nothing
local unit caster = GetSummoningUnit()
local unit summon = GetSummonedUnit()
local real timerinterval = 0.02
local location loc1 = GetUnitLoc(summon)
local location loc2 = GetUnitLoc(caster)
call CreateNUnitsAtLocFacingLocBJ( 1, 'h02R', GetOwningPlayer(caster), PolarProjectionBJ(loc1, 300.00, AngleBetweenPoints(loc2, loc1)), loc1 )
set udg_g_genericunit[22] = GetLastCreatedUnit()
call RemoveUnit( summon)
call SetUnitUserData( udg_g_genericunit[22] , 0 )
call StartTimerBJ( udg_g_generictimer[2], true, timerinterval )
call RemoveLocation(loc1)
call RemoveLocation(loc2)
set loc1 = null
set loc2 = null
endfunction
//===========================================================================
function InitTrig_Wrath_of_God_Init takes nothing returns nothing
set gg_trg_Wrath_of_God_Init = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Wrath_of_God_Init, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Wrath_of_God_Init, Condition( function Trig_Wrath_of_God_Init_Conditions ) )
call TriggerAddAction( gg_trg_Wrath_of_God_Init, function Trig_Wrath_of_God_Init_Actions )
endfunction
function SpawnExplosion takes location loc returns nothing
local location p
local unit pala = udg_HeroID[0]
call CreateNUnitsAtLoc( 1, 'h02Q', GetOwningPlayer(pala), loc, bj_UNIT_FACING )
call SetUnitAbilityLevel( GetLastCreatedUnit(), 'A0BN', GetUnitAbilityLevel(pala, 'A0BO') )
set p = GetUnitLoc( GetLastCreatedUnit())
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "flamestrike", p )
call UnitApplyTimedLifeBJ( 3.00, 'BTLF', GetLastCreatedUnit() )
call RemoveLocation(p)
set p = null
endfunction
function Trig_Wrath_of_God_Periodic_Actions takes nothing returns nothing
local unit pala = udg_HeroID[0]
local unit engel = udg_g_genericunit[22]
local real face = GetUnitFacing( engel)
local location loc = GetUnitLoc( engel)
local location point = loc
local real range = 300
local real tweak = 0
call SetUnitUserData(engel, GetUnitUserData(engel) + 1)
if (GetUnitUserData(engel) == 87 + tweak) then
set point = PolarProjectionBJ(loc, range, face - 15 )
call SpawnExplosion(point)
endif
if (GetUnitUserData(engel) == 90 + tweak) then
set point = PolarProjectionBJ(loc, range, face )
call SpawnExplosion(point)
endif
if (GetUnitUserData(engel) == 93 + tweak) then
set point = PolarProjectionBJ(loc, range, face + 15 )
call SpawnExplosion(point)
endif
if (GetUnitUserData(engel) == 96 + tweak) then
set point = PolarProjectionBJ(loc, range, face + 30 )
call SpawnExplosion(point)
endif
if (GetUnitUserData(engel) == 250 ) then
call RemoveUnit(engel)
call PauseTimer(GetExpiredTimer())
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Wrath_of_God_Periodic takes nothing returns nothing
set gg_trg_Wrath_of_God_Periodic = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Wrath_of_God_Periodic, udg_g_generictimer[2] )
call TriggerAddAction( gg_trg_Wrath_of_God_Periodic, function Trig_Wrath_of_God_Periodic_Actions )
endfunction
function Trig_Mark_of_the_Wild_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01C' ) ) then
return false
endif
return true
endfunction
function Trig_Mark_of_the_Wild_Buffcheck takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetTriggerUnit(), 'B00H') == false ) ) then
return false
endif
return true
endfunction
function Trig_Mark_of_the_Wild_Levelcheck1 takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A01C', udg_HeroID[6]) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Mark_of_the_Wild_Levelcheck2 takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A01C', udg_HeroID[6]) == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Mark_of_the_Wild_Levelcheck3 takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A01C', udg_HeroID[6]) == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Mark_of_the_Wild_Levelcheck4 takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A01C', udg_HeroID[6]) == 4 ) ) then
return false
endif
return true
endfunction
function Trig_Mark_of_the_Wild_Levelcheck5 takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A01C', udg_HeroID[6]) == 5 ) ) then
return false
endif
return true
endfunction
function Trig_Mark_of_the_Wild_Actions takes nothing returns nothing
local unit u
set u = GetSpellTargetUnit()
call UnitRemoveAbilityBJ( 'A01I', u )
call UnitRemoveAbilityBJ( 'A01W', u )
call UnitRemoveAbilityBJ( 'A02C', u )
call UnitRemoveAbilityBJ( 'A02K', u )
call UnitRemoveAbilityBJ( 'A02L', u )
call UnitRemoveAbilityBJ( 'A01K', u )
call UnitRemoveAbilityBJ( 'A02M', u )
call UnitRemoveAbilityBJ( 'A02N', u )
call UnitRemoveAbilityBJ( 'A02R', u )
call UnitRemoveAbilityBJ( 'A033', u )
if ( Trig_Mark_of_the_Wild_Levelcheck1() ) then
call UnitAddAbilityBJ( 'A01I', u )
call UnitAddAbilityBJ( 'A01K', u )
else
call DoNothing( )
endif
if ( Trig_Mark_of_the_Wild_Levelcheck2() ) then
call UnitAddAbilityBJ( 'A01W', u )
call UnitAddAbilityBJ( 'A02M', u )
else
call DoNothing( )
endif
if ( Trig_Mark_of_the_Wild_Levelcheck3() ) then
call UnitAddAbilityBJ( 'A02C', u )
call UnitAddAbilityBJ( 'A02N', u )
else
call DoNothing( )
endif
if ( Trig_Mark_of_the_Wild_Levelcheck4() ) then
call UnitAddAbilityBJ( 'A02K', u )
call UnitAddAbilityBJ( 'A02R', u )
else
call DoNothing( )
endif
if ( Trig_Mark_of_the_Wild_Levelcheck5() ) then
call UnitAddAbilityBJ( 'A02L', u )
call UnitAddAbilityBJ( 'A033', u )
else
call DoNothing( )
endif
call PolledWait( 60.00 )
if ( Trig_Mark_of_the_Wild_Buffcheck() ) then
call UnitRemoveAbilityBJ( 'A01I', u )
call UnitRemoveAbilityBJ( 'A01W', u )
call UnitRemoveAbilityBJ( 'A02C', u )
call UnitRemoveAbilityBJ( 'A02K', u )
call UnitRemoveAbilityBJ( 'A02L', u )
call UnitRemoveAbilityBJ( 'A01K', u )
call UnitRemoveAbilityBJ( 'A02M', u )
call UnitRemoveAbilityBJ( 'A02N', u )
call UnitRemoveAbilityBJ( 'A02R', u )
call UnitRemoveAbilityBJ( 'A033', u )
else
call DoNothing( )
endif
call PolledWait( 0.50 )
if ( Trig_Mark_of_the_Wild_Buffcheck() ) then
call UnitRemoveAbilityBJ( 'A01I', u )
call UnitRemoveAbilityBJ( 'A01W', u )
call UnitRemoveAbilityBJ( 'A02C', u )
call UnitRemoveAbilityBJ( 'A02K', u )
call UnitRemoveAbilityBJ( 'A02L', u )
call UnitRemoveAbilityBJ( 'A01K', u )
call UnitRemoveAbilityBJ( 'A02M', u )
call UnitRemoveAbilityBJ( 'A02N', u )
call UnitRemoveAbilityBJ( 'A02R', u )
call UnitRemoveAbilityBJ( 'A033', u )
else
call DoNothing( )
endif
call PolledWait( 0.50 )
if ( Trig_Mark_of_the_Wild_Buffcheck() ) then
call UnitRemoveAbilityBJ( 'A01I', u )
call UnitRemoveAbilityBJ( 'A01W', u )
call UnitRemoveAbilityBJ( 'A02C', u )
call UnitRemoveAbilityBJ( 'A02K', u )
call UnitRemoveAbilityBJ( 'A02L', u )
call UnitRemoveAbilityBJ( 'A01K', u )
call UnitRemoveAbilityBJ( 'A02M', u )
call UnitRemoveAbilityBJ( 'A02N', u )
call UnitRemoveAbilityBJ( 'A02R', u )
call UnitRemoveAbilityBJ( 'A033', u )
else
call DoNothing( )
endif
call PolledWait( 0.50 )
if ( Trig_Mark_of_the_Wild_Buffcheck() ) then
call UnitRemoveAbilityBJ( 'A01I', u )
call UnitRemoveAbilityBJ( 'A01W', u )
call UnitRemoveAbilityBJ( 'A02C', u )
call UnitRemoveAbilityBJ( 'A02K', u )
call UnitRemoveAbilityBJ( 'A02L', u )
call UnitRemoveAbilityBJ( 'A01K', u )
call UnitRemoveAbilityBJ( 'A02M', u )
call UnitRemoveAbilityBJ( 'A02N', u )
call UnitRemoveAbilityBJ( 'A02R', u )
call UnitRemoveAbilityBJ( 'A033', u )
else
call DoNothing( )
endif
call PolledWait( 0.50 )
if ( Trig_Mark_of_the_Wild_Buffcheck() ) then
call UnitRemoveAbilityBJ( 'A01I', u )
call UnitRemoveAbilityBJ( 'A01W', u )
call UnitRemoveAbilityBJ( 'A02C', u )
call UnitRemoveAbilityBJ( 'A02K', u )
call UnitRemoveAbilityBJ( 'A02L', u )
call UnitRemoveAbilityBJ( 'A01K', u )
call UnitRemoveAbilityBJ( 'A02M', u )
call UnitRemoveAbilityBJ( 'A02N', u )
call UnitRemoveAbilityBJ( 'A02R', u )
call UnitRemoveAbilityBJ( 'A033', u )
else
call DoNothing( )
endif
call PolledWait( 1.50 )
if ( Trig_Mark_of_the_Wild_Buffcheck() ) then
call UnitRemoveAbilityBJ( 'A01I', u )
call UnitRemoveAbilityBJ( 'A01W', u )
call UnitRemoveAbilityBJ( 'A02C', u )
call UnitRemoveAbilityBJ( 'A02K', u )
call UnitRemoveAbilityBJ( 'A02L', u )
call UnitRemoveAbilityBJ( 'A01K', u )
call UnitRemoveAbilityBJ( 'A02M', u )
call UnitRemoveAbilityBJ( 'A02N', u )
call UnitRemoveAbilityBJ( 'A02R', u )
call UnitRemoveAbilityBJ( 'A033', u )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Mark_of_the_Wild takes nothing returns nothing
set gg_trg_Mark_of_the_Wild = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mark_of_the_Wild, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Mark_of_the_Wild, Condition( function Trig_Mark_of_the_Wild_Conditions ) )
call TriggerAddAction( gg_trg_Mark_of_the_Wild, function Trig_Mark_of_the_Wild_Actions )
endfunction
function Trig_Dryad_Forest_Soul_Summon_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'e00A' ) ) then
return false
endif
return true
endfunction
function Trig_Dryad_Forest_Soul_Summon_Actions takes nothing returns nothing
local unit dryad = gg_unit_E006_0044
local integer level = GetUnitAbilityLevel(dryad,'A01L')
call UnitApplyTimedLifeBJ( 20 + 2*CountTrees(dryad, GetDryadRadius()), 'BTLF', GetEnteringUnit() )
call SetUnitAbilityLevelSwapped( 'A01M', GetEnteringUnit(), level )
call IssueImmediateOrderBJ( GetEnteringUnit(), "autoharvestlumber" )
endfunction
//===========================================================================
function InitTrig_Dryad_Forest_Soul_Summon takes nothing returns nothing
set gg_trg_Dryad_Forest_Soul_Summon = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Dryad_Forest_Soul_Summon, GetPlayableMapRect() )
call TriggerAddCondition( gg_trg_Dryad_Forest_Soul_Summon, Condition( function Trig_Dryad_Forest_Soul_Summon_Conditions ) )
call TriggerAddAction( gg_trg_Dryad_Forest_Soul_Summon, function Trig_Dryad_Forest_Soul_Summon_Actions )
endfunction
function Trig_Dryad_Enchanted_Forest_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06B' ) ) then
return false
endif
return true
endfunction
function RandomTreeId takes nothing returns integer
// local integer i
// set i = GetRandomInt(0,1)
// if (i == 0) then
// return 'ATtc'
// endif
// if (i == 1) then
return 'B002'
// endif
// return 'BTtw'
endfunction
function Trig_Dryad_Enchanted_Forest_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local integer i = 0
local location loc = GetSpellTargetLoc()
local destructable array trees
local destructable baumeffekt
local integer level = GetUnitAbilityLevel(caster, 'A06B')
local unit dummy
call CreateNUnitsAtLoc( 1, 'h020', GetOwningPlayer(caster), loc, bj_UNIT_FACING )
call CreateDestructableLoc( 'B003', loc, GetRandomDirectionDeg(), 3.00, 0 )
set baumeffekt = GetLastCreatedDestructable()
set dummy = GetLastCreatedUnit()
call SetUnitAbilityLevel(dummy, 'A04T', level)
call IssuePointOrderLocBJ( dummy, "cloudoffog", loc )
loop
call CreateDestructableLoc( RandomTreeId(), PolarProjectionBJ(loc, GetRandomReal(0.00, 100.00), GetRandomDirectionDeg()), GetRandomDirectionDeg(), GetRandomReal(0.80, 1), GetRandomInt(0, 4) )
call SetDestructableAnimation( GetLastCreatedDestructable(), "birth")
set trees[i] = GetLastCreatedDestructable()
set i = i + 1
exitwhen i == 3
endloop
set i = 0
loop
call CreateDestructableLoc( RandomTreeId(), PolarProjectionBJ(loc, GetRandomReal(100,175), GetRandomDirectionDeg()), GetRandomDirectionDeg(), GetRandomReal(0.80, 1), GetRandomInt(0, 4) )
call SetDestructableAnimation( GetLastCreatedDestructable(), "birth")
set trees[3+i] = GetLastCreatedDestructable()
set i = i + 1
exitwhen i == 3
endloop
set i = 0
loop
call CreateDestructableLoc( RandomTreeId(), PolarProjectionBJ(loc, GetRandomReal(175, 250.00), GetRandomDirectionDeg()), GetRandomDirectionDeg(), GetRandomReal(0.80, 1.20), GetRandomInt(0, 4) )
call SetDestructableAnimation( GetLastCreatedDestructable(), "birth")
set trees[6+i] = GetLastCreatedDestructable()
set i = i + 1
exitwhen i == 3
endloop
call PolledWait( 15.00 )
call KillUnit( dummy )
call KillDestructable( baumeffekt )
set i = 0
loop
call KillDestructable(trees[i])
call TriggerSleepAction( 0.02)
set i = i + 1
exitwhen i == 9
endloop
set i = 0
call PolledWait(1.5)
loop
call RemoveDestructable(trees[i])
set i = i + 1
exitwhen i == 9
endloop
call RemoveUnit( dummy )
call RemoveDestructable( baumeffekt )
endfunction
//===========================================================================
function InitTrig_Dryad_Enchanted_Forest takes nothing returns nothing
set gg_trg_Dryad_Enchanted_Forest = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Dryad_Enchanted_Forest, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Dryad_Enchanted_Forest, Condition( function Trig_Dryad_Enchanted_Forest_Conditions ) )
call TriggerAddAction( gg_trg_Dryad_Enchanted_Forest, function Trig_Dryad_Enchanted_Forest_Actions )
endfunction
function Trig_Dryad_Treecounter_Updater_Actions takes nothing returns nothing
local unit dryad = gg_unit_E006_0044
local real radius = GetDryadRadius()
if (CountTrees(dryad,radius) == 0) then
call SetUnitAbilityLevel( dryad, GetAffinityLevel(dryad), 21)
else
if (CountTrees(dryad,radius) < 21) then
call SetUnitAbilityLevel( dryad,GetAffinityLevel(dryad), CountTrees(dryad,radius))
else
call SetUnitAbilityLevel(dryad, GetAffinityLevel(dryad), 20)
endif
endif
endfunction
//===========================================================================
function InitTrig_Dryad_Treecounter_Updater takes nothing returns nothing
set gg_trg_Dryad_Treecounter_Updater = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Dryad_Treecounter_Updater, 0.5 )
call TriggerAddAction( gg_trg_Dryad_Treecounter_Updater, function Trig_Dryad_Treecounter_Updater_Actions )
endfunction
function Trig_Dryad_Treecounter_Level_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A066' ) ) then
return false
endif
return true
endfunction
function Trig_Dryad_Treecounter_Level_Actions takes nothing returns nothing
local integer level = GetLearnedSkillLevel()
local unit u = GetLearningUnit()
if ( level == 1 ) then
call UnitRemoveAbilityBJ( 'A06C', u )
call UnitAddAbilityBJ( 'A06D', u )
endif
if ( level == 2 ) then
call UnitRemoveAbilityBJ( 'A06D', u )
call UnitAddAbilityBJ( 'A06E', u )
endif
if ( level == 3 ) then
call UnitRemoveAbilityBJ( 'A06E', u )
call UnitAddAbilityBJ( 'A06G', u )
endif
endfunction
//===========================================================================
function InitTrig_Dryad_Treecounter_Level takes nothing returns nothing
set gg_trg_Dryad_Treecounter_Level = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Dryad_Treecounter_Level, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Dryad_Treecounter_Level, Condition( function Trig_Dryad_Treecounter_Level_Conditions ) )
call TriggerAddAction( gg_trg_Dryad_Treecounter_Level, function Trig_Dryad_Treecounter_Level_Actions )
endfunction
function Trig_Dryad_Wrath_of_the_Forest_Conditions takes nothing returns boolean
if (( GetSpellAbilityId() == 'A052' ) ) then
return true
endif
return false
endfunction
function Trig_Dryad_Wrath_of_the_Forest_Enum takes nothing returns nothing
local integer array dummytypes
local integer rnd
set dummytypes[1] = 'h01D'
set dummytypes[2] = 'h01Y'
set dummytypes[3] = 'h01Z'
set rnd = GetRandomInt(1,3)
call CreateNUnitsAtLoc( 1, dummytypes[rnd], GetOwningPlayer(GetSpellAbilityUnit()), GetDestructableLoc(GetEnumDestructable()), bj_UNIT_FACING )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attack", GetSpellTargetUnit() )
call UnitApplyTimedLifeBJ( 0.50, 'BTLF', GetLastCreatedUnit() )
endfunction
function Trig_Dryad_Wrath_of_the_Forest_Actions takes nothing returns nothing
local real radius = GetDryadRadius()
local location loc = GetUnitLoc( GetSpellAbilityUnit())
call EnumDestructablesInCircleBJ( radius, loc, function Trig_Dryad_Wrath_of_the_Forest_Enum )
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Dryad_Wrath_of_the_Forest takes nothing returns nothing
set gg_trg_Dryad_Wrath_of_the_Forest = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Dryad_Wrath_of_the_Forest, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Dryad_Wrath_of_the_Forest, Condition( function Trig_Dryad_Wrath_of_the_Forest_Conditions ) )
call TriggerAddAction( gg_trg_Dryad_Wrath_of_the_Forest, function Trig_Dryad_Wrath_of_the_Forest_Actions )
endfunction
function Trig_Dryad_Regrowth_Actions takes nothing returns nothing
local unit dryad = gg_unit_E006_0044
local integer level = GetUnitAbilityLevel(dryad, 'A054')
local real array hp
local real hpbonus
local real manabonus
set hp[1] = 0.5
set hp[2] = 1.0
set hp[3] = 1.5
set hp[4] = 2.0
set hp[5] = 2.5
if (UnitHasBuffBJ(dryad, 'B01A') == true) then
set hpbonus = hp[level] * CountTrees(dryad, GetDryadRadius())
// call Debug(R2S(hpbonus) + " life")
call SetUnitLifeBJ( dryad, GetUnitState(dryad,UNIT_STATE_LIFE) + hpbonus )
set manabonus = 0.1 * level * CountTrees(dryad,GetDryadRadius())
// call Debug(R2S(manabonus) + " mana" )
call SetUnitManaBJ( dryad, GetUnitState(dryad,UNIT_STATE_MANA) + manabonus )
else
call DisableTrigger( GetTriggeringTrigger())
endif
endfunction
//===========================================================================
function InitTrig_Dryad_Regrowth takes nothing returns nothing
set gg_trg_Dryad_Regrowth = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Dryad_Regrowth, 1.00 )
call TriggerAddAction( gg_trg_Dryad_Regrowth, function Trig_Dryad_Regrowth_Actions )
endfunction
function Trig_Order_Tank_Skill_Copy_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A01Z' ) ) then
return false
endif
return true
endfunction
function Trig_Order_Tank_Skill_Copy_Func002001 takes nothing returns boolean
return ( udg_g_skilllevelvars[0] == 1 )
endfunction
function Trig_Order_Tank_Skill_Copy_Func003001 takes nothing returns boolean
return ( udg_g_skilllevelvars[0] == 2 )
endfunction
function Trig_Order_Tank_Skill_Copy_Func004001 takes nothing returns boolean
return ( udg_g_skilllevelvars[0] == 3 )
endfunction
function Trig_Order_Tank_Skill_Copy_Actions takes nothing returns nothing
set udg_g_skilllevelvars[0] = ( udg_g_skilllevelvars[0] + 1 )
if ( Trig_Order_Tank_Skill_Copy_Func002001() ) then
set udg_g_genericunittype[0] = 'h00H'
else
call DoNothing( )
endif
if ( Trig_Order_Tank_Skill_Copy_Func003001() ) then
set udg_g_genericunittype[0] = 'h00I'
else
call DoNothing( )
endif
if ( Trig_Order_Tank_Skill_Copy_Func004001() ) then
set udg_g_genericunittype[0] = 'hrtt'
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Order_Tank_Skill_Copy takes nothing returns nothing
set gg_trg_Order_Tank_Skill_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Order_Tank_Skill_Copy, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Order_Tank_Skill_Copy, Condition( function Trig_Order_Tank_Skill_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Order_Tank_Skill_Copy, function Trig_Order_Tank_Skill_Copy_Actions )
endfunction
function Trig_Chaos_Grunt_Summon_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummoningUnit()) == 'Opgh' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'ogru' ) ) then
return false
endif
return true
endfunction
function Trig_Chaos_Grunt_Summon_Cond1 takes nothing returns boolean
if ( not ( IsUnitAliveBJ(udg_g_genericunit[49]) == false ) ) then
return false
endif
return true
endfunction
function Trig_Chaos_Grunt_Summon_Cond2 takes nothing returns boolean
if ( not ( IsUnitAliveBJ(udg_g_genericunit[48]) == false ) ) then
return false
endif
return true
endfunction
function Trig_Chaos_Grunt_Summon_Cond3 takes nothing returns boolean
if ( not ( IsUnitAliveBJ(udg_g_genericunit[47]) == false ) ) then
return false
endif
return true
endfunction
function Trig_Chaos_Grunt_Summon_Actions takes nothing returns nothing
local location loc
call RemoveUnit( GetSummonedUnit() )
set udg_g_genericpoint[26] = GetUnitLoc(GetSummonedUnit())
call SetUnitAnimation( GetSummoningUnit(), "slam" )
call QueueUnitAnimationBJ( GetSummoningUnit(), "stand" )
call TriggerSleepAction( 0.50 )
call AddSpecialEffectLocBJ( udg_g_genericpoint[26], "Abilities\\Spells\\Undead\\CarrionSwarm\\CarrionSwarmDamage.mdl" )
call AddSpecialEffectLocBJ( udg_g_genericpoint[26], "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl" )
set loc = PolarProjectionBJ(udg_g_genericpoint[26], 75.00, 0)
call AddSpecialEffectLocBJ( loc, "Abilities\\Spells\\Undead\\CarrionSwarm\\CarrionSwarmDamage.mdl" )
set loc = PolarProjectionBJ(udg_g_genericpoint[26], 75.00, 60.00)
call AddSpecialEffectLocBJ( loc, "Abilities\\Spells\\Undead\\CarrionSwarm\\CarrionSwarmDamage.mdl" )
set loc = PolarProjectionBJ(udg_g_genericpoint[26], 75.00, 120.00)
call AddSpecialEffectLocBJ( loc, "Abilities\\Spells\\Undead\\CarrionSwarm\\CarrionSwarmDamage.mdl" )
set loc = PolarProjectionBJ(udg_g_genericpoint[26], 75.00, 180.00)
call AddSpecialEffectLocBJ( loc, "Abilities\\Spells\\Undead\\CarrionSwarm\\CarrionSwarmDamage.mdl" )
set loc = PolarProjectionBJ(udg_g_genericpoint[26], 75.00, 240.00)
call AddSpecialEffectLocBJ( loc, "Abilities\\Spells\\Undead\\CarrionSwarm\\CarrionSwarmDamage.mdl" )
set loc = PolarProjectionBJ(udg_g_genericpoint[26], 75.00, 300.00)
call AddSpecialEffectLocBJ( loc, "Abilities\\Spells\\Undead\\CarrionSwarm\\CarrionSwarmDamage.mdl" )
set loc = PolarProjectionBJ(udg_g_genericpoint[26], 37.00, 300.00)
call AddSpecialEffectLocBJ( loc, "Abilities\\Spells\\Undead\\CarrionSwarm\\CarrionSwarmDamage.mdl" )
set loc = PolarProjectionBJ(udg_g_genericpoint[26], 37.00, 240.00)
call AddSpecialEffectLocBJ( loc, "Abilities\\Spells\\Undead\\CarrionSwarm\\CarrionSwarmDamage.mdl" )
set loc = PolarProjectionBJ(udg_g_genericpoint[26], 37.00, 180.00)
call AddSpecialEffectLocBJ( loc, "Abilities\\Spells\\Undead\\CarrionSwarm\\CarrionSwarmDamage.mdl" )
set loc = PolarProjectionBJ(udg_g_genericpoint[26], 37.00, 120.00)
call AddSpecialEffectLocBJ( loc, "Abilities\\Spells\\Undead\\CarrionSwarm\\CarrionSwarmDamage.mdl" )
set loc = PolarProjectionBJ(udg_g_genericpoint[26], 37.00, 60.00)
call AddSpecialEffectLocBJ( loc, "Abilities\\Spells\\Undead\\CarrionSwarm\\CarrionSwarmDamage.mdl" )
set loc = PolarProjectionBJ(udg_g_genericpoint[26], 37.00, 0.00)
call AddSpecialEffectLocBJ( loc, "Abilities\\Spells\\Undead\\CarrionSwarm\\CarrionSwarmDamage.mdl" )
call TriggerSleepAction( 0.25 )
call CreateNUnitsAtLoc( 1, 'nchg', GetOwningPlayer(GetSummoningUnit()), udg_g_genericpoint[26], bj_UNIT_FACING )
if ( Trig_Chaos_Grunt_Summon_Cond3() ) then
set udg_g_genericunit[47] = GetLastCreatedUnit()
else
if ( Trig_Chaos_Grunt_Summon_Cond2() ) then
set udg_g_genericunit[48] = GetLastCreatedUnit()
else
if ( Trig_Chaos_Grunt_Summon_Cond1() ) then
set udg_g_genericunit[49] = GetLastCreatedUnit()
else
call KillUnit( udg_g_genericunit[47] )
set udg_g_genericunit[47] = udg_g_genericunit[48]
set udg_g_genericunit[48] = udg_g_genericunit[49]
set udg_g_genericunit[49] = GetLastCreatedUnit()
endif
endif
endif
call SetUnitAnimation( GetLastCreatedUnit(), "spell" )
call QueueUnitAnimationBJ( GetLastCreatedUnit(), "stand" )
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Chaos_Grunt_Summon takes nothing returns nothing
set gg_trg_Chaos_Grunt_Summon = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Chaos_Grunt_Summon, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Chaos_Grunt_Summon, Condition( function Trig_Chaos_Grunt_Summon_Conditions ) )
call TriggerAddAction( gg_trg_Chaos_Grunt_Summon, function Trig_Chaos_Grunt_Summon_Actions )
endfunction
function Trig_Untitled_Trigger_002_Copy_Func001Func001Func001C takes nothing returns boolean
if ( not ( IsUnitAliveBJ(udg_g_genericunit[49]) == false ) ) then
return false
endif
return true
endfunction
function Trig_Untitled_Trigger_002_Copy_Func001Func001C takes nothing returns boolean
if ( not ( IsUnitAliveBJ(udg_g_genericunit[48]) == false ) ) then
return false
endif
return true
endfunction
function Trig_Untitled_Trigger_002_Copy_Func001C takes nothing returns boolean
if ( not ( IsUnitAliveBJ(udg_g_genericunit[47]) == false ) ) then
return false
endif
return true
endfunction
function Trig_Untitled_Trigger_002_Copy_Actions takes nothing returns nothing
if ( Trig_Untitled_Trigger_002_Copy_Func001C() ) then
set udg_g_genericunit[47] = GetLastCreatedUnit()
else
if ( Trig_Untitled_Trigger_002_Copy_Func001Func001C() ) then
set udg_g_genericunit[48] = GetLastCreatedUnit()
else
if ( Trig_Untitled_Trigger_002_Copy_Func001Func001Func001C() ) then
set udg_g_genericunit[49] = GetLastCreatedUnit()
else
call KillUnit( udg_g_genericunit[47] )
set udg_g_genericunit[47] = udg_g_genericunit[48]
set udg_g_genericunit[48] = udg_g_genericunit[49]
set udg_g_genericunit[49] = GetLastCreatedUnit()
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_002_Copy takes nothing returns nothing
set gg_trg_Untitled_Trigger_002_Copy = CreateTrigger( )
call TriggerAddAction( gg_trg_Untitled_Trigger_002_Copy, function Trig_Untitled_Trigger_002_Copy_Actions )
endfunction
function Trig_Chaos_Servant_Level_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A03O' ) ) then
return false
endif
return true
endfunction
function Trig_Chaos_Servant_Level_Actions takes nothing returns nothing
call SetPlayerTechResearchedSwap( 'R007', GetUnitAbilityLevelSwapped('A03O', GetLearningUnit() ), GetOwningPlayer(GetLearningUnit()) )
call SetPlayerTechResearchedSwap( 'R008', GetUnitAbilityLevelSwapped('A03O', GetLearningUnit() ), GetOwningPlayer(GetLearningUnit()) )
call SetPlayerTechResearchedSwap( 'R009', GetUnitAbilityLevelSwapped('A03O', GetLearningUnit() ), GetOwningPlayer(GetLearningUnit()) )
endfunction
//===========================================================================
function InitTrig_Chaos_Servant_Level takes nothing returns nothing
set gg_trg_Chaos_Servant_Level = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Chaos_Servant_Level, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Chaos_Servant_Level, Condition( function Trig_Chaos_Servant_Level_Conditions ) )
call TriggerAddAction( gg_trg_Chaos_Servant_Level, function Trig_Chaos_Servant_Level_Actions )
endfunction
function Trig_Forestwalk_Learn_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetLearningUnit()) == 'Obla' ) ) then
return false
endif
if ( not ( GetLearnedSkillBJ() == 'A04E' ) ) then
return false
endif
return true
endfunction
function Trig_Forestwalk_Learn_Actions takes nothing returns nothing
set udg_bol_Trollmeltbool[0] = true
set udg_g_genericunit[39] = GetLearningUnit()
call SetPlayerTechResearchedSwap( 'R00F', ( udg_g_genericinteger[6] + 1 ), GetOwningPlayer(gg_unit_Obla_0814) )
call EnableTrigger( gg_trg_Forestwalk_Check )
endfunction
//===========================================================================
function InitTrig_Forestwalk_Learn takes nothing returns nothing
set gg_trg_Forestwalk_Learn = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Forestwalk_Learn, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Forestwalk_Learn, Condition( function Trig_Forestwalk_Learn_Conditions ) )
call TriggerAddAction( gg_trg_Forestwalk_Learn, function Trig_Forestwalk_Learn_Actions )
endfunction
function Frost_Nova_Targeting_Conditions takes nothing returns boolean
local unit caster = udg_g_genericunit[45]
if ( (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(caster)) == true ) and ( IsUnitAliveBJ(GetFilterUnit()) == true ) and ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then
return true
else
return false
endif
endfunction
function Frost_Nova_Damage_Actions takes nothing returns nothing
local unit dummy1
local unit caster = udg_g_genericunit[45]
local integer level = GetUnitAbilityLevel( udg_g_genericunit[45], 'A01X')
call CreateNUnitsAtLoc( 1, 'h02K', GetOwningPlayer(caster), GetUnitLoc(caster), bj_UNIT_FACING )
set dummy1 = GetLastCreatedUnit()
call SetUnitAbilityLevel( dummy1, 'A03P', level )
call UnitApplyTimedLifeBJ( 0.50, 'BTLF', dummy1 )
call UnitDamageTargetBJ( caster, GetEnumUnit(), (150 + ( level * 100 )), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_COLD )
call IssueTargetOrderBJ( dummy1, "entanglingroots", GetEnumUnit() )
endfunction
function Trig_Frost_Nova_Init_Actions takes nothing returns nothing
local integer i = 0
local real range = 400.00
local real damage_range = 475
local integer anzahl_effekte = 25
local real winkel = 360 / I2R(anzahl_effekte)
local unit array shootdummy
local unit caster
local location loc
local integer level = GetUnitAbilityLevel( GetSpellAbilityUnit(), 'A01X')
local location casterloc = GetUnitLoc( GetSpellAbilityUnit())
if ( GetSpellAbilityId() == 'A01X' ) then
set udg_g_genericunit[45] = GetSpellAbilityUnit()
set caster = udg_g_genericunit[45]
loop
call CreateNUnitsAtLoc( 1, 'h02L', GetOwningPlayer(caster), casterloc, winkel * i )
set shootdummy[i] = GetLastCreatedUnit()
set loc = PolarProjectionBJ(casterloc, range, winkel * i)
call IssuePointOrderLocBJ( shootdummy[i], "attackground", loc )
set i = i + 1
exitwhen i == anzahl_effekte
endloop
call ForGroupBJ( GetUnitsInRangeOfLocMatching(damage_range, casterloc, Condition(function Frost_Nova_Targeting_Conditions)), function Frost_Nova_Damage_Actions )
call TriggerSleepAction( 1 )
set i = 0
loop
call RemoveUnit( shootdummy[i] )
set i = i + 1
exitwhen i == anzahl_effekte
endloop
endif
call RemoveLocation(casterloc)
set casterloc = null
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Frost_Nova_Init takes nothing returns nothing
set gg_trg_Frost_Nova_Init = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Frost_Nova_Init, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddAction( gg_trg_Frost_Nova_Init, function Trig_Frost_Nova_Init_Actions )
endfunction
function Trig_Frost_Sphere_Unit_Spawn_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummoningUnit()) == 'Ulic' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'e00C' ) ) then
return false
endif
return true
endfunction
function Trig_Frost_Sphere_Unit_Spawn_Func014002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Frost_Sphere_Unit_Spawn_Actions takes nothing returns nothing
local location loc1 = GetUnitLoc(GetSummoningUnit())
local location loc2 = GetUnitLoc(GetSummonedUnit())
local location loc3
local group g
local integer i = 0
call EnableTrigger( gg_trg_Frost_Sphere_Attack )
call StartTimerBJ( udg_g_generictimer[12], true, ( 0.10 ) )
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00C', GetOwningPlayer(GetSummoningUnit()), loc1, loc2 )
set udg_g_genericunit[15] = GetLastCreatedUnit()
set udg_g_genericreal[21] = AngleBetweenPoints(loc1, loc2)
set udg_g_genericreal[22] = AngleBetweenPoints(loc1,loc2)
call RemoveUnit( GetSummonedUnit() )
set loc3 = PolarProjectionBJ(loc1, 2000.00, udg_g_genericreal[21])
call IssuePointOrderLocBJ( udg_g_genericunit[15], "move", loc3 )
call TriggerSleepAction( 2 )
call KillUnit( udg_g_genericunit[15] )
call DisableTrigger( gg_trg_Frost_Sphere_Attack )
call PauseTimerBJ( true, udg_g_generictimer[12] )
call TriggerSleepAction( 0.50 )
set g = GetUnitsOfTypeIdAll('h00Y')
call ForGroupBJ( g, function Trig_Frost_Sphere_Unit_Spawn_Func014002 )
call DestroyGroup( g )
set g = null
call RemoveLocation( loc1)
set loc1 = null
call RemoveLocation( loc2)
set loc2 = null
call RemoveLocation( loc3)
set loc3 = null
endfunction
//===========================================================================
function InitTrig_Frost_Sphere_Unit_Spawn takes nothing returns nothing
set gg_trg_Frost_Sphere_Unit_Spawn = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Frost_Sphere_Unit_Spawn, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Frost_Sphere_Unit_Spawn, Condition( function Trig_Frost_Sphere_Unit_Spawn_Conditions ) )
call TriggerAddAction( gg_trg_Frost_Sphere_Unit_Spawn, function Trig_Frost_Sphere_Unit_Spawn_Actions )
endfunction
function Trig_Frost_Sphere_Hurl_Conditions takes nothing returns boolean
if ( not ( IsUnitAliveBJ(udg_g_genericunit[15]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Frost_Sphere_Hurl_Cond_Group takes nothing returns boolean
if ( ( IsUnitAliveBJ(GetFilterUnit()) ) and ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false ) and (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_HeroID[26])) == true ) ) then
return true
else
return false
endif
endfunction
function Trig_Frost_Sphere_Hurl_Actions takes nothing returns nothing
local group g
local location loc = PolarProjectionBJ(GetUnitLoc(udg_g_genericunit[15]), 50.00, udg_g_genericreal[21])
call CreateNUnitsAtLoc( 1, 'h00Y', GetOwningPlayer(udg_g_genericunit[15]), loc, bj_UNIT_FACING )
call SetUnitAbilityLevelSwapped( 'Aroc', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A04B', udg_HeroID[26] ) )
set g = GetUnitsInRangeOfLocMatching(750, GetUnitLoc(GetLastCreatedUnit()), Condition(function Trig_Frost_Sphere_Hurl_Cond_Group))
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attack", GroupPickRandomUnit(g) )
call DestroyGroup(g)
set g = null
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Frost_Sphere_Hurl takes nothing returns nothing
set gg_trg_Frost_Sphere_Hurl = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Frost_Sphere_Hurl, udg_g_generictimer[12] )
call TriggerAddCondition( gg_trg_Frost_Sphere_Hurl, Condition( function Trig_Frost_Sphere_Hurl_Conditions ) )
call TriggerAddAction( gg_trg_Frost_Sphere_Hurl, function Trig_Frost_Sphere_Hurl_Actions )
endfunction
function Trig_Frost_Sphere_Attack_Conditions takes nothing returns boolean
if ( not ( IsUnitAliveBJ(udg_g_genericunit[15]) == true ) ) then
return false
endif
return true
endfunction
function Trig_Frost_Sphere_Attack_Func004Func001001001003 takes nothing returns boolean
return ( IsPlayerEnemy(GetOwningPlayer(GetFilterUnit()), GetOwningPlayer(GetLastCreatedUnit())) == true )
endfunction
function Trig_Frost_Sphere_Attack_Func004Func003003001003 takes nothing returns boolean
return ( IsPlayerEnemy(GetOwningPlayer(GetFilterUnit()), GetOwningPlayer(GetLastCreatedUnit())) == true )
endfunction
function Trig_Frost_Sphere_Attack_Func004C takes nothing returns boolean
local location loc = GetUnitLoc(GetLastCreatedUnit())
local group g = GetUnitsInRangeOfLocMatching(512, loc, Condition(function Trig_Frost_Sphere_Attack_Func004Func001001001003))
if ( not ( CountUnitsInGroup(g ) >= 3 ) ) then
call RemoveLocation( loc )
set loc = null
call DestroyGroup(g)
set g = null
return false
endif
if ( not ( GetRandomInt(1, 3) == 1 ) ) then
call RemoveLocation( loc )
set loc = null
call DestroyGroup(g)
set g = null
return false
endif
call RemoveLocation( loc )
set loc = null
call DestroyGroup(g)
set g = null
return true
endfunction
function Trig_Frost_Sphere_Attack_Actions takes nothing returns nothing
local group g
local location loc = PolarProjectionBJ(GetUnitLoc(udg_g_genericunit[15]), 100.00, udg_g_genericreal[21])
call CreateNUnitsAtLoc( 1, 'h00Y', GetOwningPlayer(udg_g_genericunit[15]), loc, bj_UNIT_FACING )
set loc = PolarProjectionBJ(GetUnitLoc(udg_g_genericunit[15]), 450.00, udg_g_genericreal[22])
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "attackground", loc )
set loc = PolarProjectionBJ(GetUnitLoc(udg_g_genericunit[15]), 100.00, udg_g_genericreal[21])
call CreateNUnitsAtLoc( 1, 'h00Y', GetOwningPlayer(udg_g_genericunit[15]), loc, bj_UNIT_FACING )
if ( Trig_Frost_Sphere_Attack_Func004C() ) then
set g = GetUnitsInRangeOfLocMatching(512, GetUnitLoc(GetLastCreatedUnit()), Condition(function Trig_Frost_Sphere_Attack_Func004Func003003001003))
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attack", GroupPickRandomUnit(g) )
else
set loc = PolarProjectionBJ(GetUnitLoc(udg_g_genericunit[15]), 225.00, udg_g_genericreal[22])
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "attackground", loc )
endif
set udg_g_genericreal[22] = ( udg_g_genericreal[22] + 36.00 )
call DestroyGroup(g)
set g = null
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Frost_Sphere_Attack takes nothing returns nothing
set gg_trg_Frost_Sphere_Attack = CreateTrigger( )
call DisableTrigger( gg_trg_Frost_Sphere_Attack )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Frost_Sphere_Attack, udg_g_generictimer[12] )
call TriggerAddCondition( gg_trg_Frost_Sphere_Attack, Condition( function Trig_Frost_Sphere_Attack_Conditions ) )
call TriggerAddAction( gg_trg_Frost_Sphere_Attack, function Trig_Frost_Sphere_Attack_Actions )
endfunction
function Trig_Frost_Sphere_Level_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A04B' ) ) then
return false
endif
return true
endfunction
function Trig_Frost_Sphere_Level_Actions takes nothing returns nothing
set udg_g_skilllevelvars[5] = ( udg_g_skilllevelvars[5] + 1 )
call SetPlayerTechResearchedSwap( 'R000', udg_g_skilllevelvars[5], GetOwningPlayer(gg_unit_Ulic_0187) )
endfunction
//===========================================================================
function InitTrig_Frost_Sphere_Level takes nothing returns nothing
set gg_trg_Frost_Sphere_Level = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Frost_Sphere_Level, gg_unit_Ulic_0187, EVENT_UNIT_HERO_SKILL )
call TriggerAddCondition( gg_trg_Frost_Sphere_Level, Condition( function Trig_Frost_Sphere_Level_Conditions ) )
call TriggerAddAction( gg_trg_Frost_Sphere_Level, function Trig_Frost_Sphere_Level_Actions )
endfunction
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
call SetPlayerTechResearchedSwap( 'R000', udg_g_skilllevelvars[5], GetOwningPlayer(gg_unit_Ulic_0187) )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001 = CreateTrigger( )
call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
function Trig_Crushing_Wave_Move_Conditionz takes nothing returns boolean
if ( (IsUnitAliveBJ(GetFilterUnit()) ) and (IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false ) and ( GetFilterUnit() != udg_HeroID[30] ) and ( GetOwningPlayer(GetFilterUnit()) != Player(PLAYER_NEUTRAL_PASSIVE) ) ) then
return true
else
return false
endif
endfunction
function Trig_Crushing_Wave_Move_Conditionz2 takes nothing returns boolean
if ( (IsUnitAliveBJ(GetFilterUnit()) ) and (IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false ) and (IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == false ) and ( GetOwningPlayer(GetFilterUnit()) != Player(PLAYER_NEUTRAL_PASSIVE) ) ) then
return true
else
return false
endif
endfunction
function Trig_Crushing_Wave_Move_Actionz takes nothing returns nothing
local location loc
set loc = PolarProjectionBJ(GetUnitLoc(GetEnumUnit()), udg_g_genericreal[17], AngleBetweenPoints(udg_g_genericpoint[19], GetUnitLoc(GetEnumUnit())))
call SetUnitPositionLoc( GetEnumUnit(), loc )
call UnitDamageTargetBJ( udg_HeroID[30], GetEnumUnit(), ( I2R(GetUnitAbilityLevelSwapped('A0BL', udg_HeroID[30])) * 0.50 ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_LIGHTNING )
call RemoveLocation(loc)
set loc = null
endfunction
function Trig_Crushing_Wave_Move_Actionz2 takes nothing returns nothing
call IssueLastOrder(GetEnumUnit())
endfunction
function Trig_Crushing_Wave_Move_Actions takes nothing returns nothing
local group g
set udg_g_genericinteger[29] = ( udg_g_genericinteger[29] + 1 )
set udg_g_genericreal[17] = ( udg_g_genericreal[17] - 0.10 )
set udg_g_genericreal[18] = ( udg_g_genericreal[18] + udg_g_genericreal[17] )
set g = GetUnitsInRangeOfLocMatching(udg_g_genericreal[18], udg_g_genericpoint[19], Condition(function Trig_Crushing_Wave_Move_Conditionz))
call ForGroupBJ( g, function Trig_Crushing_Wave_Move_Actionz )
if ( udg_g_genericinteger[29] == 100 ) then
call PauseTimerBJ( true, udg_g_generictimer[6] )
set g = GetUnitsInRangeOfLocMatching(750.00, udg_g_genericpoint[19], Condition(function Trig_Crushing_Wave_Move_Conditionz2))
call ForGroupBJ( g, function Trig_Crushing_Wave_Move_Actionz2 )
else
call DoNothing( )
endif
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_Crushing_Wave_Move takes nothing returns nothing
set gg_trg_Crushing_Wave_Move = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Crushing_Wave_Move, udg_g_generictimer[6] )
call TriggerAddAction( gg_trg_Crushing_Wave_Move, function Trig_Crushing_Wave_Move_Actions )
endfunction
function Trig_Mutilate_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0BJ' ) ) then
return false
endif
return true
endfunction
function Trig_Mutilate_Conditionz takes nothing returns boolean
if ( ( IsUnitAliveBJ(GetFilterUnit()) == true ) and ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false ) and ( GetFilterUnit() != udg_HeroID[30] ) ) then
return true
else
return false
endif
endfunction
function Trig_Mutilate_Actionz takes nothing returns nothing
call UnitDamageTargetBJ( udg_HeroID[30], GetEnumUnit(), ( 250.00 + ( 100.00 * I2R(GetUnitAbilityLevelSwapped('A0BJ', udg_HeroID[30])) ) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_LIGHTNING )
call AddSpecialEffectTargetUnitBJ( "chest", GetEnumUnit(), "Abilities\\Spells\\Orc\\FeralSpirit\\feralspirittarget.mdl" )
endfunction
function Trig_Mutilate_Actions takes nothing returns nothing
local group g
set udg_g_genericpoint[20] = GetUnitLoc(GetSpellTargetUnit())
set g = GetUnitsInRangeOfLocMatching(250.00, udg_g_genericpoint[20], Condition(function Trig_Mutilate_Conditionz))
call ExplodeUnitBJ( GetSpellTargetUnit() )
call ForGroupBJ( g, function Trig_Mutilate_Actionz )
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_Mutilate takes nothing returns nothing
set gg_trg_Mutilate = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mutilate, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Mutilate, Condition( function Trig_Mutilate_Conditions ) )
call TriggerAddAction( gg_trg_Mutilate, function Trig_Mutilate_Actions )
endfunction
function Trig_Firewall_setup_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummoningUnit()) == 'Hblm' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'e00B' ) ) then
return false
endif
return true
endfunction
function Trig_Firewall_setup_Actions takes nothing returns nothing
local location loc
set udg_g_genericreal[20] = GetUnitFacing(gg_unit_Hblm_0180)
set udg_g_genericpoint[8] = GetUnitLoc(GetSummonedUnit())
call RemoveUnit( GetSummonedUnit() )
if ( GetUnitAbilityLevelSwapped('A023', GetSummoningUnit()) == 1 ) then
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), udg_g_genericpoint[8], bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A024', GetLastCreatedUnit() )
set loc = PolarProjectionBJ(udg_g_genericpoint[8], 120.00, ( udg_g_genericreal[20] + 90.00 ))
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A024', GetLastCreatedUnit() )
set loc = PolarProjectionBJ(udg_g_genericpoint[8], 120.00, ( udg_g_genericreal[20] - 90.00 ))
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A024', GetLastCreatedUnit() )
else
call DoNothing( )
endif
if ( GetUnitAbilityLevelSwapped('A023', GetSummoningUnit()) == 2 ) then
set loc = PolarProjectionBJ(udg_g_genericpoint[8], 60.00, ( udg_g_genericreal[20] + 90.00 ))
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A09I', GetLastCreatedUnit() )
set loc = PolarProjectionBJ(udg_g_genericpoint[8], 60.00, ( udg_g_genericreal[20] - 90.00 ))
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A09I', GetLastCreatedUnit() )
set loc = PolarProjectionBJ(udg_g_genericpoint[8], 180.00, ( udg_g_genericreal[20] + 90.00 ))
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A09I', GetLastCreatedUnit() )
set loc = PolarProjectionBJ(udg_g_genericpoint[8], 180.00, ( udg_g_genericreal[20] - 90.00 ))
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A09I', GetLastCreatedUnit() )
else
call DoNothing( )
endif
if ( GetUnitAbilityLevelSwapped('A023', GetSummoningUnit()) == 3 ) then
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), udg_g_genericpoint[8], bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A09J', GetLastCreatedUnit() )
set loc = PolarProjectionBJ(udg_g_genericpoint[8], 120.00, ( udg_g_genericreal[20] + 90.00 ))
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A09J', GetLastCreatedUnit() )
set loc = PolarProjectionBJ(udg_g_genericpoint[8], 120.00, ( udg_g_genericreal[20] - 90.00 ))
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A09J', GetLastCreatedUnit() )
set loc = PolarProjectionBJ(udg_g_genericpoint[8], 240.00, ( udg_g_genericreal[20] + 90.00 ))
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A09J', GetLastCreatedUnit() )
set loc = PolarProjectionBJ(udg_g_genericpoint[8], 240.00, ( udg_g_genericreal[20] - 90.00 ))
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A09J', GetLastCreatedUnit() )
else
call DoNothing( )
endif
if ( GetUnitAbilityLevelSwapped('A023', GetSummoningUnit()) == 4 ) then
set loc = PolarProjectionBJ(udg_g_genericpoint[8], 60.00, ( udg_g_genericreal[20] + 90.00 ))
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A09K', GetLastCreatedUnit() )
set loc = PolarProjectionBJ(udg_g_genericpoint[8], 60.00, ( udg_g_genericreal[20] - 90.00 ))
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A09K', GetLastCreatedUnit() )
set loc = PolarProjectionBJ(udg_g_genericpoint[8], 180.00, ( udg_g_genericreal[20] + 90.00 ))
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A09K', GetLastCreatedUnit() )
set loc = PolarProjectionBJ(udg_g_genericpoint[8], 180.00, ( udg_g_genericreal[20] - 90.00 ))
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A09K', GetLastCreatedUnit() )
set loc = PolarProjectionBJ(udg_g_genericpoint[8], 300.00, ( udg_g_genericreal[20] + 90.00 ))
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A09K', GetLastCreatedUnit() )
set loc = PolarProjectionBJ(udg_g_genericpoint[8], 300.00, ( udg_g_genericreal[20] - 90.00 ))
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A09K', GetLastCreatedUnit() )
else
call DoNothing( )
endif
if ( GetUnitAbilityLevelSwapped('A023', GetSummoningUnit()) == 5 ) then
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), udg_g_genericpoint[8], bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A09L', GetLastCreatedUnit() )
set loc = PolarProjectionBJ(udg_g_genericpoint[8], 120.00, ( udg_g_genericreal[20] + 90.00 ))
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A09L', GetLastCreatedUnit() )
set loc = PolarProjectionBJ(udg_g_genericpoint[8], 120.00, ( udg_g_genericreal[20] - 90.00 ))
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A09L', GetLastCreatedUnit() )
set loc = PolarProjectionBJ(udg_g_genericpoint[8], 240.00, ( udg_g_genericreal[20] + 90.00 ))
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A09L', GetLastCreatedUnit() )
set loc = PolarProjectionBJ(udg_g_genericpoint[8], 240.00, ( udg_g_genericreal[20] - 90.00 ))
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A09L', GetLastCreatedUnit() )
set loc = PolarProjectionBJ(udg_g_genericpoint[8], 360.00, ( udg_g_genericreal[20] + 90.00 ))
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A09L', GetLastCreatedUnit() )
set loc = PolarProjectionBJ(udg_g_genericpoint[8], 360.00, ( udg_g_genericreal[20] - 90.00 ))
call CreateNUnitsAtLoc( 1, 'e00B', GetOwningPlayer(gg_unit_Hblm_0180), loc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A09L', GetLastCreatedUnit() )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Firewall_setup takes nothing returns nothing
set gg_trg_Firewall_setup = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Firewall_setup, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Firewall_setup, Condition( function Trig_Firewall_setup_Conditions ) )
call TriggerAddAction( gg_trg_Firewall_setup, function Trig_Firewall_setup_Actions )
endfunction
function Trig_Path_of_Fire_Spawn_Func001Func005001001003 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'e00G' )
endfunction
function Trig_Path_of_Fire_Spawn_Func001C takes nothing returns boolean
if ( not ( udg_g_genericinteger[33] >= 1 ) ) then
return false
endif
if ( not ( IsUnitAliveBJ(gg_unit_Hblm_0180) == true ) ) then
return false
endif
if ( not ( CountUnitsInGroup(GetUnitsInRangeOfLocMatching(25.00, GetUnitLoc(gg_unit_Hblm_0180), Condition(function Trig_Path_of_Fire_Spawn_Func001Func005001001003))) < 1 ) ) then
return false
endif
return true
endfunction
function Trig_Path_of_Fire_Spawn_Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, gg_unit_Hblm_0180) <= 25.00 ) ) then
return false
endif
return true
endfunction
function Trig_Path_of_Fire_Spawn_Actions takes nothing returns nothing
local location loc
set loc = GetUnitLoc(gg_unit_Hblm_0180)
if ( Trig_Path_of_Fire_Spawn_Func001C() ) then
call CreateNUnitsAtLoc( 1, 'e00G', GetOwningPlayer(gg_unit_Hblm_0180), loc, bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_Path_of_Fire_Spawn_Func002C() ) then
call PauseTimerBJ( true, udg_g_generictimer[0] )
call IssueImmediateOrderBJ( gg_unit_Hblm_0180, "unimmolation" )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Path_of_Fire_Spawn takes nothing returns nothing
set gg_trg_Path_of_Fire_Spawn = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Path_of_Fire_Spawn, udg_g_generictimer[0] )
call TriggerAddAction( gg_trg_Path_of_Fire_Spawn, function Trig_Path_of_Fire_Spawn_Actions )
endfunction
function Trig_Artillery_Action_Copy_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03S' ) ) then
return false
endif
return true
endfunction
function Trig_Artillery_Shooters takes location loc, player owner returns nothing
local integer anzahl_schuesse = 9
local integer indexA = 1
loop
exitwhen indexA > anzahl_schuesse
call CreateNUnitsAtLoc( 1, 'h00U', owner, loc, bj_UNIT_FACING )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "attackground", PolarProjectionBJ(udg_g_genericpoint[25], GetRandomReal(25.00, 250.00), GetRandomDirectionDeg()) )
set indexA = indexA + 1
endloop
endfunction
function Trig_Artillery_Action_Copy_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local integer indexB = 1
local location spawnloc = PolarProjectionBJ(GetSpellTargetLoc(), 1000.00, GetRandomDirectionDeg())
call PolledWait( 2.00 )
loop
exitwhen indexB > 10
call PolledWait(1.00)
call Trig_Artillery_Shooters(spawnloc, GetOwningPlayer(caster))
set indexB = indexB + 1
endloop
call RemoveLocation(spawnloc)
set spawnloc = null
endfunction
//===========================================================================
function InitTrig_Artillery_Action_Copy takes nothing returns nothing
set gg_trg_Artillery_Action_Copy = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Artillery_Action_Copy, gg_unit_H004_0199, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Artillery_Action_Copy, Condition( function Trig_Artillery_Action_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Artillery_Action_Copy, function Trig_Artillery_Action_Copy_Actions )
endfunction
function Trig_Improved_Scope_Level_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A09W' ) ) then
return false
endif
return true
endfunction
function Trig_Improved_Scope_Level_Actions takes nothing returns nothing
call SetPlayerTechResearchedSwap( 'R00A', GetLearnedSkillLevel(), GetOwningPlayer(GetLearningUnit()) )
endfunction
//===========================================================================
function InitTrig_Improved_Scope_Level takes nothing returns nothing
set gg_trg_Improved_Scope_Level = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Improved_Scope_Level, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Improved_Scope_Level, Condition( function Trig_Improved_Scope_Level_Conditions ) )
call TriggerAddAction( gg_trg_Improved_Scope_Level, function Trig_Improved_Scope_Level_Actions )
endfunction
function Trig_Land_Mine_Invi_Remove_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetOrderedUnit()) == 'h01W' ) ) then
return false
endif
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("thunderclap") ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetOrderedUnit(), udg_minengruppe) == false ) ) then
return false
endif
return true
endfunction
function Trig_Land_Mine_Invi_Remove_Func002001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'h01W' )
endfunction
function Trig_Land_Mine_Invi_Remove_Func002001002002 takes nothing returns boolean
return ( IsUnitSelected(GetFilterUnit(), GetOwningPlayer(GetOrderedUnit())) == true )
endfunction
function Trig_Land_Mine_Invi_Remove_Func002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Land_Mine_Invi_Remove_Func002001002001(), Trig_Land_Mine_Invi_Remove_Func002001002002() )
endfunction
function Trig_Land_Mine_Invi_Remove_Func002A takes nothing returns nothing
call GroupAddUnitSimple( GetEnumUnit(), udg_minengruppe )
endfunction
function Trig_Land_Mine_Invi_Remove_Func003A takes nothing returns nothing
call UnitRemoveAbilityBJ( 'Apiv', GetEnumUnit() )
call IssueImmediateOrderBJ( GetEnumUnit(), "thunderclap" )
endfunction
function Trig_Land_Mine_Invi_Remove_Actions takes nothing returns nothing
local group g
call GroupClear( udg_minengruppe )
set g = GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Land_Mine_Invi_Remove_Func002001002))
call ForGroupBJ( g, function Trig_Land_Mine_Invi_Remove_Func002A )
call ForGroupBJ( udg_minengruppe, function Trig_Land_Mine_Invi_Remove_Func003A )
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_Land_Mine_Invi_Remove takes nothing returns nothing
set gg_trg_Land_Mine_Invi_Remove = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Land_Mine_Invi_Remove, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Land_Mine_Invi_Remove, Condition( function Trig_Land_Mine_Invi_Remove_Conditions ) )
call TriggerAddAction( gg_trg_Land_Mine_Invi_Remove, function Trig_Land_Mine_Invi_Remove_Actions )
endfunction
function Trig_Blessing_of_Protection_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A067', gg_unit_Hpal_0435) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Blessing_of_Protection_Func001C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A067', gg_unit_Hpal_0435) == 1 ) ) then
return false
endif
if ( not ( GetRandomInt(1, 10) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Blessing_of_Protection_Func002C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A067', gg_unit_Hpal_0435) == 2 ) ) then
return false
endif
if ( not ( GetRandomInt(1, 10) <= 2 ) ) then
return false
endif
return true
endfunction
function Trig_Blessing_of_Protection_Func003C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A067', gg_unit_Hpal_0435) == 3 ) ) then
return false
endif
if ( not ( GetRandomInt(1, 10) <= 3 ) ) then
return false
endif
return true
endfunction
function Trig_Blessing_of_Protection_Func004C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A067', gg_unit_Hpal_0435) == 4 ) ) then
return false
endif
if ( not ( GetRandomInt(1, 10) <= 4 ) ) then
return false
endif
return true
endfunction
function Trig_Blessing_of_Protection_Func005C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A067', gg_unit_Hpal_0435) == 5 ) ) then
return false
endif
if ( not ( GetRandomInt(1, 10) <= 5 ) ) then
return false
endif
return true
endfunction
function Trig_Blessing_of_Protection_Actions takes nothing returns nothing
local location loc
set loc = GetUnitLoc(gg_unit_Hpal_0435)
if ( Trig_Blessing_of_Protection_Func001C() ) then
call DisableTrigger( GetTriggeringTrigger() )
call TriggerExecute( gg_trg_Blessing_of_Protection_Cooldown )
call CreateNUnitsAtLoc( 1, 'h00B', GetOwningPlayer(gg_unit_Hpal_0435), loc, bj_UNIT_FACING )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "innerfire", gg_unit_Hpal_0435 )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "holybolt", gg_unit_Hpal_0435 )
else
call DoNothing( )
endif
if ( Trig_Blessing_of_Protection_Func002C() ) then
call DisableTrigger( GetTriggeringTrigger() )
call TriggerExecute( gg_trg_Blessing_of_Protection_Cooldown )
call CreateNUnitsAtLoc( 1, 'h00B', GetOwningPlayer(gg_unit_Hpal_0435), loc, bj_UNIT_FACING )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "innerfire", gg_unit_Hpal_0435 )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "holybolt", gg_unit_Hpal_0435 )
else
call DoNothing( )
endif
if ( Trig_Blessing_of_Protection_Func003C() ) then
call DisableTrigger( GetTriggeringTrigger() )
call TriggerExecute( gg_trg_Blessing_of_Protection_Cooldown )
call CreateNUnitsAtLoc( 1, 'h00B', GetOwningPlayer(gg_unit_Hpal_0435), loc, bj_UNIT_FACING )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "innerfire", gg_unit_Hpal_0435 )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "holybolt", gg_unit_Hpal_0435 )
else
call DoNothing( )
endif
if ( Trig_Blessing_of_Protection_Func004C() ) then
call DisableTrigger( GetTriggeringTrigger() )
call TriggerExecute( gg_trg_Blessing_of_Protection_Cooldown )
call CreateNUnitsAtLoc( 1, 'h00B', GetOwningPlayer(gg_unit_Hpal_0435), loc, bj_UNIT_FACING )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "innerfire", gg_unit_Hpal_0435 )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "holybolt", gg_unit_Hpal_0435 )
else
call DoNothing( )
endif
if ( Trig_Blessing_of_Protection_Func005C() ) then
call DisableTrigger( GetTriggeringTrigger() )
call TriggerExecute( gg_trg_Blessing_of_Protection_Cooldown )
call CreateNUnitsAtLoc( 1, 'h00B', GetOwningPlayer(gg_unit_Hpal_0435), loc, bj_UNIT_FACING )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "innerfire", gg_unit_Hpal_0435 )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "holybolt", gg_unit_Hpal_0435 )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Blessing_of_Protection takes nothing returns nothing
set gg_trg_Blessing_of_Protection = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Blessing_of_Protection, gg_unit_Hpal_0435, EVENT_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Blessing_of_Protection, Condition( function Trig_Blessing_of_Protection_Conditions ) )
call TriggerAddAction( gg_trg_Blessing_of_Protection, function Trig_Blessing_of_Protection_Actions )
endfunction
function Trig_Judgement_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A092' ) ) then
return false
endif
return true
endfunction
function Trig_Judgement_Func007C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetSpellAbilityUnit(), 'B00R') == true ) ) then
return false
endif
return true
endfunction
function Trig_Judgement_Func008C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetSpellAbilityUnit(), 'B02N') == true ) ) then
return false
endif
return true
endfunction
function Trig_Judgement_Func009C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetSpellAbilityUnit(), 'B02P') == true ) ) then
return false
endif
return true
endfunction
function Trig_Judgement_Actions takes nothing returns nothing
local location loc
call UnitRemoveAbilityBJ( 'A03D', gg_unit_Hpal_0435 )
call UnitRemoveAbilityBJ( 'A03G', gg_unit_Hpal_0435 )
call UnitRemoveAbilityBJ( 'A03X', gg_unit_Hpal_0435 )
call UnitRemoveAbilityBJ( 'A03Z', gg_unit_Hpal_0435 )
call UnitRemoveAbilityBJ( 'A043', gg_unit_Hpal_0435 )
set loc = GetUnitLoc(GetSpellTargetUnit())
call UnitDamageTargetBJ( GetSpellAbilityUnit(), GetSpellTargetUnit(), 50.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_LIGHTNING )
if ( Trig_Judgement_Func007C() ) then
call UnitDamageTargetBJ( GetSpellAbilityUnit(), GetSpellTargetUnit(), ( 50.00 + ( 100.00 * I2R(GetUnitAbilityLevelSwapped('A03C', GetSpellAbilityUnit())) ) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_LIGHTNING )
else
call DoNothing( )
endif
if ( Trig_Judgement_Func008C() ) then
call UnitRemoveBuffBJ( 'B02N', GetSpellAbilityUnit() )
call CreateNUnitsAtLoc( 1, 'h00L', GetOwningPlayer(gg_unit_Hpal_0435), loc, bj_UNIT_FACING )
call SetUnitAbilityLevelSwapped( 'A05G', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A092', GetSpellAbilityUnit()) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", GetSpellTargetUnit() )
else
call DoNothing( )
endif
if ( Trig_Judgement_Func009C() ) then
call UnitRemoveBuffBJ( 'B02P', GetSpellAbilityUnit() )
call UnitDamageTargetBJ( GetSpellAbilityUnit(), GetSpellTargetUnit(), ( 100.00 + ( 50.00 * I2R(GetUnitAbilityLevelSwapped('A092', GetSpellAbilityUnit())) ) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_LIGHTNING )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Judgement takes nothing returns nothing
set gg_trg_Judgement = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Judgement, gg_unit_Hpal_0435, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Judgement, Condition( function Trig_Judgement_Conditions ) )
call TriggerAddAction( gg_trg_Judgement, function Trig_Judgement_Actions )
endfunction
function Trig_Corpse_Explosion_Run_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A04S' ) ) then
return false
endif
return true
endfunction
function Trig_Corpse_Explosion_Run_Func002002003001001003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Corpse_Explosion_Run_Func002002003001001003002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == false )
endfunction
function Trig_Corpse_Explosion_Run_Func002002003001001003002002 takes nothing returns boolean
return ( IsUnitDeadBJ(GetFilterUnit()) == true )
endfunction
function Trig_Corpse_Explosion_Run_Func002002003001001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Corpse_Explosion_Run_Func002002003001001003002001(), Trig_Corpse_Explosion_Run_Func002002003001001003002002() )
endfunction
function Trig_Corpse_Explosion_Run_Func002002003001001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Corpse_Explosion_Run_Func002002003001001003001(), Trig_Corpse_Explosion_Run_Func002002003001001003002() )
endfunction
function Trig_Corpse_Explosion_Run_Func003C takes nothing returns boolean
if ( not ( ( udg_g_genericreal[16] - 150.00 ) >= ( I2R(GetUnitAbilityLevelSwapped('A04S', gg_unit_O000_0234)) * 100.00 ) ) ) then
return false
endif
return true
endfunction
function Trig_Corpse_Explosion_Run_Func004001003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Corpse_Explosion_Run_Func004001003002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Corpse_Explosion_Run_Func004001003002002 takes nothing returns boolean
return ( IsPlayerEnemy(GetOwningPlayer(GetFilterUnit()), GetOwningPlayer(gg_unit_O000_0234)) == true )
endfunction
function Trig_Corpse_Explosion_Run_Func004001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Corpse_Explosion_Run_Func004001003002001(), Trig_Corpse_Explosion_Run_Func004001003002002() )
endfunction
function Trig_Corpse_Explosion_Run_Func004001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Corpse_Explosion_Run_Func004001003001(), Trig_Corpse_Explosion_Run_Func004001003002() )
endfunction
function Trig_Corpse_Explosion_Run_Func004002 takes nothing returns nothing
call UnitDamageTargetBJ( gg_unit_O000_0234, GetEnumUnit(), udg_g_genericreal[16], ATTACK_TYPE_NORMAL, DAMAGE_TYPE_FIRE )
endfunction
function Trig_Corpse_Explosion_Run_Func005001003001 takes nothing returns boolean
return ( IsUnitDeadBJ(GetFilterUnit()) == true )
endfunction
function Trig_Corpse_Explosion_Run_Func005001003002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Corpse_Explosion_Run_Func005001003002002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == false )
endfunction
function Trig_Corpse_Explosion_Run_Func005001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Corpse_Explosion_Run_Func005001003002001(), Trig_Corpse_Explosion_Run_Func005001003002002() )
endfunction
function Trig_Corpse_Explosion_Run_Func005001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Corpse_Explosion_Run_Func005001003001(), Trig_Corpse_Explosion_Run_Func005001003002() )
endfunction
function Trig_Corpse_Explosion_Run_Func005A takes nothing returns nothing
local location loc
set loc = GetUnitLoc(GetEnumUnit())
call AddSpecialEffectLocBJ( loc, "Objects\\Spawnmodels\\Orc\\OrcLargeDeathExplode\\OrcLargeDeathExplode.mdl" )
call AddSpecialEffectLocBJ( PolarProjectionBJ(loc, 75.00, GetRandomDirectionDeg()), "Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl" )
call AddSpecialEffectLocBJ( PolarProjectionBJ(loc, 75.00, GetRandomDirectionDeg()), "Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl" )
call RemoveUnit( GetEnumUnit() )
call RemoveLocation(loc)
set loc = null
endfunction
function Trig_Corpse_Explosion_Run_Actions takes nothing returns nothing
local group g
set udg_g_genericpoint[18] = GetSpellTargetLoc()
set udg_g_genericreal[16] = ( 75.00 * I2R(CountUnitsInGroup(GetUnitsInRangeOfLocMatching(175.00, udg_g_genericpoint[18], Condition(function Trig_Corpse_Explosion_Run_Func002002003001001003)))) )
if ( Trig_Corpse_Explosion_Run_Func003C() ) then
set udg_g_genericreal[16] = ( 150.00 + ( I2R(GetUnitAbilityLevelSwapped('A04S', gg_unit_O000_0234)) * 100.00 ) )
else
call DoNothing( )
endif
set g = GetUnitsInRangeOfLocMatching(300.00, udg_g_genericpoint[18], Condition(function Trig_Corpse_Explosion_Run_Func004001003))
call ForGroupBJ( g, function Trig_Corpse_Explosion_Run_Func004002 )
set g = GetUnitsInRangeOfLocMatching(175.00, udg_g_genericpoint[18], Condition(function Trig_Corpse_Explosion_Run_Func005001003))
call ForGroupBJ( g, function Trig_Corpse_Explosion_Run_Func005A )
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_Corpse_Explosion_Run takes nothing returns nothing
set gg_trg_Corpse_Explosion_Run = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Corpse_Explosion_Run, gg_unit_O000_0234, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Corpse_Explosion_Run, Condition( function Trig_Corpse_Explosion_Run_Conditions ) )
call TriggerAddAction( gg_trg_Corpse_Explosion_Run, function Trig_Corpse_Explosion_Run_Actions )
endfunction
function Trig_Dark_Portal_Cast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A04V' ) ) then
return false
endif
return true
endfunction
function Trig_Dark_Portal_Cast_Birth takes nothing returns nothing
call SetUnitAnimation( GetEnumUnit(), "birth" )
endfunction
function Trig_Dark_Portal_Cast_Stand takes nothing returns nothing
call SetUnitAnimation( GetEnumUnit(), "stand" )
endfunction
function Trig_Dark_Portal_Cast_Actions takes nothing returns nothing
local location loc
local group g
call TriggerSleepAction( 1.00 )
set loc = PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 250.00, 0)
call CreateNUnitsAtLoc( 1, 'e00I', GetOwningPlayer(GetSpellAbilityUnit()), loc, bj_UNIT_FACING )
set loc = PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 250.00, 20.00)
call CreateNUnitsAtLoc( 1, 'e00I', GetOwningPlayer(GetSpellAbilityUnit()), loc, bj_UNIT_FACING )
set loc = PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 250.00, 40.00)
call CreateNUnitsAtLoc( 1, 'e00I', GetOwningPlayer(GetSpellAbilityUnit()), loc, bj_UNIT_FACING )
set loc = PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 250.00, 60.00)
call CreateNUnitsAtLoc( 1, 'e00I', GetOwningPlayer(GetSpellAbilityUnit()), loc, bj_UNIT_FACING )
set loc = PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 250.00, 80.00)
call CreateNUnitsAtLoc( 1, 'e00I', GetOwningPlayer(GetSpellAbilityUnit()), loc, bj_UNIT_FACING )
set loc = PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 250.00, 100.00)
call CreateNUnitsAtLoc( 1, 'e00I', GetOwningPlayer(GetSpellAbilityUnit()), loc, bj_UNIT_FACING )
set loc = PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 250.00, 120.00)
call CreateNUnitsAtLoc( 1, 'e00I', GetOwningPlayer(GetSpellAbilityUnit()), loc, bj_UNIT_FACING )
set loc = PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 250.00, 140.00)
call CreateNUnitsAtLoc( 1, 'e00I', GetOwningPlayer(GetSpellAbilityUnit()), loc, bj_UNIT_FACING )
set loc = PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 250.00, 160.00)
call CreateNUnitsAtLoc( 1, 'e00I', GetOwningPlayer(GetSpellAbilityUnit()), loc, bj_UNIT_FACING )
set loc = PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 250.00, 180.00)
call CreateNUnitsAtLoc( 1, 'e00I', GetOwningPlayer(GetSpellAbilityUnit()), loc, bj_UNIT_FACING )
set loc = PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 250.00, 200.00)
call CreateNUnitsAtLoc( 1, 'e00I', GetOwningPlayer(GetSpellAbilityUnit()), loc, bj_UNIT_FACING )
set loc = PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 250.00, 220.00)
call CreateNUnitsAtLoc( 1, 'e00I', GetOwningPlayer(GetSpellAbilityUnit()), loc, bj_UNIT_FACING )
set loc = PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 250.00, 240.00)
call CreateNUnitsAtLoc( 1, 'e00I', GetOwningPlayer(GetSpellAbilityUnit()), loc, bj_UNIT_FACING )
set loc = PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 250.00, 260.00)
call CreateNUnitsAtLoc( 1, 'e00I', GetOwningPlayer(GetSpellAbilityUnit()), loc, bj_UNIT_FACING )
set loc = PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 250.00, 280.00)
call CreateNUnitsAtLoc( 1, 'e00I', GetOwningPlayer(GetSpellAbilityUnit()), loc, bj_UNIT_FACING )
set loc = PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 250.00, 300.00)
call CreateNUnitsAtLoc( 1, 'e00I', GetOwningPlayer(GetSpellAbilityUnit()), loc, bj_UNIT_FACING )
set loc = PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 250.00, 320.00)
call CreateNUnitsAtLoc( 1, 'e00I', GetOwningPlayer(GetSpellAbilityUnit()), loc, bj_UNIT_FACING )
set loc = PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 250.00, 340.00)
call CreateNUnitsAtLoc( 1, 'e00I', GetOwningPlayer(GetSpellAbilityUnit()), loc, bj_UNIT_FACING )
call RemoveLocation(loc)
set loc = null
set g = GetUnitsOfTypeIdAll('e00I')
call ForGroupBJ( g, function Trig_Dark_Portal_Cast_Birth )
call TriggerSleepAction( 1.00 )
call ForGroupBJ( g, function Trig_Dark_Portal_Cast_Stand )
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_Dark_Portal_Cast takes nothing returns nothing
set gg_trg_Dark_Portal_Cast = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Dark_Portal_Cast, gg_unit_O000_0234, EVENT_UNIT_SPELL_CHANNEL )
call TriggerAddCondition( gg_trg_Dark_Portal_Cast, Condition( function Trig_Dark_Portal_Cast_Conditions ) )
call TriggerAddAction( gg_trg_Dark_Portal_Cast, function Trig_Dark_Portal_Cast_Actions )
endfunction
function Trig_Dark_Portal_Cancel_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A04V' ) ) then
return false
endif
return true
endfunction
function Trig_Dark_Portal_Cancel_Func001002 takes nothing returns nothing
call AddSpecialEffectLocBJ( GetUnitLoc(GetEnumUnit()), "Abilities\\Spells\\Undead\\CarrionSwarm\\CarrionSwarmDamage.mdl" )
endfunction
function Trig_Dark_Portal_Cancel_Func003002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Dark_Portal_Cancel_Func005002 takes nothing returns nothing
call AddSpecialEffectLocBJ( GetUnitLoc(GetEnumUnit()), "Abilities\\Spells\\Undead\\CarrionSwarm\\CarrionSwarmDamage.mdl" )
endfunction
function Trig_Dark_Portal_Cancel_Func006002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Dark_Portal_Cancel_Actions takes nothing returns nothing
local group g
set g = GetUnitsOfTypeIdAll('e00I')
call ForGroupBJ( g, function Trig_Dark_Portal_Cancel_Func001002 )
call ForGroupBJ( g, function Trig_Dark_Portal_Cancel_Func003002 )
call TriggerSleepAction( 1.50 )
call ForGroupBJ( g, function Trig_Dark_Portal_Cancel_Func005002 )
call ForGroupBJ( g, function Trig_Dark_Portal_Cancel_Func006002 )
call TriggerSleepAction( 1.50 )
call ForGroupBJ( g, function Trig_Dark_Portal_Cancel_Func005002 )
call ForGroupBJ( g, function Trig_Dark_Portal_Cancel_Func006002 )
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_Dark_Portal_Cancel takes nothing returns nothing
set gg_trg_Dark_Portal_Cancel = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Dark_Portal_Cancel, gg_unit_O000_0234, EVENT_UNIT_SPELL_ENDCAST )
call TriggerAddCondition( gg_trg_Dark_Portal_Cancel, Condition( function Trig_Dark_Portal_Cancel_Conditions ) )
call TriggerAddAction( gg_trg_Dark_Portal_Cancel, function Trig_Dark_Portal_Cancel_Actions )
endfunction
function Trig_Dark_Portal_Summon_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A04V' ) ) then
return false
endif
return true
endfunction
function Trig_Dark_Portal_Summon_Func002002 takes nothing returns nothing
call AddSpecialEffectLocBJ( GetUnitLoc(GetEnumUnit()), "Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl" )
endfunction
function Trig_Dark_Portal_Summon_Func003002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Dark_Portal_Summon_Func010002 takes nothing returns nothing
call UnitApplyTimedLifeBJ( 90.00, 'BTLF', GetEnumUnit() )
endfunction
function Trig_Dark_Portal_Summon_Func011001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'nfgu' )
endfunction
function Trig_Dark_Portal_Summon_Func011001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Dark_Portal_Summon_Func011001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Dark_Portal_Summon_Func011001002001(), Trig_Dark_Portal_Summon_Func011001002002() )
endfunction
function Trig_Dark_Portal_Summon_Func011002 takes nothing returns nothing
call UnitApplyTimedLifeBJ( 90.00, 'BTLF', GetEnumUnit() )
endfunction
function Trig_Dark_Portal_Summon_Func012001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'nfgu' )
endfunction
function Trig_Dark_Portal_Summon_Func012001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Dark_Portal_Summon_Func012001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Dark_Portal_Summon_Func012001002001(), Trig_Dark_Portal_Summon_Func012001002002() )
endfunction
function Trig_Dark_Portal_Summon_Func012002 takes nothing returns nothing
call SetUnitAnimation( GetEnumUnit(), "spell" )
endfunction
function Trig_Dark_Portal_Summon_Func014001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'nfgu' )
endfunction
function Trig_Dark_Portal_Summon_Func014001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Dark_Portal_Summon_Func014001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Dark_Portal_Summon_Func014001002001(), Trig_Dark_Portal_Summon_Func014001002002() )
endfunction
function Trig_Dark_Portal_Summon_Func014002 takes nothing returns nothing
call SetUnitAnimation( GetEnumUnit(), "stand" )
endfunction
function Trig_Dark_Portal_Summon_Func015002 takes nothing returns nothing
call AddSpecialEffectLocBJ( GetUnitLoc(GetEnumUnit()), "Abilities\\Spells\\Undead\\CarrionSwarm\\CarrionSwarmDamage.mdl" )
endfunction
function Trig_Dark_Portal_Summon_Func016002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Dark_Portal_Summon_Actions takes nothing returns nothing
local location loc
local group g
set g = GetUnitsOfTypeIdAll('e00I')
call ForGroupBJ( g, function Trig_Dark_Portal_Summon_Func002002 )
call ForGroupBJ( g, function Trig_Dark_Portal_Summon_Func003002 )
set loc = PolarProjectionBJ(GetUnitLoc(gg_unit_O000_0234), 150.00, 0.00)
call CreateNUnitsAtLoc( 1, 'nfgu', GetOwningPlayer(gg_unit_O000_0234), loc, 180.00 )
set loc = PolarProjectionBJ(GetUnitLoc(gg_unit_O000_0234), 150.00, 60.00)
call CreateNUnitsAtLoc( 1, 'nfgu', GetOwningPlayer(gg_unit_O000_0234), loc, 240.00 )
set loc = PolarProjectionBJ(GetUnitLoc(gg_unit_O000_0234), 150.00, 120.00)
call CreateNUnitsAtLoc( 1, 'nfgu', GetOwningPlayer(gg_unit_O000_0234), loc, 300.00 )
set loc = PolarProjectionBJ(GetUnitLoc(gg_unit_O000_0234), 150.00, 180.00)
call CreateNUnitsAtLoc( 1, 'nfgu', GetOwningPlayer(gg_unit_O000_0234), loc, 0.00 )
set loc = PolarProjectionBJ(GetUnitLoc(gg_unit_O000_0234), 150.00, 240.00)
call CreateNUnitsAtLoc( 1, 'nfgu', GetOwningPlayer(gg_unit_O000_0234), loc, 60.00 )
set loc = PolarProjectionBJ(GetUnitLoc(gg_unit_O000_0234), 150.00, 300.00)
call CreateNUnitsAtLoc( 1, 'nfgu', GetOwningPlayer(gg_unit_O000_0234), loc, 120.00 )
set g = GetUnitsOfTypeIdAll('nfgu')
call ForGroupBJ( g, function Trig_Dark_Portal_Summon_Func010002 )
set g = GetUnitsOfPlayerMatching(GetOwningPlayer(gg_unit_O000_0234), Condition(function Trig_Dark_Portal_Summon_Func011001002))
call ForGroupBJ( g, function Trig_Dark_Portal_Summon_Func011002 )
set g = GetUnitsOfPlayerMatching(GetOwningPlayer(gg_unit_O000_0234), Condition(function Trig_Dark_Portal_Summon_Func012001002))
call ForGroupBJ( g, function Trig_Dark_Portal_Summon_Func012002 )
call TriggerSleepAction( 1.15 )
set g = GetUnitsOfPlayerMatching(GetOwningPlayer(gg_unit_O000_0234), Condition(function Trig_Dark_Portal_Summon_Func014001002))
call ForGroupBJ( g, function Trig_Dark_Portal_Summon_Func014002 )
set g = GetUnitsOfTypeIdAll('e00I')
call ForGroupBJ( g, function Trig_Dark_Portal_Summon_Func015002 )
call ForGroupBJ( g, function Trig_Dark_Portal_Summon_Func016002 )
call RemoveLocation(loc)
set loc = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_Dark_Portal_Summon takes nothing returns nothing
set gg_trg_Dark_Portal_Summon = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Dark_Portal_Summon, gg_unit_O000_0234, EVENT_UNIT_SPELL_FINISH )
call TriggerAddCondition( gg_trg_Dark_Portal_Summon, Condition( function Trig_Dark_Portal_Summon_Conditions ) )
call TriggerAddAction( gg_trg_Dark_Portal_Summon, function Trig_Dark_Portal_Summon_Actions )
endfunction
function Trig_Raise_Warrior_Remove_and_Add_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'uske' ) ) then
return false
endif
return true
endfunction
function Trig_Raise_Warrior_Remove_and_Add_Actions takes nothing returns nothing
local location loc
call UnitApplyTimedLifeBJ( ( 15.00 + ( 15.00 * I2R(GetUnitAbilityLevelSwapped('A07M', gg_unit_O000_0234)) ) ), 'Brai', GetEnteringUnit() )
set loc = GetUnitLoc(GetEnteringUnit())
call CreateNUnitsAtLoc( 1, 'n00U', GetOwningPlayer(GetEnteringUnit()), loc, bj_UNIT_FACING )
call SetUnitAnimation( GetLastCreatedUnit(), "birth" )
call AddSpecialEffectTargetUnitBJ( "origin", GetLastCreatedUnit(), "Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl" )
call UnitApplyTimedLifeBJ( ( 15.00 + ( 15.00 * I2R(GetUnitAbilityLevelSwapped('A07M', gg_unit_O000_0234)) ) ), 'Brai', GetLastCreatedUnit() )
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Raise_Warrior_Remove_and_Add takes nothing returns nothing
set gg_trg_Raise_Warrior_Remove_and_Add = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Raise_Warrior_Remove_and_Add, GetPlayableMapRect() )
call TriggerAddCondition( gg_trg_Raise_Warrior_Remove_and_Add, Condition( function Trig_Raise_Warrior_Remove_and_Add_Conditions ) )
call TriggerAddAction( gg_trg_Raise_Warrior_Remove_and_Add, function Trig_Raise_Warrior_Remove_and_Add_Actions )
endfunction
function Trig_Backstab_Attack_Conditions takes nothing returns boolean
if ( not ( IsPlayerEnemy(GetOwningPlayer(GetAttackedUnitBJ()), GetOwningPlayer(GetAttacker())) == true ) ) then
return false
endif
if ( not ( GetAttacker() == gg_unit_E003_0188 ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_MECHANICAL) == false ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A07B', GetAttacker()) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Backstab_Attack_Actions takes nothing returns nothing
local real backstabAssa
local real backstabOben
local real backstabTarget
local real backstabUnten
set backstabAssa = GetUnitFacing(GetAttacker())
set backstabTarget = GetUnitFacing(GetAttackedUnitBJ())
if ( backstabTarget < 315.00 ) then
if ( ( backstabAssa >= 315.00 ) and ( backstabTarget < 45.00 ) ) then
set backstabAssa = ( backstabAssa - 360.00 )
set backstabOben = ( backstabTarget + 45.00 )
set backstabUnten = ( backstabTarget - 45.00 )
else
set backstabOben = ( backstabTarget + 45.00 )
set backstabUnten = ( backstabTarget - 45.00 )
endif
else
if ( backstabAssa < 45.00 ) then
set backstabAssa = ( backstabAssa + 360.00 )
set backstabOben = ( backstabTarget + 45.00 )
set backstabUnten = ( backstabTarget - 45.00 )
else
set backstabOben = ( backstabTarget + 45.00 )
set backstabUnten = ( backstabTarget - 45.00 )
endif
endif
if ( ( backstabAssa <= backstabOben ) and ( backstabAssa >= backstabUnten ) ) then
if ( UnitHasBuffBJ(GetAttacker(), 'B00G') == true ) then
set udg_g_genericinteger[20] = ( ( GetUnitAbilityLevelSwapped('A07B', GetAttacker()) * 10 ) + ( GetUnitAbilityLevelSwapped('A00K', GetAttacker()) * ( GetUnitAbilityLevelSwapped('A00K', GetAttacker()) * 10 ) ) )
else
set udg_g_genericinteger[20] = ( ( GetUnitAbilityLevelSwapped('A07B', GetAttacker()) * 10 ) + 0 )
endif
call TriggerSleepAction( 0.15 )
call CreateTextTagUnitBJ( ( I2S(udg_g_genericinteger[20]) + "!" ), GetAttacker(), -25.00, 10, 100, 0.00, 0.00, 0 )
call SetTextTagPermanentBJ( GetLastCreatedTextTag(), false )
call SetTextTagLifespanBJ( GetLastCreatedTextTag(), 1.00 )
call ShowTextTagForceBJ( false, GetLastCreatedTextTag(), GetPlayersAll() )
if ( UnitHasBuffBJ(GetAttacker(), 'B00G') == true ) then
call ShowTextTagForceBJ( true, GetLastCreatedTextTag(), udg_GoodGroup )
else
call ShowTextTagForceBJ( true, GetLastCreatedTextTag(), GetPlayersAll() )
endif
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 75.00, 90 )
call UnitDamageTargetBJ( GetAttacker(), GetAttackedUnitBJ(), I2R(udg_g_genericinteger[20]), ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Backstab_Attack takes nothing returns nothing
set gg_trg_Backstab_Attack = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Backstab_Attack, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Backstab_Attack, Condition( function Trig_Backstab_Attack_Conditions ) )
call TriggerAddAction( gg_trg_Backstab_Attack, function Trig_Backstab_Attack_Actions )
endfunction
function Trig_Backstab_Cast_Conditions takes nothing returns boolean
if ( ( IsPlayerEnemy(GetOwningPlayer(GetSpellTargetUnit()), GetOwningPlayer(GetSpellAbilityUnit())) == true ) and ( GetSpellAbilityUnit() == gg_unit_E003_0188 ) and ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_STRUCTURE) == false ) and ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_MECHANICAL) == false ) and ( GetUnitAbilityLevelSwapped('A07B', GetSpellAbilityUnit()) >= 1 ) and ( ( GetSpellAbilityId() == 'A003' ) or ( GetSpellAbilityId() == 'A01Y' ) or ( GetSpellAbilityId() == 'A09D' ) ) ) then
return true
else
return false
endif
endfunction
function Trig_Backstab_Cast_Actions takes nothing returns nothing
local real backstabAssa
local real backstabOben
local real backstabTarget
local real backstabUnten
set udg_g_genericunit[16] = GetSpellTargetUnit()
set backstabAssa = GetUnitFacing(gg_unit_E003_0188)
set backstabTarget = GetUnitFacing(udg_g_genericunit[16])
if ( backstabTarget < 315.00 ) then
if ( ( backstabAssa >= 315.00 ) and ( backstabTarget < 45.00 ) ) then
set backstabAssa = ( backstabAssa - 360.00 )
set backstabOben = ( backstabTarget + 45.00 )
set backstabUnten = ( backstabTarget - 45.00 )
else
set backstabOben = ( backstabTarget + 45.00 )
set backstabUnten = ( backstabTarget - 45.00 )
endif
else
if ( backstabAssa < 45.00 ) then
set backstabAssa = ( backstabAssa + 360.00 )
set backstabOben = ( backstabTarget + 45.00 )
set backstabUnten = ( backstabTarget - 45.00 )
else
set backstabOben = ( backstabTarget + 45.00 )
set backstabUnten = ( backstabTarget - 45.00 )
endif
endif
if ( ( backstabAssa <= backstabOben ) and ( backstabAssa >= backstabUnten ) ) then
if ( UnitHasBuffBJ(gg_unit_E003_0188, 'B00G') == true ) then
set udg_g_genericinteger[20] = ( ( GetUnitAbilityLevelSwapped('A07B', gg_unit_E003_0188) * 10 ) + ( GetUnitAbilityLevelSwapped('A00K', gg_unit_E003_0188) * ( GetUnitAbilityLevelSwapped('A00K', gg_unit_E003_0188) * 10 ) ) )
else
set udg_g_genericinteger[20] = ( ( GetUnitAbilityLevelSwapped('A07B', gg_unit_E003_0188) * 10 ) + 0 )
endif
call CreateTextTagUnitBJ( ( I2S(udg_g_genericinteger[20]) + "!" ), gg_unit_E003_0188, -25.00, 10, 100, 0.00, 0.00, 0 )
call SetTextTagPermanentBJ( GetLastCreatedTextTag(), false )
call SetTextTagLifespanBJ( GetLastCreatedTextTag(), 1.00 )
call ShowTextTagForceBJ( false, GetLastCreatedTextTag(), GetPlayersAll() )
if ( UnitHasBuffBJ(gg_unit_E003_0188, 'B00G') == true ) then
call ShowTextTagForceBJ( true, GetLastCreatedTextTag(), udg_GoodGroup )
else
call ShowTextTagForceBJ( true, GetLastCreatedTextTag(), GetPlayersAll() )
endif
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 75.00, 90 )
call UnitDamageTargetBJ( gg_unit_E003_0188, udg_g_genericunit[16], I2R(udg_g_genericinteger[20]), ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Backstab_Cast takes nothing returns nothing
set gg_trg_Backstab_Cast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Backstab_Cast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Backstab_Cast, Condition( function Trig_Backstab_Cast_Conditions ) )
call TriggerAddAction( gg_trg_Backstab_Cast, function Trig_Backstab_Cast_Actions )
endfunction
function Trig_Troll_Sinister_Strike_Conditions takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A01Y') or ( GetSpellAbilityId() == 'A003' ) ) then
return true
endif
return false
endfunction
function Trig_Troll_Sinister_Strike_Actions takes nothing returns nothing
local unit dummy
local unit caster = GetSpellAbilityUnit()
call CreateNUnitsAtLoc( 1, 'h02M', GetOwningPlayer(caster), GetUnitLoc(caster), bj_UNIT_FACING )
set dummy = GetLastCreatedUnit()
if ( GetComboPoints(caster) == 1 ) then
call SetUnitAbilityLevelSwapped( 'A09E', dummy, 2 )
call ClearComboPoints(caster)
elseif ( GetComboPoints(caster) == 2 ) then
call SetUnitAbilityLevelSwapped( 'A09E', dummy, 3 )
call ClearComboPoints(caster)
elseif ( GetComboPoints(caster) == 3 ) then
call SetUnitAbilityLevelSwapped( 'A09E', dummy, 4 )
call ClearComboPoints(caster)
elseif ( GetComboPoints(caster) == 4 ) then
call SetUnitAbilityLevelSwapped( 'A09E', dummy, 5 )
call ClearComboPoints(caster)
elseif ( GetComboPoints(caster) == 5 ) then
call SetUnitAbilityLevelSwapped( 'A09E', dummy, 5 )
call ClearComboPoints(caster)
else
call SetUnitAbilityLevelSwapped( 'A09E', dummy, 1 )
endif
call IssueTargetOrderBJ( dummy, "cripple", caster )
call TriggerSleepAction( 0.01 )
call RemoveUnit( dummy )
endfunction
//===========================================================================
function InitTrig_Troll_Sinister_Strike takes nothing returns nothing
set gg_trg_Troll_Sinister_Strike = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Troll_Sinister_Strike, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Troll_Sinister_Strike, Condition( function Trig_Troll_Sinister_Strike_Conditions ) )
call TriggerAddAction( gg_trg_Troll_Sinister_Strike, function Trig_Troll_Sinister_Strike_Actions )
endfunction
function Trig_Troll_Eviscerate_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A09D' ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Eviscerate_Actions takes nothing returns nothing
local texttag floattext
local unit caster = GetSpellAbilityUnit()
local real modifier = 20.00
local real damage = 100 + (I2R(GetUnitAbilityLevelSwapped('A09D', caster)) * I2R(GetComboPoints(caster)) * modifier)
call UnitDamageTargetBJ( caster, GetSpellTargetUnit(), damage, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL )
call ClearComboPoints(caster)
call CreateTextTagUnitBJ( ( I2S(R2I(damage)) + "!" ), caster, 0.00, 10, 100, 0.00, 0.00, 0 )
call SetTextTagPermanentBJ( GetLastCreatedTextTag(), false )
call SetTextTagLifespanBJ( GetLastCreatedTextTag(), 1.00 )
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 75.00, 90 )
call ShowTextTagForceBJ( true, GetLastCreatedTextTag(), GetPlayersAll() )
endfunction
//===========================================================================
function InitTrig_Troll_Eviscerate takes nothing returns nothing
set gg_trg_Troll_Eviscerate = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Troll_Eviscerate, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Troll_Eviscerate, Condition( function Trig_Troll_Eviscerate_Conditions ) )
call TriggerAddAction( gg_trg_Troll_Eviscerate, function Trig_Troll_Eviscerate_Actions )
endfunction
function Trig_Charged_Bolt_Move_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'u001' ) ) then
return false
endif
return true
endfunction
function Trig_Charged_Bolt_Move_Actions takes nothing returns nothing
local location loc
call SetUnitPathing( GetEnteringUnit(), false )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 20
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set loc = PolarProjectionBJ(GetUnitLoc(GetEnteringUnit()), 500.00, GetRandomDirectionDeg())
call IssuePointOrderLocBJ( GetEnteringUnit(), "move", loc )
call TriggerSleepAction( 1.00 )
call RemoveLocation(loc)
set loc = null
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Charged_Bolt_Move takes nothing returns nothing
set gg_trg_Charged_Bolt_Move = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Charged_Bolt_Move, GetPlayableMapRect() )
call TriggerAddCondition( gg_trg_Charged_Bolt_Move, Condition( function Trig_Charged_Bolt_Move_Conditions ) )
call TriggerAddAction( gg_trg_Charged_Bolt_Move, function Trig_Charged_Bolt_Move_Actions )
endfunction
function Trig_Lightning_Shield_Learn_SFX_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A042' ) ) then
return false
endif
return true
endfunction
function Trig_Lightning_Shield_Learn_SFX_Actions takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ( "origin", GetLearningUnit(), "Abilities\\Spells\\Orc\\LightningShield\\LightningShieldTarget.mdl" )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Lightning_Shield_Learn_SFX takes nothing returns nothing
set gg_trg_Lightning_Shield_Learn_SFX = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Lightning_Shield_Learn_SFX, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Lightning_Shield_Learn_SFX, Condition( function Trig_Lightning_Shield_Learn_SFX_Conditions ) )
call TriggerAddAction( gg_trg_Lightning_Shield_Learn_SFX, function Trig_Lightning_Shield_Learn_SFX_Actions )
endfunction
function Aimed_Shot_Conditions takes nothing returns boolean
if ( GetUnitTypeId(GetEventDamageSource()) == 'E002' ) then
return true
endif
return false
endfunction
function Aimed_Shot_Actions takes nothing returns nothing
call DestroyTrigger(GetTriggeringTrigger())
if (GetUnitAbilityLevel(GetEventDamageSource(), 'A09F') > 0) then
set udg_g_genericinteger[8] = ( GetHeroStatBJ(bj_HEROSTAT_AGI, GetEventDamageSource(), true) + 20 + ( GetUnitAbilityLevelSwapped('A09F', GetEventDamageSource()) * 10 ) )
call UnitDamageTargetBJ( GetEventDamageSource(), GetTriggerUnit(), I2R(udg_g_genericinteger[8]), ATTACK_TYPE_PIERCE, DAMAGE_TYPE_NORMAL )
call CreateTextTagUnitBJ( ( I2S(udg_g_genericinteger[8]) + "!" ), GetEventDamageSource(), -25.00, 10, 100, 0.00, 0.00, 0 )
call SetTextTagPermanentBJ( GetLastCreatedTextTag(), false )
call SetTextTagLifespanBJ( GetLastCreatedTextTag(), 1.25 )
call ShowTextTagForceBJ( true, GetLastCreatedTextTag(), GetPlayersAll() )
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 75.00, 90 )
endif
endfunction
function Trig_Aimed_Shot_Init_Conditions takes nothing returns boolean
if (GetUnitTypeId(GetAttacker()) == 'E002' ) then
return true
endif
return false
endfunction
function Trig_Aimed_Shot_Init_Actions takes nothing returns nothing
local real timer1 = 10.00
local trigger Aimed_Shot_Trigger
if (TimerGetRemaining(udg_g_generictimer[13]) > 0.00 ) then
call DoNothing()
else
call StartTimerBJ( udg_g_generictimer[13], false, timer1 )
set Aimed_Shot_Trigger = CreateTrigger()
call TriggerRegisterUnitEvent( Aimed_Shot_Trigger, GetAttackedUnitBJ(), EVENT_UNIT_DAMAGED )
call TriggerAddCondition( Aimed_Shot_Trigger, Condition( function Aimed_Shot_Conditions ) )
call TriggerAddAction( Aimed_Shot_Trigger, function Aimed_Shot_Actions )
endif
endfunction
//===========================================================================
function InitTrig_Aimed_Shot_Init takes nothing returns nothing
set gg_trg_Aimed_Shot_Init = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Aimed_Shot_Init, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Aimed_Shot_Init, Condition( function Trig_Aimed_Shot_Init_Conditions ) )
call TriggerAddAction( gg_trg_Aimed_Shot_Init, function Trig_Aimed_Shot_Init_Actions )
endfunction
function Trig_batattack_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A09G' ) ) then
return false
endif
return true
endfunction
function Trig_batattack_Actions takes nothing returns nothing
local unit target = GetSpellTargetUnit()
local location targetloc = GetUnitLoc(target)
local location casterloc = GetUnitLoc(GetSpellAbilityUnit())
local unit bat
call PolledWait( 1.00 )
call CreateNUnitsAtLoc( 1, 'o002', GetOwningPlayer(GetSpellAbilityUnit()), PolarProjectionBJ(targetloc, 300.00, AngleBetweenPoints(casterloc, targetloc)), AngleBetweenPoints(targetloc, casterloc) )
set bat = GetLastCreatedUnit()
call SetUnitAbilityLevelSwapped( 'A09H', bat, GetUnitAbilityLevelSwapped('A09G', GetSpellAbilityUnit()) )
call IssueTargetOrderBJ( bat, "unstableconcoction", target )
call PolledWait( 0.10 )
call SetUnitFlyHeightBJ( bat, 65.00, 7000.00 )
call RemoveLocation(targetloc)
call RemoveLocation(casterloc)
set targetloc = null
set casterloc = null
endfunction
//===========================================================================
function InitTrig_Bat_Attack takes nothing returns nothing
set gg_trg_Bat_Attack = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Bat_Attack, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Bat_Attack, Condition( function Trig_batattack_Conditions ) )
call TriggerAddAction( gg_trg_Bat_Attack, function Trig_batattack_Actions )
endfunction
function Trig_Weaken_Cast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00O' ) ) then
return false
endif
return true
endfunction
function Trig_Weaken_Cast_Func006001003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Weaken_Cast_Func006001003002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Weaken_Cast_Func006001003002002 takes nothing returns boolean
return ( IsPlayerEnemy(GetOwningPlayer(GetFilterUnit()), GetOwningPlayer(gg_unit_Oshd_0422)) == true )
endfunction
function Trig_Weaken_Cast_Func006001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Weaken_Cast_Func006001003002001(), Trig_Weaken_Cast_Func006001003002002() )
endfunction
function Trig_Weaken_Cast_Func006001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Weaken_Cast_Func006001003001(), Trig_Weaken_Cast_Func006001003002() )
endfunction
function Trig_Weaken_Cast_Func006A takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'h028', GetOwningPlayer(gg_unit_Oshd_0422), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "cripple", GetEnumUnit() )
endfunction
function Trig_Weaken_Cast_Actions takes nothing returns nothing
local group g
local location loc
set udg_g_genericpoint[5] = GetSpellTargetLoc()
set loc = PolarProjectionBJ(udg_g_genericpoint[5], 0.00, 0)
call AddSpecialEffectLocBJ( loc, "Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayTarget.mdl" )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set loc = PolarProjectionBJ(udg_g_genericpoint[5], 60.00, ( I2R(GetForLoopIndexA()) * 60.00 ))
call AddSpecialEffectLocBJ( loc, "Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayTarget.mdl" )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set loc = PolarProjectionBJ(udg_g_genericpoint[5], 120.00, ( I2R(GetForLoopIndexA()) * 30.00 ))
call AddSpecialEffectLocBJ( loc, "Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayTarget.mdl" )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 15
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set loc = PolarProjectionBJ(udg_g_genericpoint[5], 180.00, ( I2R(GetForLoopIndexA()) * 24.00 ))
call AddSpecialEffectLocBJ( loc, "Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayTarget.mdl" )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set g = GetUnitsInRangeOfLocMatching(225.00, udg_g_genericpoint[5], Condition(function Trig_Weaken_Cast_Func006001003))
call ForGroupBJ( g, function Trig_Weaken_Cast_Func006A )
call DestroyGroup(g)
set g = null
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Weaken_Cast takes nothing returns nothing
set gg_trg_Weaken_Cast = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Weaken_Cast, gg_unit_Oshd_0422, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Weaken_Cast, Condition( function Trig_Weaken_Cast_Conditions ) )
call TriggerAddAction( gg_trg_Weaken_Cast, function Trig_Weaken_Cast_Actions )
endfunction
function Trig_Seelenschinden_Cast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08V' ) ) then
return false
endif
return true
endfunction
function Trig_Seelenschinden_Cast_Func003C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetSpellTargetUnit(), 'B02K') == true ) ) then
return false
endif
return true
endfunction
function Trig_Seelenschinden_Cast_Actions takes nothing returns nothing
local location loc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'h02B', GetOwningPlayer(gg_unit_Oshd_0422), loc, bj_UNIT_FACING )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "slow", GetSpellTargetUnit() )
if ( Trig_Seelenschinden_Cast_Func003C() ) then
call StartTimerBJ( udg_g_generictimer[11], true, 0.50 )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Seelenschinden_Cast takes nothing returns nothing
set gg_trg_Seelenschinden_Cast = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Seelenschinden_Cast, gg_unit_Oshd_0422, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Seelenschinden_Cast, Condition( function Trig_Seelenschinden_Cast_Conditions ) )
call TriggerAddAction( gg_trg_Seelenschinden_Cast, function Trig_Seelenschinden_Cast_Actions )
endfunction
function Trig_Seelenschinden_Ende_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08V' ) ) then
return false
endif
return true
endfunction
function Trig_Seelenschinden_Ende_Func002001002 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'B02J') == true )
endfunction
function Trig_Seelenschinden_Ende_Func002A takes nothing returns nothing
call UnitRemoveBuffBJ( 'B02J', GetEnumUnit() )
endfunction
function Trig_Seelenschinden_Ende_Actions takes nothing returns nothing
local group g
call PauseTimerBJ( true, udg_g_generictimer[11] )
set g = GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Seelenschinden_Ende_Func002001002))
call ForGroupBJ( g, function Trig_Seelenschinden_Ende_Func002A )
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_Seelenschinden_Ende takes nothing returns nothing
set gg_trg_Seelenschinden_Ende = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Seelenschinden_Ende, gg_unit_Oshd_0422, EVENT_UNIT_SPELL_FINISH )
call TriggerRegisterUnitEvent( gg_trg_Seelenschinden_Ende, gg_unit_Oshd_0422, EVENT_UNIT_SPELL_ENDCAST )
call TriggerAddCondition( gg_trg_Seelenschinden_Ende, Condition( function Trig_Seelenschinden_Ende_Conditions ) )
call TriggerAddAction( gg_trg_Seelenschinden_Ende, function Trig_Seelenschinden_Ende_Actions )
endfunction
function Trig_Hex_Effect_Func001001002 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'B02K') == true )
endfunction
function Trig_Hex_Effect_Func001Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 3) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Hex_Effect_Func001Func002C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Hex_Effect_Func001A takes nothing returns nothing
if ( Trig_Hex_Effect_Func001Func001C() ) then
call AddSpecialEffectTargetUnitBJ( "origin", GetEnumUnit(), "Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl" )
else
call DoNothing( )
endif
if ( Trig_Hex_Effect_Func001Func002C() ) then
call SetUnitManaBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) - ( ( 5.00 + ( 5.00 * I2R(GetUnitAbilityLevelSwapped('AOhx', gg_unit_Oshd_0422)) ) ) * ( GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) / 260.00 ) ) ) )
call UnitDamageTargetBJ( gg_unit_Oshd_0422, GetEnumUnit(), ( ( I2R(GetUnitAbilityLevelSwapped('A08Y', gg_unit_Oshd_0422)) * 0.08 ) * ( GetUnitStateSwap(UNIT_STATE_MAX_LIFE, GetEnumUnit()) / 2.00 ) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_LIGHTNING )
else
call SetUnitManaBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) - ( ( 5.00 + ( 5.00 * I2R(GetUnitAbilityLevelSwapped('AOhx', gg_unit_Oshd_0422)) ) ) * ( GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) / 200.00 ) ) ) )
call UnitDamageTargetBJ( gg_unit_Oshd_0422, GetEnumUnit(), ( ( I2R(GetUnitAbilityLevelSwapped('A08Y', gg_unit_Oshd_0422)) * 0.15 ) * ( GetUnitStateSwap(UNIT_STATE_MAX_LIFE, GetEnumUnit()) / 2.00 ) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_LIGHTNING )
endif
endfunction
function Trig_Hex_Effect_Actions takes nothing returns nothing
local group g = GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Hex_Effect_Func001001002))
call ForGroupBJ( g, function Trig_Hex_Effect_Func001A )
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_Hex_Effect takes nothing returns nothing
set gg_trg_Hex_Effect = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Hex_Effect, udg_g_generictimer[11] )
call TriggerAddAction( gg_trg_Hex_Effect, function Trig_Hex_Effect_Actions )
endfunction
function Trig_Avalanche_Create_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A059' ) ) then
return false
endif
return true
endfunction
function Trig_Avalanche_Create_Actions takes nothing returns nothing
local location loc
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set loc = PolarProjectionBJ(GetSpellTargetLoc(), GetRandomReal(35.00, 250.00), GetRandomDirectionDeg())
call CreateNUnitsAtLoc( 1, 'e00J', Player(5), loc, bj_UNIT_FACING )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveLocation(loc)
set loc = null
call EnableTrigger( gg_trg_Avalanche_Animation )
endfunction
//===========================================================================
function InitTrig_Avalanche_Create takes nothing returns nothing
set gg_trg_Avalanche_Create = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Avalanche_Create, gg_unit_Hvwd_0195, EVENT_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Avalanche_Create, Condition( function Trig_Avalanche_Create_Conditions ) )
call TriggerAddAction( gg_trg_Avalanche_Create, function Trig_Avalanche_Create_Actions )
endfunction
function Trig_Avalanche_Animation_Func001001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'e00J' )
endfunction
function Trig_Avalanche_Animation_Func001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Avalanche_Animation_Func001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Avalanche_Animation_Func001001002001(), Trig_Avalanche_Animation_Func001001002002() )
endfunction
function Trig_Avalanche_Animation_Func001002 takes nothing returns nothing
call SetUnitAnimationWithRarity( GetEnumUnit(), "stand", RARITY_FREQUENT )
endfunction
function Trig_Avalanche_Animation_Func003001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'e00J' )
endfunction
function Trig_Avalanche_Animation_Func003001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Avalanche_Animation_Func003001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Avalanche_Animation_Func003001002001(), Trig_Avalanche_Animation_Func003001002002() )
endfunction
function Trig_Avalanche_Animation_Func003002 takes nothing returns nothing
call SetUnitAnimationWithRarity( GetEnumUnit(), "stand", RARITY_RARE )
endfunction
function Trig_Avalanche_Animation_Actions takes nothing returns nothing
local group g
set g = GetUnitsOfPlayerMatching(Player(5), Condition(function Trig_Avalanche_Animation_Func001001002))
call ForGroupBJ( g, function Trig_Avalanche_Animation_Func001002 )
call TriggerSleepAction( 1.63 )
call ForGroupBJ( g, function Trig_Avalanche_Animation_Func003002 )
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_Avalanche_Animation takes nothing returns nothing
set gg_trg_Avalanche_Animation = CreateTrigger( )
call DisableTrigger( gg_trg_Avalanche_Animation )
call TriggerRegisterTimerEventPeriodic( gg_trg_Avalanche_Animation, 4.43 )
call TriggerAddAction( gg_trg_Avalanche_Animation, function Trig_Avalanche_Animation_Actions )
endfunction
function Trig_Avalanche_Remove_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A059' ) ) then
return false
endif
return true
endfunction
function Trig_Avalanche_Remove_Func002002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Avalanche_Remove_Actions takes nothing returns nothing
local group g
set g = GetUnitsOfTypeIdAll('e00J')
call ForGroupBJ( g, function Trig_Avalanche_Remove_Func002002 )
call DisableTrigger( gg_trg_Avalanche_Animation )
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_Avalanche_Remove takes nothing returns nothing
set gg_trg_Avalanche_Remove = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Avalanche_Remove, gg_unit_Hvwd_0195, EVENT_UNIT_SPELL_FINISH )
call TriggerRegisterUnitEvent( gg_trg_Avalanche_Remove, gg_unit_Hvwd_0195, EVENT_UNIT_SPELL_ENDCAST )
call TriggerAddCondition( gg_trg_Avalanche_Remove, Condition( function Trig_Avalanche_Remove_Conditions ) )
call TriggerAddAction( gg_trg_Avalanche_Remove, function Trig_Avalanche_Remove_Actions )
endfunction
function Trig_Stormy_Blow_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetAttacker(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A03H', GetAttackedUnitBJ()) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_Stormy_Blow_Func001C takes nothing returns boolean
if ( not ( GetRandomInt(1, 10) <= GetUnitAbilityLevelSwapped('A03H', GetAttackedUnitBJ()) ) ) then
return false
endif
return true
endfunction
function Trig_Stormy_Blow_Actions takes nothing returns nothing
local location loc
if ( Trig_Stormy_Blow_Func001C() ) then
set loc = GetUnitLoc(GetAttackedUnitBJ())
call CreateNUnitsAtLoc( 1, 'h00V', GetOwningPlayer(GetAttackedUnitBJ()), loc, bj_UNIT_FACING )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", GetAttacker() )
else
call DoNothing( )
endif
call RemoveLocation(loc)
set loc = null
endfunction
//===========================================================================
function InitTrig_Stormy_Blow takes nothing returns nothing
set gg_trg_Stormy_Blow = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Stormy_Blow, gg_unit_Hvwd_0195, EVENT_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Stormy_Blow, Condition( function Trig_Stormy_Blow_Conditions ) )
call TriggerAddAction( gg_trg_Stormy_Blow, function Trig_Stormy_Blow_Actions )
endfunction
function Trig_Cyclonce_Cast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00G' ) ) then
return false
endif
return true
endfunction
function Trig_Cyclonce_Cast_Func001Func003C takes nothing returns boolean
if ( ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_HERO) == true ) ) then
return true
endif
if ( ( GetUnitLevel(GetSpellTargetUnit()) > 5 ) ) then
return true
endif
return false
endfunction
function Trig_Cyclonce_Cast_Func001C takes nothing returns boolean
if ( not Trig_Cyclonce_Cast_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Cyclonce_Cast_Actions takes nothing returns nothing
local unit u = GetSpellTargetUnit()
if ( Trig_Cyclonce_Cast_Func001C() ) then
call TriggerSleepAction( ( 1.00 + ( I2R(GetUnitAbilityLevelSwapped('A00G', GetSpellAbilityUnit())) * 1.00 ) ) )
call CreateNUnitsAtLoc( 1, 'h029', GetOwningPlayer(gg_unit_Hvwd_0195), GetUnitLoc(u), bj_UNIT_FACING )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", u )
else
call TriggerSleepAction( ( 6.00 + ( I2R(GetUnitAbilityLevelSwapped('A00G', GetSpellAbilityUnit())) * 3.00 ) ) )
call CreateNUnitsAtLoc( 1, 'h029', GetOwningPlayer(gg_unit_Hvwd_0195), GetUnitLoc(u), bj_UNIT_FACING )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", u )
endif
endfunction
//===========================================================================
function InitTrig_Cyclonce_Cast takes nothing returns nothing
set gg_trg_Cyclonce_Cast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Cyclonce_Cast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Cyclonce_Cast, Condition( function Trig_Cyclonce_Cast_Conditions ) )
call TriggerAddAction( gg_trg_Cyclonce_Cast, function Trig_Cyclonce_Cast_Actions )
endfunction