^ExistsInWorld:
	GivesExperience:
		PlayerExperienceModifier: 0

^GainsExperience:
	-GainsExperience:
	-DamageMultiplier@RANK-ELITE:
	-FirepowerMultiplier@RANK-ELITE:
	-SpeedMultiplier@RANK-ELITE:
	-ReloadDelayMultiplier@RANK-1:
	-ReloadDelayMultiplier@RANK-2:
	-ReloadDelayMultiplier@RANK-ELITE:
	-ChangesHealth@ELITE:
	GainsExperience:
		LevelUpNotification: LevelUp
		LevelUpTextNotification: notification-unit-promoted
		Conditions:
			200: rank-veteran
			400: rank-veteran
			800: rank-veteran
		LevelUpImage: crate-effects
	DamageMultiplier@RANK-1:
		RequiresCondition: rank-veteran == 1
		Modifier: 90
	DamageMultiplier@RANK-2:
		RequiresCondition: rank-veteran == 2
		Modifier: 75
	DamageMultiplier@RANK-3:
		RequiresCondition: rank-veteran == 3
		Modifier: 50
	FirepowerMultiplier@RANK-1:
		RequiresCondition: rank-veteran == 1
		Modifier: 110
	FirepowerMultiplier@RANK-2:
		RequiresCondition: rank-veteran == 2
		Modifier: 115
	FirepowerMultiplier@RANK-3:
		RequiresCondition: rank-veteran == 3
		Modifier: 120
	SpeedMultiplier@RANK-3:
		RequiresCondition: rank-veteran == 3
		Modifier: 115
	ReloadDelayMultiplier@RANK-3:
		RequiresCondition: rank-veteran == 3
		Modifier: 50
	ChangesHealth@RANK-2:
		Step: 0
		PercentageStep: 5
		Delay: 125
		StartIfBelow: 100
		DamageCooldown: 125
		RequiresCondition: rank-veteran == 2
	ChangesHealth@RANK-3:
		Step: 0
		PercentageStep: 5
		Delay: 75
		StartIfBelow: 100
		DamageCooldown: 125
		RequiresCondition: rank-veteran == 3
	WithDecoration@RANK-1:
		Image: rank
		Sequence: rank-veteran-1
		Palette: effect
		Position: BottomRight
		Margin: 5, 6
		ValidRelationships: Ally, Enemy, Neutral
		RequiresCondition: rank-veteran == 1
	WithDecoration@RANK-2:
		Image: rank
		Sequence: rank-veteran-2
		Palette: effect
		Position: BottomRight
		Margin: 5, 6
		ValidRelationships: Ally, Enemy, Neutral
		RequiresCondition: rank-veteran == 2
	WithDecoration@RANK-3:
		Image: rank
		Sequence: rank-veteran-3
		Palette: effect
		Position: BottomRight
		Margin: 5, 6
		ValidRelationships: Ally, Enemy, Neutral
		RequiresCondition: rank-veteran == 3

^GainsExperienceAircraft:
	Inherits: ^GainsExperience
	-ReloadDelayMultiplier@RANK-3:
	ReloadAmmoDelayMultiplier@RANK-3:
		RequiresCondition: rank-veteran == 3
		Modifier: 50

^InfantryExperienceHospitalOverrides:
	WithDecoration@RANK-1:
		BlinkInterval: 32
		BlinkPatterns:
			hospitalheal: On, Off
			barracksheal: On, Off
	WithDecoration@RANK-2:
		BlinkInterval: 32
		BlinkPatterns:
			hospitalheal: On, Off
			barracksheal: On, Off
	WithDecoration@RANK-3:
		BlinkInterval: 32
		BlinkPatterns:
			hospitalheal: On, Off
			barracksheal: On, Off

