;-------------------------------------------------------------------------------------------
;-------------------------------------------------------------------------------------------
;-------------------------------------------------------------------------------------------
;--------This map.ini is part of PestControl's Maze Tower Wars, written by PestControl------
;-----The blocks of this scripts are copied from PestControl's PvP TowerWars, but edited.---
;--------You can use this file to learn how to write a map.ini, but don't copy it. Tx.------
;-------------------------------------------------------------------------------------------
;-------------------------------------------------------------------------------------------
;-------------------------------------------------------------------------------------------

;-----------------ElvenBarrack changes------------------------------------------------------
Upgrade Upgrade_ElvenBarracksLevel21
   Type            = OBJECT
    BuildCost      = 1
    BuildTime      = 1
    DisplayName	= UPGRADE:ElvenBarracksLevel2
	SkirmishAIHeuristic = AI_UPGRADEHEURISTIC_FACTORY_UNITUNLOCK
End

Upgrade Upgrade_ElvenBarracksLevel31
    	Type           = OBJECT
    	BuildCost      = 1
    	BuildTime      = 1
    	DisplayName	= UPGRADE:ElvenBarracksLevel3
	SkirmishAIHeuristic = AI_UPGRADEHEURISTIC_FACTORY_UNITUNLOCK
End

Upgrade Upgrade_ElvenBarracksLevel4
    	Type           = OBJECT
    	BuildCost      = 1
    	BuildTime      = 1
    	DisplayName	= UPGRADE:ElvenBarracksLevel3
	SkirmishAIHeuristic = AI_UPGRADEHEURISTIC_FACTORY_UNITUNLOCK
End

CommandButton Command_PurchaseUpgradeElvenBarracksLevel2
   Command           = OBJECT_UPGRADE
   Upgrade           = Upgrade_ElvenBarracksLevel21
   Options           = CANCELABLE
   TextLabel         = CONTROLBAR:PurchaseUpgradeElvenBarracksLevel2
   ButtonImage       = UCCommon_UpgradeStructureNew
   ButtonBorderType	= BUILD
   DescriptLabel     = CONTROLBAR:ToolTipUpgradeDwarvenBarracksLevel2
   Radial            = Yes
   InPalantir        = Yes
End

CommandButton Command_PurchaseUpgradeElvenBarracksLevel3
   Command           = OBJECT_UPGRADE
   Upgrade           = Upgrade_ElvenBarracksLevel31
   Options           = CANCELABLE
   TextLabel         = CONTROLBAR:PurchaseUpgradeElvenBarracksLevel3
   ButtonImage       = UCCommon_UpgradeStructureNew
   ButtonBorderType	= BUILD
   DescriptLabel     = CONTROLBAR:ToolTipBuildElvenBarracksLevel3
   Radial            = Yes
   InPalantir        = Yes
End

CommandButton Command_ConstructElvenGreenPastureLevel2
   Command           = OBJECT_UPGRADE
   Upgrade           = Upgrade_ElvenBarracksLevel4
   Options           = CANCELABLE
   TextLabel         = CONTROLBAR:ConstructElvenGreenPastureLevel2Upgrade
   ButtonImage       = UCCommon_UpgradeStructureNew
   ButtonBorderType  = UPGRADE
   DescriptLabel     = CONTROLBAR:ToolTipBuildElvenGreenPastureLevel2Upgrade
   Radial            = Yes
   InPalantir        = Yes
End

Object ElvenBarracks
	ReplaceModule ModuleTag_ElvenBarracksLevel2
Behavior = LevelUpUpgrade ModuleTag_ElvenBarracksLevel21
		TriggeredBy    = Upgrade_ElvenBarracksLevel21     
		LevelsToGain   = 1
		LevelCap       = 4
	End
End
	ReplaceModule ModuleTag_ElvenBarracksLevel3
Behavior = LevelUpUpgrade ModuleTag_ElvenBarracksLevel31
		TriggeredBy    = Upgrade_ElvenBarracksLevel31     
		LevelsToGain   = 1
		LevelCap       = 4
	End
End
	AddModule
Behavior = LevelUpUpgrade ModuleTag_ElvenBarracksLevel4
		TriggeredBy    = Upgrade_ElvenBarracksLevel4     
		LevelsToGain   = 1
		LevelCap       = 4
	End
End
	ReplaceModule ModuleTag_ShowWallsAndFlag
Behavior = SubObjectsUpgrade ModuleTag_ShowWallsAndFlag1
		TriggeredBy		= Upgrade_ElvenBarracksLevel21
		ShowSubObjects	= V1
		HideSubObjects	= V2 V1a
	End
End
	ReplaceModule ModuleTag_ShowTowersAndHideFlag
Behavior = SubObjectsUpgrade ModuleTag_ShowTowersAndHideFlag1
		TriggeredBy		= Upgrade_ElvenBarracksLevel31
		ShowSubObjects	= V1 V1a
		HideSubObjects	= V2
	End
End
	AddModule
Behavior = SubObjectsUpgrade ModuleTag_ShowTowersAndHideFlag2
		TriggeredBy		= Upgrade_ElvenBarracksLevel4
		ShowSubObjects	= V1 V1a V2
		HideSubObjects	=
	End
End
AddModule
	Behavior = AttributeModifierUpgrade ModuleTag_lvl4barracks
		TriggeredBy				= Upgrade_ElvenBarracksLevel4
		AttributeModifier		= ElvenBarracksBuildSpeedModLvl4
	End
End
ReplaceModule ModueTag_ElvenBarracksLevel2CommandSet
	Behavior = CommandSetUpgrade ModuleTag_Override2
		TriggeredBy      = Upgrade_ElvenBarracksLevel21
		ConflictsWith    = Upgrade_ElvenBarracksLevel31
		CommandSet       = ElvenBarracksCommandSetLevel2Override
	End
End
End

Object ElvenBarracks
ReplaceModule ModueTag_ElvenBarracksLevel3CommandSet
	Behavior = CommandSetUpgrade ModuleTag_Override3
		TriggeredBy      = Upgrade_ElvenBarracksLevel31
		ConflictsWith    = Upgrade_ElvenBarracksLevel4
		CommandSet       = ElvenBarracksCommandSetLevel3Override
	End
