^BaseWorld:
	Locomotor@FOOT:
		Name: foot
		Crushes: mine, crate
		SharesCell: true
		TerrainSpeeds:
			Clear: 100
			Rough: 0
			Road: 60
			Bridge: 111
			Ore: 89
			Gems: 89
			Beach: 50
			Trench: 60
^BaseWorld:
	Locomotor@HEDGE:
		Name: hedge
		Crushes: mine, crate
		SharesCell: true
		TerrainSpeeds:
			Clear: 100
			Rough: 60
			Road: 60
			Bridge: 111
			Ore: 89
			Gems: 89
			Beach: 50
			Trench: 60

World:
	StartingUnits@mcvonly:
		Class: none
		ClassName: options-starting-units.mcv-only
		Factions: allies, england, france, germany, soviet, russia, ukraine
		BaseActor: magetower
	CrateSpawner:
		CheckboxEnabled: False
		CheckboxLocked: True

^Palettes:
	PaletteFromFile@medtemp:
		Name: frostpal
		Filename: frostpal.pal
		ShadowIndex: 4
	PaletteFromFile@sprig:
		Name: spriggan
		Filename: spriggan.pal
		ShadowIndex: 4
	PaletteFromFile@anim:
		Name: anim
		Filename: anim.pal
		ShadowIndex: 4

^Freezable:
	ExternalCondition@frozen:
		Condition: frozen
		TotalCap: 1
	SpeedMultiplier@frozen:
		Modifier: 75
		RequiresCondition: frozen
	ReloadDelayMultiplier@frozen:
		RequiresCondition: frozen
		Modifier: 125
	WithColoredOverlay@frozen:
		RequiresCondition: frozen
		Color: AAF2FF50
	RevealsShroudMultiplier@frozen:
		RequiresCondition: frozen
		Modifier: 75
	ChangesHealth:
		PercentageStep: -2
		Delay: 5
		StartIfBelow: 101
		RequiresCondition: frozen

^Stasis:
	ExternalCondition@stasis:
		Condition: stasis
		TotalCap: 1
	SpeedMultiplier@stasis:
		Modifier: 0
		RequiresCondition: stasis
	WithColoredOverlay@stasis:
		RequiresCondition: stasis
		Color: AAAAAAAA

^Holyaura:
	ExternalCondition@holy:
		Condition: holyaura
		TotalCap: 1
	DamageMultiplier@aura:
		Modifier: 0
		RequiresCondition: holyaura
	WithColoredOverlay@holyaura:
		RequiresCondition: holyaura
		Color: AAAAAAAA
	ChangesHealth@Holyaura:
		Step: 50
		Delay: 5
		StartIfBelow: 101
		RequiresCondition: holyaura

^Deathblastable:
	ExternalCondition@deathblast:
		Condition: deathblast
	ChangesHealth@deathblast:
		Step: -35
		Delay: 1
		StartIfBelow: 101
		RequiresCondition: deathblast

^Deathknightpowerdamage:
	ExternalCondition@deathknightpowerdamage:
		Condition: deathknightpowerdamage
	ChangesHealth@deathknightpowerdamage:
		Step: -200
		Delay: 5
		StartIfBelow: 101
		RequiresCondition: deathknightpowerdamage

^Invisibility:
	ExternalCondition@invisible:
		Condition: invisible
	Cloak:
		InitialDelay: 1
		CloakDelay: 1
		DetectionTypes: Cloak
		RequiresCondition: invisible
		UnCloakOn: attack, damage

^Webable:
	ExternalCondition@web:
		Condition: web
		TotalCap: 1
	SpeedMultiplier@webbed:
		Modifier: 0
		RequiresCondition: web
	ReloadDelayMultiplier@web:
		RequiresCondition: web
		Modifier: 5000
	WithIdleOverlay@web:
		Image: web
		Sequence: idle
		Offset: 0,0,0
		IsPlayerPalette: False
		RequiresCondition: web
	Targetable@WEB:
		TargetTypes: web
		RequiresCondition: !web

^Rootable:
	ExternalCondition@roots:
		Condition: roots
		TotalCap: 1
	SpeedMultiplier@roots:
		Modifier: 0
		RequiresCondition: roots
	WithIdleOverlay@roots:
		Image: roots
		Sequence: idle
		Offset: 0,0,-500
		IsPlayerPalette: False
		RequiresCondition: roots
		Palette: spriggan
	Targetable@roots:
		TargetTypes: Roots
	ChangesHealth@roots:
		Step: -100
		Delay: 5
		StartIfBelow: 101
		RequiresCondition: roots

^MeleeRange:
	ExternalCondition@meleerange:
		Condition: meleerange
	ProximityExternalCondition@melee:
		Condition: meleerange
		Range: 1c0
		ValidRelationships: Enemy

^MagicInfantry:
	Inherits@1: ^ExistsInWorld
	Inherits@4: ^SpriteActor
	Inherits@bounty: ^GlobalBounty
	Inherits@selection: ^SelectableCombatUnit
	Inherits@handicaps: ^PlayerHandicaps
	Inherits@AUTOTARGET: ^AutoTargetAllAssaultMove
	Inherits@deathknightpowerdamage: ^Deathknightpowerdamage
	Inherits@web: ^Webable
	Inherits@roots: ^Rootable
	Inherits@melee: ^MeleeRange
	Inherits@inv: ^Invisibility
	Inherits@holyaura: ^Holyaura
	Passenger:
		CargoType: Infantry
	Huntable:
	OwnerLostAction:
		Action: Kill
		DeathTypes: DefaultDeath
	Armor:
		Type: None
	Mobile:
		Speed: 54
		AlwaysTurnInPlace: true
		Locomotor: foot
	Targetable:
		TargetTypes: GroundActor, Infantry, Disguise
	GrantConditionOnDamageState@DAMAGED:
		Condition: damaged
		ValidDamageStates: Light, Medium, Heavy, Critical
	QuantizeFacingsFromSequence:
		Sequence: stand
	WithDeathAnimation:
		DeathTypes:
			DefaultDeath: 1
			BulletDeath: 2
			SmallExplosionDeath: 3
			ExplosionDeath: 4
			FireDeath: 5
			ElectricityDeath: 6
		CrushedSequence: die-crushed
	AttackMove:
	GainsExperienceMultiplier:
		Modifier: 0
		RequiresCondition: disable-experience
	HiddenUnderFog:
	ActorLostNotification:
		TextNotification: notification-unit-lost
	GpsDot:
		String: Infantry
	Guard:
	Guardable:
	Cloneable:
		Types: Infantry
	HitShape:
		Type: Circle
			Radius: 128
	MapEditorData:
		Categories: Infantry
	Selectable:
		Bounds: 668, 1068
		Class: Infantry
	Valued:
		Cost: 200
	GivesBounty:
		Percentage: 75
	RevealsShroud:
		Range: 5c0
	Tooltip:
		Name: Warrior	
	Armament@PRIMARY:
		Weapon: Wizardfire1
		PauseOnCondition: web
	WithInfantryBody:
		DefaultAttackSequence: attack
	Buildable:
		Queue: Infantry
		BuildAtProductionType: Soldier
		BuildPaletteOrder: 10
		Description: Warrior
		Prerequisites: magetower
		BuildDurationModifier: 40
	Voiced:
		VoiceSet: Cavevoice
		Volume: 1
	WithDeathAnimation:
		DeathSequence: die
		UseDeathTypeSuffix: False
		FallbackSequence: die
	Health:
		HP: 4000
	AttackFrontal:
		FacingTolerance: 0
	DeathSounds:
		VolumeMultiplier: 2
	MustBeDestroyed:
		RequiredForShortGame: false
	AutoTarget:
		InitialStance: AttackAnything
		InitialStanceAI: AttackAnything

^LICHDRAIN:
	ExternalCondition@drain:
		Condition: lichdrain
	ChangesHealth@LICHDRAIN:
		Step: -100
		Delay: 3
		RequiresCondition: lichdrain
		StartIfBelow: 101

^ANGELHEAL:
	ExternalCondition@angelheal:
		Condition: angelheal
	ChangesHealth@angelheal:
		Step: 100
		Delay: 3
		RequiresCondition: angelheal
		StartIfBelow: 100

BATTLEMAGE:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	Inherits@stasis: ^Stasis
	Buildable:
		Prerequisites: ~whitemagic, ~building, ~tier1built
		Description: Melee unit. Speed and slight defense boost (Deploy) when upgraded.
	Selectable:
		Class: battlemage
	Armament@PRIMARY:
		Weapon: Axe
	Valued:
		Cost: 500
	Mobile:
		Speed: 80
	Health:
		HP: 6000
	AutoTarget:
		MinimumScanTimeInterval	: 1
		MaximumScanTimeInterval: 3
		ScanRadius: 5
		InitialStance: AttackAnything
		InitialStanceAI: AttackAnything
	WithIdleOverlay@bmdisc:
		Image: bmdisc
		Sequence: idle
		Offset: 0,0,-500
		IsPlayerPalette: True
	SpawnActorOnDeath:
		Actor: battlemagecorpsetemp
		OwnerType: Victim
	Tooltip:
		Name: Battlemage
	Contrail:
		Offset: 0,0,0
		ZOffset: -800
		StartColorAlpha: 128
		StartWidth: 0c384
		EndWidth: 0c144
		TrailLength: 35
		RequiresCondition: battlemagepower
	ExternalCondition@upgrade:
		Condition: battlemageupgrade
	GrantChargedConditionOnToggle:
		ActivatedCondition: battlemagepower
		ConditionDuration: 300
		ChargeDuration: 1000
		RequiresCondition: battlemageupgrade
		ActivationSounds: magic1.aud
	WithColoredOverlay@battlemagepower:
		RequiresCondition: battlemagepower
	SpeedMultiplier:
		Modifier: 140
		RequiresCondition: battlemagepower
	DamageMultiplier:
		Modifier: 80
		RequiresCondition: battlemagepower
	Voiced:
		VoiceSet: Battlemagevoice
		Volume: 2

BATTLEMAGERES:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	Selectable:
		Class: battlemage
	Armament@PRIMARY:
		Weapon: Axe
	Mobile:
		Speed: 80
	Health:
		HP: 3000
	AutoTarget:
		MinimumScanTimeInterval	: 1
		MaximumScanTimeInterval: 3
		ScanRadius: 5
		InitialStance: AttackAnything
		InitialStanceAI: AttackAnything
	WithIdleOverlay@bmdisc:
		Image: bmdisc
		Sequence: idle
		Offset: 0,0,-500
		IsPlayerPalette: True
	KillsSelf:
		PauseOnCondition: resurrect
		Delay: 500
	RenderSprites:
		Image: Battlemage
	-Buildable:
	Tooltip:
		Name: Battlemage
	Voiced:
		VoiceSet: Battlemagevoice
		Volume: 2

DEATHKNIGHT:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	Inherits@stasis: ^Stasis
	Buildable:
		Prerequisites: ~blackmagic, ~building, ~tier1built
		BuildPaletteOrder: 2
		Description: Strong and fast melee unit
	Selectable:
		Bounds: 1168, 1168
		Class: Deathknight
	Armament@PRIMARY:
		Weapon: Sword
	Mobile:
		Speed: 100
	Health:
		HP: 9000
	Valued:
		Cost: 700
	AutoTarget:
		MinimumScanTimeInterval	: 1
		MaximumScanTimeInterval: 3
		ScanRadius: 5
		InitialStance: AttackAnything
		InitialStanceAI: AttackAnything
	SpawnActorOnDeath:
		Actor: deathknightcorpsetemp
		OwnerType: Victim
	Tooltip:
		Name: Deathknight
	GrantChargedConditionOnToggle:
		ActivatedCondition: deathknightpower
		ConditionDuration: 300
		ChargeDuration: 1000
		RequiresCondition: deathknightupgrade
		ActivationSounds: magic7.aud
	WithIdleOverlay@cloud:
		Image: deathknightcloud
		Sequence: idle
		Offset: 0,0,-200
		IsPlayerPalette: False
		RequiresCondition: deathknightpower
	ExternalCondition@upgrade:
		Condition: deathknightupgrade
	ProximityExternalCondition@res:
		Condition: deathknightpowerdamage
		Range: 2c0
		ValidRelationships: Enemy
		RequiresCondition: deathknightpower
	Voiced:
		VoiceSet: Deathknightvoice
		Volume: 2


DEATHKNIGHTRES:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	Selectable:
		Bounds: 1168, 1168
		Class: Deathknight
	Armament@PRIMARY:
		Weapon: Axe
	Mobile:
		Speed: 100
	Health:
		HP: 4500
	AutoTarget:
		MinimumScanTimeInterval	: 1
		MaximumScanTimeInterval: 3
		ScanRadius: 5
		InitialStance: AttackAnything
		InitialStanceAI: AttackAnything
	KillsSelf:
		PauseOnCondition: resurrect
		Delay: 500
	RenderSprites:
		Image: Deathknight
	-Buildable:
	Valued:
		Cost: 800
	Tooltip:
		Name: Deathknight
	Voiced:
		VoiceSet: Deathknightvoice
		Volume: 2

WIZARD:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	Inherits@stasis: ^Stasis
	Buildable:
		Prerequisites: ~whitemagic, ~building
		BuildPaletteOrder: 1
		Description: Ranged unit that can teleport (Force Move) with upgrade
	Selectable:
		Class: Wizard
	PortableChrono:
		RequiresCondition: wizardupgrade
	SpawnActorOnDeath:
		Actor: wizardcorpsetemp
		OwnerType: Victim
	Voiced:
		VoiceSet: Wizardvoice
		Volume: 2
	Tooltip:
		Name: Wizard
	ExternalCondition@upgrade:
		Condition: wizardupgrade
	DamageMultiplier@upgrade:
		Modifier: 75
		RequiresCondition: wizardupgrade
	-Armament@PRIMARY:
	Armament@PRIMARY:
		Weapon: Wizardfire1
		PauseOnCondition: wizardupgrade || stasis
	Armament@SECONDARY:
		Weapon: Wizardfire2
		RequiresCondition: wizardupgrade
		PauseOnCondition: stasis
	Parachutable:
		FallRate: 800

HEDGEMAGE:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	Inherits@stasis: ^Stasis
	Buildable:
		Prerequisites: ~greenmagic, ~building
		BuildPaletteOrder: 1
		Description: Ranged unit that can build hedges (Deploy)
	Selectable:
		Class: Hedgemage
	SpawnActorOnDeath:
		Actor: hedgemagecorpsetemp
		OwnerType: Victim
	Voiced:
		VoiceSet: Wizardvoice
		Volume: 2
	Tooltip:
		Name: Hedgemage
	-Armament@PRIMARY:
	Armament@PRIMARY:
		Weapon: HedgeLightning
		PauseOnCondition: stasis || hedgemageupgrade
	Armament@SECONDARY:
		Weapon: HedgeLightning2
		PauseOnCondition: stasis
	Parachutable:
		FallRate: 800
	Mobile:
		Speed: 70
		AlwaysTurnInPlace: true
		Locomotor: hedge
	Minelayer:
		Mine: sbag1
		TileUnknownName: build-valid
		TerrainTypes: Clear, Road, Beach, Ore, Gems, Rough, Bridge
		PauseOnCondition: !edgemageupgrade
	AmmoPool:
		Ammo: 4
		AmmoCondition: ammo
		Armaments: hedgeammo
	ReloadAmmoPool:
		Delay: 400
	WithAmmoPipsDecoration:
		Position: BottomLeft
		Margin: 4, 3
		RequiresSelection: true
	Valued:
		Cost: 300
	Health:
		HP: 5000
	ExternalCondition@upgrade:
		Condition: hedgemageupgrade
	DamageMultiplier@upgrade:
		Modifier: 75
		RequiresCondition: hedgemageupgrade
	GrantConditionOnTerrain:
		TerrainTypes: Rough
		Condition: inhedge
	GrantCondition:
		Condition: hedgeheal
		RequiresCondition: inhedge && hedgemageupgrade
	ChangesHealth@hedge:
		Step: 250
		Delay: 5
		StartIfBelow: 101
		PauseOnCondition: !hedgemageupgrade
		RequiresCondition: hedgeheal

WIZARDRES:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@5: ^AutoTargetAir
	Inherits@7: ^AutoTargetGround
	Inherits@6: ^Deathblastable
	Selectable:
		Class: Wizard
	PortableChrono:
	KillsSelf:
		PauseOnCondition: resurrect
		Delay: 500
	RenderSprites:
		Image: Wizard
	-Buildable:
	Health:
		HP: 2000
	Tooltip:
		Name: Wizard

HEDGEMAGERES:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	Inherits@stasis: ^Stasis
	Selectable:
		Class: Hedgemage
	Voiced:
		VoiceSet: Wizardvoice
		Volume: 2
	Tooltip:
		Name: Hedgemage
	-Armament@PRIMARY:
	Armament@PRIMARY:
		Weapon: HedgeLightning
		PauseOnCondition: stasis
	Parachutable:
		FallRate: 800
	Mobile:
		Speed: 70
		AlwaysTurnInPlace: true
		Locomotor: hedge
	KillsSelf:
		PauseOnCondition: resurrect
		Delay: 500
	RenderSprites:
		Image: Hedgemage
	-Buildable:
	Health:
		HP: 2500
	Tooltip:
		Name: Hedgemage

YETI:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	Inherits@stasis: ^Stasis
	Buildable:
		Queue: Vehicles
		Prerequisites: ~tier3built
		BuildPaletteOrder: 100
		Description: Secret unit. Shhh! Don't tell anyone...
		BuildLimit: 1
	Selectable:
		Class: Yeti
	Tooltip:
		Name: Yeti
	Armament@PRIMARY:
		Weapon: Heal
		Cursor: heal
		OutsideRangeCursor: heal

SPIRIT:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	Inherits@stasis: ^Stasis
	Buildable:
		Queue: Infantry
		Prerequisites: ~building
		BuildPaletteOrder: 1
		Description: Cloaked scout. Detects cloaked units. Infiltrates buildings for power outage. Places Stasis Mine (kills the unit).
	Selectable:
		Class: Spirit
	Tooltip:
		Name: Spirit
	-Armament@PRIMARY:
	Cloak:
		InitialDelay: 0
		CloakDelay: 0
		DetectionTypes: Cloak
		IsPlayerPalette: true
		PauseOnCondition: cloak-force-disabled
	DetectCloaked:
		DetectionTypes: Cloak, Mine
		Range: 5c0		
	WithIdleOverlay@spirit:
		Image: magiccirclelich
		Sequence: idle
		Offset: 0,0,-500
		IsPlayerPalette: True
	Infiltrates:
		Types: SpyInfiltrate
	Health:
		HP: 1000
	Minelayer:
		Mine: MagicMine
		TileUnknownName: build-valid
		TerrainTypes: Clear, Road, Beach, Ore, Gems, Rough, Bridge
	MineImmune:
	AmmoPool:
		Ammo: 1
		AmmoCondition: ammo
	RenderDetectionCircle:
	WithAmmoPipsDecoration:
		Position: BottomLeft
		Margin: 4, 3
		RequiresSelection: true
	KillsSelf:
		RequiresCondition: !ammo

MagicMine:
	Inherits: ^SpriteActor
	Interactable:
		Bounds: 1024, 1024
	WithSpriteBody:
	HiddenUnderFog:
	Mine:
		CrushClasses: mine
		DetonateClasses: mine
		AvoidFriendly: false
		BlockFriendly: false
	Health:
		HP: 5000
		NotifyAppliedDamage: false
	Armor:
		Type: Light
	Cloak:
		CloakSound:
		UncloakSound:
		CloakStyle: None
		DetectionTypes: Mine
		InitialDelay: 0
	Tooltip:
		Name: Stasis Trap
	Targetable:
		TargetTypes: GroundActor, Mine
	Immobile:
		OccupiesSpace: true
	MapEditorData:
		Categories: System
	RenderSprites:
		Image: magicmine
	FireWarheadsOnDeath:
		Weapon: magicmine
	HitShape:
		TargetableOffsets: 1273,939,0, -980,-640,0, -980,640,0
		Type: Rectangle
			TopLeft: -1536, -1536
			BottomRight: 1536, 1536

Spideregg:
	Inherits: ^SpriteActor
	Selectable:
		Priority: 10
		PriorityModifiers: Ctrl
	WithSpriteBody:
	HiddenUnderFog:
	Mine:
		CrushClasses: mine
		DetonateClasses: mine
		AvoidFriendly: false
		BlockFriendly: false
	Health:
		HP: 5000
		NotifyAppliedDamage: false
	Armor:
		Type: Light
	Cloak:
		CloakSound:
		UncloakSound:
		CloakStyle: None
		DetectionTypes: Mine
		InitialDelay: 0
	Tooltip:
		Name: Spider Egg
	Targetable:
		TargetTypes: GroundActor, Mine
	Immobile:
		OccupiesSpace: true
	MapEditorData:
		Categories: System
	RenderSprites:
		Image: spideregg
	HitShape:
		TargetableOffsets: 1273,939,0, -980,-640,0, -980,640,0
		Type: Rectangle
			TopLeft: -1536, -1536
			BottomRight: 1536, 1536
	SpawnActorOnDeath:
		Actor: Spiderbaby
	KillsSelf:
		RequiresCondition: hatch
	GrantConditionOnDeploy:
		DeployedCondition: hatch
	SelectionDecorations:
	RevealsShroud:
		Range: 3c0
	Cloak:
		CloakSound:
		UncloakSound:
		CloakStyle: None
		DetectionTypes: Mine
		InitialDelay: 0
	WithDeathAnimation:
		DeathSequence: die
		UseDeathTypeSuffix: False
		FallbackSequence: die

WITCH:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@5: ^AutoTargetAir
	Inherits@6: ^Deathblastable
	Inherits@stasis: ^Stasis
	Buildable:
		Prerequisites: ~blackmagic, ~building
		BuildPaletteOrder: 1
		Description: Ranged unit that can take flight (Deploy)
	Selectable:
		Class: Witch
	Transforms:
		IntoActor: witchbr
		Offset: 0,0
		Facing: 250
		RequiresCondition: witchupgrade
		TransformSounds: witchbroom.aud
	SpawnActorOnDeath:
		Actor: witchcorpsetemp
		OwnerType: Victim
	Voiced:
		VoiceSet: Witchvoice
		Volume: 2
	Tooltip:
		Name: Witch
	ExternalCondition@upgrade:
		Condition: witchupgrade
	-Armament@PRIMARY:
	Armament@PRIMARY:
		Weapon: Witchball
		RequiresCondition: !witchupgrade
	Armament@SECONDARY:
		Weapon: Witchball2
		RequiresCondition: witchupgrade
		PauseOnCondition: web
	DamageMultiplier@upgrade:
		Modifier: 75
		RequiresCondition: witchupgrade

WITCHRES:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@5: ^AutoTargetAir
	Inherits@6: ^Deathblastable
	Selectable:
		Class: Witch
	Armament@PRIMARY:
		Weapon: Witchball
	KillsSelf:
		PauseOnCondition: resurrect
		Delay: 500
	RenderSprites:
		Image: Witch
	-Buildable:
	Health:
		HP: 2000
	Tooltip:
		Name: Witch

WITCHBR:
	Inherits@1: ^ExistsInWorld
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@5: ^SpriteActor
	Inherits@bounty: ^GlobalBounty
	Inherits@selection: ^SelectableCombatUnit
	Inherits@handicaps: ^PlayerHandicaps
	Inherits@6: ^Deathblastable
	Inherits@web: ^Webable
	Inherits@inv: ^Invisibility
	Inherits@holyaura: ^Holyaura
	Selectable:
		Class: Witchbroom
	OwnerLostAction:
		Action: Kill
	Armor:
		Type: Light
	UpdatesPlayerStatistics:
	AppearsOnRadar:
		UseLocation: true
	Selectable:
		Bounds: 768, 853, 0, -256
		DecorationBounds: 512, 768, 0, -341
	Targetable@GROUND:
		RequiresCondition: !airborne
		TargetTypes: GroundActor, Vehicle
	Targetable@AIRBORNE:
		RequiresCondition: airborne
		TargetTypes: AirborneActor
	Targetable@REPAIR:
		RequiresCondition: !airborne && damaged
		TargetTypes: Repair
	GrantConditionOnDamageState@DAMAGED:
		Condition: damaged
		ValidDamageStates: Light, Medium, Heavy, Critical
	HiddenUnderFog:
		Type: GroundPosition
	Guardable:
	ActorLostNotification:
		Notification: AirUnitLost
		TextNotification: notification-airborne-unit-lost
	ProximityCaptor:
		Types: Plane
	GpsDot:
		String: Plane
	Tooltip:
		GenericName: meta-neutralplane-generic-name
	WithShadow:
		Offset: 43, 128, 0
		ZOffset: -129
	WithFacingSpriteBody:
	MustBeDestroyed:
		RequiredForShortGame: false
	Voiced:
		VoiceSet: GenericVoice
	HitShape:
	MapEditorData:
		Categories: Aircraft
	CaptureManager:
	Capturable:
		Types: aircraft
		RequiresCondition: !airborne
	CaptureNotification:
		Notification: UnitStolen
		TextNotification: notification-unit-stolen
		LoseNotification: UnitLost
		LoseTextNotification: notification-unit-lost
	Aircraft:
		CanHover: True
		CruisingCondition: cruising
		WaitDistanceFromResupplyBase: 4c0
		TakeOffOnResupply: true
		TakeOffOnCreation: true
		VTOL: true
		LandableTerrainTypes: Clear, Rough, Road, Ore, Beach, Gems
		Crushes: crate, mine, infantry
		CanSlide: True
		AirborneCondition: airborne
		TurnSpeed: 100
		Speed: 128
		AltitudeVelocity: 0c58
		CruiseAltitude: 1c0
		IdealSeparation: 1c5
	GpsDot:
		String: Helicopter
	Hovers@CRUISING:
		RequiresCondition: cruising
	BodyOrientation:
	Huntable:
	Valued:
		Cost: 900
	Tooltip:
		Name: actor-tran.name
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	Health:
		HP: 4000
	RevealsShroud:
		MinRange: 6c0
		Range: 8c0
		Type: GroundPosition
		RevealGeneratedShroud: False
	RevealsShroud@GAPGEN:
		Range: 6c0
		Type: GroundPosition
	Transforms:
		IntoActor: witch
		Offset: 0,0
		Facing: 384
	Tooltip:
		Name: Witch
	Voiced:
		VoiceSet: Witchvoice
		Volume: 2

DRAGON:
	Inherits: ^Plane
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@6: ^Deathblastable
	Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
	Inherits@web: ^Webable
	Inherits@inv: ^Invisibility
	Inherits@holyaura: ^Holyaura
	Buildable:
		Queue: Aircraft
		Prerequisites: ~blackmagic, ~building, ~tier3built
		Description: Ice breathing dragon. Can only attack ground.
		BuildPaletteOrder: 5
		BuildDurationModifier: 40
		BuildLimit: 3
	Valued:
		Cost: 3000
	Tooltip:
		Name: Ice Dragon
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	Health:
		HP: 25000
	RevealsShroud:
		MinRange: 9c0
		Range: 11c0
		Type: GroundPosition
		RevealGeneratedShroud: False
	RevealsShroud@GAPGEN:
		Range: 9c0
		Type: GroundPosition
	Armament@PRIMARY:
		Name: primary
		Weapon: Marozzer
		PauseOnCondition: !ammo
	AttackAircraft@primary:
		AttackType: Strafe
		StrafeRunLength: 9c128
		FacingTolerance: 160
		PersistentTargeting: false
		OpportunityFire: True
		AbortOnResupply: false
		Armaments: primary
	Aircraft:
		CruiseAltitude: 2560
		TurnSpeed: 8
		Speed: 178
		RepulsionSpeed: 40
		MaximumPitch: 60
	AutoTarget:
		InitialStance: AttackAnything
		InitialStanceAI: AttackAnything
	AmmoPool:
		Ammo: 30
		ReloadDelay: 1
		AmmoCondition: ammo
	-SpawnActorOnDeath:
	Selectable:
		Bounds: 1780, 1394, 0, 85
		Class: Dragon
	WithAmmoPipsDecoration:
		Position: BottomLeft
		Margin: 4, 3
		RequiresSelection: true
		PipCount: 6
	ReloadAmmoPool:
		Delay: 25
	WithDeathAnimation:
		DeathSequence: die
		UseDeathTypeSuffix: False
		FallbackSequence: die
	Voiced:
		VoiceSet: Dragonvoice
		Volume: 2
	DeathSounds:
		VolumeMultiplier: 2
	VoiceAnnouncement:
		Voice: Action
		ValidRelationships: Ally
	MustBeDestroyed:
		RequiredForShortGame: false
	-EjectOnDeath:
	-GainsExperience:


PHOENIX:
	Inherits: ^Plane
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@6: ^Deathblastable
	Inherits@AUTOTARGET: ^AutoTargetAll
	Inherits@web: ^Webable
	Inherits@inv: ^Invisibility
	Inherits@holyaura: ^Holyaura
	Buildable:
		Queue: Aircraft
		BuildPaletteOrder: 5
		Prerequisites: ~whitemagic, ~building, ~tier3built
		Description: Fire breathing bird
		BuildDurationModifier: 40
		BuildLimit: 3
	Valued:
		Cost: 2500
	Tooltip:
		Name: Phoenix
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	Health:
		HP: 20000
	RevealsShroud:
		MinRange: 9c0
		Range: 11c0
		Type: GroundPosition
		RevealGeneratedShroud: False
	RevealsShroud@GAPGEN:
		Range: 9c0
		Type: GroundPosition
	Armament:
		Weapon: Phoenixball
	AttackAircraft:
		FacingTolerance: 60
	Aircraft:
		CanHover: True
		CruisingCondition: cruising
		WaitDistanceFromResupplyBase: 4c0
		TakeOffOnResupply: true
		TakeOffOnCreation: true
		VTOL: false
		LandableTerrainTypes: Clear, Rough, Road, Ore, Beach, Gems
		Crushes: crate, mine, infantry
		CanSlide: false
		AirborneCondition: airborne
		TurnSpeed: 25
		Speed: 128
		AltitudeVelocity: 0c58
		CruiseAltitude: 2560
		IdealSeparation: 1c5
		MaximumPitch: 60
	AutoTarget:
		InitialStance: AttackAnything
		InitialStanceAI: AttackAnything
	-SpawnActorOnDeath:
	-EjectOnDeath:
	Selectable:
		Bounds: 1780, 1394, 0, 85
		Class: Phoenix
	-WithFacingSpriteBody:
	WithInfantryBody:
	Hovers@CRUISING:
		RequiresCondition: cruising
	-FireWarheadsOnDeath:
	-Targetable@REPAIR:
	WithDeathAnimation:
		DeathSequence: die
		UseDeathTypeSuffix: False
		FallbackSequence: die
	Voiced:
		VoiceSet: Phoenixvoice
		Volume: 2
	DeathSounds:
		VolumeMultiplier: 2
	VoiceAnnouncement:
		Voice: Action
		ValidRelationships: Ally
	MustBeDestroyed:
		RequiredForShortGame: false
	-GainsExperience:

FAMILIAR:
	Inherits: ^Plane
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	Inherits@web: ^Webable
	Inherits@inv: ^Invisibility
	Inherits@holyaura: ^Holyaura
	Buildable:
		Queue: Aircraft
		BuildPaletteOrder: 2
		Prerequisites: ~whitemagic, ~building
		Description: Scout unit. Cannot attack
		BuildDurationModifier: 40
	Valued:
		Cost: 100
	Tooltip:
		Name: Familiar
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	Health:
		HP: 1000
	RevealsShroud:
		MinRange: 9c0
		Range: 11c0
		Type: GroundPosition
		RevealGeneratedShroud: False
	RevealsShroud@GAPGEN:
		Range: 9c0
		Type: GroundPosition
	Aircraft:
		CanHover: false
		CruisingCondition: cruising
		WaitDistanceFromResupplyBase: 4c0
		TakeOffOnResupply: true
		TakeOffOnCreation: true
		VTOL: false
		LandableTerrainTypes: Clear, Rough, Road, Ore, Beach, Gems
		Crushes: crate, mine, infantry
		CanSlide: false
		AirborneCondition: airborne
		TurnSpeed: 12
		Speed: 128
		AltitudeVelocity: 0c58
		CruiseAltitude: 2560
		IdealSeparation: 1c5
		MaximumPitch: 60
	-SpawnActorOnDeath:
	Selectable:
		Bounds: 500, 500, 0, 0
		Class: Familiar
	-WithFacingSpriteBody:
	WithInfantryBody:
	Voiced:
		VoiceSet: Familiarvoice
		Volume: 2
	MustBeDestroyed:
		RequiredForShortGame: false
	-EjectOnDeath:
	WithDeathAnimation:
		DeathSequence: die
		UseDeathTypeSuffix: False
		FallbackSequence: die
	-GainsExperience:

HARPY:
	Inherits: ^Plane
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	Inherits@web: ^Webable
	Inherits@CARGOPIPS: ^CargoPips
	Inherits@AUTOTARGET: ^AutoTargetAllAssaultMove
	Inherits@inv: ^Invisibility
	Inherits@holyaura: ^Holyaura
	Buildable:
		Queue: Aircraft
		BuildPaletteOrder: 2
		Prerequisites: ~redmagic, ~building
		Description: Scout unit. Cannot attack
		BuildDurationModifier: 40
		RequiresCondition: cantbuild
	Valued:
		Cost: 100
	Tooltip:
		Name: Familiar
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	Health:
		HP: 6000
	RevealsShroud:
		MinRange: 9c0
		Range: 11c0
		Type: GroundPosition
		RevealGeneratedShroud: False
	RevealsShroud@GAPGEN:
		Range: 9c0
		Type: GroundPosition
	Aircraft:
		CanHover: true
		CruisingCondition: cruising
		WaitDistanceFromResupplyBase: 4c0
		TakeOffOnResupply: true
		TakeOffOnCreation: true
		VTOL: true
		LandableTerrainTypes: Clear, Rough, Road, Ore, Beach, Gems
		Crushes: crate, mine, infantry
		CanSlide: false
		AirborneCondition: airborne
		TurnSpeed: 25
		Speed: 200
		AltitudeVelocity: 0c58
		CruiseAltitude: 800
		IdealSeparation: 1c5
		MaximumPitch: 60
	-SpawnActorOnDeath:
	Hovers@CRUISING:
		RequiresCondition: cruising
	Armament@PRIMARY:
		Weapon: Harpyclaw
	AttackAircraft:
	Selectable:
		Bounds: 1500, 1500, 0, 0
		Class: Familiar
	-WithFacingSpriteBody:
	WithInfantryBody@flying:
		RequiresCondition: airborne
	WithInfantryBody@landed:
		IdleSequences: landed
		StandSequences: landed
		RequiresCondition: !airborne
	Voiced:
		VoiceSet: Familiarvoice
		Volume: 2
	MustBeDestroyed:
		RequiredForShortGame: false
	-EjectOnDeath:
	WithDeathAnimation:
		DeathSequence: die
		UseDeathTypeSuffix: False
		FallbackSequence: die
	Cargo:
		Types: Infantry
		MaxWeight: 8
		AfterUnloadDelay: 40
	-GainsExperience:

ALTAR:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	Inherits@stasis: ^Stasis
	Buildable:
		Queue: Vehicle
		Prerequisites: ~whitemagic, ~building, ~tier2built
		BuildPaletteOrder: 4
		Description: Magic artillery unit
	Selectable:
		Bounds: 1168, 2168, 0, 1000
		Class: Altar
	Armament@PRIMARY:
		Weapon: Lightningball
	Valued:
		Cost: 1000
	Health:
		HP: 6000
	Tooltip:
		Name: Elemental
	Voiced:
		VoiceSet: Altarvoice
		Volume: 2

TREANT:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	Inherits@stasis: ^Stasis
	Buildable:
		Queue: Vehicle
		Prerequisites: ~greenmagic, ~building, ~tier2built
		BuildPaletteOrder: 4
		Description: Throws large boulders or punches when in melee range.
	Selectable:
		Bounds: 1168, 2168, 0, 1000
		Class: Treant
	Armament@PRIMARY:
		Name: primary
		Weapon: Boulder
		PauseOnCondition: meleerange
	Armament@SECONDARY:
		Name: secondary
		Weapon: Axe
		PauseOnCondition: !meleerange
	GrantConditionOnAttack:
		Condition: cooldown
		ArmamentNames: primary
		RevokeDelay: 20
	Valued:
		Cost: 1250
	Health:
		HP: 10000
	Tooltip:
		Name: Elemental
	Voiced:
		VoiceSet: Treantvoice
		Volume: 2

TREANTPOWER:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	Inherits@stasis: ^Stasis
	Selectable:
		Bounds: 1168, 2168, 0, 1000
		Class: Treant
	Armament@PRIMARY:
		Name: primary
		Weapon: Boulder
		PauseOnCondition: meleerange
	Armament@SECONDARY:
		Name: secondary
		Weapon: Axe
		PauseOnCondition: !meleerange
	GrantConditionOnAttack:
		Condition: cooldown
		ArmamentNames: primary
		RevokeDelay: 20
	Valued:
		Cost: 1250
	Health:
		HP: 10000
	Tooltip:
		Name: Elemental
	Voiced:
		VoiceSet: Treantvoice
		Volume: 2
	KillsSelf:
		Delay: 300
	Parachutable:
		FallRate: 800

SPIDER:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	Inherits@stasis: ^Stasis
	AutoTarget:
		MinimumScanTimeInterval	: 1
		MaximumScanTimeInterval: 3
		ScanRadius: 5
		InitialStance: AttackAnything
		InitialStanceAI: AttackAnything
	Buildable:
		Queue: Infantry
		Prerequisites: ~greenmagic, ~building, ~tier1built
		BuildPaletteOrder: 4
		Description: Lays spider eggs (Deploy). Shoots webs when upgraded.
	Selectable:
		Bounds: 1568, 1768, 0, 0
		Class: Spider
	Armament@PRIMARY:
		Name: primary
		Weapon: Webball
		PauseOnCondition: cooldown
		RequiresCondition: spiderupgrade
	Armament@SECONDARY:
		Name: secondary
		Weapon: axe
		PauseOnCondition: !cooldown
		RequiresCondition: cooldown
	GrantConditionOnAttack:
		Condition: cooldown
		ArmamentNames: primary
		RevokeDelay: 30
	Valued:
		Cost: 1000
	Health:
		HP: 14000
	Tooltip:
		Name: Giant Spider
	Minelayer:
		Mine: spideregg
		TileUnknownName: build-valid
		TerrainTypes: Clear, Road, Beach, Ore, Gems, Rough, Bridge
		PauseOnCondition: !ammo 
	MineImmune:
	AmmoPool:
		Ammo: 3
		AmmoCondition: ammo
		Armaments: 
	WithAmmoPipsDecoration:
		Position: BottomLeft
		Margin: 4, 3
		RequiresSelection: true
	Mobile:
		Speed: 80
	SpawnActorOnDeath:
		Actor: spidercorpsetemp
		OwnerType: Victim
	ExternalCondition@upgrade:
		Condition: spiderupgrade
	Voiced:
		VoiceSet: Cavevoice
		Volume: 2
	HitShape:
		TargetableOffsets: 1568, 1768, 0
		UseTargetableCellsOffsets: True

SPIDERRES:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	Inherits@stasis: ^Stasis
	AutoTarget:
		MinimumScanTimeInterval	: 1
		MaximumScanTimeInterval: 3
		ScanRadius: 5
		InitialStance: AttackAnything
		InitialStanceAI: AttackAnything
	-Buildable:
	Selectable:
		Bounds: 1168, 2168, 0, 1000
		Class: Spider
	Armament@PRIMARY:
		Name: primary
		Weapon: Webball
		PauseOnCondition: cooldown
	Armament@SECONDARY:
		Name: secondary
		Weapon: axe
		PauseOnCondition: !cooldown
		RequiresCondition: cooldown
	GrantConditionOnAttack:
		Condition: cooldown
		ArmamentNames: primary
		RevokeDelay: 30
	Valued:
		Cost: 1000
	Health:
		HP: 14000
	Tooltip:
		Name: Giant Spider
	Mobile:
		Speed: 80
	KillsSelf:
		PauseOnCondition: resurrect
		Delay: 500
	RenderSprites:
		Image: Spider

SPIDERBABY:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	Inherits@stasis: ^Stasis
	-Buildable:
	Selectable:
		Class: Spiderbaby
	Armament@PRIMARY:
		Weapon: Axe
	Valued:
		Cost: 1000
	Health:
		HP: 1000
	Tooltip:
		Name: Spider Baby
	Mobile:
		Speed: 100
	AutoTarget:
		MinimumScanTimeInterval	: 1
		MaximumScanTimeInterval: 3
		ScanRadius: 5
		InitialStance: AttackAnything
		InitialStanceAI: AttackAnything

BASILISK:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	Inherits@stasis: ^Stasis
	Buildable:
		Queue: Vehicle
		Prerequisites: ~greenmagic, ~building, ~tier3built
		BuildPaletteOrder: 4
		Description: Magic artillery unit
		BuildLimit: 1
	Selectable:
		Bounds: 2568, 2568, 0, 0
		Class: Basilisk
	Armament@PRIMARY:
		Weapon: Deathstare
		LocalOffset: 0,0,800
	Valued:
		Cost: 4000
	Health:
		HP: 30000
	Tooltip:
		Name: Basilisk
	Voiced:
		VoiceSet: Cavevoice
		Volume: 2

MORTAR:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	Inherits@stasis: ^Stasis
	Buildable:
		Queue: Vehicle
		Prerequisites: ~blackmagic, ~building, ~tier2built
		BuildPaletteOrder: 3
		Description: Magic artillery unit
	Selectable:
		Bounds: 1568, 1568
		Class: Mortar
	Armament@PRIMARY:
		Weapon: Mortarball
	Valued:
		Cost: 1000
	Health:
		HP: 6000
	Tooltip:
		Name: Arcane Mortar
	Voiced:
		VoiceSet: Mortarvoice
		Volume: 2

LICH:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	Inherits@stasis: ^Stasis
	Buildable:
		Queue: Infantry
		Prerequisites: ~blackmagic, ~building, ~tier3built
		BuildPaletteOrder: 40
		BuildLimit: 1
		Description: Revives corpses in range. Power damages enemies in range (Deploy)
	Selectable:
		Bounds: 1068, 2568,
		Class: Lich
	WithIdleOverlay@cloud:
		Image: magiccloud
		Sequence: idle
		Offset: 0,0,0
		IsPlayerPalette: True
		RequiresCondition: lichpower
	WithIdleOverlay@bmdisc:
		Image: magiccirclelich
		Sequence: idle
		Offset: 0,0,-1500
		IsPlayerPalette: True
	WithShadow:
		Offset: 43, 428, 0
		ZOffset: -1129
	Armament@PRIMARY:
		Weapon: Resurrectball
		TargetRelationships: Ally, Enemy
	Armament@SECONDARY:
		Weapon: Lichball
		TargetRelationships: Enemy
	GrantChargedConditionOnToggle:
		ActivatedCondition: lichpower
		ConditionDuration: 500
		ChargeDuration: 1000
		ActivationSounds: magic6.aud
	ProximityExternalCondition@res:
		Condition: resurrect
		Range: 8c0
		ValidRelationships: Ally, Enemy
	ProximityExternalCondition@lichdrain:
		Condition: lichdrain
		Range: 6c0
		ValidRelationships: Enemy
	AutoTargetPriority@lichpower:
		ValidTargets: Corpse, Ground, GroundActor
		ValidRelationships: Enemy
	Health:
		HP: 12000
	RevealsShroud:
		Range: 8c0
	Valued:
		Cost: 4000
	Tooltip:
		Name: Lich
	Voiced:
		VoiceSet: Lichvoice
		Volume: 2
	VoiceAnnouncement:
		Voice: Action
		ValidRelationships: Ally

ANGEL:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	Inherits@stasis: ^Stasis
	Buildable:
		Queue: Infantry
		Prerequisites: ~whitemagic, ~building, ~tier3built
		BuildLimit: 1
		Description: Power heals allies and deflects magical attacks in range (Deploy)
	Selectable:
		Bounds: 1068, 2568
		Class: 
	WithIdleOverlay@bmdisc:
		Image: magiccirclebig
		Sequence: idle
		Offset: 0,0,-1500	
		IsPlayerPalette: True
	WithShadow:
		Offset: 43, 428, 0
		ZOffset: -1129
	WithIdleOverlay@magicshield:
		Image: magicshield
		Sequence: idle
		Offset: 0,0,-1000
		IsPlayerPalette: True
		RequiresCondition: angelpower
	GrantChargedConditionOnToggle:
		ActivatedCondition: angelpower
		ConditionDuration: 500
		ChargeDuration: 1000
		ActivationSounds: magic3.aud
	JamsMissiles:
		Range: 7c0
		DeflectionRelationships: Enemy
		Chance: 90
		RequiresCondition: angelpower
	Armament@PRIMARY:
		Weapon: Angelbeam
		LocalOffset: 0,0,800
		LocalYaw: -400, 24
	Health:
		HP: 12000
	ProximityExternalCondition@angelheal:
		Condition: angelheal
		Range: 6c0
		ValidRelationships: Ally
		RequiresCondition: angelpower
	Valued:
		Cost: 4000
	Tooltip:
		Name: Angel
	Voiced:
		VoiceSet: Angelvoice
		Volume: 2
	VoiceAnnouncement:
		Voice: Action
		ValidRelationships: Ally

SPRIGGAN:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	Inherits@stasis: ^Stasis
	Buildable:
		Prerequisites: ~greenmagic, ~building, ~tier3built
		BuildPaletteOrder: 1
		Description: Attacks enemies with crushing roots and magical leaves.
		BuildLimit: 1
	Selectable:
		Class: Dryad
	PortableChrono:
		RequiresCondition: wizardupgrade
	Voiced:
		VoiceSet: Wizardvoice
		Volume: 2
	Tooltip:
		Name: Dryad
	ExternalCondition@upgrade:
		Condition: wizardupgrade
	DamageMultiplier@upgrade:
		Modifier: 75
		RequiresCondition: wizardupgrade
	-Armament@PRIMARY:
	Armament@PRIMARY:
		Weapon: Roots
		PauseOnCondition: stasis
	Armament@SECONDARY:
		Name: secondary
		Weapon: SprigganLeaves
		PauseOnCondition: stasis
	Turreted:
	AttackTurreted:
		Armaments: secondary
	Parachutable:
		FallRate: 800
	RenderSprites:
		Palette: spriggan
	WithIdleOverlay@sprig:
		Image: leaves
		Palette: spriggan
		Sequence: idle
		Offset: 0,0,0
		IsPlayerPalette: False
	Voiced:
		VoiceSet: Sprigganvoice
		Volume: 2
	Health:
		HP: 14000
	Valued:
		Cost: 4000

