GTWNEW:
	Inherits: ^MWDefense
    WithDeathAnimation:
        DeathSequencePalette: raplayer
    RenderSprites:
        PlayerPalette: raplayer
	Valued:
		Cost: 600
	Tooltip:
		Name: Guard Tower
	Buildable:
		Description: Basic defensive structure.\n  Strong vs Infantry, Light Cavalry\n  Weak vs Ranged, Heavy Cavalry \n  Cannot target Aircraft (because of the roof)
		BuildPaletteOrder: 50
		Prerequisites: barracks
		Queue: MDefenses.GDI, MDefenses.Nod
		BuildDuration: 1440
		BuildDurationModifier: 40
        IconPalette: raicon
	Building:
        Footprint: x
		Dimensions: 1,1
	Health:
		HP: 40000
        Shape: Rectangle
            TopLeft: -456, -456
            BottomRight: 456, 456
	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,500
    Turreted@2:
        Turret: secondary
		TurnSpeed: 100
        Offset: 170,170,500
	Power:
		Amount: -2    
    Armor:
		Type: HeavyBuilding 
    Selectable:
		Bounds: 24,48,0,-10
	SelectionDecorations
		VisualBounds: 22,48,0,-10
    ThrowsShrapnel@SMALL:
		Weapons: SmallWood1, SmallWood2, SmallWood3, LargeWood1
		Pieces: 2, 3
		Range: 0c512, 3c0
        
WTW:
	Inherits: ^MWDefense
    Cargo:
        MaxWeight: 8
        PipCount: 8
        Types: Archer
        InitialUnits: E4NEW, E4NEW, E4NEW, E4NEW
    WithDeathAnimation:
        DeathSequencePalette: raplayer
    BlocksProjectiles:
    RenderSprites:
        PlayerPalette: raplayer
	LineBuildNode:
		Types: concrete
    Valued:
		Cost: 1750
	Tooltip:
		Name: Square Tower
	Buildable:
		Description: Advanced defensive structure.\n  Strong vs Infantry, Light Cavalry\n  Weak vs Heavy Cavalry \n  Can target Aircraft \n Fits with Castle Walls
		BuildPaletteOrder: 80
		Prerequisites: barracks, anyworkshop, anyhq
		Queue: MDefenses.Nod
		BuildDuration: 1950
		BuildDurationModifier: 40
        IconPalette: raicon
	Building:
        Footprint:  x
		Dimensions: 1,1
	Health:
		HP: 90000
        Shape: Rectangle
            TopLeft: -512,-512
            BottomRight: 512, 512
	RevealsShroud:
		Range: 7c0
	AttackGarrisoned: 
        PortOffsets: -194,0,294, -194,0,680, -555,-469,294, -555,-469,680, -896,0,294, -896,0,680, -555,469,294, -555,469,680
        PortYaws: 0, 0, 256, 256, 511, 511, 767, 767
        PortCones: 170, 170, 170, 170, 170, 170, 170, 170
        Armaments: garrisoned
	BodyOrientation:
		QuantizedFacings: 1
	DetectCloaked:
		Range: 3c0
	Power:
		Amount: -5    
    Armor:
		Type: Concrete 
    Selectable:
		Bounds: 24,48,0,-10
	SelectionDecorations
		VisualBounds: 22,48,0,-10
    ThrowsShrapnel@SMALL:
		Weapons: SmallStone1, SmallStone2, LargeStone1
		Pieces: 2, 3
		Range: 0c512, 3c0
    -WithSpriteBody:
    WithWallSpriteBody:
        Type: concrete
        
WTW2:
    Inherits: WTW
    Cargo:
        InitialUnits: E4NEWv2, E4NEWv2, E4NEWv2, E4NEWv2
	Buildable:
		Queue: MDefenses.GDI
    RenderSprites:
        Image: wtw
        PlayerPalette: raplayer


SAMNEW:
	Inherits: ^MWDefense
    -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: 90
		Prerequisites: barracks
		Queue: MDefenses.Nod
		BuildDuration: 1700
		BuildDurationModifier: 40
        IconPalette: raicon
	Building:
        Footprint: xx
		Dimensions: 2,1
	Health:
		HP: 40000
        Shape: Rectangle
            TopLeft: -724,-656
            BottomRight: 724, 412
	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 
    SelectionDecorations:
		VisualBounds: 50,50,0,-10
    Selectable:
		Bounds: 50,50,0,-10