End
End

Object ElvenBarracks
AddModule
	Behavior = CommandSetUpgrade ModuleTag_Override50
		TriggeredBy      = Upgrade_ElvenBarracksLevel4
		CommandSet       = ElvenBarracksCommandSetLevel4
	End
End
End

Object ElvenBarracks
CommandSet = MeleeOverride
End


CommandSet MeleeOverride
	1 = Command_ConstructGoblinFighterHorde
  	2 = Command_ConstructMordorOrcFighterHorde
  	3 = Command_ConstructGondorFighterHorde
	4 = Command_ConstructWildSpiderlingHorde
  	5 = Command_ConstructElvenMithlondSentryHorde
	6 = Command_ConstructDwarvenGuardianHorde
	7 = Command_ConstructGondorTowerShieldGuardHorde
	8 = Command_ConstructIsengardWargRiderHorde
	9 = Command_ConstructEasterlingHorde
	10 = Command_ConstructElvenRivendellLancers
	11 = Command_ConstructIsengardFighterHorde
	12 = Command_ConstructElvenLorienWarriorHorde
	13 = Command_ConstructDwarvenBattleWagon
	14 = Command_ConstructIsengardPikemanHorde
	15 = Command_ConstructGondorKnightHorde
	16 = Command_ConstructMordorMumakil
	17 = Command_ConstructDwarvenPhalanxHorde
	18 = Command_ConstructWildMarauderHorde
	19 = Command_ConstructFireDrakeFromDefectedLair
	20 = Command_PurchaseUpgradeElvenBarracksLevel2
End

CommandSet ElvenBarracksCommandSetLevel2Override
	1 = Command_ConstructGoblinFighterHorde
  	2 = Command_ConstructMordorOrcFighterHorde
  	3 = Command_ConstructGondorFighterHorde
	4 = Command_ConstructWildSpiderlingHorde
  	5 = Command_ConstructElvenMithlondSentryHorde
	6 = Command_ConstructDwarvenGuardianHorde
	7 = Command_ConstructGondorTowerShieldGuardHorde
	8 = Command_ConstructIsengardWargRiderHorde
	9 = Command_ConstructEasterlingHorde
	10 = Command_ConstructElvenRivendellLancers
	11 = Command_ConstructIsengardFighterHorde
	12 = Command_ConstructElvenLorienWarriorHorde
	13 = Command_ConstructDwarvenBattleWagon
	14 = Command_ConstructIsengardPikemanHorde
	15 = Command_ConstructGondorKnightHorde
	16 = Command_ConstructMordorMumakil
	17 = Command_ConstructDwarvenPhalanxHorde
	18 = Command_ConstructWildMarauderHorde
	19 = Command_ConstructFireDrakeFromDefectedLair
	20 = Command_PurchaseUpgradeElvenBarracksLevel3
End

CommandSet ElvenBarracksCommandSetLevel3Override
	1 = Command_ConstructGoblinFighterHorde
  	2 = Command_ConstructMordorOrcFighterHorde
  	3 = Command_ConstructGondorFighterHorde
	4 = Command_ConstructWildSpiderlingHorde
  	5 = Command_ConstructElvenMithlondSentryHorde
	6 = Command_ConstructDwarvenGuardianHorde
	7 = Command_ConstructGondorTowerShieldGuardHorde
	8 = Command_ConstructIsengardWargRiderHorde
	9 = Command_ConstructEasterlingHorde
	10 = Command_ConstructElvenRivendellLancers
	11 = Command_ConstructIsengardFighterHorde
	12 = Command_ConstructElvenLorienWarriorHorde
	13 = Command_ConstructDwarvenBattleWagon
	14 = Command_ConstructIsengardPikemanHorde
	15 = Command_ConstructGondorKnightHorde
	16 = Command_ConstructMordorMumakil
	17 = Command_ConstructDwarvenPhalanxHorde
	18 = Command_ConstructWildMarauderHorde
	19 = Command_ConstructFireDrakeFromDefectedLair
	20 = Command_ConstructElvenGreenPastureLevel2
End

CommandSet ElvenBarracksCommandSetLevel4
	1 = Command_ConstructGoblinFighterHorde
  	2 = Command_ConstructMordorOrcFighterHorde
  	3 = Command_ConstructGondorFighterHorde
	4 = Command_ConstructWildSpiderlingHorde
  	5 = Command_ConstructElvenMithlondSentryHorde
	6 = Command_ConstructDwarvenGuardianHorde
	7 = Command_ConstructGondorTowerShieldGuardHorde
	8 = Command_ConstructIsengardWargRiderHorde
	9 = Command_ConstructEasterlingHorde
	10 = Command_ConstructElvenRivendellLancers
	11 = Command_ConstructIsengardFighterHorde
	12 = Command_ConstructElvenLorienWarriorHorde
	13 = Command_ConstructDwarvenBattleWagon
	14 = Command_ConstructIsengardPikemanHorde
	15 = Command_ConstructGondorKnightHorde
	16 = Command_ConstructMordorMumakil
	17 = Command_ConstructDwarvenPhalanxHorde
	18 = Command_ConstructWildMarauderHorde
	19 = Command_ConstructFireDrakeFromDefectedLair
End

ExperienceLevel	ElvenBarracksLevel2
	AttributeModifiers		= ElvenBarracksBuildSpeedModLvl2Override
	Upgrades				= Upgrade_ElvenBarracksLevel21
	Rank					= 2
End

ExperienceLevel	ElvenBarracksLevel3
	AttributeModifiers		= ElvenBarracksBuildSpeedModLvl3Override 
	Upgrades				= Upgrade_ElvenBarracksLevel31
	Rank					= 3
End	
 
ModifierList ElvenBarracksBuildSpeedModLvl3Override 
	Category = STRUCTURE
	Modifier = PRODUCTION 4.00	
	Duration = 0
End

ModifierList ElvenBarracksBuildSpeedModLvl2Override 
	Category = STRUCTURE
	Modifier = PRODUCTION 4.00	
	Duration = 0
End

ModifierList ElvenBarracksBuildSpeedModLvl4
	Category = STRUCTURE
	Modifier = PRODUCTION 4.00	
	Duration = 0
End
;------------Gondor Archery Range-----------------------------------------------------------

