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

^Freezable:
	ExternalCondition@frozen:
		Condition: frozen
	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:
		Step: -50
		Delay: 5
		StartIfBelow: 101
		RequiresCondition: frozen

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

^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

^MagicInfantry:
	Inherits@1: ^ExistsInWorld
	Inherits@4: ^SpriteActor
	Inherits@bounty: ^GlobalBounty
	Inherits@selection: ^SelectableCombatUnit
	Inherits@handicaps: ^PlayerHandicaps
	Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
	Inherits@deathknightpowerdamage: ^Deathknightpowerdamage
	Inherits@attackground: ^AutoTargetGround
	Targetable@HEAL:
		TargetTypes: Heal
	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
	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
	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@5: ^AutoTargetAir
	Inherits@7: ^AutoTargetGround
	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
	Passenger:
	Parachutable:
		FallRate: 800

YETI:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	Inherits@stasis: ^Stasis
	Buildable:
		Queue: Aircraft
		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: Infiltrates building for power outage. Cloaked, detects cloaked units. 
	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
	RenderDetectionCircle:
	WithAmmoPipsDecoration:
		Position: BottomLeft
		Margin: 4, 3
		RequiresSelection: true

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

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

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
		PauseOnCondition: witchupgrade
	Armament@SECONDARY:
		Weapon: Witchball2
		RequiresCondition: witchupgrade
	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
	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:
	Inherits@2: ^GainsExperience
	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
	Buildable:
		Queue: Aircraft
		Prerequisites: ~blackmagic, ~building, ~tier3built
		Description: Ice breathing dragon. Can only attack ground.
		BuildPaletteOrder: 5
		BuildDurationModifier: 40
	Valued:
		Cost: 3000
	Tooltip:
		Name: Ice Dragon
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	Health:
		HP: 13000
	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: 60
		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: 10
		ReloadDelay: 11
		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
	MustBeDestroyed:
		RequiredForShortGame: false


PHOENIX:
	Inherits: ^Plane
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@5: ^AutoTargetAir
	Inherits@6: ^Deathblastable
	Inherits@AUTOTARGET: ^AutoTargetGroundAssaultMove
	Buildable:
		Queue: Aircraft
		BuildPaletteOrder: 5
		Prerequisites: ~whitemagic, ~building, ~tier3built
		Description: Fire breathing bird
		BuildDurationModifier: 40
	Valued:
		Cost: 2500
	Tooltip:
		Name: Phoenix
	UpdatesPlayerStatistics:
		AddToArmyValue: true
	Health:
		HP: 10000
	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
	MustBeDestroyed:
		RequiredForShortGame: false

FAMILIAR:
	Inherits: ^Plane
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@6: ^Deathblastable
	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
	VoiceAnnouncement:
		Voice: Action
	MustBeDestroyed:
		RequiredForShortGame: false

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

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@5: ^AutoTargetAir
	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: 6c0
		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

ANGEL:
	Inherits@1: ^MagicInfantry
	Inherits@2: ^LICHDRAIN
	Inherits@3: ^ANGELHEAL
	Inherits@4: ^Freezable
	Inherits@5: ^AutoTargetAir
	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,1000
	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

^Building:
	-WithMakeAnimation:

MAGETOWER:
	Inherits@1: ^MagicInfantry
	Inherits@4: ^Freezable
	Inherits@5: ^AutoTargetAir
	Inherits@6: ^Deathblastable
	Inherits@power: ^DisabledByPowerOutage
	Inherits@stasis: ^Stasis
	-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: 30
		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:
	ExternalCondition@tier1:
		Condition: tier1
	ExternalCondition@tier2:
		Condition: tier2
	ExternalCondition@tier3:
		Condition: tier3
	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: 4
		Icon: blizzardicon
		Name: Blizzard
		Description: Spawns a freezing blizzard
		Cursor: ability
		OrderName: RadarScanOrder
		Prerequisites: tier3built, whitemagic
		PauseOnCondition: disabled
	SpawnActorPower@deathblast:
		Actor: Deathblast
		LifeTime: 255
		ChargeInterval: 4
		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: 3
		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: 1
		Icon: blizzardicon
		Name: bats
		Description: bats
		Ordername: bats
		Prerequisites: notgonnahappen
	ParatroopersPower@bats:
		LaunchSound: batsscream.aud
		UnitType: powerpara
		Squadsize: 3
		QuantizedFacings: 8
		ChargeInterval: 3
		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
	Power@POWERDOWN:
		RequiresCondition: disabled
		Amount: -1000

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:
	GivesExperience:
		Experience: 1000
	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:
	GivesExperience:
		Experience: 1000
	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:


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: 8c0
		ValidRelationships: Enemy
		Condition: deathblast
	AmbientSound@storm:
		SoundFiles: winterstorm.aud
		Interval: 1500
	KillsSelf:
		Delay: 70

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
	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