^Building:
	-WithMakeAnimation:

MAGETOWER:
	Inherits@1: ^MagicInfantry
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	Inherits@power: ^DisabledByPowerOutage
	Inherits@stasis: ^Stasis
	Inherits@inv: ^Invisibility
	Inherits@holyaura: ^Holyaura
	-Targetable@WEB:
	-Buildable:
	Tooltip:
		Name: Magetower
	Selectable:
		Bounds: 1968, 4568, 0, 1000
		Priority: 6
		PriorityModifiers: Ctrl, Alt
	Production:
		Produces: Building, Defense, Infantry, Soldier, Aircraft, Vehicle
		PauseOnCondition: disabled
	ProductionBar@Building:
		ProductionType: Building
	ProductionBar@Infantry:
		ProductionType: Infantry
	ProductionBar@Defense:
		ProductionType: Defense
		Color: 8A8A8A
	Health:
		HP: 500000
	RallyPoint:
		ForceSetType: Infantry
		Notification: spawn.aud
	Mobile:
		Speed: 35
		PauseOnCondition: disabled
	RevealsShroud:
		Range: 8c0
	BaseProvider:
		Range: 8c0
	GrantConditionOnPrerequisite@PrimaryBuilding:
		Condition: PrimaryBuilding
		Prerequisites: portal
	PrimaryBuilding:
		RequiresCondition: PrimaryBuilding
		SelectionNotification: Spawn
	GivesBuildableArea:
		AreaTypes: building,Rough
		Range: 8c0
	ProvidesPrerequisite@buildingname:
	Exit@1:
		SpawnOffset: -42,810,-2000
		ExitCell: 1,4
		ProductionTypes: Soldier, Infantry, Vehicle, Building
	Exit@2:
		SpawnOffset: -725,640,-2000
		ExitCell: -1,4
		ProductionTypes: Soldier, Infantry, Vehicle, Building
	Exit@4:
		ExitCell: 1,1
		Facing: 768
	GrantExternalConditionToProduced:
		Condition: produced
	Targetable:
		TargetTypes: GroundActor, C4, DetonateAttack, Structure, SpyInfiltrate
	AutoTarget:
		InitialStance: AttackAnything
		InitialStanceAI: AttackAnything
	-Armament@PRIMARY:
	Armament@PRIMARY:
		Weapon: Wizardfire1
		RequiresCondition: tier1
		PauseOnCondition: tier2
	Armament@SECONDARY:
		Weapon: Wizardfire2
		RequiresCondition: tier2
	Armament@TERTIARY:
		Weapon: Lightning
		RequiresCondition: tier3
	MustBeDestroyed:
		RequiredForShortGame: true
	DamageMultiplier@tier1:
		Modifier: 95
		RequiresCondition: tier1
		PauseOnCondition: tier2
	DamageMultiplier@tier2:
		Modifier: 90
		RequiresCondition: tier2
		PauseOnCondition: tier3
	DamageMultiplier@tier3:
		Modifier: 85
		RequiresCondition: tier3
	ProvidesRadar:
		RequiresCondition: !disabled
	ExternalCondition@tier1:
		Condition: tier1
	ExternalCondition@tier2:
		Condition: tier2
	ExternalCondition@tier3:
		Condition: tier3
	ExternalCondition@inv:
		Condition: invupgrade
	ExternalCondition@clair:
		Condition: clairupgrade
	ChangesHealth@tier1:
		Step: 2000
		Delay: 80
		StartIfBelow: 101
		PauseOnCondition: disabled
		RequiresCondition: tier1
	ChangesHealth@tier2:
		Step: 2000
		Delay: 40
		StartIfBelow: 101
		PauseOnCondition: disabled
		RequiresCondition: tier2
	ChangesHealth@tier3:
		Step: 2000
		Delay: 20
		StartIfBelow: 101
		PauseOnCondition: disabled
		RequiresCondition: tier3
	WithIdleOverlay@firsttier:
		Image: magetower1
		RequiresCondition: tier1
		Sequence: idle
	WithIdleOverlay@secondtier:
		Image: magetower2
		RequiresCondition: tier2
		Sequence: idle
	WithIdleOverlay@thirdtier:
		Image: magetower3
		RequiresCondition: tier3
		Sequence: idle
	WithIdleOverlay@magering:
		Image: magering
		Sequence: idle
		Offset: 0,0,1000
		IsPlayerPalette: True
		RequiresCondition: !tier3
	WithIdleOverlay@magering3:
		Image: magering
		Sequence: idle
		Offset: 0,0,2000
		IsPlayerPalette: True
		RequiresCondition: tier3
	WithIdleOverlay@electroball:
		Image: electroball
		Sequence: idle
		Offset: 0,0,1500
		IsPlayerPalette: True
		RequiresCondition: !tier3
	WithIdleOverlay@electroball3:
		Image: electroball
		Sequence: idle
		Offset: 0,0,2500
		IsPlayerPalette: True
		RequiresCondition: tier3
	WithShadow:
		Offset: 43, 428, 0
		ZOffset: -1129
	CashTrickler:
		Interval: 100
		Amount: 50
		PauseOnCondition: disabled
	SpawnActorPower@RadarScan:
		Actor: Radarscan
		LifeTime: 255
		ChargeInterval: 4000
		Icon: blizzardicon
		Name: Blizzard
		Description: Spawns a freezing blizzard
		Cursor: ability
		OrderName: RadarScanOrder
		Prerequisites: tier3built, greenmagic
		PauseOnCondition: disabled
	SpawnActorPower@deathblast:
		Actor: Deathblast
		LifeTime: 255
		ChargeInterval: 4000
		Icon: deathblasticon
		Name: Death Vortex
		Description: Drains enemies in a large area
		Cursor: ability
		OrderName: DeathblastOrder
		Prerequisites: tier3built, blackmagic
		LaunchSound: magic6.aud
		PauseOnCondition: disabled
	NukePower@ARTILLERY:
		OrderName: ArtilleryBarrage
		Cursor: ability
		Icon: meteoricon
		Name: Meteor Strike
		Description: Calls down a hail of meteors
		MissileWeapon: ArtilleryBarrage
		ChargeInterval: 3000
		MissileDelay: 2
		DetonationAltitude: 22c0
		DisplayBeacon: false
		BeaconPoster: blizzardbeacon
		SpawnOffset: 0, 0c128, 0c512
		CameraRange: 10c0
		FlightVelocity: 0c512
		SkipAscent: true
		FlightDelay: 160
		OneShot: false
		CameraRemoveDelay: 350
		AllowMultiple: false
		SupportPowerPaletteOrder: 2
		MissileImage: ArtilleryBarrage
		Prerequisites: tier2built, whitemagic
		RevealGeneratedShroud: true
		LaunchSound: meteor.aud
		PauseOnCondition: disabled
	AirstrikePower@bats:
		UnitType: powerbomber
		QuantizedFacings: 8
		ChargeInterval: 3000
		Icon: blizzardicon
		Name: bats
		Description: bats
		Ordername: bats
		Prerequisites: notgonnahappen
	ParatroopersPower@bats:
		LaunchSound: batsscream.aud
		UnitType: powerpara
		Squadsize: 3
		QuantizedFacings: 8
		ChargeInterval: 3000
		Icon: baticon
		Name: Vampire Bats
		Description: Summons Vampire Bats at the selected location 
		Ordername: bats
		DropItems: Batspawner,Batspawner,Batspawner,Batspawner,Batspawner,Batspawner,Batspawner
		UseDirectionalTarget: false
		Prerequisites: tier2built, blackmagic
		PauseOnCondition: disabled
		AllowMultiple: true
	ParatroopersPower@treant:
		UnitType: powerpara
		Squadsize: 3
		QuantizedFacings: 8
		ChargeInterval: 3000
		Icon: treanticon
		Name: Summon Treants
		Description: Summons Treants at for a short while
		Ordername: treant
		DropItems: treantpower, treantpower, treantpower
		UseDirectionalTarget: false
		Prerequisites: tier2built, greenmagic
		PauseOnCondition: disabled
	GrantExternalConditionPower@INV:
		PauseOnCondition: disabled
		Icon: invicon
		ChargeInterval: 4000
		Name: Invisibility
		Description: Makes units and buildings invisible for a short while
		Duration: 400
		Condition: invisible
		Dimensions: 7,7
		Footprint: __xxx__ _xxxxx_ _xxxxx_ xxxxxxx _xxxxx_ _xxxxx_ __xxx__
		BlockedCursor: move-blocked
		Prerequisites: invupgrade
		AllowMultiple: true
	GrantExternalConditionPower@HOLY:
		PauseOnCondition: disabled
		Icon: holyauraicon
		ChargeInterval: 4000
		Name: Holy Aura
		Description: Heals and makes units and buildings invulnerable for a short while
		Duration: 250
		Condition: holyaura
		Dimensions: 7,7
		Footprint: __xxx__ _xxxxx_ _xxxxx_ xxxxxxx _xxxxx_ _xxxxx_ __xxx__
		BlockedCursor: move-blocked
		Prerequisites: tier3built, whitemagic
		StartFullyCharged: false
	Power@POWERDOWN:
		RequiresCondition: disabled
		Amount: -1000
	GpsPower:
		Icon: gps
		OneShot: true
		Name: actor-atek.gpspower-name
		Description: actor-atek.gpspower-description
		LaunchSpeechNotification: 
		LaunchTextNotification: 
		SupportPowerPaletteOrder: 90
		PauseOnCondition: disabled || !gpsactivated
		ChargeInterval: 1
		RevealDelay: 30
		DisplayTimerRelationships: None
		RequiresCondition: gpsactivated
		StartFullyCharged: True
		RequiresActiveRadar: True
		SatelliteImage: empty
	ProduceActorPower@powergps:
		Name: GPS Satellite
		Description: Reveals map terrain and provides tactical information.
		Icon: clairicon
		PauseOnCondition: disabled
		Actors: gpsactivenoise
		Type: GPSPower
		ChargeInterval: 1500
		OrderName: GPSSpawner
		SupportPowerPaletteOrder: 10
		DisplayTimerRelationships: None
		EndChargeSpeechNotification: 
		RequiresCondition: !gpsactivated && clairupgrade
	ProduceActorPower@gpsactivesign:
		Name: GPS Active Timer
		Description: Displays the amount of time the satellite is still active.
		Icon: clairicon
		Actors: e1
		Type: Infantry
		ChargeInterval: 3001
		SupportPowerPaletteOrder: 20
		DisplayTimerRelationships: None
		RequiresCondition: gpsactivated
	GrantConditionOnPrerequisite@gpsactivation:
		Prerequisites: gpsactiveprereq
		Condition: gpsactivated
	ProvidesPrerequisite@uplink:
		Prerequisite: uplink
	Production@GPSPower:
		Produces: GPSPower

gpsactivenoise:
	Interactable:
	EditorOnlyTooltip:
		Name: (GPS Active Noise Dummy)
	AlwaysVisible:
	Aircraft:
		Repulsable: False
	BodyOrientation:
		QuantizedFacings: 1
	WithSpriteBody:
	RenderSpritesEditorOnly:
		Image: camera
	MapEditorData:
		Categories: System
	ProvidesPrerequisite@gap:
		Prerequisite: gpsactiveprereq
	Health:
		HP: 1
	HitShape:
	ChangesHealth:
		Step: -1
		StartIfBelow: 101
		Delay: 1
	SpawnActorOnDeath:
		Actor: powergps
		SpawnAfterDefeat: False
	KillsSelf:

powergps:
	Interactable:
	EditorOnlyTooltip:
		Name: (GPS Power Dummy)
	AlwaysVisible:
	Aircraft:
		Repulsable: False
	BodyOrientation:
		QuantizedFacings: 1
	WithSpriteBody:
	RenderSpritesEditorOnly:
		Image: camera
	MapEditorData:
		Categories: System
	ProvidesPrerequisite@gap:
		Prerequisite: gpsactiveprereq
	Health:
		HP: 1999
	HitShape:
	ChangesHealth:
		Step: -1
		StartIfBelow: 101
		Delay: 1
	GrantConditionOnPrerequisite@satelliteexists:
		Prerequisites: uplink
		Condition: uplinkexists
	KillsSelf:
		RequiresCondition: !uplinkexists

POWERBOMBER:
	Inherits: ^NeutralPlane
	Health:
		HP: 40000
	Aircraft:
		CruiseAltitude: 2560
		TurnSpeed: 20
		Speed: 800
		Repulsable: False
		MaximumPitch: 56
	-Selectable:
	Interactable:
	-Voiced:
	Tooltip:
		Name: actor-badr-name
	SpawnActorOnDeath:
		Actor: BADR.Husk
	LeavesTrails@0:
		Offsets: -432,560,0
		MovingInterval: 2
		Image: smokey
		SpawnAtLastPosition: False
		Type: CenterPosition
		RequiresCondition: enable-smoke
	LeavesTrails@1:
		Offsets: -432,-560,0
		MovingInterval: 2
		Image: smokey
		SpawnAtLastPosition: False
		Type: CenterPosition
		RequiresCondition: enable-smoke
	-EjectOnDeath:
	RejectsOrders:
	GrantConditionOnDamageState@SmokeTrail:
		Condition: enable-smoke
	-MapEditorData:
	RenderSprites:
		Image: empty
	AttackBomber:
		FacingTolerance: 8
	Armament:
		Weapon: Wizardfire1
	-AppearsOnRadar:

POWERPARA:
	Inherits: ^NeutralPlane
	Health:
		HP: 40000
	Aircraft:
		CruiseAltitude: 2560
		TurnSpeed: 20
		Speed: 800
		Repulsable: False
		MaximumPitch: 56
	-Selectable:
	Interactable:
	-Voiced:
	Tooltip:
		Name: actor-badr-name
	SpawnActorOnDeath:
		Actor: BADR.Husk
	LeavesTrails@0:
		Offsets: -432,560,0
		MovingInterval: 2
		Image: smokey
		SpawnAtLastPosition: False
		Type: CenterPosition
		RequiresCondition: enable-smoke
	LeavesTrails@1:
		Offsets: -432,-560,0
		MovingInterval: 2
		Image: smokey
		SpawnAtLastPosition: False
		Type: CenterPosition
		RequiresCondition: enable-smoke
	-EjectOnDeath:
	RejectsOrders:
	GrantConditionOnDamageState@SmokeTrail:
		Condition: enable-smoke
	-MapEditorData:
	RenderSprites:
		Image: empty
	ParaDrop:
		DropRange: 4c0
		ChuteSound: magic1.aud
		DropInterval: 0
	Cargo:
		MaxWeight: 10
	-AppearsOnRadar:
	-Targetable@GROUND:
	-Targetable@AIRBORNE:
	-FireWarheadsOnDeath:
	-SpawnActorOnDeath:
	RejectsOrders:

BATSPAWNER:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@5: ^AutoTargetAir
	-Buildable:
	Selectable:
		Class: Wizard
	PortableChrono:
		RequiresCondition: wizardupgrade
	SpawnActorOnDeath:
		Actor: wizardcorpsetemp
		OwnerType: Victim
	Voiced:
		VoiceSet: Wizardvoice
		Volume: 2
	Tooltip:
		Name: Wizard
	ExternalCondition@upgrade:
		Condition: wizardupgrade
	DamageMultiplier@upgrade:
		Modifier: 75
		RequiresCondition: wizardupgrade
	-Armament@PRIMARY:
	Armament@PRIMARY:
		Weapon: Wizardfire1
		PauseOnCondition: wizardupgrade
	Armament@SECONDARY:
		Weapon: Wizardfire2
		RequiresCondition: wizardupgrade
	Passenger:
	Parachutable:
		FallRate: 800
	KillsSelf:
		Delay: 1
	SpawnActorOnDeath:
		Actor: Bat
	-AppearsOnRadar:
	-ActorLostNotification:

BAT:
	Inherits: ^Plane
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@7: ^Deathblastable
	Inherits@6: ^AutoTargetGround
	Inherits@5: ^AutoTargetAir
	AutoTarget:
		InitialStance: AttackAnything
		InitialStanceAI: AttackAnything
		ScanRadius: 10
	Valued:
		Cost: 100
	Tooltip:
		Name: Familiar
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	Health:
		HP: 1000
	RevealsShroud:
		MinRange: 9c0
		Range: 11c0
		Type: GroundPosition
		RevealGeneratedShroud: False
	RevealsShroud@GAPGEN:
		Range: 9c0
		Type: GroundPosition
	Aircraft:
		CanHover: false
		CruisingCondition: cruising
		WaitDistanceFromResupplyBase: 4c0
		TakeOffOnResupply: true
		TakeOffOnCreation: true
		VTOL: false
		LandableTerrainTypes: Clear, Rough, Road, Ore, Beach, Gems
		Crushes: crate, mine, infantry
		CanSlide: false
		AirborneCondition: airborne
		TurnSpeed: 100
		Speed: 250
		AltitudeVelocity: 0c58
		CruiseAltitude: 1560
		MaximumPitch: 60
	-SpawnActorOnDeath:
	Selectable:
		Bounds: 500, 500, 0, 0
		Class: Familiar
	-WithFacingSpriteBody:
	WithInfantryBody:
	Armament@PRIMARY:
		Weapon: Batbite
	AttackAircraft:
	RenderSprites:
		Image: bat
	Passenger:
	Parachutable:
		FallRate: 800
	KillsSelf:
		Delay: 150
		RemoveInstead: true
	-AppearsOnRadar:
	-GainsExperience:
	-EjectOnDeath:


RADARSCAN:
	Interactable:
	EditorOnlyTooltip:
		Name: Blizzard
	AlwaysVisible:
	Immobile:
		OccupiesSpace: false
	WithSpriteBody:
	BodyOrientation:
		QuantizedFacings: 1
	RevealsShroud:
		RevealGeneratedShroud: True
		Range: 10c0
		Type: CenterPosition
	DetectCloaked:
		Range: 10c0
	RenderSprites:
		Image: blizzard
	ProximityExternalCondition@frost:
		Range: 8c512
		ValidRelationships: Ally, Enemy, Neutral
		Condition: frozen
	AmbientSound@storm:
		SoundFiles: winterstorm.aud
		Interval: 1500

DEATHBLAST:
	Interactable:
	EditorOnlyTooltip:
		Name: Death Blast
	AlwaysVisible:
	Immobile:
		OccupiesSpace: false
	WithSpriteBody:
	BodyOrientation:
		QuantizedFacings: 1
	RevealsShroud:
		RevealGeneratedShroud: True
		Range: 10c0
		Type: CenterPosition
	DetectCloaked:
		Range: 10c0
	RenderSprites:
		Image: deathblast
	ProximityExternalCondition@deathblast:
		Range: 7c0
		ValidRelationships: Enemy
		Condition: deathblast
	AmbientSound@storm:
		SoundFiles: winterstorm.aud
		Interval: 1500
	KillsSelf:
		Delay: 200

TerrainChangerCellRough:
	Inherits@1: ^ExistsInWorld
	Inherits@4: ^SpriteActor
	WithSpriteBody:
	HitShape:
		Type: Circle
			Radius: 128
	MapEditorData:
		Categories: Tree
	Immobile:
		OccupiesSpace: False
	ChangesTerrain:
		TerrainType: Rough
	-RenderSprites:
	AlwaysVisible:
	RenderSprites:
		Image: treetoolconf
	Tooltip:
		Name: Mana Well
	Interactable:
		Bounds: 1024, 1024

COLLECTOR:
	Inherits: ^Building
	Inherits@6: ^Deathblastable
	Inherits@4: ^Freezable
	Inherits@inv: ^Invisibility
	Inherits@holyaura: ^Holyaura
	Buildable:
		Queue: Building
		BuildPaletteOrder: 10
		Prerequisites: ~building
		Description: Build on mana wells for cash
		BuildDurationModifier: 40
	Valued:
		Cost: 500
	Tooltip:
		Name: Mana Collector
	RequiresBuildableArea:
		AreaTypes: Rough
		Adjacent: 8
	-Building:
	Building:
		Dimensions: 1,1
		Footprint: x
		TerrainTypes: Tree,Rough
		RequiresBaseProvider: True
	Health:
		HP: 40000
	Armor:
		Type: Wood
	RevealsShroud:
		Range: 4c0
	Power:
		Amount: 100
	Targetable:
		TargetTypes: GroundActor, Structure, C4, DetonateAttack, SpyInfiltrate
	ScalePowerWithHealth:
	WithDeathAnimation:
		DeathSequence: dead
		UseDeathTypeSuffix: false
	CashTrickler:
		Interval: 100
		Amount: 50
		PauseOnCondition: disabled
	MustBeDestroyed:
		RequiredForShortGame: false
	-SpawnActorsOnSell:


DEFENSE:
	Inherits: ^Building
	Inherits@4: ^AutoTargetGround
	Inherits@5: ^AutoTargetAll
	Inherits@6: ^Deathblastable
	Inherits@4: ^Freezable
	Inherits@power: ^DisabledByPowerOutage
	Inherits@inv: ^Invisibility
	Inherits@holyaura: ^Holyaura
	HitShape:
		Type: Rectangle
	Buildable:
		Queue: Building
		BuildPaletteOrder: 10
		Prerequisites: ~building
		Description: Defensive structure. Detects cloaked units.
		BuildSounds: magic1
		BuildDurationModifier: 40
	Valued:
		Cost: 1000
	Tooltip:
		Name: Magic Tower
	RequiresBuildableArea:
		Adjacent: 8
	-Building:
	Building:
		Dimensions: 2,2
		Footprint: xx xx
		TerrainTypes: Clear
		RequiresBaseProvider: True
	Health:
		HP: 50000
	Armor:
		Type: Wood
	RevealsShroud:
		Range: 4c0
	Targetable:
		TargetTypes: GroundActor, Structure, C4, DetonateAttack, SpyInfiltrate
	Selectable:
		Bounds: 1424, 1424
		Priority: 6
		PriorityModifiers: Ctrl, Alt
	WithIdleOverlay@electroball:
		Image: electroball
		Sequence: idle
		Offset: 0,0,700
		IsPlayerPalette: False
	Armament:
		Weapon: Lightning
		LocalOffset: 0,0,896
		RequiresCondition: !disabled
	AttackTesla:
		InitialChargeDelay: 5
		MaxCharges: 1
		ReloadDelay: 3
	Voiced:
		VoiceSet: Miscvoice
		Volume: 2
	DeathSounds:
		VolumeMultiplier: 2
	VoiceAnnouncement:
		Voice: Building
		ValidRelationships: Ally
	MustBeDestroyed:
		RequiredForShortGame: false
	AutoTarget:
		InitialStance: AttackAnything
		InitialStanceAI: AttackAnything
	-RepairableBuilding:
	-WithBuildingRepairDecoration:
	ChangesHealth:
		Step: 10
		Delay: 5
		StartIfBelow: 101
		PauseOnCondition: frozen
	ExternalCondition@tier1:
		Condition: tier1
	ExternalCondition@tier2:
		Condition: tier2
	ExternalCondition@tier3:
		Condition: tier3
	ChangesHealth@tier1:
		PercentageStep: 1
		Delay: 80
		StartIfBelow: 101
		PauseOnCondition: frozen
		RequiresCondition: tier1
	ChangesHealth@tier2:
		PercentageStep: 1
		Delay: 40
		StartIfBelow: 101
		PauseOnCondition: frozen
		RequiresCondition: tier2
	ChangesHealth@tier3:
		PercentageStep: 1
		Delay: 20
		StartIfBelow: 101
		PauseOnCondition: frozen
		RequiresCondition: tier3
	DetectCloaked:
		DetectionTypes: Cloak
		Range: 5c0		
	RenderRangeCircle:
	-SpawnActorsOnSell:

PORTAL:
	Inherits: ^Building
	Inherits@6: ^Deathblastable
	Inherits@4: ^Freezable
	Inherits@power: ^DisabledByPowerOutage
	Inherits@inv: ^Invisibility
	Inherits@holyaura: ^Holyaura
	Buildable:
		Queue: Building
		BuildPaletteOrder: 10
		Prerequisites: ~building
		Description: Spawnpoint for units.
		BuildSounds: placbldg.aud, build5.aud
		BuildDurationModifier: 40
	Valued:
		Cost: 1200
	Tooltip:
		Name: Portal
	RequiresBuildableArea:
		Adjacent: 8
	-Building:
	Building:
		Dimensions: 2,2
		Footprint: xx xx
		TerrainTypes: Clear
		RequiresBaseProvider: True
	Health:
		HP: 40000
	Armor:
		Type: Wood
	RevealsShroud:
		Range: 4c0
	Targetable:
		TargetTypes: GroundActor, Structure, C4, DetonateAttack, SpyInfiltrate
	Selectable:
		Bounds: 1824, 1824
		Priority: 8
		PriorityModifiers: Ctrl, Alt
	Production:
		Produces: Building, Defense, Infantry, Soldier, Aircraft, Vehicle
		PauseOnCondition: disabled
	ProductionBar@Building:
		ProductionType: Building
	ProductionBar@Infantry:
		ProductionType: Infantry
	ProductionBar@Defense:
		ProductionType: Defense
	RallyPoint:
	PrimaryBuilding:
		SelectionNotification: Spawn
	Exit@1:
		SpawnOffset: 213,-128,0
		ExitCell: 1,2
		ProductionTypes: Soldier, Infantry, Vehicle, Building
	Exit@2:
		SpawnOffset: 313,-228,0
		ExitCell: 1,3
		ProductionTypes: Soldier, Infantry, Vehicle, Building
	Exit@4:
		ExitCell: 1,1
		Facing: 768
	GrantExternalConditionToProduced:
		Condition: produced
	ProvidesPrerequisite@buildingname:
	Voiced:
		VoiceSet: Miscvoice
		Volume: 2
	DeathSounds:
		VolumeMultiplier: 2
	VoiceAnnouncement:
		Voice: Building
		ValidRelationships: Ally
	MustBeDestroyed:
		RequiredForShortGame: false
	-RepairableBuilding:
	-WithBuildingRepairDecoration:
	ExternalCondition@tier1:
		Condition: tier1
	ExternalCondition@tier2:
		Condition: tier2
	ExternalCondition@tier3:
		Condition: tier3
	ChangesHealth@tier1:
		PercentageStep: 1
		Delay: 80
		StartIfBelow: 101
		PauseOnCondition: frozen
		RequiresCondition: tier1
	ChangesHealth@tier2:
		PercentageStep: 1
		Delay: 40
		StartIfBelow: 101
		PauseOnCondition: frozen
		RequiresCondition: tier2
	ChangesHealth@tier3:
		PercentageStep: 1
		Delay: 20
		StartIfBelow: 101
		PauseOnCondition: frozen
		RequiresCondition: tier3
	-SpawnActorsOnSell:

^CORPSETEMP:
	Inherits@1: ^SpriteActor
	HitShape:
	HiddenUnderShroud:
	RenderSprites:
		PlayerPalette: player
	Health:
		HP: 9000000
	Immobile:
		OccupiesSpace: false
	OwnerLostAction:
		Action: Dispose
	DamageMultiplier:
		Modifier: 0
	KillsSelf:
		Delay: 20
	SpawnActorOnDeath:
		Actor: Wizardcorpse
		OwnerType: Victim
	MustBeDestroyed:
		RequiredForShortGame: false

^CORPSE:
	Inherits@1: ^SpriteActor
	Inherits@2: ^ExistsInWorld
	HitShape:
	HiddenUnderShroud:
		AlwaysVisibleRelationships: None
	Health:
		HP: 1
	Immobile:
		OccupiesSpace: false
	OwnerLostAction:
		Action: Dispose
	WithSpriteBody:
	Targetable:
		TargetTypes: Corpse
	Selectable:
		Bounds: 668, 1068
		Class: Corpse
	ExternalCondition@res:
		Condition: resurrect
	SpawnActorOnDeath:
		Actor: Wizard
		OwnerType: Killer
		RequiresCondition: resurrect
	KillsSelf:
		Delay: 400
		RequiresCondition: !resurrect
	MustBeDestroyed:
		RequiredForShortGame: false

WIZARDCORPSETEMP:
	Inherits@1: ^CORPSETEMP
	SpawnActorOnDeath:
		Actor: Wizardcorpse

WIZARDCORPSE:
	Inherits@1: ^CORPSE
	SpawnActorOnDeath:
		Actor: Wizardres

HEDGEMAGECORPSETEMP:
	Inherits@1: ^CORPSETEMP
	SpawnActorOnDeath:
		Actor: Hedgemagecorpse

HEDGEMAGECORPSE:
	Inherits@1: ^CORPSE
	SpawnActorOnDeath:
		Actor: Hedgemageres

WITCHCORPSETEMP:
	Inherits@1: ^CORPSETEMP
	SpawnActorOnDeath:
		Actor: Witchcorpse

WITCHCORPSE:
	Inherits@1: ^CORPSE
	SpawnActorOnDeath:
		Actor: Witchres

SPIDERCORPSETEMP:
	Inherits@1: ^CORPSETEMP
	SpawnActorOnDeath:
		Actor: Spidercorpse

SPIDERCORPSE:
	Inherits@1: ^CORPSE
	SpawnActorOnDeath:
		Actor: Spiderres

BATTLEMAGECORPSETEMP:
	Inherits@1: ^CORPSETEMP
	SpawnActorOnDeath:
		Actor: Battlemagecorpse

BATTLEMAGECORPSE:
	Inherits@1: ^CORPSE
	SpawnActorOnDeath:
		Actor: Battlemageres

DEATHKNIGHTCORPSETEMP:
	Inherits@1: ^CORPSETEMP
	SpawnActorOnDeath:
		Actor: Deathknightcorpse
	KillsSelf:
		Delay: 60

DEATHKNIGHTCORPSE:
	Inherits@1: ^CORPSE
	SpawnActorOnDeath:
		Actor: Deathknightres

WhiteMagic:
	Inherits@1: ^SpriteActor
	HitShape:
	HiddenUnderShroud:
	RenderSprites:
	Valued:
		Cost: 4000
	Health:
		HP: 9000000
	Immobile:
		OccupiesSpace: false
	OwnerLostAction:
		Action: Dispose
	Buildable:
		Queue: Building
		BuildAtProductionType: Soldier
		BuildPaletteOrder: 1
		Description: White Magic. You can only choose one
		Prerequisites: ~!building
		BuildLimit: 1
		BuildDuration: 1
	ProximityExternalCondition@tier1:
		Condition: whitemagic
		Range: 500c0
		ValidRelationships: Ally
	ProvidesPrerequisite@magic:
		Prerequisite: whitemagic
	ProvidesPrerequisite@building:
		Prerequisite: building
	MustBeDestroyed:
		RequiredForShortGame: false

BlackMagic:
	Inherits@1: ^SpriteActor
	HitShape:
	HiddenUnderShroud:
	RenderSprites:
	Valued:
		Cost: 4000
	Health:
		HP: 9000000
	Immobile:
		OccupiesSpace: false
	OwnerLostAction:
		Action: Dispose
	Buildable:
		Queue: Building
		BuildAtProductionType: Soldier
		BuildPaletteOrder: 1
		Description: Black Magic. You can only choose one
		Prerequisites: ~!building
		BuildLimit: 1
		BuildDuration: 1
	ProximityExternalCondition@tier1:
		Condition: blackmagic
		Range: 500c0
		ValidRelationships: Ally
	ProvidesPrerequisite@magic:
		Prerequisite: blackmagic
	ProvidesPrerequisite@building:
		Prerequisite: building
	MustBeDestroyed:
		RequiredForShortGame: false

GreenMagic:
	Inherits@1: ^SpriteActor
	HitShape:
	HiddenUnderShroud:
	RenderSprites:
	Valued:
		Cost: 4000
	Health:
		HP: 9000000
	Immobile:
		OccupiesSpace: false
	OwnerLostAction:
		Action: Dispose
	Buildable:
		Queue: Building
		BuildAtProductionType: Soldier
		BuildPaletteOrder: 1
		Description: Green Magic. You can only choose one
		Prerequisites: ~!building
		BuildLimit: 1
		BuildDuration: 1
	ProximityExternalCondition@tier1:
		Condition: greenmagic
		Range: 500c0
		ValidRelationships: Ally
	ProvidesPrerequisite@magic:
		Prerequisite: greenmagic
	ProvidesPrerequisite@building:
		Prerequisite: building
	MustBeDestroyed:
		RequiredForShortGame: false

MagetowerTier1:
	Inherits@1: ^SpriteActor
	HitShape:
	HiddenUnderShroud:
	RenderSprites:
		Palette: terrain
		Image: Tier1
	Health:
		HP: 9000000
	Immobile:
		OccupiesSpace: false
	OwnerLostAction:
		Action: Dispose
	Buildable:
		Queue: Defense
		BuildAtProductionType: Soldier
		BuildPaletteOrder: 1
		Description: Upgrades Mage Tower weapon, defenses and self-heal rate. Enables additional units and powers.
		Prerequisites: magetower, ~building
		BuildLimit: 1
		BuildDurationModifier: 60
	ProximityExternalCondition@tier1:
		Condition: tier1
		Range: 500c0
		ValidRelationships: Ally
	ProvidesPrerequisite:
		Prerequisite: tier1built
	Valued:
		Cost: 3000
	MustBeDestroyed:
		RequiredForShortGame: false

MagetowerTier2:
	Inherits@1: ^SpriteActor
	HitShape:
	HiddenUnderShroud:
	RenderSprites:
		Palette: terrain
		Image: Tier2
	Health:
		HP: 9000000
	Immobile:
		OccupiesSpace: false
	OwnerLostAction:
		Action: Dispose
	Buildable:
		Queue: Defense
		BuildAtProductionType: Soldier
		BuildPaletteOrder: 2
		Description: Upgrades Mage Tower weapon, defenses and self-heal rate. Enables additional units and powers.
		BuildLimit: 1
		Prerequisites: tier1built, ~building
		BuildDurationModifier: 60
	ProximityExternalCondition@tier2a:
		Condition: tier2
		Range: 500c0
		ValidRelationships: Ally
	ProvidesPrerequisite:
		Prerequisite: tier2built
	DamageMultiplier:
		Modifier: 0
	Valued:
		Cost: 4000
	MustBeDestroyed:
		RequiredForShortGame: false