CommandButton Command_ConstructMordorHaradrimArcherHorde
	NeededUpgrade			= NONE    
	Options				= CANCELABLE 
End

CommandButton Command_ConstructDwarvenMenOfDaleHorde
	NeededUpgrade			= NONE 
	Options				= CANCELABLE     
End

CommandButton Command_ConstructElvenMirkwoodArcherHorde
	NeededUpgrade		= NONE 
	Options				= CANCELABLE 
End

CommandButton Command_PurchaseUpgradeGondorArcheryRangeLevel2
   DescriptLabel     = CONTROLBAR:ArchryLvl2
End

CommandButton Command_PurchaseUpgradeGondorArcheryRangeLevel3
   DescriptLabel     = CONTROLBAR:ArchryLvl3
End

;CommandSet ArcherOverride
;  1 = Command_ConstructGoblinArcherHorde
;  2 = Command_ConstructDwarvenAxeThrowerHorde
;  3 = Command_ConstructMordorOrcArcherHorde
;  4 = Command_ConstructGondorArcherHorde
;  5 = Command_ConstructIsengardUrukCrossbowHorde
;  6 = Command_ConstructDwarvenMenOfDaleHorde
;  7 = Command_ConstructElvenLorienArcherHorde
;  8 = Command_ConstructMordorHaradrimArcherHorde
;  9 = Command_ConstructElvenMirkwoodArcherHorde
;  10 = Command_PurchaseUpgradeGondorArcheryRangeLevel2
;End

;CommandSet GondorArcheryCommandSetLevel2Override
;  1 = Command_ConstructGoblinArcherHorde
;  2 = Command_ConstructDwarvenAxeThrowerHorde
;  3 = Command_ConstructMordorOrcArcherHorde
;  4 = Command_ConstructGondorArcherHorde
;  5 = Command_ConstructIsengardUrukCrossbowHorde
;  6 = Command_ConstructDwarvenMenOfDaleHorde
;  7 = Command_ConstructElvenLorienArcherHorde
;  8 = Command_ConstructMordorHaradrimArcherHorde
;  9 = Command_ConstructElvenMirkwoodArcherHorde
;  10 = Command_PurchaseUpgradeGondorArcheryRangeLevel3
;End

;CommandSet GondorArcheryCommandSetLevel3Override
;  1 = Command_ConstructGoblinArcherHorde
;  2 = Command_ConstructDwarvenAxeThrowerHorde
;  3 = Command_ConstructMordorOrcArcherHorde
;  4 = Command_ConstructGondorArcherHorde
;  5 = Command_ConstructIsengardUrukCrossbowHorde
;  6 = Command_ConstructDwarvenMenOfDaleHorde
;  7 = Command_ConstructElvenLorienArcherHorde
;  8 = Command_ConstructMordorHaradrimArcherHorde
;  9 = Command_ConstructElvenMirkwoodArcherHorde
;End

CommandSet ArcherOverride
  1 = Command_ConstructIsengardUrukCrossbowHorde
  2 = Command_ConstructElvenMirkwoodArcherHorde
  3 = Command_ConstructDwarvenAxeThrowerHorde
  4 = Command_ConstructGondorArcherHorde
  5 = Command_ConstructElvenLorienArcherHorde
	6 = Command_Sell
  7 = Command_PurchaseUpgradeGondorArcheryRangeLevel2
End

CommandSet GondorArcheryCommandSetLevel2Override
  1 = Command_ConstructIsengardUrukCrossbowHorde
  2 = Command_ConstructElvenMirkwoodArcherHorde
  3 = Command_ConstructDwarvenAxeThrowerHorde
  4 = Command_ConstructGondorArcherHorde
  5 = Command_ConstructElvenLorienArcherHorde
	6 = Command_Sell
  7 = Command_PurchaseUpgradeGondorArcheryRangeLevel3
End

CommandSet GondorArcheryCommandSetLevel3Override
  1 = Command_ConstructIsengardUrukCrossbowHorde
  2 = Command_ConstructElvenMirkwoodArcherHorde
  3 = Command_ConstructDwarvenAxeThrowerHorde
  4 = Command_ConstructGondorArcherHorde
  5 = Command_ConstructElvenLorienArcherHorde
	6 = Command_Sell
End

Object GondorArcherRange
CommandSet = ArcherOverride
End

ExperienceLevel	GondorArcherRangeLevel2
AttributeModifiers = GondorArcheryRangeHitPointModLvl2 GondorArcheryRangeBuildSpeedModLvl2Override
End
	
ExperienceLevel	GondorArcherRangeLevel3
AttributeModifiers = GondorArcheryRangeHitPointModLvl3 GondorArcheryRangeBuildSpeedModLvl3Override
End

ModifierList GondorArcheryRangeBuildSpeedModLvl2Override 
	Category = STRUCTURE
	Modifier = PRODUCTION 4.00	
	Duration = 0
End
ModifierList GondorArcheryRangeBuildSpeedModLvl3Override 
	Category = STRUCTURE
	Modifier = PRODUCTION 4.00
	Duration = 0
End

Object GondorArcherRange
ReplaceModule ModueTag_ArcheryRangeLevel2CommandSet
	Behavior = CommandSetUpgrade ModuleTag_Override5
		TriggeredBy		= Upgrade_GondorArcheryRangeLevel2
		ConflictsWith		= Upgrade_GondorArcheryRangeLevel3
		CommandSet		= GondorArcheryCommandSetLevel2Override
	End
End
End

Object GondorArcherRange
ReplaceModule ModueTag_ArcheryRangeLevel3CommandSet
	Behavior = CommandSetUpgrade ModuleTag_Override4
		TriggeredBy		= Upgrade_GondorArcheryRangeLevel3		
		CommandSet		= GondorArcheryCommandSetLevel3Override
	End
End
End 

;-------------Overig------------------------------------------------------------------------

CommandButton Command_ConstructElvenWatchTower
  DescriptLabel    = CONTROLBAR:ToolTipBattleTower1
End

CommandButton Command_ConstructDwarvenSentryTower
  DescriptLabel    = CONTROLBAR:ToolTipBattleTower2
End

CommandButton Command_PorterConstructMenSentryTower
  DescriptLabel    = CONTROLBAR:ToolTipBattleTower3
End

CommandButton Command_PorterConstructIsengardBattleTower
  DescriptLabel    = CONTROLBAR:ToolTipBattleTower4
End

CommandButton Command_PorterConstructWildSentryTower
  DescriptLabel    = CONTROLBAR:ToolTipBattleTower5
End

CommandButton Command_PorterConstructMordorHaradrimPalace
  TextLabel        = CONTROLBAR:ConstructHaradrim1
  DescriptLabel    = CONTROLBAR:ToolTipHaradrim1
End

CommandButton Command_ConstructElvenMirrorOfGaladriel
  DescriptLabel    = CONTROLBAR:ToolMirrorNew
End

CommandSet AllPorterCommandSet   
   1  = Command_PorterConstructMordorHaradrimPalace
   2  = Command_PorterConstructMenArcheryRange
   3  = Command_PorterConstructMenSentryTower
   4  = Command_PorterConstructWildSentryTower
   5  =	Command_ConstructDwarvenSentryTower
   6  =	Command_PorterConstructIsengardBattleTower
   7  = Command_ConstructElvenWatchTower
   8  = Command_ConstructDwarvenWallHub
   9  = Command_ConstructElvenMirrorOfGaladriel
End

Object ElvenPorter
CommandSet = AllPorterCommandSet
End

Object DwarvenPorter
CommandSet = AllPorterCommandSet
End

Object IsengardPorter
CommandSet = AllPorterCommandSet
End

Object MordorPorter
CommandSet = AllPorterCommandSet
End

Object WildPorter
CommandSet = AllPorterCommandSet
End

Object MenPorter
CommandSet = AllPorterCommandSet
End



CommandSet MordorHaradrimPalaceCommandSetLevel11
  1	= Command_ConstructDwarvenPorter
	6 = Command_Sell
End


Object MordorHaradrimPalace
CommandSet = MordorHaradrimPalaceCommandSetLevel11
End

;12000
;4000

Object ElvenMirrorOfGaladriel
ReplaceModule ModuleTag_05
  Body                      = StructureBody ModuleTag_051
		MaxHealth               = 12000				
		MaxHealthDamaged        = 6000			
  		MaxHealthReallyDamaged  = 3000		
  End
End
  BuildCost           = 4000				
  BuildTime           = 25.0
End

;---------------------Health of Units-------------------------------------------------------

Object GoblinFighter
 
 ReplaceModule ModuleTag_02
  Body = ActiveBody ModuleTag_Overide
    MaxHealth = 1                 
  End
 End
End

Object MordorFighter
 
 ReplaceModule ModuleTag_02
  Body = ActiveBody ModuleTag_Overide
    MaxHealth = 150                 
  End
 End
End


Object GondorFighter
 
 ReplaceModule ModuleTag_02
  Body = ActiveBody ModuleTag_Overide
    MaxHealth = 450                 
  End
 End
End


Object ElvenMithlondSentry
 
 ReplaceModule ModuleTag_porcupineFormation
  Body = PorcupineFormationBodyModule ModuleTag_Overide
    MaxHealth = 750                 
  End
 End
End


Object DwarvenGuardian
 
 ReplaceModule ModuleTag_02
  Body = ActiveBody ModuleTag_Overide
    MaxHealth = 1000                 
  End
 End
End

Object GondorTowerShieldGuard
 
 ReplaceModule ModuleTag_02
  Body = ActiveBody ModuleTag_Overide
    MaxHealth = 1120                 
  End
 End
End

Object IsengardWargRider
 
 ReplaceModule BodyModuleTag
  Body = ActiveBody ModuleTag_Overide
    MaxHealth = 1000                 
  End
 End
End

Object MordorEasterling
 
 ReplaceModule ModuleTag_porcupineFormation
  Body = PorcupineFormationBodyModule ModuleTag_Overide
    MaxHealth = 2000                 
  End
 End
End


Object ElvenRivendellLancer
 
 ReplaceModule ModuleTag_02
  Body = ActiveBody ModuleTag_Overide
    MaxHealth = 1350                 
  End
 End
End

Object IsengardFighter
 
 ReplaceModule ModuleTag_02
  Body = ActiveBody ModuleTag_Overide
    MaxHealth = 2800                 
  End
 End
End


Object ElvenLorienWarrior
 
 ReplaceModule ModuleTag_02
  Body = ActiveBody ModuleTag_Overide
    MaxHealth = 1850                 
  End
 End
End

Object DwarvenBattleWagon
 
 ReplaceModule ModuleTag_02
  Body = DelayedDeathBody ModuleTag_Overide
    MaxHealth = 30000                 
  End
 End
End


Object WildSpiderling 
 ReplaceModule ModuleTag_Body
  Body = ActiveBody ModuleTag_Overide
    		MaxHealth = 3000                 
		MaxHealthDamaged 	= 1500
		BurningDeathBehavior = Yes
		BurningDeathFX       = FX_InfantryBurningFlame
  End
 End
End

Object IsengardPikeman
 
 ReplaceModule ModuleTag_porcupineFormation
  Body = PorcupineFormationBodyModule ModuleTag_Overide
    MaxHealth = 6500                 
  End
 End
End


Object GondorCavalry
 
 ReplaceModule ModuleTag_02
  Body = ActiveBody ModuleTag_Overide
    MaxHealth = 5500                 
  End
 End
End

Object MordorMumakil
 
 ReplaceModule ModuleTag_02
  Body = DelayedDeathBody ModuleTag_Overide
    MaxHealth = 40000                 
  End
 End
End


Object DwarvenPhalanx
 
 ReplaceModule ModuleTag_porcupineFormation
  Body = PorcupineFormationBodyModule ModuleTag_Overide
    MaxHealth = 10000                 
  End
 End
End

Object WildMarauder
 
 ReplaceModule ModuleTag_porcupineFormation
  Body = PorcupineFormationBodyModule ModuleTag_Overide
    MaxHealth = 10000                 
  End
 End
End


Object WildFireDrake
 
 ReplaceModule ModuleTag_02
  Body = ActiveBody ModuleTag_Overide
    MaxHealth = 80000                 
  End
 End
End

