;INI and map by eliec
;this ini contains the code to create the 6 powerful Heros of helmsdeep: 
;Haldir, Aragorn, Gamling, Theoden, Legolas, and Gimli
;;;
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;Note:I made this file as messy as possible out of spite;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;\_  \_  \_  \_  \_  \_  \_  \_  \_  \_  \_  \_  \_  \_  \_  \_  \_
;
;    \_\_\_      \_        \_\_\_\_     \_\_\_         \_\_\_
;   \_      \_    \_          \_       \_      \_     \_     \_
;   \_\_\_\_\_     \_          \_      \_\_\_\_\_     \_
;    \_             \_          \_      \_             \_
;     \_       \_    \_          \_      \_       \_    \_
;       \_     \_     \_          \_       \_     \_      \_    \_
;	  \_\_\_       \_\_\_\_  \_\_\_\_    \_\_\_         \_\_\_
;	                                                   
; \_  \_  \_  \_  \_  \_  \_  \_  \_  \_  \_  \_  \_  \_  \_  \_  \_  \
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;Thanks to {IP}Lascar for changing the uruk horde sizes
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;The history of all civilization hitherto, has been the history of the class struggle.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Object RohanElvenWarriorHorde
ReplaceModule ModuleTag_HordeContain
Behavior = HordeContain ModuleTag_HordeContain1
		ObjectStatusOfContained = 
		InitialPayload = RohanElvenWarrior 12
		Slots = 12
		PassengerFilter = NONE +INFANTRY
		ShowPips = No
		ThisFormationIsTheMainFormation = Yes	;Used to determine which armorset to use (and anything else we want!)
		RandomOffset = X:1 Y:1
		
		; Banner Carrier info		
		BannerCarriersAllowed	= RohanBanner										; types of units that are allowed as banner carriers
		BannerCarrierPosition	= UnitType:RohanElvenWarrior	Pos:X:35.0 Y:0.0	; (DEFAULT) position of banner carrier for elven warrior horde
		
		; Positions for 
		RankInfo = RankNumber:1 UnitType:RohanElvenWarrior Position:X:13 Y:0		Position:X:13 Y:25		Position:X:13 Y:-25		Position:X:13 Y:50		Position:X:13 Y:-50	GrantedWeaponCondition:WEAPONSET_TOGGLE_1 
		RankInfo = RankNumber:2 UnitType:RohanElvenWarrior Position:X:38 Y:0		Position:X:38 Y:25		Position:X:38 Y:-25		Position:X:38 Y:50		Position:X:38 Y:-50	Position:X:38 Y:75		Position:X:38 Y:-75	RevokedWeaponCondition:WEAPONSET_TOGGLE_1
		
		
		RanksToReleaseWhenAttacking = 1 2
		MeleeAttackLeashDistance = 25; How far the hordes can move from the center of the horde when melee attacking.
	End

End
End

Weather
SnowEnabled = Yes
IsSnowing = Yes
SnowTexture = EXRainDrop.tga 
SnowBoxHeight = 500
SnowSpacing = 6
NumberTiles = 3

SnowAmplitude = 15
SnowFrequencyScaleX = 0.01
SnowFrequencyScaleY = 0.005

SnowPointSize = 3
SnowMinPointSize = 5
SnowMaxPointSize = 10

SnowPointSprites = No
SnowQuadSize = 3

SnowSpeed = 150
SnowXYSpeed = X:5 Y:50S

End

FXParticleSystem ThranDeadEye1
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXRing01.tga
    Lifetime = 15 15
    SystemLifetime = 30
    SortLevel = 1
    Size = 10 15
    BurstCount = 1 1
  End
  Color = DefaultColor
    Color2 = R:19 G:31 B:62 5
    Color3 = R:0 G:0 B:0 15
    Color4 = R:32 G:32 B:32 0
  End
  Update = DefaultUpdate
    SizeRate = 1 1
    SizeRateDamping = 1 1
    AngleZ = 0 7
    AngularRateZ = -0.1 0.1
    AngularDamping = 1 1
    AngularDampingXY = 1 1
  End
  Physics = DefaultPhysics
    Gravity = -0.01
    VelocityDamping = 1 1
  End
  EmissionVelocity = OutwardEmissionVelocity
  End
  EmissionVolume = CylinderEmissionVolume
    Radius = 10
    Offset = X:0 Y:0 Z:10
  End
  Draw = DefaultDraw
  End
End

FXList FX_ThranDeadEye
Sound
    Name = AragornAthelesEffect
  End
ParticleSystem
    Name = ThranDeadEye1
    Offset = X:0.0 Y:0.0 Z:5.0
    OrientToObject = Yes
  End
End

CommandButton Command_SpecialPowerSpawnWhirlwind
	Command			= SPECIAL_POWER
    SpecialPower		= SpecialPowerSpawnTornado
    ButtonImage			= HSGaladriel_NaturesWrath
	Options			= NEED_TARGET_POS
	TextLabel		= CONTROLBAR:LegolasWhirlwind
	ButtonBorderType	= ACTION
	DescriptLabel		= CONTROLBAR:TooltipLegolasWhirlwind
	RadiusCursorType    	= NaturesWrathRadiusCursor
	InPalantir		= Yes
End

CommandButton Command_ArwenFlood
  Command                 = SPECIAL_POWER
  SpecialPower            = SpecialAbilityPersonalFlood
  Options                 = NEED_TARGET_POS CONTEXTMODE_COMMAND
  TextLabel               = CONTROLBAR:Legoflood
  ButtonImage             = SBGood_Flood
  ButtonBorderType        = ACTION 
  RadiusCursorType        = FloodRadiusCursor
  DescriptLabel           = CONTROLBAR:ToolTipLegoflood
  InPalantir              = Yes
End

CommandButton Command_HaldirGoldenArrow
	Command				= SPECIAL_POWER
	SpecialPower			= SpecialAbilityHaldirGoldenArrow
	Options				= NEED_TARGET_ENEMY_OBJECT NEED_TARGET_NEUTRAL_OBJECT
	TextLabel			= CONTROLBAR:Legogoldarrow
	DescriptLabel			= CONTROLBAR:ToolTipLegogoldarrow
	ButtonImage			= HSHaldirGoldenArrow
	ButtonBorderType		= ACTION
	InPalantir			= Yes
	AutoAbility			= Yes
	PresetRange			= HALDIR_BOW_RANGE
	CursorName			= Bombard
	InvalidCursorName		= GenericInvalid
End

Science SCIENCE_FreezingRain
  PrerequisiteSciences = NONE
  SciencePurchasePointCost = EVIL_RANK_3_COST
  SciencePurchasePointCostMP = 1
  IsGrantable = Yes
End

SpecialPower SpellBookFreezingRain
  Enum              = SPECIAL_SPELL_BOOK_FREEZING_RAIN
  RequiredSciences   = SCIENCE_FreezingRain
  ReloadTime        = 1
  InitiateSound     = ThunderStrikesStereo
  Flags				= RESPECT_RECHARGE_TIME_DISCOUNT
End


PlayerTemplate FactionMen
	IntrinsicSciences			= SCIENCE_EVIL
	IntrinsicSciencesMP			= SCIENCE_ISENGARD
	SpellBook				= EvilSpellBook
	SpellBookMp				= IsengardSpellBook
	PurchaseScienceCommandSet		= EvilSpellStoreCommandSet
	PurchaseScienceCommandSetMP		= IsengardSpellStoreCommandSet
End

PlayerTemplate FactionElves
	IntrinsicSciences			= SCIENCE_EVIL
	IntrinsicSciencesMP			= SCIENCE_ISENGARD
	SpellBook				= EvilSpellBook
	SpellBookMp				= IsengardSpellBook
	PurchaseScienceCommandSet		= EvilSpellStoreCommandSet
	PurchaseScienceCommandSetMP		= IsengardSpellStoreCommandSet
End
PlayerTemplate FactionDwarves
	IntrinsicSciences			= SCIENCE_EVIL
	IntrinsicSciencesMP			= SCIENCE_ISENGARD
	SpellBook				= EvilSpellBook
	SpellBookMp				= IsengardSpellBook
	PurchaseScienceCommandSet		= EvilSpellStoreCommandSet
	PurchaseScienceCommandSetMP		= IsengardSpellStoreCommandSet
End

Object SummonedDragonJH1
RemoveModule ModuleTag_LifetimeUpdate
End;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
FXList FX_NEWMinWallATransitionRubble;;;;;;;;;;;;;;;;;;;;make the wall explosion a little more interesting
  ParticleSystem;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    Name = BalrogSummonExplosionWave
    Offset = X:0.0 Y:0.0 Z:50.0
    OrientToObject = Yes     
  End

  ParticleSystem
    Name = BalrogSummonHeatWave
    Offset = X:0.0 Y:0.0 Z:50.0
    OrientToObject = Yes     
  End
  
  ParticleSystem
    Name = EarthquakeDust
    Offset = X:0.0 Y:0.0 Z:50.0
    OrientToObject = Yes     
  End
  ParticleSystem
    Name = EarthquakeRocks
    Offset = X:0.0 Y:0.0 Z:50.0
    OrientToObject = Yes     
  End
  ParticleSystem
    Name = BalrogSummonExplosionChunks
    Offset = X:0.0 Y:0.0 Z:50.0
    OrientToObject = Yes     
  End
 ParticleSystem
    Name = EarthquakeStart
    Offset = X:0.0 Y:0.0 Z:50.0
    OrientToObject = Yes     
  End
 ParticleSystem
    Name = BalrogSummonExplosionChunks2
    Offset = X:0.0 Y:0.0 Z:50.0
    OrientToObject = Yes     
  End
 ParticleSystem
    Name = BalrogSummonExplosionChunksSmall
    Offset = X:0.0 Y:0.0 Z:50.0
    OrientToObject = Yes     
  End
  ParticleSystem
    Name = MinWallARubbleDust
    Offset = X:0.0 Y:0.0 Z:50.0
    OrientToObject = Yes     
  End

  ParticleSystem
    Name = MinWallAReallyDamagedDebris
    Offset = X:0.0 Y:0.0 Z:50.0
    OrientToObject = Yes     
  End
 ParticleSystem
    Name = BalrogSummonScatterFire
    Offset = X:0.0 Y:0.0 Z:50.0
    OrientToObject = Yes     
  End
  ParticleSystem
    Name = MinWallARubbleBricks
    Offset = X:0.0 Y:0.0 Z:50.0
    OrientToObject = Yes     
  End

  ParticleSystem
    Name = MinWallARubbleDustSettle
    Offset = X:0.0 Y:0.0 Z:5.0
    OrientToObject = Yes     
  End

  CameraShakerVolume
    Radius = 500
    Duration_Seconds = 10
    Amplitude_Degrees = 1
  End
  
  Sound
    Name = MinisTirithGateDie
  End
  
  Sound
    Name = BuildingHeavyDamageStone
  End
  
  Sound
    Name = ImpactCatapultRock
  End
  
End
Object HelmsDeepCulvert
RemoveModule ModuleTag_Draw
AddModule ModuleTag_Draw_NEW
Draw = W3DScriptedModelDraw ModuleTag_Draw_NEW
		OkToChangeModelColor  = Yes
		UseStandardModelNames = Yes
		ExtraPublicBone = SIEGELADDER
       
		WallBoundsMesh = P1
		RampMesh1 = P2
		RampMesh2 = P3        
		
		DefaultModelConditionState
			Model = RBHDDWCulv
		End
		
		;--damaged building  
		ModelConditionState  = DAMAGED
		Model         = RBHDDWCulv_D1  
		End
	    
	    
		AnimationState = DAMAGED
		EnteringStateFX	= FX_BuildingDamaged
		End

		ModelConditionState  = REALLYDAMAGED
			Model         = RBHDDWCulv_D2
		End
		AnimationState = REALLYDAMAGED
       				Animation		=	ReallyDamagedanimation
				AnimationName		=	RBHDDWCulv_D2.RBHDDWCulv_D2
				AnimationMode		=	ONCE
				AnimationSpeedFactorRange = 0.5 0.5
			End
			EnteringStateFX = FX_MinWallATransitionReallyDamaged
		End

		ModelConditionState  = RUBBLE
		Model         = RBHDDWCulv_D3
		End
	    
		AnimationState = RUBBLE
			Animation				=	Death
				AnimationName		=	RBHDDWCulv_D3.RBHDDWCulv_D3
				AnimationMode		=	ONCE
				AnimationSpeedFactorRange = 0.5 0.5
			End
			EnteringStateFX = FX_NEWMinWallATransitionRubble
		End      

		ModelConditionState  = POST_RUBBLE
			Model         = None
		End

		ModelConditionState  = POST_COLLAPSE
			Model         = None
		End
	End
End
End
CommandButton Command_CreateAHero_Bombard_Level3
	Command				= SPECIAL_POWER
    SpecialPower		= SpecialAbilityCreateAHeroBombard_Level3
	Options				= NEED_TARGET_POS 
	TextLabel			= CONTROLBAR:gimliartillery
    ButtonImage			= SBGood_Bombard
	ButtonBorderType	= ACTION
	DescriptLabel		= CONTROLBAR:ToolTipgimliartillery
    RadiusCursorType	= RainOfFireRadiusCursor
    CursorName			= AttackObj
    InvalidCursorName	= GenericInvalid
	InPalantir			= Yes

	CreateAHeroUIAllowableUpgrades			  =	Upgrade_CreateAHero_ClassDwarf
	CreateAHeroUIMinimumLevel				  = 10
	CreateAHeroUIPrerequisiteButtonName = Command_CreateAHero_Bombard_Level2
	CreateAHeroUICostIfSelected				  = CAH_BOMBARD_LEVEL3_COST
End
FXParticleSystem AragornSwordglow
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXSplatHaze.tga
    Lifetime = 10 10
    SortLevel = 1
    Size = 0 10
    BurstCount = 4 6
    InitialDelay = 5 5
    IsParticleUpTowardsEmitter = Yes
  End
  Color = DefaultColor
    Color2 = R:87 G:100 B:254 5
    Color3 = R:0 G:0 B:100 150
    Color4 = R:35 G:40 B:100 0
  End
  Update = DefaultUpdate
    SizeRate = -0.25 -0.25
    SizeRateDamping = 1 1
    AngleZ = -7 7
    AngularDamping = 1 1
  End
  Physics = DefaultPhysics
    VelocityDamping = 1 1
  End
  EmissionVelocity = OrthoEmissionVelocity
  End
  EmissionVolume = LineEmissionVolume
    EndPoint = X:0 Y:0 Z:15
  End
  Draw = DefaultDraw
  End
End

FXParticleSystem GamlingSwordglow
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXSplatHaze.tga
    Lifetime = 10 10
    SortLevel = 1
    Size = 0 10
    BurstCount = 4 6
    InitialDelay = 5 5
    IsParticleUpTowardsEmitter = Yes
  End
  Color = DefaultColor
    Color2 = R:26 G:64 B:29 7
    Color3 = R:1 G:60 B:30 12
  End
  Update = DefaultUpdate
    SizeRate = -0.25 -0.25
    SizeRateDamping = 1 1
    AngleZ = -7 7
    AngularDamping = 1 1
  End
  Physics = DefaultPhysics
    VelocityDamping = 1 1
  End
  EmissionVelocity = OrthoEmissionVelocity
  End
  EmissionVolume = LineEmissionVolume
    EndPoint = X:0 Y:0 Z:15
  End
  Draw = DefaultDraw
  End
End

FXParticleSystem TheodenSwordglow
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXSplatHaze.tga
    Lifetime = 10 10
    SortLevel = 1
    Size = 0 10
    BurstCount = 4 6
    InitialDelay = 5 5
    IsParticleUpTowardsEmitter = Yes
  End
  Color = DefaultColor
    Color2 = R:171 G:126 B:33 5
    Color3 = R:100 G:45 B:30 20
  End
  Update = DefaultUpdate
    SizeRate = -0.25 -0.25
    SizeRateDamping = 1 1
    AngleZ = -7 7
    AngularDamping = 1 1
  End
  Physics = DefaultPhysics
    VelocityDamping = 1 1
  End
  EmissionVelocity = OrthoEmissionVelocity
  End
  EmissionVolume = LineEmissionVolume
    EndPoint = X:0 Y:0 Z:15
  End
  Draw = DefaultDraw
  End
End
FXParticleSystem GimliSwordFlare1
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXBarbStreaks.tga   ;EXBlast.tga  ;EXFire03.tga  ;EXFireScroll3.tga ;EXSplatHaze.tga
    Lifetime = 25 25
    SortLevel = 1
    Size = 10 15
    BurstCount = 1 1
    InitialDelay = 5 5
    IsParticleUpTowardsEmitter = Yes
  End
  Color = DefaultColor
    Color2 = R:50 G:22 B:15 5
    Color3 = R:100 G:45 B:30 40
  End
  Alpha = DefaultAlpha
    Alpha2 = 0.8 0.3 5 ;10
    Alpha3 = 0 0 25
  End
  Update = DefaultUpdate
    SizeRate = -0.25 -0.25
    SizeRateDamping = 1 1
    AngleZ = -4 4
    AngularDamping = 1 1
  End
  Physics = DefaultPhysics
    Gravity = -0.01
    VelocityDamping = 1 1
  End
  EmissionVelocity = OrthoEmissionVelocity
    X = -0.5 0.5
    Y = -0.5 0.5
    Z = -0.5 0.5
  End
  EmissionVolume = LineEmissionVolume
    StartPoint = X:0 Y:0 Z:15
    EndPoint = X:0 Y:0 Z:17
  End
  Draw = DefaultDraw
  End
End

FXParticleSystem GimliSwordFlare2
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXBarbStreaks.tga  ;EXBlast.tga  ;EXFire01.tga  ;EXSplatHaze.tga
    Lifetime = 25 25
    SortLevel = 1
    Size = 10 15
    BurstCount = 1 1
    InitialDelay = 5 5
    IsParticleUpTowardsEmitter = Yes
    IsGroundAligned = Yes
  End
  Color = DefaultColor
    Color2 = R:50 G:22 B:15 5
    Color3 = R:100 G:45 B:30 40
  End
  Alpha = DefaultAlpha
    Alpha2 = 0.8 0.3 5 ;10
    Alpha3 = 0 0 25
  End
  Update = DefaultUpdate
    SizeRate = -0.45 -0.45
    SizeRateDamping = 1 1
    AngleZ = -4 4
    AngularDamping = 1 1
  End
  Physics = DefaultPhysics
    Gravity = -0.01
    VelocityDamping = 1 1
  End
  EmissionVelocity = OrthoEmissionVelocity
    X = -0.5 0.5
    Y = -0.5 0.5
    Z = -0.5 0.5
  End
  EmissionVolume = LineEmissionVolume
    StartPoint = X:0 Y:0 Z:15
    EndPoint = X:0 Y:0 Z:17
  End
  Draw = DefaultDraw
  End
End
;;;;;;;;;;;;;;;;;;;;;;;;;;;
Object Wyrm
RemoveModule ModuleTag_LifetimeUpdate
End
;;;;;;;;;;;;;;;;;;;;;;;;;;;
Object IsengardUrukCrossbowHorde
ReplaceModule ModuleTag_HordeContain
	Behavior = HordeContain ModuleTag_HordeContain_new
		FrontAngle = 270
		FlankedDelay = 2000
		ObjectStatusOfContained = 
		InitialPayload = IsengardUrukCrossbow 20
		Slots = 20
		PassengerFilter = NONE +INFANTRY
		ShowPips = No
		ThisFormationIsTheMainFormation = Yes	;Used to determine which armorset to use (and anything else we want!)
		RandomOffset=X:3 Y:3
		
		MeleeBehavior = Amoeba
		End
		
		
		; Banner Carrier info		
		BannerCarriersAllowed	= IsengardBannerOrc										; types of units that are allowed as banner carriers
		BannerCarrierPosition	= UnitType:IsengardUrukCrossbow		Pos:X:70.0 Y:0.0		; (DEFAULT) position of banner carrier
		
		; Positions for 5
		RankInfo = RankNumber:1 UnitType:IsengardUrukCrossbow Position:X:50 Y:0				Position:X:50 Y:20				Position:X:50 Y:-20				Position:X:50 Y:40				Position:X:50 Y:-40   Position:X:50 Y:60   Position:X:50 Y:-60    Position:X:50 Y:80   Position:X:50 Y:-80  Position:X:50 Y:100 
		RankInfo = RankNumber:2 UnitType:IsengardUrukCrossbow Position:X:30 Y:0 Leader 1 0	Position:X:30 Y:20 Leader 1 1	Position:X:30 Y:-20 Leader 1 2	Position:X:30 Y:40 Leader 1 3	Position:X:30 Y:-40 Leader 1 4  Position:X:30 Y:60 Leader 1 5    Position:X:30 Y:-60 Leader 1 6  Position:X:30 Y:80 Leader 1 7  Position:X:30 Y:-80 Leader 1 8  Position:X:30 Y:100 Leader 1 9
		

		RanksToReleaseWhenAttacking = 1 2 3 
	End
End
End

Object IsengardFighterHorde
ReplaceModule ModuleTag_HordeContain
	Behavior = HordeContain ModuleTag_HordeContain_new
		FrontAngle 		= 270
		FlankedDelay 		= 2000
		ObjectStatusOfContained = 
		InitialPayload 		= IsengardFighter 20
		Slots 			= 20
		PassengerFilter		= NONE +INFANTRY
		ShowPips 		= No
		ThisFormationIsTheMainFormation = Yes	;Used to determine which armorset to use (and anything else we want!)
		RandomOffset		= X:3 Y:3
		MeleeBehavior 		= Amoeba
		End

		; Banner Carrier info		
		BannerCarriersAllowed	= IsengardBannerOrc					; types of units that are allowed as banner carriers
		BannerCarrierPosition	= UnitType:IsengardFighter	Pos:X:70.0 Y:0.0	; (DEFAULT) position of banner carrier
		
		RankInfo = RankNumber:1 UnitType:IsengardFighter Position:X:50 Y:0				Position:X:50 Y:20				Position:X:50 Y:-20				Position:X:50 Y:40				Position:X:50 Y:-40   Position:X:50 Y:60   Position:X:50 Y:-60    Position:X:50 Y:80   Position:X:50 Y:-80  Position:X:50 Y:100 
		RankInfo = RankNumber:2 UnitType:IsengardFighter Position:X:30 Y:0 Leader 1 0	Position:X:30 Y:20 Leader 1 1	Position:X:30 Y:-20 Leader 1 2	Position:X:30 Y:40 Leader 1 3	Position:X:30 Y:-40 Leader 1 4  Position:X:30 Y:60 Leader 1 5    Position:X:30 Y:-60 Leader 1 6  Position:X:30 Y:80 Leader 1 7  Position:X:30 Y:-80 Leader 1 8  Position:X:30 Y:100 Leader 1 9
			
		RanksToReleaseWhenAttacking = 1 

	End
End
End

Object IsengardPikemanHorde
ReplaceModule ModuleTag_HordeContain
	Behavior = HordeContain ModuleTag_HordeContain_new
		FrontAngle = 270
		FlankedDelay = 2000
		ObjectStatusOfContained = 
		InitialPayload = IsengardPikeman 20
		Slots = 20
		PassengerFilter	= NONE +INFANTRY
		ShowPips = No
		ThisFormationIsTheMainFormation = Yes	;Used to determine which armorset to use (and anything else we want!)
		RandomOffset=X:2 Y:2
		MeleeBehavior = Amoeba
		End

		; Banner Carrier info		
		BannerCarriersAllowed	= IsengardBannerOrc										; types of units that are allowed as banner carriers
		BannerCarrierPosition	= UnitType:IsengardPikeman	Pos:X:70.0 Y:0.0		; (DEFAULT) position of banner carrier
		
		; Positions for 5
		RankInfo = RankNumber:1 UnitType:IsengardPikeman Position:X:50 Y:0				Position:X:50 Y:20				Position:X:50 Y:-20				Position:X:50 Y:40				Position:X:50 Y:-40   Position:X:50 Y:60   Position:X:50 Y:-60    Position:X:50 Y:80   Position:X:50 Y:-80  Position:X:50 Y:100 
		RankInfo = RankNumber:2 UnitType:IsengardPikeman Position:X:30 Y:0 Leader 1 0	Position:X:30 Y:20 Leader 1 1	Position:X:30 Y:-20 Leader 1 2	Position:X:30 Y:40 Leader 1 3	Position:X:30 Y:-40 Leader 1 4  Position:X:30 Y:60 Leader 1 5    Position:X:30 Y:-60 Leader 1 6  Position:X:30 Y:80 Leader 1 7  Position:X:30 Y:-80 Leader 1 8  Position:X:30 Y:100 Leader 1 9
			
		RanksToReleaseWhenAttacking = 1
	End
End
End
Weapon HobbitRockThrow
	AttackRange         = FARAMIR_BOW_RANGE	
	
	RangeBonusMinHeight	= 10
	RangeBonus		= 1
	RangeBonusPerFoot	= #MULTIPLY( THRANDUIL_BOW_RANGE .01 )  
	
	
	WeaponSpeed         = 321         ; dist/sec 
	MinWeaponSpeed      = 241
	MaxWeaponSpeed      = 481      ; dist/sec Upper limit on scaling, when attacking past nominal "max" range
	FireFX              = FX_RohanArcherBowWeapon
	ScaleWeaponSpeed    = Yes ; Used for lob weapons, scales speed proportional to range
	HitPercentage       = 100     ;When this weapon is used it will hit exactly 50% of the time.
	HitStoredTarget = Yes	; Always hits initial target.
	
	DelayBetweenShots   = 0
	PreAttackDelay      = 1500
	PreAttackType       = PER_POSITION
	FiringDuration      = 0
	  
	ClipSize			= 1
	AutoReloadsClip		= Yes
	AutoReloadWhenIdle	= 1	
	ClipReloadTime		= Min:1600 Max:1600
	ContinuousFireOne	= 0
	ContinuousFireCoast	= 1200
	  
	AntiAirborneVehicle	= Yes
	AntiAirborneMonster	= Yes
	HitPassengerPercentage	= 20%
	CanBeDodged				= Yes ; Will check for a DodgePercent on the target to have a second chance at failing HitPercent

  ProjectileNugget                    ; Default arrow
    ProjectileTemplateName = HobbitRockProjectile
    WarheadTemplateName = HobbitRockThrowWarhead
  End
End;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;
Object HobbitRockProjectile
  ReplaceModule ModuleTag_Draw
  Draw = W3DScriptedModelDraw ModuleTag_Draw_new
    DefaultModelConditionState     
      Model = NONE
      ParticleSysBone = NONE GoldArrowTrail FollowBone:yes
    End
  End;;;;;;;;
End;;;;;;;;
	ReplaceModule ModuleTag_Draw2
    Draw = W3DStreakDraw ModuleTag_Draw2_new
	    Length		= 18
	    Width		= 2
	    NumSegments	= 6				; number of segements in the streak, increase for smoother line
	    Color		= R:255 G:255 B:255
	    Texture		= EXArrowStreakIce.tga
    End;;;;;;;;;;;;;
End;;;;;;;;
	ReplaceModule ModuleTag_04
 Behavior = BezierProjectileBehavior ModuleTag_04_new
    DetonateCallsKill = Yes
    FirstHeight = 14  ; Height of Bezier control points above highest intervening terrain
    SecondHeight = 9
    FirstPercentIndent = 40% ; Percentage of shot distance control points are placed
    SecondPercentIndent = 100%
    FlightPathAdjustDistPerSecond = 50 ; Can allow a max speed this can attempt to follow a target. Units are their velocity we can tag. (45 is default human speed)
    GroundHitFX = FX_GondorArrowDeath
    CurveFlattenMinDist = 100.0
  End
End;;;;;;;;;;;;;;;;;;;;;;;;
End
Weapon FireguardFireball;;;;;;;;;
	RadiusDamageAffects = ENEMIES
  
  	DelayBetweenShots			= 1			
	ClipSize               		= 0			
  

	DamageNugget                        ; A basic Nugget that just does damage
		Damage        = 20
		Radius        = 20.0   
		DelayTime     = 0
		DamageType            = FLAME  
		DamageFXType          = FLAME  
		DeathType             = BURNED 
		DamageScalar  = 50% NONE +HERO
	End

	DamageNugget                        ; A basic Nugget that just does damage
		Damage        = 10
		Radius        = 40.0 
		DelayTime     = 0
		DamageType            = FLAME  
		DamageFXType          = FLAME  
		DeathType             = BURNED 
		DamageScalar  = 50% NONE +HERO
	End

	DamageNugget                        
		Damage        = 5
		Radius        = 80.0  
		DelayTime     = 0
		DamageType            = FLAME
		DamageFXType          = FLAME  
		DeathType             = BURNED 
		DamageScalar  = 50% NONE +HERO
	End

	MetaImpactNugget                    
		ShockWaveAmount   = 23
		ShockWaveRadius   = 25  
		ShockWaveTaperOff = 1.0 
		ShockWaveZMult    = 0.7  
	End
End
Weapon FireguardAttack
	LeechRangeWeapon	= Yes
	AttackRange         = 24.0
	MeleeWeapon         = Yes
	DelayBetweenShots   = 1000           // time between shots, msec
	FiringDuration		= 1850
	FireFX = FX_BalrogJumpHitGround
	RadiusDamageAffects = ENEMIES

  DamageNugget                        ; A basic Nugget that just does damage
    Damage        = 250
    Radius        = 60.0
    DelayTime     = 1	
    DamageType            = CRUSH
    DamageFXType          = SMALL_ROCK
    DeathType             = NORMAL
  End
  MetaImpactNugget                    
    ShockWaveAmount   = 80.0
    ShockWaveRadius   = 70.0
    ShockWaveTaperOff = 0.5
    ShockWaveZMult    = 0.40
    DelayTime     = 1	; Moves damage from when tippy toes hit to a visually better spot
  End
  FireLogicNugget
	LogicType	= INCREASE_BURN_RATE
	Radius		= 40.0
	Damage		= BALROG_JUMP_DAMAGE
  End
End

SpecialPower SpecialAbilityFireGuard
	Enum			= SPECIAL_SPAWN_TORNADO
	ReloadTime		= 360000 ; in milliseconds
	RadiusCursorRadius	= 70.0
	ViewObjectRange = 400 
End

ChildObject ElrondWhirlwind Drogoth
    ButtonImage = HSDrogothFireflight
    SelectPortrait         = HSDrogothFireflight
	DisplayName		= BurningSpirit
	KindOf = HERO PRELOAD SELECTABLE CAN_CAST_REFLECTIONS NO_COLLIDE AIRCRAFT UNATTACKABLE IGNORE_FOR_VICTORY NOT_AUTOACQUIRABLE 
	ReplaceModule ModuleTag_01
	Draw = W3DScriptedModelDraw ModuleTag_01_new
		DefaultModelConditionState
			Model			= EXDrogoth_FW
      			ParticleSysBone 	= B_TAIL01 DrogothShockwave FollowBone:yes
      			ParticleSysBone 	= B_TAIL01 DrogothFireballFire FollowBone:yes
      			ParticleSysBone 	= B_TAIL02 DrogothFireballFire FollowBone:yes
			ParticleSysBone 	= B_TAIL02 BalrogManeEmbers FollowBone:yes
      			ParticleSysBone 	= B_HEAD BalrogManeFire FollowBone:yes
			ParticleSysBone 	= B_HEAD BalrogManeEmbers FollowBone:yes
 			ParticleSysBone		= B_HEAD DrogothFlightSmoke FollowBone:yes
			ParticleSysBone 	= B_HEAD DrogothFlightFire FollowBone:yes
		End
	IdleAnimationState
			Animation = EXDrogoth_FW
				AnimationName		= EXDrogoth_FW.EXDrogoth_FW
				AnimationMode		= LOOP
				AnimationBlendTime	= 0
			End;;;;;
		End;;;;;;;
	End;;;;;;;;;;;;;;;
End;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	VoiceAttack							= DrogothIncinerateMS
	VoiceAttackCharge					= DrogothIncinerateMS
	VoiceCreated						= DrogothIncinerateMS
	VoiceFullyCreated					= DrogothIncinerateMS
	VoiceFear							= DrogothIncinerateMS
	VoiceGuard							= DrogothIncinerateMS
	VoiceMove							= DrogothIncinerateMS
	VoicePriority						= 90
	VoiceSelect							= DrogothIncinerateMS

	VoiceEnterStateAttack				= DrogothIncinerateMS
	VoiceEnterStateAttackCharge			= DrogothIncinerateMS
	VoiceEnterStateAttackStructure		= DrogothIncinerateMS

	SoundAmbient						= DrogothIncinerateMS
	SoundImpact							= DrogothIncinerateMS
	SoundMoveStart						= DrogothIncinerateMS
	WeaponSet
		Weapon				= PRIMARY		FireguardAttack
	End
	AddModule
	Behavior = FireWeaponUpdate ModuleTag_WINDY
		FireWeaponNugget
			WeaponName = FireguardFireball
			FireDelay = 0
			OneShot = No
		End
	End
End
	AddModule
	Behavior = LifetimeUpdate ModuleTag_LifetimeUpdate
		// This one does the work, but the one in the horde displays the timer
		MinLifetime		= 18000
		MaxLifetime		= 18000
	End
End
	ReplaceModule ModuleTag_SlowDeath
	Behavior = SlowDeathBehavior ModuleTag_SlowDeath_new
		DeathTypes			= ALL
		DestructionDelay	= 500
		ShadowWhenDead		= No
		Sound			= INITIAL DrogothVoxDie
        	FX			= INITIAL FX_DrogothDeath
;		FadeTime = 500
 ;       	FadeDelay = 500
   	End
End
	LocomotorSet
		Locomotor = FellBeastLocomotor
		Condition = SET_NORMAL 
		Speed     = 158  ;88
	End
	LocomotorSet
		Locomotor = FellBeastLocomotor
		Condition = SET_SUPERSONIC 
		Speed     = 250 ;114
	End
	LocomotorSet
		Locomotor = FellBeastLocomotor
		Condition = SET_WANDER 
		Speed     = 130
	End
	LocomotorSet
		Locomotor = FellBeastSwoopLocomotor
		Condition = SET_PANIC
		Speed     = 233
	End
	CommandSet			= EmptyCommandSet
RemoveModule DrogothFireballAI
RemoveModule DrogothWingBlastAI
RemoveModule DrogothIncinerateAI
RemoveModule DrogothFireflightAI
End
CommandButton Command_DrogothFireflight
	ButtonImage             = HSDrogothFireflight
	Command			= SPECIAL_POWER
    	SpecialPower		= SpecialAbilityFireGuard
	Options			= NEED_TARGET_POS
	TextLabel		= CONTROLBAR:FireAvatar
	ButtonBorderType	= ACTION
	DescriptLabel		= CONTROLBAR:TooltipFireAvatar
	RadiusCursorType    	= NaturesWrathRadiusCursor
	InPalantir		= Yes
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
PlayerTemplate FactionAngmar
StartingUnit1 = NONE
StartingUnit0 = NONE
End
FXParticleSystem AndurilMaster
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXBarbStreaks.tga   
    Lifetime = 10 10
    SortLevel = 1
    Size = 15 34
    BurstCount = 1 1
    IsGroundAligned = Yes
  End
  Color = DefaultColor
    Color2 = R:87 G:125 B:254 5
    Color3 = R:0 G:0 B:0 150
    Color4 = R:35 G:40 B:45 0
  End
  Update = DefaultUpdate
    SizeRate = -0.2 -0.2
    SizeRateDamping = 1 1
    AngleZ = -4 4
    AngularRateZ = -0.1 0.1
    AngularDamping = 1 1
    AngularDampingXY = 1 1
  End
  Physics = DefaultPhysics
    Gravity = -0.02
    VelocityDamping = 1 1
  End
  EmissionVelocity = OutwardEmissionVelocity
  End
  EmissionVolume = SphereEmissionVolume
    Radius = 10
  End
  Draw = DefaultDraw
  End
End
FXParticleSystem AndurilMaster1
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXHPicfireblast1.tga
    Lifetime = 10 10
    Size = 62 80
    StartSizeRate = 1 1
    BurstDelay = 1 1
    BurstCount = 1 1
  End
  Color = DefaultColor
    Color2 = R:27 G:48 B:80 10
    Color3 = R:0 G:0 B:0 22
    ColorScale = -20 20
  End
  Update = DefaultUpdate
    SizeRate = -5 -5
    SizeRateDamping = 1.05 1.05
    AngleZ = -180 180
    AngularDamping = 1 1
    AngularDampingXY = 1 1
  End
  Physics = DefaultPhysics
    VelocityDamping = 0.75 0.8
  End
  EmissionVelocity = OutwardEmissionVelocity
    Speed = -4 -4
    OtherSpeed = -4 -4
  End
  EmissionVolume = LineEmissionVolume
    IsHollow = Yes
  End
  Draw = DefaultDraw
  End
End

FXParticleSystem AndurilMaster2
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXBlast3.tga
    Lifetime = 10 10
    Size = 65 75
    StartSizeRate = 1 1
    BurstDelay = 2 2
    BurstCount = 1 1
  End
  Color = DefaultColor
    Color2 = R:65 G:110 B:190 10
    Color3 = R:111 G:78 B:57 15
    Color4 = R:0 G:0 B:0 25
    ColorScale = -80 50
  End
  Update = DefaultUpdate
    SizeRate = -6 -6
    SizeRateDamping = 1.05 1.05
    AngleZ = -3 3
    AngularDamping = 1 1
    AngularDampingXY = 1 1
  End
  Physics = DefaultPhysics
    VelocityDamping = 0.75 0.8
  End
  EmissionVelocity = OutwardEmissionVelocity
    Speed = -5 -5
    OtherSpeed = -5 -5
  End
  EmissionVolume = LineEmissionVolume
    IsHollow = Yes
  End
  Draw = DefaultDraw
  End
End
FXParticleSystem NewBalrogSummonExplosionWave
  System
    Priority = VERY_LOW_OR_ABOVE
    ParticleName = EXLnzFlar2.tga
    Lifetime = 22 22
    SystemLifetime = 100
    SortLevel = 1
    Size = 50 50
    StartSizeRate = 4 4
    BurstCount = 1 1
    IsGroundAligned = Yes
  End
  Color = DefaultColor
    Color1 = R:158 G:184 B:216 0
    Color2 = R:166 G:192 B:219 22
    ColorScale = -5 0
  End
  Update = DefaultUpdate
    SizeRate = 20 20
    SizeRateDamping = 0.97 0.97
    AngularDamping = 1 1
    AngularDampingXY = 1 1
  End
  Physics = DefaultPhysics
    VelocityDamping = 0.8 0.8
  End
  EmissionVelocity = OutwardEmissionVelocity
  End
  EmissionVolume = PointEmissionVolume
  End
  Draw = DefaultDraw
  End
End
FXParticleSystem NewBalrogSummonExplosionSphere
  System
    Priority = VERY_LOW_OR_ABOVE
    Shader = W3D_EMISSIVE
    Type = DRAWABLE
    ParticleName = exwatersphere.w3d
    Lifetime = 40 40
    SystemLifetime = 5
    StartSizeRate = 0.2 0.2
    BurstCount = 1 1
  End
  Color = DefaultColor
    Color1 = R:158 G:184 B:216 0
    Color2 = R:166 G:192 B:219 39
  End
  Alpha = DefaultAlpha
    Alpha1 = 0.4 0.4 0
  End
  Update = DefaultUpdate
    SizeRate = 0.5 0.5
    SizeRateDamping = 1 1
    AngleZ = -500 500
    AngularRateZ = -0.1 0.1
    AngularDamping = 0.97 0.97
    Rotation = ROTATE_Z
    AngularDampingXY = 1 1
  End
  Physics = DefaultPhysics
    VelocityDamping = 1 1
  End
  EmissionVelocity = OrthoEmissionVelocity
  End
  EmissionVolume = PointEmissionVolume
  End
  Draw = RenderObjectDraw
  End
End
FXList FX_AraWOP

  ParticleSystem
    Name = SoWolf_Summon_mist
  End
  ParticleSystem
    Name = SoWolf_Summon_Snow
  End
  ParticleSystem
    Name = SoWolf_Summon_shaft 
  End
  ParticleSystem
    Name = SoWolf_Summon_cracks
  End
  ParticleSystem
    Name = SoWolf_Summon_fog
  End
  ParticleSystem
    Name = SoWolf_Summon_burst
  End
  ParticleSystem;;;;;-----------------------------------------------------------
    Name = NewBalrogSummonExplosionWave
    Offset = X:0.0 Y:0.0 Z:2.0
  End
  ParticleSystem
    Name = NewBalrogSummonExplosionSphere
    Offset = X:0.0 Y:0.0 Z:2.0
  End;;;;;;;;;;-----------------------------------------------------------------
  ;ParticleSystem
  ;  Name = SoWolf_Summon_crystals
  ;End
  ParticleSystem
    Name = SoWolf_Summon_crystalsEx
  End
  ParticleSystem
    Name = SoWolf_Summon_crystalsX
  End
  
  DynamicDecal	; A decal that belongs to nobody, but updates internally to fade and tint and such
    DecalName		= EX_SoWolf_Summon
    Size			= 250
    Color			= R:255 G:255 B:255

    OpacityStart		= 0
    OpacityFadeTimeOne	= 3000
    OpacityPeak		= 255
    OpacityPeakTime		= 255
    OpacityFadeTimeTwo	= 10000
    OpacityEnd		= 0

    StartingDelay		= 0
    Lifetime		= 15000
  End
  ViewShake
    Type = SEVERE
  End
  CameraShakerVolume
    Radius = 800
    Duration_Seconds = 10
    Amplitude_Degrees = .5
  End

  Sound
    Name = ShadeWolfSummonIce
  End  
  Sound
    Name = ShadeWolfSummonWind
  End  
  Sound
    Name = ShadeWolfIceShatter
  End  

End
Weapon RangerWrath
	IdleAfterFiringDelay = 0
	AttackRange = GANDALF_WORD_OF_POWER_RANGE
	MinimumAttackRange = 0.8
	WeaponSpeed = 401         ; dist/sec 
	MinWeaponSpeed = 241
	MaxWeaponSpeed = 601      ; dist/sec Upper limit on scaling, when attacking past nominal "max" range
	ScaleWeaponSpeed = Yes ; Used for lob weapons, scales speed proportional to range
	RadiusDamageAffects = ENEMIES NOT_SIMILAR
	DelayBetweenShots = 5000               ; time between shots, msec
	PreAttackDelay        = 2600
	PreAttackType         = PER_ATTACK 
	FireFX                = FX_AraWOP
	FiringDuration      = 1400
	DamageNugget                        ; A basic Nugget that just does damage
		Damage			= 500
		Radius			= 300.0
		DamageType		= MAGIC
		DamageFXType	= MAGIC
		DeathType		= EXPLODED
		DamageSpeed		= 300.0 
	End
	MetaImpactNugget                    
		ShockWaveAmount   = 75.0
		ShockWaveRadius   = 500.0
		ShockWaveTaperOff = 1.0
		ShockWaveZMult    = 1.000
		ShockWaveSpeed	  = 300.0 
	End
End

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

SpecialPower SpecialAbilityRangerWrath
	Enum						   = SPECIAL_WORD_OF_POWER
	ReloadTime					   = 270000
End

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

CommandButton Command_SpecialAbilityBladeMaster
  Command                 = SPECIAL_POWER
  SpecialPower            = SpecialAbilityRangerWrath
  TextLabel               	= CONTROLBAR:arawop
  ButtonImage             	= HSAragornBladeMaster
  ButtonBorderType        	= ACTION 
  DescriptLabel           	= CONTROLBAR:ToolTiparawop
  InPalantir			= Yes
  AutoAbility			= Yes
  AutoDelay			= 30.0 ; this should sync with the Aragorn's hero mode effect time
  PresetRange			= 50.0
  UnitSpecificSound       	= AragornVoiceBladeMaster
End
;----------------------------------------

Object ArwenFlood
	ReplaceModule ModuleTag_FloodCentral
	Behavior = FloodUpdate ModuleTag_FloodCentral_new
		AngleOfFlow = 0	; In degrees, with 0 as screen right
		DirectionIsRelative = Yes ; If it is relative, it adds the facing of the flood object.
		
		FloodMember
			MemberTemplateName = FloodHorse
			ControlPointOffsetOne =		X:0 Y:0 Z:0	; Offset from center point of flood.
			ControlPointOffsetTwo  =	X:-100 Y:-100 Z:0
			ControlPointOffsetThree =	X:100 Y:-100 Z:0
			ControlPointOffsetFour  =	X:100 Y:100 Z:0
			MemberSpeed = 20
		End

		FloodMember
			MemberTemplateName = FloodHorse
			ControlPointOffsetOne =		X:0 Y:0 Z:0
			ControlPointOffsetTwo  =	X:-100 Y:0 Z:0
			ControlPointOffsetThree =	X:-100 Y:-100 Z:0
			ControlPointOffsetFour  =	X:100 Y:-100 Z:0
			MemberSpeed = 20
		End

		FloodMember
			MemberTemplateName = FloodHorse
			ControlPointOffsetOne =		X:0 Y:0 Z:0
			ControlPointOffsetTwo  =	X:-100 Y:100 Z:0
			ControlPointOffsetThree =	X:-100 Y:-100 Z:0
			ControlPointOffsetFour  =	X:100 Y:-100 Z:0
			MemberSpeed = 20
		End

		FloodMember
			MemberTemplateName = FloodHorse
			ControlPointOffsetOne =		X:0 Y:0 Z:0
			ControlPointOffsetTwo  =	X:0 Y:100 Z:0
			ControlPointOffsetThree =	X:-100 Y:100 Z:0
			ControlPointOffsetFour  =	X:-100 Y:-100 Z:0
			MemberSpeed = 20
		End
		FloodMember
			MemberTemplateName = FloodHorse
			ControlPointOffsetOne =		X:0 Y:0 Z:0
			ControlPointOffsetTwo  =	X:100 Y:100 Z:0
			ControlPointOffsetThree =	X:-100 Y:100 Z:0
			ControlPointOffsetFour  =	X:-100 Y:-100 Z:0
			MemberSpeed = 20
		End

		FloodMember
			MemberTemplateName = FloodHorse
			ControlPointOffsetOne =		X:0 Y:0 Z:0
			ControlPointOffsetTwo  =	X:100 Y:0 Z:0
			ControlPointOffsetThree =	X:100 Y:100 Z:0
			ControlPointOffsetFour  =	X:-100 Y:100 Z:0
			MemberSpeed = 20
		End



		FloodMember
			MemberTemplateName = FloodHorse
			ControlPointOffsetOne =		X:00 Y:0 Z:0	; Offset from center point of flood.
			ControlPointOffsetTwo  =	X:100 Y:-100 Z:0
			ControlPointOffsetThree =	X:100 Y:100 Z:0
			ControlPointOffsetFour  =	X:-100 Y:100 Z:0
			MemberSpeed = 20
		End

		FloodMember
			MemberTemplateName = FloodHorse
			ControlPointOffsetOne =		X:0 Y:0 Z:0
			ControlPointOffsetTwo  =	X:0 Y:-100 Z:0
			ControlPointOffsetThree =	X:100 Y:-100 Z:0
			ControlPointOffsetFour  =	X:100 Y:100 Z:0
			MemberSpeed = 20
		End
	End
End
End
Object SummonedDragon;;c
Scale = 0.8
RemoveModule ModuleTag_LifetimeUpdate;;;;;;MUAttkTroll.tga
End;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Armor NewUrukArmor
  Armor = DEFAULT         	 70%   	; 100%	originally 100%
  Armor = SLASH           	 10%   	; 100%	originally 100%
  Armor = PIERCE           	 10%   	;  50%	originally 15
  Armor = FLAME           	1%   	;  30%
  Armor = MAGIC           	10%   	;
  Armor = HERO            	40%   	;
  Armor = HERO_RANGED     	500%   	; 
  Armor = STRUCTURAL	  	 50%	; 	originally 100%
  FlankedPenalty 	       = 50%  
End
Object IsengardFighter
ArmorSet
		Conditions      = None
		Armor           = NewUrukArmor
		DamageFX        = NormalDamageFX
	End
End
Object IsengardBeserker
ShockwaveResistance = SHOCKWAVE_RESISTANCE_IMMUNE
End
ExperienceLevel	AragornLevelMP4
	TargetNames						=	ARAGORN	
	RequiredExperience				=	ARAGORN_LVL4_EXP_NEEDED
	ExperienceAward					=	ARAGORN_LVL4_EXP_AWARD 	
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Rank							=	4
	Upgrades						=	Upgrade_LegolasArrowWind
	AttributeModifiers				=	HeroLevelUpDamage3
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40
		MaxRadius					=	200
		MaxSelectedUnits			=	40
	End	
End	

ExperienceLevel	AragornLevelMP6
	TargetNames						=	ARAGORN	
	RequiredExperience				=	ARAGORN_LVL6_EXP_NEEDED
	ExperienceAward					=	ARAGORN_LVL6_EXP_AWARD 	
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Rank							=	6
	AttributeModifiers				=	HeroLevelUpDamage5
	Upgrades						=	Upgrade_CreateAHeroShieldCrush_Level3
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%
		OpacityMax					=	100%
		MinRadius					=	40
		MaxRadius					=	200
		MaxSelectedUnits			=	40
	End	
End	

ExperienceLevel	AragornLevelMP7
	TargetNames						=	ARAGORN	
	RequiredExperience				=	ARAGORN_LVL7_EXP_NEEDED
	ExperienceAward					=	ARAGORN_LVL7_EXP_AWARD 	
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Rank							=	7
	AttributeModifiers				=	HeroLevelUpDamage6
	Upgrades						=	Upgrade_TheodenGloriousCharge
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40
		MaxRadius					=	200
		MaxSelectedUnits			=	40
	End	
End	


ExperienceLevel	AragornLevelMP10
	TargetNames						=	ARAGORN	
	RequiredExperience				=	ARAGORN_LVL10_EXP_NEEDED
	ExperienceAward					=	ARAGORN_LVL10_EXP_AWARD
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Rank							=	10
	Upgrades						=	Upgrade_CreateAHeroFireBall_Level3
	AttributeModifiers				=	HeroLevelUpDamage9
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40
		MaxRadius					=	200
		MaxSelectedUnits			=	40
	End	
End
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ModifierList NewAragornBladeMaster;;;;;;;;;;;
;;;;;;;;Category = SPELL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	Modifier = ARMOR 10%			// Additive.  Sum of these are subtracted from all entries in Armor.ini
	Modifier = DAMAGE_MULT 500%		
	Modifier = SPEED 200%// Multiplicitive.  Damage multiplied by this, will compound in multiple bonuses
	Duration = 30000			// lasts for 30 seconds
End
//--------------------------------------------------------------------------
ModifierList 1CreateAHeroInvulnerabilityBonus_Level3
	Category	 = SPELL
	Modifier	 = INVULNERABLE CREATE_A_HERO_INVULNERABILITY_MODIFIER
	Duration	 = 35000					// Matches RefreshRate of giving	module
	FX			 = FX_ThranDeadEye	 

End
ModifierList NewCreateAHeroShieldCrush_Level3
	Category	 = FORMATION	//	It's not really a formation, but I don't know what else to call it
	
	Modifier	 = ARMOR 0% PIERCE HERO_RANGED CAVALRY_RANGED STRUCTURAL
	Modifier	 = INVULNERABLE 0% PIERCE HERO_RANGED CAVALRY_RANGED STRUCTURAL
	

	Modifier	 = CRUSHER_LEVEL 3
	Modifier	 = CRUSH_DECELERATE 0%
	Modifier = SPEED 200%
	Duration	 = 20000					// Matches RefreshRate of giving	module
	FX			 = FX_CAHShieldCrush02	 
	//FX2			 = FX_GenericLeadership30
	//FX3			 = FX_GenericLeadership30
	//MultiLevelFX = Yes
End
ModifierList NewGothmogIronHand
	Modifier					= ARMOR 25%
	Modifier					= DAMAGE_MULT 200%
	FX		= FX_GenericLeadership30;;;FX_TheodenFollowerFX
End
FXParticleSystem AragornSwordNorm
  System
    Priority = VERY_LOW_OR_ABOVE
    ParticleName = EXLnzFlar6.tga
    Lifetime = 15 15
    SystemLifetime = 900
    SortLevel = 1
    Size = 10 15
    BurstCount = 1 1
  End
  Color = DefaultColor
    Color1 = R:0 G:0 B:185 0
    Color2 = R:0 G:0 B:185 10
  End
  Update = DefaultUpdate
    SizeRate = 2 5
    SizeRateDamping = 0.8 0.7
    AngleZ = -3 3
    AngularDamping = 1 1
    AngularDampingXY = 1 1
  End
  Physics = DefaultPhysics
    Gravity = 0.08
    VelocityDamping = 0.8 0.85
  End
  EmissionVelocity = OutwardEmissionVelocity
  End
  EmissionVolume = LineEmissionVolume
    StartPoint = X:0 Y:0 Z:4
    EndPoint = X:0 Y:0 Z:14
  End
  Draw = DefaultDraw
  End
End
FXParticleSystem ArrowStormNew;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	System
		Priority = ALWAYS_RENDER
		ParticleName = extornadoswirl.tga
		SystemLifetime = -74.81601
		InitialDelay = 0 0
		Lifetime = 30 30
		Size = 10 30
		BurstCount = 100 100
		BurstDelay = 10 30
		IsOneShot = Yes
	End
	Color = DefaultColor
		Color1 = R:62 G:41 B:0 0
		Color2 = R:62 G:41 B:0 40
	End
	Alpha = DefaultAlpha
		Alpha1 = 1 1 0
		Alpha2 = 0 0 30
	End
	Update = DefaultUpdate
		SizeRate = -0.9 -0.5
		SizeRateDamping = 1.01 1.01
		AngleZ = 10 10
		AngularRateZ = 10 10
		AngularDamping = 1 1
	End
	Physics = DefaultPhysics
		VelocityDamping = 1.05 1.05
		Gravity = 0 0
		DriftVelocity = X:0 Y:0 Z:0
	End
	EmissionVelocity = CylindricalEmissionVelocity
		Radial = 0.5 0.9
		Normal = 0 0.1
	End
	EmissionVolume = CylinderEmissionVolume
		Offset = X:0 Y:0 Z:0
		Radius = 5
		Length = 0
	End
	Draw = DefaultDraw
	End
End
FXList FX_ArrowStormNew
Sound
    Name = FirebombThrow
  End
ParticleSystem
		Name = CorsairFireBombExplosionGlow
	End
ParticleSystem
		Name = FirebombFlash
	End
ParticleSystem
  Name = ArrowStormNew
   Offset = X:0.0 Y:0.0 Z:20
End
End;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;CHANGE GIMLIMASTERHIT;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
FXParticleSystem TheoMaster;;;;;;;;;;;;;;;;;;;
	System
		Priority = ALWAYS_RENDER
		Shader = ADDITIVE
		ParticleName = exsplathaze.tga
		SystemLifetime = 0
		InitialDelay = 0 0
		SortLevel = 1
		Lifetime = 15 15
		Size = 10 15
		BurstCount = 50 50
		BurstDelay = 31 31
	End
	Color = DefaultColor
		Color1 = R:198 G:198 B:0 0
		Color2 = R:255 G:255 B:255 40
	End
	Alpha = DefaultAlpha
		Alpha1 = 1 1 0
		Alpha2 = 0 0 30
	End
	Update = DefaultUpdate
		SizeRate = 1 1
		SizeRateDamping = 1 1
		AngleZ = 0 7
		AngularRateZ = -0.1 -0.1
		AngularDamping = 1 1
	End
	Physics = DefaultPhysics
		VelocityDamping = 1 1
		Gravity = -0.01 0
		DriftVelocity = X:0 Y:0 Z:0
	End
	EmissionVelocity = OutwardEmissionVelocity
		Speed = 4 4
	End
	EmissionVolume = SphereEmissionVolume
		Radius = 10
	End
	Draw = DefaultDraw
	End
End
FXParticleSystem GamBladeMaster
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXRing01.tga
    Lifetime = 15 15
    SortLevel = 1
    Size = 10 15
    BurstCount = 1 1
  End
  Color = DefaultColor
    Color2 = R:84 G:66 B:10 5
    Color3 = R:0 G:0 B:0 15
    Color4 = R:84 G:66 B:10 0
  End
  Update = DefaultUpdate
    SizeRate = 1 1
    SizeRateDamping = 1 1
    AngleZ = 0 7
    AngularRateZ = -0.1 0.1
    AngularDamping = 1 1
    AngularDampingXY = 1 1
  End
  Physics = DefaultPhysics
    Gravity = -0.01
    VelocityDamping = 1 1
  End
  EmissionVelocity = OutwardEmissionVelocity
  End
  EmissionVolume = SphereEmissionVolume
    Radius = 10
  End
  Draw = DefaultDraw
  End
End;;><><><><><><><><><><><>
;OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO;
;BUTTONS----------------------------------------------------------------;
;OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOo;
CommandButton Command_SpellBookEarthquake
  Command                 = SPECIAL_POWER 
  SpecialPower            = SpecialAbilityWordOfPower
  Options                 = NONE
  TextLabel               = CONTROLBAR:Grudge
  ButtonImage             = SBGood_Earthquake
  ButtonBorderType        = ACTION 
  DescriptLabel           = CONTROLBAR:ToolTipGrudge
  AutoAbility			  = Yes
  PresetRange			  = 120.0
  InPalantir			  = Yes
End
CommandButton Command_GothmogIronHand						; Added for BFME2 Expansion
  Command                 	= SPECIAL_POWER
  SpecialPower            	= SpecialAbilityFakeLeadership
  Options			= NONPRESSABLE
  TextLabel               	= CONTROLBAR:GamLoyal
  ButtonImage            	= HSKingDainStubbornPride
  RadiusCursorType        	= IronHandRadiusCursor ;SpeechCraftRadiusCursor
  ButtonBorderType        	= ACTION
  DescriptLabel           	= CONTROLBAR:ToolTipGamLoyal
  InPalantir		  	= Yes
End
CommandButton Command_RohanGimliLeap
  Command			= SPECIAL_POWER 
  SpecialPower			= SpecialAbilityGimliLeap
  Options			= NEED_TARGET_POS CONTEXTMODE_COMMAND
  TextLabel			= CONTROLBAR:NewGimliLeap
  ButtonImage			= HSGimliLeap
  RadiusCursorType		= LeapRadiusCursor
  CursorName			= Bombard
  ButtonBorderType		= ACTION 
  DescriptLabel			= CONTROLBAR:ToolTipNewGimliLeap
  InPalantir			= Yes
End
CommandButton Command_CreateAHero_Sapper_Level3
  Command			= SPECIAL_POWER 
  SpecialPower		= SpecialAbilityAragornBladeMaster
  Options			= NONE// NEED_TARGET_NEUTRAL_OBJECT CONTEXTMODE_COMMAND
  TextLabel			= CONTROLBAR:HelmsHammer
  ButtonImage		= HSSapper
  CursorName		= Bombard
  ButtonBorderType	= ACTION 
  DescriptLabel		= CONTROLBAR:ToolTipHelmsHammer
  InvalidCursorName	= GenericInvalid
  //UnitSpecificSound	= EomerVoiceModeThrow
  InPalantir		= Yes
  AutoAbility		= Yes
  PresetRange		= 200.0
End
CommandButton Command_RohanEomerHorseLordLeadership
  Command                 = SPECIAL_POWER
  SpecialPower            = SpecialAbilityCreateAHeroShieldCrush_Level3
  Options				  = NONE
  TextLabel               = CONTROLBAR:HorseMaster
  ButtonImage             = HSEomerLeadership
  RadiusCursorType        = TrainingRadiusCursor
  ButtonBorderType        = ACTION
  DescriptLabel           = CONTROLBAR:ToolTipHorseMaster
  InPalantir		  = Yes
End
CommandButton Command_SpellBookHeal
	Command				= SPECIAL_POWER
	SpecialPower		= SpecialAbilityElrondRestoration
	TextLabel			= CONTROLBAR:TheHeal
	DescriptLabel		= CONTROLBAR:ToolTipTheHeal
	ButtonImage			= SBGood_Heal
	Options				= NEED_TARGET_POS
	ButtonBorderType	= ACTION
	RadiusCursorType	= HealRadiusCursor
	InPalantir			= Yes
	CommandTrigger		= Command_SpecialAbilityElrondRestorationHeal
End
CommandButton Command_Disguise
  Command                 = SPECIAL_POWER
  SpecialPower            = SpecialAbilityCreateAHeroInvulnerability_Level3
;  Options                 = 
  TextLabel               = CONTROLBAR:ArmorOfAncestors
  ButtonImage             = HSEowynDisguise
  ButtonBorderType        = ACTION 
  DescriptLabel           = CONTROLBAR:ToolTipArmorOfAncestors
  InPalantir              = Yes
  ; UnitSpecificSound       = EowynVoiceDisguiseOn EowynVoiceDisguiseOff Played by SpecialDisguiseUpdate's stuff, can't toggle right here
End
CommandButton Command_SpecialAbilityTheodenGloriousCharge
  Command                 	= SPECIAL_POWER
  Options                 	= NONE
  SpecialPower            	= SpecialAbilityAragornBladeMaster
  TextLabel               	= CONTROLBAR:TheoMaster
  ButtonImage             	= HPTheodenGloriousCharge
  RadiusCursorType        	= TrainingRadiusCursor
  ;Upgrade			= Upgrade_TheodenGloriousCharge
  ButtonBorderType        	= ACTION
  DescriptLabel          	= CONTROLBAR:ToolTipTheoMaster
  InPalantir		      	= Yes
  AutoAbility			= Yes
  PresetRange			= 160.0
  UnitSpecificSound       	= TheodenVoiceGloriousCharge
End
CommandButton Command_PurchaseSpellRohanAllies
	Command                 = SPECIAL_POWER
  	SpecialPower            = SpecialAbilityCallPack
  	Options                 = NEED_TARGET_POS CONTEXTMODE_COMMAND
	RadiusCursorType        = CallThePackRadiusCursor
  	TextLabel               = CONTROLBAR:SummonRohan
  	ButtonBorderType        = ACTION
  	DescriptLabel           = CONTROLBAR:ToolTipSummonRohan
  	InPalantir              = Yes
End
CommandButton Command_SpecialAbilitySummonHillmen1
  Command           = SPECIAL_POWER
  SpecialPower      = SpecialAbilityHwaldarSummonHillmen1
  TextLabel         = CONTROLBAR:GamGuard
  ButtonImage       = HISummonHillmenIcon
  Options           = NEED_TARGET_POS CONTEXTMODE_COMMAND
  RadiusCursorType  = SummonWildmen2RadiusCursor ;SummonOathBreakersRadiusCursor
  CursorName        = Bombard
  InvalidCursorName = GenericInvalid  
  ButtonBorderType  = ACTION 
  DescriptLabel     = CONTROLBAR:ToolTipGamGuard
  InPalantir	    = Yes
End
CommandButton Command_LegolasKnifeFightingMode
	Command				= SPECIAL_POWER 
	SpecialPower			= SpecialAbilityAragornBladeMaster
	TextLabel			= CONTROLBAR:HaldirMaster
	ButtonImage			= HSLegolasKnifeFighter
	ButtonBorderType		= ACTION 
	DescriptLabel			= CONTROLBAR:ToolTipHaldirMaster
	InPalantir			= Yes
	AutoAbility			= Yes
	UnitSpecificSound		= BalrogVoiceAttack
	DisableOnModelCondition 	= WEAPONLOCK_SECONDARY
End
CommandButton Command_SpecialAbilitySlayer
	Command			= SPECIAL_POWER 
	SpecialPower		= SpecialAbilityAragornBladeMaster
	TextLabel		= CONTROLBAR:Slayer
	ButtonImage		= HSGimliSlayer
	ButtonBorderType	= ACTION 
	DescriptLabel		= CONTROLBAR:ToolTipSlayer
	UnitSpecificSound	= GimliModeSlayerMS
	InPalantir		= Yes
	AutoAbility		= Yes
	DisableOnModelCondition 	= WEAPONLOCK_SECONDARY
End
CommandButton Command_SpellBookRainOfFire;;DONE
  Command                 = SPECIAL_POWER 
  SpecialPower            = SpecialAbilityCreateAHeroWordOfPower
  Options                 = NONE CONTEXTMODE_COMMAND
  TextLabel               = CONTROLBAR:HaldirWOP
  ButtonImage             = SBEvil_RainofFire;HSGandalfWordOfPower
  ButtonBorderType        = ACTION 
  DescriptLabel           = CONTROLBAR:ToolTipHaldirWOP
  AutoAbility			  = Yes
  PresetRange			  = 120.0
  InPalantir			  = Yes
  UnitSpecificSound = HaldirVoiceAttackCharge
End
CommandButton Command_SpecialAbilityHornOfGondor;;DONE
  Command                 = SPECIAL_POWER 
  SpecialPower            = SpecialAbilityHornOfGondor
  Options                 = NONE;CONTEXTMODE_COMMAND
  TextLabel               = CONTROLBAR:Helmforrahon
  ButtonImage             = HSBorimirHornOfGondor
  ButtonBorderType        = ACTION 
  DescriptLabel           = CONTROLBAR:ToolTiphelmforrahon
  ;UnitSpecificSound      = 
  InPalantir			  = Yes
  AutoAbility			  = Yes
  PresetRange			  = 60.0  
End
CommandButton Command_SpecialAbilityArrowStorm
  Command                 	= SPECIAL_POWER 
  SpecialPower            	= SpecialAbilityArrowStorm
  Options                 	= NEED_TARGET_POS CONTEXTMODE_COMMAND
  TextLabel               	= CONTROLBAR:GoldArrows
  ButtonImage             	= HSLegolasArrowWind
  CursorName              	= Bombard
  RadiusCursorType        	= ArrowStormRadiusCursor
  InvalidCursorName       	= GenericInvalid
  ButtonBorderType        	= ACTION 
  DescriptLabel           	= CONTROLBAR:ToolTipArrowWind
  InPalantir			= Yes
  AutoAbility			= Yes
End
CommandButton Command_GimliAxeThrow;;;;;;;UnitSpecificSound		= LegolasKnifeModeMS
	Command				= TOGGLE_WEAPONSET
	Options				= TOGGLE_IMAGE_ON_WEAPONSET OK_FOR_MULTI_SELECT
	FlagsUsedForToggle	= WEAPONSET_TOGGLE_1
	TextLabel           = CONTROLBAR:gimax
	ButtonImage         = UCElven_Bow UCElven_Sword
	ButtonBorderType    = ACTION 
	DescriptLabel       = CONTROLBAR:ToolTipgimax
	InPalantir			= Yes
	UnitSpecificSound   = GimliVoiceAttackCharge 
End
CommandButton Command_ToggleDamrodWeapon
	Command			=	TOGGLE_WEAPONSET
	Options			=	UNMOUNTED_ONLY TOGGLE_IMAGE_ON_WEAPONSET
	FlagsUsedForToggle	=	WEAPONSET_TOGGLE_1
	TextLabel               =	CONTROLBAR:ToggleFaramirWeapons
	ButtonImage             =	HSFaramirSword HSFaramirBow 
	ButtonBorderType        =	ACTION 
	DescriptLabel           =	CONTROLBAR:ToolTipToggleFaramirWeapons
	InPalantir		=	Yes
	UnitSpecificSound		= LegolasKnifeModeMS
End
;-------------------------------------------------------
;TIMERS TIMERS TIMERS TIMERS TIMERS TIMERS TIMERS
;-------------------------------------------------------
SpecialPower SpecialAbilitySmite
	Enum			= SPECIAL_SMITE_CANCELDISGUISE
	ReloadTime		= 140000 ; in milliseconds
	;InitiateSound	= EomerSmiteSpearFly			;won't work because Eowyn also shares this
End
SpecialPower SpecialAbilityHaldirGoldenArrow
	Enum						= SPECIAL_WOUND_ARROW
	ReloadTime					= 180000
	InitiateSound				= HaldirGoldenArrowShoot
End
SpecialPower SpecialAbilityAragornAthelas
	Enum						   = SPECIAL_ATHELAS
	ReloadTime					   = 24000
	RadiusCursorRadius			   = 150.0
	InitiateAtLocationSound		   = AragornAthelesEffect
End
SpecialPower SpecialAbilityAragornBladeMaster
	Enum					   = SPECIAL_HERO_MODE
	ReloadTime				   = 170000	;60000
End
SpecialPower SpecialAbilityElrondRestoration
	Enum					= SPECIAL_GENERAL_TARGETLESS
	RadiusCursorRadius		= 150
	ReloadTime				= 170000
End
SpecialPower SpecialAbilityArrowStorm
  Enum              = SPECIAL_ARROW_STORM
  ReloadTime        = 60000 ; in milliseconds
  RadiusCursorRadius = 200.0 ;Changing this??? Don't, unless you are changing ArrowStormUpdate's TargetRadius. They need to match.
  ;InitiateAtLocationSound = GenericSpell
	ViewObjectDuration = 5000
	ViewObjectRange = 120
End
SpecialPower SpecialAbilityCallPack
  Enum					= SPECIAL_PERSONAL_FLOOD
  ReloadTime			= 30000 ; in milliseconds
  RadiusCursorRadius	= 100
	;InitiateAtLocationSound	= AragornAthelesEffect
End
SpecialPower SpellBookRohanAllies
	Enum			= SPECIAL_SPELL_BOOK_ROHAN_ALLIES
	ReloadTime      	= 30000 ; in milliseconds
	InitiateAtLocationSound = SpellRohirrimSummonMS
	RadiusCursorRadius	= 50.0 ;150.0
	Flags					= NO_FORBIDDEN_OBJECTS RESPECT_RECHARGE_TIME_DISCOUNT
	ForbiddenObjectFilter	= NO_SUMMON_NEAR_OBJECT_FILTER
	ForbiddenObjectRange	= 110.0
End;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Armor NewRohirrimArmor
  Armor = DEFAULT         	 80%   	; 100%	originally 100%
  Armor = SLASH           	 1%   	; 100%	originally 80%
  Armor = PIERCE          	 1%   	; 100%	originally 50%		RotWK originally 60%
  Armor = SPECIALIST      	50%   	; 200%	originally 200%
  Armor = CRUSH           	  1%   	; 100%
  Armor = SIEGE           	100%   	;
  Armor = FLAME           	10%   	;  Vs uruk captain
  Armor = FROST          	100%   ;
  Armor = MAGIC           	100%   	;
  Armor = HERO            	10%   	; 
  FlankedPenalty 	       = 50%    
End;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Weapon RohanGimliAxeThrown ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	AttackRange         = GIMLI_THROW_RANGE
	WeaponSpeed = 161         ; dist/sec 
	MinWeaponSpeed = 201
	MaxWeaponSpeed = 241      ; dist/sec Upper limit on scaling, when attacking past nominal "max" range
	FireFX = FX_GimliAxeThrow
	ScaleWeaponSpeed = Yes ; Used for lob weapons, scales speed proportional to range
	HitPercentage = 100
	ScatterRadius     = 0.0      ;When this weapon misses it can randomly miss by as much as this distance.
	DelayBetweenShots = 0        ; time between shots, msec
  	
    AntiAirborneVehicle	= Yes ; added so he can attack fellbeast and birds
    AntiAirborneMonster	= Yes ; added so he can attack fellbeast and birds
  	
  	ClipSize			= 1			; how many shots in a Clip (0 == infinite)
	ClipReloadTime		= 1200     ; how long to reload a Clip, msec
	AutoReloadsClip		= Yes
	;IdleAfterFiringDelay = 2500;
	;HoldAfterFiringDelay = 2500 ; So I don't move while the weapon needs to complete
    InstantLoadClipOnActivate = Yes

	PreAttackDelay        = 1400; 1500             ; 1467 is the prep time for archer.
	PreAttackType         = PER_SHOT ; Do the delay each time we attack a new target
	FiringDuration      = 1600; 1567    ; Duration of the archer firing shot is 500ms.

	ProjectileNugget
		ProjectileTemplateName = GimliAxeProjectile
		WarheadTemplateName = RohanGimliAxeThrownWarhead
	End
End
SpecialPower SpecialAbilityGimliAxe
	Enum			= SPECIAL_AT_VISIBLE_OBJECT
	ReloadTime		= 0
End;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;/\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
;;FXParticleSystem GandalfLightningHitDistortion;/\\//\/\/\\//\/\/\\//\/\/
  ;;System;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
FXParticleSystem AODFlame
  System
    Priority = ALWAYS_RENDER
    Shader = W3D_EMISSIVE
    Type = DRAWABLE
    ParticleName = exlightshafts01.w3d
    Lifetime = 1500 1500
    SystemLifetime = 15
    StartSizeRate = 0.2 0.2
    BurstCount = 1 1
  End
  Color = DefaultColor
    Color2 = R:84 G:66 B:10 5
    Color3 = R:0 G:0 B:0 15
    Color4 = R:84 G:66 B:10 0
  End
  Alpha = DefaultAlpha
    Alpha1 = 0.3 0.3 0
  End
  Update = DefaultUpdate
    SizeRate = 0.5 0.5
    SizeRateDamping = 1 1
    AngleZ = -100 100
    AngularRateZ = -0.1 0.1
    AngularDamping = 0.97 0.97
    Rotation = ROTATE_Z
  End
  Physics = DefaultPhysics
    VelocityDamping = 1 1
  End
  EmissionVelocity = OrthoEmissionVelocity
  End
  EmissionVolume = PointEmissionVolume
  End
  Draw = RenderObjectDraw
  End
End

FXParticleSystem AODShafts
  System
    Priority = ALWAYS_RENDER
    Shader = W3D_EMISSIVE
    Type = DRAWABLE
    ParticleName = exlight01.w3d
    Lifetime = 1500 1500
    SystemLifetime = 15
    StartSizeRate = 0.2 0.2
    BurstCount = 1 1
  End
  Color = DefaultColor
    Color2 = R:84 G:66 B:10 5
    Color3 = R:0 G:0 B:0 15
    Color4 = R:84 G:66 B:10 0
  End
  Alpha = DefaultAlpha
    Alpha1 = 0.3 0.3 0
  End
  Update = DefaultUpdate
    SizeRate = 0.5 0.5
    SizeRateDamping = 1 1
    AngleZ = -100 100
    AngularRateZ = -0.1 0.1
    AngularDamping = 0.97 0.97
    Rotation = ROTATE_Z
  End
  Physics = DefaultPhysics
    VelocityDamping = 1 1
  End
  EmissionVelocity = OrthoEmissionVelocity
  End
  EmissionVolume = PointEmissionVolume
  End
  Draw = RenderObjectDraw
  End
End
FXList FX_AODBlade
  ParticleSystem
    Name = AODFlame
    Offset = X:0.0 Y:0.0 Z:5.0
  End
  ParticleSystem
    Name = AODShafts
    Offset = X:0.0 Y:0.0 Z:5.0
  End
  Sound
    Name = GandalfBlastWeapon
  End
End
FXParticleSystem HaldirSwordglow
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXSplatHaze.tga
    Lifetime = 10 10
    SortLevel = 1
    Size = 0 10
    BurstCount = 4 6
    InitialDelay = 5 5
    IsParticleUpTowardsEmitter = Yes
  End
  Color = DefaultColor
    Color2 = R:185 G:106 B:40 5
    Color3 = R:40 G:106 B:185 20
  End
  Update = DefaultUpdate
    SizeRate = -0.25 -0.25
    SizeRateDamping = 1 1
    AngleZ = -7 7
    AngularDamping = 1 1
  End
  Physics = DefaultPhysics
    VelocityDamping = 1 1
  End
  EmissionVelocity = OrthoEmissionVelocity
  End
  EmissionVolume = LineEmissionVolume
    EndPoint = X:0 Y:0 Z:15
  End
  Draw = DefaultDraw
  End
End
FXParticleSystem AragornBodyGlow
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXdebuff.tga
    Lifetime = 30 30
    SortLevel = 1
    BurstDelay = 1 1
    Size = 2 4
    BurstCount = 1 1
    IsGroundAligned = Yes
  End
  Color = DefaultColor
    Color2 = R:205 G:255 B:205 10
    Color3 = R:0 G:0 B:0 20
  End
  Alpha = DefaultAlpha
    Alpha1 = 1 1 0
  End
  Update = DefaultUpdate
    SizeRate = 4.5 4.5
    SizeRateDamping = 0.7 0.8
    AngleZ = -7 7
    AngularRateZ = -0.2 0.2
    AngularDamping = 1 1
    AngularDampingXY = 1 1
  End
  Physics = DefaultPhysics
    VelocityDamping = 1 1
  End
  EmissionVelocity = OrthoEmissionVelocity
  End
  EmissionVolume = LineEmissionVolume
    EndPoint = X:0 Y:0 Z:25
  End
  Draw = DefaultDraw
  End
End
FXParticleSystem LegoSlayer
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXFire03.tga  
    Lifetime = 5 10
    SortLevel = 1
    Size = 2 5
    BurstCount = 1 1
    BurstDelay = 0.8 0.8
    IsParticleUpTowardsEmitter = Yes
  End
  Color = DefaultColor
    Color1 = R:85 G:100 B:100 0
    Color2 = R:60 G:75 B:75 15
    Color3 = R:90 G:80 B:70 40
    Color4 = R:0 G:0 B:0 80
    ColorScale = -40 40
  End
  Alpha = DefaultAlpha
    Alpha1 = 0.5 0.8 1
  End
  Update = DefaultUpdate
    SizeRate = -0.25 -0.25
    SizeRateDamping = 1 1
    AngleZ = -7 7
    AngularDamping = 1 1
  End
  Physics = DefaultPhysics
    Gravity = -0.01
    VelocityDamping = 1 1
  End
  EmissionVelocity = OrthoEmissionVelocity
  End
  EmissionVolume = LineEmissionVolume
    EndPoint = X:9 Y:0 Z:0
  End
  Draw = DefaultDraw
  End
End
FXParticleSystem HaldirGoldArrowTrail
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXSplatHaze.tga
    Lifetime = 30 30
    SortLevel = 1
    Size = 0 15
    BurstCount = 5 10
    IsParticleUpTowardsEmitter = Yes
  End
  Color = DefaultColor
    Color2 = R:255 G:86 B:72 5
    Color3 = R:0 G:0 B:0 30
  End
  Update = DefaultUpdate
    SizeRate = -0.25 -0.2
    SizeRateDamping = 1 1
    AngleZ = -7 7
    AngularDamping = 1 1
    AngularDampingXY = 1 1
  End
  Physics = DefaultPhysics
    Gravity = -0.01
    VelocityDamping = 1 1
    DriftVelocity = X:0 Y:0 Z:-0.1
  End
  EmissionVelocity = OrthoEmissionVelocity
    Z = 0 -0.1
  End
  EmissionVolume = SphereEmissionVolume
    Radius = 10
  End
  Draw = DefaultDraw
  End
End
FXParticleSystem ArrowAirFire
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXFire01.tga
    Lifetime = 20 20
    SystemLifetime = 2
    SortLevel = 1
    Size = 4 4
    BurstCount = 1 1
  End
  Color = DefaultColor
    Color2 = R:255 G:255 B:255 8
    Color3 = R:0 G:0 B:4 0
  End
  Alpha = DefaultAlpha
    Alpha3 = 60 60 0
  End
  Update = DefaultUpdate
    SizeRate = 9 9
    SizeRateDamping = 0.9 0.9
    AngularRateZ = -0.1 0.1
    AngularDamping = 0.9 0.9
  End
  Physics = DefaultPhysics
    VelocityDamping = 0.8 0.8
  End
  EmissionVelocity = OutwardEmissionVelocity
  End
  EmissionVolume = PointEmissionVolume
    IsHollow = Yes
  End
  Draw = DefaultDraw
  End
End
FXParticleSystem ArrowWaveBlastDust
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXRing01.tga
    Lifetime = 30 30
    SystemLifetime = 2
    Size = 1 1
    BurstCount = 1 1
    IsGroundAligned = Yes
  End
  Color = DefaultColor
    Color1 = R:255 G:255 B:255 0
    Color2 = R:0 G:0 B:0 40
    ColorScale = -5 0
  End
  Update = DefaultUpdate
    SizeRate = 5 5
    SizeRateDamping = 1 1
    AngleZ = -1 1
    AngularDamping = 1 1
  End
  Physics = DefaultPhysics
    VelocityDamping = 0.8 0.8
  End
  EmissionVelocity = OutwardEmissionVelocity
  End
  EmissionVolume = PointEmissionVolume
    IsHollow = Yes
  End
  Draw = DefaultDraw
  End
End
FXParticleSystem ArrowWaveBlastHeat
  System
    Priority = ALWAYS_RENDER
    Shader = ALPHA
    ParticleName = SMUDGE.tga
    Lifetime = 150 150
    SystemLifetime = 1
    Size = 80 80
    BurstCount = 3 3
  End
  Color = DefaultColor
    Color1 = R:255 G:255 B:255 0
  End
  Alpha = DefaultAlpha
    Alpha1 = 4 3 3
  End
  Update = DefaultUpdate
    SizeRate = 5 5
    SizeRateDamping = 0.9 0.95
    AngleZ = 0.0025 0.005
    AngularDamping = 1 1
  End
  Physics = DefaultPhysics
    VelocityDamping = 0.96 0.97
  End
  EmissionVelocity = OrthoEmissionVelocity
    X = -2 2
    Z = -1 1
  End
  EmissionVolume = BoxEmissionVolume
    IsHollow = Yes
    HalfSize = X:20 Y:20 Z:0
  End
  Draw = DefaultDraw
  End
End
FXList FX_HaldirMagicArrowHit
  ParticleSystem
    Name = ArrowWaveBlastDust
     OrientToObject = Yes
    InitialDelay = 2000 2000 UNIFORM   ;In milliseconds
    Offset = X:0.0 Y:0.0 Z:3.0
  End
  ParticleSystem
    Name = ArrowWaveBlastHeat
     OrientToObject = Yes
    InitialDelay = 7000 7000 UNIFORM   ;In milliseconds
    Offset = X:0.0 Y:0.0 Z:0.0
  End
  ParticleSystem
    Name = ArrowAirFire
     OrientToObject = Yes
    InitialDelay = 1 1 UNIFORM   ;In milliseconds
    Offset = X:0.0 Y:0.0 Z:0.0
  End
End
FXParticleSystem RingOfFire1 ;MeteorExp
  System
    Priority = ALWAYS_RENDER
    IsOneShot = Yes
    ParticleName = EXexplo03.tga
    Lifetime = 50 50
    SystemLifetime = 75
    Size = 50 80
    BurstCount = 5 5
    InitialDelay = 5 5
  End
  Color = DefaultColor
    Color2 = R:92 G:85 B:67 5
    Color3 = R:0 G:0 B:0 50
  End
  Alpha = DefaultAlpha
    Alpha2 = 0.75 1 5
    Alpha3 = -0.5 0 10
  End
  Update = DefaultUpdate
    SizeRate = 5 10
    SizeRateDamping = 0.9 0.95
    AngleZ = -7 7
    AngularDamping = 1 1
    AngularDampingXY = 1 1
  End
  Physics = DefaultPhysics
    VelocityDamping = 1 1
  End
  EmissionVelocity = OrthoEmissionVelocity
  End
  EmissionVolume = CylinderEmissionVolume
    IsHollow = Yes
    RadiusRate = 5
    Offset = X:0 Y:0 Z:6
  End
  Draw = DefaultDraw
  End
End
FXParticleSystem RingOfFire2 ;MeteorExp02
  System
    Priority = ALWAYS_RENDER
    IsOneShot = Yes
    Shader = ALPHA
    ParticleName = EXfireballJ.tga
    Lifetime = 35 35
    SystemLifetime = 55
    Size = 15 30
    BurstCount = 8 8
    InitialDelay = 10 10
  End
  Color = DefaultColor
    Color1 = R:219 G:219 B:219 0
    Color2 = R:255 G:255 B:255 10
    Color3 = R:0 G:0 B:0 50
  End
  Alpha = DefaultAlpha
    Alpha2 = 0.75 1 10
    Alpha3 = -0.5 0 35
  End
  Update = DefaultUpdate
    SizeRate = 4 5
    SizeRateDamping = 0.95 1
    AngleZ = -7 7
    AngularDamping = 1 1
    AngularDampingXY = 1 1
  End
  Physics = DefaultPhysics
    VelocityDamping = 1 1
  End
  EmissionVelocity = OrthoEmissionVelocity
  End
  EmissionVolume = CylinderEmissionVolume
    IsHollow = Yes
    RadiusRate = 5
    Offset = X:0 Y:0 Z:6
  End
  Draw = DefaultDraw
  End
End
FXParticleSystem RingOfFire3 ;MeteorExp03
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXGimliAxeSpecial.tga
    Lifetime = 25 25
    SystemLifetime = 55
    BurstCount = 1 1
    InitialDelay = 12 12
    IsGroundAligned = Yes
  End
  Color = DefaultColor
    Color1 = R:183 G:130 B:81 0
    Color2 = R:0 G:0 B:0 25
  End
  Update = DefaultUpdate
    SizeRate = 20 20
    SizeRateDamping = 0.9 0.95
    AngleZ = 0 7
    AngularDamping = 1 1
    AngularDampingXY = 1 1
  End
  Physics = DefaultPhysics
    VelocityDamping = 1 1
  End
  EmissionVelocity = OrthoEmissionVelocity
    X = -1 1
    Y = -1 1
  End
  EmissionVolume = LineEmissionVolume
    StartPoint = X:0 Y:0 Z:10
    EndPoint = X:0 Y:0 Z:10
  End
  Draw = DefaultDraw
  End
End
FXList FX_RingOfFire
  ParticleSystem
    Name = RingOfFire1
    Offset = X:0.0 Y:0.0 Z:10.0
  End
  ParticleSystem
    Name = RingOfFire2
    Offset = X:0.0 Y:0.0 Z:10.0
  End
  ParticleSystem
    Name = RingOfFire3
    Offset = X:0.0 Y:0.0 Z:10.0
  End
  Sound 
    Name = FireDrakeInferno  ;FireStartEnt  ;FireStorm  ;DrogothFireflightMS  ;Gui_ScoreScreenVictoryText  ;GandalfIstariLightStart  ; lol i keep these here to let me de-side.
  End
End
FXList FX_BalrogSummoningStart
    ParticleSystem
		Name = BalrogSummonLightShafts
        InitialDelay = 4000 4000 UNIFORM   ;In milliseconds
	End
    ParticleSystem
		Name = BalrogSummonCracks
        InitialDelay = 2000 2000 UNIFORM   ;In milliseconds
	End
	ParticleSystem
		Name = BalrogSummonChunks
        Offset = X:0.0 Y:0.0 Z:-5.0
        InitialDelay = 10000 10000 UNIFORM   ;In milliseconds
	End
    ParticleSystem
		Name = BalrogSummonChunksSmall
        Offset = X:0.0 Y:0.0 Z:-5.0
        InitialDelay = 5000 5000 UNIFORM   ;In milliseconds
	End
    ParticleSystem
		Name = BalrogSummonHeatWave
        Offset = X:0.0 Y:0.0 Z:-5.0
        InitialDelay = 3000 3000 UNIFORM   ;In milliseconds
	End
ParticleSystem
    Name = RingOfFire1
    Offset = X:0.0 Y:0.0 Z:10.0
  End
  ParticleSystem
    Name = RingOfFire2
    Offset = X:0.0 Y:0.0 Z:10.0
  End
  ParticleSystem
    Name = RingOfFire3
    Offset = X:0.0 Y:0.0 Z:10.0
  End
    CameraShakerVolume
      Radius = 800
      Duration_Seconds = 12
      Amplitude_Degrees = .5
    End
    Sound
	  Name = BalrogSummonPart1
    End
End
Weapon LegolasBowArrowStormHit
  RadiusDamageAffects = ENEMIES NOT_SIMILAR
  FireFX                = FX_HaldirMagicArrowHit
  ClearNuggets
  DamageNugget
    Damage        = 150
    Radius        = 150.0
    DelayTime     = 600
    DamageType    = HERO
    DamageFXType  = MAGIC
    DeathType     = EXPLODED
    DamageSpeed		= 100.0
  End
  MetaImpactNugget
    HeroResist			= .75
    ShockWaveAmount   = 40.0
    ShockWaveRadius   = 150.0
    ShockWaveTaperOff = 2.0
    ShockWaveSpeed	  = 100.0
  End
  MetaImpactNugget
    HeroResist			= .75
    ShockWaveAmount   = 20.0
    ShockWaveRadius   = 230.0
    ShockWaveTaperOff = 1.3
    ShockWaveSpeed	  = 100.0
  End
End
Weapon LegolasBowArrowStorm
  AttackRange = LEGOLAS_ARROWSTORM_RANGE
  WeaponSpeed = 561         ; dist/sec 
  MinWeaponSpeed = 481
  MaxWeaponSpeed = 641      ; dist/sec Upper limit on scaling, when attacking past nominal "max" range
  FireFX = FX_ArrowStormNew
  HitPercentage     = 100     ;When this weapon is used it will hit exactly all of the time.
  ProjectileNugget                    ; Default arrow
    ProjectileTemplateName = LegolasBowArrowStormProjectile
    WarheadTemplateName = LegolasBowArrowStormWarhead
  End
End
Object LegolasBowArrowStormProjectile
ReplaceModule ModuleTag_Draw
  Draw = W3DScriptedModelDraw ModuleTag_Draw_new
    DefaultModelConditionState     
      Model = NONE
      ParticleSysBone = NONE GoldArrowTrail FollowBone:yes
    End
  End
End
ReplaceModule ModuleTag_Draw2
    Draw = W3DStreakDraw ModuleTag_Draw2_new
	    Length		= 5
	    Width		= 3
	    NumSegments	= 5				; number of segements in the streak, increase for smoother line
	    Color		= R:249 G:217 B:91
	    Texture		= EXArrowStreakFire.tga
    End
End
End
Object HaldirGoldenArrowProjectile
  AddModule
  Behavior = FireWeaponWhenDeadBehavior ModuleTag_DIELIKETHIS
    StartsActive = Yes
    DeathWeapon = LegolasBowArrowStormHit
  End
End
End;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Weapon HaldirBowArrowStormHit 
	FireFX                = FX_DrogothDeath
	RadiusDamageAffects = ENEMIES NEUTRALS 

	DamageNugget
		Damage        = 165
		Radius        = 50
		DelayTime     = 0
		DamageType    = HERO
		DamageFXType  = FLAME
		DeathType     = EXPLODED
	End

	MetaImpactNugget            
		ShockWaveAmount   = 50.0		
		ShockWaveRadius   = 50
		ShockWaveTaperOff = 0.66
	End
End
Object BarbedArrowProjectile;;;BarbedArrowProjectile
AddModule
  Behavior = FireWeaponWhenDeadBehavior ModuleTag_DIELIKETHIS
    StartsActive = Yes
    DeathWeapon = HaldirBowArrowStormHit
  End
End
End;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;------------------------------------------------------
;------------------------------------------------------
Weapon RohanGimliLeapWarhead
  ProjectileCollidesWith = ENEMIES
  RadiusDamageAffects = ENEMIES
  
  FireFX				= FX_GimliLeapNoVoice
  DamageNugget                        ; A basic Nugget that just does damage
    Damage        = GIMLI_LEAP_DAMAGE
    Radius        = 80.0
    DelayTime     = 0
    DamageType            = HERO
    DamageFXType          = GIMLI_LEAP
    DeathType             = NORMAL
  End
  MetaImpactNugget                    ; A Nugget that throws things back with force
;	HeroResist			= .75
    ShockWaveAmount   = 90.0
    ShockWaveRadius   = 70.0
    ShockWaveTaperOff = 0.5
    ShockWaveZMult    = 1.20
  End
End
CommandButton Command_SpecialAbilityThornofVengeance
	Command                 = SPECIAL_POWER
	WeaponSlot              = SECONDARY
	SpecialPower            = SpecialAbilityThornVengeance
	Options                 = NEED_TARGET_ENEMY_OBJECT
	TextLabel               = CONTROLBAR:Halarrow
	ButtonImage             = HSThranduilThornofVengeance
	CursorName              = Bombard
	InvalidCursorName       = GenericInvalid
	ButtonBorderType        = ACTION
	DescriptLabel           = CONTROLBAR:ToolTipHalarrow
	DisableOnModelCondition = WEAPONSET_TOGGLE_1		
	InPalantir		= Yes
	AutoAbility		= Yes
	;UnitSpecificSound      = FaramirRangerVoiceWoundingArrow
End
CommandButton Command_SpecialAbilityDaleSlamArrow
  Command                 	= SPECIAL_POWER
  WeaponSlot              	= SECONDARY
  SpecialPower            	= SpecialAbilityDaleSlamArrow
  Options                 	= NEED_TARGET_ENEMY_OBJECT 
  TextLabel               	= CONTROLBAR:LegoSlamArrow
  ButtonImage             	= HSFaramirWoundingArrow
  CursorName              	= Bombard
  InvalidCursorName       	= GenericInvalid
  ButtonBorderType        	= ACTION
  DescriptLabel           	= CONTROLBAR:ToolTipLegoSlamArrow
  InPalantir			= Yes
  AutoAbility			= Yes
End
;-------------------------------------------------------
;all command sets;aragorn is.. further down somewhere
;-------------------------------------------------------

CommandSet NewHaldirCommandSet;;DONE FINAL
	1	= Command_ToggleHaldirWeapon
	2	= Command_SpecialAbilityThornofVengeance
	3	= Command_DrogothFireflight
	4	= Command_LegolasKnifeFightingMode
	5	= Command_SpecialAbilityArrowStorm
	6	= Command_SpellBookRainOfFire
	12	= Command_CaptureBuilding
 	13	= Command_AttackMove
	14	= Command_Stop
End

CommandSet NewLegolasCommandSet;;DONE FINAL
	1	= Command_ToggleDamrodWeapon
	2  	= Command_LegolasHawkStrike
	3	= Command_SpecialAbilityDaleSlamArrow
	4  	= Command_HaldirGoldenArrow
	5  	= Command_ArwenFlood
	6	= Command_SpecialPowerSpawnWhirlwind
	7	= Command_LegolasKnifeFightingMode
	12 	= Command_CaptureBuilding
	13 	= Command_AttackMove
	14 	= Command_Stop
End

CommandSet NewGimliCommandSet;DONE FINAL
	1 	= Command_GimliAxeThrow
	2  	= Command_RohanGimliLeap
	3  	= Command_CreateAHero_Charge_Level3
	4  	= Command_SpecialAbilitySlayer
	5	= Command_CreateAHero_Bombard_Level3;;Command_FireDrakeInferno;Command_FiresOfDoom;;Command_SpellBookAwakenWyrm
	6	= Command_SpellBookEarthquake
	12 	= Command_CaptureBuilding
	13 	= Command_AttackMove
	14 	= Command_Stop
End
;;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!;;;;;;;;;
CommandSet NewTheodenCommandSet;3628;;;;!!!!!!!!GIVE HIM NEW POWERS!!!!!!!!!!!
	1	= Command_PurchaseSpellRohanAllies;SpecialAbilityCallPack;;;;;;;;;;;;;;;;;;;;;;;;
	2	= Command_CreateAHero_ShieldCrush_Level3
	3	= Command_Disguise;;;;;CreateAHero_Invulnerability_Level3
	4	= Command_CreateAHero_WordOfPoultry_Level2;;??????????
	5	= Command_SpecialAbilityTheodenGloriousCharge
	6	= Command_SpellBookHeal
	12 	= Command_CaptureBuilding
	13	= Command_AttackMove
	14	= Command_Stop
End;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!;;;;;;;;;;;;
CommandSet NewGamlingCommandSet;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;DONE FINAL
	1	= Command_SpecialAbilityHornOfGondor
	2	= Command_RohanGimliLeap;;;RogashLeap
	3	= Command_RohanEomerHorseLordLeadership;;;;CreateAHero_ShieldCrush_Level3
	4	= Command_CreateAHero_Sapper_Level3;;;blademaster
	5	= Command_SpecialAbilitySummonHillmen1;;hammer/blademasterSpecialAbilitySummonHillmen1
	6	= Command_GothmogIronHand;;steadfast loyalty
	12 	= Command_CaptureBuilding
	13	= Command_AttackMove
	14	= Command_Stop
End
;--------------------------------------------------
;gamling()()()()()()()()()()()()()()()()()()()()()
;--------------------------------------------------
Weapon NewGamlingSword
  LeechRangeWeapon      = Yes
  AttackRange           = STANDARD_MELEE_ATTACK_RANGE
	RadiusDamageAffects = ENEMIES NOT_SIMILAR
  MeleeWeapon           = Yes
  DelayBetweenShots     = GAMLING_DELAYBETWEENSHOTS 			
             ; time between shots, msec
  PreAttackDelay        = GAMLING_PREATTACKDELAY 				; 400 is sword swing delay time before contact with target.
  PreAttackType         = PER_SHOT ; Do the delay each time we attack a new target
  FireFX                = FX_GondorSwordHit
  FiringDuration        = GAMLING_FIRINGDURATION 				; Duration of the sword swing

	DamageNugget                        ; A basic Nugget that just does damage
		Damage        = 130					
		Radius        = 30.0 ;
		DelayTime     = 200
		DamageType    = HERO
		DamageFXType  = SWORD_SLASH
		DeathType     = NORMAL
		DamageSpeed		= 700.0 ; must match the ShockWaveSpeed below
	End
	DOTNugget                        ; 30s time.
		Damage        = 20 ; default is 300
		AcceptDamageAdd = No
		Radius        = 20.0
		DelayTime     = 0
		DamageType    = MAGIC
		DamageFXType  = MAGIC
		DeathType     = NORMAL
		DamageInterval = 1000
		DamageDuration = 30000
		SpecialObjectFilter = AFFECTED_BY_POISON_OBJECTFILTER
	End
	MetaImpactNugget                    ; A Nugget that throws things back with force
		HeroResist			= .75
		ShockWaveAmount   = 30.0
		ShockWaveRadius   = 10.0
		ShockWaveTaperOff = 1  ;0.75
		ShockWaveZMult    = 0.75
		ShockWaveSpeed		= 700
	End  
End
Weapon GamlingHeroSword
  LeechRangeWeapon      = Yes
	RadiusDamageAffects = ENEMIES NOT_SIMILAR
  AttackRange           = STANDARD_MELEE_ATTACK_RANGE
  MeleeWeapon           = Yes
  DelayBetweenShots     = GAMLING_DELAYBETWEENSHOTS 			
             ; time between shots, msec
  PreAttackDelay        = GAMLING_PREATTACKDELAY 				; 400 is sword swing delay time before contact with target.
  PreAttackType         = PER_SHOT ; Do the delay each time we attack a new target
  FireFX                = FX_AODBlade;FX_TheodenGloriousChargeFX
  FiringDuration        = GAMLING_FIRINGDURATION 				; Duration of the sword swing

  DamageNugget                        ; A basic Nugget that just does damage
    Damage        = 100					
    Radius        = 60.0 ;
    DelayTime     = 25
    DamageType    = HERO
    DamageFXType  = SWORD_SLASH
    DeathType     = NORMAL
		DamageSpeed		= 700.0
  End
  DamageNugget                        ; A basic Nugget that just does damage
    Damage        = 300					
    Radius        = 60.0 ;
    ;DelayTime     = 25 ; for smaller units delay time must not be so that they are set aflame rather then just dieing normally
    DamageType    = MAGIC
    DamageFXType  = MAGIC
    DeathType     = EXPLODED
		DamageSpeed		= 700.0
  End

	DOTNugget                        ; 30s time.
		Damage        = 40 ; default is 300
		AcceptDamageAdd = No
		Radius        = 30.0
		DelayTime     = 0
		DamageType    = HERO
		DamageFXType  = WITCH_KING_MORGUL_BLADE
		DeathType     = EXPLODED
		DamageInterval = 1000
		DamageDuration = 15000
		SpecialObjectFilter = AFFECTED_BY_POISON_OBJECTFILTER
	End
	MetaImpactNugget                    ; A Nugget that throws things back with force
		HeroResist			= .75
		ShockWaveAmount   = 70.0
		ShockWaveRadius   = 60.0
		ShockWaveTaperOff = 1 ;0.75
		ShockWaveZMult    = 0.95
		ShockWaveSpeed		= 700
	End  
End
SpecialPower SpecialAbilityHwaldarSummonHillmen1
	Enum							= SPECIAL_SPELL_BOOK_MEN_OF_DALE_ALLIES
	ReloadTime						= 210000	  ;	in milliseconds
	RadiusCursorRadius				= 90.0
	InitiateAtLocationSound			= SpellRohirrimSummonMS
	Flags							= NO_FORBIDDEN_OBJECTS LIMIT_DISTANCE
	ForbiddenObjectFilter			= NO_SUMMON_NEAR_OBJECT_FILTER
	ForbiddenObjectRange			= 100
	MaxCastRange					= 150
End
Object RohanGamling
ShockwaveResistance = SHOCKWAVE_RESISTANCE_IMMUNE
CommandPoints = 0

SelectPortrait = UPGondor_Rohirrim
ButtonImage = hicahdamrod

RadarPriority = UNIT
KindOf = HERO PRELOAD SELECTABLE CAN_CAST_REFLECTIONS INFANTRY PATH_THROUGH_EACH_OTHER SCORE CAN_ATTACK ATTACK_NEEDS_LINE_OF_SIGHT ARMY_SUMMARY HEAVY_MELEE_HITTER

CommandSet = NewGamlingCommandSet

ReplaceModule ModuleTag_DRAW
	Draw = W3DScriptedModelDraw ModuleTag_DRAW_NEW

   StaticModelLODMode = yes ; Will append M or L to the skin name depending on GameLOD

	  OkToChangeModelColor = Yes

		DefaultModelConditionState
			Model               = RUGamling_SKN
			ParticleSysBone = B_SWORDBONE GamlingSwordglow FollowBone:Yes
		End	
		ModelConditionState = WEAPONSET_HERO_MODE;
			ParticleSysBone = BAT_RIBS GamBladeMaster FollowBone:Yes
			ParticleSysBone = BAT_RIBS FloodWaterHit FollowBone:Yes
			ParticleSysBone = BAT_HHEAD GCglowHorseWhite FollowBone:Yes
			ParticleSysBone = B_HHIPL GCglowHorseRearWhite FollowBone:Yes
			ParticleSysBone = BAT_SPINE2 GCglowWhite FollowBone:Yes
		End

		; --- Idle Anims
		IdleAnimationState
			StateName = Idle			
;			Animation           = IDLA
;				AnimationName     = GUBoromir_SKL.GUBoromir_IDLA 0 15
;				AnimationMode     = ONCE
;			End			
			Animation           = IDLB
				AnimationName     = GUBoromir_SKL.GUBoromir_IDLB
				AnimationMode     = ONCE
				AnimationPriority   = 20
			End			
			Animation           = IDLD
				AnimationName     = GUBoromir_SKL.GUBoromir_IDLD
				AnimationMode     = ONCE
				AnimationPriority   = 1
			End			
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "Selected" then CurDrawableSetTransitionAnimState("TRANS_Selected_To_Idle") end
			EndScript			
		End

		TransitionState       = Trans_None_To_Sword
			Animation           = GUBoromir_STHA
				AnimationName     = GUBoromir_SKL.GUBoromir_STHA ;
				AnimationMode     = ONCE
			End
		End
		TransitionState       = Trans_Sword_To_None
			Animation           = GUBoromir_STHB
				AnimationName     = GUBoromir_SKL.GUBoromir_STHB ;
				AnimationMode     = ONCE
			End
		End
		
		AnimationState        = STUNNED_FLAILING 
			Flags               = RANDOMSTART
			Animation           = GUBoromir_FLYA
				AnimationName     = GUBoromir_SKL.GUBoromir_FLYA
				AnimationMode     = LOOP
			End
		End


		; --- Dying anims
		
		AnimationState        = DYING SPLATTED
			Animation           = GUBoromir_LNDA
				AnimationName     = GUBoromir_SKL.GUBoromir_LNDA
				AnimationMode     = ONCE
			End
		End
		AnimationState        = DYING AFLAME
			Animation = DieAflame
				AnimationName       = GUBoromir_SKL.GUBoromir_MFDA
				AnimationMode       = LOOP
			End
		End
		AnimationState        = DYING
			Animation           = GUBoromir_DTHA
				AnimationName     = GUBoromir_SKL.GUBoromir_DTHA
				AnimationMode     = ONCE
			End
		End
		
		; --- Stunned anims
		AnimationState        = STUNNED_STANDING_UP
			Animation           = GUBoromir_GTPA
				AnimationName     = GUBoromir_SKL.GUBoromir_GTPA
				AnimationMode     = ONCE
				AnimationSpeedFactorRange = 1.3 1.3
			End
		End
		AnimationState        = STUNNED 
			Animation           = GUBoromir_LNDA
				AnimationName     = GUBoromir_SKL.GUBoromir_LNDA
				AnimationMode     = ONCE
			End
		End
		
		AnimationState        = PACKING_TYPE_2 
			StateName		  =	CaptainPower
			Animation           = GUBoromir_CHRA
				AnimationName     = GUBoromir_SKL.GUBoromir_CHRA
				AnimationMode     = ONCE
				AnimationSpeedFactorRange = 1.2 1.2
			End
		End

		; -- Horn anims
		AnimationState        = UNPACKING SPECIAL_POWER_1
			Animation           
				AnimationName     = GUBoromir_SKL.GUBoromir_HRNA
				AnimationMode     = ONCE
			End
		End
		AnimationState        = PREPARING SPECIAL_POWER_1
			Animation           
				AnimationName     = GUBoromir_SKL.GUBoromir_HRNB
				AnimationMode     = ONCE
			End
		EnteringStateFX = FX_BoromirHorn
		End
		AnimationState        = PACKING SPECIAL_POWER_1
			Animation           
				AnimationName     = GUBoromir_SKL.GUBoromir_HRNC
				AnimationMode     = ONCE
			End
		End
		AnimationState        = SPECIAL_POWER_1
			Animation           
				AnimationName     = GUBoromir_SKL.GUBoromir_HRNB
				AnimationMode     = LOOP
			End
		End
		
		; -- Last Stand Animations
		AnimationState        = UNPACKING SPECIAL_WEAPON_ONE
			Animation           
				AnimationName     = GUBoromir_SKL.GUBoromir_SPCA
				AnimationMode     = ONCE
			End
		End
		AnimationState        = PREPARING SPECIAL_WEAPON_ONE
			Animation           
				AnimationName     = GUBoromir_SKL.GUBoromir_SPCB
				AnimationMode     = ONCE
			End
			Animation           
				AnimationName     = GUBoromir_SKL.GUBoromir_SPCC
				AnimationMode     = ONCE
			End
		EnteringStateFX = FX_BoromirHorn
		End
		AnimationState        = PACKING SPECIAL_WEAPON_ONE
			Animation           
				AnimationName     = GUBoromir_SKL.GUBoromir_SPCE
				AnimationMode     = ONCE
			End
		End
		AnimationState        = SPECIAL_WEAPON_ONE
			Animation           
				AnimationName     = GUBoromir_SKL.GUBoromir_SPCB
				AnimationMode     = ONCE
			End
			Animation           
				AnimationName     = GUBoromir_SKL.GUBoromir_SPCC
				AnimationMode     = ONCE
			End
		End
		
		; --- Moving Anims
		AnimationState        = MOVING WANDER WEAPONSTATE_CLOSE_RANGE
			StateName           = WithSword
			;ParticleSysBone     = None InfantryDustTrails
			Animation           = GUBoromir_WLKA
				AnimationName     = GUBoromir_SKL.GUBoromir_WLKA
				AnimationMode     = LOOP
			End
		End
		; non mo cap
;		AnimationState        = MOVING WEAPONSTATE_CLOSE_RANGE
;			StateName           = WithSword
;			Flags               = RANDOMSTART
;			;ParticleSysBone     = None InfantryDustTrails
;			Animation           = GUBoromir_RUNB
;				AnimationName     = GUBoromir_SKL.GUBoromir_RUNB
;				AnimationMode     = LOOP
;			End
;		End
;		AnimationState        = MOVING DAMAGED
;			Flags               = RANDOMSTART
;			;ParticleSysBone     = None InfantryDustTrails
;			Animation           = GUBoromir_IWKA
;				AnimationName     = GUBoromir_SKL.GUBoromir_IWKA
;				AnimationMode     = LOOP
;			End
;		End
		AnimationState        = MOVING WANDER
			;ParticleSysBone     = None InfantryDustTrails
			Animation           = GUBoromir_WLKA
				AnimationName     = GUBoromir_SKL.GUBoromir_WLKA
				AnimationMode     = LOOP
			End
		End
		
		
		AnimationState        = MOVING FIRING_OR_PREATTACK_A
			ShareAnimation		= Yes
			Animation           = RunAndFire
				AnimationName       = GUBoromir_SKL.GUBoromir_ATRA
				AnimationMode       = LOOP
			End
			Flags               = RANDOMSTART  
		End
		
		
		AnimationState        = MOVING
			;ParticleSysBone     = None InfantryDustTrails
			Flags               = RANDOMSTART
			Animation           = GUBoromir_RUNB
				AnimationName     = GUBoromir_SKL.GUBoromir_RUNA
				AnimationMode     = LOOP
			End
		End
		
		

		; Attacking Anims [Weapon_A]
		AnimationState        = FIRING_OR_PREATTACK_A WEAPONSTATE_CLOSE_RANGE
			StateName           = WithSword
			Animation           = ATKA
				AnimationName     = GUBoromir_SKL.GUBoromir_ATKA
				AnimationMode     = ONCE
				UseWeaponTiming		= Yes
			End
			Animation           = ATKB
				AnimationName    = GUBoromir_SKL.GUBoromir_ATKB
				AnimationMode     = ONCE
				UseWeaponTiming		= Yes
			End
		End

		AnimationState        = FIRING_OR_PREATTACK_A
			Animation           = GUBoromir_ATD1
				AnimationName     = GUBoromir_SKL.GUBoromir_ATKB 
				AnimationMode     = ONCE
				UseWeaponTiming		= Yes
			End
		End

		


		; --------- Idle Anims -non mocap-
;		AnimationState        = WEAPONSTATE_CLOSE_RANGE
;			StateName           = WithSword
;			Animation           = GUBoromir_IDLC
;				AnimationName     = GUBoromir_SKL.GUBoromir_IDLC
;				AnimationMode     = ONCE
;			End
;		End

		; ATTACKING
		AnimationState        = ATTACKING
			Animation           = ALERT_1
				AnimationName     = GUBoromir_SKL.GUBoromir_IDLA
				AnimationMode     = LOOP; ONCE
			End
;			Flags               = RESTART_ANIM_WHEN_COMPLETE ; acts like an idle animation & keeps running the animations.
		End
		
		; --------- Selected Anims and Transitions
		TransitionState					=	TRANS_Idle_to_Selected
			Animation					=	ATND
				AnimationName			=	GUBoromir_SKL.GUBoromir_ATND
				AnimationMode			=	ONCE
			End
		End
		
		TransitionState					=	TRANS_Selected_To_Idle
			Animation					=	ATNE
				AnimationName			=	GUBoromir_SKL.GUBoromir_ATNE
				AnimationMode			=	ONCE
			End
		End
		
		AnimationState				= LEVELED 						; This state clears itself in 3 seconds
			Animation				= LevelUp
				AnimationName		= GUBoromir_SKL.GUBoromir_CHRA
				AnimationMode		= ONCE
			End
		End

		AnimationState				=	SELECTED
			StateName				=	Selected
			SimilarRestart			=   Yes			
			Animation				=	ATNB
				AnimationName		=	GUBoromir_SKL.GUBoromir_ATNB
				AnimationMode		=	LOOP
			End
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "Idle" then CurDrawableSetTransitionAnimState("TRANS_Idle_to_Selected") end
			EndScript
		End
		
		;------------emotions---------------
		AnimationState			= EMOTION_CELEBRATING
			Animation           = CHRA
				AnimationName   = GUBoromir_SKL.GUBoromir_CHRA
				AnimationMode   = Once
			End
			Animation           = CHRB
				AnimationName   = GUBoromir_SKL.GUBoromir_CHRB
				AnimationMode   = Once
			End
			Flags				=	RESTART_ANIM_WHEN_COMPLETE
		End
		
		AnimationState					= EMOTION_ALERT EMOTION_MORALE_HIGH
			Animation					= Taunting
				AnimationName			=  GUBoromir_SKL.GUBoromir_TNTB
				AnimationMode			= ONCE
			End
			Flags						= RANDOMSTART RESTART_ANIM_WHEN_COMPLETE
		End
		
		; READY IDLE
		AnimationState        = EMOTION_ALERT
			Animation           = ALERT_1
				AnimationName     = GUBoromir_SKL.GUBoromir_IDLA
				AnimationMode     = LOOP ;ONCE
			End
;			Flags               = RESTART_ANIM_WHEN_COMPLETE ; acts like an idle animation & keeps running the animations.
		End
		
		
		; --------- Click and Hit Reactions ------------
		AnimationState = HIT_REACTION HIT_LEVEL_1
			Animation = Hit_Level_1_a
				AnimationName = GUBoromir_SKL.GUBoromir_HITA
				AnimationMode = ONCE
			End
		End		

	End
End
WeaponSet
		Conditions 			= None 
		Weapon     			= PRIMARY  NewGamlingSword  		
		AutoChooseSources	= PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI		
	End

WeaponSet
		Conditions		= WEAPONSET_HERO_MODE
		Weapon			= PRIMARY    GamlingHeroSword
	End
AddModule
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_GothmogIronHandEnabler
		SpecialPowerTemplate		= SpecialAbilityFakeLeadership
		TriggeredBy			= Upgrade_GothmogIronHand
	End
End
AddModule
	Behavior = SpecialPowerModule ModuleTag_GothmogIronHandSpecialPowerModule
		SpecialPowerTemplate		= SpecialAbilityFakeLeadership 
		StartsPaused			= Yes
		UpdateModuleStartsAttack	= Yes
	End
End
AddModule
	Behavior = AttributeModifierAuraUpdate ModuleTag_IronHandLeadership
		StartsActive		= No ;If no, requires upgrade to turn on.
		BonusName		= NewGothmogIronHand
		TriggeredBy		= Upgrade_GothmogIronHand							; Upgrade_LurtzLeadership
		RefreshDelay		= 2000
		Range			= 90
		ObjectFilter		= ALL	; GENERIC_BUFF_RECIPIENT_OBJECT_FILTER
	End
End	
AddModule
	Behavior = BezierProjectileBehavior ModuleTag_08 ; Module starts asleep, and wakes up when thrown.
		; To tweak a Bezier path
		FirstHeight = 50  ; Height of Bezier control points above highest intervening terrain
		SecondHeight = 20
		FirstPercentIndent = 20% ; Percentage of shot distance control points are placed
		SecondPercentIndent = 70%
		TumbleRandomly = Yes
		CrushStyle = Yes ; I don't detonate, I 
		BounceCount = 0   ; When I hit the ground, I'll ar
		FinalStuckTime = 1200 ; Can't move for thi
		GroundHitFX       = FX_GimliLeapLand
		GroundHitWeapon   = RohanGimliLeapWarhead
		PreLandingStateTime = 75; Look ahead to the end of the arc, and get the ABOUT_TO_HIT flag this far in advance
	End
End
	AddModule
	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_LeapEnabler
		SpecialPowerTemplate = SpecialAbilityGimliLeap
		TriggeredBy = Upgrade_GimliLeapTrigger
	End
End
AddModule
	Behavior = SpecialPowerModule ModuleTag_LeapStarter                      
		SpecialPowerTemplate		= SpecialAbilityGimliLeap
		UpdateModuleStartsAttack	= Yes
		StartsPaused			= Yes
		InitiateSound			= BoromirVoiceAttackCharge
	End
End
AddModule
	Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_LeapUpdate   
		SpecialPowerTemplate    = SpecialAbilityGimliLeap

		UnpackTime              = 600
		PackTime                = 300 ; Putting horn away

		AwardXPForTriggering    = 0
		MustFinishAbility	= Yes
		StartAbilityRange = 100.0
		
		SpecialWeapon = RohanGimliLeap
		BusyForDuration = 2000 ; don't accept any AI for this long... ai commands will be queued

;		ApproachRequiresLOS = No
		WhichSpecialWeapon = 2
        TriggerSound = BoromirVoiceAttackCharge
	End
End
AddModule
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_HwaldarSummon1Enabler
		SpecialPowerTemplate = SpecialAbilityHwaldarSummonHillmen1
		TriggeredBy = Upgrade_HwaldarSummons1
	End
	End
AddModule
	Behavior = OCLSpecialPower ModuleTag_OCLSpecialPowerSummon1
		SpecialPowerTemplate		= SpecialAbilityHwaldarSummonHillmen1
		OCL				= OCL_SpawnRohanRohirrim
		CreateLocation			= CREATE_AT_LOCATION
		StartsPaused			= Yes
		;SetModelCondition		= ModelConditionState:USER_1
		;SetModelConditionTime		= 8.1
	End
	End
AddModule
	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_EnableHorn
		SpecialPowerTemplate		= SpecialAbilityHornOfGondor
		TriggeredBy					= Upgrade_BoromirHornOfGondor
	End
	End
AddModule
	Behavior = SpecialPowerModule ModuleTag_HornStarter						
		SpecialPowerTemplate		= SpecialAbilityHornOfGondor
		UpdateModuleStartsAttack	= Yes
		AntiCategory			= LEADERSHIP
		AttributeModifier		= BoromirGondorHornAntiCategory		; Used for the anti category duration only.
		AttributeModifierRange		= 1000.0					; RotWK originally 100
		StartsPaused			= Yes					; obtained on level 2
	End
	End

AddModule
	Behavior = ModelConditionSpecialAbilityUpdate ModuleTag_HornUpdate   
		SpecialPowerTemplate    = SpecialAbilityHornOfGondor
;		StartAbilityRange       = 100.0


		UnpackTime              = 1700									; Drawing the horn
		PreparationTime         = 1										; nothing
		PersistentPrepTime      = 1600									; Blowing
		PackTime                = 1666									; Putting horn away

;    PackSound               = 
;    UnpackSound             = 
;    TriggerSound            = 
;    PrepSoundLoop           = 
		AwardXPForTriggering    = 0
	End
	End
ReplaceModule ModuleTag_GamlingHealing
Behavior = AutoHealBehavior ModuleTag_GamlingHealing1
		StartsActive = Yes
		HealingAmount = 50
		HealingDelay = 7000
		StartHealingDelay = 5000
		HealOnlyIfNotInCombat = Yes
	End
	End
AddModule
	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_CreateAHeroShieldCrushEnabler_Level3
		SpecialPowerTemplate	= SpecialAbilityCreateAHeroShieldCrush_Level3
		TriggeredBy				= Upgrade_CreateAHeroShieldCrush_Level3
	End
	End
AddModule
		Behavior = SpecialPowerModule ModuleTag_CreateAHeroShieldCrushStarter_Level3			; SpecialAbility is	a SpecialPower,	SpecialPower is	anyting	special
		SpecialPowerTemplate			= SpecialAbilityCreateAHeroShieldCrush_Level3
		StartsPaused					= Yes
		AttributeModifier				= NewCreateAHeroShieldCrush_Level3
		AttributeModifierAffectsSelf	= Yes
		;TriggerRX						= FX_CreateAHeroShieldCharge_Level3
	End
	End
AddModule ModuleTag_AragornBladeMasterEnabler
	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_AragornBladeMasterEnabler
		SpecialPowerTemplate = SpecialAbilityAragornBladeMaster
		TriggeredBy = Upgrade_AragornBladeMaster
	End
	End
AddModule ModuleTag_AragornBladeMasterStarter
  	Behavior = SpecialPowerModule ModuleTag_AragornBladeMasterStarter                ; SpecialAbility is a SpecialPower, SpecialPower is anyting special
		SpecialPowerTemplate    = SpecialAbilityAragornBladeMaster
		StartsPaused			= Yes
	End
	End
AddModule ModuleTag_AragornBladeMasterUpdate
	Behavior = HeroModeSpecialAbilityUpdate ModuleTag_AragornBladeMasterUpdate   
		SpecialPowerTemplate    = SpecialAbilityAragornBladeMaster
		HeroAttributeModifier	= NewAragornBladeMaster
		HeroEffectDuration		= 30000 
		UnpackTime              = 1 ; insant unpack
		TriggerSound			= AragornBladeMaster
	End
	End
End
ExperienceLevel	GamlingLevel1
	TargetNames						=	RohanGamling	
	RequiredExperience					=	1	
	ExperienceAward						=	GAMLING_LVL1_EXP_AWARD
	Rank							=	1
	Upgrades						=	Upgrade_BoromirHornOfGondor
	SelectionDecal
		Texture						=	decal_hero_good	
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40
		MaxRadius					=	200
		MaxSelectedUnits				=	1
	End
End
ExperienceLevel	GamlingLevel2
	TargetNames						=	RohanGamling	
	RequiredExperience					=	GAMLING_LVL2_EXP_NEEDED
	ExperienceAward						=	GAMLING_LVL2_EXP_AWARD
	AttributeModifiers					=	HeroLevelUpDamage1
	Rank							=	2
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Upgrades						=	Upgrade_GimliLeapTrigger
	SelectionDecal
		Texture						=	decal_hero_good	
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40
		MaxRadius					=	200
		MaxSelectedUnits				=	1	
	End		
End	
ExperienceLevel	GamlingLevel4
	TargetNames						=	RohanGamling	
	RequiredExperience					=	GAMLING_LVL4_EXP_NEEDED
	ExperienceAward						=	GAMLING_LVL4_EXP_AWARD	
	AttributeModifiers					=	HeroLevelUpDamage3
	Rank							=	4
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Upgrades						=	Upgrade_CreateAHeroShieldCrush_Level3
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%
		OpacityMax					=	100%
		MinRadius					=	40
		MaxRadius					=	200
		MaxSelectedUnits				=	1
	End		
End	
ExperienceLevel	GamlingLevel6
	TargetNames						=	RohanGamling	
	RequiredExperience					=	GAMLING_LVL6_EXP_NEEDED
	ExperienceAward						=	GAMLING_LVL6_EXP_AWARD	
	AttributeModifiers					=	HeroLevelUpDamage5
	Rank							=	6
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Upgrades						=	Upgrade_AragornBladeMaster
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40
		MaxRadius					=	200
		MaxSelectedUnits				=	1	
	End	
End	
ExperienceLevel	GamlingLevel9
	TargetNames						=	RohanGamling	
	RequiredExperience					=	GAMLING_LVL9_EXP_NEEDED
	ExperienceAward						=	GAMLING_LVL9_EXP_AWARD	
	AttributeModifiers					=	HeroLevelUpDamage8
	Rank							=	9
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Upgrades						=	Upgrade_HwaldarSummons1
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40
		MaxRadius					=	200
		MaxSelectedUnits				=	1	
	End	
End
ExperienceLevel	GamlingLevel10
	TargetNames						=	RohanGamling	
	RequiredExperience					=	GAMLING_LVL10_EXP_NEEDED
	ExperienceAward						=	GAMLING_LVL10_EXP_AWARD	
	AttributeModifiers					=	HeroLevelUpDamage9
	Rank							=	10
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Upgrades						=	Upgrade_GothmogIronHand
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40
		MaxRadius					=	200
		MaxSelectedUnits				=	1	
	End	
End	
;----------------------------------------------------
;Haldir>>>>>>>>>>>>>>>>>>>>()<<<<<<<<<<<<<<<<<<<<<<<<
;----------------------------------------------------
Weapon DwarvenMenOfDaleBlackArrows
	AttackRange         = DWARVEN_MENOFDALE_RANGE
	
	RangeBonusMinHeight      = 30 ;	= 10
	RangeBonus		= 1
	RangeBonusPerFoot	= #MULTIPLY( DWARVEN_MENOFDALE_RANGE .003 )
	WeaponSpeed			= 321         ; dist/sec 
	MinWeaponSpeed      = 241
	MaxWeaponSpeed      = 481      ; dist/sec Upper limit on scaling, when attacking past nominal "max" range
	FireFX              = FX_RohanArcherBowWeapon
	ScaleWeaponSpeed    = Yes ; Used for lob weapons, scales speed proportional to range
	HitPercentage       = 100     ;When this weapon is used it will hit exactly 50% of the time.
	ScatterRadius       = 16.0     ;When this weapon misses it can randomly m
	AcceptableAimDelta	= 20	; prevent twitchy reaiming in horde on horde
	DelayBetweenShots   = 0
	PreAttackDelay      = DWARVEN_MENOFDALE_PREATTACKDELAY  
	PreAttackRandomAmount     = 200  
	PreAttackType       = PER_POSITION
	FiringDuration      = 0   
	ClipSize			= 1
	AutoReloadsClip		= Yes
	AutoReloadWhenIdle	= 1	
	ClipReloadTime		= Min:DWARVEN_MENOFDALE_BOW_RELOADTIME_MIN Max:DWARVEN_MENOFDALE_BOW_RELOADTIME_MAX

	AntiAirborneVehicle	= Yes
	AntiAirborneMonster	= Yes
	HitPassengerPercentage	= 20%
	CanBeDodged				= Yes ; Will
	ProjectileNugget	; Default arrow
		ProjectileTemplateName  = BlackArrowsProjectile
		WarheadTemplateName     = DwarvenMenOfDaleBlackArrowWarhead
	End
End
Weapon DwarvenMenOfDaleBlackArrowWarhead
	RadiusDamageAffects	= ENEMIES 
	HitStoredTarget		= Yes
	DamageNugget
		Damage			= 300
		Radius			= 0.0
		DelayTime		= 0
		DamageType		= PIERCE
		DamageFXType	= FLAME
		DeathType		= BURNED
	End
	EmotionWeaponNugget
		EmotionType			= TERROR
		Radius				= 0
		Duration			= 5
		SpecialObjectFilter	= ANY ENEMIES +MONSTER
	End
End
Object BlackArrowsProjectile
  ReplaceModule ModuleTag_Draw
  Draw = W3DScriptedModelDraw ModuleTag_Draw_new
    DefaultModelConditionState     
      Model = NONE
      ParticleSysBone = NONE HaldirGoldArrowTrail FollowBone:yes
    End
  End
End
End
Object ThranSpecialArrowProjectile
AddModule
  Behavior = FireWeaponWhenDeadBehavior ModuleTag_DIELIKETHIS
    StartsActive = Yes
    DeathWeapon = MordorBalrogSwordSwipe
  End
  End
End
Weapon NewHaldirSword
  LeechRangeWeapon      = Yes
  AttackRange           = STANDARD_MELEE_ATTACK_RANGE
	RadiusDamageAffects = ENEMIES NOT_SIMILAR
  MeleeWeapon           = Yes
  DelayBetweenShots     = GAMLING_DELAYBETWEENSHOTS 			
             ; time between shots, msec
  PreAttackDelay        = GAMLING_PREATTACKDELAY 				; 400 is sword swing delay time before contact with target.
  PreAttackType         = PER_SHOT ; Do the delay each time we attack a new target
  FiringDuration        = GAMLING_FIRINGDURATION 				; Duration of the sword swing

	DamageNugget                        ; A basic Nugget that just does damage
		Damage        = 130					
		Radius        = 20.0 ;
		DelayTime     = 200
		DamageType    = HERO
		DamageFXType  = SWORD_SLASH
		DeathType     = NORMAL
		DamageSpeed		= 700.0 ; must match the ShockWaveSpeed below
	End

	DOTNugget                        ; 30s time.
		Damage        = 20 ; default is 300
		AcceptDamageAdd = No
		Radius        = 30.0
		DelayTime     = 0
		DamageType    = FLAME
		DamageFXType  = FLAME
		DeathType     = BURNED
		DamageInterval = 1000
		DamageDuration = 30000
		SpecialObjectFilter = AFFECTED_BY_POISON_OBJECTFILTER
	End

	MetaImpactNugget                    ; A Nugget that throws things back with force
		HeroResist			= .75
		ShockWaveAmount   = 30.0
		ShockWaveRadius   = 10.0
		ShockWaveTaperOff = 1  ;0.75
		ShockWaveZMult    = 0.75
		ShockWaveSpeed		= 700
	End  
End
FXList FX_DrakeFireBreath1

ParticleSystem
    Name = DrogothShockwave
    OrientToObject = Yes
  End
ParticleSystem
    Name = BalrogIgniteHeatWave
    OrientToObject = Yes
  End
  ParticleSystem
    Name = DrakeGroundGlow
    OrientToObject = Yes
  End
  ParticleSystem
    Name = DrakeGroundHeatWave
    OrientToObject = Yes
  End
  ParticleSystem
    Name = DrakeGroundSmoke
    OrientToObject = Yes
  End
  ParticleSystem
    Name = DrakeGroundFire
    OrientToObject = Yes
  End
 ParticleSystem
    Name = BalrogSummonScatterFire
    Offset = X:0.0 Y:0.0 Z:2.0
    InitialDelay = 25000 25000 UNIFORM   ;In milliseconds
  End
  
  
      DynamicDecal	; A decal that belongs to nobody, but updates internally to fade and tint and such
		DecalName		= SCCBalrogFireScorch
		Size			= 160				
		Color			= R:0 G:0 B:0
		Offset			= X:50 Y:0
		OpacityStart		= 0
		OpacityFadeTimeOne	= 2000
		OpacityPeak			= 64
		OpacityPeakTime		= 255
		OpacityFadeTimeTwo	= 20000
		OpacityEnd			= 0

		StartingDelay	= 1000
		Lifetime		= 23000
	End
  

  Sound
    Name = GandalfBlastWeapon
  End
Sound
    Name = BalrogSummonPart2
  End
  
End
Weapon HaldirHeroSword
  LeechRangeWeapon      = Yes
	RadiusDamageAffects = ENEMIES NOT_SIMILAR
  AttackRange           = STANDARD_MELEE_ATTACK_RANGE
  MeleeWeapon           = Yes
  DelayBetweenShots     = GAMLING_DELAYBETWEENSHOTS 			
             ; time between shots, msec
  PreAttackDelay        = GAMLING_PREATTACKDELAY 				; 400 is sword swing delay time before contact with target.
  PreAttackType         = PER_SHOT ; Do the delay each time we attack a new target
  FireFX                = FX_DrakeFireBreath1
  FiringDuration        = GAMLING_FIRINGDURATION 				; Duration of the sword swing

  DamageNugget                        ; A basic Nugget that just does damage
    Damage        = 100					
    Radius        = 60.0 ;
    DelayTime     = 25
    DamageType    = HERO
    DamageFXType  = SWORD_SLASH
    DeathType     = NORMAL
		DamageSpeed		= 700.0
  End
  DamageNugget                        ; A basic Nugget that just does damage
    Damage        = 300					
    Radius        = 60.0 ;
    ;DelayTime     = 25 ; for smaller units delay time must not be so that they are set aflame rather then just dieing normally
    DamageType    = FLAME
    DamageFXType  = FLAME
    DeathType     = BURNED
		DamageSpeed		= 700.0
  End
	DOTNugget                        ; 30s time.
		Damage        = 40 ; default is 300
		AcceptDamageAdd = No
		Radius        = 30.0
		DelayTime     = 0
		DamageType    = MAGIC
		DamageFXType  = MAGIC
		DeathType     = EXPLODED
		DamageInterval = 1000
		DamageDuration = 15000
		SpecialObjectFilter = AFFECTED_BY_POISON_OBJECTFILTER
	End
	
	MetaImpactNugget                    ; A Nugget that throws things back with force
		HeroResist			= .75
		ShockWaveAmount   = 70.0
		ShockWaveRadius   = 60.0
		ShockWaveTaperOff = 1 ;0.75
		ShockWaveZMult    = 0.95
		ShockWaveSpeed		= 700
	End  

End;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Weapon CreateAHeroWordOfPower // Big Blue Ring Blast
	IdleAfterFiringDelay = 0
	AttackRange = GANDALF_WORD_OF_POWER_RANGE
	MinimumAttackRange = 0.8
	WeaponSpeed = 401         // dist/sec 
	MinWeaponSpeed = 241
	MaxWeaponSpeed = 601      // dist/sec Upper limit on scaling, when attacking past nominal "max" range
	ScaleWeaponSpeed = Yes // Used for lob weapons, scales speed proportional to range
	RadiusDamageAffects = ENEMIES NOT_SIMILAR
	DelayBetweenShots = 5000               // time between shots, msec
	PreAttackDelay        = 2600
	PreAttackType         = PER_ATTACK // Do the delay each time we attack a new target
	PreAttackFX           = FX_BalrogSummoningStart
	FireFX                = FX_BalrogSummoningFinish
	FiringDuration      = 1400
	DamageNugget                        // A basic Nugget that just does damage
		Damage			= GANDALF_WORD_OF_POWER_DAMAGE
		Radius			= 250.0
		DamageType		= MAGIC
		DamageFXType	= MAGIC
		DeathType		= EXPLODED
		DamageSpeed		= 700.0 // must match the ShockWaveSpeed below
	End
	MetaImpactNugget                    // A Nugget that throws things back with force
//		HeroResist			= .75
		ShockWaveAmount   = 70.0
		ShockWaveRadius   = 500.0
		ShockWaveTaperOff = 1.0
		ShockWaveZMult    = 1.000
		ShockWaveSpeed	  = 700.0 
	End;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
End;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Weapon RohanEowynSmiteThrown
	AttackRange			= 300.0
	LeechRangeWeapon		= Yes
	WeaponSpeed			= 521					; dist/sec 
	MinWeaponSpeed			= 501
	MaxWeaponSpeed			= 541					; dist/sec Upper limit on scaling, when attacking past nominal "max" range
	FireFX				= FX_EowynSmiteSpearThrow
	ScaleWeaponSpeed		= Yes					; Used for lob weapons, scales speed proportional to range
	HitPercentage			= 100
	ScatterRadius			= 0.0					; When this weapon misses it can randomly miss by as much as this distance.
	DelayBetweenShots		= 1				; time between shots, msec
	PreAttackDelay			= 1					; 1467 is the prep time for archer.
	PreAttackType			= PER_SHOT				; Do the delay each time we attack a new target
	FiringDuration			= 1				; Duration of the archer firing shot is 500ms.

	ProjectileNugget
		ProjectileTemplateName	= RohanEomerSpearProjectile
		WarheadTemplateName	= RohanEowynSmiteWarhead
	End
End
Object RohanEomerSpearProjectile
      ReplaceModule ModuleTag_01
	Draw = W3DScriptedModelDraw ModuleTag_01_Override ;ModuleTag_Draw
		DefaultModelConditionState
			Model = NONE
			ParticleSysBone NONE GoldArrowTrail
			ParticleSysBone NONE GoldArrowTrail
		End
	End
      End
  AddModule
  Behavior = FireWeaponWhenDeadBehavior ModuleTag_DIELIKETHIS
    StartsActive = Yes
    DeathWeapon = LegolasBowArrowStormWarhead
  End
  End
End
FXParticleSystem HaldirManeFire1
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXFire01.tga
    Lifetime = 5 5
    SortLevel = 1
    Size = 18 18
    BurstCount = 2 2
  End
  Color = DefaultColor
    Color2 = R:128 G:64 B:00 2
    Color3 = R:0 G:0 B:0 10
    ColorScale = -5 -5
  End
  Update = DefaultUpdate
    SizeRate = 0.4 0.4
    SizeRateDamping = 1 1
    AngleZ = -5 5
    AngularRateZ = -0.05 0.05
    AngularDamping = 1 1
  End
  Physics = DefaultPhysics
    VelocityDamping = 0.5 1
    DriftVelocity = X:0 Y:-1.0 Z:-0.1
  End
  EmissionVelocity = OutwardEmissionVelocity
    Speed = -0.3 -0.3
    OtherSpeed = -0.4 -0.4
  End
  EmissionVolume = BoxEmissionVolume
    HalfSize = X:0 Y:0 Z:0
  End
  Draw = DefaultDraw
  End
End
FXParticleSystem HaldirManeEmbers1
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXEmbersLight.tga
    Lifetime = 100 100
    SortLevel = 1
    Size = 10 20
    BurstDelay = 2 5
    BurstCount = 1 1
  End
  Color = DefaultColor
    Color1 = R:128 G:64 B:00 0
    Color2 = R:0 G:0 B:0 50
    ColorScale = -5 0
  End
  Update = DefaultUpdate
    SizeRate = 6 6
    SizeRateDamping = 0.8 0.85
    AngleZ = -0.3 0.3
    AngularRateZ = -0.03 0.03
    AngularDamping = 0.99 0.99
  End
  Physics = DefaultPhysics
    Gravity = 0.008
    VelocityDamping = 0.9 0.9
    DriftVelocity = X:0 Y:0 Z:0.64
  End
  EmissionVelocity = OrthoEmissionVelocity
  End
  EmissionVolume = LineEmissionVolume
    IsHollow = Yes
    StartPoint = X:-22 Y:0 Z:8
    EndPoint = X:25 Y:0 Z:5
  End
  Draw = DefaultDraw
  End
  Wind = DefaultWind
    WindMotion = PingPong
    WindStrength = 0.5
    WindAngleChangeMin = 0.017453
    WindAngleChangeMax = 0.034907
    WindPingPongStartAngleMax = 0.785398
    WindPingPongEndAngleMin = 5.49779
    WindPingPongEndAngleMax = 6.28319
  End
End
FXParticleSystem HaldirManeFlare1
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXLnzFlar1.tga
    Lifetime = 20 20
    SortLevel = 1
    Size = 20 20
    BurstCount = 1 2
  End
  Color = DefaultColor
    Color2 = R:128 G:64 B:00 2
    Color3 = R:0 G:0 B:0 20
    ColorScale = -15 -5
  End
  Update = DefaultUpdate
    SizeRateDamping = 1 1
    AngleZ = -5 5
    AngularRateZ = -0.05 0.05
    AngularDamping = 1 1
  End
  Physics = DefaultPhysics
    VelocityDamping = 0.9 1
    DriftVelocity = X:0 Y:0 Z:2
  End
  EmissionVelocity = OrthoEmissionVelocity
    X = -0.4 -0.4
    Y = -0.4 -0.4
  End
  EmissionVolume = BoxEmissionVolume
    HalfSize = X:12 Y:7 Z:5
  End
  Draw = DefaultDraw
  End
End
FXParticleSystem HaldirSwordFlare1
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXLnzFlar1.tga
    Lifetime = 60 60
    SortLevel = 1
    Size = 35 45
    BurstCount = 1 2
  End
  Color = DefaultColor
    Color2 = R:128 G:64 B:00 5
    Color3 = R:0 G:0 B:0 30
    ColorScale = -5 0
  End
  Update = DefaultUpdate
    SizeRateDamping = 1 1
    AngleZ = -5 5
    AngularRateZ = -0.05 0.05
    AngularDamping = 1 1
  End
  Physics = DefaultPhysics
    VelocityDamping = 2.9 1
  End
  EmissionVelocity = OrthoEmissionVelocity
    X = 0 2
    Y = 0 2
    Z = 0 2
  End
  EmissionVolume = LineEmissionVolume
    IsHollow = Yes
    EndPoint = X:0 Y:0 Z:70
  End
  Draw = DefaultDraw
  End
  Wind = DefaultWind
    WindMotion = Circular
    WindStrength = 1
    WindAngleChangeMin = 0.872665
    WindAngleChangeMax = 2.61799
  End
End
FXParticleSystem HaldirWing1
  System
    Priority = ALWAYS_RENDER
    Shader = ALPHA
    ParticleName = EXCloud06.tga
    Lifetime = 175 175
    SortLevel = 1
    Size = 25 40
    BurstDelay = 3 7
    BurstCount = 1 2
    IsEmitAboveGroundOnly = Yes
  End
  Color = DefaultColor
    Color1 = R:128 G:64 B:00 1
    Color2 = R:128 G:64 B:00 35
  End
  Alpha = DefaultAlpha
    Alpha2 = 0.2 0.4 50
    Alpha3 = 0 0 100
  End
  Update = DefaultUpdate
    SizeRate = 2 4
    SizeRateDamping = 0.96 0.98
    AngleZ = 0 7
    AngularRateZ = -0.03 0.03
    AngularDamping = 1 1
  End
  Physics = DefaultPhysics
    VelocityDamping = 0.95 0.9
    DriftVelocity = X:0.08 Y:0.08 Z:0.8
  End
  EmissionVelocity = OrthoEmissionVelocity
    X = 1 0.4
    Y = -0.4 0.4
    Z = -0.4 3
  End
  EmissionVolume = CylinderEmissionVolume
    IsHollow = Yes
    Radius = 8
  End
  Draw = DefaultDraw
  End
End
Object ElvenHaldir
CommandPoints = 0
WeaponSet
		Conditions				= WEAPONSET_TOGGLE_1 CONTAINED
		Weapon					= PRIMARY DwarvenMenOfDaleBlackArrows
		AutoChooseSources		= PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
	End
WeaponSet
		Conditions				= CONTAINED
		Weapon					= PRIMARY DwarvenMenOfDaleBlackArrows
		AutoChooseSources		= PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
	End

WeaponSet
		Conditions				= WEAPONSET_TOGGLE_1
		Weapon					= PRIMARY DwarvenMenOfDaleBlackArrows
		AutoChooseSources		= PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
	End

WeaponSet
		Conditions 			= None 
		Weapon     			= PRIMARY  NewHaldirSword  		
		AutoChooseSources	= PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI		
	End

WeaponSet
		Conditions		= WEAPONSET_HERO_MODE
		Weapon			= PRIMARY    HaldirHeroSword
	End
CommandSet = NewHaldirCommandSet
ReplaceModule ModuleTag_DRAW
	Draw = W3DScriptedModelDraw ModuleTag_DRAW1
		
		StaticModelLODMode					= yes
		OkToChangeModelColor = Yes
		
		; Sword version
		DefaultModelConditionState					
			Model							= EUHaldir_SKN
			Skeleton						= EUHaldir_SKL
			WeaponLaunchBone				= PRIMARY ARROW
			ParticleSysBone = B_SWORDBONE HaldirSwordglow FollowBone:Yes
		End

		; Bow version
		ModelConditionState					= WEAPONSET_TOGGLE_1
			Model							= EUHaldir_SKN
			Skeleton						= EUHaldir_SKL
			ParticleSysBone = B_SWORDBONE HaldirSwordglow FollowBone:Yes
			ParticleSysBone = BAT_RIBS balrogGroundHeatWave FollowBone:Yes
			ParticleSysBone = BAT_RIBS OneRing FollowBone:Yes
		End

		ModelConditionState = WEAPONSET_HERO_MODE
			ParticleSysBone = B_SWORDBONE BalrogSwordFire FollowBone:Yes
			ParticleSysBone = BAT_RIBS BalrogIgniteHeatWave FollowBone:Yes
			ParticleSysBone = BAT_JAW BalrogManeEmbers FollowBone:yes
			ParticleSysBone = BAT_HEAD BalrogManeFire FollowBone:yes
			ParticleSysBone = B_SWORDBONE HaldirSwordFlare1 FollowBone:Yes
			ParticleSysBone = BAT_RIBS OneRing FollowBone:Yes
		End
;BalrogIgniteHeatWave;;BalrogIgniteSphere;;BalrogIgniteWave

;--- Arrow Wind Special attack

;		AnimationState        = UNPACKING PACKING_TYPE_1
;			Animation           = ATKA1
;				AnimationName     = RULegolas_ATKA1	;ATKH1
;				AnimationMode     = ONCE
;			End
;			StateName           = STATE_Bow
;			BeginScript
;				Prev = CurDrawablePrevAnimationState()
;				if Prev == "STATE_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwitchToBow") end
;				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
;			EndScript
;		End
	
	
		AnimationState        = PREPARING PACKING_TYPE_1
			Animation           = Bow ;ATKA2
				AnimationName     = EUHaldir_ATA2 ;RULegolas_ATKA2
				AnimationMode     = LOOP
				AnimationSpeedFactorRange = 1.328 1.328
			End
			StateName           = STATE_Bow
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "STATE_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwitchToBow") end
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End
		
		AnimationState        = PACKING PACKING_TYPE_1
			Animation           = Bow ;ATKA3
				AnimationName     = EUHaldir_ATA2 ;RULegolas_ATKA3 
				AnimationMode     = LOOP
			End
			StateName           = STATE_Bow
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "STATE_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwitchToBow") end
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End

;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

		AnimationState						= PASSENGER WEAPONSET_TOGGLE_1
			StateName						= STATE_Grabbed
			Animation						= Bow
				AnimationName				= EUHaldir_FLYA
				AnimationMode				= LOOP
			End
		End
		AnimationState						= PASSENGER
			StateName						= STATE_Grabbed
			Animation						= Sword
				AnimationName				= EUHaldir_FLYB
				AnimationMode				= LOOP
			End
		End


		AnimationState						= FREEFALL WEAPONSET_TOGGLE_1
			StateName						= STATE_Falling
			Animation						= Bow
				AnimationName				= EUHaldir_FLYA
				AnimationMode				= LOOP
				AnimationBlendTime			= 10
				AnimationSpeedFactorRange	= 0.5	0.5
			End
		End
		AnimationState						= FREEFALL
			StateName						= STATE_Falling
			Animation						= Sword
				AnimationName				= EUHaldir_FLYB
				AnimationMode				= LOOP
				AnimationBlendTime			= 10
				AnimationSpeedFactorRange	= 0.24 0.24
			End
		End


		AnimationState						= STUNNED_FLAILING WEAPONSET_TOGGLE_1
			StateName						= STATE_Fly
			Animation
				AnimationName				= EUHaldir_FLYA
				AnimationMode				= LOOP
				AnimationSpeedFactorRange	= 0.4 0.6
			End
			Flags							= MAINTAIN_FRAME_ACROSS_STATES2
		End
		AnimationState						= STUNNED_FLAILING
			StateName						= STATE_Fly
			Animation						= Sword
				AnimationName				= EUHaldir_FLYB
				AnimationMode				= LOOP
				AnimationSpeedFactorRange	= 0.4 0.6
			End
			Flags							= MAINTAIN_FRAME_ACROSS_STATES2
			BeginScript
				PrevState = CurDrawablePrevAnimationState()
				PrevAnim = CurDrawablePrevAnimation()
				if PrevState == "Ready_Bow" or PrevState == "Moving_Bow" or PrevState == "Bored_Bow"
				then
					CurDrawableShowSubObject("arrow")
					CurDrawableShowSubObject("arrownock")
					return "WantSword"
				elseif PrevState == "STATE_Fly"
				then
					if PrevAnim == "Bow" or PrevAnim == "WantSword"
					then
						CurDrawableShowSubObject("arrow")
						CurDrawableShowSubObject("arrownock")
						return "WantSword"
					end
				end
				CurDrawableHideSubObject("ArrowNock")
				CurDrawableHideSubObject("arrow")
				return "Sword"
			EndScript
		End


		AnimationState						= DYING DEATH_1 SPLATTED WEAPONSET_TOGGLE_1
			StateName						= STATE_Dead
			Animation						= Bow
				AnimationName				= EUHaldir_LNDA
				AnimationMode				= ONCE
			End
		End
		AnimationState						= DYING DEATH_1 SPLATTED
			StateName						= STATE_Dead
			Animation						= Sword
				AnimationName				= EUHaldir_LNDB
				AnimationMode				= ONCE
			End
		End


		AnimationState						= DYING DEATH_1 WEAPONSET_TOGGLE_1
			Animation						= Bow1
				AnimationName				= EUHaldir_DIEBV5
				AnimationMode				= ONCE
			End
			Animation						= Bow2
				AnimationName				= EUHaldir_DIEBV5
				AnimationMode				= ONCE
			End
			Animation						= WantBow
				AnimationName				= EUHaldir_LNDA
				AnimationMode				= ONCE
			End
			BeginScript
				PrevState = CurDrawablePrevAnimationState()
				PrevAnim = CurDrawablePrevAnimation()
				if PrevState == "STATE_Fly"
				then
					CurDrawableHideSubObject("ArrowNock")
					CurDrawableHideSubObject("arrow")
					return "WantBow"
				end
				if GetClientRandomNumberReal(0,2) < 1
				then
					CurDrawableShowSubObject("arrow")
					CurDrawableShowSubObject("arrownock")
					return "Bow1"
				else
					CurDrawableShowSubObject("arrow")
					CurDrawableShowSubObject("arrownock")
					return "Bow2"
				end
			EndScript
		End
		AnimationState						= DYING DEATH_1
			Animation						= Sword1
				AnimationName				= EUHaldir_DIESv5
				AnimationMode				= ONCE
			End
			Animation						= Sword2
				AnimationName				= EUHaldir_DIESV5
				AnimationMode				= ONCE
			End
			Animation						= WantSword
				AnimationName				= EUHaldir_LNDB
				AnimationMode				= ONCE
			End
			BeginScript
				PrevState = CurDrawablePrevAnimationState()
				PrevAnim = CurDrawablePrevAnimation()
				if PrevState == "STATE_Fly"
				then
					CurDrawableShowSubObject("arrow")
					CurDrawableShowSubObject("arrownock")
					return "WantSword"
				end
				CurDrawableHideSubObject("ArrowNock")
				CurDrawableHideSubObject("arrow")
				if GetClientRandomNumberReal(0,2) < 1
				then
					return "Sword1"
				else
					return "Sword2"
				end
			EndScript
		End


		AnimationState						= DYING DEATH_2 WEAPONSET_TOGGLE_1
			Animation						= FadeOut
				AnimationName				= EUHaldir_DIEBV5
				AnimationMode				= ONCE
			End
		End
		AnimationState						= DYING DEATH_2
			Animation						= FadeOut
				AnimationName				= EUHaldir_DIESV5
				AnimationMode				= LOOP
			End
		End


		AnimationState						= STUNNED_STANDING_UP WEAPONSET_TOGGLE_1
			StateName						= STATE_GetUp
			Animation						= Bow
				AnimationName				= EUHaldir_GTPB
				AnimationMode				= ONCE
				AnimationSpeedFactorRange	= 1.42 1.42
			End
			Animation						= WantBow
				AnimationName				= EUHaldir_GTPSX1
				AnimationMode				= ONCE
			End
			Flags						= MAINTAIN_FRAME_ACROSS_STATES4
			BeginScript
				PrevState = CurDrawablePrevAnimationState()
				PrevAnim = CurDrawablePrevAnimation()
				if PrevState == "STATE_GetUp" or PrevState == "STATE_Land"
				then	
					if PrevAnim == "WantBow" or PrevAnim == "Sword"
					then
						CurDrawableHideSubObject("ArrowNock")
						CurDrawableHideSubObject("arrow")
						return "WantBow"
					end
				else
					CurDrawableShowSubObject("arrow")
					CurDrawableShowSubObject("arrownock")
					return "Bow"
				end
			EndScript
		End
		AnimationState						= STUNNED_STANDING_UP
			StateName						= STATE_GetUp
			Animation						= Sword
				AnimationName				= EUHaldir_GTPSX1
				AnimationMode				= ONCE
				AnimationSpeedFactorRange	= 1.2	1.2
			End
			Animation						= WantSword
				AnimationName				= EUHaldir_GTPB
				AnimationMode				= ONCE
			End
			Flags							= MAINTAIN_FRAME_ACROSS_STATES4
			BeginScript
				PrevState = CurDrawablePrevAnimationState()
				PrevAnim = CurDrawablePrevAnimation()
				if PrevState == "STATE_GetUp" or PrevState == "STATE_Land"
				then
					if PrevAnim == "Bow" or PrevAnim == "WantSword"
					then	
						CurDrawableShowSubObject("arrow")
						CurDrawableShowSubObject("arrownock")
						return "WantSword"
					end
				end
				CurDrawableHideSubObject("ArrowNock")
				CurDrawableHideSubObject("arrow")
				return "Sword"
			EndScript
		End


		AnimationState						= STUNNED WEAPONSET_TOGGLE_1
			StateName						= STATE_Land
			Animation						= Bow
				AnimationName				= EUHaldir_LNDA
				AnimationMode				= ONCE
			End
			Animation						= WantBow
				AnimationName				= EUHaldir_LNDB
				AnimationMode				= ONCE
			End
			Flags							= MAINTAIN_FRAME_ACROSS_STATES3
			BeginScript
				PrevState = CurDrawablePrevAnimationState()
				PrevAnim = CurDrawablePrevAnimation()
				if PrevState == "STATE_Fly"
				then
					if PrevAnim == "WantBow" or PrevAnim == "Sword"
					then
						CurDrawableHideSubObject("ArrowNock")
						CurDrawableHideSubObject("arrow")
						return "WantBow"
					end
				end
				CurDrawableShowSubObject("arrow")
				CurDrawableShowSubObject("arrownock")
				return "Bow"
			EndScript
		End
		AnimationState						= STUNNED
			StateName						= STATE_Land
			Animation						= Sword
				AnimationName				= EUHaldir_LNDB
				AnimationMode				= ONCE
			End
			Animation						= WantSword
				AnimationName				= EUHaldir_LNDA
				AnimationMode				= ONCE
			End
			BeginScript
				PrevState = CurDrawablePrevAnimationState()
				PrevAnim = CurDrawablePrevAnimation()
				if PrevState == "STATE_Fly"
				then
					if PrevAnim == "WantSword" or PrevAnim == "Bow"
					then
						CurDrawableShowSubObject("arrow")
						CurDrawableShowSubObject("arrownock")
						return "WantSword"
					end
				end
				Flags						= MAINTAIN_FRAME_ACROSS_STATES3
				CurDrawableHideSubObject("ArrowNock")
				CurDrawableHideSubObject("arrow")
				return "Sword"
			EndScript
		End

		AnimationState						= PARALYZED
			Animation
				AnimationName				= EUHaldir_IDLF
				AnimationMode				= LOOP
			End
		End


		AnimationState						= FIRING_OR_PREATTACK_A WEAPONSET_TOGGLE_1
			StateName						= Attacking_Bow
			Animation
				AnimationName				= EUHaldir_ATA2
				AnimationMode				= ONCE
				UseWeaponTiming				= Yes
				AnimationBlendTime			= 20
			End
			BeginScript
				CurDrawableShowSubObject("arrow")
				CurDrawableShowSubObject("ArrowNock")
			EndScript
		End
		AnimationState						= FIRING_OR_PREATTACK_A
			StateName						= Ready_Sword
			
			Animation						= AttackWithSwordA
				AnimationName				= EUHaldir_ATKSV2
				AnimationMode				= ONCE
				UseWeaponTiming				= Yes
			End
			Animation						= AttackWithSwordB
				AnimationName				= EUHaldir_ATKSV2
				AnimationMode				= ONCE
				UseWeaponTiming				= Yes
			End
			Animation						= AttackWithSwordD
				AnimationName				= EUHaldir_ATKSV4
				AnimationMode				= ONCE
				UseWeaponTiming				= Yes
			End
			BeginScript
				CurDrawableHideSubObject("ArrowNock")
				CurDrawableHideSubObject("arrow")
			EndScript
		End

		AnimationState						= SPECIAL_WEAPON_ONE
			Animation
				AnimationName				= EUHaldir_SPCA
				AnimationMode				= ONCE
			End
			FrameForPristineBonePositions	= 60
			BeginScript
				CurDrawableShowSubObject("arrow")
				CurDrawableShowSubObject("arrownock")
			EndScript
		End


		AnimationState						= MOVING WEAPONSET_TOGGLE_1
			StateName						= Moving_Bow
			Animation
				AnimationName				= EUHaldir_RUNB
				AnimationMode				= LOOP
			End
			Flags = RANDOMSTART
			BeginScript
				CurDrawableShowSubObject("arrow")
				CurDrawableShowSubObject("arrownock")
				Prev = CurDrawablePrevAnimationState()
				if Prev == "Moving_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwordToBow_Moving") end
			EndScript
		End
		AnimationState						= MOVING
			StateName						= Moving_Sword
			Animation
				AnimationName				= EUHaldir_RUNS
				AnimationMode				= LOOP
			End
			Flags = RANDOMSTART
			BeginScript
				CurDrawableHideSubObject("arrow")
				CurDrawableHideSubObject("arrownock")
				Prev = CurDrawablePrevAnimationState()
				if Prev == "Moving_Bow" then CurDrawableSetTransitionAnimState("TRANS_BowToSword_Moving") end
			EndScript
		End


		AnimationState						= PREATTACK_A WEAPONSET_TOGGLE_1
			Animation						= ReadyToDrawn
				AnimationName				= EUHaldir_ATA1
				AnimationMode				= ONCE
				AnimationBlendTime			= 0
				UseWeaponTiming				= Yes
			End
			BeginScript
				CurDrawableShowSubObject("arrow")
				CurDrawableShowSubObject("ArrowNock")
			EndScript
		End

		AnimationState						= FIRING_OR_RELOADING_A WEAPONSET_TOGGLE_1
			StateName						= STATE_Firing
			Animation
				AnimationName				= EUHaldir_ATA2
				AnimationMode				= ONCE
				AnimationBlendTime			= 30
				UseWeaponTiming				= Yes
				AnimationSpeedFactorRange	= 1.5 1.5
			End
			Flags							= START_FRAME_FIRST
			BeginScript
				CurDrawableHideSubObject("arrow")
				CurDrawableHideSubObject("ArrowNock")
			EndScript
		End


		AnimationState						= MOVING BACKING_UP WEAPONSET_TOGGLE_1
			StateName						= STATE_BackingUp
			Animation						= Bow
				AnimationName				= EUHaldir_BAKB
				AnimationMode				= LOOP
			End
			Animation						= WantBow
				AnimationName				= EUHaldir_BAKS
				AnimationMode				= LOOP
			End
			Flags							= MAINTAIN_FRAME_ACROSS_STATES4
			BeginScript
				CurDrawableShowSubObject("arrow")
				CurDrawableShowSubObject("arrownock")
				PrevAnim	= CurDrawablePrevAnimation()
				PrevState	= CurDrawablePrevAnimationState()
				if PrevState == "STATE_BackingUp"
				then
					if PrevAnim == "WantBow" or PrevAnim == "Sword"
					then
						return "WantBow"
					end
				end
				return "Bow"
			EndScript
		End
		AnimationState						= MOVING BACKING_UP
			StateName						= STATE_BackingUp
			Animation						= Sword
				AnimationName				= EUHaldir_BAKS
				AnimationMode				= LOOP
			End
			Animation						= WantSword
				AnimationName				= EUHaldir_BAKS
				AnimationMode				= LOOP
			End
			Flags							= MAINTAIN_FRAME_ACROSS_STATES4
			BeginScript
				CurDrawableHideSubObject("ARROW")
				CurDrawableHideSubObject("ARROWNOCK")
				PrevAnim	= CurDrawablePrevAnimation()
				PrevState	= CurDrawablePrevAnimationState()
				if PrevState == "STATE_BackingUp"
				then
					if PrevAnim == "Bow" or PrevAnim == "WantSword"
					then
						return "WantSword"
					end
				end
				return "Sword"
			EndScript
		End


		AnimationState						= CONTINUOUS_FIRE_MEAN
			Animation						= HangFrameWhileCoasting
				AnimationName				= EUHaldir_ATA2
				AnimationMode				= MANUAL
				AnimationBlendTime			= 20
			End
			Flags							= START_FRAME_LAST
			BeginScript
				CurDrawableShowSubObject("arrow")
				CurDrawableShowSubObject("ARROWNOCK")
				if CurDrawablePrevAnimationState() == "STATE_Firing" then CurDrawableAllowToContinue() end
			EndScript
			;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			;;;;
			;;;;	VERY IMPORTANT ARCHER INFORMATION
			;;;;	THIS WILL STOP THE JITTERS, AND BEST
			;;;;	YET, IT'S A COMPLETE HACK! Just look above.
			;;;;	We say that if we get into this state
			;;;;	from firing, just continue to fire. DONE.
			;;;;
			;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
		End
		AnimationState						= CONTINUOUS_FIRE_SLOW
			StateName						= Ready_Bow
			Animation						= PutAwayArrow
				AnimationName				= EUHaldir_ATA3
				AnimationMode				= ONCE
			End
			BeginScript
				CurDrawableShowSubObject("arrow")
				CurDrawableShowSubObject("ARROWNOCK")
			EndScript
		End


		AnimationState						= ATTACKING WEAPONSET_TOGGLE_1
			StateName						= Ready_Bow
			Animation						= IDLB
				AnimationName				= EUHaldir_IDLB
				AnimationMode				= LOOP
			End
			BeginScript
				CurDrawableShowSubObject("arrow")
				CurDrawableShowSubObject("arrownock")
				PrevAnim = CurDrawablePrevAnimation()
				Prev = CurDrawablePrevAnimationState()
				if Prev == "Bored_Bow" then CurDrawableSetTransitionAnimState("TRANS_BR_Bow") end
				if Prev == "Selected_Bow" then CurDrawableSetTransitionAnimState("TRANS_SelectedToReady_Bow") end
				if Prev == "Selected_Sword" or Prev == "Moving_Sword" or Prev == "Ready_Sword" or Prev == "Bored_Sword" or PrevAnim == "WantBow"
				then 
					CurDrawableSetTransitionAnimState("TRANS_SwordToBow_Ready")
				end
			EndScript
		End
		AnimationState						= ATTACKING
			StateName						= Ready_Sword
			Animation						= Alert_1
				AnimationName				= EUHaldir_IDLST1
				AnimationMode				= LOOP
			End
			BeginScript
				PrevAnim = CurDrawablePrevAnimation()
				Prev = CurDrawablePrevAnimationState()
				CurDrawableHideSubObject("ArrowNock")
				CurDrawableHideSubObject("arrow")
				if Prev == "Bored_Sword" then CurDrawableSetTransitionAnimState("TRANS_BR_Sword") end
				if Prev == "Selected_Bow" or Prev == "Moving_Bow" or Prev == "Ready_Bow" or Prev == "Bored_Bow" or PrevAnim == "WantSword"
				then 
					CurDrawableSetTransitionAnimState("TRANS_BowToSword_Ready")
				end
			EndScript
		End


		AnimationState						= ENGAGED WEAPONSET_TOGGLE_1
			StateName						= Ready_Bow
			Animation						= IDLB
				AnimationName				= EUHaldir_IDLB
				AnimationMode				= LOOP
			End
			BeginScript
				CurDrawableShowSubObject("arrow")
				CurDrawableShowSubObject("arrownock")
				PrevAnim = CurDrawablePrevAnimation()
				Prev = CurDrawablePrevAnimationState()
				if Prev == "Bored_Bow"		then CurDrawableSetTransitionAnimState("TRANS_BR_Bow")				end
				if Prev == "Selected_Bow"	then CurDrawableSetTransitionAnimState("TRANS_SelectedToReady_Bow")				end
				if Prev == "Selected_Sword" or Prev == "Moving_Sword" or Prev == "Ready_Sword" or Prev == "Bored_Sword" or PrevAnim == "WantBow"
				then 
					CurDrawableSetTransitionAnimState("TRANS_SwordToBow_Ready")	
				end
			EndScript
		End
		AnimationState						= ENGAGED
			StateName						= Ready_Sword
			Animation						= Alert_1
				AnimationName				= EUHaldir_IDLST1
				AnimationMode				= LOOP
			End
			BeginScript
				PrevAnim = CurDrawablePrevAnimation()
				Prev = CurDrawablePrevAnimationState()
				CurDrawableHideSubObject("ArrowNock")
				CurDrawableHideSubObject("arrow")
				if Prev == "Bored_Sword"		then CurDrawableSetTransitionAnimState("TRANS_BR_Sword")			end
				if Prev == "Selected_Bow" or Prev == "Moving_Bow" or Prev == "Ready_Bow" or Prev == "Bored_Bow" or PrevAnim == "WantSword"
				then 
					CurDrawableSetTransitionAnimState("TRANS_BowToSword_Ready")	
				end
			EndScript
		End


		AnimationState						= EMOTION_ALERT WEAPONSET_TOGGLE_1
			StateName						= Ready_Bow
			Animation						= IDLB
				AnimationName				= EUHaldir_IDLB
				AnimationMode				= LOOP
			End
			BeginScript
				CurDrawableShowSubObject("arrow")
				CurDrawableShowSubObject("arrownock")
				PrevAnim = CurDrawablePrevAnimation()
				Prev = CurDrawablePrevAnimationState()
				if Prev == "Bored_Bow"		then CurDrawableSetTransitionAnimState("TRANS_BR_Bow") end
				if Prev == "Selected_Bow"	then CurDrawableSetTransitionAnimState("TRANS_SelectedToReady_Bow") end
				if Prev == "Selected_Sword" or Prev == "Moving_Sword" or Prev == "Ready_Sword" or Prev == "Bored_Sword" or PrevAnim == "WantBow"
				then 
					CurDrawableSetTransitionAnimState("TRANS_SwordToBow_Ready")	
				end				
			EndScript
		End 
		AnimationState						= EMOTION_ALERT
			StateName						= Ready_Sword
			Animation						= Alert_1
				AnimationName				= EUHaldir_IDLST1
				AnimationMode				= LOOP
			End
			BeginScript
				PrevAnim = CurDrawablePrevAnimation()
				Prev = CurDrawablePrevAnimationState()
				CurDrawableHideSubObject("ArrowNock")
				CurDrawableHideSubObject("arrow")
				if Prev == "Bored_Sword" then CurDrawableSetTransitionAnimState("TRANS_BR_Sword") end
				if Prev == "Selected_Bow" or Prev == "Moving_Bow" or Prev == "Ready_Bow" or Prev == "Bored_Bow" or PrevAnim == "WantSword"
				then 
					CurDrawableSetTransitionAnimState("TRANS_BowToSword_Ready")	
				end
			EndScript
		End


		AnimationState						= EMOTION_CELEBRATING WEAPONSET_TOGGLE_1
			StateName						= STATE_Emotion_Bow
			Animation						= Bow
				AnimationName				= EUHaldir_CHRB
				AnimationMode				= ONCE
			End
			Animation						= Bow2
				AnimationName				= EUHaldir_CHRB
				AnimationMode				= ONCE
			End
			Flags							= MAINTAIN_FRAME_ACROSS_STATES RESTART_ANIM_WHEN_COMPLETE
			BeginScript
				PrevState = CurDrawablePrevAnimationState()
				CurDrawableShowSubObject("arrow")
				CurDrawableShowSubObject("arrownock")
				if PrevState == "STATE_Emotion_Sword"
				then
					CurDrawableAllowToContinue()
					if( CurDrawablePrevAnimFraction() > .89 )
					then
						CurDrawableSetTransitionAnimState("TRANS_SwordToBow_Ready")
					end
				elseif PrevState == "STATE_Emotion_Bow"
				then
					CurDrawableAllowToContinue()
				elseif PrevState == "Selected_Bow"
				then
					CurDrawableSetTransitionAnimState("TRANS_SelectedToReady_Bow")
				end
			EndScript
		End
		AnimationState						= EMOTION_CELEBRATING
			StateName						= STATE_Emotion_Sword
			Animation						= Sword
				AnimationName				= EUHaldir_CHRS
				AnimationMode				= ONCE
			End
			Animation						= Sword2
				AnimationName				= EUHaldir_CHRS
				AnimationMode				= ONCE
			End
			Flags							= MAINTAIN_FRAME_ACROSS_STATES RESTART_ANIM_WHEN_COMPLETE
			BeginScript
				PrevState = CurDrawablePrevAnimationState()
				CurDrawableHideSubObject("arrow")
				CurDrawableHideSubObject("arrownock")
				
				if PrevState == "STATE_Emotion_Bow"
				then
					CurDrawableAllowToContinue()
					if( CurDrawablePrevAnimFraction() > .89 )
					then
						CurDrawableSetTransitionAnimState("TRANS_BowToSword_Ready")
					end
				elseif PrevState == "STATE_Emotion_Sword"
				then
					CurDrawableAllowToContinue()
				elseif PrevState == "Bored_Sword"
				then
					CurDrawableSetTransitionAnimState("TRANS_BR_Sword")
				end
			EndScript
		End
		


		AnimationState						= EMOTION_TAUNTING WEAPONSET_TOGGLE_1
			StateName						= STATE_Emotion_Bow
			Animation						= Bow1
				AnimationName				= EUHaldir_TNTA
				AnimationMode				= ONCE
			End
			Animation						= Bow2
				AnimationName				= EUHaldir_TNTA
				AnimationMode				= ONCE
			End
			Flags							= RESTART_ANIM_WHEN_COMPLETE
			BeginScript
				PrevState = CurDrawablePrevAnimationState()
				CurDrawableShowSubObject("arrow")
				CurDrawableShowSubObject("arrownock")
				
				if PrevState == "STATE_Emotion_Sword"
				then
					CurDrawableAllowToContinue()
					if( CurDrawablePrevAnimFraction() > .89 )
					then
						CurDrawableSetTransitionAnimState("TRANS_SwordToBow_Ready")
					end
				elseif PrevState == "STATE_Emotion_Bow"
				then
					CurDrawableAllowToContinue()
				elseif PrevState == "Selected_Bow"
				then
					CurDrawableSetTransitionAnimState("TRANS_SelectedToReady_Bow")
				elseif PrevState == "Bored_Bow"
				then
					CurDrawableSetTransitionAnimState("TRANS_BR_Bow")
				end
			EndScript
		End
		AnimationState						= EMOTION_TAUNTING
			StateName						= STATE_Emotion_Sword
			Animation						= Sword
				AnimationName				= EUHaldir_TNTB
				AnimationMode				= ONCE
			End
			Animation						= Sword2
				AnimationName				= EUHaldir_TNTB
				AnimationMode				= ONCE
			End
			Flags							= RESTART_ANIM_WHEN_COMPLETE
			BeginScript
				PrevState = CurDrawablePrevAnimationState()
				CurDrawableHideSubObject("arrow")
				CurDrawableHideSubObject("arrownock")
				if PrevState == "STATE_Emotion_Bow"
				then
					CurDrawableAllowToContinue()
					if( CurDrawablePrevAnimFraction() > .89 )
					then
						CurDrawableSetTransitionAnimState("TRANS_BowToSword_Ready")
					end
				elseif PrevState == "STATE_Emotion_Sword"
					then
						CurDrawableAllowToContinue()
				elseif PrevState == "Bored_Sword"
				then
					CurDrawableSetTransitionAnimState("TRANS_BR_Sword")
				end
			EndScript
		End


		AnimationState						= EMOTION_POINTING WEAPONSET_TOGGLE_1
			StateName						= STATE_Emotion_Bow
			Animation						= Bow
				AnimationName				= EUHaldir_PNTA
				AnimationMode				= ONCE
			End
			Animation						= Bow2
				AnimationName				= EUHaldir_PNTA
				AnimationMode				= ONCE
			End
			Flags							= MAINTAIN_FRAME_ACROSS_STATES RESTART_ANIM_WHEN_COMPLETE
			BeginScript
				PrevState = CurDrawablePrevAnimationState()
				CurDrawableShowSubObject("arrow")
				CurDrawableShowSubObject("arrownock")
				
				if PrevState == "STATE_Emotion_Sword"
				then
					CurDrawableAllowToContinue()
					if( CurDrawablePrevAnimFraction() > .89 )
					then
						CurDrawableSetTransitionAnimState("TRANS_SwordToBow_Ready")
					end
				elseif PrevState == "STATE_Emotion_Bow"
				then
					CurDrawableAllowToContinue()
				elseif PrevState == "Selected_Bow"
				then
					CurDrawableSetTransitionAnimState("TRANS_SelectedToReady_Bow")
				elseif PrevState == "Bored_Bow"
				then
					CurDrawableSetTransitionAnimState("TRANS_BR_Bow")
				end
			EndScript
		End
		AnimationState						= EMOTION_POINTING
			StateName						= STATE_Emotion_Sword
			Animation						= Sword
				AnimationName				= EUHaldir_PNTB
				AnimationMode				= ONCE
			End
			Animation						= Sword2
				AnimationName				= EUHaldir_PNTB
				AnimationMode				= ONCE
			End
			Flags							= MAINTAIN_FRAME_ACROSS_STATES RESTART_ANIM_WHEN_COMPLETE
			BeginScript
				PrevState = CurDrawablePrevAnimationState()
				CurDrawableHideSubObject("arrow")
				CurDrawableHideSubObject("arrownock")
				
				if PrevState == "STATE_Emotion_Bow"
				then
					CurDrawableAllowToContinue()
					if( CurDrawablePrevAnimFraction() > .89 )
					then
						CurDrawableSetTransitionAnimState("TRANS_BowToSword_Ready")
					end
				elseif PrevState == "STATE_Emotion_Sword"
				then
					CurDrawableAllowToContinue()
				elseif PrevState == "Bored_Sword"
				then
					CurDrawableSetTransitionAnimState("TRANS_BR_Sword")
				end
			EndScript
		End


		AnimationState 						= HIT_REACTION HIT_LEVEL_1 WEAPONSET_TOGGLE_1
			StateName						= Bored_Bow
			Animation
				AnimationName				= EUHaldir_HITA
				AnimationMode 				= ONCE
				AnimationSpeedFactorRange	= .9 .9
			End
		End
		AnimationState						= HIT_REACTION HIT_LEVEL_1
			StateName						= Bored_Sword
			Animation
				AnimationName				= EUHaldir_HITE
				AnimationMode				= ONCE
			End
		End

		AnimationState						= RAISING_FLAG WEAPONSET_TOGGLE_1
			StateName						= STATE_Emotion_Bow
			Animation						= Bow
				AnimationName				= EUHaldir_CHRB
				AnimationMode				= ONCE
			End
			Animation						= Bow2
				AnimationName				= EUHaldir_CHRB
				AnimationMode				= ONCE
			End
			Flags							= RESTART_ANIM_WHEN_COMPLETE
		End

		AnimationState						= SELECTED WEAPONSET_TOGGLE_1
			StateName						= Selected_Bow
			Animation						= ATNE
				AnimationName				= EUHaldir_ATNE
				AnimationMode				= LOOP
			End
			BeginScript
				CurDrawableShowSubObject("arrow")
				CurDrawableShowSubObject("arrownock")
				PrevAnim = CurDrawablePrevAnimation()
				Prev = CurDrawablePrevAnimationState()
				if Prev == "STATE_Emotion_Bow" or Prev == "STATE_Emotion_Sword" then CurDrawableAllowToContinue() end
				if Prev == "Bored_Bow" then CurDrawableSetTransitionAnimState("TRANS_BoredToSelected_Bow") end
				if Prev == "Ready_Bow" then CurDrawableSetTransitionAnimState("TRANS_RS_Bow") end
				if Prev == "Selected_Sword" or Prev == "Moving_Sword" or Prev == "Ready_Sword" or Prev == "Bored_Sword" or PrevAnim == "WantBow"
				then 
					CurDrawableSetTransitionAnimState("TRANS_SwordToBow_Selected")	
				end
			EndScript
		End

		AnimationState						= RAISING_FLAG
			StateName						= STATE_Emotion_Sword
			Animation						= Sword
				AnimationName				= EUHaldir_CHRS
				AnimationMode				= ONCE
			End
			Animation						= Sword2
				AnimationName				= EUHaldir_CHRS
				AnimationMode				= ONCE
			End
			Flags							= RESTART_ANIM_WHEN_COMPLETE
		End
		
		AnimationState						= SELECTED
			StateName						= Selected_Sword
			Animation						= ATNA
				AnimationName				= EUHaldir_ATNS
				AnimationMode				= LOOP
			End
			BeginScript
				CurDrawableHideSubObject("ARROW")
				CurDrawableHideSubObject("ARROWNOCK")
				PrevAnim = CurDrawablePrevAnimation()
				Prev = CurDrawablePrevAnimationState()
				if Prev == "STATE_Emotion_Bow" or Prev == "STATE_Emotion_Sword" then CurDrawableAllowToContinue() end
				if Prev == "Bored_Sword" then CurDrawableSetTransitionAnimState("TRANS_BoredToSelected_Sword") end
				if Prev == "Ready_Sword" then CurDrawableSetTransitionAnimState("TRANS_ReadyToSelected_Sword") end
				if Prev == "Selected_Bow" or Prev == "Moving_Bow" or Prev == "Ready_Bow" or Prev == "Bored_Bow" or PrevAnim == "WantSword" or PrevAnim == "EUHaldir_STHB"
				then
					CurDrawableSetTransitionAnimState("TRANS_BowToSword_Selected")
				end
			EndScript
		End


		IdleAnimationState
			StateName						= Bored_Sword
			Animation						= Idle_Sword1
				AnimationName				= EUHaldir_IDLF
				AnimationMode				= ONCE
			End
			Animation						= Idle_Sword2
				AnimationName				= EUHaldir_IDLF
				AnimationMode				= ONCE
			End
			Animation						= Idle_Sword3
				AnimationName				= EUHaldir_IDLF
				AnimationMode				= ONCE
			End
			Animation						= IdleNoFidget
				AnimationName				= EUHaldir_IDLF
				AnimationMode				= ONCE
				AnimationPriority			= 20
			End
			Animation						= IdleNoFidget2
				AnimationName				= EUHaldir_IDLF
				AnimationMode				= ONCE
				AnimationPriority			= 0
			End
			Flags							= RESTART_ANIM_WHEN_COMPLETE
			BeginScript
				CurDrawableHideSubObject("ARROW")
				CurDrawableHideSubObject("ARROWNOCK")
				PrevAnim = CurDrawablePrevAnimation()
				Prev = CurDrawablePrevAnimationState()
				if Prev == "TRANS_SelectedToBored_Sword" or Prev == "TRANS_RB_Sword" then return "IdleNoFidget" end
				if Prev == "Selected_Sword" then CurDrawableSetTransitionAnimState("TRANS_SelectedToBored_Sword") end
				if Prev == "Ready_Sword" then CurDrawableSetTransitionAnimState("TRANS_RB_Sword") end
				if Prev == "Selected_Bow" or Prev == "Moving_Bow" or Prev == "Ready_Bow" or Prev == "Bored_Bow" or PrevAnim == "WantSword"
				then 
					CurDrawableSetTransitionAnimState("TRANS_BowToSword_Selected")
				end
			EndScript
		End


		AnimationState						= WEAPONSET_TOGGLE_1
			StateName						= Bored_Bow
			Animation						= IdleBowB
				AnimationName				= EUHaldir_IDLE
				AnimationMode				= ONCE
			End
			Animation						= IdleBowD
				AnimationName				= EUHaldir_IDLE
				AnimationMode				= ONCE
			End
			Animation						= IdleNoFidget
				AnimationName				= EUHaldir_IDLE
				AnimationMode				= ONCE
				AnimationPriority			= 20
			End
			Animation						= IdleNoFidget2
				AnimationName				= EUHaldir_IDLE
				AnimationMode				= ONCE
				AnimationPriority			= 10
			End
			Flags							= RESTART_ANIM_WHEN_COMPLETE
			BeginScript	
				CurDrawableShowSubObject("arrow")
				CurDrawableShowSubObject("arrownock")
				PrevAnim = CurDrawablePrevAnimation()
				Prev = CurDrawablePrevAnimationState()
				if Prev == "TRANS_SelectedToBored_Bow" or Prev == "TRANS_RB_Bow" then return "IdleNoFidget" end
				if Prev == "Selected_Bow" then CurDrawableSetTransitionAnimState("TRANS_SelectedToBored_Bow") end
				if Prev == "Ready_Bow" then CurDrawableSetTransitionAnimState("TRANS_RB_Bow") end
				if Prev == "Selected_Sword" or Prev == "Moving_Sword" or Prev == "Ready_Sword" or Prev == "Bored_Sword" or PrevAnim == "WantBow"
				then 
					CurDrawableSetTransitionAnimState("TRANS_SwordToBow_Selected")
				end
			EndScript
		End


		; Transitions

		TransitionState						= TRANS_BoredToSelected_Bow
			Animation
				AnimationName				= EUHaldir_ATNB
				AnimationMode				= ONCE
				AnimationBlendTime			= 10
			End
		End


		TransitionState						= TRANS_SelectedToReady_Bow
			Animation						= ATNE
				AnimationName				= EUHaldir_IDLB
				AnimationMode				= ONCE
				AnimationBlendTime			= 10
			End
		End


		TransitionState						= TRANS_SelectedToBored_Bow
			Animation
				AnimationName				= EUHaldir_ATNB
				AnimationMode				= ONCE_BACKWARDS
			End
			Flags							= START_FRAME_LAST
		End


		TransitionState						= TRANS_RS_Bow
			Animation						= ATNF
				AnimationName				= EUHaldir_IDLB
				AnimationMode				= ONCE_BACKWARDS
				AnimationBlendTime			= 10
			End
			Flags							= START_FRAME_LAST
		End


		TransitionState						= TRANS_BR_Bow
			Animation						= IDLB
				AnimationName				= EUHaldir_IDLST1
				AnimationMode				= ONCE
				AnimationBlendTime			= 20
			End
		End


		TransitionState						= TRANS_RB_Bow
			Animation						= IDLD
				AnimationName				= EUHaldir_IDLB
				AnimationMode				= ONCE
				AnimationBlendTime			= 20
			End
		End


		TransitionState					= TRANS_BoredToSelected_Sword
			Animation					= ATNA
				AnimationName			= EUHaldir_ATNA
				AnimationMode			= ONCE
			End
		End


		TransitionState					= TRANS_SR_Sword
			Animation					= ATNC
				AnimationName			= EUHaldir_STHA
				AnimationMode			= ONCE
			End
		End


		TransitionState					= TRANS_SelectedToBored_Sword
			Animation					= ATNA
				AnimationName			= EUHaldir_ATNA
				AnimationMode			= ONCE_BACKWARDS
			End
			Flags						= START_FRAME_LAST
		End


		TransitionState					= TRANS_ReadyToSelected_Sword
			Animation					= ATNC
				AnimationName			= EUHaldir_IDLST1
				AnimationMode			= ONCE_BACKWARDS
				AnimationBlendTime		= 20
			End
			Flags						= START_FRAME_LAST
		End


		TransitionState					= TRANS_BR_Sword
			Animation					= ATNS
				AnimationName			= EUHaldir_STHA
				AnimationMode			= ONCE
				AnimationBlendTime		= 20
			End
		End


		TransitionState					= TRANS_RB_Sword
			Animation					= IDLG
				AnimationName			= EUHaldir_STHA
				AnimationMode			= ONCE
				AnimationBlendTime		= 20
			End
		End
		


		TransitionState					= TRANS_SwordToBow_Moving
			Animation					= DrawBow
				AnimationName			= EUHaldir_STHC
				AnimationMode			= ONCE
			End
		End


		TransitionState					= TRANS_BowToSword_Moving
			Animation					= DrawSword
				AnimationName			= EUHaldir_STHD
				AnimationMode			= ONCE
			End
		End


		TransitionState					= TRANS_BowToSword_Ready
			Animation					= DrawSwords
				AnimationName			= EUHaldir_STHA
				AnimationMode			= ONCE
			End
		End


		TransitionState					= TRANS_SwordToBow_Ready
			Animation					= DrawBow
				AnimationName			= EUHaldir_STHB
				AnimationMode			= ONCE
			End
		End


		TransitionState					= TRANS_BowToSword_Selected
			Animation					= DrawSwords
				AnimationName			= EUHaldir_STHA
				AnimationMode			= ONCE
			End
		End


		TransitionState					= TRANS_SwordToBow_Selected
			Animation					= DrawBow
				AnimationName			= EUHaldir_STHB
				AnimationMode			= ONCE
			End
		End
	End
	End
AddModule ModuleTag_FireflightUnpause
	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_FireflightUnpause
		SpecialPowerTemplate	= SpecialAbilityDrogothFireflight
		TriggeredBy				= Upgrade_ObjectLevel6 ; Upgrade_ObjectLevel10
	End
	End
AddModule ModuleTag_FireflightStarter
	Behavior = SpecialPowerModule ModuleTag_FireflightStarter                      
		SpecialPowerTemplate		= SpecialAbilityDrogothFireflight
		UpdateModuleStartsAttack	= Yes
		StartsPaused				= Yes
		InitiateSound				= DrogothVoxAttack
	End
	End
AddModule ModuleTag_FireflightUpdate
	Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_FireflightUpdate   
		SpecialPowerTemplate    = SpecialAbilityDrogothFireflight
		CustomAnimAndDuration	= AnimState:USER_1	AnimTime:2000
		SkipContinue			= Yes

		UnpackTime             	= 1100
		PreparationTime			= 1
		PackTime				= 900
		
		AwardXPForTriggering    = 0
		
		StartAbilityRange		= DROGOTH_FIREFLIGHT_RANGE
		MustFinishAbility		= Yes
		SpecialWeapon			= DrogothFireflight
		TriggerSound			= DrogothFireflightMS
	End
	End
AddModule
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_AragornBladeMasterEnabler
		SpecialPowerTemplate = SpecialAbilityAragornBladeMaster
		TriggeredBy = Upgrade_AragornBladeMaster
	End
End
AddModule
  	Behavior = SpecialPowerModule ModuleTag_AragornBladeMasterStarter                ; SpecialAbility is a SpecialPower, SpecialPower is anyting special
		SpecialPowerTemplate    = SpecialAbilityAragornBladeMaster
		StartsPaused			= Yes
	End
End
AddModule
	Behavior = HeroModeSpecialAbilityUpdate ModuleTag_AragornBladeMasterUpdate   ; So the difference in SpecialAbility is that it takes timing from this Update, instead of simply firing.
		SpecialPowerTemplate    = SpecialAbilityAragornBladeMaster
		HeroAttributeModifier	= NewAragornBladeMaster
		HeroEffectDuration		= 30000 ; this should sync with the auto ability delay re-fire time in commandButtons.ini
		UnpackTime              = 1 ; insant unpack
		TriggerSound			= AragornBladeMaster
	End
End
AddModule
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_ThornArrowEnabler
		SpecialPowerTemplate		= SpecialAbilityThornVengeance
		TriggeredBy					= Upgrade_ThranduilThornofVengeance
	End
End
AddModule
	Behavior = SpecialPowerModule ModuleTag_ThornArrow
		SpecialPowerTemplate		= SpecialAbilityThornVengeance
		UpdateModuleStartsAttack	= Yes
		StartsPaused				= Yes
	End
End
AddModule
	Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_ThornArrowUpdate
		SpecialPowerTemplate		= SpecialAbilityThornVengeance
		SkipContinue				= Yes
		UnpackTime					= 1600
		PreparationTime				= 2
		PackTime					= 850
		AwardXPForTriggering		= 0
		StartAbilityRange			= 325.0									; Note: This has to be smaller than the weapon range or it'll never succeed
		ApproachRequiresLOS			= Yes		
		SpecialWeapon				= HaradrimBarbedArrow
		WhichSpecialWeapon			= 1
	End
End
AddModule
	Behavior = AutoAbilityBehavior ModuleTag_ThornArrowAutoAbility
		SpecialAbility				= SpecialAbilityThornVengeance
		MaxScanRange				= 300
		Query						= 1 ANY ENEMIES +HERO +MONSTER
		Query						= 1 ALL ENEMIES
	End
End
AddModule
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_WordEnabler
	SpecialPowerTemplate = SpecialAbilityCreateAHeroWordOfPower
	TriggeredBy			 = Upgrade_GandalfWordOfPower
End
End
AddModule
Behavior = SpecialPowerModule ModuleTag_WordStarter       
	SpecialPowerTemplate      = SpecialAbilityCreateAHeroWordOfPower
	UpdateModuleStartsAttack  = Yes
	StartsPaused		  	  = Yes
End
End
AddModule
Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_WordWeaponFireUpdate   
	SpecialPowerTemplate	   = SpecialAbilityCreateAHeroWordOfPower
	WhichSpecialWeapon		   = 1
	SkipContinue			   = Yes
	UnpackTime				   = 1700 
	PackTime				   = 1	   
	FreezeAfterTriggerDuration = 2900 // Hold AI for this long after we	fire.
	AwardXPForTriggering	   = 0	   
	StartAbilityRange		   = 180.0
	SpecialWeapon			   = CreateAHeroWordOfPower
	PlayWeaponPreFireFX		   = Yes
End
End
AddModule
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_KnifeEnabler
		SpecialPowerTemplate = SpecialAbilityKnifeFighter
		TriggeredBy = Upgrade_LegolasKnifeFighter
	End
End
AddModule
	Behavior = WeaponModeSpecialPowerUpdate ModuleTag_KnifeFighterPowerUpdate
		SpecialPowerTemplate		= SpecialAbilityKnifeFighter
		Duration				= 30000
		AttributeModifier			= LegolasKnifeFighterBonus
		LockWeaponSlot			= SECONDARY
		StartsPaused			= Yes
	End
End
AddModule
	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_ArrowWindEnabler
		SpecialPowerTemplate = SpecialAbilityArrowStorm
		TriggeredBy = Upgrade_LegolasArrowWind
	End
	End
AddModule
	Behavior = SpecialPowerModule ModuleTag_ArrowWindStarter                      
		SpecialPowerTemplate		= SpecialAbilityArrowStorm
		UpdateModuleStartsAttack	= Yes
		StartsPaused			= Yes
		InitiateSound			= HaldirGoldenArrowShoot		;this plays when he targets, not when he fires
	End
	End
AddModule
	Behavior = ArrowStormUpdate ModuleTag_ArrowWindUpdate                
		SpecialPowerTemplate    = SpecialAbilityArrowStorm
		StartAbilityRange       = 320.0
		
		UnpackTime              = 1000	; Pull out arrow
		PreparationTime         = 200	; Quick shot
		PersistentPrepTime      = 600	; looping the quick shot
		PackTime                = 1200	; back to idle
		UnpackingVariation		= 1		; Use custom variation to not interfere with Archer Training ability.
		ParalyzeDurationWhenCompleted = 600	;Once the unit SUCCESSFULLY COMPLETES an ability, paralyze unit briefly to deal with animation transitions.
		ParalyzeDurationWhenAborted = 800	;If the unit ABORTS the ability, paralyze the unit briefly to deal with animation transitions.

		ApproachRequiresLOS     = Yes ; required so that it doesn't shoot through walls

		AwardXPForTriggering    = 0

		;Specific to ArrowStorm
		WeaponTemplate  = LegolasBowArrowStorm
		TargetRadius    = 200	;CHANGING THIS??? Change RadiusCursorRadius to match this value in the appropriate SpecialPower.ini template.
		ShotsPerTarget  = 1
		ShotsPerBurst   = 10
		MaxShots        = 120  ; can end sooner if no targets
  		CanShootEmptyGround = Yes ; ...unless this is set
	End
	End
AddModule
	Behavior = UnpauseSpecialPowerUpgrade ModulTag_ElrondTornadoEnabler
		SpecialPowerTemplate	= SpecialAbilityFireGuard
		TriggeredBy				= Upgrade_ElrondTornado
	End
End
	AddModule
	Behavior = OCLSpecialPower	ModuleTag_OCLSpawnTornado
		SpecialPowerTemplate	= SpecialAbilityFireGuard
		OCL						= SUPERWEAPON_SpawnWhirlwind
		CreateLocation			= CREATE_AT_LOCATION
		StartsPaused			= Yes
		SetModelCondition			= ModelConditionState:USER_4
		SetModelConditionTime		= 2.333
	End
End
ReplaceModule ModuleTag_LegolasHealing
Behavior = AutoHealBehavior ModuleTag_LegolasHealing1
		StartsActive = Yes
		HealingAmount = 80
		HealingDelay = 7000
		StartHealingDelay = 7000
		HealOnlyIfNotInCombat = Yes
	End
	End
End

ExperienceLevel	HaldirLevel2;8534
	TargetNames						=	ElvenHaldir
	RequiredExperience				=	HALDIR_LVL2_EXP_NEEDED 
	ExperienceAward					=	HALDIR_LVL2_EXP_AWARD	
	AttributeModifiers				=	HeroLevelUpDamage1
	Rank					= 2
	LevelUpFx				= FX:GandalfLevelUp1FX
	Upgrades				= Upgrade_ThranduilThornofVengeance					
	SelectionDecal
		Texture				= decal_hero_good
		Style				= SHADOW_ALPHA_DECAL
		OpacityMin			= 50%	
		OpacityMax			= 100%
		MinRadius			= 40
		MaxRadius			= 200
		MaxSelectedUnits	= 40
	End
End
ExperienceLevel	HaldirLevel4
	TargetNames						=	ElvenHaldir
	RequiredExperience				=	HALDIR_LVL4_EXP_NEEDED 
	ExperienceAward					=	HALDIR_LVL4_EXP_AWARD	
	AttributeModifiers				=	HeroLevelUpDamage3
	Rank					= 4
	LevelUpFx				= FX:GandalfLevelUp1FX
	Upgrades				= Upgrade_CreateAHeroBombard_Level3					
	SelectionDecal
		Texture				= decal_hero_good
		Style				= SHADOW_ALPHA_DECAL
		OpacityMin			= 50%	
		OpacityMax			= 100%
		MinRadius			= 40
		MaxRadius			= 200
		MaxSelectedUnits	= 40
	End
End
ExperienceLevel	HaldirLevel6
	TargetNames						=	ElvenHaldir
	RequiredExperience				=	HALDIR_LVL6_EXP_NEEDED 
	ExperienceAward					=	HALDIR_LVL6_EXP_AWARD	
	AttributeModifiers				=	HeroLevelUpDamage5
	Rank							=	6
	LevelUpFx						=	FX:GandalfLevelUp1FX
	Upgrades						=	Upgrade_HaldirLeadership
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Upgrades						=	Upgrade_AragornBladeMaster;Upgrade_LegolasKnifeFighter
	SelectionDecal
		Texture						=	decal_hero_good	
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40 ;16
		MaxRadius					=	200 ;16
		MaxSelectedUnits			=	40 ;1
	End	
End	
ExperienceLevel	HaldirLevel6
	TargetNames						=	ElvenHaldir
	RequiredExperience				=	HALDIR_LVL6_EXP_NEEDED 
	ExperienceAward					=	HALDIR_LVL6_EXP_AWARD	
	AttributeModifiers				=	HeroLevelUpDamage5
	Rank							=	6
	LevelUpFx						=	FX:GandalfLevelUp1FX
	Upgrades						=	Upgrade_HaldirLeadership
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Upgrades						=	Upgrade_LegolasKnifeFighter
	SelectionDecal
		Texture						=	decal_hero_good	
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40 ;16
		MaxRadius					=	200 ;16
		MaxSelectedUnits			=	40 ;1
	End	
End	
ExperienceLevel	HaldirLevel8
	TargetNames						=	ElvenHaldir
	RequiredExperience				=	HALDIR_LVL8_EXP_NEEDED 
	ExperienceAward					=	HALDIR_LVL8_EXP_AWARD	
	AttributeModifiers				=	HeroLevelUpDamage7
	Rank					= 7
	LevelUpFx				= FX:GandalfLevelUp1FX
	Upgrades				= Upgrade_ObjectLevel6	;;;;Upgrade_ElrondTornado				
	SelectionDecal
		Texture				= decal_hero_good
		Style				= SHADOW_ALPHA_DECAL
		OpacityMin			= 50%	
		OpacityMax			= 100%
		MinRadius			= 40
		MaxRadius			= 200
		MaxSelectedUnits	= 40
	End
End
ExperienceLevel	HaldirLevel8
	TargetNames						=	ElvenHaldir
	RequiredExperience				=	HALDIR_LVL8_EXP_NEEDED 
	ExperienceAward					=	HALDIR_LVL8_EXP_AWARD	
	AttributeModifiers				=	HeroLevelUpDamage7
	Rank					= 7
	LevelUpFx				= FX:GandalfLevelUp1FX
	Upgrades				= Upgrade_ElrondTornado	;;;;				
	SelectionDecal
		Texture				= decal_hero_good
		Style				= SHADOW_ALPHA_DECAL
		OpacityMin			= 50%	
		OpacityMax			= 100%
		MinRadius			= 40
		MaxRadius			= 200
		MaxSelectedUnits	= 40
	End
End
ExperienceLevel	HaldirLevel9
	TargetNames						=	ElvenHaldir
	RequiredExperience				=	HALDIR_LVL9_EXP_NEEDED 
	ExperienceAward					=	HALDIR_LVL9_EXP_AWARD	
	AttributeModifiers				=	HeroLevelUpDamage8
	Rank							=	9
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL;
	Upgrades						=	Upgrade_LegolasArrowWind
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40 ;16
		MaxRadius					=	200 ;16
		MaxSelectedUnits			=	40 ;1
	End	
END	
ExperienceLevel	HaldirLevel9
	TargetNames						=	ElvenHaldir
	RequiredExperience				=	HALDIR_LVL9_EXP_NEEDED 
	ExperienceAward					=	HALDIR_LVL9_EXP_AWARD	
	AttributeModifiers				=	HeroLevelUpDamage8
	Rank							=	9
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL;
	Upgrades						=	Upgrade_EomerSpear
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40 ;16
		MaxRadius					=	200 ;16
		MaxSelectedUnits			=	40 ;1
	End	
END	
ExperienceLevel	HaldirLevel10
	TargetNames						=	ElvenHaldir
	RequiredExperience				=	HALDIR_LVL10_EXP_NEEDED 
	ExperienceAward					=	HALDIR_LVL10_EXP_AWARD	
  	AttributeModifiers				=	HeroLevelUpDamage9
	Rank							=	10
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Upgrades						=	Upgrade_GandalfWordOfPower
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40 ;16
		MaxRadius					=	200 ;16
		MaxSelectedUnits			=	40 ;1
	End	
END	
;-----------------------------------------------------
;legolas
;-----------------------------------------------------
Weapon HaradrimBarbedArrow
	AttackRange         = FARAMIR_BOW_RANGE	
	
	RangeBonusMinHeight	= 10
	RangeBonus		= 1
	RangeBonusPerFoot	= #MULTIPLY( THRANDUIL_BOW_RANGE .01 )  
	
	
	WeaponSpeed         = 321         ; dist/sec 
	MinWeaponSpeed      = 241
	MaxWeaponSpeed      = 481      ; dist/sec Upper limit on scaling, when attacking past nominal "max" range
	FireFX              = FX_RohanArcherBowWeapon
	ScaleWeaponSpeed    = Yes ; Used for lob weapons, scales speed proportional to range
	HitPercentage       = 100     ;When this weapon is used it will hit exactly 50% of the time.
	HitStoredTarget = Yes	; Always hits initial target.
	
	DelayBetweenShots   = 0
	PreAttackDelay      = 1500
	PreAttackType       = PER_POSITION
	FiringDuration      = 0
	  
	ClipSize			= 1
	AutoReloadsClip		= Yes
	AutoReloadWhenIdle	= 1	
	ClipReloadTime		= Min:1600 Max:1600
	ContinuousFireOne	= 0
	ContinuousFireCoast	= 1200
	  
	AntiAirborneVehicle	= Yes
	AntiAirborneMonster	= Yes
	HitPassengerPercentage	= 20%
	CanBeDodged				= Yes ; Will check for a DodgePercent on the target to have a second chance at failing HitPercent

  ProjectileNugget                    ; Default arrow
    ProjectileTemplateName    = BarbedArrowProjectile
    WarheadTemplateName       = HaradrimBarbedArrowWarhead
  End
End

Object BarbedArrowProjectile
  ReplaceModule ModuleTag_Draw
  Draw = W3DScriptedModelDraw ModuleTag_Draw_new
    DefaultModelConditionState     
      Model = NONE
      ParticleSysBone = NONE GoldArrowTrail FollowBone:yes
    End
  End
End
	ReplaceModule ModuleTag_Draw2
    Draw = W3DStreakDraw ModuleTag_Draw2_new
	    Length		= 18
	    Width		= 2
	    NumSegments	= 6				; number of segements in the streak, increase for smoother line
	    Color		= R:255 G:255 B:255
	    Texture		= EXArrowStreakIce.tga
    End
End
	ReplaceModule ModuleTag_04
 Behavior = BezierProjectileBehavior ModuleTag_04_new
    DetonateCallsKill = Yes
    FirstHeight = 14  ; Height of Bezier control points above highest intervening terrain
    SecondHeight = 9
    FirstPercentIndent = 40% ; Percentage of shot distance control points are placed
    SecondPercentIndent = 100%
    FlightPathAdjustDistPerSecond = 50 ; Can allow a max speed this can attempt to follow a target. Units are their velocity we can tag. (45 is default human speed)
    GroundHitFX = FX_GondorArrowDeath
    CurveFlattenMinDist = 100.0
  End
End
End

Weapon NewLegolasSword  ; BALANCE Legolas Sword Weapon
	LeechRangeWeapon      	= Yes
	AttackRange           	= 20.0
	MeleeWeapon           	= Yes
	DelayBetweenShots     	= 1 	; time between shots, msec
	PreAttackDelay        	= 550 		;PreAttackDelay+FiringDuration = UseWeaponTiming = Yes duration
	PreAttackType         	= PER_SHOT 
	FireFX                	= FX_GondorSwordHit
	FiringDuration        	= 550 		;PreAttackDelay+FiringDuration = UseWeaponTiming = Yes duration
	RadiusDamageAffects 	= ENEMIES NEUTRALS NOT_SIMILAR

	DamageNugget
		Damage        = 310
		Radius        = 12
		DelayTime     = 0
		DamageType    = HERO
		DamageFXType  = SWORD_SLASH
		DeathType     = EXPLODED
	End

	MetaImpactNugget            
		ShockWaveAmount   = 5.0		
		ShockWaveRadius   = 12
		ShockWaveTaperOff = 12.0
	End
End
Object RohanLegolas
CommandPoints = 0
ReplaceModule ModuleTag_01_
	Draw = W3DScriptedModelDraw ModuleTag_01_new

		OkToChangeModelColor = No
	  
		StaticModelLODMode = yes ; Will append M or L to the skin name depending on GameLOD

;;====================== MODELS ================================================================

		DefaultModelConditionState
			Model               = RULegolas_SKN;RTHANDBONE
			Skeleton			= RULegolas_SKL
			WeaponLaunchBone    = PRIMARY ARROW
			ParticleSysBone = B_SWORDBONE01 LegoSlayer FollowBone:yes
			ParticleSysBone = B_SWORDBONE02 LegoSlayer FollowBone:yes
			ParticleSysBone = B_SWORDBONE01 LegoSlayer FollowBone:yes
			ParticleSysBone = B_SWORDBONE02 LegoSlayer FollowBone:yes
		End
		 
		ModelConditionState = WEAPONSET_TOGGLE_1
			Model               = RULegolas_SKN
			Skeleton            = RULegolas_SKL;HaldirArrowHit
			ParticleSysBone = B_SWORDBONE01 LegoSlayer FollowBone:yes
			ParticleSysBone = B_SWORDBONE01 SoWolf_Ambient_Embers FollowBone:yes
			ParticleSysBone = B_SWORDBONE02 SoWolf_Ambient_Embers FollowBone:yes
;ParticleSysBone = B_SWORDBONE01 SoWolf_Ambient_Embers01 FollowBone:yes
;ParticleSysBone = B_SWORDBONE02 SoWolf_Ambient_Embers01 FollowBone:yes
			ParticleSysBone = B_SWORDBONE02 LegoSlayer FollowBone:yes
			ParticleSysBone = B_SWORDBONE01 LegoSlayer;;TornadoSpinningDust02 FollowBone:yes
			ParticleSysBone = B_SWORDBONE02 LegoSlayer FollowBone:yes
		End
		ModelConditionState = WEAPONSET_HERO_MODE
			ParticleSysBone = BAT_RIBS TornadoSpinningDust FollowBone:yes
			ParticleSysBone = BAT_RIBS TornadoSpinningDust02 FollowBone:yes
			ParticleSysBone = BAT_RIBS TornadoLightning7 FollowBone:yes
		End

;;================== ANIMATIONS =================================================================
				
;;------------------  DYING -------------------------------------------------------------

; --- Flying through the air.
		AnimationState        = STUNNED_FLAILING WEAPONSET_TOGGLE_1
			Animation           = FLYA
				AnimationName     = RULegolas_FLYA
				AnimationMode     = LOOP
				AnimationSpeedFactorRange	= 0.4 0.6
			End
			Flags               = RANDOMSTART
			BeginScript
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End
		AnimationState        = STUNNED_FLAILING
			Animation           = FLYA
				AnimationName     = RULegolas_FLYB
				AnimationMode     = LOOP
				AnimationSpeedFactorRange	= 0.4 0.6
			End
			Flags               = RANDOMSTART
			BeginScript
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End

; --- Dying
		AnimationState        = DYING WEAPONSET_TOGGLE_1
			Animation           = DIEC
				AnimationName     = RULegolas_DIEC
				AnimationMode     = ONCE
			End
			BeginScript
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End
				 
		AnimationState        = DYING
			Animation           = DIEA
				AnimationName     = RULegolas_DIEA
				AnimationMode     = ONCE
			End
			Animation           = DIEB
				AnimationName     = RULegolas_DIEB
				AnimationMode     = ONCE
			End
			BeginScript
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End	
		
; --- Stunned

		AnimationState        = STUNNED_STANDING_UP WEAPONSET_TOGGLE_1
			StateName           = STATE_Sword
			Animation           = GUFaramir_GTPC
				AnimationName     = RULegolas_GTPC
				AnimationMode     = ONCE
				AnimationSpeedFactorRange = 1.5 1.5
			End
			BeginScript
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End
		AnimationState        = STUNNED_STANDING_UP
			StateName           = STATE_Bow
			Animation           = GUFaramir_GTPA
				AnimationName     = RULegolas_GTPA
				AnimationMode     = ONCE
				AnimationSpeedFactorRange = 1.5 1.5
			End
			Animation           = GUFaramir_GTPB
				AnimationName     = RULegolas_GTPB
				AnimationMode     = ONCE
				AnimationSpeedFactorRange = 1.5 1.5
			End
			BeginScript
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End

		AnimationState        = STUNNED WEAPONSET_TOGGLE_1
			StateName           = STATE_Sword
			Animation           = GUFaramir_LNDA
				AnimationName     = RULegolas_LNDA
				AnimationMode     = ONCE
			End
			BeginScript
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End				
		AnimationState        = STUNNED 
			StateName           = STATE_Bow
			Animation           = GUFaramir_LNDB
				AnimationName     = RULegolas_LNDB
				AnimationMode     = ONCE
			End
			BeginScript
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End			
			
		AnimationState						= PARALYZED
			Animation
				AnimationName				= RULegolas_IDLA
				AnimationMode				= LOOP
			End
		End

;--- Arrow Wind Special attack

		AnimationState        = UNPACKING PACKING_TYPE_1
			Animation           = ATKA1
				AnimationName     = RULegolas_ATKA1	;ATKH1
				AnimationMode     = ONCE
			End
			StateName           = STATE_Bow
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "STATE_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwitchToBow") end
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End
	
	
		AnimationState        = PREPARING PACKING_TYPE_1
			Animation           = ATKA2
				AnimationName     = RULegolas_ATKA2 ;ATKH2
				AnimationMode     = LOOP
				AnimationSpeedFactorRange = 1.328 1.328
			End
			StateName           = STATE_Bow
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "STATE_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwitchToBow") end
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End
		
		AnimationState        = PACKING PACKING_TYPE_1
			Animation           = ATKA3
				AnimationName     = RULegolas_ATKA3 ;ATKH3
				AnimationMode     = LOOP
			End
			StateName           = STATE_Bow
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "STATE_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwitchToBow") end
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End

;--- Train Archer - a cheer 

		AnimationState        = PACKING_TYPE_2
			Animation           = CHRB
				AnimationName     = RULegolas_CHRB
				AnimationMode     = ONCE
				AnimationSpeedFactorRange = 1.5 1.5
			End
			StateName           = STATE_TrainingStart
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "STATE_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwitchToBow") end
			EndScript
		End

;--- Hawk Strike Special Attack
		AnimationState        =  SPECIAL_WEAPON_ONE
			Animation           = ATKB
				AnimationName     = RULegolas_ATKB
				AnimationMode     = ONCE	
			End
			FrameForPristineBonePositions = 45
			StateName           = STATE_Bow
			 
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "STATE_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwitchToBow") end
				CurDrawableShowSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End
		AnimationState        =  SPECIAL_WEAPON_TWO
			Animation           = ATKB
				AnimationName     = RULegolas_ATKK
				AnimationMode     = ONCE	
			End
			FrameForPristineBonePositions = 45
			StateName           = STATE_Sword
		End
		AnimationState        = MOVING FIRING_OR_PREATTACK_A WEAPONSET_TOGGLE_1
			ShareAnimation		= Yes
			Animation           = RunAndFire
				AnimationName       = RULegolas_ATRA
				AnimationMode       = LOOP
			End
			Flags               = RANDOMSTART 
		End
		
		
		AnimationState        = UNPACKING WEAPONSET_TOGGLE_1
			Animation           = ATKA
				AnimationName     = RULegolas_ATKA
				AnimationMode     = ONCE
			End
			StateName           = STATE_Bow
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "STATE_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwitchToBow") end
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End
	
		AnimationState        = PREPARING WEAPONSET_TOGGLE_1
			Animation          
				AnimationName     = RULegolas_ATKA2
				AnimationMode     = LOOP
			End
			StateName           = STATE_Bow
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "STATE_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwitchToBow") end
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End
; ---
	
		AnimationState        =  FIRING_OR_PREATTACK_A WEAPONSET_TOGGLE_1
			Animation           = ATKD
				AnimationName     = RULegolas_ATKD
				AnimationMode     = ONCE
				UseWeaponTiming		= Yes
			End
			Animation           = ATKE
				AnimationName     = RULegolas_ATKE
				AnimationMode     = ONCE
				UseWeaponTiming		= Yes
			End
			Animation           = ATKJ
				AnimationName     = RULegolas_ATKJ
				AnimationMode     = ONCE
				UseWeaponTiming		= Yes
			End
			Animation           = ATKK
				AnimationName     = RULegolas_ATKK
				AnimationMode     = ONCE
				UseWeaponTiming		= Yes
			End
            FXEvent	= Frame:17 Name: FX_BladeMasterHitOrient
    		StateName           = STATE_Sword
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "STATE_Bow" then CurDrawableSetTransitionAnimState("TRANS_SwitchToSwords") end
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End
		
;---------------------------------------------------
		;New style firing
		AnimationState						= PREATTACK_A 
			StateName						= STATE_Firing
			Animation						= ReadyToDrawn
				AnimationName				= RULegolas_ATKA1
				AnimationMode				= ONCE

				AnimationBlendTime			= 10				; Must be 0 blend time otherwise the arrow will linger for the duration of the blend!
				AnimationSpeedFactorRange	= 1.5 1.5		; Therefore, this is all you get.  A slight speed up so that the animation can always finish before any possible random value Design sets the range for
			End
			BeginScript
				CurDrawableShowSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End

		AnimationState						= FIRING_OR_RELOADING_A
			StateName						= STATE_Firing
			Animation						= OneFrameOfShooting
				AnimationName				= RULegolas_ATKA2
				AnimationMode				= ONCE

				AnimationSpeedFactorRange	= 1.0 1.0		; Therefore, this is all you get.  A slight speed up so that the animation can always finish before any possible random value Design sets the range for
				AnimationBlendTime			= 0
			End
			BeginScript
				CurDrawableShowSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End

	
		;End New style firing
;---------------------------------------------------


;--- Moving		
		; ------ With blades
		AnimationState        = MOVING WEAPONSET_TOGGLE_1
			Animation           = RUNB
				AnimationName   = RULegolas_RUNB
				AnimationMode   = LOOP
				Distance		= 50
				AnimationBlendTime = 10
			End
			Flags               = RANDOMSTART
			;ParticleSysBone     = None InfantryDustTrails
			StateName           = STATE_Sword
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "STATE_Bow" then CurDrawableSetTransitionAnimState("TRANS_SwitchToSwordsWhileMoving") end
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End
		; ------ With bow
		AnimationState        = MOVING
			Animation           = RUNA
				AnimationName   = RULegolas_RUNA
				AnimationMode   = LOOP
				Distance		= 50
				AnimationBlendTime			= 10
			End
			Flags               = RANDOMSTART
			;ParticleSysBone     = None InfantryDustTrails
			StateName           = STATE_Bow
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "STATE_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwitchToBowWhileMoving") end
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End
		

;--- Holding drawn bow while attacking		
		AnimationState						= CONTINUOUS_FIRE_MEAN
			StateName						= STATE_Firing
			Animation						= HangFrameWhileCoasting
				AnimationName				= RULegolas_ATKA2
				AnimationMode				= MANUAL
			End
			BeginScript
				CurDrawableShowSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End
		
		AnimationState						= CONTINUOUS_FIRE_SLOW
			StateName						= STATE_Idle_Bow
			Animation						= PutAwayArrow
				AnimationName				= RULegolas_ATKA3
				AnimationMode				= ONCE
			End
			BeginScript
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End
	
;--- Hit Reactions
		AnimationState = HIT_REACTION
			Animation = Hit_Level
				AnimationName = RULegolas_HITC
				AnimationMode = ONCE
			End
		End
	
;--- Emotions
		
		AnimationState				=	EMOTION_CELEBRATING
			Animation           =	CHRA
				AnimationName   =	RULegolas_CHRA
				AnimationMode   =	ONCE
				AnimationPriority	=	10
			End
			Animation           =	CHRB
				AnimationName   =	RULegolas_CHRB
				AnimationMode   =	ONCE
				AnimationPriority	=	5
			End
			Flags				=	RESTART_ANIM_WHEN_COMPLETE
			BeginScript
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End
		
		AnimationState				=	EMOTION_TAUNTING
			Animation           =	CHRB
				AnimationName   =	RULegolas_CHRB
				AnimationMode   =	ONCE
			End
			Flags				=	RESTART_ANIM_WHEN_COMPLETE
			BeginScript
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End
		
;--- Selected
		AnimationState				=	SELECTED WEAPONSET_TOGGLE_1
			StateName				=	KnifeFighterSelected
			Animation				=	ATNF
				AnimationName		=	RULegolas_IDLJ
				AnimationMode		=	LOOP
			End
			StateName				= SwordsAttn
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "STATE_Bow" or Prev == "Selected" then CurDrawableSetTransitionAnimState("TRANS_SwitchToAttentionSword") end
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End
		
		AnimationState				=	RAISING_FLAG
			Animation           =	CHRA
				AnimationName   =	RULegolas_CHRA
				AnimationMode   =	ONCE
			End
			Animation           =	CHRB
				AnimationName   =	RULegolas_CHRB
				AnimationMode   =	ONCE
			End
			Flags				=	RESTART_ANIM_WHEN_COMPLETE
		End

		AnimationState				=	SELECTED
			StateName				=	Selected
			Animation				=	ATNB
				AnimationName		=	RULegolas_ATNB
				AnimationMode		=	LOOP
			End
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "STATE_Bow" then CurDrawableSetTransitionAnimState("TRANS_SwitchToAttention") end
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End

	
;--- Idle states
		AnimationState        = WEAPONSET_TOGGLE_1
			Animation           = IDLG
				AnimationName     = RULegolas_IDLJ
				AnimationMode     = LOOP
			End
			StateName           = STATE_Sword
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "STATE_Bow" then CurDrawableSetTransitionAnimState("TRANS_SwitchToSwords") end
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End
		IdleAnimationState
			Animation           = IDLB
				AnimationName     = RULegolas_IDLB
				AnimationMode     = ONCE
				AnimationPriority	= 8
			End
			Animation           = IDLB ;Double up because animations never choose the same one twice in a row.
				AnimationName     = RULegolas_IDLB
				AnimationMode     = ONCE
				AnimationPriority	= 8
			End
			Animation           = IDLD
				AnimationName     = RULegolas_IDLD
				AnimationMode     = ONCE
				AnimationPriority	= 1
			End
			Animation           = IDLE
				AnimationName     = RULegolas_IDLE
				AnimationMode     = ONCE
				AnimationPriority	= 1
			End
			StateName           = STATE_Bow
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "STATE_Sword" then CurDrawableSetTransitionAnimState("TRANS_SwitchToBow") end
				if Prev == "Selected" then CurDrawableSetTransitionAnimState("TRANS_SwitchFromAttention") end
				CurDrawableHideSubObject("arrow") ;Circumvents blend issues when the arrow is being shown...
			EndScript
		End
		

;--- Transitions
		TransitionState       = TRANS_SwitchToBow
			Animation           = STHB
				AnimationName     = RULegolas_STHB
				AnimationMode     = ONCE
			End
		End

		TransitionState       = TRANS_SwitchToSwords
			Animation           = STHA
				AnimationName     = RULegolas_STHA
				AnimationMode     = ONCE
			End
		End
		
		TransitionState       = TRANS_SwitchToBowWhileMoving
			Animation           = STHB
				AnimationName     = RULegolas_RUND
				AnimationMode     = ONCE
				Distance		= 50
			End
		End

		TransitionState       = TRANS_SwitchToSwordsWhileMoving
			Animation           = STHA
				AnimationName     = RULegolas_RUNE
				AnimationMode     = ONCE
				Distance		= 50
			End
		End

		TransitionState       = TRANS_SwitchToAttentionSword
			Animation           = ATNE
				AnimationName     = RULegolas_STHA
				AnimationMode     = ONCE
			End
		End
		
		TransitionState       = TRANS_SwitchToAttention
			Animation           = ATNA
				AnimationName     = RULegolas_ATNA
				AnimationMode     = ONCE
			End
		End
		
		TransitionState       = TRANS_SwitchFromAttention
			Animation           = ATND
				AnimationName     = RULegolas_ATND
				AnimationMode     = ONCE
			End
		End
	End
End
WeaponSet
		Conditions = None
		Weapon = PRIMARY    HobbitRockThrow
		AutoChooseSources	= PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
	End
	WeaponSet
		Conditions				= WEAPONSET_TOGGLE_1 CONTAINED
		Weapon					= PRIMARY NewLegolasSword
		AutoChooseSources		= PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
	End
	WeaponSet
		Conditions				= CONTAINED
		Weapon					= PRIMARY NewLegolasSword
		AutoChooseSources		= PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
	End
	WeaponSet
		Conditions				= WEAPONSET_TOGGLE_1
		Weapon					= PRIMARY NewLegolasSword
		AutoChooseSources		= PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
	End

CommandSet = NewLegolasCommandSet

AddModule ModuleTag_UnpauseSlamArrow
	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_UnpauseSlamArrow
		SpecialPowerTemplate		= SpecialAbilityDaleSlamArrow
		TriggeredBy			= Upgrade_ObjectLevel2
	End
	End

AddModule ModuleTag_SlamArrow
	Behavior = SpecialPowerModule ModuleTag_SlamArrow
		SpecialPowerTemplate		= SpecialAbilityDaleSlamArrow
		UpdateModuleStartsAttack	= Yes
    	InitiateSound				= LegolasVoiceModeHawkStrike
    	StartsPaused				= Yes
	End
	End

AddModule ModuleTag_SlamArrowUpdate
	Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_SlamArrowUpdate
		SpecialPowerTemplate		= SpecialAbilityDaleSlamArrow
		SkipContinue			= Yes
		UnpackTime			= 2000 
		PreparationTime			= 1   
		PersistentPrepTime		= 1000 
		PackTime			= 1
		AwardXPForTriggering		= 0
		StartAbilityRange		= #SUBTRACT( FARAMIR_WOUNDING_ARROW_RANGE 25 )
		ApproachRequiresLOS		= Yes
		SpecialWeapon			= DaleSlamArrow
		WhichSpecialWeapon		= 1
	End
	End

AddModule ModuleTage_FloodEnabler
	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_FloodEnabler
		SpecialPowerTemplate = SpecialAbilityPersonalFlood
		TriggeredBy = Upgrade_ArwenFloodTrigger
	End
	End

AddModule ModuleTag_FloodStarter
	Behavior = SpecialPowerModule ModuleTag_FloodStarter                      
		SpecialPowerTemplate		= SpecialAbilityPersonalFlood
		UpdateModuleStartsAttack	= Yes
		StartsPaused				= Yes
		InitiateSound				= LegolasVoiceModeHawkStrike
	End
	End

AddModule ModuleTag_FloodUpdate
	Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_FloodUpdate   
		SpecialPowerTemplate    = SpecialAbilityPersonalFlood

		UnpackTime              = 1300
		PackTime                = 1500

		StartAbilityRange = 150.0
		
		SpecialWeapon = ArwenPersonalFlood
		WhichSpecialWeapon = 1
	End
	End

AddModule
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_HaldirGoldenArrowUnpause
		SpecialPowerTemplate				= SpecialAbilityHaldirGoldenArrow
		TriggeredBy							= Upgrade_HaldirGoldenArrow
	End
	End

AddModule
	Behavior = SpecialPowerModule ModuleTag_HaldirGoldenArrowSpecialPower
		SpecialPowerTemplate				= SpecialAbilityHaldirGoldenArrow
		StartsPaused						= Yes
		UpdateModuleStartsAttack			= Yes
		InitiateSound						= LegolasVoiceAttack
	End
	End

AddModule
	Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_HaldirGoldenArrowWeaponFireUpdate
		SpecialPowerTemplate				= SpecialAbilityHaldirGoldenArrow
		WhichSpecialWeapon					= 1
		UnpackTime							= 600
		PreparationTime						= 1
		PackTime							= 2000
		StartAbilityRange					= HALDIR_BOW_RANGE
		MustFinishAbility					= Yes
		SpecialWeapon						= HaldirGoldenArrow
	End
	End

AddModule
Behavior = UnpauseSpecialPowerUpgrade ModulTag_ElrondTornadoEnabler
		SpecialPowerTemplate	= SpecialPowerSpawnTornado
		TriggeredBy				= Upgrade_ElrondTornado
	End
End

AddModule
	Behavior = OCLSpecialPower	ModuleTag_OCLSpawnTornado
		SpecialPowerTemplate	= SpecialPowerSpawnTornado
		OCL						= SUPERWEAPON_SpawnTornado
		CreateLocation			= CREATE_AT_LOCATION
		StartsPaused			= Yes
	End
End

AddModule
	Behavior = AIUpdateInterface ModuleTag_03
		AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS
		MoodAttackCheckRate        = 500
		CanAttackWhileContained	   = Yes
	End
End
ReplaceModule ModuleTag_LegolasHealing
	Behavior = AutoHealBehavior ModuleTag_LegolasHealing1
		StartsActive = Yes
		HealingAmount = 50
		HealingDelay = 1000
		StartHealingDelay = 10000
		HealOnlyIfNotInCombat = Yes
	End
	End
End

ExperienceLevel	LegolasLevel3
	TargetNames						=	RohanLegolas
	RequiredExperience				=	LEGOLAS_LVL3_EXP_NEEDED 
	ExperienceAward					=	LEGOLAS_LVL3_EXP_AWARD	
	AttributeModifiers				=	HeroLevelUpDamage2
	Rank							=	3
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL;;Upgrade_HaldirGoldenArrow
	Upgrades						=	Upgrade_ObjectLevel2
	SelectionDecal
		Texture						=	decal_hero_good	
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40 ;16
		MaxRadius					=	200 ;16
		MaxSelectedUnits			=	40 ;1
	End
End	
ExperienceLevel	LegolasLevel6
	TargetNames						=	RohanLegolas ElvenLegolas
	RequiredExperience				=	LEGOLAS_LVL6_EXP_NEEDED 
	ExperienceAward					=	LEGOLAS_LVL6_EXP_AWARD	
	AttributeModifiers				=	HeroLevelUpDamage5
	Rank							=	6
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Upgrades						=	Upgrade_HaldirGoldenArrow
	SelectionDecal
		Texture						=	decal_hero_good	
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40 ;16
		MaxRadius					=	200 ;16
		MaxSelectedUnits			=	40 ;1
	End	
END	

ExperienceLevel	LegolasLevel9
	TargetNames						=	RohanLegolas
	RequiredExperience				=	LEGOLAS_LVL9_EXP_NEEDED 
	ExperienceAward					=	LEGOLAS_LVL9_EXP_AWARD	
	AttributeModifiers				=	HeroLevelUpDamage8
	Rank							=	9
	LevelUpFx						=	FX:GandalfLevelUp1FX
	Upgrades						=	Upgrade_ArwenFloodTrigger	
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	SelectionDecal
		Texture						=	decal_hero_good	
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40 ;16
		MaxRadius					=	200 ;16
		MaxSelectedUnits			=	40 ;1
	End
End

ExperienceLevel	LegolasLevel10
	TargetNames						=	RohanLegolas
	RequiredExperience				=	LEGOLAS_LVL10_EXP_NEEDED 
	ExperienceAward					=	LEGOLAS_LVL10_EXP_AWARD	
	AttributeModifiers				=	HeroLevelUpDamage9
	Rank							=	10
	LevelUpFx						=	FX:GandalfLevelUp1FX
	Upgrades						=	Upgrade_ElrondTornado	
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	SelectionDecal
		Texture						=	decal_hero_good	
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40 ;16
		MaxRadius					=	200 ;16
		MaxSelectedUnits			=	40 ;1
	End
End
;-------------------------------------------------
;Gimli[][][[]][][][][][][][][][][][][][][][][][][[][][][][][][][[][][][][][]
;-------------------------------------------------
;--------------------------------------------------------
;WEAPONS
;--------------------------------------------------------
Weapon GimliSword
  LeechRangeWeapon      = Yes
  AttackRange           = STANDARD_MELEE_ATTACK_RANGE
	RadiusDamageAffects = ENEMIES NOT_SIMILAR
  MeleeWeapon           = Yes
  DelayBetweenShots     = GAMLING_DELAYBETWEENSHOTS 			
             ; time between shots, msec
  PreAttackDelay        = GAMLING_PREATTACKDELAY 				; 400 is sword swing delay time before contact with target.
  PreAttackType         = PER_SHOT ; Do the delay each time we attack a new target
  FireFX                = FX_GondorSwordHit
  FiringDuration        = GAMLING_FIRINGDURATION 				; Duration of the sword swing

	DamageNugget                        ; A basic Nugget that just does damage
		Damage        = 130					
		Radius        = 30.0 ;
		DelayTime     = 200
		DamageType    = HERO
		DamageFXType  = SWORD_SLASH
		DeathType     = NORMAL
		DamageSpeed		= 700.0 ; must match the ShockWaveSpeed below
	End

	DOTNugget                        ; 30s time.
		Damage        = 20 ; default is 300
		AcceptDamageAdd = No
		Radius        = 20.0
		DelayTime     = 0
		DamageType    = HERO
		DamageFXType  = MAGIC
		DeathType     = EXPLODED
		DamageInterval = 1000
		DamageDuration = 30000
		SpecialObjectFilter = AFFECTED_BY_POISON_OBJECTFILTER
	End

	MetaImpactNugget                    ; A Nugget that throws things back with force
		HeroResist			= .75
		ShockWaveAmount   = 30.0
		ShockWaveRadius   = 10.0
		ShockWaveTaperOff = 1  ;0.75
		ShockWaveZMult    = 0.75
		ShockWaveSpeed		= 700
	End  
End

Weapon GimliWave
	IdleAfterFiringDelay = 0
	AttackRange = 400
	MinimumAttackRange = 0.8
	WeaponSpeed = 301
	MinWeaponSpeed = 300
	MaxWeaponSpeed = 302
	ScaleWeaponSpeed = Yes
	RadiusDamageAffects = ENEMIES NOT_SIMILAR
	DelayBetweenShots = 5000
	PreAttackDelay        = 400
	PreAttackType         = PER_ATTACK
      FireFX					= FX_EarthquakePhaseInitialWeapon
      ClearNuggets
	DamageNugget
		Damage			= 350
		Radius			= 200.0
		DamageType		= HERO
		DamageFXType	= MAGIC
		DeathType		= EXPLODED
		DamageSpeed		= 180.0 ; must match the ShockWaveSpeed below
	End
	MetaImpactNugget
		ShockWaveAmount   = 150.0
		ShockWaveRadius   = 140.0
		ShockWaveTaperOff	= 1.0
		ShockWaveSpeed	  = 180.0
		ShockWaveZMult    = 1.000
	End
	MetaImpactNugget
		ShockWaveAmount   = 60.0
		ShockWaveRadius   = 280.0
		ShockWaveTaperOff	= 1.0
		ShockWaveSpeed	  = 180.0
		ShockWaveZMult    = 0.9
	End
	MetaImpactNugget
		ShockWaveAmount   = 50.0
		ShockWaveRadius   = 380.0
		ShockWaveTaperOff	= 1.0
		ShockWaveSpeed	  = 180.0
		ShockWaveZMult    = 0.8
	End
End
Weapon GimliHeroSword
  LeechRangeWeapon      = Yes
	RadiusDamageAffects = ENEMIES NOT_SIMILAR
  AttackRange           = STANDARD_MELEE_ATTACK_RANGE
  MeleeWeapon           = Yes
  DelayBetweenShots     = GAMLING_DELAYBETWEENSHOTS 			
             ; time between shots, msec
  PreAttackDelay        = GAMLING_PREATTACKDELAY 				; 400 is sword swing delay time before contact with target.
  PreAttackType         = PER_SHOT ; Do the delay each time we attack a new target
  FireFX                = FX_GimliLeapLand
  FiringDuration        = GAMLING_FIRINGDURATION 				; Duration of the sword swing

  DamageNugget                        ; A basic Nugget that just does damage
    Damage        = 100					
    Radius        = 60.0 ;
    DelayTime     = 25
    DamageType    = HERO
    DamageFXType  = SWORD_SLASH
    DeathType     = NORMAL
		DamageSpeed		= 700.0
  End
  DamageNugget                        ; A basic Nugget that just does damage
    Damage        = 300					
    Radius        = 60.0 ;
    ;DelayTime     = 25 ; for smaller units delay time must not be so that they are set aflame rather then just dieing normally
    DamageType    = MAGIC
    DamageFXType  = MAGIC
    DeathType     = EXPLODED
		DamageSpeed		= 700.0
  End

	DOTNugget                        ; 30s time.
		Damage        = 40 ; default is 300
		AcceptDamageAdd = No
		Radius        = 30.0
		DelayTime     = 0
		DamageType    = MAGIC
		DamageFXType  = MAGIC
		DeathType     = EXPLODED
		DamageInterval = 1000
		DamageDuration = 15000
		SpecialObjectFilter = AFFECTED_BY_POISON_OBJECTFILTER
	End
	
	MetaImpactNugget                    ; A Nugget that throws things back with force
		HeroResist			= .75
		ShockWaveAmount   = 60.0
		ShockWaveRadius   = 40.0
		ShockWaveTaperOff = 1 ;0.75
		ShockWaveZMult    = 0.95
		ShockWaveSpeed		= 700
	End  

End
;----------------
;OBJECT
;----------------
Object RohanGimli
CommandSet = NewGimliCommandSet
CommandPoints = 0

ReplaceModule ModuleTag_01
Draw = W3DScriptedModelDraw ModuleTag_01_new

	  OkToChangeModelColor = Yes
	  

   StaticModelLODMode = yes ; Will append M or L to the skin name depending on GameLOD

;;====================== MODELS ================================================================
		DefaultModelConditionState
			Model               = RUGimli_SKN
			Skeleton            = RUGimli_SKL
			ParticleSysBone = B_SWORDBONE GimliSwordFlare1 FollowBone:Yes
			ParticleSysBone = B_SWORDBONE GimliSwordFlare2 FollowBone:Yes
			WeaponLaunchBone    = TERTIARY AXE02;SpellRallyingCallCircles
		End
		
		ModelConditionState = WEAPONSET_TOGGLE_1
			Model               = RUGimli_SKN
			Skeleton            = RUGimli_SKL
			ParticleSysBone =  BAT_HEAD GCglowHorseWhite FollowBone:Yes
			ParticleSysBone =  B_HHIPL GCglowHorseRearWhite FollowBone:Yes
			ParticleSysBone =  BAT_SPINE2 GCglowWhite FollowBone:Yes
		End;

		ModelConditionState = WEAPONSET_HERO_MODE
			Model               = RUGimli_SKN
			Skeleton            = RUGimli_SKL;gimlihero
			ParticleSysBone = B_SWORDBONE GimliSwordFlare1 FollowBone:Yes
			ParticleSysBone = B_SWORDBONE GimliSwordFlare2 FollowBone:Yes
			ParticleSysBone =  BAT_HEAD EarthquakeShock FollowBone:Yes
		End
;;================== ANIMATIONS =================================================================

;;------------------ MOVING & DYING ---------------------------

	;;======= DYING

		AnimationState        = STUNNED_FLAILING
			Animation           = FLYA
				AnimationName     = RUGimli_FLYA
				AnimationMode     = LOOP
				AnimationSpeedFactorRange	= 0.3 0.5
			End
			Flags               = RANDOMSTART
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "DwarfToss" then CurDrawableSetTransitionAnimState("TRANS_EndDwarfToss") end
			EndScript
		End
		
		AnimationState        = DYING SPLATTED
			Animation           = LNDB
				AnimationName     = RUGimli_LNDA
				AnimationMode     = ONCE
			End
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "DwarfToss" then CurDrawableSetTransitionAnimState("TRANS_EndDwarfToss") end
			EndScript
		End

		AnimationState        = DYING
			Animation           = DIEA
				AnimationName     = RUGimli_DIEA
				AnimationMode     = ONCE
			End
			Animation           = DIEC
				AnimationName     = RUGimli_DIEC
				AnimationMode     = ONCE
			End
;			Animation           = DIEB
;				AnimationName     = RUGimli_DIEB
;				AnimationMode     = ONCE
;			End		
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "DwarfToss" then CurDrawableSetTransitionAnimState("TRANS_EndDwarfToss") end
			EndScript
		End
		
		AnimationState        = STUNNED_STANDING_UP
			Animation           = GTPA
				AnimationName     = RUGimli_GTPA
				AnimationMode     = ONCE
			End
		End
	
		AnimationState        = STUNNED
			Animation           = LNDA
				AnimationName     = RUGimli_LNDA
				AnimationMode     = ONCE
			End
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "DwarfToss" then CurDrawableSetTransitionAnimState("TRANS_EndDwarfToss") end
			EndScript
		End

		AnimationState						= PARALYZED
			Animation
				AnimationName				= RUGimli_IDLA
				AnimationMode				= LOOP
			End
		End

		
				

; OBSOLETE - Dwarven Grudge
;		AnimationState        = RESURRECTED
;			Animation           = REZA
;				AnimationName     = RUGimli_REZA
;				AnimationMode     = ONCE
;			End
;			;Some FX to show we have risen from the dead
;			EnteringStateFX = FX_Resurrect
;		End
			
	;;======= MOVING
	
	
	AnimationState        = MOVING FIRING_OR_PREATTACK_A
			ShareAnimation		= Yes
			Animation           = RunAndFire
				AnimationName       = RUGimli_ATRA
				AnimationMode       = LOOP
			End
			Flags               = RANDOMSTART 
		End

; TODO: Slayer Moving
;		AnimationState					= MOVING HERO
;			Animation					= slayer
;				AnimationName			= RUGimli_ATKE
;				AnimationMode			= LOOP
;			End
;		End

; TODO: Replace with SLAYER IDLE animation
; 		AnimationState					= HERO
;			Animation					= slayer standing still
;				AnimationName			= RUGimli_IDLA	; RUGimli_ATKF
;				AnimationMode			= LOOP
;			End
;		End

; OBSOLETE		
;		AnimationState				= MOVING WANDER
;			Animation				= WLKA
;				AnimationName		=  RUGimli_WLKA
;				AnimationMode		= LOOP
;			End
;			Flags						= RANDOMSTART
;		End

; OBSOLETE		
;		AnimationState        = MOVING USER_4
;			Animation           = ATKF
;				AnimationName     = RUGimli_ATKF
;				AnimationMode     = LOOP
;			End
;			Animation           = ATKE
;				AnimationName     = RUGimli_ATKE
;				AnimationMode     = LOOP
;			End
;			;ParticleSysBone     = None InfantryDustTrails
;			BeginScript
;				Prev = CurDrawablePrevAnimationState()
;				if Prev == "DwarfToss" then CurDrawableSetTransitionAnimState("TRANS_EndDwarfToss") end
;			EndScript
;           ;FXEvent	= Frame:6 Name: FX_BladeMasterHitOrient
;           ;FXEvent	= Frame:19 Name: FX_BladeMasterHitOrient
;		End

		AnimationState				=	MOVING ATTACKING
			Animation				=	RUNB
				AnimationName		=	RUGimli_RUNB
				AnimationMode		=	LOOP
			End
			Flags					=	RANDOMSTART
			;ParticleSysBone		=	None InfantryDustTrails
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "DwarfToss" then CurDrawableSetTransitionAnimState("TRANS_EndDwarfToss") end
			EndScript
		End
	
		AnimationState				=	MOVING
			Animation				=	RUNA
				AnimationName		=	RUGimli_RUNA
				AnimationMode		=	LOOP
			End
			Flags					=	RANDOMSTART
			;ParticleSysBone		=	None InfantryDustTrails
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "DwarfToss" then CurDrawableSetTransitionAnimState("TRANS_EndDwarfToss") end
			EndScript
		End


;;------------------ ATTACKING  -------------------------------

; AXE THROW
		AnimationState        =  FIRING_OR_PREATTACK_C
			Animation           = SPCA
				AnimationName     = RUGimli_SPCA
				AnimationMode     = ONCE
;				UseWeaponTiming		= Yes
			End
			FrameForPristineBonePositions = 42;44
			;ParticleSysBone     = None MeleeDust
			BeginScript
				CurDrawableShowSubObject("AXE02")
				Prev = CurDrawablePrevAnimationState()
				if Prev == "DwarfToss" then CurDrawableSetTransitionAnimState("TRANS_EndDwarfToss") end
			EndScript
		End

		AnimationState        =  FIRING_OR_PREATTACK_B; WEAPONLOCK_SECONDARY
			Animation           = ATKA
				AnimationName     = RUGimli_ATKD
				AnimationMode     = ONCE
				UseWeaponTiming		= Yes
			End
			
			;ParticleSysBone None MeleeDust
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "DwarfToss" then CurDrawableSetTransitionAnimState("TRANS_EndDwarfToss") end
			EndScript
		End
	
		AnimationState        =  FIRING_OR_PREATTACK_A
			Animation           = ATKA
				AnimationName     = RUGimli_ATKA
				AnimationMode     = ONCE
				UseWeaponTiming		= Yes
			End
			Animation           = ATKB
				AnimationName     = RUGimli_ATKB
				AnimationMode     = ONCE
				UseWeaponTiming		= Yes
			End		
			Animation           = ATKC
				AnimationName     = RUGimli_ATKC
				AnimationMode     = ONCE
				UseWeaponTiming		= Yes
			End
			
			;ParticleSysBone None MeleeDust
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "DwarfToss" then CurDrawableSetTransitionAnimState("TRANS_EndDwarfToss") end
			EndScript
		End

	;leap animations 		
		AnimationState			= SPECIAL_WEAPON_TWO UNPACKING
			Animation			= GettingReadyToLeap
				AnimationName	= RUGimli_LEPA
				AnimationMode   = ONCE
			End
		End

		AnimationState        =  ABOUT_TO_HIT		;using Gimli Leap
		StateName			= State_AboutToHitGround
			Animation           = Leap
				AnimationName     = RUGimli_LEPC  
				AnimationMode     = ONCE
			;	UseWeaponTiming		= Yes
			End
		End


		AnimationState        = THROWN_PROJECTILE
			Animation           = LEPB
				AnimationName     = RUGimli_LEPB
				AnimationMode     = LOOP
				AnimationBlendTime = 20
			End
		End

;;; REMOVED
;		AnimationState        = WEAPONSET_RAMPAGE ;WEAPONSTATE_ONE
;			Animation           = RPGA
;				AnimationName     = RUGimli_RPGA
;				AnimationMode     = LOOP
;				AnimationBlendTime = 10
;			End
;			BeginScript
;				Prev = CurDrawablePrevAnimationState()
;				if Prev == "DwarfToss" then CurDrawableSetTransitionAnimState("TRANS_EndDwarfToss") end
;			EndScript
;		End
	
;		AnimationState        = USER_1
;			Animation           = TOS1
;				AnimationName     = RUGimli_TOS1
;				AnimationMode     = ONCE
;			End
;			BeginScript
;				Prev = CurDrawablePrevAnimationState()
;				if Prev == "DwarfToss" then CurDrawableSetTransitionAnimState("TRANS_EndDwarfToss") end
;			EndScript
;		End
	

;		AnimationState        = USER_1 PASSENGER
;			Animation           = TOS2
;				AnimationName     = RUGimli_TOS2
;				AnimationMode     = ONCE
;			End
;			BeginScript
;				Prev = CurDrawablePrevAnimationState()
;				if Prev == "DwarfToss" then CurDrawableSetTransitionAnimState("TRANS_EndDwarfToss") end
;			EndScript
;		End
	
;		AnimationState        = PASSENGER
;			Animation           = TOS1
;				AnimationName     = RUGimli_TOS1
;				AnimationMode     = MANUAL
;			End
;			Flags               = START_FRAME_LAST
;			BeginScript
;				Prev = CurDrawablePrevAnimationState()
;				if Prev == "DwarfToss" then CurDrawableSetTransitionAnimState("TRANS_EndDwarfToss") end
;			EndScript
;		End
	
;;-------------------- HIT REACTIONS --------------------------

		AnimationState = HIT_REACTION
			Animation = Hit_Level_1_a
				AnimationName = RUGimli_HITA
				AnimationMode = ONCE
			End
		End
		
;;------------ EMOTIONS ---------------------------------------

;;====== LEVELED
		AnimationState				= LEVELED 						; This state clears itself in 3 seconds
			Animation				= LevelUp
				AnimationName		= RUGimli_CHRB
				AnimationMode		= ONCE
			End
		End

;;====== CELEBRATING
		AnimationState			= EMOTION_CELEBRATING
			Animation           = CHRA
				AnimationName   = RUGimli_CHRA
				AnimationMode   = ONCE
			End
			Flags					=	RESTART_ANIM_WHEN_COMPLETE
		End

;;====== TAUNTING
		AnimationState			= EMOTION_TAUNTING
			Animation           = TNTA
				AnimationName   = RUGimli_TNTA
				AnimationMode   = ONCE
			End
			Animation           = TNTB
				AnimationName   = RUGimli_TNTB
				AnimationMode   = ONCE
			End
			Flags					=	RESTART_ANIM_WHEN_COMPLETE
		End
		
		AnimationState					= EMOTION_ALERT
			Animation					= Ready
				AnimationName			= RUGimli_IDLA
				AnimationMode			= LOOP
				AnimationBlendTime  =   15
			End
			BeginScript
				CurDrawableHideSubObject("AXE02")
;				Prev = CurDrawablePrevAnimationState()
;				if Prev == "BORED"		then CurDrawableSetTransitionAnimState("Transition_BoredToReady") end
;				if Prev == "SELECTED"	then CurDrawableSetTransitionAnimState("Transition_SelectedToReady") end
				if Prev == "State_AboutToHitGround" then CurDrawableSetTransitionAnimState("TRANS_AboutToHitGround_To_Idle") end
			EndScript

		End
		
		AnimationState			= RAISING_FLAG
			Animation           = CHRA
				AnimationName   = RUGimli_CHRA
				AnimationMode   = LOOP
			End
		End

;;------------------- SELECTED STATES -------------------------
		
		AnimationState				=	SELECTED
			StateName				=	AtAttentionIdle
			SimilarRestart			=   Yes			
			Animation				=	ATNB
				AnimationName		=	 RUGimli_ATNB
				AnimationMode		=	LOOP
			End
			BeginScript
				CurDrawableHideSubObject("AXE02")
				Prev = CurDrawablePrevAnimationState()
				if Prev == "STATE_Idle" then CurDrawableSetTransitionAnimState("TRANS_Select") end
				if Prev == "AtAttentionIdle" then CurDrawableSetTransitionAnimState("TRANS_Select") end
				if Prev == "State_AboutToHitGround" then CurDrawableSetTransitionAnimState("TRANS_AboutToHitGround_To_Idle") end
			EndScript
		End
							
;;--------------- IDLE STATES ---------------------------------

		IdleAnimationState
			StateName				= STATE_Idle
			Animation           = IDLB
				AnimationName     = RUGimli_IDLB
				AnimationMode     = ONCE
				AnimationPriority = 30
			End
			Animation           = IDLF
				AnimationName     = RUGimli_IDLF
				AnimationMode     = ONCE
				AnimationPriority = 5
			End		
			Animation           = IDLD
				AnimationName     = RUGimli_IDLD
				AnimationMode     = ONCE
				AnimationPriority = 4
			End
			Animation           = IDLG
				AnimationName     = RUGimli_IDLG
				AnimationMode     = ONCE
				AnimationPriority = 2
			End
			Animation           = IDLH
				AnimationName     = RUGimli_IDLH
				AnimationMode     = ONCE
				AnimationPriority = 1
			End		
			Animation           = IDLC
				AnimationName     = RUGimli_IDLC
				AnimationMode     = ONCE
				AnimationPriority = 1
			End
			Animation           = IDLE
				AnimationName     = RUGimli_IDLE
				AnimationMode     = ONCE
				AnimationPriority = 1
			End
			
			BeginScript
				CurDrawableHideSubObject("AXE02")
				Prev = CurDrawablePrevAnimationState()
				if Prev == "DwarfToss" then CurDrawableSetTransitionAnimState("TRANS_EndDwarfToss") end
				if Prev == "AtAttentionIdle" then CurDrawableSetTransitionAnimState("TRANS_SelectedToIdle") end
				if Prev == "State_AboutToHitGround" then CurDrawableSetTransitionAnimState("TRANS_AboutToHitGround_To_Idle") end
			EndScript
		End

		
;---Transitions-------------------------------------

		TransitionState       = TRANS_EndDwarfToss
			Animation           = TOS4
				AnimationName     = RUGimli_TOS4
				AnimationMode     = ONCE
			End
		End	

		TransitionState       = TRANS_SelectedToIdle	
			Animation           = ATNC
				AnimationName     = RUGimli_ATNC
				AnimationMode     = ONCE
				AnimationSpeedFactorRange = 0.7 1.3
			End
		End
		
		TransitionState				=	TRANS_Select
			Animation				=	ATNA
				AnimationName		=	 RUGimli_ATNA
				AnimationMode		=	ONCE
			End
		End
	
		TransitionState = TRANS_AboutToHitGround_To_Idle
			Animation = SplashAtEndOfJump
				AnimationName = RUGimli_LEPC
				AnimationMode = ONCE
				;AnimationBlendTime = 0
			End
			Flags = MAINTAIN_FRAME_ACROSS_STATES
		End
		
	End
	End
	WeaponSet
		Conditions				= WEAPONSET_TOGGLE_1 CONTAINED
		Weapon					= TERTIARY RohanGimliAxeThrown
		AutoChooseSources		= PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
	End
	WeaponSet
		Conditions				= CONTAINED
		Weapon					= TERTIARY RohanGimliAxeThrown
		AutoChooseSources		= PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
	End
	WeaponSet
		Conditions				= WEAPONSET_TOGGLE_1
		Weapon					= TERTIARY RohanGimliAxeThrown
		AutoChooseSources		= PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
	End

	WeaponSet
		Conditions				= None 
		Weapon					= PRIMARY  GimliSword
		AutoChooseSources		= PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
		AutoChooseSources		= TERTIARY NONE
		ShareWeaponReloadTime	= Yes
	End
	

	WeaponSet
		Conditions				= WEAPONSET_HERO_MODE
		Weapon					= SECONDARY  GimliHeroSword
		AutoChooseSources		= SECONDARY FROM_PLAYER FROM_SCRIPT FROM_AI
		AutoChooseSources		= TERTIARY NONE
		ShareWeaponReloadTime	= Yes
	End
//--------------------------------------------------------------------------	
//	CHARGE SPECIAL POWER Level 3
//--------------------------------------------------------------------------
AddModule
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_CreateAHeroChargeEnabler_Level3
	SpecialPowerTemplate = SpecialAbilityCreateAHeroCharge_Level3
	TriggeredBy = Upgrade_CreateAHeroCharge_Level3
End
End
AddModule
Behavior = SpecialPowerModule ModuleTag_CreateAHeroChargeStarter_Level3
	SpecialPowerTemplate      = SpecialAbilityCreateAHeroCharge_Level3
	UpdateModuleStartsAttack  = Yes
	StartsPaused			 = Yes
End
End
AddModule
Behavior = SpecialAbilityUpdate ModuleTag_CreateAHeroChargeUpdate_Level3
	SpecialPowerTemplate		= SpecialAbilityCreateAHeroCharge_Level3
	StartAbilityRange			= 150.0 ;//Negative distances will cause the unit to overshoot the destination.
	AbilityAbortRange			= 50.0
	PreparationTime				= 0 
	PackTime					= 3000  ;// without this pack time, the charge would not complete
	//TriggerSound				= GondorSoldierVoiceEnterStateAttackCharge
	TriggerAttributeModifier	= NewCreateAHeroShieldCrush_Level3
	AttributeModifierDuration	= 20000
	ChargeAttackSpeedBoost		= Yes
	IgnoreFacingCheck			= Yes
End
End;;TriggeredBy		= Upgrade_AragornLeadership
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
AddModule
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_CreateAHeroBombard_Level3
	SpecialPowerTemplate = SpecialAbilityCreateAHeroBombard_Level3
	TriggeredBy = Upgrade_CreateAHeroBombard_Level3
End
End
AddModule
Behavior = SpecialPowerModule ModuleTag_CreateAHeroBombardStarter_Level3
	SpecialPowerTemplate		= SpecialAbilityCreateAHeroBombard_Level3
	UpdateModuleStartsAttack	= Yes
	StartsPaused			= Yes
End
End
AddModule
Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_CreateAHeroBombardUpdate_Level3
	SpecialPowerTemplate    = SpecialAbilityCreateAHeroBombard_Level3
	WhichSpecialWeapon		= 4							; use MODELCONDITION_SPECIAL_WEAPON_FOUR
	SkipContinue			= Yes

	UnpackTime              = 900
	PreparationTime         = 1   
	PersistentPrepTime      = 1500 
	PackTime                = 1100
	
	FreezeAfterTriggerDuration	= 2500					; make sure we can't move immediately after.

	AwardXPForTriggering    = 0		
	StartAbilityRange		= 300.0
	MustFinishAbility		= Yes
	SpecialWeapon			= CreateAHeroBombardWeapon
End
End
AddModule
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_WordEnabler
		SpecialPowerTemplate = SpecialAbilityWordOfPower
		TriggeredBy = Upgrade_GandalfWordOfPower
	End
End
AddModule
	Behavior = SpecialPowerModule ModuleTag_WordStarter       
		SpecialPowerTemplate      = SpecialAbilityWordOfPower
		UpdateModuleStartsAttack  = Yes
		StartsPaused		  	  = Yes
	End
End
AddModule
	Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_WordWeaponFireUpdate   
		SpecialPowerTemplate    = SpecialAbilityWordOfPower
		WhichSpecialWeapon		= 1
		SkipContinue			= Yes

		UnpackTime              = 1700 
		PackTime                = 1	
		FreezeAfterTriggerDuration = 2500 ; Hold AI for this long after we fire.
		
		AwardXPForTriggering    = 0		
		StartAbilityRange		= 80.0
		
		SpecialWeapon			= GimliWave
	End
End;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;
AddModule
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_AragornBladeMasterEnabler
		SpecialPowerTemplate = SpecialAbilityAragornBladeMaster
		TriggeredBy = Upgrade_AragornBladeMaster
	End
End
AddModule
  	Behavior = SpecialPowerModule ModuleTag_AragornBladeMasterStarter                ; SpecialAbility is a SpecialPower, SpecialPower is anyting special
		SpecialPowerTemplate    = SpecialAbilityAragornBladeMaster
		StartsPaused			= Yes
	End
End
AddModule
	Behavior = HeroModeSpecialAbilityUpdate ModuleTag_AragornBladeMasterUpdate   ; So the difference in SpecialAbility is that it takes timing from this Update, instead of simply firing.
		SpecialPowerTemplate    = SpecialAbilityAragornBladeMaster
		HeroAttributeModifier	= NewAragornBladeMaster
		HeroEffectDuration		= 30000 ; this should sync with the auto ability delay re-fire time in commandButtons.ini
		UnpackTime              = 1 ; insant unpack
		TriggerSound			= AragornBladeMaster
	End
End
ReplaceModule ModuleTag_GimliHealing
Behavior = AutoHealBehavior ModuleTag_GimliHealing1
		StartsActive = Yes
		HealingAmount = 50
		HealingDelay = 1000
		StartHealingDelay = 10000
		HealOnlyIfNotInCombat = Yes
	End
	End
End
ExperienceLevel	GimliLevel4
	TargetNames						=	RohanGimli
	RequiredExperience				=	GIMLI_LVL4_EXP_NEEDED 
	ExperienceAward					=	GIMLI_LVL4_EXP_AWARD	
	AttributeModifiers				=	HeroLevelUpDamage3
	Rank							=	4
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Upgrades						=	Upgrade_CreateAHeroCharge_Level3
	SelectionDecal
		Texture						=	decal_hero_good	
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40 ;16
		MaxRadius					=	200 ;16
		MaxSelectedUnits			=	40 ;1
	End	
End	
ExperienceLevel	GimliLevel5
	TargetNames						=	RohanGimli DwarvenGimli
	RequiredExperience				=	GIMLI_LVL5_EXP_NEEDED 
	ExperienceAward					=	GIMLI_LVL5_EXP_AWARD	
	AttributeModifiers				=	HeroLevelUpDamage4
	Rank							=	5
	Upgrades						=	Upgrade_AragornBladeMaster
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	SelectionDecal
		Texture						=	decal_hero_good	
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40 ;16
		MaxRadius					=	200 ;16
		MaxSelectedUnits			=	40 ;1
	End	
END	
ExperienceLevel	GimliLevel9
	TargetNames						=	RohanGimli
	RequiredExperience				=	GIMLI_LVL9_EXP_NEEDED 
	ExperienceAward					=	GIMLI_LVL9_EXP_AWARD	
	AttributeModifiers				=	HeroLevelUpDamage8
	Rank							=	9
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL
	Upgrades						=	Upgrade_CreateAHeroBombard_Level3				
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40 ;16
		MaxRadius					=	200 ;16
		MaxSelectedUnits			=	40 ;1
	End
End

ExperienceLevel	GimliLevel10
	TargetNames						=	RohanGimli
	RequiredExperience				=	GIMLI_LVL10_EXP_NEEDED 
	ExperienceAward					=	GIMLI_LVL10_EXP_AWARD	
	AttributeModifiers				=	HeroLevelUpDamage8
	Rank							=	10
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL
	Upgrades						=	Upgrade_GandalfWordOfPower				
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40 ;16
		MaxRadius					=	200 ;16
		MaxSelectedUnits			=	40 ;1
	End
End

;()--()--()--()--()--()--()--()--()--()--()--()--()
;-------------------------------------------------
;Theoden=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
;-------------------------------------------------
;()--()--()--()--()--()--()--()--()--()--()--()--()
Weapon NewTheodenSword
  LeechRangeWeapon      = Yes
  AttackRange           = STANDARD_MELEE_ATTACK_RANGE
	RadiusDamageAffects = ENEMIES NOT_SIMILAR
  MeleeWeapon           = Yes
  DelayBetweenShots     = GAMLING_DELAYBETWEENSHOTS 			
             ; time between shots, msec
  PreAttackDelay        = GAMLING_PREATTACKDELAY 				; 400 is sword swing delay time before contact with target.
  PreAttackType         = PER_SHOT ; Do the delay each time we attack a new target
  FireFX                = FX_GondorSwordHit
  FiringDuration        = GAMLING_FIRINGDURATION 				; Duration of the sword swing

	DamageNugget                        ; A basic Nugget that just does damage
		Damage        = 100					
		Radius        = 20.0 ;
		DelayTime     = 200
		DamageType    = HERO
		DamageFXType  = SWORD_SLASH
		DeathType     = NORMAL
		DamageSpeed		= 700.0 ; must match the ShockWaveSpeed below
	End

	DOTNugget                        ; 30s time.
		Damage        = 20 ; default is 300
		AcceptDamageAdd = No
		Radius        = 10.0
		DelayTime     = 0
		DamageType    = FLAME
		DamageFXType  = MAGIC
		DeathType     = EXPLODED
		DamageInterval = 1000
		DamageDuration = 30000
		SpecialObjectFilter = AFFECTED_BY_POISON_OBJECTFILTER
	End

	MetaImpactNugget                    ; A Nugget that throws things back with force
		HeroResist			= .75
		ShockWaveAmount   = 20.0
		ShockWaveRadius   = 10.0
		ShockWaveTaperOff = 1  ;0.75
		ShockWaveZMult    = 0.75
		ShockWaveSpeed		= 700
	End  
End
Weapon TheodenHeroSword;;;
  LeechRangeWeapon      = Yes
  AttackRange           = STANDARD_MELEE_ATTACK_RANGE
	RadiusDamageAffects = ENEMIES NOT_SIMILAR
  MeleeWeapon           = Yes
  DelayBetweenShots     = GAMLING_DELAYBETWEENSHOTS 			
             ; time between shots, msec
  PreAttackDelay        = GAMLING_PREATTACKDELAY 				; 400 is sword swing delay time before contact with target.
  PreAttackType         = PER_SHOT ; Do the delay each time we attack a new target
  FireFX                = FX_TheodenGloriousChargeFX
  FiringDuration        = GAMLING_FIRINGDURATION 				; Duration of the sword swing

	DamageNugget                        ; A basic Nugget that just does damage
		Damage        = 300					
		Radius        = 50.0 ;
		DelayTime     = 200
		DamageType    = HERO
		DamageFXType  = MAGIC
		DeathType     = EXPLODED
		DamageSpeed		= 700.0 ; must match the ShockWaveSpeed below
	End

	DOTNugget                        ; 30s time.
		Damage        = 20 ; default is 300
		AcceptDamageAdd = No
		Radius        = 10.0
		DelayTime     = 0
		DamageType    = HERO
		DamageFXType  = MAGIC
		DeathType     = EXPLODED
		DamageInterval = 1000
		DamageDuration = 30000
		SpecialObjectFilter = AFFECTED_BY_POISON_OBJECTFILTER
	End

	MetaImpactNugget                    ; A Nugget that throws things back with force
		HeroResist			= .75
		ShockWaveAmount   = 20.0
		ShockWaveRadius   = 10.0
		ShockWaveTaperOff = 1  ;0.75
		ShockWaveZMult    = 0.75
		ShockWaveSpeed		= 700
	End  
End
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;STARTOFWOLF/ENDOFWOLF
Object PackWolf
ReplaceModule ModuleTag_01
	Draw = W3DScriptedModelDraw ModuleTag_01_NEW
DefaultModelConditionState
			Model				= RURohrm_SKN
			ParticleSysBone = BAT_HHEAD GCglowHorseWhite FollowBone:Yes			
			ParticleSysBone = B_HHIPL GCglowHorseRearWhite FollowBone:Yes
			ParticleSysBone = BAT_SPINE2 GCglowWhite FollowBone:Yes
		End
AnimationState				=	PASSENGER WEAPONSET_TOGGLE_1
			Animation				=	grabbed
				AnimationName		=	RURhrmArch_SKL.RURhrmArch_GBDA
				AnimationMode		=	LOOP
			End
			Flags					=	RANDOMSTART
		End
		
		; --- stunned anims
		AnimationState				=	FREEFALL WEAPONSET_TOGGLE_1
			Animation				=	free fall
				AnimationName		=	RURhrmArch_SKL.RURhrmArch_FLYA
				AnimationMode		=	LOOP
			End
			Flags					=	RANDOMSTART
		End
		
		AnimationState				=	STUNNED_FLAILING WEAPONSET_TOGGLE_1
			Animation				=	JustDie
				AnimationName		=	RURhrmArch_SKL.RURhrmArch_FLYC
				AnimationMode		=	LOOP
			End
			Flags					=	RANDOMSTART
		End

		AnimationState				= DYING BURNINGDEATH
			Animation
				AnimationName		= RURohrm_SKL.RURohrm_DIEA
				AnimationMode		= ONCE
				AnimationBlendTime	= 10
			End
		End

		; This is the no-spawn-horse type of death
		AnimationState				=	DYING SPLATTED WEAPONSET_TOGGLE_1
			Animation				=	splatted
				AnimationName		=	RURhrmArch_SKL.RURhrmArch_LNDA
				AnimationMode		=	ONCE
				AnimationBlendTime  =   2
			End
			FXEvent	= Frame:2 Name:FX_SplatDust
		End

		AnimationState				=	DYING WEAPONSET_TOGGLE_1
			Animation				=	JustDie
				AnimationName		=	RURhrmArch_SKL.RURhrmArch_DIEA
				AnimationMode		=	ONCE
			End
		End
		
		AnimationState				=	STUNNED_STANDING_UP WEAPONSET_TOGGLE_1
			Animation				=	StandUp
				AnimationName		=	RURhrmArch_SKL.RURhrmArch_GTPA
				AnimationMode		=	ONCE
				AnimationSpeedFactorRange = 1.5 1.5
			End
		End
		
		AnimationState				=	STUNNED WEAPONSET_TOGGLE_1
			Animation				=	Land
				AnimationName		=	RURhrmArch_SKL.RURhrmArch_LNDA
				AnimationMode		=	ONCE
			End
		End
				
		; Shooting whilst moving - 4 versions, one for each side.
		;---------------------------------------------------------------------------------------------------------
		AnimationState				=	FIRING_OR_PREATTACK_B MOVING TURRET_ANGLE_90 WEAPONSET_TOGGLE_1
			Animation				=	MoveAndFireBow
				AnimationName		=	RURhrmArch_SKL.RURhrmArch_ATKF
				AnimationMode		=	ONCE
				AnimationBlendTime		=	15
			End
			Flags					= MAINTAIN_FRAME_ACROSS_STATES
			FrameForPristineBonePositions = 20
		End
		AnimationState				=	FIRING_OR_PREATTACK_B MOVING TURRET_ANGLE_180 WEAPONSET_TOGGLE_1
			Animation				=	MoveAndFireBow
				AnimationName		=	RURhrmArch_SKL.RURhrmArch_ATKH
				AnimationMode		=	ONCE
				AnimationBlendTime		=	15
			End
			Flags					= MAINTAIN_FRAME_ACROSS_STATES
			FrameForPristineBonePositions = 20
		End
		AnimationState				=	FIRING_OR_PREATTACK_B MOVING TURRET_ANGLE_270 WEAPONSET_TOGGLE_1
			Animation				=	MoveAndFireBow
				AnimationName		=	RURhrmArch_SKL.RURhrmArch_ATKJ
				AnimationMode		=	ONCE
				AnimationBlendTime		=	15
			End
			Flags					= MAINTAIN_FRAME_ACROSS_STATES
			FrameForPristineBonePositions = 20
		End
		AnimationState				=	FIRING_OR_PREATTACK_B MOVING WEAPONSET_TOGGLE_1
			Animation				=	MoveAndFireBow
				AnimationName		=	RURhrmArch_SKL.RURhrmArch_ATKD
				AnimationMode		=	ONCE
				AnimationBlendTime		=	15
			End
			Flags					= MAINTAIN_FRAME_ACROSS_STATES
			FrameForPristineBonePositions = 20
		End
		;---------------------------------------------------------------------------------------------------------
				
;;======= BACKING UP
		
		AnimationState					= MOVING BACKING_UP WEAPONSET_TOGGLE_1
			Animation					= BACKING UP
				AnimationName			= RURhrmArch_SKL.RURhrmArch_BAKA
				AnimationMode			= LOOP
			End
		End
		
		AnimationState					=	MOVING TURN_LEFT_HIGH_SPEED WEAPONSET_TOGGLE_1
			Animation					=	TurnLeft
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_TNL1
				AnimationMode			=	LOOP
				AnimationBlendTime		=	20
			End
		End
		
		AnimationState					=	MOVING TURN_RIGHT_HIGH_SPEED WEAPONSET_TOGGLE_1
			Animation					=	TurnRight
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_TNR1
				AnimationMode			=	LOOP
				AnimationBlendTime		=	20
			End
		End
		
		AnimationState					= MOVING WANDER WEAPONSET_TOGGLE_1
			Animation					= WLKA
				AnimationName			= RURhrmArch_SKL.RURhrmArch_WLKA
				AnimationMode			= LOOP
			End
		End

		AnimationState					=	MOVING TURN_LEFT WEAPONSET_TOGGLE_1
			Animation					=	TurnLeft
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_TRNL
				AnimationMode			=	LOOP
			End
		End

		AnimationState					=	MOVING TURN_RIGHT WEAPONSET_TOGGLE_1
			Animation					=	TurnRight
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_TRNR
				AnimationMode			=	LOOP
			End
		End

		AnimationState					= MOVING ENGAGED WEAPONSET_TOGGLE_1
			Animation					= Moving_Engaged
				AnimationName			= RURhrmArch_SKL.RURhrmArch_RUNC
				AnimationMode			= LOOP
			End
			Flags						= RANDOMSTART
		End
		
;		AnimationState					= MOVING WALKING WEAPONSET_TOGGLE_1
;			Animation					= Walk1
;				AnimationName			= RURhrmArch_SKL.RURhrmArch_WLKB
;				AnimationMode			= LOOP
;				Distance				= 25
;			End
;		End
	
		AnimationState					=	MOVING ACCELERATE WEAPONSET_TOGGLE_1
			Animation					=	RunA
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_ACCL
				AnimationMode			=	LOOP
			End
			Flags						=	RANDOMSTART
		End
		
		AnimationState					=	DECELERATE WEAPONSET_TOGGLE_1
			Animation					=	RunA
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_DECL
				AnimationMode			=	LOOP
				AnimationSpeedFactorRange = 0.55 0.55
			End
			Flags						=	RANDOMSTART
		End

		AnimationState					=	MOVING WEAPONSET_TOGGLE_1
			Animation					=	RunA
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_RUNA
				AnimationMode			=	LOOP
				Distance				=   40
			End
			Flags						=	RANDOMSTART
		End

		; Shooting with Fire Upgrade - 4 versions, one for each side.
		;---------------------------------------------------------------------------------------------------------
		AnimationState					=	FIRING_OR_PREATTACK_B WEAPONSET_PLAYER_UPGRADE USER_2 TURRET_ANGLE_90 WEAPONSET_TOGGLE_1
			Animation					=	AttackA1
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_ATKL
				AnimationMode			=	ONCE
				AnimationBlendTime		=	15
			End
			Flags						= MAINTAIN_FRAME_ACROSS_STATES
			FrameForPristineBonePositions = 20
		End
		AnimationState					=	FIRING_OR_PREATTACK_B WEAPONSET_PLAYER_UPGRADE USER_2 TURRET_ANGLE_180 WEAPONSET_TOGGLE_1
			Animation					=	AttackA1
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_ATKN
				AnimationMode			=	ONCE
				AnimationBlendTime		=	15
			End
			Flags						= MAINTAIN_FRAME_ACROSS_STATES
			FrameForPristineBonePositions = 20
		End
		AnimationState					=	FIRING_OR_PREATTACK_B WEAPONSET_PLAYER_UPGRADE USER_2 TURRET_ANGLE_270 WEAPONSET_TOGGLE_1
			Animation					=	AttackA1
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_ATKP
				AnimationMode			=	ONCE
				AnimationBlendTime		=	15
			End
			Flags						= MAINTAIN_FRAME_ACROSS_STATES
			FrameForPristineBonePositions = 20
		End
		AnimationState					=	FIRING_OR_PREATTACK_B WEAPONSET_PLAYER_UPGRADE USER_2 WEAPONSET_TOGGLE_1
			Animation					=	AttackA1
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_ATKB
				AnimationMode			=	ONCE
				AnimationBlendTime		=	15
			End
			Flags						= MAINTAIN_FRAME_ACROSS_STATES
			FrameForPristineBonePositions = 20
		End
		;---------------------------------------------------------------------------------------------------------

		; Shooting - 4 versions, one for each side.
		;---------------------------------------------------------------------------------------------------------
		AnimationState					=	FIRING_OR_PREATTACK_B TURRET_ANGLE_90 WEAPONSET_TOGGLE_1
			Animation					=	AttackA1
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_ATKL
				AnimationMode			=	ONCE
				AnimationBlendTime		=	15
			End
			Flags						= MAINTAIN_FRAME_ACROSS_STATES
			FrameForPristineBonePositions = 20
		End
		AnimationState					=	FIRING_OR_PREATTACK_B TURRET_ANGLE_180 WEAPONSET_TOGGLE_1
			Animation					=	AttackA1
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_ATKN
				AnimationMode			=	ONCE
				AnimationBlendTime		=	15
			End
			Flags						= MAINTAIN_FRAME_ACROSS_STATES
			FrameForPristineBonePositions = 20
		End
		AnimationState					=	FIRING_OR_PREATTACK_B TURRET_ANGLE_270 WEAPONSET_TOGGLE_1
			Animation					=	AttackA1
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_ATKP
				AnimationMode			=	ONCE
				AnimationBlendTime		=	15
			End
			Flags						= MAINTAIN_FRAME_ACROSS_STATES
			FrameForPristineBonePositions = 20
		End
		AnimationState					=	FIRING_OR_PREATTACK_B WEAPONSET_TOGGLE_1
			Animation					=	AttackA1
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_ATKB
				AnimationMode			=	ONCE
				AnimationBlendTime		=	15
			End
			Flags						= MAINTAIN_FRAME_ACROSS_STATES
			FrameForPristineBonePositions = 20
		End
		;---------------------------------------------------------------------------------------------------------

		AnimationState					=	BETWEEN_FIRING_SHOTS_B WEAPONSET_TOGGLE_1
			Animation					=	BetweenFiringShots
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_IDLA
				AnimationMode			=	LOOP
				AnimationBlendTime		=   15
			End
		End

;;--------------------- EMOTIONS ----------------------------------------------------------------------------------
;;===== TERROR		
		AnimationState					= MOVING EMOTION_TERROR EMOTION_LOOK_TO_SKY WEAPONSET_TOGGLE_1
			Animation					= TerrorFromTheSky
				AnimationName			= RURhrmArch_SKL.RURhrmArch_RUNB
				AnimationMode			= LOOP
			End
		End
		
		AnimationState					= MOVING EMOTION_TERROR WEAPONSET_TOGGLE_1 
			Animation					= TerrorFromTheSky
				AnimationName			= RURhrmArch_SKL.RURhrmArch_RUNB
				AnimationMode			= LOOP
			End
		End
		
;;======= APPREHENSIVE

		AnimationState					=	EMOTION_ALERT EMOTION_AFRAID WEAPONSET_TOGGLE_1
			Animation					=	Apprehensive
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_APPA
				AnimationMode			=	LOOP	;Change this to ONCE if adding additional anims
			End
		End

;;======= AFRAID

		AnimationState					= EMOTION_AFRAID WEAPONSET_TOGGLE_1
			Animation					= FERA
				AnimationName			= RURhrmArch_SKL.RURhrmArch_FERA
				AnimationMode			= LOOP
			End 
		;	Animation					= FERB
		;		AnimationName			= RURhrmArch_SKL.RURhrmArch_FERB
		;		AnimationMode			= LOOP
		;	End
		End

;;======= CELEBRATING
		
		; This is what happens when Theo gives his rousing speech
		AnimationState					=	EMOTION_CELEBRATING WEAPONSET_TOGGLE_1
			Animation					=	CheerA
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_CHRA
				AnimationMode			=	ONCE
			End
			Animation					=	CheerB
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_CHRB
				AnimationMode			=	ONCE
			End
			Animation					=	CheerD
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_CHRD
				AnimationMode			=	ONCE
			End
			Animation					=	Salute
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_SLTA
				AnimationMode			=	ONCE
			End
			Flags						= RANDOMSTART RESTART_ANIM_WHEN_COMPLETE
		End

;;======= TAUNTING
			
		AnimationState					= EMOTION_TAUNTING WEAPONSET_TOGGLE_1
			Animation					= Taunting
				AnimationName			= RURhrmArch_SKL.RURhrmArch_TNTA
				AnimationMode			= ONCE
			End
			Animation					= Taunting2
				AnimationName			= RURhrmArch_SKL.RURhrmArch_TNTB
				AnimationMode			= ONCE
			End
			Flags						= RANDOMSTART RESTART_ANIM_WHEN_COMPLETE
		End

;;======= POINTING
			
		AnimationState					= EMOTION_POINTING WEAPONSET_TOGGLE_1
			Animation					= Pointing1
				AnimationName			= RURhrmArch_SKL.RURhrmArch_PNTA
				AnimationMode			= LOOP
			End
		End
		
;;======== ALERT

		AnimationState					= EMOTION_ALERT WEAPONSET_TOGGLE_1
			Animation					= IDLA
				AnimationName			= RURhrmArch_SKL.RURhrmArch_IDLA
				AnimationMode			= LOOP
			End
		End

		AnimationState					=	ATTACKING WEAPONSET_TOGGLE_1
			Animation					=	Reloading
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_IDLA
				AnimationMode			=	LOOP
			End
		End				
		

		; Swapping to bow -----		
		AnimationState					= SWAPPING_TO_WEAPONSET_1		; note - needs to go above any WEAPONSET_TOGGLE_1.
			StateName					= State_PuttingSpearAway
			Animation
				AnimationName			= RURohrm_SKL.RURohrm_WPNB		; putting spear away.
				AnimationMode			= ONCE_BACKWARDS
				AnimationSpeedFactorRange = 0.5 0.7						; Needs to match one second.
			End
			Flags						= START_FRAME_LAST
		End
				
		AnimationState					=	RAISING_FLAG WEAPONSET_TOGGLE_1
			Animation					=	CheerA
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_CHRA
				AnimationMode			=	ONCE
				AnimationSpeedFactorRange = 0.9 1.1
			End
			Animation					=	CheerB
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_CHRB
				AnimationMode			=	ONCE
				AnimationSpeedFactorRange = 0.9 1.1
			End
			Animation					=	CheerD
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_CHRD
				AnimationMode			=	ONCE
				AnimationSpeedFactorRange = 0.9 1.1
			End
			Animation					=	Salute
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_SLTA
				AnimationMode			=	ONCE
				AnimationSpeedFactorRange = 0.9 1.1
			End
			Flags						= RESTART_ANIM_WHEN_COMPLETE
		End

;;-------------------- SELECTED ---------------------------------------------------------------

		AnimationState					= SELECTED WEAPONSET_TOGGLE_1
			StateName					= State_Selected
			SimilarRestart				= Yes
			Animation					= AtAttention
				AnimationName			= RURhrmArch_SKL.RURhrmArch_ATNB
				AnimationMode			= LOOP
			End
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "Idle" then
					CurDrawableSetTransitionAnimState("TRANS_Idle_to_SelectedWEAPONSET1")
				elseif Prev == "State_PuttingSpearAway" then
					CurDrawableSetTransitionAnimState("TRANS_SpearAway_To_SelectedWEAPONSET1")
				end
			EndScript	
		End
		
		; Swapping to spear -----		
		AnimationState					= SWAPPING_TO_WEAPONSET_2
			StateName					= State_PuttingBowAway
			Animation
				AnimationName			= RURhrmArch_SKL.RURhrmArch_WPNA		; putting bow away.
				AnimationMode			= ONCE
				AnimationSpeedFactorRange = 0.5 0.6								; Needs to match one second, approx.
			End
		End

		; Idle
		AnimationState					=	WEAPONSET_TOGGLE_1
			StateName					=	Idle
			Animation					=	IDLB
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_IDLB
				AnimationMode			=	LOOP
			End
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "State_Selected" then
					CurDrawableSetTransitionAnimState("TRANS_Selected_to_IdleWEAPONSET1")
				elseif Prev == "State_PuttingSpearAway" then
					CurDrawableSetTransitionAnimState("TRANS_SpearAway_To_IdleWEAPONSET1")
				end
			EndScript
		End
		
		TransitionState					=	TRANS_Idle_to_SelectedWEAPONSET1
			Animation					=	ATNA
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_ATNA
				AnimationMode			=	ONCE
				AnimationSpeedFactorRange = 0.8 1.2
			End
		End
		
		TransitionState					=	TRANS_SpearAway_To_SelectedWEAPONSET1	; get bow out
			Animation					=	ATNA
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_WPNA
				AnimationMode			=	ONCE_BACKWARDS
			End
			Flags						= START_FRAME_LAST
		End
		
		TransitionState					=	TRANS_Selected_to_IdleWEAPONSET1
			Animation					=	ATNC
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_ATNA
				AnimationMode			=	ONCE_BACKWARDS
				AnimationSpeedFactorRange = 0.8 1.2
			End
			Flags						= START_FRAME_LAST
		End
		
		TransitionState					=	TRANS_SpearAway_To_IdleWEAPONSET1		; get bow out
			Animation
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_WPNA
				AnimationMode			=	ONCE_BACKWARDS
			End
			Flags						= START_FRAME_LAST
		End

		
		;---------------------------------------------
		;-----------------Spear Anims-----------------
		;---------------------------------------------
		IdleAnimationState
			StateName				=	Idle
			Animation				=	IdleB
				AnimationName		=	RURohrm_SKL.RURohrm_IDLB
				AnimationMode		=	ONCE
				AnimationBlendTime	=	15
			End
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "State_Selected" then
					CurDrawableSetTransitionAnimState("TRANS_Selected_To_Idle")
				elseif Prev == "State_PuttingBowAway" then
					CurDrawableSetTransitionAnimState("TRANS_BowAway_To_Idle")
				end
			EndScript
		End
						
		AnimationState				=	PASSENGER
			Animation				=	grabbed
				AnimationName		=	RURohrm_SKL.RURohrm_GBDA
				AnimationMode		=	LOOP
			End
		End
		
		; --- stunned anims
		AnimationState				=	FREEFALL 
			Animation				=	free fall
				AnimationName		=	RURohrm_SKL.RURohrm_FLYB
				AnimationMode		=	LOOP
				AnimationBlendTime	=	10
			End
		End
		
		AnimationState				=	STUNNED_FLAILING 
			Animation				=	JustDie
				AnimationName		=	RURohrm_SKL.RURohrm_FLYC
				AnimationMode		=	LOOP
			End
			Flags					=	RANDOMSTART
		End

		; This is the no-spawn-horse type of death
		AnimationState				=	DYING DEATH_1 SPLATTED
			Animation				=	splatted
				AnimationName		=	RURohrm_SKL.RURohrm_LNDA
				AnimationMode		=	ONCE
				AnimationBlendTime  =   2
			End
			FXEvent	= Frame:2 Name:FX_SplatDust
		End
		
		

		AnimationState				=	DYING DEATH_1 
			Animation				=	JustDie
				AnimationName		=	RURohrm_SKL.RURohrm_DIEA
				AnimationMode		=	ONCE
			End
		End
		
		AnimationState				=	DYING DEATH_2 
			Animation				=	FadeOut
				AnimationName		=	RURohrm_SKL.RURohrm_IDLB
				AnimationMode		=	ONCE
			End
		End
		
		AnimationState				=	STUNNED_STANDING_UP
			Animation				=	StandUp
				AnimationName		=	RURohrm_SKL.RURohrm_GTPA
				AnimationMode		=	ONCE
				AnimationSpeedFactorRange = 1.5 1.5
			End
		End
		
		AnimationState				=	STUNNED
			Animation				=	Land
				AnimationName		=	RURohrm_SKL.RURohrm_LNDA
				AnimationMode		=	ONCE
			End
		End
		
		
				
		AnimationState						= BURNINGDEATH
			Animation
				AnimationName				= RURohrm_SKL.RURohrm_MFDA
				AnimationMode				= LOOP
				Distance					= 100
			End
		End

		AnimationState						= PARALYZED
			Animation
				AnimationName				= RURohrm_SKL.RURohrm_IDLB
				AnimationMode				= LOOP
			End
		End


		AnimationState        = MOVING FIRING_OR_PREATTACK_A
			ShareAnimation		= Yes
			Animation           = TrotAndFire
				AnimationName       = RURohrm_SKL.RURohrm_ATRB
				AnimationMode       = LOOP
				Distance			= 70; 35
			End
			Flags               = RANDOMSTART
		End

;;======= BACKING UP
		
		AnimationState					= MOVING BACKING_UP
			Animation					= BACKING UP
				AnimationName			= RURohrm_SKL.RURohrm_BAKA
				AnimationMode			= LOOP
			End
		End
		
		AnimationState					=	TURN_LEFT_HIGH_SPEED
			Animation					=	TurnLeft
				AnimationName			=	RURohrm_SKL.RURohrm_TNL1
				AnimationMode			=	LOOP
				AnimationBlendTime		=	20
			End
		End
		
		AnimationState					=	TURN_RIGHT_HIGH_SPEED
			Animation					=	TurnRight
				AnimationName			=	RURohrm_SKL.RURohrm_TNR1
				AnimationMode			=	LOOP
				AnimationBlendTime		=	20
			End
		End
		
		AnimationState					= MOVING WANDER
			Animation					= WLKA
				AnimationName			= RURohrm_SKL.RURohrm_WLKA
				AnimationMode			= LOOP
			End
		End

		AnimationState					=	MOVING TURN_LEFT 
			Animation					=	TurnLeft
				AnimationName			=	RURohrm_SKL.RURohrm_TRNL
				AnimationMode			=	LOOP
			End
		End

		AnimationState					=	MOVING TURN_RIGHT 
			Animation					=	TurnRight
				AnimationName			=	RURohrm_SKL.RURohrm_TRNR
				AnimationMode			=	LOOP
			End
		End

		AnimationState					= MOVING ENGAGED
			Animation					= Moving_Engaged
				AnimationName			= RURohrm_SKL.RURohrm_RUNC
				AnimationMode			= LOOP
			End
			Flags						= RANDOMSTART
		End
		
;		AnimationState					= MOVING WALKING
;			Animation					= Walk1
;				AnimationName			= RURohrm_SKL.RURohrm_WLKB
;				AnimationMode			= LOOP
;				Distance				= 25
;			End
;		End

		AnimationState					= MOVING ACCELERATE
			Animation					= Accelerate
				AnimationName			= RURohrm_SKL.RURohrm_ACCL
				AnimationMode			= ONCE ; was LOOP
			End
		End

		AnimationState					= DECELERATE
			Animation					= Decelerate
				AnimationName			= RURohrm_SKL.RURohrm_DECL
				AnimationMode			= ONCE
				AnimationSpeedFactorRange = 0.55 0.55
			End
		End
			
		AnimationState					=	MOVING
			Animation					=	RunA
				AnimationName			=	RURohrm_SKL.RURohrm_RUNA
				AnimationMode			=	LOOP
				Distance				=   40
			End
			Flags						=	RANDOMSTART
		End


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

		; Standard attack with spear.
		AnimationState					=	FIRING_OR_PREATTACK_A
			Animation					=	AttackA1
				AnimationName			=	RURohrm_SKL.RURohrm_ATKA
				AnimationMode			=	ONCE
			End
		End
		;---------------------------------------------------------------------------------------------------------
		

;;--------------------- EMOTIONS ----------------------------------------------------------------------------------
;;===== TERROR		
		AnimationState					= MOVING EMOTION_TERROR EMOTION_LOOK_TO_SKY
			Animation					= TerrorFromTheSky
				AnimationName			= RURohrm_SKL.RURohrm_RUNB
				AnimationMode			= LOOP
			End
		End
		
		AnimationState					= MOVING EMOTION_TERROR
			Animation					= TerrorFromTheSky
				AnimationName			= RURohrm_SKL.RURohrm_RUNB
				AnimationMode			= LOOP
			End
		End
		
;;======= APPREHENSIVE

		AnimationState					=	EMOTION_ALERT EMOTION_AFRAID
			Animation					=	Apprehensive
				AnimationName			=	RURohrm_SKL.RURohrm_APPA
				AnimationMode			=	LOOP	;Change this to ONCE if adding additional anims
			End
		End

;;======= AFRAID

		AnimationState					= EMOTION_AFRAID
			Animation					= FERA
				AnimationName			= RURohrm_SKL.RURohrm_FERA
				AnimationMode			= LOOP
			End
			;Animation					= FERB
			;	AnimationName			= RURohrm_SKL.RURohrm_FERB
			;	AnimationMode			= LOOP
			;End
		End

;;======= CELEBRATING
		
		AnimationState					=	EMOTION_CELEBRATING
			Animation					=	CheerA
				AnimationName			=	RURohrm_SKL.RURohrm_CHRA
				AnimationMode			=	ONCE
			End
			Animation					=	CheerB
				AnimationName			=	RURohrm_SKL.RURohrm_CHRB
				AnimationMode			=	ONCE
			End
			Animation					=	CheerC
				AnimationName			=	RURohrm_SKL.RURohrm_CHRC
				AnimationMode			=	ONCE
			End
			Animation					=	CheerD
				AnimationName			=	RURohrm_SKL.RURohrm_CHRD
				AnimationMode			=	ONCE
			End
			Animation					=	Salute
				AnimationName			=	RURohrm_SKL.RURohrm_SLTA
				AnimationMode			=	ONCE
			End
			Flags						= RANDOMSTART RESTART_ANIM_WHEN_COMPLETE
		End

;;======= TAUNTING
			
		AnimationState					= EMOTION_TAUNTING
			Animation					= Taunting
				AnimationName			= RURohrm_SKL.RURohrm_TNTA
				AnimationMode			= ONCE
			End
			Animation					= Taunting2
				AnimationName			= RURohrm_SKL.RURohrm_TNTB
				AnimationMode			= ONCE
			End
			Flags						= RANDOMSTART RESTART_ANIM_WHEN_COMPLETE
		End

;;======= POINTING
			
		AnimationState					= EMOTION_POINTING
			Animation					= Pointing1
				AnimationName			= RURohrm_SKL.RURohrm_PNTA
				AnimationMode			= LOOP
			End
		End
		
;;======== ALERT

		AnimationState					= EMOTION_ALERT
			Animation					= IDLA
				AnimationName			= RURohrm_SKL.RURohrm_IDLA
				AnimationMode			= LOOP
			End
		End
		
		AnimationState					=	RAISING_FLAG
			Animation					=	CheerA
				AnimationName			=	RURohrm_SKL.RURohrm_CHRA
				AnimationMode			=	ONCE
				AnimationSpeedFactorRange = 0.9 1.1
			End
			Animation					=	CheerB
				AnimationName			=	RURohrm_SKL.RURohrm_CHRB
				AnimationMode			=	ONCE
				AnimationSpeedFactorRange = 0.9 1.1
			End
			Animation					=	CheerC
				AnimationName			=	RURohrm_SKL.RURohrm_CHRC
				AnimationMode			=	ONCE
				AnimationSpeedFactorRange = 0.9 1.1
			End
			Animation					=	CheerD
				AnimationName			=	RURohrm_SKL.RURohrm_CHRD
				AnimationMode			=	ONCE
				AnimationSpeedFactorRange = 0.9 1.1
			End
			Animation					=	Salute
				AnimationName			=	RURohrm_SKL.RURohrm_SLTA
				AnimationMode			=	ONCE
			End
			Flags						= RESTART_ANIM_WHEN_COMPLETE
		End


;;-------------------- SELECTED ---------------------------------------------------------------
				
		AnimationState					= SELECTED
			StateName					= State_Selected
;			SimilarRestart				= Yes
			Animation					= AtAttention
				AnimationName			= RURohrm_SKL.RURohrm_IDLA
				AnimationMode			= LOOP
			End
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "Idle" then
					CurDrawableSetTransitionAnimState("TRANS_Idle_To_Selected")
				elseif Prev == "State_PuttingBowAway" then
					CurDrawableSetTransitionAnimState("TRANS_BowAway_To_Selected")
				end
			EndScript
		End
		
		
		TransitionState					=	TRANS_Idle_to_Selected
			Animation					=	ATNA
				AnimationName			=	RURohrm_SKL.RURohrm_ATNA
				AnimationMode			=	ONCE
				AnimationSpeedFactorRange = 1.0 1.0
			End
		End

		TransitionState					=	TRANS_BowAway_To_Selected
			Animation
				AnimationName			=	RURohrm_SKL.RURohrm_WPNB
				AnimationMode			=	ONCE
			End
		End
		
		TransitionState					=	TRANS_Selected_to_Idle
			Animation					=	ATNC
				AnimationName			=	RURohrm_SKL.RURohrm_ATNA
				AnimationMode			=	ONCE_BACKWARDS
				AnimationSpeedFactorRange = 0.6 1.0
			End
			Flags						= START_FRAME_LAST
		End
		
		TransitionState					=	TRANS_BowAway_To_Idle
			Animation
				AnimationName			=	RURohrm_SKL.RURohrm_WPNB
				AnimationMode			=	ONCE
			End
		End
		
	End
End
End
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ENDOFWOLF
Object RohanTheoden
CommandPoints = 0
CommandSet = NewTheodenCommandSet

ReplaceModule ModuleTag_DRAW
	Draw = W3DScriptedModelDraw ModuleTag_DRAW_NEW

		;WadingParticleSys = EntRipples

	  OkToChangeModelColor = Yes
	  
	    StaticModelLODMode = yes ; Will append M or L to the skin name depending on GameLOD

		DefaultModelConditionState
			Model = RUTheoden_SKN
			Skeleton = RUTheoden_SKL
			ParticleSysBone = B_SWORDBONE TheodenSwordglow FollowBone:Yes
		End

		ModelConditionState = WEAPONSET_HERO_MODE;7336
			Model = RUTheoden_SKN
			Skeleton = RUTheoden_SKL
			ParticleSysBone = BAT_RIB TheoMaster FollowBone:Yes
			ParticleSysBone = BAT_HHEAD GCglowHorseRearWhite FollowBone:Yes			
			ParticleSysBone = B_HHIPL GCglowHorseRearWhite FollowBone:Yes
			ParticleSysBone = BAT_SPINE2 GCglowWhite FollowBone:Yes
			ParticleSysBone = B_SWORDBONE TheodenSwordglow FollowBone:Yes
		End
	
		; --- Idle Anims
		IdleAnimationState
			StateName				=	BORED
			Animation				=	IDLB
				AnimationName		=	RUTheoden_IDLB
				AnimationMode		=	ONCE
				AnimationPriority	=	1
			End
			Animation				=	IDLC
				AnimationName		=	RUTheoden_IDLC
				AnimationMode		=	ONCE
				AnimationPriority	=	10
			End
			Animation				=	IDLD
				AnimationName		=	RUTheoden_IDLD
				AnimationMode		=	ONCE
				AnimationPriority	=	1
			End
			Animation				=	IDLE
				AnimationName		=	RUTheoden_IDLE
				AnimationMode		=	ONCE
				AnimationPriority	=	1
			End
			Flags				=	RESTART_ANIM_WHEN_COMPLETE
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "SELECTED"	then CurDrawableSetTransitionAnimState("Transition_SelectedToBored") end
				if Prev == "READY"		then CurDrawableSetTransitionAnimState("Transition_ReadyToBored") end
			EndScript
		End
		
		AnimationState				=	FREEFALL 
			Animation				=	freefall
				AnimationName		=	RUTheoden_FLYA
				AnimationMode		=	LOOP
			End
			Flags					=	RANDOMSTART
		End
		
		AnimationState						=	STUNNED_FLAILING 
			Flags							=	RANDOMSTART
			Animation						=	RUTheoden_FLYA
				AnimationName				=	RUTheoden_FLYA
				AnimationMode				=	LOOP
				AnimationSpeedFactorRange	= 0.4 0.6
			End
		End
		
		; --- Dying anims
		AnimationState						=	DYING SPLATTED
			Animation						=	RUTheoden_LNDA
				AnimationName				=	RUTheoden_LNDA
				AnimationMode				=	ONCE
			End
		End
		AnimationState						=	DYING
			Animation						=	RUTheoden_DIEA  ; this one sucks.
				AnimationName				=	RUTheoden_DIEA
				AnimationMode				=	ONCE
			End
			Animation						=	RUTheoden_DIEB
				AnimationName				=	RUTheoden_DIEB
				AnimationMode				=	ONCE
			End
		End

		AnimationState						= PARALYZED
			Animation
				AnimationName				= RUTheoden_IDLB
				AnimationMode				= ONCE_BACKWARDS
			End
			Flags							= START_FRAME_FIRST
		End

		; --- Stunned anims
						
		AnimationState						=	STUNNED_STANDING_UP
			Animation						=	RUTheoden_GTPA
				AnimationName				=	RUTheoden_GTPA
				AnimationMode				=	ONCE
				AnimationSpeedFactorRange = 1.5 1.5
			End
		End
		AnimationState						=	STUNNED 
			Animation						=	RUTheoden_LNDA
				AnimationName				=	RUTheoden_LNDA
				AnimationMode				=	ONCE
			End
		End
		
		AnimationState        = MOVING FIRING_OR_PREATTACK_A
			ShareAnimation		= Yes
			Animation           = RunAndFire
				AnimationName       = RUTheoden_ATRA
				AnimationMode       = LOOP
			End
			Flags               = RANDOMSTART 
		End
		
		
		; Attacking Anims
		AnimationState						=	FIRING_OR_PREATTACK_A
			Animation						=	ATKA
				AnimationName				=	RUTheoden_ATKA
				AnimationMode				=	ONCE
				UseWeaponTiming				=	Yes
				;AnimationSpeedFactorRange	=	.826 .826
			End
			Animation						=	ATKB
				AnimationName				=	RUTheoden_ATKB
				AnimationMode				=	ONCE
				;AnimationSpeedFactorRange	=	.9066 .9066
			End
			Animation						=	ATKC
				AnimationName				=	RUTheoden_ATKC
				AnimationMode				=	ONCE
				UseWeaponTiming				=	Yes
				;AnimationSpeedFactorRange	=	1.1466 1.1466
			End
			Animation						=	ATKD
				AnimationName				=	RUTheoden_ATKD
				AnimationMode				=	ONCE
				UseWeaponTiming				=	Yes
				;AnimationSpeedFactorRange	=	1.0666 1.0666
			End
		End
		
		AnimationState						=	MOVING ATTACKING
			Animation						=	RUTheoden_RUNB
				AnimationName				=	RUTheoden_RUNB
				AnimationSpeedFactorRange	=	0.4 0.4
				AnimationMode				=	LOOP
				AnimationBlendTime			=   10
				Distance					=	30
			End
		End	
			
		AnimationState						=	MOVING 
			Animation						=	RUTheoden_RUNA
				AnimationName				=	RUTheoden_RUNA
				AnimationMode				=	LOOP
				Distance					=	30
			End
		End

		AnimationState						=	PACKING_TYPE_2
			StateName						=	SPELL
			Animation						=	SPCC
				AnimationName				=	RUTheoden_SPCB
				AnimationSpeedFactorRange	=	1.1666 1.1666
				AnimationMode				=	ONCE
				AnimationBlendTime	=	20
			End
			Animation						=	SPCD
				AnimationName				=	RUTheoden_SPCC
				AnimationMode				=	ONCE
				AnimationBlendTime	=	20
			End
		End
	
		; --------- Click and Hit Reactions ------------
		AnimationState						= HIT_REACTION HIT_LEVEL_1
			Animation						= Hit_Level_1_a
				AnimationName				= RUTheoden_HITA
				AnimationMode				= ONCE
			End
		End
		
		;----Emotion Animations

		AnimationState				= LEVELED 						; This state clears itself in 3 seconds
			Animation				= LevelUp
				AnimationName		= RUTheoden_CHRB
				AnimationMode		= ONCE
			End
		End
		
		AnimationState				=	EMOTION_CELEBRATING
			Animation				=	CHRA
				AnimationName		=	RUTheoden_CHRA
				AnimationMode		=	ONCE
			End
			Animation				=	CHRB
				AnimationName		=	RUTheoden_CHRB
				AnimationMode		=	ONCE
			End
			Flags					=	RESTART_ANIM_WHEN_COMPLETE
		End
		
		AnimationState				=	EMOTION_TAUNTING
			Animation				=	CHRB
				AnimationName		=	RUTheoden_CHRB
				AnimationMode		=	ONCE
			End
			Flags					=	RESTART_ANIM_WHEN_COMPLETE
		End
		
		AnimationState				=	EMOTION_ALERT
			StateName				=	READY
			Animation				=	ready
				AnimationName		=	RUTheoden_IDLA
				AnimationMode		=	LOOP
				AnimationBlendTime	=	20
			End
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "BORED"		then CurDrawableSetTransitionAnimState("Transition_BoredToReady") end
				if Prev == "SELECTED"	then CurDrawableSetTransitionAnimState("Transition_SelectedToReady") end
			EndScript
		End
		
		AnimationState				=	RAISING_FLAG
			Animation				=	CHRA
				AnimationName		=	RUTheoden_CHRA
				AnimationMode		=	ONCE
			End
			Animation				=	CHRB
				AnimationName		=	RUTheoden_CHRB
				AnimationMode		=	ONCE
			End
			Flags					=	RESTART_ANIM_WHEN_COMPLETE
		End

		AnimationState				=	SELECTED 
			StateName				=	SELECTED
			Animation				=	ATNB
				AnimationName		=	RUTheoden_ATNB
				AnimationMode		=	LOOP
			End
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "BORED" then CurDrawableSetTransitionAnimState("Transition_BoredToSelected") end
				if Prev == "READY" then CurDrawableSetTransitionAnimState("Transition_ReadyToSelected") end
				if Prev == "SPELL" then CurDrawableSetTransitionAnimState("Transition_ReadyToSelected") end
			EndScript
		End		
		
		TransitionState Transition_BoredToReady
			Animation				=	ready
				AnimationName		=	RUTheoden_IDLA
				AnimationMode		=	LOOP
				AnimationBlendTime	=	20
			End
		End
		
		TransitionState Transition_ReadyToBored
			Animation				=	IDLC
				AnimationName		=	RUTheoden_IDLC
				AnimationMode		=	ONCE
				AnimationBlendTime	=	20
			End
		End
		
		TransitionState Transition_BoredToSelected
			Animation				=	ATNA
				AnimationName		=	RUTheoden_ATNA
				AnimationMode		=	ONCE
			End
		End

		TransitionState Transition_SelectedToBored
			Animation				=	ATNE
				AnimationName		=	RUTheoden_ATNE
				AnimationMode		=	ONCE
			End
		End
	
		TransitionState Transition_SelectedToReady
			Animation				=	ATNC
				AnimationName		=	RUTheoden_ATNA		; RUTheoden_ATNC doesn't exist.
				AnimationMode		=	ONCE
			End
		End
		
		TransitionState Transition_ReadyToSelected
			Animation				=	ATNC
				AnimationName		=	RUTheoden_ATNA		; RUTheoden_ATNC doesn't exist
				AnimationMode		=	ONCE_BACKWARDS
			End
			Flags = START_FRAME_LAST
		End
	End
End
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;THEO ANIMS END;;;;;;;;;;;;;;;;;;;;;;
WeaponSet
		Conditions 			= None 
		Weapon     			= PRIMARY  NewTheodenSword  		
		AutoChooseSources	= PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI		
	End
WeaponSet
		Conditions		= WEAPONSET_HERO_MODE
		Weapon			= PRIMARY    TheodenHeroSword
	End
AddModule
	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_RestorationUnpause
		SpecialPowerTemplate		= SpecialAbilityElrondRestoration
		TriggeredBy					= Upgrade_ElrondRestoration
	End
	End

AddModule
	Behavior = SpecialPowerTimerRefreshSpecialPower ModuleTag_RestorationRefresh
		SpecialPowerTemplate		= SpecialAbilityElrondRestoration
		StartsPaused				= Yes
		UpdateModuleStartsAttack	= No
		AffectAllies				= Yes
		AttributeModifierRange		= 1
		AttributeModifierAffects	= ALL -ElvenElrond ALLIES
		SetModelCondition			= ModelConditionState:USER_1
		SetModelConditionTime		= 3.66
	End
	End

AddModule
  	Behavior = PlayerHealSpecialPower ModuleTag_RestorationHeal
		SpecialPowerTemplate		= SpecialAbilityElrondRestorationHeal
		HealAffects					= INFANTRY CAVALRY MONSTER
		HealAmount					= 100 ; percent of max health
		HealRadius					= 300
		HealFX						= FX_ElrondHealSpecialPower
	End
	End	
AddModule
Behavior = SpecialPowerModule ModuleTag_CallPackStarter                      
		SpecialPowerTemplate		= SpecialAbilityCallPack
		TriggerFX 			= FX_SoWolf_SummonPack
		UpdateModuleStartsAttack	= Yes
		StartsPaused			= No
		InitiateSound			= SpellRohirrimSummonMS
	End
End
AddModule
	Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_FloodUpdate   
		SpecialPowerTemplate    = SpecialAbilityCallPack

		UnpackTime              = 200
		PackTime                = 1000

		StartAbilityRange 	= 500.0
		
		SpecialWeapon 		= ShadeCallthePack
		WhichSpecialWeapon 	= 1
	End
End
AddModule
	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_CreateAHeroInvulnerabilityEnabler_Level3
	SpecialPowerTemplate = SpecialAbilityCreateAHeroInvulnerability_Level3
	TriggeredBy			 = Upgrade_CreateAHeroInvulnerability_Level3
End
End
AddModule
Behavior = SpecialPowerModule ModuleTag_CreateAHeroInvulnerabilityStarter_Level3
	SpecialPowerTemplate		 = SpecialAbilityCreateAHeroInvulnerability_Level3
	UpdateModuleStartsAttack	 = No
	StartsPaused				 = Yes
	AttributeModifier			 = CreateAHeroInvulnerabilityBonus_Level3
	AttributeModifierRange		 = 1
	AttributeModifierAffectsSelf = Yes
	AttributeModifierAffects	 = ANY +CAVALRY	+INFANTRY
	AttributeModifierFX			 = FX_CreateAHeroInvulnerability_Start
End
End
AddModule
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_CreateAHeroWordOfPoultryEnabler_Level2
	SpecialPowerTemplate = SpecialAbilityCreateAHeroWordOfPoultry_Level2
	TriggeredBy			 = Upgrade_CreateAHeroWordOfPoultry_Level2
End
End
AddModule
Behavior = SpecialPowerModule ModuleTag_CreateAHeroWordOfPoultryStarter_Level2			;; SpecialAbility is	a SpecialPower,	SpecialPower is	anyting	special
	SpecialPowerTemplate = SpecialAbilityCreateAHeroWordOfPoultry_Level2
	StartsPaused		 = Yes
End
End
AddModule
Behavior = ReplaceObjectUpdate ModuleTag_WordOfPoultryUpdate_Level2
	SpecialPowerTemplate    = SpecialAbilityCreateAHeroWordOfPoultry_Level2
	;;SkipContinue			= Yes
	UnpackingVariation		= 1
	UnpackTime             	= 800
	PreparationTime			= 1   
	;;PersistentPrepTime		= 1000 
	PackTime				= 100
	AwardXPForTriggering    = 0
	StartAbilityRange		= CREATE_A_HERO_WORD_OF_POULTRY_RANGE_L2
	MustFinishAbility		= Yes
	ReplaceObject
		TargetObjectFilter = CREATE_A_HERO_WORD_OF_POULTRY_OBJECT_FILTER
		ReplacementObjectName = Chicken_Replacement Rabbit_Replacement Dog_Replacement Dog1_Replacement Racoon_Replacement Duck_Replacement Cow_Replacement Sheep_Replacement Crow_Replacement ;;GoatMale_Replacement GoatFemale_Replacement
	End
	ReplaceRadius			= CREATE_A_HERO_WORD_OF_POULTRY_RADIUS_L2
	ReplaceFX				= FX_CreateAHeroReplaceObject
	Scatter					= Yes
End
End
AddModule
	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_CreateAHeroShieldCrushEnabler_Level3
		SpecialPowerTemplate	= SpecialAbilityCreateAHeroShieldCrush_Level3
		TriggeredBy				= Upgrade_CreateAHeroShieldCrush_Level3
	End
	End
AddModule
		Behavior = SpecialPowerModule ModuleTag_CreateAHeroShieldCrushStarter_Level3			; SpecialAbility is	a SpecialPower,	SpecialPower is	anyting	special
		SpecialPowerTemplate			= SpecialAbilityCreateAHeroShieldCrush_Level3
		StartsPaused					= Yes
		AttributeModifier				= NewCreateAHeroShieldCrush_Level3
		AttributeModifierAffectsSelf	= Yes
		;TriggerRX						= FX_CreateAHeroShieldCharge_Level3
	End
	End
AddModule
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_AragornBladeMasterEnabler
		SpecialPowerTemplate = SpecialAbilityAragornBladeMaster
		TriggeredBy = Upgrade_AragornBladeMaster
	End
End
AddModule
  	Behavior = SpecialPowerModule ModuleTag_AragornBladeMasterStarter                ; SpecialAbility is a SpecialPower, SpecialPower is anyting special
		SpecialPowerTemplate    = SpecialAbilityAragornBladeMaster
		StartsPaused			= Yes
	End
End
AddModule
	Behavior = HeroModeSpecialAbilityUpdate ModuleTag_AragornBladeMasterUpdate   ; So the difference in SpecialAbility is that it takes timing from this Update, instead of simply firing.
		SpecialPowerTemplate    = SpecialAbilityAragornBladeMaster
		HeroAttributeModifier	= NewAragornBladeMaster
		HeroEffectDuration		= 30000 ; this should sync with the auto ability delay re-fire time in commandButtons.ini
		UnpackTime              = 1 ; insant unpack
		TriggerSound			= AragornBladeMaster
	End
End
ReplaceModule ModuleTag_TheodenHealing
Behavior = AutoHealBehavior ModuleTag_TheodenHealing1
		StartsActive = Yes
		HealingAmount = 50
		HealingDelay = 1000
		StartHealingDelay = 10000
		HealOnlyIfNotInCombat = Yes
	End
	End
End
ExperienceLevel	TheodenLevel2
	TargetNames			 = RohanTheoden	RohanTheodenCavalry
	RequiredExperience	 = THEODEN_LVL2_EXP_NEEDED   
	ExperienceAward		 = THEODEN_LVL2_EXP_AWARD 
	Rank				 = 2
	Upgrades			 = Upgrade_CreateAHeroShieldCrush_Level3
	SelectionDecal
		Texture			 = decal_hero_good
		Style			 = SHADOW_ALPHA_DECAL
		OpacityMin		 = 50% 
		OpacityMax		 = 100%
		MinRadius		 = 40 ;16
		MaxRadius		 = 200 ;16
		MaxSelectedUnits = 40 ;1
	End	
End	
ExperienceLevel	TheodenLevel3
	TargetNames						=	RohanTheoden RohanTheodenCavalry
	RequiredExperience					=	THEODEN_LVL3_EXP_NEEDED
	ExperienceAward						=	THEODEN_LVL3_EXP_AWARD
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Upgrades						=	Upgrade_CreateAHeroInvulnerability_Level3
	Rank							=	3
	AttributeModifiers					=	HeroLevelUpDamage2
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40 ;16
		MaxRadius					=	200 ;16
		MaxSelectedUnits				=	40 ;1
	End	
End
ExperienceLevel	TheodenLevel3
	TargetNames						=	RohanTheoden RohanTheodenCavalry
	RequiredExperience					=	THEODEN_LVL3_EXP_NEEDED
	ExperienceAward						=	THEODEN_LVL3_EXP_AWARD
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Upgrades						=	Upgrade_EowynDisguiseTrigger
	Rank							=	3
	AttributeModifiers					=	HeroLevelUpDamage2
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40 ;16
		MaxRadius					=	200 ;16
		MaxSelectedUnits				=	40 ;1
	End	
End		
ExperienceLevel	TheodenLevel4
	TargetNames						=	RohanTheoden RohanTheodenCavalry
	RequiredExperience					=	THEODEN_LVL4_EXP_NEEDED
	ExperienceAward						=	THEODEN_LVL4_EXP_AWARD
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Rank							=	4
	Upgrades						=	Upgrade_EomerSpear
	AttributeModifiers					=	HeroLevelUpDamage3
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40 ;16
		MaxRadius					=	200 ;16
		MaxSelectedUnits				=	40 ;1
	End
End	
ExperienceLevel	TheodenLevel5
	TargetNames						=	RohanTheoden RohanTheodenCavalry
	RequiredExperience					=	THEODEN_LVL5_EXP_NEEDED
	ExperienceAward						=	THEODEN_LVL5_EXP_AWARD
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Upgrades						=	Upgrade_CreateAHeroWordOfPoultry_Level2

	Rank							=	5
	AttributeModifiers					=	HeroLevelUpDamage4
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40 ;16
		MaxRadius					=	200 ;16
		MaxSelectedUnits				=	40 ;1
	End	
End	;Upgrade_AragornBladeMaster
ExperienceLevel	TheodenLevel6
	TargetNames						=	RohanTheoden RohanTheodenCavalry
	RequiredExperience					=	THEODEN_LVL6_EXP_NEEDED
	ExperienceAward						=	THEODEN_LVL6_EXP_AWARD
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Rank							=	6
	Upgrades						=	Upgrade_AragornBladeMaster
	AttributeModifiers					=	HeroLevelUpDamage5
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40 ;16
		MaxRadius					=	200 ;16
		MaxSelectedUnits				=	40 ;1
	End
End	
ExperienceLevel	TheodenLevel8
	TargetNames						=	RohanTheoden RohanTheodenCavalry
	RequiredExperience					=	THEODEN_LVL8_EXP_NEEDED
	ExperienceAward						=	THEODEN_LVL8_EXP_AWARD
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Upgrades						=	Upgrade_ObjectLevel10
	Rank							=	8
	AttributeModifiers					=	HeroLevelUpDamage7
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40 ;16
		MaxRadius					=	200 ;16
		MaxSelectedUnits				=	40 ;1
	End
End	

ExperienceLevel	TheodenLevel10
	TargetNames						=	RohanTheoden RohanTheodenCavalry
	RequiredExperience					=	THEODEN_LVL10_EXP_NEEDED
	ExperienceAward						=	THEODEN_LVL10_EXP_AWARD
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Upgrades						=	Upgrade_ElrondRestoration
	Rank							=	10
	AttributeModifiers					=	HeroLevelUpDamage8
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40 ;16
		MaxRadius					=	200 ;16
		MaxSelectedUnits				=	40 ;1
	End
End	
;-------------------------------------------------
;timers
;-------------------------------------------------
SpecialPower SpecialAbilityRohanEomerSpear
	Enum						   = SPECIAL_AT_VISIBLE_OBJECT
	ReloadTime					   = 80000
	InitiateSound				   = 	TheodenVoiceAttack	   ;GenericSpell
End
Object IsengardSiegeLadder
ShockwaveResistance = 100 
End
;;;;;;;;;;;;;;;;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;New lorien warriors increased health armor new abilities weapons
;;;;;;;;;;;;;;;;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
CommandSet NewLorienWarriorCommandSet
	1	= Command_ToggleStance
	2	= Command_ToggleElvenWarriorWeapon
	3	= Command_LegolasHawkStrike
	12 	= Command_CaptureBuilding
	13	= Command_AttackMove
	14	= Command_Stop
End

Armor NewLorienArmor
  Armor = DEFAULT          45%   ;this sets the level for all nonspecified damage types
  Armor = SLASH            50%   ;
  Armor = PIERCE           30%   ;
  Armor = SPECIALIST       1%   ;
  Armor = CRUSH            1%   ; RotWK originally was 15% 
  Armor = CAVALRY	   1% 	 ; 35% originally
  Armor = SIEGE            200%   ;
  Armor = FLAME            35%   ; RotWK originally was 35% 
  Armor = FROST            45%   ; RotWK originally was 45% 
  Armor = MAGIC           100%   ;
  Armor = HERO            1%   ;
  Armor = HERO_RANGED     100%   ;
  Armor = POISON	  100% 
  Armor = STRUCTURAL	   50%	
End

Object RohanElvenWarrior

WeaponSet
		Conditions 	= None								; PLAYER_UPGRADE
		Weapon 		= PRIMARY RohanElvenBow 
		AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI				; Not AI.
	End
	WeaponSet
		Conditions 	= WEAPONSET_TOGGLE_1; CONTESTING_BUILDING
		Weapon 		= PRIMARY ElvenLindonWarriorSword
		AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI
	End
ArmorSet
		Conditions     	 	= None
		Armor           	= LorienWarriorArmor
		DamageFX        	= NormalDamageFX
	End
;;;----0000000000000000000000000000000000000000-----------
ReplaceModule ModuleTag_02
	Body = ActiveBody ModuleTag_Body1
		MaxHealth = 5500
	End
End
AddModule
Behavior = AutoHealBehavior ModuleTag_FaramirHealing
		StartsActive = Yes
		HealingAmount = HERO_HEAL_AMOUNT
		HealingDelay = 1000
		StartHealingDelay = HERO_HEAL_DELAY
		HealOnlyIfNotInCombat = Yes
	End
End
AddModule
Behavior = SpecialPowerModule ModuleTag_HawkStrikeStarter                      
		SpecialPowerTemplate		= SpecialAbilityHawkStrike
		UpdateModuleStartsAttack	= Yes
		InitiateSound				= LegolasVoiceModeHawkStrike			; this plays when he targets, not when he fires
	End
End
AddModule
	Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_HawkStrikeUpdate   
		SpecialPowerTemplate		= SpecialAbilityHawkStrike
		SkipContinue				= Yes
		UnpackTime					= 1500									; In this context: Preattack Delay 
		PackTime					= 1000 									; In this context: Weapon followthrough delay
		BusyForDuration				= 1000									; don't accept any AI for this long... ai commands will be queued
		AwardXPForTriggering		= 0
		StartAbilityRange			= 400.0									; Note: This has to be smaller than the weapon range or it'll never succeed
		ApproachRequiresLOS			= Yes		
		SpecialWeapon				= LegolasHawkStrike
		WhichSpecialWeapon			= 1
	End
End
AddModule
	Behavior = AutoAbilityBehavior ModuleTag_HawkStrikeAutoAbility
		SpecialAbility				= SpecialAbilityHawkStrike
		MaxScanRange				= HALDIR_BOW_RANGE
		Query						= 1 ANY ENEMIES +HERO +MONSTER
		Query						= 1 ALL ENEMIES
	End
End
ReplaceModule ModuleTag_05
Behavior = SlowDeathBehavior ModuleTag_05_NEW
		DeathTypes = ALL -FADED
		SinkDelay = 30000000000000000000000000000
		SinkRate = 0.5     ; in Dist/Sec
		DestructionDelay = 15000000000000000000000000000
        Sound = INITIAL ElvenWarriorVoiceDie
        DeathFlags = DEATH_1
	End
End
End;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Object IsengardFighter
ReplaceModule ModuleTag_05
Behavior = SlowDeathBehavior ModuleTag_05_NEW
		DeathTypes = ALL -FADED
		SinkDelay = 30000
		SinkRate = 0.4     ; in Dist/Sec
		DestructionDelay = 31000
        Sound = INITIAL UrukVoiceDie
	End
End
End
Object IsengardBeserker
ReplaceModule ModuleTag_05
Behavior = SlowDeathBehavior ModuleTag_05_NEW
		DeathTypes = ALL -FADED
		SinkDelay = 180000
		SinkRate = 0.4     ; in Dist/Sec
		DestructionDelay = 180010
        Sound = INITIAL UrukVoiceDie
	End
End
End
Object RohanElvenWarriorHorde
CommandSet = NewLorienWarriorCommandSet

ArmorSet
		Conditions     	 	= None
		Armor           	= LorienWarriorArmor
		DamageFX        	= NormalDamageFX
	End

AddModule
Behavior = AutoHealBehavior ModuleTag_FaramirHealing
		StartsActive = Yes
		HealingAmount = HERO_HEAL_AMOUNT
		HealingDelay = 1000
		StartHealingDelay = HERO_HEAL_DELAY
		HealOnlyIfNotInCombat = Yes
	End
End
AddModule
Behavior = SpecialPowerModule ModuleTag_HawkStrikeStarter                      
		SpecialPowerTemplate		= SpecialAbilityHawkStrike
		UpdateModuleStartsAttack	= Yes
		InitiateSound				= LegolasVoiceModeHawkStrike			; this plays when he targets, not when he fires
	End
End
AddModule
	Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_HawkStrikeUpdate   
		SpecialPowerTemplate		= SpecialAbilityHawkStrike
		SkipContinue				= Yes
		UnpackTime					= 1500									; In this context: Preattack Delay 
		PackTime					= 1000 									; In this context: Weapon followthrough delay
		BusyForDuration				= 1000									; don't accept any AI for this long... ai commands will be queued
		AwardXPForTriggering		= 0
		StartAbilityRange			= 400.0									; Note: This has to be smaller than the weapon range or it'll never succeed
		ApproachRequiresLOS			= Yes		
		SpecialWeapon				= LegolasHawkStrike
		WhichSpecialWeapon			= 1
	End
End
AddModule
	Behavior = AutoAbilityBehavior ModuleTag_HawkStrikeAutoAbility
		SpecialAbility				= SpecialAbilityHawkStrike
		MaxScanRange				= HALDIR_BOW_RANGE
		Query						= 1 ANY ENEMIES +HERO +MONSTER
		Query						= 1 ALL ENEMIES
	End
End
End
;>>>>>>>><<<<><><<><><><><><>>>>>>>>>>>>>>>>>><<><><><><><><><><><><><><>
;ROHANROYALGUARD
;<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>>>>>>>>>>>>>>
Weapon RohirrimCrush  ; Used when the rohirrim crush an enemy.
  LeechRangeWeapon      = Yes
  AttackRange           = 9999999.0
  MeleeWeapon           = No
  DelayBetweenShots     = 0            			; time between shots, msec
  PreAttackDelay        = 0 				;PreAttackDelay+FiringDuration = UseWeaponTiming = Yes duration
  PreAttackType         = PER_SHOT 
  FiringDuration        = 0
  FireFX		= FX_SonicSong

  DamageNugget                  			; A basic Nugget that just does damage
    Damage        = GONDOR_KNIGHTSOFDOL_CRUSH_DAMAGE		; A whole lot of damage.
    Radius        = 0.0
    DelayTime     = 0
    DamageType    = CRUSH
    DeathType     = CRUSHED
    FlankingBonus = 200%
  End
End
CommandSet NewRohanRohirrimCommandSet
	1	= Command_ToggleStance 
	13	= Command_AttackMove
	14	= Command_Stop
	16  	= Command_SetStanceBattle
	17  	= Command_SetStanceAggressive
	18  	= Command_SetStanceHoldGround
End
Object RohanRohirrim_Summoned

ReplaceModule ModuleTag_01
Draw = W3DHordeModelDraw ModuleTag_DRAW_NEW
DefaultModelConditionState
			Model				= RURohrm_SKN
			ParticleSysBone = BAT_HHEAD GCglowHorseWhite FollowBone:Yes			
			ParticleSysBone = B_HHIPL GCglowHorseRearWhite FollowBone:Yes
			ParticleSysBone = BAT_SPINE2 GCglowWhite FollowBone:Yes
		End
AnimationState				=	PASSENGER WEAPONSET_TOGGLE_1
			Animation				=	grabbed
				AnimationName		=	RURhrmArch_SKL.RURhrmArch_GBDA
				AnimationMode		=	LOOP
			End
			Flags					=	RANDOMSTART
		End
		
		; --- stunned anims
		AnimationState				=	FREEFALL WEAPONSET_TOGGLE_1
			Animation				=	free fall
				AnimationName		=	RURhrmArch_SKL.RURhrmArch_FLYA
				AnimationMode		=	LOOP
			End
			Flags					=	RANDOMSTART
		End
		
		AnimationState				=	STUNNED_FLAILING WEAPONSET_TOGGLE_1
			Animation				=	JustDie
				AnimationName		=	RURhrmArch_SKL.RURhrmArch_FLYC
				AnimationMode		=	LOOP
			End
			Flags					=	RANDOMSTART
		End

		AnimationState				= DYING BURNINGDEATH
			Animation
				AnimationName		= RURohrm_SKL.RURohrm_DIEA
				AnimationMode		= ONCE
				AnimationBlendTime	= 10
			End
		End

		; This is the no-spawn-horse type of death
		AnimationState				=	DYING SPLATTED WEAPONSET_TOGGLE_1
			Animation				=	splatted
				AnimationName		=	RURhrmArch_SKL.RURhrmArch_LNDA
				AnimationMode		=	ONCE
				AnimationBlendTime  =   2
			End
			FXEvent	= Frame:2 Name:FX_SplatDust
		End

		AnimationState				=	DYING WEAPONSET_TOGGLE_1
			Animation				=	JustDie
				AnimationName		=	RURhrmArch_SKL.RURhrmArch_DIEA
				AnimationMode		=	ONCE
			End
		End
		
		AnimationState				=	STUNNED_STANDING_UP WEAPONSET_TOGGLE_1
			Animation				=	StandUp
				AnimationName		=	RURhrmArch_SKL.RURhrmArch_GTPA
				AnimationMode		=	ONCE
				AnimationSpeedFactorRange = 1.5 1.5
			End
		End
		
		AnimationState				=	STUNNED WEAPONSET_TOGGLE_1
			Animation				=	Land
				AnimationName		=	RURhrmArch_SKL.RURhrmArch_LNDA
				AnimationMode		=	ONCE
			End
		End
				
		; Shooting whilst moving - 4 versions, one for each side.
		;---------------------------------------------------------------------------------------------------------
		AnimationState				=	FIRING_OR_PREATTACK_B MOVING TURRET_ANGLE_90 WEAPONSET_TOGGLE_1
			Animation				=	MoveAndFireBow
				AnimationName		=	RURhrmArch_SKL.RURhrmArch_ATKF
				AnimationMode		=	ONCE
				AnimationBlendTime		=	15
			End
			Flags					= MAINTAIN_FRAME_ACROSS_STATES
			FrameForPristineBonePositions = 20
		End
		AnimationState				=	FIRING_OR_PREATTACK_B MOVING TURRET_ANGLE_180 WEAPONSET_TOGGLE_1
			Animation				=	MoveAndFireBow
				AnimationName		=	RURhrmArch_SKL.RURhrmArch_ATKH
				AnimationMode		=	ONCE
				AnimationBlendTime		=	15
			End
			Flags					= MAINTAIN_FRAME_ACROSS_STATES
			FrameForPristineBonePositions = 20
		End
		AnimationState				=	FIRING_OR_PREATTACK_B MOVING TURRET_ANGLE_270 WEAPONSET_TOGGLE_1
			Animation				=	MoveAndFireBow
				AnimationName		=	RURhrmArch_SKL.RURhrmArch_ATKJ
				AnimationMode		=	ONCE
				AnimationBlendTime		=	15
			End
			Flags					= MAINTAIN_FRAME_ACROSS_STATES
			FrameForPristineBonePositions = 20
		End
		AnimationState				=	FIRING_OR_PREATTACK_B MOVING WEAPONSET_TOGGLE_1
			Animation				=	MoveAndFireBow
				AnimationName		=	RURhrmArch_SKL.RURhrmArch_ATKD
				AnimationMode		=	ONCE
				AnimationBlendTime		=	15
			End
			Flags					= MAINTAIN_FRAME_ACROSS_STATES
			FrameForPristineBonePositions = 20
		End
		;---------------------------------------------------------------------------------------------------------
				
;;======= BACKING UP
		
		AnimationState					= MOVING BACKING_UP WEAPONSET_TOGGLE_1
			Animation					= BACKING UP
				AnimationName			= RURhrmArch_SKL.RURhrmArch_BAKA
				AnimationMode			= LOOP
			End
		End
		
		AnimationState					=	MOVING TURN_LEFT_HIGH_SPEED WEAPONSET_TOGGLE_1
			Animation					=	TurnLeft
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_TNL1
				AnimationMode			=	LOOP
				AnimationBlendTime		=	20
			End
		End
		
		AnimationState					=	MOVING TURN_RIGHT_HIGH_SPEED WEAPONSET_TOGGLE_1
			Animation					=	TurnRight
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_TNR1
				AnimationMode			=	LOOP
				AnimationBlendTime		=	20
			End
		End
		
		AnimationState					= MOVING WANDER WEAPONSET_TOGGLE_1
			Animation					= WLKA
				AnimationName			= RURhrmArch_SKL.RURhrmArch_WLKA
				AnimationMode			= LOOP
			End
		End

		AnimationState					=	MOVING TURN_LEFT WEAPONSET_TOGGLE_1
			Animation					=	TurnLeft
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_TRNL
				AnimationMode			=	LOOP
			End
		End

		AnimationState					=	MOVING TURN_RIGHT WEAPONSET_TOGGLE_1
			Animation					=	TurnRight
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_TRNR
				AnimationMode			=	LOOP
			End
		End

		AnimationState					= MOVING ENGAGED WEAPONSET_TOGGLE_1
			Animation					= Moving_Engaged
				AnimationName			= RURhrmArch_SKL.RURhrmArch_RUNC
				AnimationMode			= LOOP
			End
			Flags						= RANDOMSTART
		End
		
;		AnimationState					= MOVING WALKING WEAPONSET_TOGGLE_1
;			Animation					= Walk1
;				AnimationName			= RURhrmArch_SKL.RURhrmArch_WLKB
;				AnimationMode			= LOOP
;				Distance				= 25
;			End
;		End
	
		AnimationState					=	MOVING ACCELERATE WEAPONSET_TOGGLE_1
			Animation					=	RunA
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_ACCL
				AnimationMode			=	LOOP
			End
			Flags						=	RANDOMSTART
		End
		
		AnimationState					=	DECELERATE WEAPONSET_TOGGLE_1
			Animation					=	RunA
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_DECL
				AnimationMode			=	LOOP
				AnimationSpeedFactorRange = 0.55 0.55
			End
			Flags						=	RANDOMSTART
		End

		AnimationState					=	MOVING WEAPONSET_TOGGLE_1
			Animation					=	RunA
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_RUNA
				AnimationMode			=	LOOP
				Distance				=   40
			End
			Flags						=	RANDOMSTART
		End

		; Shooting with Fire Upgrade - 4 versions, one for each side.
		;---------------------------------------------------------------------------------------------------------
		AnimationState					=	FIRING_OR_PREATTACK_B WEAPONSET_PLAYER_UPGRADE USER_2 TURRET_ANGLE_90 WEAPONSET_TOGGLE_1
			Animation					=	AttackA1
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_ATKL
				AnimationMode			=	ONCE
				AnimationBlendTime		=	15
			End
			Flags						= MAINTAIN_FRAME_ACROSS_STATES
			FrameForPristineBonePositions = 20
		End
		AnimationState					=	FIRING_OR_PREATTACK_B WEAPONSET_PLAYER_UPGRADE USER_2 TURRET_ANGLE_180 WEAPONSET_TOGGLE_1
			Animation					=	AttackA1
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_ATKN
				AnimationMode			=	ONCE
				AnimationBlendTime		=	15
			End
			Flags						= MAINTAIN_FRAME_ACROSS_STATES
			FrameForPristineBonePositions = 20
		End
		AnimationState					=	FIRING_OR_PREATTACK_B WEAPONSET_PLAYER_UPGRADE USER_2 TURRET_ANGLE_270 WEAPONSET_TOGGLE_1
			Animation					=	AttackA1
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_ATKP
				AnimationMode			=	ONCE
				AnimationBlendTime		=	15
			End
			Flags						= MAINTAIN_FRAME_ACROSS_STATES
			FrameForPristineBonePositions = 20
		End
		AnimationState					=	FIRING_OR_PREATTACK_B WEAPONSET_PLAYER_UPGRADE USER_2 WEAPONSET_TOGGLE_1
			Animation					=	AttackA1
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_ATKB
				AnimationMode			=	ONCE
				AnimationBlendTime		=	15
			End
			Flags						= MAINTAIN_FRAME_ACROSS_STATES
			FrameForPristineBonePositions = 20
		End
		;---------------------------------------------------------------------------------------------------------

		; Shooting - 4 versions, one for each side.
		;---------------------------------------------------------------------------------------------------------
		AnimationState					=	FIRING_OR_PREATTACK_B TURRET_ANGLE_90 WEAPONSET_TOGGLE_1
			Animation					=	AttackA1
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_ATKL
				AnimationMode			=	ONCE
				AnimationBlendTime		=	15
			End
			Flags						= MAINTAIN_FRAME_ACROSS_STATES
			FrameForPristineBonePositions = 20
		End
		AnimationState					=	FIRING_OR_PREATTACK_B TURRET_ANGLE_180 WEAPONSET_TOGGLE_1
			Animation					=	AttackA1
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_ATKN
				AnimationMode			=	ONCE
				AnimationBlendTime		=	15
			End
			Flags						= MAINTAIN_FRAME_ACROSS_STATES
			FrameForPristineBonePositions = 20
		End
		AnimationState					=	FIRING_OR_PREATTACK_B TURRET_ANGLE_270 WEAPONSET_TOGGLE_1
			Animation					=	AttackA1
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_ATKP
				AnimationMode			=	ONCE
				AnimationBlendTime		=	15
			End
			Flags						= MAINTAIN_FRAME_ACROSS_STATES
			FrameForPristineBonePositions = 20
		End
		AnimationState					=	FIRING_OR_PREATTACK_B WEAPONSET_TOGGLE_1
			Animation					=	AttackA1
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_ATKB
				AnimationMode			=	ONCE
				AnimationBlendTime		=	15
			End
			Flags						= MAINTAIN_FRAME_ACROSS_STATES
			FrameForPristineBonePositions = 20
		End
		;---------------------------------------------------------------------------------------------------------

		AnimationState					=	BETWEEN_FIRING_SHOTS_B WEAPONSET_TOGGLE_1
			Animation					=	BetweenFiringShots
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_IDLA
				AnimationMode			=	LOOP
				AnimationBlendTime		=   15
			End
		End

;;--------------------- EMOTIONS ----------------------------------------------------------------------------------
;;===== TERROR		
		AnimationState					= MOVING EMOTION_TERROR EMOTION_LOOK_TO_SKY WEAPONSET_TOGGLE_1
			Animation					= TerrorFromTheSky
				AnimationName			= RURhrmArch_SKL.RURhrmArch_RUNB
				AnimationMode			= LOOP
			End
		End
		
		AnimationState					= MOVING EMOTION_TERROR WEAPONSET_TOGGLE_1 
			Animation					= TerrorFromTheSky
				AnimationName			= RURhrmArch_SKL.RURhrmArch_RUNB
				AnimationMode			= LOOP
			End
		End
		
;;======= APPREHENSIVE

		AnimationState					=	EMOTION_ALERT EMOTION_AFRAID WEAPONSET_TOGGLE_1
			Animation					=	Apprehensive
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_APPA
				AnimationMode			=	LOOP	;Change this to ONCE if adding additional anims
			End
		End

;;======= AFRAID

		AnimationState					= EMOTION_AFRAID WEAPONSET_TOGGLE_1
			Animation					= FERA
				AnimationName			= RURhrmArch_SKL.RURhrmArch_FERA
				AnimationMode			= LOOP
			End 
		;	Animation					= FERB
		;		AnimationName			= RURhrmArch_SKL.RURhrmArch_FERB
		;		AnimationMode			= LOOP
		;	End
		End

;;======= CELEBRATING
		
		; This is what happens when Theo gives his rousing speech
		AnimationState					=	EMOTION_CELEBRATING WEAPONSET_TOGGLE_1
			Animation					=	CheerA
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_CHRA
				AnimationMode			=	ONCE
			End
			Animation					=	CheerB
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_CHRB
				AnimationMode			=	ONCE
			End
			Animation					=	CheerD
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_CHRD
				AnimationMode			=	ONCE
			End
			Animation					=	Salute
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_SLTA
				AnimationMode			=	ONCE
			End
			Flags						= RANDOMSTART RESTART_ANIM_WHEN_COMPLETE
		End

;;======= TAUNTING
			
		AnimationState					= EMOTION_TAUNTING WEAPONSET_TOGGLE_1
			Animation					= Taunting
				AnimationName			= RURhrmArch_SKL.RURhrmArch_TNTA
				AnimationMode			= ONCE
			End
			Animation					= Taunting2
				AnimationName			= RURhrmArch_SKL.RURhrmArch_TNTB
				AnimationMode			= ONCE
			End
			Flags						= RANDOMSTART RESTART_ANIM_WHEN_COMPLETE
		End

;;======= POINTING
			
		AnimationState					= EMOTION_POINTING WEAPONSET_TOGGLE_1
			Animation					= Pointing1
				AnimationName			= RURhrmArch_SKL.RURhrmArch_PNTA
				AnimationMode			= LOOP
			End
		End
		
;;======== ALERT

		AnimationState					= EMOTION_ALERT WEAPONSET_TOGGLE_1
			Animation					= IDLA
				AnimationName			= RURhrmArch_SKL.RURhrmArch_IDLA
				AnimationMode			= LOOP
			End
		End

		AnimationState					=	ATTACKING WEAPONSET_TOGGLE_1
			Animation					=	Reloading
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_IDLA
				AnimationMode			=	LOOP
			End
		End				
		

		; Swapping to bow -----		
		AnimationState					= SWAPPING_TO_WEAPONSET_1		; note - needs to go above any WEAPONSET_TOGGLE_1.
			StateName					= State_PuttingSpearAway
			Animation
				AnimationName			= RURohrm_SKL.RURohrm_WPNB		; putting spear away.
				AnimationMode			= ONCE_BACKWARDS
				AnimationSpeedFactorRange = 0.5 0.7						; Needs to match one second.
			End
			Flags						= START_FRAME_LAST
		End
				
		AnimationState					=	RAISING_FLAG WEAPONSET_TOGGLE_1
			Animation					=	CheerA
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_CHRA
				AnimationMode			=	ONCE
				AnimationSpeedFactorRange = 0.9 1.1
			End
			Animation					=	CheerB
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_CHRB
				AnimationMode			=	ONCE
				AnimationSpeedFactorRange = 0.9 1.1
			End
			Animation					=	CheerD
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_CHRD
				AnimationMode			=	ONCE
				AnimationSpeedFactorRange = 0.9 1.1
			End
			Animation					=	Salute
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_SLTA
				AnimationMode			=	ONCE
				AnimationSpeedFactorRange = 0.9 1.1
			End
			Flags						= RESTART_ANIM_WHEN_COMPLETE
		End

;;-------------------- SELECTED ---------------------------------------------------------------

		AnimationState					= SELECTED WEAPONSET_TOGGLE_1
			StateName					= State_Selected
			SimilarRestart				= Yes
			Animation					= AtAttention
				AnimationName			= RURhrmArch_SKL.RURhrmArch_ATNB
				AnimationMode			= LOOP
			End
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "Idle" then
					CurDrawableSetTransitionAnimState("TRANS_Idle_to_SelectedWEAPONSET1")
				elseif Prev == "State_PuttingSpearAway" then
					CurDrawableSetTransitionAnimState("TRANS_SpearAway_To_SelectedWEAPONSET1")
				end
			EndScript	
		End
		
		; Swapping to spear -----		
		AnimationState					= SWAPPING_TO_WEAPONSET_2
			StateName					= State_PuttingBowAway
			Animation
				AnimationName			= RURhrmArch_SKL.RURhrmArch_WPNA		; putting bow away.
				AnimationMode			= ONCE
				AnimationSpeedFactorRange = 0.5 0.6								; Needs to match one second, approx.
			End
		End

		; Idle
		AnimationState					=	WEAPONSET_TOGGLE_1
			StateName					=	Idle
			Animation					=	IDLB
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_IDLB
				AnimationMode			=	LOOP
			End
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "State_Selected" then
					CurDrawableSetTransitionAnimState("TRANS_Selected_to_IdleWEAPONSET1")
				elseif Prev == "State_PuttingSpearAway" then
					CurDrawableSetTransitionAnimState("TRANS_SpearAway_To_IdleWEAPONSET1")
				end
			EndScript
		End
		
		TransitionState					=	TRANS_Idle_to_SelectedWEAPONSET1
			Animation					=	ATNA
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_ATNA
				AnimationMode			=	ONCE
				AnimationSpeedFactorRange = 0.8 1.2
			End
		End
		
		TransitionState					=	TRANS_SpearAway_To_SelectedWEAPONSET1	; get bow out
			Animation					=	ATNA
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_WPNA
				AnimationMode			=	ONCE_BACKWARDS
			End
			Flags						= START_FRAME_LAST
		End
		
		TransitionState					=	TRANS_Selected_to_IdleWEAPONSET1
			Animation					=	ATNC
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_ATNA
				AnimationMode			=	ONCE_BACKWARDS
				AnimationSpeedFactorRange = 0.8 1.2
			End
			Flags						= START_FRAME_LAST
		End
		
		TransitionState					=	TRANS_SpearAway_To_IdleWEAPONSET1		; get bow out
			Animation
				AnimationName			=	RURhrmArch_SKL.RURhrmArch_WPNA
				AnimationMode			=	ONCE_BACKWARDS
			End
			Flags						= START_FRAME_LAST
		End

		
		;---------------------------------------------
		;-----------------Spear Anims-----------------
		;---------------------------------------------
		IdleAnimationState
			StateName				=	Idle
			Animation				=	IdleB
				AnimationName		=	RURohrm_SKL.RURohrm_IDLB
				AnimationMode		=	ONCE
				AnimationBlendTime	=	15
			End
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "State_Selected" then
					CurDrawableSetTransitionAnimState("TRANS_Selected_To_Idle")
				elseif Prev == "State_PuttingBowAway" then
					CurDrawableSetTransitionAnimState("TRANS_BowAway_To_Idle")
				end
			EndScript
		End
						
		AnimationState				=	PASSENGER
			Animation				=	grabbed
				AnimationName		=	RURohrm_SKL.RURohrm_GBDA
				AnimationMode		=	LOOP
			End
		End
		
		; --- stunned anims
		AnimationState				=	FREEFALL 
			Animation				=	free fall
				AnimationName		=	RURohrm_SKL.RURohrm_FLYB
				AnimationMode		=	LOOP
				AnimationBlendTime	=	10
			End
		End
		
		AnimationState				=	STUNNED_FLAILING 
			Animation				=	JustDie
				AnimationName		=	RURohrm_SKL.RURohrm_FLYC
				AnimationMode		=	LOOP
			End
			Flags					=	RANDOMSTART
		End

		; This is the no-spawn-horse type of death
		AnimationState				=	DYING DEATH_1 SPLATTED
			Animation				=	splatted
				AnimationName		=	RURohrm_SKL.RURohrm_LNDA
				AnimationMode		=	ONCE
				AnimationBlendTime  =   2
			End
			FXEvent	= Frame:2 Name:FX_SplatDust
		End
		
		

		AnimationState				=	DYING DEATH_1 
			Animation				=	JustDie
				AnimationName		=	RURohrm_SKL.RURohrm_DIEA
				AnimationMode		=	ONCE
			End
		End
		
		AnimationState				=	DYING DEATH_2 
			Animation				=	FadeOut
				AnimationName		=	RURohrm_SKL.RURohrm_IDLB
				AnimationMode		=	ONCE
			End
		End
		
		AnimationState				=	STUNNED_STANDING_UP
			Animation				=	StandUp
				AnimationName		=	RURohrm_SKL.RURohrm_GTPA
				AnimationMode		=	ONCE
				AnimationSpeedFactorRange = 1.5 1.5
			End
		End
		
		AnimationState				=	STUNNED
			Animation				=	Land
				AnimationName		=	RURohrm_SKL.RURohrm_LNDA
				AnimationMode		=	ONCE
			End
		End
		
		
				
		AnimationState						= BURNINGDEATH
			Animation
				AnimationName				= RURohrm_SKL.RURohrm_MFDA
				AnimationMode				= LOOP
				Distance					= 100
			End
		End

		AnimationState						= PARALYZED
			Animation
				AnimationName				= RURohrm_SKL.RURohrm_IDLB
				AnimationMode				= LOOP
			End
		End


		AnimationState        = MOVING FIRING_OR_PREATTACK_A
			ShareAnimation		= Yes
			Animation           = TrotAndFire
				AnimationName       = RURohrm_SKL.RURohrm_ATRB
				AnimationMode       = LOOP
				Distance			= 70; 35
			End
			Flags               = RANDOMSTART
		End

;;======= BACKING UP
		
		AnimationState					= MOVING BACKING_UP
			Animation					= BACKING UP
				AnimationName			= RURohrm_SKL.RURohrm_BAKA
				AnimationMode			= LOOP
			End
		End
		
		AnimationState					=	TURN_LEFT_HIGH_SPEED
			Animation					=	TurnLeft
				AnimationName			=	RURohrm_SKL.RURohrm_TNL1
				AnimationMode			=	LOOP
				AnimationBlendTime		=	20
			End
		End
		
		AnimationState					=	TURN_RIGHT_HIGH_SPEED
			Animation					=	TurnRight
				AnimationName			=	RURohrm_SKL.RURohrm_TNR1
				AnimationMode			=	LOOP
				AnimationBlendTime		=	20
			End
		End
		
		AnimationState					= MOVING WANDER
			Animation					= WLKA
				AnimationName			= RURohrm_SKL.RURohrm_WLKA
				AnimationMode			= LOOP
			End
		End

		AnimationState					=	MOVING TURN_LEFT 
			Animation					=	TurnLeft
				AnimationName			=	RURohrm_SKL.RURohrm_TRNL
				AnimationMode			=	LOOP
			End
		End

		AnimationState					=	MOVING TURN_RIGHT 
			Animation					=	TurnRight
				AnimationName			=	RURohrm_SKL.RURohrm_TRNR
				AnimationMode			=	LOOP
			End
		End

		AnimationState					= MOVING ENGAGED
			Animation					= Moving_Engaged
				AnimationName			= RURohrm_SKL.RURohrm_RUNC
				AnimationMode			= LOOP
			End
			Flags						= RANDOMSTART
		End
		
;		AnimationState					= MOVING WALKING
;			Animation					= Walk1
;				AnimationName			= RURohrm_SKL.RURohrm_WLKB
;				AnimationMode			= LOOP
;				Distance				= 25
;			End
;		End

		AnimationState					= MOVING ACCELERATE
			Animation					= Accelerate
				AnimationName			= RURohrm_SKL.RURohrm_ACCL
				AnimationMode			= ONCE ; was LOOP
			End
		End

		AnimationState					= DECELERATE
			Animation					= Decelerate
				AnimationName			= RURohrm_SKL.RURohrm_DECL
				AnimationMode			= ONCE
				AnimationSpeedFactorRange = 0.55 0.55
			End
		End
			
		AnimationState					=	MOVING
			Animation					=	RunA
				AnimationName			=	RURohrm_SKL.RURohrm_RUNA
				AnimationMode			=	LOOP
				Distance				=   40
			End
			Flags						=	RANDOMSTART
		End


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

		; Standard attack with spear.
		AnimationState					=	FIRING_OR_PREATTACK_A
			Animation					=	AttackA1
				AnimationName			=	RURohrm_SKL.RURohrm_ATKA
				AnimationMode			=	ONCE
			End
		End
		;---------------------------------------------------------------------------------------------------------
		

;;--------------------- EMOTIONS ----------------------------------------------------------------------------------
;;===== TERROR		
		AnimationState					= MOVING EMOTION_TERROR EMOTION_LOOK_TO_SKY
			Animation					= TerrorFromTheSky
				AnimationName			= RURohrm_SKL.RURohrm_RUNB
				AnimationMode			= LOOP
			End
		End
		
		AnimationState					= MOVING EMOTION_TERROR
			Animation					= TerrorFromTheSky
				AnimationName			= RURohrm_SKL.RURohrm_RUNB
				AnimationMode			= LOOP
			End
		End
		
;;======= APPREHENSIVE

		AnimationState					=	EMOTION_ALERT EMOTION_AFRAID
			Animation					=	Apprehensive
				AnimationName			=	RURohrm_SKL.RURohrm_APPA
				AnimationMode			=	LOOP	;Change this to ONCE if adding additional anims
			End
		End

;;======= AFRAID

		AnimationState					= EMOTION_AFRAID
			Animation					= FERA
				AnimationName			= RURohrm_SKL.RURohrm_FERA
				AnimationMode			= LOOP
			End
			;Animation					= FERB
			;	AnimationName			= RURohrm_SKL.RURohrm_FERB
			;	AnimationMode			= LOOP
			;End
		End

;;======= CELEBRATING
		
		AnimationState					=	EMOTION_CELEBRATING
			Animation					=	CheerA
				AnimationName			=	RURohrm_SKL.RURohrm_CHRA
				AnimationMode			=	ONCE
			End
			Animation					=	CheerB
				AnimationName			=	RURohrm_SKL.RURohrm_CHRB
				AnimationMode			=	ONCE
			End
			Animation					=	CheerC
				AnimationName			=	RURohrm_SKL.RURohrm_CHRC
				AnimationMode			=	ONCE
			End
			Animation					=	CheerD
				AnimationName			=	RURohrm_SKL.RURohrm_CHRD
				AnimationMode			=	ONCE
			End
			Animation					=	Salute
				AnimationName			=	RURohrm_SKL.RURohrm_SLTA
				AnimationMode			=	ONCE
			End
			Flags						= RANDOMSTART RESTART_ANIM_WHEN_COMPLETE
		End

;;======= TAUNTING
			
		AnimationState					= EMOTION_TAUNTING
			Animation					= Taunting
				AnimationName			= RURohrm_SKL.RURohrm_TNTA
				AnimationMode			= ONCE
			End
			Animation					= Taunting2
				AnimationName			= RURohrm_SKL.RURohrm_TNTB
				AnimationMode			= ONCE
			End
			Flags						= RANDOMSTART RESTART_ANIM_WHEN_COMPLETE
		End

;;======= POINTING
			
		AnimationState					= EMOTION_POINTING
			Animation					= Pointing1
				AnimationName			= RURohrm_SKL.RURohrm_PNTA
				AnimationMode			= LOOP
			End
		End
		
;;======== ALERT

		AnimationState					= EMOTION_ALERT
			Animation					= IDLA
				AnimationName			= RURohrm_SKL.RURohrm_IDLA
				AnimationMode			= LOOP
			End
		End
		
		AnimationState					=	RAISING_FLAG
			Animation					=	CheerA
				AnimationName			=	RURohrm_SKL.RURohrm_CHRA
				AnimationMode			=	ONCE
				AnimationSpeedFactorRange = 0.9 1.1
			End
			Animation					=	CheerB
				AnimationName			=	RURohrm_SKL.RURohrm_CHRB
				AnimationMode			=	ONCE
				AnimationSpeedFactorRange = 0.9 1.1
			End
			Animation					=	CheerC
				AnimationName			=	RURohrm_SKL.RURohrm_CHRC
				AnimationMode			=	ONCE
				AnimationSpeedFactorRange = 0.9 1.1
			End
			Animation					=	CheerD
				AnimationName			=	RURohrm_SKL.RURohrm_CHRD
				AnimationMode			=	ONCE
				AnimationSpeedFactorRange = 0.9 1.1
			End
			Animation					=	Salute
				AnimationName			=	RURohrm_SKL.RURohrm_SLTA
				AnimationMode			=	ONCE
			End
			Flags						= RESTART_ANIM_WHEN_COMPLETE
		End


;;-------------------- SELECTED ---------------------------------------------------------------
				
		AnimationState					= SELECTED
			StateName					= State_Selected
;			SimilarRestart				= Yes
			Animation					= AtAttention
				AnimationName			= RURohrm_SKL.RURohrm_IDLA
				AnimationMode			= LOOP
			End
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "Idle" then
					CurDrawableSetTransitionAnimState("TRANS_Idle_To_Selected")
				elseif Prev == "State_PuttingBowAway" then
					CurDrawableSetTransitionAnimState("TRANS_BowAway_To_Selected")
				end
			EndScript
		End
		
		
		TransitionState					=	TRANS_Idle_to_Selected
			Animation					=	ATNA
				AnimationName			=	RURohrm_SKL.RURohrm_ATNA
				AnimationMode			=	ONCE
				AnimationSpeedFactorRange = 1.0 1.0
			End
		End

		TransitionState					=	TRANS_BowAway_To_Selected
			Animation
				AnimationName			=	RURohrm_SKL.RURohrm_WPNB
				AnimationMode			=	ONCE
			End
		End
		
		TransitionState					=	TRANS_Selected_to_Idle
			Animation					=	ATNC
				AnimationName			=	RURohrm_SKL.RURohrm_ATNA
				AnimationMode			=	ONCE_BACKWARDS
				AnimationSpeedFactorRange = 0.6 1.0
			End
			Flags						= START_FRAME_LAST
		End
		
		TransitionState					=	TRANS_BowAway_To_Idle
			Animation
				AnimationName			=	RURohrm_SKL.RURohrm_WPNB
				AnimationMode			=	ONCE
			End
		End
		
	End
End
	ArmorSet
		Conditions      = None
		Armor           = NewRohirrimArmor
		DamageFX        = NormalDamageFX
	End
	DisplayName	= RohanRoyalGuard
	CrushableLevel	= 3  			;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
	CrusherLevel	= 1
	CrushWeapon	= RohirrimCrush

MinCrushVelocityPercent = 20 		; Has to be moving at at least 35% of full speed.
	CrushDecelerationPercent = 0 		; Lose 20 percent of max velocity when crushing.
	
	CrushKnockback 	= 30;
	CrushZFactor 	= 1.0;
	
	CommandSet 	= NewRohanRohirrimCommandSet
	CommandPoints 	= 0
LocomotorSet
		Locomotor = NormalHorseHordeMemberLocomotor
		Condition = SET_NORMAL 
		Speed     = NORMAL_MOUNTED_MED_MEMBER_SPEED
	End

	LocomotorSet
		Locomotor = NormalHorseHordeMemberLocomotor
		Condition = SET_COMBO
		Speed     = NORMAL_FOOT_FAST_MEMBER_SPEED
	End

	LocomotorSet
		Locomotor = BurningDeathLocomotorCavalry
		Condition = SET_BURNINGDEATH
		Speed	  = BURNINGDEATH_WANDERSPEED_CAVALRY
	End
End
;;;;ARAGORN,.,.,,.., .,., ., .,., ., ., .,.,.,.,.,   .,.,.,.,.,.,.,., ..,.,., ., .,,. , .,, ., . ,. ,.  ,. ,. , 
;;;;;;;;;;;;..,.,,.., ., .,., .,., ., .,.,., .,,.,., ,,.., ., ,, , . .,., .,.,  .,,. ., ,. ., ., ., .,.,  ., .,
;;;;;;;;;;;;;;;;,..,.,.,,..,.,., ., ,.,..,., ,. ,., . ,, , ., ., ., .,, ., .., ., ., ., ,.,. ,.., ., ., ,. ,.., 


FXList FX_GandalfLightningCharge1
  ParticleSystem
    Name = LightningStrike3 FollowBone:Yes
    OrientToObject = Yes
    CreateBoneOverride = B_SWORDBONE
    TargetBoneOverride = B_SWORDBONE
    UseTargetOffset = Yes
    TargetOffset = X:0.0 Y:0.0 Z:300
  End
  ParticleSystem
    Name = LightningStrike2 FollowBone:Yes
    OrientToObject = Yes
    CreateBoneOverride = B_SWORDBONE
    TargetBoneOverride = B_SWORDBONE
    UseTargetOffset = Yes
    TargetOffset = X:50.0 Y:50.0 Z:300
    InitialDelay = 300 300 UNIFORM   ;In milliseconds
  End
  ParticleSystem
    Name = LightningStrike FollowBone:Yes
    OrientToObject = Yes
    CreateBoneOverride = B_SWORDBONE
    TargetBoneOverride = B_SWORDBONE
    UseTargetOffset = Yes
    TargetOffset = X:-30.0 Y:-30.0 Z:20
    InitialDelay = 600 600 UNIFORM   ;In milliseconds
  End
  ParticleSystem
    Name = LightningStrike3 FollowBone:Yes
    OrientToObject = Yes
    CreateBoneOverride = B_SWORDBONE
    TargetBoneOverride = B_SWORDBONE
    UseTargetOffset = Yes
    TargetOffset = X:30.0 Y:-10.0 Z:20
    InitialDelay = 800 800 UNIFORM   ;In milliseconds
  End
  ParticleSystem
    Name = LightningStrike2 FollowBone:Yes
    OrientToObject = Yes
    CreateBoneOverride = B_SWORDBONE
    TargetBoneOverride = B_SWORDBONE
    UseTargetOffset = Yes
    TargetOffset = X:-30.0 Y:-10.0 Z:20
    InitialDelay = 2400 2400 UNIFORM   ;In milliseconds
  End
  ParticleSystem
    Name = LightningStrike FollowBone:Yes
    OrientToObject = Yes
    CreateBoneOverride = B_SWORDBONE
    TargetBoneOverride = B_SWORDBONE
    UseTargetOffset = Yes
    TargetOffset = X:30.0 Y:30.0 Z:20
    InitialDelay = 3000 3000 UNIFORM   ;In milliseconds
  End
  ParticleSystem
    Name = LightningStrike3 FollowBone:Yes
    OrientToObject = Yes
    CreateBoneOverride = B_SWORDBONE
    TargetBoneOverride = B_SWORDBONE
    UseTargetOffset = Yes
    TargetOffset = X:30 Y:-5.0 Z:20
    InitialDelay = 3800 3800 UNIFORM   ;In milliseconds
  End
  ParticleSystem
    Name = LightningStrike2 FollowBone:Yes
    OrientToObject = Yes
    CreateBoneOverride = B_SWORDBONE
    TargetBoneOverride = B_SWORDBONE
    UseTargetOffset = Yes
    TargetOffset = X:-35.0 Y:-5.0 Z:25
    InitialDelay = 4400 4400 UNIFORM   ;In milliseconds
  End
  ParticleSystem
    Name = LightningStrike FollowBone:Yes
    OrientToObject = Yes
    CreateBoneOverride = B_SWORDBONE
    TargetBoneOverride = B_SWORDBONE
    UseTargetOffset = Yes
    TargetOffset = X:30.0 Y:-5.0 Z:12
    InitialDelay = 5000 5000 UNIFORM   ;In milliseconds
  End
  ParticleSystem
    Name = LightningStrike3 FollowBone:Yes
    OrientToObject = Yes
    CreateBoneOverride = B_SWORDBONE
    TargetBoneOverride = B_SWORDBONE
    UseTargetOffset = Yes
    TargetOffset = X:0.0 Y:50.0 Z:18
    InitialDelay = 5600 5600 UNIFORM   ;In milliseconds
  End
  ParticleSystem
    Name = LightningStrike2 FollowBone:Yes
    OrientToObject = Yes
    CreateBoneOverride = B_SWORDBONE
    TargetBoneOverride = B_SWORDBONE
    UseTargetOffset = Yes
    TargetOffset = X:60.0 Y:-20.0 Z:23
    InitialDelay = 6200 6200 UNIFORM   ;In milliseconds
  End
  ParticleSystem
    Name = LightningStrike2 FollowBone:Yes
    OrientToObject = Yes
    CreateBoneOverride = B_SWORDBONE
    TargetBoneOverride = B_SWORDBONE
    UseTargetOffset = Yes
    TargetOffset = X:-10.0 Y:20.0 Z:40
    InitialDelay = 6800 6800 UNIFORM   ;In milliseconds
  End
  ParticleSystem
    Name = LightningStrike FollowBone:Yes
    OrientToObject = Yes
    CreateBoneOverride = B_SWORDBONE
    TargetBoneOverride = B_SWORDBONE
    UseTargetOffset = Yes
    TargetOffset = X:0.0 Y:0.0 Z:300
    InitialDelay = 7400 7400 UNIFORM   ;In milliseconds
  End
  ParticleSystem
    Name = LightningStrike3 FollowBone:Yes
    OrientToObject = Yes
    CreateBoneOverride = B_SWORDBONE
    TargetBoneOverride = B_SWORDBONE
    UseTargetOffset = Yes
    TargetOffset = X:0.0 Y:30.0 Z:5
    InitialDelay = 8000 8000 UNIFORM   ;In milliseconds
  End
  ParticleSystem
    Name = LightningStrike2 FollowBone:Yes
    OrientToObject = Yes
    CreateBoneOverride = B_SWORDBONE
    TargetBoneOverride = B_SWORDBONE
    UseTargetOffset = Yes
    TargetOffset = X:50.0 Y:-50.0 Z:300
    InitialDelay = 8600 8600 UNIFORM   ;In milliseconds
  End
  Sound 
    Name = ThunderStrikesStereo
  End
End

FXParticleSystem AragornCrystalSphere
  System
    Priority = ALWAYS_RENDER
    ParticleName = EXSphere.tga
    Lifetime = 2 2
    ;SystemLifetime = 50
    Size = 8 14
    StartSizeRate = 3 3
    BurstCount = 1 1
  End
  Color = DefaultColor
    Color1 = R:79 G:79 B:89 0
    Color2 = R:0 G:0 B:0 3
  End
  Update = DefaultUpdate
    SizeRateDamping = 1 1
    AngularDamping = 1 1
    AngularDampingXY = 1 1
  End
  Physics = DefaultPhysics
  End
  EmissionVelocity = OutwardEmissionVelocity
  End
  EmissionVolume = LineEmissionVolume
    IsHollow = Yes
    StartPoint = X:0 Y:0 Z:0
    EndPoint = X:0 Y:0 Z:0
  End
  Draw = DefaultDraw
  End
End

CommandButton Command_HourOfTheWitchKing
	Command                 = SPECIAL_POWER
	SpecialPower            = SpecialAbilityLightingBolt
	Options                 = NEED_TARGET_POS
	TextLabel               = CONTROLBAR:PowerfulGaze
	ButtonImage             = HSWitchKingHour
	CursorName              = EvilAbilityObj
	InvalidCursorName       = GenericInvalid
  	RadiusCursorType        = ThunderBoltRadiusCursor
	ButtonBorderType        = ACTION
	DescriptLabel           = CONTROLBAR:ToolTipPowerfulGaze
	InPalantir		= Yes
End

CommandButton Command_SpecialAbilityPhialOfGaladriel
  Command                 = SPECIAL_POWER 
  SpecialPower            = SpecialAbilityAragornAthelas
;  Options                 = 
  TextLabel               = CONTROLBAR:LightofEvenstar
  ButtonImage             = HSFrodoPhialOfGaladriel
  ButtonBorderType        = ACTION 
  DescriptLabel           = CONTROLBAR:ToolTipLightofEvenstar
  AutoAbility		  = Yes
  PresetRange		  = 50.0  
;  UnitSpecificSound       = FrodoVoiceUsePhial
  InPalantir		  = Yes
End

CommandButton Command_SpecialAbilityElendil
  Command                 	= SPECIAL_POWER 
  SpecialPower            	= SpecialAbilityAragornElendil
 Options                 	= NONE
  TextLabel               	= CONTROLBAR:AuraOfLight
  ButtonImage             	= HSAragornElendil
  ButtonBorderType        	= ACTION 
  DescriptLabel           	= CONTROLBAR:ToolTipAuraOfLight
 ; UnitSpecificSound       	= AragornVoiceElendil
  InPalantir			  = Yes
  AutoAbility			  = Yes
  PresetRange			  = 60.0  
End

CommandButton Command_GondorGandalfLightningSword
  Command                 	= SPECIAL_POWER 
  SpecialPower            	= SpecialAbilityAragornBladeMaster
  Options                 	= NONE
  TextLabel               	= CONTROLBAR:AraLightningSword
  ButtonImage             	= HSGandalfLightningSword
  RadiusCursorType        	= LightningSwordRadiusCursor
  ButtonBorderType        	= ACTION 
  DescriptLabel           	= CONTROLBAR:ToolTipAraLightningSword
  AutoAbility			= No
  InPalantir			= Yes
End
CommandButton Command_GlorfindelStarlight
	Command			= SPECIAL_POWER
	SpecialPower		= SpecialAbilityGlorfindelStarlight
	TextLabel		= CONTROLBAR:Sonofgondr
	DescriptLabel		= CONTROLBAR:ToolTipSonofgondr
	ButtonImage		= HSGlorfindelStarlight
	ButtonBorderType	= ACTION
	InPalantir		= Yes
	AutoAbility		= Yes
	UnitSpecificSound	= GlorfindelStarlight
End
CommandSet NewAragornCommandSet;;;;;;;
	1	= Command_SpecialAbilityPhialOfGaladriel;Light of the evenstar
	2	= Command_GondorGandalfLightningSword;;;infused sword
	3	= Command_SpecialAbilityElendil;;;;;;;;;knockback effect
	4 	= Command_HourOfTheWitchKing;;;;;shards of anduril
	5 	= Command_GlorfindelStarlight;;;;sunflare bombardment
	6 	= Command_SpecialAbilityBladeMaster;;;;;NecromancerSoulFreeze
	12 	= Command_CaptureBuilding;;;;;;SpellBookChillWind
	13 	= Command_AttackMove
	14 	= Command_Stop
End
Weapon NewAragornSword
  LeechRangeWeapon      = Yes
  AttackRange           = STANDARD_MELEE_ATTACK_RANGE
  MeleeWeapon           = Yes

  DelayBetweenShots     = ARAGORN_DELAYBETWEENSHOTS 		; time between shots, msec
  PreAttackDelay        = ARAGORN_PREATTACKDELAY 			; 400 is sword swing delay time before contact with target.
  PreAttackType         = PER_SHOT						; Do the delay each time we attack a new target
  FireFX                = FX_GondorSwordHit
  ;FireFX                = FX_IsildurSword
  FiringDuration        = ARAGORN_FIRINGDURATION 			; Duration of the sword swing

  DamageNugget												; A basic Nugget that just does damage
    Damage        = ARAGORN_DAMAGE
    DamageScalar  = 50000% NONE +RohanOathbreaker
    Radius        = 5.0
    DelayTime     = 0
    DamageType    = MAGIC
    DamageFXType  = ELECTRIC
    DeathType     = NORMAL
  End
DamageNugget                        ; A basic Nugget that just does damage
		Damage			= 50
		DamageArc 		= 50
		Radius			= 10.0
		DamageType    = MAGIC
		DamageFXType  = ELECTRIC;FLAME
		DeathType     = BURNED
	End
	MetaImpactNugget                    ; A Nugget that throws things back with force
		HeroResist			= 0.75
		ShockWaveAmount   = 20.0
		ShockWaveArc	  = 50
		ShockWaveRadius   = 10.0
		ShockWaveTaperOff = 1.25
		ShockWaveZMult    = 0.9
	End
End

Weapon NewAragornHeroSword
  LeechRangeWeapon      = Yes
  AttackRange           = 10.0
  FireSound	= GandalfLightningLoop
  FireSoundLoopTime 	= 200
  RadiusDamageAffects   = ENEMIES NOT_SIMILAR
  MeleeWeapon           = Yes
  FireFX                = FX_GandalfLightningCharge1
  DelayBetweenShots     = 400			; time between shots, msec
  PreAttackDelay        = 700 	; 400 is sword swing delay time before contact with target.
  PreAttackType         = PER_SHOT ; Do the delay each time we attack a new target
  FiringDuration        = 700 	; Duration of the sword swing
	DamageNugget                        ; A basic Nugget that just does damage
		Damage			= 150
		DamageArc 		= 850
		Radius			= 50.0
		DamageType		= MAGIC
		DamageFXType	= ELECTRIC
		DeathType		= EXPLODED
	End
	DamageNugget                        ; A basic Nugget that just does damage
		Damage			= 150
		DamageArc 		= 850
		Radius			= 50.0
		DamageType    = FLAME
		DamageFXType  = ELECTRIC ;FLAME
		DeathType     = EXPLODED;BURNED
	End
	MetaImpactNugget                    ; A Nugget that throws things back with force
		HeroResist			= 0.75
		ShockWaveAmount   = 30.0
		ShockWaveArc	  = 200
		ShockWaveRadius   = 15.0
		ShockWaveTaperOff = 1.25
		ShockWaveZMult    = 0.9
	End

End
ModifierList AragornCrush
	Category	 = FORMATION	//	It's not really a formation, but I don't know what else to call it
	
	Modifier	 = ARMOR 0% PIERCE HERO_RANGED CAVALRY_RANGED STRUCTURAL
	Modifier	 = INVULNERABLE 0% PIERCE HERO_RANGED CAVALRY_RANGED STRUCTURAL
	
	Modifier	 = CRUSHER_LEVEL 3
	Modifier	 = CRUSH_DECELERATE 0%
	Duration	 = 30000					// Matches RefreshRate of giv
	//FX2			 = FX_GenericLeadership30
	//FX3			 = FX_GenericLeadership30
	//MultiLevelFX = Yes
End

Object GondorAragornMP

CommandSet = NewAragornCommandSet

ReplaceModule ModuleTag_DRAW
Draw = W3DScriptedModelDraw ModuleTag_DRAW_NEW

		DefaultModelConditionState
			Model               = GUAragorn_SKN
			ParticleSysBone = B_SWORDBONE AragornSwordglow FollowBone:Yes
		End
		
		ModelConditionState = WEAPONSET_HERO_MODE USER_3
			ParticleSysBone = BAT_RIBS AndurilMaster FollowBone:Yes
			ParticleSysBone = BAT_RIBS AndurilMaster1 FollowBone:Yes
			ParticleSysBone = BAT_RIBS AndurilMaster2 FollowBone:Yes
			ParticleSysBone = BAT_HEAD AragornCrystalSphere FollowBone:Yes
			ParticleSysBone = B_SWORDBONE AragornSwordNorm FollowBone:Yes
		End

		ModelConditionState = WEAPONSET_HERO_MODE;;
			ParticleSysBone = BAT_RIBS AndurilMaster FollowBone:Yes
			ParticleSysBone = BAT_RIBS AndurilMaster1 FollowBone:Yes
			ParticleSysBone = BAT_RIBS AndurilMaster2 FollowBone:Yes
			ParticleSysBone = B_SWORDBONE AragornSwordNorm FollowBone:Yes
		
		End

		ModelConditionState = USER_3
			ParticleSysBone = B_PELVIS AragornCrystalSphere FollowBone:Yes;ThranDeadEye
			ParticleSysBone = B_PELVIS ThranDeadEye FollowBone:Yes;
		End


		TransitionState				= TRANS_boredToAttention_Elendil
			Animation				= GUAragorn_ATND
				AnimationName		= GUAragorn_SKL.GUAragorn_ATND 
				AnimationMode		= ONCE
			End
			FXEvent	= Name: FX_ElendilGlowEvent
		End
		
		TransitionState				= TRANS_attentionToBored_Elendil
			Animation				= GUAragorn_ATND
				AnimationName		= GUAragorn_SKL.GUAragorn_ATND
				AnimationMode		= ONCE_BACKWARDS
			End
			FXEvent					= Name: FX_ElendilGlowEvent
			Flags					= START_FRAME_LAST
		End

		TransitionState				= TRANS_boredToAttention
			Animation				= GUAragorn_ATND
				AnimationName		= GUAragorn_SKL.GUAragorn_ATND 
				AnimationMode		= ONCE
			End
		End
		
		TransitionState				= TRANS_attentionToBored
			Animation				= GUAragorn_ATND
				AnimationName		= GUAragorn_SKL.GUAragorn_ATND
				AnimationMode		= ONCE_BACKWARDS
			End
			Flags					= START_FRAME_LAST
		End

	; --- Idle Anims
		IdleAnimationState
			StateName				= STATE_bored
			
			Animation				= GUAragorn_IDLE		;no_fidget
				AnimationName		= GUAragorn_SKL.GUAragorn_IDLE
				AnimationMode		= ONCE
				AnimationPriority	= 12
			End
			
			Animation				= GUAragorn_IDLF		;fidget
				AnimationName		= GUAragorn_SKL.GUAragorn_IDLF
				AnimationMode		= ONCE
				AnimationPriority	= 1
			End
			
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if	Prev == "STATE_attention" or
					Prev == "STATE_running" or
					Prev == "OATH_BREAKERS" then CurDrawableSetTransitionAnimState("TRANS_attentionToBored") end
			EndScript
		End
		
		AnimationState			= THROWN_PROJECTILE
			Animation			= FLYA
				AnimationName	= GUAragorn_SKL.GUAragorn_FLYA
				AnimationMode	= LOOP
			End
		End
		
		AnimationState			= STUNNED_FLAILING
			Animation			= FLYA
				AnimationName	= GUAragorn_SKL.GUAragorn_FLYA
				AnimationMode	= LOOP
				AnimationSpeedFactorRange	= 0.4 0.6
			End
		End
		
		AnimationState 			= DYING SPLATTED
			Animation 		= Splatted_On_Ground
				AnimationName	= GUAragorn_SKL.GUAragorn_LNDA
				AnimationMode	= ONCE
			End
			EnteringStateFX		= FX_SoldierHitGround
		End
		
		; --- Dying anims
		AnimationState				= DYING
			Animation				= GUAragorn_DIEA
				AnimationName		= GUAragorn_SKL.GUAragorn_DIEA
				AnimationMode		= ONCE
			End
			Animation				= GUAragorn_DIEB
				AnimationName		= GUAragorn_SKL.GUAragorn_DIEB
				AnimationMode		= ONCE
			End
		End
		
		AnimationState						= PARALYZED
			Animation
				AnimationName				= GUAragorn_IDLE
				AnimationMode				= LOOP
			End
		End

		AnimationState				= STUNNED_STANDING_UP
			Animation				= GUAragorn_GTPB
				AnimationName		= GUAragorn_SKL.GUAragorn_GTPB
				AnimationMode		= ONCE
				AnimationSpeedFactorRange = 1.5 1.5
			End
		End

		AnimationState			= STUNNED
			Animation			= LNDA
				AnimationName	= GUAragorn_SKL.GUAragorn_LNDA
				AnimationMode	= ONCE
			End
			EnteringStateFX		= FX_SoldierHitGround
		End	
	
	


	; --- Attacking Anims [Weapon_A]
	
	
	
		AnimationState        = MOVING FIRING_OR_PREATTACK_A
			ShareAnimation		= Yes
			Animation           = RunAndFire
				AnimationName       = GUAragorn_SKL.GUAragorn_ATRA
				AnimationMode       = LOOP
			End
			Flags               = RANDOMSTART  
		End
		
		AnimationState				= FIRING_OR_PREATTACK_A WEAPONSET_HERO_MODE ; Blademaster Mode
			StateName				= STATE_ready
			Animation				= ATKF
				AnimationName		= GUAragorn_SKL.GUAragorn_ATKF
				AnimationMode		= ONCE
				UseWeaponTiming		= Yes
			End
			Flags					= RESTART_ANIM_WHEN_COMPLETE
			FXEvent	= Frame:25 Name: FX_BladeMasterHitOrient
			FXEvent	= Frame:45 Name: FX_BladeMasterHitOrient
		End

		AnimationState				= FIRING_OR_PREATTACK_A
			StateName				= STATE_ready
			Animation				= ATKD
				AnimationName		= GUAragorn_SKL.GUAragorn_ATKD
				AnimationMode		= ONCE
				UseWeaponTiming		= Yes
				AnimationPriority	= 3
			End
			Animation				= ATKE
				AnimationName		= GUAragorn_SKL.GUAragorn_ATKE
				AnimationMode		= ONCE
				UseWeaponTiming		= Yes
				AnimationPriority	= 2
			End
			Flags					=	RESTART_ANIM_WHEN_COMPLETE
		End
		
		
		
		
		

	; --- Moving Anims	
		AnimationState				= MOVING
			StateName				= STATE_running
			
			Animation				= GUAragorn_RUNB
				AnimationName		= GUAragorn_SKL.GUAragorn_RUNB
				AnimationMode		= LOOP
			End
		End

		AnimationState				= LEVELED	; This state clears itself in 3 seconds
			Animation				= LevelUp
				AnimationName		= GUAragorn_SKL.GUAragorn_ATKO
				AnimationMode		= ONCE
			End
		End

		AnimationState				= SPECIAL_POWER_1							; Aragorn shouting Elendil anim
			StateName				= STATE_ready
			Animation				= GUAragorn_ATKL
				AnimationName		= GUAragorn_SKL.GUAragorn_ATKL
				AnimationMode		= ONCE
			End
			ParticleSysBone			= B_SWORDBONE ElendilFlare FollowBone:yes
			ParticleSysBone			= B_SWORDBONE ElendilSwordFlare FollowBone:yes
;			FXEvent	= Name: FX_ElendilGlowEvent
		End
		
		AnimationState				= USER_2
			StateName				= ATHELAS
			Animation				= ATKP
				AnimationName		= GUAragorn_SKL.GUAragorn_ATKP
				AnimationMode		= ONCE
			End
		End
		
		AnimationState				= USER_1
			StateName				= OATH_BREAKERS
			Animation				= ATKN
				AnimationName		= GUAragorn_SKL.GUAragorn_CHRB
				AnimationMode		= ONCE
			End
		End
		
		
		
	; --------- Click and Hit Reactions ------------

		AnimationState				= HIT_REACTION HIT_LEVEL_3
			StateName				= STATE_bored
			Animation				= Hit_Level_1_b
				AnimationName		= GUAragorn_SKL.GUAragorn_HITB
				AnimationMode		= ONCE
			End
		End
		
	;----Emotion Animations

		AnimationState				= EMOTION_CELEBRATING
			StateName				= STATE_ready
			Animation				= CHRB
				AnimationName		= GUAragorn_SKL.GUAragorn_CHRB
				AnimationMode		= ONCE
				AnimationPriority	= 1
			End
			Flags					= RESTART_ANIM_WHEN_COMPLETE				
		End
		
		AnimationState				= EMOTION_TAUNTING
			StateName				= STATE_ready
			Animation				= CHRB
				AnimationName		= GUAragorn_SKL.GUAragorn_CHRB
				AnimationMode		= ONCE
				AnimationPriority	= 1
			End
			Flags					= RESTART_ANIM_WHEN_COMPLETE				
		End
		
		AnimationState				= EMOTION_ALERT
			StateName				= STATE_ready
			Animation				= IDLA
				AnimationName		= GUAragorn_SKL.GUAragorn_IDLA
				AnimationMode		= ONCE
				AnimationPriority	= 1
			End
		End

		AnimationState				= EMOTION_MORALE_HIGH
			StateName				= STATE_ready
			Animation				= ATKN
				AnimationName		= GUAragorn_SKL.GUAragorn_ATKN
				AnimationMode		= ONCE
				AnimationPriority	= 1
			End
			Animation				= ATKP
				AnimationName		= GUAragorn_SKL.GUAragorn_ATKP
				AnimationMode		= ONCE
				AnimationPriority	= 15
			End
			Animation				= TNTC
				AnimationName		= GUAragorn_SKL.GUAragorn_TNTD
				AnimationMode		= ONCE
				AnimationPriority	= 30
			End
			Animation				= TNTD
				AnimationName		= GUAragorn_SKL.GUAragorn_TNTD
				AnimationMode		= ONCE
				AnimationPriority	= 30
			End
			Flags					= RESTART_ANIM_WHEN_COMPLETE				
		End
		
		AnimationState				= ENGAGED
			StateName				= STATE_ready
			Animation				= IDLA
				AnimationName		= GUAragorn_SKL.GUAragorn_IDLA
				AnimationMode		= ONCE
				UseWeaponTiming		= Yes
				AnimationPriority	= 1
			End
			Flags					=	RESTART_ANIM_WHEN_COMPLETE
		End

		AnimationState				= RAISING_FLAG
			StateName				= STATE_ready
			Animation				= CHRB
				AnimationName		= GUAragorn_SKL.GUAragorn_CHRB
				AnimationMode		= LOOP
			End
		End

		AnimationState				= SELECTED
			StateName				= STATE_attention
			Animation				= ATNE
				AnimationName		= GUAragorn_SKL.GUAragorn_ATNE
				AnimationMode		= LOOP
				AnimationBlendTime	= 5
				AnimationMustCompleteBlend = yes
			End
			BeginScript
				Prev = CurDrawablePrevAnimationState()
				if Prev == "STATE_bored" then CurDrawableSetTransitionAnimState("TRANS_boredToAttention") end
			EndScript
		End
				
	End
End

WeaponSet
		Conditions		= None 
		Weapon			= PRIMARY    NewAragornSword;;;;;CHANGE;done change !!!!!!!!!!!!!!!!!!!
	End
	WeaponSet
		Conditions		= WEAPONSET_HERO_MODE
		Weapon			= PRIMARY    NewAragornHeroSword
	End
ReplaceModule ModuleTag_AragornAthelas
Behavior = SpecialPowerModule ModuleTag_AragornAthelas1
		SpecialPowerTemplate    = SpecialAbilityAragornAthelas
		UpdateModuleStartsAttack  = Yes
		TriggerFX				= FX_ThranDeadEye
		SetModelCondition		= ModelConditionState:USER_2
		SetModelConditionTime	= 2.1
	End
End
	ReplaceModule ModuleTag_AragornAthelasUpdate 
	Behavior = SpecialAbilityUpdate ModuleTag_AragornAthelasUpdate1              
		SpecialPowerTemplate    = SpecialAbilityAragornAthelas
		StartAbilityRange       = 1.6
		UnpackTime              = 1		; Nothing to touching it
		PreparationTime         = 3		; touching it to grabbing it
		PackTime                = 2096  ; whacking it to holding it nice
		AwardXPForTriggering    = 0
	End
End
	ReplaceModule ModuleTag_AthelasAutoAbility
	Behavior = AutoAbilityBehavior ModuleTag_AthelasAutoAbility1
		SpecialAbility	= SpecialAbilityAragornAthelas
		MaxScanRange	= 250
		Query			= 1 NONE +HERO ALLIES
	End
End
ReplaceModule ModuleTag_ElendilStarter
Behavior = SpecialPowerModule ModuleTag_ElendilStarter_NEW						
		SpecialPowerTemplate		= SpecialAbilityAragornElendil
		UpdateModuleStartsAttack	= Yes
		AttributeModifier			= AragornCrush		; Used for the anti category duration only.
		AttributeModifierRange		= 200.0
		StartsPaused			= Yes								; obtained on level 2
		SetModelCondition			= ModelConditionState:USER_3
		SetModelConditionTime		= 30.0 ; 10 secs of glow anim for sword
	End
End
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	AddModule
	Behavior = UnpauseSpecialPowerUpgrade ModuleTag_WordEnabler
		SpecialPowerTemplate = SpecialAbilityRangerWrath
		TriggeredBy = Upgrade_GandalfIstariLight
	End
End
	AddModule
	Behavior = SpecialPowerModule ModuleTag_WordStarter       
		SpecialPowerTemplate      = SpecialAbilityRangerWrath
		UpdateModuleStartsAttack  = Yes
		StartsPaused		  	  = Yes
	End
End
	AddModule
	Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_WordWeaponFireUpdate   
		SpecialPowerTemplate    = SpecialAbilityRangerWrath
		WhichSpecialWeapon		= 3
		SkipContinue			= Yes

		UnpackTime              = 1400									; Drawing the horn
		PreparationTime         = 1	
		FreezeAfterTriggerDuration = 5000 ; Hold AI for this long after we fire.
		
		AwardXPForTriggering    = 0		
		StartAbilityRange		= 80.0
		SpecialWeapon			= RangerWrath
	End
End;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;COSTUME &FREEZE
AddModule
Behavior = GrantUpgradeCreate ModuleTag_1
		UpgradeToGrant = Upgrade_GandalfWhite  ;
	End 
	End
	AddModule
	Behavior = SubObjectsUpgrade Costume_3
		TriggeredBy		= Upgrade_GandalfWhite
		UpgradeTexture	= guaragorn_rotk.tga 0 guaragorn_2trs.tga 
End
End
AddModule
Behavior = SpecialPowerModule ModuleTag_NecroSoulFreezeStarter
		SpecialPowerTemplate		= SpecialAbilityNecroSoulFreeze
		StartsPaused			= Yes
 		UpdateModuleStartsAttack	= Yes
 ;		TriggerFX              		= FX_SoulFreezeCast
	End
End
AddModule
	Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_NecroSoulFreezeBlastWeaponFireUpdate   
		SpecialPowerTemplate    	= SpecialAbilityNecroSoulFreeze
		WhichSpecialWeapon		= 3
		SkipContinue			= Yes
		FreezeAfterTriggerDuration 	= 100 ; Hold AI for this long after we fire.
		UnpackTime			= 700
		PreparationTime			= 1   
		;PersistentPrepTime		= 1000
		PackTime			= 100
		AwardXPForTriggering    	= 0		
		StartAbilityRange		= ANGMAR_NECRO_SOUL_FREEZE_START_RANGE		
		SpecialWeapon			= AngmarNecroSoulFreezeWeapon
        	TriggerSound = NecroVoiceModeSoulFreeze 
	End
End
;;;;;elendil
AddModule
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_IstariLightEnabler
		SpecialPowerTemplate = SpecialAbilityLightingBolt
		TriggeredBy = Upgrade_SarumanThunderBolt
	End
End
AddModule
	Behavior = SpecialPowerModule ModuleTag_IstariLightPower                      
		SpecialPowerTemplate		= SpecialAbilityLightingBolt
		UpdateModuleStartsAttack	= Yes
		StartsPaused				= Yes
		InitiateSound				= SarumanVoiceAttackCharge
	End
End
AddModule
	Behavior = WeaponFireSpecialAbilityUpdate ModuleTag_IstariLightUpdate
		SpecialPowerTemplate    = SpecialAbilityLightingBolt
		SkipContinue			= Yes
		UnpackTime              = 1500
 		PreparationTime         = 1  
 		PersistentPrepTime      = 1000
 		PackTime                = 500
		AwardXPForTriggering    = 0
		StartAbilityRange		= 200; Note: This has to be smaller than the weapon range or it'll never succeed
		ApproachRequiresLOS		= Yes		
		SpecialWeapon			= AngmarNecroSoulFreezeWeapon
		MustFinishAbility		= Yes
		WhichSpecialWeapon		= 3
		BusyForDuration			= 2500
	End
End
AddModule
Behavior = UnpauseSpecialPowerUpgrade ModuleTag_GlorfindelStarlightEnabler
		SpecialPowerTemplate		= SpecialAbilityGlorfindelStarlight
		TriggeredBy					= Upgrade_GlorindelStarlight
	End
End
AddModule
	Behavior = OCLSpecialPower ModuleTag_GlorfindelStarlight
		StartsPaused				= Yes
		SpecialPowerTemplate		= SpecialAbilityGlorfindelStarlight
		OCL							= OCL_SpecialPowerSunflare
		CreateLocation				= CREATE_AT_LOCATION
		SetModelCondition			= ModelConditionState:USER_2
		SetModelConditionTime		= 2.333
	End
End
AddModule
	; special AutoAbilityBehavior for starlight, as we need to target a bunch of allies.
	Behavior = AutoAbilityBehavior ModuleTag_StarlightAutoAbilityBehavior
		SpecialAbility	= SpecialAbilityGlorfindelStarlight
		MaxScanRange	= GLORFINDEL_STARLIGHT_RADIUS
		Query			= 2 ANY ALLIES +HORDE						; 2 friendly hordes or an enemy
		Query			= 1 ALL ENEMIES
	End
End
ReplaceModule ModuleTag_AragornHealing
Behavior = AutoHealBehavior ModuleTag_AragornHealing1
		StartsActive = Yes
		HealingAmount = 50
		HealingDelay = 1000
		StartHealingDelay = 10000
		HealOnlyIfNotInCombat = Yes
	End
	End


;;;;;;Sunflare attack
End









ExperienceLevel	AragornLevelMP4
	TargetNames						=	ARAGORN	
	RequiredExperience				=	ARAGORN_LVL4_EXP_NEEDED
	ExperienceAward					=	ARAGORN_LVL4_EXP_AWARD 	
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Rank							=	4
	Upgrades						=	Upgrade_SarumanThunderBolt
	AttributeModifiers				=	HeroLevelUpDamage3
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40
		MaxRadius					=	200
		MaxSelectedUnits			=	40
	End	
End	


ExperienceLevel	AragornLevelMP8
	TargetNames						=	ARAGORN	
	RequiredExperience				=	ARAGORN_LVL8_EXP_NEEDED
	ExperienceAward					=	ARAGORN_LVL8_EXP_AWARD 	
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Rank							=	8
	Upgrades						=	Upgrade_GlorindelStarlight
	AttributeModifiers				=	HeroLevelUpDamage7
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40
		MaxRadius					=	200
		MaxSelectedUnits			=	40
	End	
End	



ExperienceLevel	AragornLevelMP10
	TargetNames						=	ARAGORN	
	RequiredExperience				=	ARAGORN_LVL10_EXP_NEEDED
	ExperienceAward					=	ARAGORN_LVL10_EXP_AWARD
	LevelUpFx						=	FX:GandalfLevelUp1FX
	;LevelUpOCL						=	OCL_GandalfLevelUp1OCL
	Rank							=	10
	Upgrades						=	Upgrade_GandalfIstariLight
	AttributeModifiers				=	HeroLevelUpDamage9
	SelectionDecal
		Texture						=	decal_hero_good
		Style						=	SHADOW_ALPHA_DECAL
		OpacityMin					=	50%	
		OpacityMax					=	100%
		MinRadius					=	40
		MaxRadius					=	200
		MaxSelectedUnits			=	40
	End	
End	
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;|;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  ;;;;;;;  ;; ;;  ;;;;;;;   ;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;|;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;     ;; ;;    ;;     ;; ;;
;;;Yossarian lives!;;;;                                    ;;;;   ;; ;;;;;;;;; ;; ;; ;;;;;;;;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;        ;; ;; ;;        ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  ;;;;;;;; ;; ;;  ;;;;;;;;  ;;;;;;;;