TRIBU:
	Inherits: ^MWDefense
    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: 70
		Prerequisites: anycastle
		Queue: MDefenses.Nod
		BuildDuration: 3120
		BuildDurationModifier: 40
        IconPalette: raicon
	Building:
        Footprint: x
		Dimensions: 1,1
	Health:
		HP: 60000
        Shape: Rectangle
            TopLeft: -456, -656
            BottomRight: 456, 456
	Armor:
		Type: Concrete
	RevealsShroud:
		Range: 8c0
	Bib:
		HasMinibib: Yes
	Armament:
		Weapon: tribuchetboulder
		LocalOffset: 0,0,2124
    DetectCloaked:
		Range: 3c0
	Power:
		Amount: -4
    Selectable:
		Bounds: 30,52,0,-12
	SelectionDecorations:
		VisualBounds: 30,52,0,-12 
    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: ^MWDefense
    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: 70
		Prerequisites: anycastle
		Queue: MDefenses.GDI
		BuildDuration: 2880
		BuildDurationModifier: 40
        IconPalette: raicon
	Building:
        Footprint: x
		Dimensions: 1,1
	Health:
		HP: 60000
        Shape: Rectangle
            TopLeft: -456, -112
            BottomRight: 456, 924
	RevealsShroud:
		Range: 8c0
	Bib:
		HasMinibib: Yes
	Armament@1:
		Weapon: stationbalistaag
		LocalOffset: 356,0,5
        Turret: primary
    Armament@2:
		Weapon: stationbalistaaa
		LocalOffset: 356,0,5
        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: ^MWDefense
	Valued:
		Cost: 600
	Tooltip:
		Name: Turret
	Buildable:
		Description: Basic Anti-Cavalry base defense.\n  Strong vs Cavalry\n  Weak vs Infantry
		BuildPaletteOrder: 60
		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: 350
    CustomSellValue:
		Value: 0
	Tooltip:
		Name: Castle Wall
	Buildable:
		Description: Castlewall that blocks arrows
		BuildPaletteOrder: 0
        BuildDuration: 500
		Prerequisites: anyworkshop
		Queue: MDefenses.GDI, MDefenses.Nod
		BuildDurationModifier: 40
        IconPalette: raicon
	Health:
		HP: 65000
	Armor:
		Type: Concrete
	BlocksProjectiles:
	Building:
    RenderSprites:
        PlayerPalette: raplayer
        -Palette:
    SoundOnDamageTransition:
		DestroyedSounds: crumble.aud
	LineBuild:
		NodeTypes: concrete
	LineBuildNode:
		Types: concrete
	WithWallSpriteBody:
		Type: concrete
    Crushable:
		CrushClasses: heavywall
        
        
CSTLGTEW:
	Inherits: ^MWGate
    WithMakeAnimation:
    WithDeathAnimation:
        DeathSequencePalette: raplayer
    RenderSprites:
        PlayerPalette: raplayer
    Gate:
        Adjacent: 7
        Footprint: xxx
        Dimensions: 3,1
    WithGateSpriteBody:
        WallConnections: -1,0, 3,0
        Type: concrete
        OpenSequence: open
    LineBuildNode:
		Connections: -1,0, 3,0
            Types: concrete
	Valued:
		Cost: 1000
	Tooltip:
		Name: Castle Gate
	Buildable:
		Description: Automated barrier that opens for allied units./nUnarmed
		BuildPaletteOrder: 10
		Prerequisites: anyworkshop
		Queue: MDefenses.GDI, MDefenses.Nod
		BuildDuration: 1540
		BuildDurationModifier: 40
        IconPalette: raicon
	Health:
		HP: 200000
        Shape: Rectangle
            TopLeft: -1436,-412
            BottomRight: 1436, 412
	RevealsShroud:
		Range: 5c0
	Bib:
	BodyOrientation:
		QuantizedFacings: 1
	Power:
		Amount: -4  
    Armor:
		Type: Concrete 
    Selectable:
		Bounds: 96,66,0,-21
	SelectionDecorations:
		VisualBounds: 96,66,0,-21
    ThrowsShrapnel@SMALL:
		Weapons: SmallStone1, SmallStone2, LargeStone1
		Pieces: 5, 7
		Range: 0c512, 3c0
        
CSTLGTNS: 
    Inherits: ^MWGate
    WithMakeAnimation:
    WithDeathAnimation:
        DeathSequencePalette: raplayer
    RenderSprites:
        PlayerPalette: raplayer
    Gate:
        Adjacent: 7
        Footprint: xxx
        Dimensions: 3,1
    WithGateSpriteBody:
        WallConnections: -1,0, 3,0
        Type: concrete
        OpenSequence: open
    LineBuildNode:
		Connections: -1,0, 3,0
            Types: concrete
	Valued:
		Cost: 1000
	Tooltip:
		Name: Castle Gate
	Buildable:
		Description: Automated barrier that opens for allied units./nUnarmed
		BuildPaletteOrder: 20
		Prerequisites: anyworkshop
		Queue: MDefenses.GDI, MDefenses.Nod
		BuildDuration: 1540
		BuildDurationModifier: 40
        IconPalette: raicon
	Health:
		HP: 200000
        Shape: Rectangle
            TopLeft: -456,-1436
            BottomRight: 456, 1436
	RevealsShroud:
		Range: 5c0
	BodyOrientation:
		QuantizedFacings: 1
	Power:
		Amount: -4  
    Armor:
		Type: Concrete 
    ThrowsShrapnel@SMALL:
		Weapons: SmallStone1, SmallStone2, LargeStone1
		Pieces: 5, 7
		Range: 0c512, 3c0 
    Selectable:
		Bounds: 28,94,3,-12
	SelectionDecorations:
		VisualBounds: 28,94,3,-12
    Gate:
        Adjacent: 7
        Footprint: x x x
        Dimensions: 1,3
    WithGateSpriteBody:
        WallConnections: 0,-1, 0,3
        Type: concrete
        OpenSequence: open
    LineBuildNode:
		Connections: 0,0, 0,2
            Types: concrete
    WithIdleOverlay:
        Sequence: top
        
        
        
WDWLL:
	Inherits: ^Wall
	Valued:
		Cost: 150
	CustomSellValue:
		Value: 0
	Tooltip:
		Name: Palisades 
	Buildable:
		Description: Woodenwall nothing else
		BuildPaletteOrder: 30
		Queue: MDefenses.GDI, MDefenses.Nod
		BuildDurationModifier: 40
        IconPalette: raicon
	Health:
		HP: 30000
	Armor:
		Type: HeavyBuilding
	Building:
    RenderSprites:
		Palette: ra
        PlayerPalette: raplayer
	LineBuild:
		Range: 11
		NodeTypes: Wood
	LineBuildNode:
		Types: Wood
	WithWallSpriteBody:
		Type: wood
    Crushable:
		CrushClasses: wall
    Building:
        Adjacent: 12