Object IsengardExplosiveMine
ReplaceModule ModuleTag_02
	Body = ActiveBody ModuleTag_021
		MaxHealth         = 1500
		MaxHealthDamaged  = 1250
		DodgePercent      = 33
	End
End
End
;---------------------Health of Units-----part 2--------------------------------------------

Object RohanSam
ReplaceModule ModuleTag_ActiveBody
	Body = ActiveBody ModuleTag_ActiveBody1
		MaxHealth	= 4700
	End
End
End

Object RohanFrodo
ReplaceModule ModuleTag_ActiveBody
	Body = ActiveBody ModuleTag_ActiveBody1
		MaxHealth	= 9400
	End
End
End

Object RohanMerry
ReplaceModule ModuleTag_ActiveBody
	Body = ActiveBody ModuleTag_ActiveBody1
		MaxHealth	= 4700
	End
End
End

Object RohanPippin
ReplaceModule ModuleTag_ActiveBody
	Body = ActiveBody ModuleTag_ActiveBody1
		MaxHealth	= 7050
	End
End
End

Object IsengardSharku
ReplaceModule ModuleTag_RespawnBody
  	Body = RespawnBody ModuleTag_RespawnBody1
		CheerRadius 			= EMOTION_CHEER_RADIUS
   		MaxHealth         		= 5000
  		PermanentlyKilledByFilter	= NONE
   		DodgePercent     		= HERO_DODGE_PERCENT
  	End
End
End

Object MordorCatapult
ReplaceModule ModuleTag_02
	Body = ActiveBody ModuleTag_021
		CheerRadius 	  = EMOTION_CHEER_RADIUS
		MaxHealth         = 6000
		MaxHealthDamaged  = 3000
	End
End
End

Object MinorSpider
	LocomotorSet
		Locomotor     = HeroHumanScalingLocomotorNoBackwards
		Condition     = SET_NORMAL
		Speed         = 120
	End
ReplaceModule ModuleTag_Body
	Body = ActiveBody ModuleTag_Body1
		MaxHealth = 3000
		BurningDeathBehavior = Yes
		BurningDeathFX       = FX_InfantryBurningFlame
	End
End
End

Object ElvenThranduil
ReplaceModule ModuleTag_RespawnBody
	Body = RespawnBody ModuleTag_RespawnBody1
		CheerRadius 				= EMOTION_CHEER_RADIUS
		MaxHealth         			= 50000						; BALANCE Legola Health
		PermanentlyKilledByFilter	= NONE									; Who kills me permanently?
   		DodgePercent      			= HERO_DODGE_PERCENT
	End
End
End

Object MordorAttackTroll
ReplaceModule ModuleTag_02
	Body = DelayedDeathBody ModuleTag_021
		CheerRadius					= EMOTION_CHEER_RADIUS
		MaxHealth					= 15000
		MaxHealthDamaged				= 7500
		MaxHealthReallyDamaged				= 2500
		DoHealthCheck					= No
		DelayedDeathTime				= 5000
		CanRespawn					= No
	End
End
End

Object MordorFellBeastInterface
ReplaceModule ModuleTag_02
	Body = RespawnBody ModuleTag_021
		CheerRadius 	  = EMOTION_CHEER_RADIUS
		MaxHealth         = 250000
		HealingBuffFx     = None
	End
End
End

Object WildGoblinKing
ReplaceModule ModuleTag_RespawnBody
	Body = RespawnBody ModuleTag_RespawnBody1
		MaxHealth         = 50000
		PermanentlyKilledByFilter	= NONE
   		DodgePercent      = HERO_DODGE_PERCENT
		BurningDeathBehavior = Yes
		BurningDeathFX       = FX_InfantryBurningFlame
	End
End
End

Object ElvenArwen
ReplaceModule ModuleTag_RespawnBody
	Body = RespawnBody ModuleTag_RespawnBody1
		MaxHealth         = 25000
		PermanentlyKilledByFilter	= NONE
   		DodgePercent      = HERO_DODGE_PERCENT
	End
End
End

Object Wyrm
ReplaceModule ModuleTag_Body
	Body = ActiveBody ModuleTag_Body1
		MaxHealth = 50000
	End
End
End

Object DwarvenGloin
ReplaceModule ModuleTag_RespawnBody
	Body = RespawnBody ModuleTag_RespawnBody1
		CheerRadius 			= EMOTION_CHEER_RADIUS
		MaxHealth         		= 30000
		PermanentlyKilledByFilter	= NONE
   		DodgePercent      		= 80%	
	End
End
End

Object MordorMountainTroll
ReplaceModule ModuleTag_02
	Body = DelayedDeathBody ModuleTag_021
		CheerRadius 				= EMOTION_CHEER_RADIUS
    	MaxHealth					= 50000                  
    	MaxHealthDamaged			= 25000
    	MaxHealthReallyDamaged		= 1
		DoHealthCheck				= No
		DelayedDeathTime			= 5000
		CanRespawn					= No
  	End
End
End

Object RohanTheoden
ReplaceModule ModuleTag_RespawnBody
	Body = RespawnBody ModuleTag_RespawnBody1
		CheerRadius 			= EMOTION_CHEER_RADIUS
		MaxHealth        		= 25000
		PermanentlyKilledByFilter	= NONE
   		DodgePercent      		= HERO_DODGE_PERCENT
	End
End
End

Object IsengardWormTongue
ReplaceModule ModuleTag_RespawnBody
	Body = RespawnBody ModuleTag_RespawnBody1
		CheerRadius 			= EMOTION_CHEER_RADIUS
		MaxHealth        		= 55000
		PermanentlyKilledByFilter	= NONE
    		DodgePercent      		= HERO_DODGE_PERCENT
		BurningDeathBehavior	= Yes
		BurningDeathFX			= FX_InfantryBurningFlame
	End
End
End

Object ElvenElrond
ReplaceModule ModuleTag_RespawnBody
	Body = RespawnBody ModuleTag_RespawnBody1
		CheerRadius 				= EMOTION_CHEER_RADIUS
		MaxHealth         			= 40000
		PermanentlyKilledByFilter	= NONE
   		DodgePercent      			= HERO_DODGE_PERCENT
	End
End
End

Object RohanEomer
ReplaceModule ModuleTag_RespawnBody
	Body = RespawnBody ModuleTag_RespawnBody1
		CheerRadius 				= EMOTION_CHEER_RADIUS
		MaxHealth         			= 75000
		PermanentlyKilledByFilter		= NONE
   		DodgePercent      			= HERO_DODGE_PERCENT
	End
End
End

Object MordorWitchKing
ReplaceModule ModuleTag_02
	Body = RespawnBody ModuleTag_021
		CheerRadius 				= EMOTION_CHEER_RADIUS
		MaxHealth         			= 10000000
		PermanentlyKilledByFilter	= NONE
		BurningDeathBehavior		= Yes
		BurningDeathFX				= FX_InfantryBurningFlame
	End
End
End

;---------------------UnitPrice and buildtime-----------------------------------------------

Object GoblinFighterHorde
BuildCost = 130
BuildTime = 20.0
End

Object MordorFighterHorde
BuildCost = 180
BuildTime = 20.0
End

Object GondorFighterHorde
BuildCost = 300
BuildTime = 25.0
End

Object ElvenMithlondSentryHorde
BuildCost = 600
BuildTime = 30.0
End

Object DwarvenGuardianHorde
BuildCost = 750
BuildTime = 40.0
End

Object GondorTowerShieldGuardHorde
BuildCost = 1000
BuildTime = 50.0
End

Object IsengardWargRiderHorde
BuildCost = 1250
BuildTime = 60.0
End

Object MordorEasterlingHorde
BuildCost = 1500
BuildTime = 75.0
End

Object ElvenRivendellLancerHorde
BuildCost = 1600
BuildTime = 90.0
End


Object IsengardFighterHorde
BuildCost = 2100
BuildTime = 105.0
End

Object ElvenLorienWarriorHorde
BuildCost = 2500
BuildTime = 120.0
End

Object DwarvenBattleWagon
BuildCost = 3000
BuildTime = 140.0
End

Object WildSpiderlingHorde
BuildCost = 550
BuildTime = 40.0
End

Object IsengardPikemanHorde
BuildCost = 4000
BuildTime = 180.0
End

Object GondorKnightHorde
BuildCost = 5000
BuildTime = 210.0
End

Object MordorMumakil
BuildCost = 6000
BuildTime = 240.0
End

Object DwarvenPhalanxHorde
BuildCost = 7000
BuildTime = 280.0
End

Object WildMarauderHorde
BuildCost = 8000
BuildTime = 320.0
End

Object WildFireDrake
BuildCost = 10000
BuildTime = 360.0
End

;---------------------UnitPrice and buildtime-------part 3----------------------------------

;Wont work yet
Object GoblinArcherHorde
BuildCost = 500
BuildTime = 20.0
End

;wont work yet
Object IsengardUrukCrossbowHorde
BuildCost = 850
BuildTime = 30.0
End

;wont work yet
Object ElvenMirkwoodArcherHorde
BuildCost = 1800
BuildTime = 60.0
End

Object DwarvenAxeThrowerHorde
BuildCost = 4200
BuildTime = 110.0
End

Object GondorArcherHorde
BuildCost = 10000
BuildTime = 190.0
End

;wont work yet
Object MordorArcherHorde
BuildCost = 21500
BuildTime = 150.0
End

Object ElvenLorienArcherHorde
BuildCost = 40000
BuildTime = 300.0
End

;wont work yet
Object DwarvenMenOfDaleHorde
BuildCost = 8500
BuildTime = 190.0
End

;wont work yet
Object MordorHaradrimArcherHorde
BuildCost = 28000
BuildTime = 320.0
End

;------------------------+++++damage scripts------------------------------------------------

Object GoblinArcher
AddModule
	Behavior = AttributeModifierUpgrade ModuleTag_DwarfTower1
		TriggeredBy		= Upgrade_ObjectLevel1
		AttributeModifier	= GoblinArcherLvl2
	End
End
End

ModifierList GoblinArcherLvl2 
	Category = LEVEL
	Modifier = DAMAGE_MULT 0.5
	Duration = 0
End

Object IsengardUrukCrossbow
AddModule
	Behavior = AttributeModifierUpgrade ModuleTag_DwarfTower1
		TriggeredBy		= Upgrade_ObjectLevel1
		AttributeModifier	= IsengardUrukCrossbowLvl2
	End
End
End

ModifierList IsengardUrukCrossbowLvl2 
	Category = LEVEL
	Modifier = DAMAGE_MULT 1.00
	Duration = 0
End

Object ElvenMirkwoodArcher
AddModule
	Behavior = AttributeModifierUpgrade ModuleTag_DwarfTower1
		TriggeredBy		= Upgrade_ObjectLevel1
		AttributeModifier	= ElvenMirkwoodArcherLvl2
	End
End
End

ModifierList ElvenMirkwoodArcherLvl2 
	Category = LEVEL
	Modifier = DAMAGE_MULT 1.00
	Duration = 0
End

Object DwarvenAxeThrower
AddModule
	Behavior = AttributeModifierUpgrade ModuleTag_DwarfTower1
		TriggeredBy		= Upgrade_ObjectLevel1
		AttributeModifier	= DwarvenAxethrowerLvl2
	End
End
End

ModifierList DwarvenAxethrowerLvl2 
	Category = LEVEL
	Modifier = DAMAGE_MULT 5.5
	Duration = 0
End

Object GondorArcher
AddModule
	Behavior = AttributeModifierUpgrade ModuleTag_DwarfTower1
		TriggeredBy		= Upgrade_ObjectLevel1
		AttributeModifier	= GondorArcherLvl2
	End
End
End

ModifierList GondorArcherLvl2 
	Category = LEVEL
	Modifier = DAMAGE_MULT 13.50
	Duration = 0
End

Object MordorArcher
AddModule
	Behavior = AttributeModifierUpgrade ModuleTag_DwarfTower1
		TriggeredBy		= Upgrade_ObjectLevel1
		AttributeModifier	= MordorArcherLvl2
	End
End
End

ModifierList MordorArcherLvl2 
	Category = LEVEL
	Modifier = DAMAGE_MULT 31.25
	Duration = 0
End