DEFENSE:
	Inherits: ^Building
	Inherits@4: ^AutoTargetGround
	Inherits@5: ^AutoTargetAir
	Inherits@6: ^Deathblastable
	Inherits@4: ^Freezable
	Inherits@power: ^DisabledByPowerOutage
	HitShape:
		Type: Rectangle
	Buildable:
		Queue: Defense
		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
	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		

PORTAL:
	Inherits: ^Building
	Inherits@6: ^Deathblastable
	Inherits@4: ^Freezable
	Inherits@power: ^DisabledByPowerOutage
	Buildable:
		Queue: Defense
		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
	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

^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: Ally, Enemy
	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

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

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

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

MagetowerTier1:
	Inherits@1: ^SpriteActor
	HitShape:
	HiddenUnderShroud:
	RenderSprites:
		Palette: terrain
		Image: Tier1
	Health:
		HP: 9000000
	Immobile:
		OccupiesSpace: false
	OwnerLostAction:
		Action: Dispose
	Buildable:
		Queue: Building
		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: 40
	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: Building
		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: 40
	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: Building
		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: 40
	ProximityExternalCondition@tier3:
		Condition: tier3
		Range: 500c0
		ValidRelationships: Ally
	ProvidesPrerequisite:
		Prerequisite: tier3built
	DamageMultiplier:
		Modifier: 0
	Valued:
		Cost: 5000
	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: Infantry
		BuildAtProductionType: Soldier
		BuildPaletteOrder: 1
		Description: Upgrades Wizard attack and defense. Allows teleportation (Force Move) 
		Prerequisites: magetower, ~building, ~whitemagic, ~tier1built
		BuildLimit: 1
		ValidRelationships: Ally
		BuildDurationModifier: 40
	ProximityExternalCondition@tier1:
		Condition: wizardupgrade
		Range: 500c0
	Valued:
		Cost: 2000
	ProvidesPrerequisite@upgrade:
		Prerequisite: wizardupgrade
	Voiced:
		VoiceSet: Miscvoice
		Volume: 1
	VoiceAnnouncement:
		Voice: Unitupgraded
	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: Infantry
		BuildAtProductionType: Soldier
		BuildPaletteOrder: 1
		Description: Upgrades Witch attack and defense. Allows flight (Force Move) 
		Prerequisites: magetower, ~building, ~blackmagic, ~tier1built
		BuildLimit: 1
		ValidRelationships: Ally
		BuildDurationModifier: 40
	ProximityExternalCondition@tier1:
		Condition: witchupgrade
		Range: 500c0
	Valued:
		Cost: 2000
	ProvidesPrerequisite@upgrade:
		Prerequisite: witchupgrade
	Voiced:
		VoiceSet: Miscvoice
		Volume: 1
	VoiceAnnouncement:
		Voice: Unitupgraded
	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: Infantry
		BuildAtProductionType: Soldier
		BuildPaletteOrder: 1
		Description: Grants speed and slight defense boost (Deploy)
		Prerequisites: magetower, ~building, ~whitemagic, ~tier2built
		BuildLimit: 1
		BuildDurationModifier: 40
	ProximityExternalCondition@tier1:
		Condition: battlemageupgrade
		Range: 500c0
		ValidRelationships: Ally
	Valued:
		Cost: 2000
	ProvidesPrerequisite@upgrade:
		Prerequisite: battlemageupgrade
	Voiced:
		VoiceSet: Miscvoice
		Volume: 1
	VoiceAnnouncement:
		Voice: Unitupgraded
	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: Infantry
		BuildAtProductionType: Soldier
		BuildPaletteOrder: 1
		Description: Damages nearby enemies when activated (Deploy)
		Prerequisites: magetower, ~building, ~blackmagic, ~tier2built
		BuildLimit: 1
		BuildDurationModifier: 40
	ProximityExternalCondition@tier1:
		Condition: deathknightupgrade
		Range: 500c0
		ValidRelationships: Ally
	Valued:
		Cost: 2000
	ProvidesPrerequisite@upgrade:
		Prerequisite: deathknightupgrade
	Voiced:
		VoiceSet: Miscvoice
		Volume: 1
	VoiceAnnouncement:
		Voice: Unitupgraded
	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:




