GTWNEW:
	Inherits: ^Defense
    WithDeathAnimation:
        DeathSequencePalette: raplayer
    RenderSprites:
        PlayerPalette: raplayer
	Valued:
		Cost: 600
	Tooltip:
		Name: Guard Tower
	Buildable:
		Description: Basic defensive structure.\n  Strong vs Infantry, Cavalry\n  Weak vs Ranged\n  Cannot target Aircraft (because of the roof)
		BuildPaletteOrder: 40
		Prerequisites: barracks
		Queue: MDefenses.GDI, MDefenses.Nod
		BuildDuration: 1440
		BuildDurationModifier: 40
        IconPalette: raicon
	Building:
        Footprint: _ x
		Dimensions: 1,2
	Health:
		HP: 40000
	RevealsShroud:
		Range: 7c0
	Bib:
		HasMinibib: Yes
    WithIdleOverlay:
    Armament@1:
		Weapon: bownarrowtower
		LocalOffset: 0,0,427
        Turret: primary
    Armament@2:
		Weapon: bownarrowtower
		LocalOffset: 0,0,427
        Turret: secondary
        FireDelay: 12
	AttackTurreted:
	BodyOrientation:
		QuantizedFacings: 8
	DetectCloaked:
		Range: 3c0
    WithSpriteTurret@1: 
        Sequence: turretidle
        AimSequence: turretanim
        Turret: primary
    WithSpriteTurret@2: 
        Sequence: turretidle
        AimSequence: turretanim
        Turret: secondary
	Turreted@1:
        Turret: primary
		TurnSpeed: 100
        Offset: -170,-170,100
    Turreted@2:
        Turret: secondary
		TurnSpeed: 100
        Offset: 170,170,100
	Power:
		Amount: -2    
    Armor:
		Type: HeavyBuilding 
    Selectable:
		Bounds: 24,24,0,12
	SelectionDecorations:
		VisualBounds: 22,24,0,12
    ThrowsShrapnel@SMALL:
		Weapons: SmallWood1, SmallWood2, SmallWood3, LargeWood1
		Pieces: 2, 3
		Range: 0c512, 3c0

SAMNEW:
	Inherits: ^Defense
    -RenderDetectionCircle:
    WithDeathAnimation:
        DeathSequencePalette: raplayer
    RenderSprites:
        PlayerPalette: raplayer
	Valued:
		Cost: 650
	Tooltip:
		Name: Anti-Aircraft Ballista
	Buildable:
		Description:  Anti-Aircraft base defense.\n  Strong vs Aircraft\n  Cannot target Ground units.
		BuildPaletteOrder: 50
		Prerequisites: barracks
		Queue: MDefenses.Nod
		BuildDuration: 1700
		BuildDurationModifier: 40
        IconPalette: raicon
	Building:
        Footprint: __ xx
		Dimensions: 2,2
	Health:
		HP: 40000
	RevealsShroud:
		Range: 8c0
	Bib:
		HasMinibib: Yes
	Armament@1:
		Weapon: samballista
		LocalOffset: 200,0,227
        Turret: primary
	AttackTurreted:
	BodyOrientation:
		QuantizedFacings: 8
    WithSpriteTurret@1: 
        Sequence: turretidle
        AimSequence: turretanim
        Turret: primary
	Turreted@1:
        Turret: primary
		TurnSpeed: 100
        Offset: 0,0,512
	Power:
		Amount: -2    
    Armor:
		Type: Concrete 
    Selectable:
		Bounds: 24,24,0,12
	SelectionDecorations:
		VisualBounds: 22,24,0,12

TRIBU:
	Inherits: ^Defense
    Valued:
		Cost: 1500
	Tooltip:
		Name: Tribuchet
	Buildable:
		Description: Advanced base defense.\nRequires power to operate.\n  Strong vs all Ground units\n  Cannot target Aircraft
		BuildPaletteOrder: 60
		Prerequisites: anycastle
		Queue: MDefenses.Nod
		BuildDuration: 3120
		BuildDurationModifier: 40
        IconPalette: raicon
	Building:
        Footprint: _ x
		Dimensions: 1,2
	Health:
		HP: 60000
	Armor:
		Type: Concrete
	RevealsShroud:
		Range: 8c0
	Bib:
		HasMinibib: Yes
	Armament:
		Weapon: tribuchetboulder
		LocalOffset: 0,0,1324
    DetectCloaked:
		Range: 3c0
	Power:
		Amount: -4
    Selectable:
		Bounds: 30,52,0,0
	SelectionDecorations:
		VisualBounds: 30,52,0,0 
    RenderSprites:
        Image: tribu
        PlayerPalette: raplayer
    BodyOrientation:
        QuantizedFacings: 32
    WithAttackAnimation:
        AttackSequence: turretanim
    WithTurretedSpriteBody:
    -WithSpriteBody:
    AttackTurreted:
    Turreted:
        TurnSpeed: 2
    WithDeathAnimation:
        DeathSequencePalette: raplayer 
    ThrowsShrapnel@SMALL:
		Weapons: SmallWood1, SmallWood2, SmallWood3, LargeWood1, LargeWood1, LargeWood1
		Pieces: 2, 4
		Range: 0c512, 3c0
        
BATO:
	Inherits: ^Defense
    WithDeathAnimation:
        DeathSequencePalette: raplayer
    RenderSprites:
        Image: siege4
        PlayerPalette: raplayer
	Valued:
		Cost: 1400
	Tooltip:
		Name: Ballista Tower
	Buildable:
		Description: Advanced defensive structure.\n  Long distance\n  Weak vs close quaters\n Can target Aircraft
		BuildPaletteOrder: 60
		Prerequisites: anycastle
		Queue: MDefenses.GDI
		BuildDuration: 2880
		BuildDurationModifier: 40
        IconPalette: raicon
	Building:
        Footprint: _ x
		Dimensions: 1,2
	Health:
		HP: 60000
	RevealsShroud:
		Range: 8c0
	Bib:
		HasMinibib: Yes
	Armament@1:
		Weapon: stationbalistaag
		LocalOffset: 0,0,127
        Turret: primary
    Armament@2:
		Weapon: stationbalistaaa
		LocalOffset: 0,0,127
        Turret: primary
	AttackTurreted:
	BodyOrientation:
		QuantizedFacings: 32
	DetectCloaked:
		Range: 3c0
    WithSpriteTurret@1: 
        Sequence: turret
        Turret: primary
	Turreted@1:
        Turret: primary
		TurnSpeed: 2
        Offset: 0,0,500
	Power:
		Amount: -4    
    Armor:
		Type: Concrete    
    Selectable:
		Bounds: 30,42,0,0
	SelectionDecorations:
		VisualBounds: 30,42,0,0 
        
GUNNEW:
	Inherits: ^Defense
	Valued:
		Cost: 600
	Tooltip:
		Name: Turret
	Buildable:
		Description: Basic Anti-Cavalry base defense.\n  Strong vs Cavalry\n  Weak vs Infantry
		BuildPaletteOrder: 45
		Prerequisites: barracks
		Queue: MDefenses.GDI, MDefenses.Nod
        IconPalette: raicon
		BuildDuration: 1440
		BuildDurationModifier: 40
	Building:
	Health:
		HP: 40000
	Armor:
		Type: HeavyBuilding
	RevealsShroud:
		Range: 6c0
	Bib:
		HasMinibib: Yes
	Turreted:
		TurnSpeed: 12
		InitialFacing: 56
	-WithSpriteBody:
	WithTurretedSpriteBody:
	Armament:
		Weapon: cannonboulder
		LocalOffset: 512,0,212
		MuzzleSequence: muzzle
	AttackTurreted:
	WithMuzzleOverlay:
	-WithDeathAnimation:
    RenderSprites:
        Image: gunnew
        PlayerPalette: raplayer
	DetectCloaked:
		Range: 3c0
	Power:
		Amount: -2
	BodyOrientation:
        QuantizedFacings: 32
    Selectable:
		Bounds: 25,25,0,0
	SelectionDecorations:
		VisualBounds: 25,25,0,0 
    ThrowsShrapnel@SMALL:
		Weapons: SmallStone1, SmallStone2, LargeStone1
		Pieces: 2, 3
		Range: 0c512, 3c0
        
CSTLWLL:
	Inherits: ^Wall
	Valued:
		Cost: 150
	CustomSellValue:
		Value: 0
	Tooltip:
		Name: Castle Wall
	Buildable:
		Description: Castlewall that blocks arrows
		BuildPaletteOrder: 30
        BuildDuration: 500
		Prerequisites: anyworkshop
		Queue: MDefenses.GDI, MDefenses.Nod
		BuildDurationModifier: 40
        IconPalette: raicon
	Health:
		HP: 25000
	Armor:
		Type: Concrete
	BlocksProjectiles:
	Building:
    RenderSprites:
		Palette: ra
        PlayerPalette: raplayer
    SoundOnDamageTransition:
		DestroyedSounds: crumble.aud
	LineBuild:
		NodeTypes: concrete
	LineBuildNode:
		Types: concrete
	WithWallSpriteBody:
		Type: concrete
    Crushable:
		CrushClasses: heavywall
        
WDWLL:
	Inherits: ^Wall
	Valued:
		Cost: 25
	CustomSellValue:
		Value: 0
	Tooltip:
		Name: Wood Wall
	Buildable:
		Description: Woodenwall nothing else
		BuildPaletteOrder: 20
		Queue: MDefenses.GDI, MDefenses.Nod
		BuildDurationModifier: 40
        IconPalette: raicon
	Health:
		HP: 10000
	Armor:
		Type: HeavyBuilding
	Building:
    RenderSprites:
		Palette: ra
        PlayerPalette: raplayer
	LineBuild:
		Range: 8
		NodeTypes: Wood
	LineBuildNode:
		Types: Wood
	WithWallSpriteBody:
		Type: wood
    Crushable:
		CrushClasses: wall