Object ElvenLorienArcher
AddModule
	Behavior = AttributeModifierUpgrade ModuleTag_DwarfTower1
		TriggeredBy		= Upgrade_ObjectLevel1
		AttributeModifier	= ElvenLorienArcherLvl2
	End
End
End

ModifierList ElvenLorienArcherLvl2 
	Category = LEVEL
	Modifier = DAMAGE_MULT 41.50
	Duration = 0
End
////////////////////////////////////////////////////////////////////////////////////////////
Object DwarvenMenOfDale
AddModule
	Behavior = AttributeModifierUpgrade ModuleTag_DwarfTower1
		TriggeredBy		= Upgrade_ObjectLevel1
		AttributeModifier	= DwarvenMenOfDaleLvl2
	End
End
End

ModifierList DwarvenMenOfDaleLvl2 
	Category = LEVEL
	Modifier = DAMAGE_MULT 8.00
	Duration = 0
End

Object MordorHaradrimArcher
AddModule
	Behavior = AttributeModifierUpgrade ModuleTag_DwarfTower1
		TriggeredBy		= Upgrade_ObjectLevel1
		AttributeModifier	= MordorHaradrimArcherLvl2
	End
End
End

ModifierList MordorHaradrimArcherLvl2 
	Category = LEVEL
	Modifier = DAMAGE_MULT 25.00
	Duration = 0
End

;------------Towers and Walls---------------------------------------------------------------

CommandSet GenericSentryTowerCommandSet0
	1 = Command_ExitGarrison
	2 = Command_ExitGarrison
	6 = Command_Sell
End

CommandSet GenericSentryTowerCommandSet11
	1 = Command_ExitGarrison
	2 = Command_ExitGarrison
	3 = Command_PurchaseSentryTowerFireArrowsUpgrade
	6 = Command_Sell
End

CommandSet GenericSentryTowerCommandSet12
	1 = Command_ExitGarrison
	2 = Command_ExitGarrison
	3 = Command_PurchaseSentryTowerForgedBladesUpgrade
	6 = Command_Sell
End

CommandSet GenericSentryTowerCommandSet13
	1 = Command_ExitGarrison
	2 = Command_ExitGarrison
	3 = Command_PurchaseUpgradeElvenSilverthornTowerArrows
	6 = Command_Sell
End

CommandSet DwarvenWallUpgradeNodeCommandSet1
	1 = Command_DwarvenWallUpgradeToHub
	2 = Command_DwarvenWallUpgradeToPosternGate
	3 = Command_DwarvenWallUpgradeToTower
	6 = Command_Sell
End

Upgrade Upgrade_SentryTowerFireArrows1
	Type			= OBJECT
	BuildCost		= 1200
	BuildTime		= 0.1
	DisplayName		= Upgrade:FortressFireArrows
	ResearchSound	= UpgradeFlamingArrows
End

CommandButton Command_PurchaseSentryTowerFireArrowsUpgrade
	Upgrade           = Upgrade_SentryTowerFireArrows1
  DescriptLabel    = CONTROLBAR:ToolTipArrowsUpgraden
End

CommandSet GenericSentryTowerCommandSet1
	1 = Command_ExitGarrison
	2 = Command_ExitGarrison
	3 = Command_PurchaseSentryTowerFireArrowsUpgrade
	6 = Command_Sell
End

Upgrade Upgrade_SentryTowerFireArrows2
	Type			= OBJECT
	BuildCost		= 5500
	BuildTime		= 0.1
	DisplayName		= Upgrade:FortressFireArrows
	ResearchSound	= UpgradeFlamingArrows
End

CommandButton Command_PurchaseSentryTowerFireArrowsUpgrade
	Upgrade           = Upgrade_SentryTowerFireArrows2
  DescriptLabel    = CONTROLBAR:ToolTipArrowsUpgraden
End

CommandSet GenericSentryTowerCommandSet2
	1 = Command_ExitGarrison
	2 = Command_ExitGarrison
	3 = Command_PurchaseSentryTowerFireArrowsUpgrade
	6 = Command_Sell
End

Upgrade Upgrade_DwarvenTowerForgedBlades1
	Type			= OBJECT
	BuildCost		= 1400
	BuildTime		= 0.1
	ResearchSound	= UpgradeForgedBlades
	DisplayName	= UPGRADE:DwarvenForgedBlades
End

CommandButton Command_PurchaseSentryTowerForgedBladesUpgrade
	Upgrade           = Upgrade_DwarvenTowerForgedBlades1
  DescriptLabel    = CONTROLBAR:ToolTipArrowsUpgraden
End

CommandSet GenericSentryTowerCommandSet3
	1 = Command_ExitGarrison
	2 = Command_ExitGarrison
	3 = Command_PurchaseSentryTowerForgedBladesUpgrade
	6 = Command_Sell
End

Upgrade Upgrade_ElvenSilverthornArrowsTower1
	DisplayName		= UPGRADE:ElvenSilverthornArrows
	Type			= OBJECT
	BuildCost		= 19500
	BuildTime		= 0.1
	StrategicIcon	= AptStrategicUnitUpgradeArrow
End

CommandButton Command_PurchaseUpgradeElvenSilverthornTowerArrows
Upgrade = Upgrade_ElvenSilverthornArrowsTower1
  DescriptLabel    = CONTROLBAR:ToolTipArrowsUpgraden
End

CommandSet GenericSentryTowerCommandSet4
	1 = Command_ExitGarrison
	2 = Command_ExitGarrison
	3 = Command_PurchaseUpgradeElvenSilverthornTowerArrows
	6 = Command_Sell
End

Object DwarvenSentryTower
BuildCost = 2500
BuildTime = 20.0
PlacementViewAngle  = 270
AddModule
	Behavior = AttributeModifierUpgrade ModuleTag_DwarfTower1
		TriggeredBy		= Upgrade_StructureLevel1
		AttributeModifier	= DwarvenSentryTowerSpeedModLvl2 
	End
End
AddModule
	Behavior = AttributeModifierUpgrade ModuleTag_DwarfTower2
		TriggeredBy		= Upgrade_StructureLevel1
		AttributeModifier	= DwarvenSentryTowerSpeedModLvl22 
	End
End
CommandSet = GenericSentryTowerCommandSet3
AddModule
	Behavior = CommandSetUpgrade ModuleTag_Override2
		TriggeredBy      = Upgrade_DwarvenTowerForgedBlades1
		CommandSet       = GenericSentryTowerCommandSet12
	End
End
ReplaceModule ModuleTag_05
Body                        = StructureBody ModuleTag_051
	MaxHealth         		    = 2500
	MaxHealthDamaged  		    = 1250
	MaxHealthReallyDamaged 	  	= 625
End
End
End

ModifierList DwarvenSentryTowerSpeedModLvl2 
	Category = STRUCTURE
	Modifier = DAMAGE_MULT 5.00
	Duration = 0
End

ModifierList DwarvenSentryTowerSpeedModLvl22 
	Category = STRUCTURE
	Modifier = RANGE 300%
	Duration = 0
End

Object WildSentryTower
BuildCost = 2000
BuildTime = 16.0
PlacementViewAngle  = 0
AddModule
	Behavior = AttributeModifierUpgrade ModuleTag_WildTower1
		TriggeredBy		= Upgrade_StructureLevel1
		AttributeModifier	= WildSentryTowerSpeedModLvl2 
	End
End
CommandSet = GenericSentryTowerCommandSet1
AddModule
	Behavior = CommandSetUpgrade ModuleTag_Override2
		TriggeredBy      = Upgrade_SentryTowerFireArrows1
		CommandSet       = GenericSentryTowerCommandSet11
	End
End
ReplaceModule ModuleTag_05
	Body                        = StructureBody ModuleTag_051
		MaxHealth         		= 2000
		MaxHealthDamaged		= 1000
		MaxHealthReallyDamaged	= 500
	End
End
End

ModifierList WildSentryTowerSpeedModLvl2 
	Category = STRUCTURE
	Modifier = DAMAGE_MULT 5.00
	Duration = 0
End

Object IsengardBattleTower
BuildCost = 8000
BuildTime = 25.0
PlacementViewAngle  = 180
AddModule
	Behavior = AttributeModifierUpgrade ModuleTag_IsengardTower1
		TriggeredBy		= Upgrade_StructureLevel1
		AttributeModifier	= IsengardBattleTowerSpeedModLvl2 
	End
End
CommandSet = GenericSentryTowerCommandSet2
AddModule
	Behavior = CommandSetUpgrade ModuleTag_Override2
		TriggeredBy      = Upgrade_SentryTowerFireArrows2
		CommandSet       = GenericSentryTowerCommandSet11
	End
End
ReplaceModule ModuleTag_05
	Body                      = StructureBody ModuleTag_051
		MaxHealth               = 4000
		MaxHealthDamaged        = 2000
		MaxHealthReallyDamaged  = 1000
		DamageCreationList = OCL_BuildingDamageList01 CATAPULT_ROCK
	End
End
End

ModifierList IsengardBattleTowerSpeedModLvl2 
	Category = STRUCTURE
	Modifier = DAMAGE_MULT 25.00
	Duration = 0
End

Object ElvenBattleTower
BuildCost = 27000
BuildTime = 30.0
PlacementViewAngle  = 90
AddModule
	Behavior = AttributeModifierUpgrade ModuleTag_ElvenTower1
		TriggeredBy		= Upgrade_StructureLevel1
		AttributeModifier	= ElvenBattleTowerSpeedModLvl2 
	End
End
CommandSet = GenericSentryTowerCommandSet4
AddModule
	Behavior = CommandSetUpgrade ModuleTag_Override2
		TriggeredBy      = Upgrade_ElvenSilverthornArrowsTower1
		CommandSet       = GenericSentryTowerCommandSet13
	End
End
ReplaceModule ModuleTag_05
	Body                      = StructureBody ModuleTag_051
		MaxHealth               = 6000
		MaxHealthDamaged        = 3000
		MaxHealthReallyDamaged  = 1500
		DamageCreationList = OCL_BuildingDamageList01 CATAPULT_ROCK
	    
		DamageCreationList = OCL_GBBtlTwrSD2_Chunk1 CATAPULT_ROCK FRONT_DESTROYED
		DamageCreationList = OCL_GBBtlTwrSD2_Chunk2 CATAPULT_ROCK RIGHT_DESTROYED
		DamageCreationList = OCL_GBBtlTwrSD2_Chunk3 CATAPULT_ROCK BACK_DESTROYED
		DamageCreationList = OCL_GBBtlTwrSD2_Chunk4 CATAPULT_ROCK LEFT_DESTROYED
	End
End
End

ModifierList ElvenBattleTowerSpeedModLvl2 
	Category = STRUCTURE
	Modifier = DAMAGE_MULT 100.00
	Duration = 0
End

Object MordorBattleTower
BuildCost = 500
BuildTime = 10.0
End

Object GondorBattleTower
BuildCost = 500
BuildTime = 10.0
PlacementViewAngle  = 180
ReplaceModule ModuleTag_05
	Body                      = StructureBody ModuleTag_051
		MaxHealth               = 1000
		MaxHealthDamaged        = 500
		MaxHealthReallyDamaged  = 250
	End
End
End

Object DwarvenWallSegmentSmall
BuildCost = 100
BuildTime = 5
CommandSet = DwarvenWallUpgradeNodeCommandSet1

End

Object DwarvenWallHubSmall
BuildCost = 100
BuildTime = 5
End



;-------------------------------------------------------------------------------------------

PlayerTemplate FactionMen
StartingUnit1 = NONE
StartingUnit0 = NONE
End

PlayerTemplate FactionElves
StartingUnit1 = NONE
StartingUnit0 = NONE
End

PlayerTemplate FactionDwarves
StartingUnit1 = NONE
StartingUnit0 = NONE
End

PlayerTemplate FactionIsengard
StartingUnit1 = NONE
StartingUnit0 = NONE
End

PlayerTemplate FactionMordor
StartingUnit1 = NONE
StartingUnit0 = NONE
End

PlayerTemplate FactionWild
StartingUnit1 = NONE
StartingUnit0 = NONE
End

Object DwarvenFortressCitadel
RemoveModule AutoDepositModuleTag
End

MissionObjectiveList
MissionObjectiveTag = SCRIPT:INMISSION
MissionObjectiveTag = SCRIPT:INMISSION2
End