^Vehicle:
	Inherits@secondaryGAPeffect: ^AffectedbyGAP
	Targetable:
		RequiresCondition: !parachute
		TargetTypes: GroundActor, Vehicle, VehicleDisguise
	Targetable@PRIORITYREPAIR:
		RequiresCondition: !parachute && heavydamaged
		TargetTypes: PriorityRepair
	GrantConditionOnDamageState@HEAVYDAMAGED:
		Condition: heavydamaged
		ValidDamageStates: Heavy, Critical
	Passenger:
		Weight: 3
		CargoType: Vehicle
	ExternalCondition@CRUSH:
		Condition: slowdown
		TotalCap: 1
	SpeedMultiplier@CRUSH:
		RequiresCondition: slowdown && !parachute
		Modifier: 80
	Crushable:
		CrushClasses: vehicle
		WarnProbability: 0
		RequiresCondition: !invulnerability
	GrantExternalConditionToCrusher:
		OnCrushCondition: slowdown
		OnCrushDuration: 50
	ChangesHealth@MACHINESHOP:
		Step: 500
		Delay: 100
		StartIfBelow: 100
		DamageCooldown: 125
		RequiresCondition: machineshop
	ExternalCondition@MACHINESHOP:
		Condition: machineshop
	WithDecoration@MACHINESHOP:
		Image: select
		Palette: chrome
		Sequence: repair-small
		Position: Center
		RequiresCondition: machineshop && damaged
		BlinkInterval: 32
		BlinkPattern: on, off

^TrackedVehicle:
	Targetable:
		TargetTypes: GroundActor, Vehicle, TrackedVehicle, VehicleDisguise

^Infantry:
	Inherits@secondaryGAPeffect: ^AffectedbyGAP
	ChangesHealth@HOSPITAL:
		Step: 500
		Delay: 100
		StartIfBelow: 100
		DamageCooldown: 125
		RequiresCondition: ( barracksheal || hospitalheal )
	GrantConditionOnPrerequisite@HOSPITAL:
		Condition: hospital
		Prerequisites: hosp
	GrantConditionOnDamageState@HOSPITAL:
		Condition: damaged
		ValidDamageStates: Light, Medium, Heavy, Critical
	GrantCondition@HOSPITAL:
		RequiresCondition: hospital && damaged
		Condition: hospitalheal
	WithDecoration@REDCROSS:
		Image: pips
		Sequence: medic
		Position: BottomRight
		Margin: 17, 4
		RequiresCondition: barracksheal || hospitalheal
		BlinkInterval: 32
		BlinkPattern: Off, On
	ExternalCondition@BARRACKS:
		Condition: barracks
	GrantCondition@BARRACKS:
		RequiresCondition: barracks && damaged
		Condition: barracksheal
	GrantExternalConditionToCrusher:
		OnCrushCondition: slowdown
		OnCrushDuration: 50

^Ship:
	Inherits@secondaryGAPeffect: ^AffectedbyGAP
	Targetable@PRIORITYREPAIR:
		RequiresCondition: heavydamaged
		TargetTypes: PriorityRepair
	GrantConditionOnDamageState@HEAVYDAMAGED:
		Condition: heavydamaged
		ValidDamageStates: Heavy, Critical
	Mobile:
		PauseOnCondition: being-captured
	CaptureManager:
		BeingCapturedCondition: being-captured
	Capturable:
		Types: ship
		CancelActivity: True
	CaptureNotification:
		Notification: UnitStolen
		TextNotification: notification-unit-stolen
		LoseNotification: UnitLost
		LoseTextNotification: notification-unit-lost

^Submarine:
	Targetable:
		TargetTypes: WaterActor, Ship, Submarine
		RequiresCondition: !underwater
	Targetable@REPAIR:
		RequiresCondition: damaged && !underwater
		TargetTypes: Repair
	Targetable@PRIORITYREPAIR:
		RequiresCondition: heavydamaged && !underwater
		TargetTypes: PriorityRepair
	Cloak:
		DetectionTypes: Underwater
		InitialDelay: 0
		CloakDelay: 50
		CloakStyle: Color
		CloakSound: subshow1.aud
		UncloakSound: subshow1.aud
		CloakedCondition: underwater
		UncloakOn: Attack, Load, Unload, Heal, Dock
		PauseOnCondition: cloak-force-disabled || pinged || invulnerability
	ExternalCondition@SONARPING:
		Condition: pinged
		SourceCap: 1
		TotalCap: 1
	TimedConditionBar@SONARPING:
		Condition: pinged
		Color: ADFF2F
	Capturable:
		Types: ship
		CancelActivity: True
		RequiresCondition: !underwater