MagetowerTier3:
	Inherits@1: ^SpriteActor
	HitShape:
	HiddenUnderShroud:
	RenderSprites:
		Palette: terrain
		Image: Tier3
	Health:
		HP: 9000000
	Immobile:
		OccupiesSpace: false
	OwnerLostAction:
		Action: Dispose
	Buildable:
		Queue: Defense
		BuildAtProductionType: Soldier
		BuildPaletteOrder: 3
		Description: Upgrades Mage Tower weapon, defenses and self-heal rate. Enables additional units and powers.
		BuildLimit: 1
		Prerequisites: tier2built, ~building
		BuildDurationModifier: 60
	ProximityExternalCondition@tier3:
		Condition: tier3
		Range: 500c0
		ValidRelationships: Ally
	ProvidesPrerequisite:
		Prerequisite: tier3built
	DamageMultiplier:
		Modifier: 0
	Valued:
		Cost: 5000
	MustBeDestroyed:
		RequiredForShortGame: false

CLAIRUPGRADE:
	Inherits@1: ^SpriteActor
	HitShape:
	HiddenUnderShroud:
	RenderSprites:
		Palette: terrain
		Image: clairupgrade
	Health:
		HP: 9000000
	Immobile:
		OccupiesSpace: false
	OwnerLostAction:
		Action: Dispose
	Buildable:
		Queue: Defense
		BuildAtProductionType: Soldier
		BuildPaletteOrder: 7
		Description: Reveals units on the map for a short while
		Prerequisites: magetower, ~building, ~tier3built
		BuildLimit: 1
		ValidRelationships: Ally
		BuildDurationModifier: 60
	ProximityExternalCondition@clair:
		Condition: clairupgrade
		Range: 500c0
	Valued:
		Cost: 5000
	ProvidesPrerequisite@upgrade:
		Prerequisite: clairupgrade
	MustBeDestroyed:
		RequiredForShortGame: false

INVUPGRADE:
	Inherits@1: ^SpriteActor
	HitShape:
	HiddenUnderShroud:
	RenderSprites:
		Palette: terrain
		Image: invupgrade
	Health:
		HP: 9000000
	Immobile:
		OccupiesSpace: false
	OwnerLostAction:
		Action: Dispose
	Buildable:
		Queue: Defense
		BuildAtProductionType: Soldier
		BuildPaletteOrder: 6
		Description: Temporarily cloaks units and buildings
		Prerequisites: magetower, ~building, ~tier3built
		BuildLimit: 1
		ValidRelationships: Ally
		BuildDurationModifier: 60
	ProximityExternalCondition@inv:
		Condition: invupgrade
		Range: 500c0
	Valued:
		Cost: 5000
	ProvidesPrerequisite@invupgrade:
		Prerequisite: invupgrade
	MustBeDestroyed:
		RequiredForShortGame: false

WIZARDUPGRADE:
	Inherits@1: ^SpriteActor
	HitShape:
	HiddenUnderShroud:
	RenderSprites:
		Palette: terrain
		Image: wizardupgrade
	Health:
		HP: 9000000
	Immobile:
		OccupiesSpace: false
	OwnerLostAction:
		Action: Dispose
	Buildable:
		Queue: Defense
		BuildAtProductionType: Soldier
		BuildPaletteOrder: 4
		Description: Upgrades Wizard attack and defense. Allows teleportation (Force Move) 
		Prerequisites: magetower, ~building, ~whitemagic, ~tier1built
		BuildLimit: 1
		ValidRelationships: Ally
		BuildDurationModifier: 60
	ProximityExternalCondition@tier1:
		Condition: wizardupgrade
		Range: 500c0
	Valued:
		Cost: 2000
	ProvidesPrerequisite@upgrade:
		Prerequisite: wizardupgrade
	Voiced:
		VoiceSet: Miscvoice
		Volume: 1
	VoiceAnnouncement:
		Voice: Unitupgraded
		ValidRelationships: Ally
	MustBeDestroyed:
		RequiredForShortGame: false

WITCHUPGRADE:
	Inherits@1: ^SpriteActor
	HitShape:
	HiddenUnderShroud:
	RenderSprites:
		Palette: terrain
		Image: witchupgrade
	Health:
		HP: 9000000
	Immobile:
		OccupiesSpace: false
	OwnerLostAction:
		Action: Dispose
	Buildable:
		Queue: Defense
		BuildAtProductionType: Soldier
		BuildPaletteOrder: 4
		Description: Upgrades Witch attack and defense. Allows flight (Force Move) 
		Prerequisites: magetower, ~building, ~blackmagic, ~tier1built
		BuildLimit: 1
		ValidRelationships: Ally
		BuildDurationModifier: 60
	ProximityExternalCondition@tier1:
		Condition: witchupgrade
		Range: 500c0
	Valued:
		Cost: 2000
	ProvidesPrerequisite@upgrade:
		Prerequisite: witchupgrade
	Voiced:
		VoiceSet: Miscvoice
		Volume: 1
	VoiceAnnouncement:
		Voice: Unitupgraded
		ValidRelationships: Ally
	MustBeDestroyed:
		RequiredForShortGame: false

BATTLEMAGEUPGRADE:
	Inherits@1: ^SpriteActor
	HitShape:
	HiddenUnderShroud:
	RenderSprites:
		Palette: terrain
		Image: battlemageupgrade
	Health:
		HP: 9000000
	Immobile:
		OccupiesSpace: false
	OwnerLostAction:
		Action: Dispose
	Buildable:
		Queue: Defense
		BuildAtProductionType: Soldier
		BuildPaletteOrder: 5
		Description: Grants speed and slight defense boost (Deploy)
		Prerequisites: magetower, ~building, ~whitemagic, ~tier2built
		BuildLimit: 1
		BuildDurationModifier: 60
	ProximityExternalCondition@tier1:
		Condition: battlemageupgrade
		Range: 500c0
		ValidRelationships: Ally
	Valued:
		Cost: 2000
	ProvidesPrerequisite@upgrade:
		Prerequisite: battlemageupgrade
	Voiced:
		VoiceSet: Miscvoice
		Volume: 1
	VoiceAnnouncement:
		Voice: Unitupgraded
		ValidRelationships: Ally
	MustBeDestroyed:
		RequiredForShortGame: false

DEATHKNIGHTUPGRADE:
	Inherits@1: ^SpriteActor
	HitShape:
	HiddenUnderShroud:
	RenderSprites:
		Palette: terrain
		Image: deathknightupgrade
	Health:
		HP: 9000000
	Immobile:
		OccupiesSpace: false
	OwnerLostAction:
		Action: Dispose
	Buildable:
		Queue: Defense
		BuildAtProductionType: Soldier
		BuildPaletteOrder: 5
		Description: Damages nearby enemies when activated (Deploy)
		Prerequisites: magetower, ~building, ~blackmagic, ~tier2built
		BuildLimit: 1
		BuildDurationModifier: 60
	ProximityExternalCondition@tier1:
		Condition: deathknightupgrade
		Range: 500c0
		ValidRelationships: Ally
	Valued:
		Cost: 2000
	ProvidesPrerequisite@upgrade:
		Prerequisite: deathknightupgrade
	Voiced:
		VoiceSet: Miscvoice
		Volume: 1
	VoiceAnnouncement:
		Voice: Unitupgraded
		ValidRelationships: Ally
	MustBeDestroyed:
		RequiredForShortGame: false

HEDGEMAGEUPGRADE:
	Inherits@1: ^SpriteActor
	HitShape:
	HiddenUnderShroud:
	RenderSprites:
		Palette: terrain
		Image: hedgemageupgrade
	Health:
		HP: 9000000
	Immobile:
		OccupiesSpace: false
	OwnerLostAction:
		Action: Dispose
	Buildable:
		Queue: Defense
		BuildAtProductionType: Soldier
		BuildPaletteOrder: 4
		Description: Upgrades Hedge Mage attack and defense. Heals when standing in Hedges.
		Prerequisites: magetower, ~building, ~greenmagic, ~tier1built
		BuildLimit: 1
		BuildDurationModifier: 60
	ProximityExternalCondition@tier1:
		Condition: hedgemageupgrade
		Range: 500c0
		ValidRelationships: Ally
	Valued:
		Cost: 2000
	ProvidesPrerequisite@upgrade:
		Prerequisite: hedgemageupgrade
	Voiced:
		VoiceSet: Miscvoice
		Volume: 1
	VoiceAnnouncement:
		Voice: Unitupgraded
		ValidRelationships: Ally
	MustBeDestroyed:
		RequiredForShortGame: false

SPIDERUPGRADE:
	Inherits@1: ^SpriteActor
	HitShape:
	HiddenUnderShroud:
	RenderSprites:
		Palette: terrain
		Image: spiderupgrade
	Health:
		HP: 9000000
	Immobile:
		OccupiesSpace: false
	OwnerLostAction:
		Action: Dispose
	Buildable:
		Queue: Defense
		BuildAtProductionType: Soldier
		BuildPaletteOrder: 5
		Description: Lays Spider Eggs. Baby spiders hatch on Deploy or when crushed
		Prerequisites: magetower, ~building, ~greenmagic, ~tier2built
		BuildLimit: 1
		BuildDurationModifier: 60
	ProximityExternalCondition@tier1:
		Condition: spiderupgrade
		Range: 500c0
		ValidRelationships: Ally
	Valued:
		Cost: 2000
	ProvidesPrerequisite@upgrade:
		Prerequisite: spiderupgrade
	Voiced:
		VoiceSet: Miscvoice
		Volume: 1
	VoiceAnnouncement:
		Voice: Unitupgraded
		ValidRelationships: Ally
	MustBeDestroyed:
		RequiredForShortGame: false


WEAP:
	-Buildable:

PROC:
	-Buildable:

TENT:
	-Buildable:

FIX:
	-Buildable:

DOME:
	-Buildable:

PBOX:
	-Buildable:

PDOX:
	-Buildable:

GUN:
	-Buildable:

AGUN:
	-Buildable:

BRIK:
	-Buildable:

SILO:
	-Buildable:

POWR:
	-Buildable:

APWR:
	-Buildable:

MSLO:
	-Buildable:

MCV:
	-Buildable:

HARV:
	-Buildable:

MNLY:
	-Buildable:

TRUK:
	-Buildable:

SBAG1:
	Inherits: ^Wall
	Valued:
		Cost: 200
	CustomSellValue:
		Value: 0
	SoundOnDamageTransition:
		DamagedSounds: crmble2.aud
		DestroyedSounds: kaboom30.aud
	Health:
		HP: 40000
	Armor:
		Type: Light
	BlocksProjectiles:
	WithWallSpriteBody:
		Type: concrete
	-BlocksProjectiles:
	-Building:
	Tooltip:
		Name: Hedge
	EnergyWall:
		TerrainTypes: Clear,Road
		AllowPlacementOnResources: true
		Weapon: M1Carbine
		ActiveCondition: never
	FreeActor:
		Actor: TRENCH.Terrain
	ProximityExternalCondition:
		Condition: road_alive
		Range: 900
	Targetable:
		TargetTypes: Ground
	-Crushable:
	LineBuild:
		NodeTypes: trench
	LineBuildNode:
		Types: trench

^GroundDummyActor:
	Inherits@1: ^SpriteActor
	HitShape:
	Interactable:
	HiddenUnderShroud:
	RenderSprites:
		Image: Witch
	Targetable:
		TargetTypes: Ground
	Health:
		HP: 10000
	RevealsShroud:
		Range: 12c0
	Immobile:
		OccupiesSpace: false
	OwnerLostAction:
		Action: Dispose

TRENCH.Terrain:
	Inherits@1: ^GroundDummyActor
	-RevealsShroud:
	ChangesTerrain:
		TerrainType: Rough
	ExternalCondition:
		Condition: hedge





