;#################### Garrison Script Version 3.0 #####################
declare_counter Anorien_Siege
declare_counter Imladris_Siege
declare_counter Nan-Curunir_Siege
declare_counter Udun_Siege
declare_counter Morgul-Vale_Siege
declare_counter Umbar_Siege
monitor_event FactionTurnStart IsFactionAIControlled
if I_SettlementUnderSiege Anorien
and I_SettlementOwner Anorien = sicily
and I_CompareCounter Anorien_Siege < 1
create_unit Anorien, Dismounted Kofm Garrison, num 1, exp 1, arm 2, wep 0
create_unit Anorien, Gondor Infantry Garrison, num 2, exp 1, arm 2, wep 0
create_unit Anorien, Gondor Spearmen Garrison, num 2, exp 1, arm 2, wep 0
create_unit Anorien, Gondor Archers Garrison, num 2, exp 1, arm 2, wep 0
set_counter Anorien_Siege 1
end_if
if not I_SettlementUnderSiege Anorien
and I_SettlementOwner Anorien = sicily
and I_CompareCounter Anorien_Siege > 0
destroy_units sicily Dismounted Kofm Garrison
destroy_units sicily Gondor Infantry Garrison
destroy_units sicily Gondor Spearmen Garrison
destroy_units sicily Gondor Archers Garrison
set_counter Anorien_Siege 0
end_if
if I_SettlementUnderSiege Imladris
and I_SettlementOwner Imladris = egypt
and I_CompareCounter Imladris_Siege < 1
create_unit Imladris, Homeguard Warriors Garrison, num 1, exp 2, arm 0, wep 0
create_unit Imladris, Elf Archer3 Garrison, num 1, exp 3, arm 3, wep 0
create_unit Imladris, Elf Spear Garrison, num 1, exp 3, arm 3, wep 0
set_counter Imladris_Siege 1
end_if
if not I_SettlementUnderSiege Imladris
and I_SettlementOwner Imladris = egypt
and I_CompareCounter Imladris_Siege > 0
destroy_units egypt Homeguard Warriors Garrison
destroy_units egypt Elf Archer3 Garrison
destroy_units egypt Elf Spear Garrison
set_counter Imladris_Siege 0
end_if
if I_SettlementUnderSiege Nan-Curunir
and I_SettlementOwner Nan-Curunir = france
and I_CompareCounter Nan-Curunir_Siege < 1
create_unit Nan-Curunir, Uruk-Hai Infantry Garrison, num 3, exp 1, arm 1, wep 0
create_unit Nan-Curunir, Uruk-Hai Crossbow Garrison, num 1, exp 1, arm 1, wep 0
set_counter Nan-Curunir_Siege 1
end_if
if not I_SettlementUnderSiege Nan-Curunir
and I_SettlementOwner Nan-Curunir = france
and I_CompareCounter Nan-Curunir_Siege > 0
destroy_units france Uruk-Hai Infantry Garrison
destroy_units france Uruk-Hai Crossbow Garrison
set_counter Nan-Curunir_Siege 0
end_if
if I_SettlementUnderSiege Udun
and I_SettlementOwner Udun = england
and I_CompareCounter Udun_Siege < 1
create_unit Udun, Morannon Guard Garrison, num 3, exp 2, arm 1, wep 0
create_unit Udun, Mordor Archers Garrison, num 2, exp 2, arm 1, wep 0
create_unit Udun, Mountain Trolls Garrison, num 2, exp 2, arm 0, wep 0
set_counter Udun_Siege 1
end_if
if not I_SettlementUnderSiege Udun
and I_SettlementOwner Udun = england
and I_CompareCounter Udun_Siege > 0
destroy_units england Morannon Guard Garrison
destroy_units england Mordor Archers Garrison
destroy_units england Mountain Trolls Garrison
set_counter Udun_Siege 0
end_if
if I_SettlementUnderSiege Morgul-Vale
and I_SettlementOwner Morgul-Vale = england
and I_CompareCounter Morgul-Vale_Siege < 1
create_unit Morgul-Vale, Mordor Uruks Garrison, num 2, exp 1, arm 1, wep 0
create_unit Morgul-Vale, Mordor Halberd Garrison, num 3, exp 1, arm 1, wep 0
create_unit Morgul-Vale, Uruk Archers Garrison, num 2, exp 1, arm 1, wep 0
set_counter Morgul-Vale_Siege 1
end_if
if not I_SettlementUnderSiege Morgul-Vale
and I_SettlementOwner Morgul-Vale = england
and I_CompareCounter Morgul-Vale_Siege > 0
destroy_units england Mordor Uruks Garrison
destroy_units england Mordor Halberd Garrison
destroy_units england Uruk Archers Garrison
set_counter Morgul-Vale_Siege 0
end_if
if I_SettlementUnderSiege Umbar
and I_SettlementOwner Umbar = spain
and I_CompareCounter Umbar_Siege < 1
create_unit Umbar, Corsairs Garrison, num 2, exp 2, arm 0, wep 0
create_unit Umbar, Hasharii Garrison, num 1, exp 3, arm 0, wep 0
create_unit Umbar, Corsair Archers Garrison, num 1, exp 2, arm 0, wep 0
set_counter Umbar_Siege 1
end_if
if not I_SettlementUnderSiege Umbar
and I_SettlementOwner Umbar = spain
and I_CompareCounter Umbar_Siege > 0
destroy_units spain Corsairs Garrison
destroy_units spain Hasharii Garrison
destroy_units spain Corsair Archers Garrison
set_counter Umbar_Siege 0
end_if
end_monitor