^NeutralPlane:
	Inherits@secondaryGAPeffect: ^AffectedbyGAP
	ChangesHealth@MACHINESHOP:
		Step: 500
		Delay: 100
		StartIfBelow: 100
		DamageCooldown: 125
		RequiresCondition: ( machineshop || airrepair ) && !airborne
	ExternalCondition@MACHINESHOP:
		Condition: machineshop
	WithDecoration@MACHINESHOP:
		Image: select
		Palette: chrome
		Sequence: repair-small
		Position: Center
		RequiresCondition: ( machineshop || airrepair ) && damaged && !airborne
		BlinkInterval: 32
		BlinkPattern: on, off
	ExternalCondition@AIRREPAIR:
		Condition: airrepair

^Helicopter:
	Repairable:
		RepairActors: fix, carr.deployed

^Building:
	Capturable:
		RequiresCondition: !build-incomplete
		Types: building, sabotage
	InstantlyRepairable:
		Types: building
	RepairableBuilding:
		PlayerExperience: 0

^BasicBuilding:
	Inherits@secondaryGAPeffect: ^AffectedbyGAP
	ActorPreviewPlaceBuildingPreview:
		PreviewAlpha: 0.65
		Animated: false
	RequiresBuildableArea:
		AreaTypes: building
		Adjacent: 3

^Wall:
	RequiresBuildableArea:
		AreaTypes: building
		Adjacent: 6
	LineBuild:
		Range: 6
		NodeTypes: wall
	GrantExternalConditionToCrusher:
		OnCrushCondition: slowdown
		OnCrushDuration: 50

^FakeBuilding:
	FireWarheadsOnDeath:
		DamageThreshold: 50

^InfiltratableFake:
	InfiltrateForDecoration:
		PlayerExperience: 0

^Husk:
	Crushable:
		CrushClasses: husk
		WarnProbability: 0
	GrantExternalConditionToCrusher:
		OnCrushCondition: slowdown
		OnCrushDuration: 50

^Mine:
	ExternalCondition@MADBOOM:
		Condition: minekill
	KillsSelf@MADBOOM:
		RequiresCondition: minekill

^TechBuildingHusk:
	Inherits@1: ^SpriteActor
	Inherits@shape: ^1x1Shape
	Interactable:
	AppearsOnRadar:
	Health:
		HP: 20000
	Armor:
		Type: Concrete
	DamageMultiplier@IsInvulnerable:
		Modifier: 0
	Building:
		Dimensions: 1,1
		Footprint: x
	WithSpriteBody:
	Targetable:
		RequiresForceFire: true
		TargetTypes: Ground, Husk, NoAutoTarget
	Tooltip:
		GenericName: meta-techbuilding-husk-name
		GenericStancePrefix: false
		ShowOwnerRow: false
	FrozenUnderFog:
	ScriptTriggers:
	MapEditorData:
		Categories: Husk
	CaptureManager:
	Capturable:
		Types: restore-tech
	CapturableProgressBlink:
	Targetable@AIFixer:
		TargetTypes: IgnoreThis

^AutoTargetGroundAssaultMovePrioritizeVehicles:
	Inherits: ^AutoTargetGroundAssaultMove
	AutoTargetPriority@DEFAULT:
		ValidTargets: Infantry, Ship, Underwater, Defense, Mine
	AutoTargetPriority@DEFAULTVEH:
		ValidTargets: Vehicle
		InvalidTargets: NoAutoTarget
		Priority: 7
	AutoTargetPriority@DEFAULTTANK:
		ValidTargets: TrackedVehicle
		InvalidTargets: NoAutoTarget
		Priority: 10

^AutoTargetGroundAssaultMovePrioritizeInfantry:
	Inherits: ^AutoTargetGroundAssaultMove
	AutoTargetPriority@DEFAULT:
		ValidTargets: Vehicle, Ship, Underwater, Defense, Mine
	AutoTargetPriority@DEFAULTLVEH:
		ValidTargets: WheeledVehicle
		InvalidTargets: NoAutoTarget
		Priority: 7
	AutoTargetPriority@DEFAULTINF:
		ValidTargets: Infantry
		InvalidTargets: NoAutoTarget
		Priority: 10

^AutoTargetGroundAssaultMovePrioritizeShips:
	Inherits: ^AutoTargetGroundAssaultMove
	AutoTargetPriority@DEFAULT:
		ValidTargets: Infantry, Vehicle, Defense, Mine
	AutoTargetPriority@DEFAULTSEA:
		ValidTargets: Ship, Underwater
		InvalidTargets: NoAutoTarget
		Priority: 10

^AutoTargetGroundAssaultMovePrioritizeDefenses:
	Inherits: ^AutoTargetGroundAssaultMove
	AutoTargetPriority@DEFAULT:
		ValidTargets: Infantry, Vehicle, Ship, Underwater, Mine
	AutoTargetPriority@DEFAULTDEF:
		ValidTargets: Defense
		InvalidTargets: NoAutoTarget
		Priority: 10

^AutoTargetAllAssaultMovePrioritizeGround:
	Inherits: ^AutoTargetAllAssaultMove
	AutoTargetPriority@DEFAULT:
		ValidTargets: Infantry, Vehicle, Ship, Underwater, Defense, Mine
	AutoTargetPriority@DEFAULTAA:
		ValidTargets: AirborneActor
		InvalidTargets: NoAutoTarget
		Priority: 0

^AutoTargetAllAssaultMovePrioritizeAir:
	Inherits: ^AutoTargetAllAssaultMove
	AutoTargetPriority@DEFAULT:
		ValidTargets: Infantry, Vehicle, Ship, Underwater, Defense, Mine
	AutoTargetPriority@DEFAULTAA:
		ValidTargets: AirborneActor
		InvalidTargets: NoAutoTarget
		Priority: 10

^AutoTargetGroundPrioritizeInfantry:
	Inherits: ^AutoTargetGround
	AutoTargetPriority@DEFAULT:
		ValidTargets: Vehicle, Ship, Underwater, Defense, Mine
	AutoTargetPriority@DEFAULTLVEH:
		ValidTargets: WheeledVehicle
		InvalidTargets: NoAutoTarget
		Priority: 7
	AutoTargetPriority@DEFAULTINF:
		ValidTargets: Infantry
		InvalidTargets: NoAutoTarget
		Priority: 10

^AutoTargetGroundPrioritizeVehicles:
	Inherits: ^AutoTargetGround
	AutoTargetPriority@DEFAULT:
		ValidTargets: Infantry, Ship, Underwater, Defense, Mine
	AutoTargetPriority@DEFAULTVEH:
		ValidTargets: Vehicle
		InvalidTargets: NoAutoTarget
		Priority: 7
	AutoTargetPriority@DEFAULTTANK:
		ValidTargets: TrackedVehicle
		InvalidTargets: NoAutoTarget
		Priority: 10

^AffectedbyGAP:
	RangeMultiplier@WEAPONVEILED:
		Modifier: 50
		RequiresCondition: gapdebuff
	ExternalCondition@WEAPONVEILED:
		Condition: gapdebuff

^WeaponJammable:
	RevealsShroudMultiplier@WEAPONJAMMED:
		RequiresCondition: jamdebuff
		Modifier: -100
	ReloadDelayMultiplier@WEAPONJAMMED:
		RequiresCondition: jamdebuff
		Modifier: 300
	ExternalCondition@WEAPONJAMMED:
		Condition: jamdebuff
	Targetable@WEAPONJAMMABLE:
		TargetTypes: WeaponJammable
		RequiresCondition: !jamdebuff && !invulnerability
	WithDecoration@WEAPONJAMMED:
		Position: Top
		Margin: 0, -6
		Image: pips
		Sequence: tag-jammed
		Palette: effect
		RequiresCondition: jamdebuff
		ValidRelationships: Ally, Neutral, Enemy
