^HarvesterUpgrades:
	GrantConditionOnPrerequisite@vision1:
		Condition: vision_level1
		Prerequisites: upgrade.vision1
	GrantConditionOnPrerequisite@vision2:
		Condition: vision_level2
		Prerequisites: upgrade.vision2
	GrantConditionOnPrerequisite@vision3:
		Condition: vision_level3
		Prerequisites: upgrade.vision3
	RevealsShroudMultiplier@level1:
		Modifier: 150
		RequiresCondition: vision_level1
	RevealsShroudMultiplier@level2:
		Modifier: 160
		RequiresCondition: vision_level2
	RevealsShroudMultiplier@level3:
		Modifier: 170
		RequiresCondition: vision_level3
	DetectCloaked@level1:
		Range: 4c0
		RequiresCondition: vision_level1
	DetectCloaked@level2:
		Range: 7c0
		RequiresCondition: vision_level2
	DetectCloaked@level3:
		Range: 10c0
		RequiresCondition: vision_level3
	GrantConditionOnPrerequisite@hp1:
		Condition: armor_level1
		Prerequisites: upgrade.armor1
	GrantConditionOnPrerequisite@hp2:
		Condition: armor_level2
		Prerequisites: upgrade.armor2
	GrantConditionOnPrerequisite@hp3:
		Condition: armor_level3
		Prerequisites: upgrade.armor3
	DamageMultiplier@level1:
		Modifier: 90
		RequiresCondition: armor_level1
	DamageMultiplier@level2:
		Modifier: 80
		RequiresCondition: armor_level2
	DamageMultiplier@level3:
		Modifier: 70
		RequiresCondition: armor_level3

^Harvesters_SpeedUP:
	WithDecoration@speedup:
		Image: pips
		Margin: 4, 4
		Sequence: pickup-indicator
		RequiresCondition: speed_up
		ValidRelationships: Ally, Enemy, Neutral
	ExternalCondition@speedUP:
		Condition: speed_up
	SpeedMultiplier@speedBonus:
		RequiresCondition: speed_up
		Modifier: 150
	WithColoredOverlay@yellow:
		Color: C7CA025E
		RequiresCondition: jammed
	Contrail:
		StartWidth: 750
		StartColor: EAFF2FB0
		EndColor: E0F89C32
		Offset: -250,0,0
		EndColorAlpha: 0
		TrailLength: 25
		RequiresCondition: speed_up
		ZOffset: -250

^HarvesterTurrets_d2k:
	Inherits: ^AutoTargetGround
	GrantConditionOnPrerequisite@trikeTurret:
		Prerequisites: upgrade.turret_trike
		Condition: trike_turret
	GrantConditionOnPrerequisite@cannonTurret:
		Prerequisites: upgrade.turret_cannon
		Condition: cannon_turret
	GrantConditionOnBotOwner@dontShoot:
		Condition: bot
		Bots: dummy_bot, campaign, racer_AI
	WithMuzzleOverlay:
	Armament@trike:
		Weapon: HMG
		LocalOffset: -200,0,0
		MuzzleSequence: muzzle_trike
		Name: primary
		RequiresCondition: trike_turret
		Recoil: 64
		RecoilRecovery: 22
	Armament@trikeMuzzle:
		Weapon: HMG_muzzle
		LocalOffset: -200,0,0
		MuzzleSequence: muzzle_trike
		RequiresCondition: trike_turret
		Name: primary
	Turreted@trike:
		Turret: primary
		TurnSpeed: 22
		RequiresCondition: trike_turret
	AttackTurreted:
		Turrets: primary, secondary
		RequiresCondition: trike_turret || cannon_turret
		PauseOnCondition: bot && temporery_clock
		Armaments: primary, secondary
	WithSpriteTurret@trike:
		RequiresCondition: trike_turret
		Sequence: turret_trike
		Turret: primary
	WithSpriteTurret@cannon:
		RequiresCondition: cannon_turret
		Sequence: turret_cannon
		Turret: secondary
	Armament@cannon:
		Name: secondary
		Turret: secondary
		Weapon: 80mm_harvester
		Recoil: 128
		RecoilRecovery: 32
		LocalOffset: 256,0,0
		MuzzleSequence: muzzle_cannon
		RequiresCondition: cannon_turret
	Turreted@cannon:
		Turret: secondary
		TurnSpeed: 22
		RequiresCondition: cannon_turret

^HarvesterTurrets_cnc:
	Inherits: ^AutoTargetGround
	GrantConditionOnPrerequisite@buggyTurret:
		Prerequisites: upgrade.turret_buggy
		Condition: buggy_turret
	GrantConditionOnPrerequisite@cannonTurret:
		Prerequisites: upgrade.turret_atwr
		Condition: atwr_turret
	GrantConditionOnBotOwner@dontShoot:
		Condition: bot
		Bots: dummy_bot, campaign, racer_AI
	WithMuzzleOverlay:
	Armament@buggy:
		Weapon: HMG_buggy
		LocalOffset: 150,0,0
		MuzzleSequence: muzzle
		MuzzlePalette: cnc_temperat
		Name: primary
		RequiresCondition: buggy_turret
		Recoil: 64
		RecoilRecovery: 22
	Turreted@buggy:
		Turret: primary
		TurnSpeed: 40
		Offset: -43,0,128
		RequiresCondition: buggy_turret
	AttackTurreted:
		Turrets: primary, secondary
		RequiresCondition: buggy_turret || atwr_turret
		PauseOnCondition: bot && temporery_clock
		Armaments: primary, secondary
	WithSpriteTurret@trike:
		RequiresCondition: buggy_turret
		Sequence: turret_buggy
		Turret: primary
	WithSpriteTurret@cannon:
		RequiresCondition: atwr_turret
		Sequence: turret_atwr
		Turret: secondary
	Armament@cannon:
		Name: secondary
		Turret: secondary
		Weapon: atwr
		Recoil: 0
		RecoilRecovery: 32
		LocalOffset: 256,0,0
		MuzzleSequence: muzzle_atwr
		RequiresCondition: atwr_turret
	Turreted@cannon:
		Turret: secondary
		TurnSpeed: 22
		RequiresCondition: atwr_turret

^HarvesterTurrets_ra:
	Inherits: ^AutoTargetGround
	GrantConditionOnPrerequisite@buggyTurret:
		Prerequisites: upgrade.turret_flak
		Condition: flak_turret
	GrantConditionOnPrerequisite@cannonTurret:
		Prerequisites: upgrade.turret_doble_cannon
		Condition: cannon_turret
	GrantConditionOnBotOwner@dontShoot:
		Condition: bot
		Bots: dummy_bot, campaign, racer_AI
	WithMuzzleOverlay:
	Armament@flak:
		Weapon: FLAK-23-AG
		Recoil: 85
		LocalOffset: 300,0,200
		MuzzleSequence: muzzle
		MuzzlePalette: cnc_temperat
		Name: primary
		RequiresCondition: flak_turret
	Turreted@flak:
		Turret: primary
		TurnSpeed: 40
		Offset: -43,0,128
		RequiresCondition: flak_turret
	AttackTurreted:
		Turrets: primary, secondary
		RequiresCondition: flak_turret || cannon_turret
		PauseOnCondition: bot && temporery_clock
		Armaments: primary, secondary
	WithSpriteTurret@trike:
		RequiresCondition: flak_turret
		Sequence: turret_flak
		Turret: primary
	WithSpriteTurret@cannon:
		RequiresCondition: cannon_turret
		Sequence: turret_cannon
		Turret: secondary
	Armament@cannon:
		Name: secondary
		Weapon: 105mm
		Recoil: 128
		RecoilRecovery: 38
		LocalOffset: 0,85,90, 0,-85,90
		MuzzleSequence: muzzle_cannon
		RequiresCondition: cannon_turret
		Turret: secondary
	Turreted@cannon:
		Turret: secondary
		TurnSpeed: 22
		RequiresCondition: cannon_turret

^IronCurtainable:
	WithColoredOverlay@IRONCURTAIN:
		RequiresCondition: invulnerability
	DamageMultiplier@IRONCURTAIN:
		RequiresCondition: invulnerability
		Modifier: 0
	TimedConditionBar:
		Condition: invulnerability
	ExternalCondition@INVULNERABILITY:
		Condition: invulnerability


harvester:
	Inherits@Harvesters_speedup: ^Harvesters_SpeedUP
	Inherits@harvesterupgrades: ^HarvesterUpgrades
	Inherits@itemRepair: ^Field_repair
	ExternalCondition@victory:
		Condition: victory
	Targetable:
		TargetTypes: Ground, C4, Tank, Harvester
	ScriptTags:
	-Armament@chaos_bomb_influence:
	Buildable:
		Queue: Armor
		Prerequisites: ~disabled
	AttractsWorms:
		Intensity: 700
	AnnounceOnSeen:
	Valued:
		Cost: 1200
	WithDockingAnimation:
	Harvester:
		Capacity: 20
		SearchOnCreation: false
		DeliveryBuildings:
		HarvestFacings: 8
		Resources: Spice
		BaleUnloadDelay: 3
		SearchFromProcRadius: 20
		SearchFromHarvesterRadius: 20
		EmptyCondition: harvesterEmpty
	Refinery:
		UseStorage: False
		DockAngle: 640
	Health:
		HP: 45000
	Mobile:
		Speed: 38
		CanMoveBackward: True
		BackwardDuration: 50
		PauseOnCondition: notmobile || victory
	RevealsShroud:
		Range: 3c768
	-ChangesHealth:
	Explodes:
		Weapon: UnitExplodeLarge
		EmptyWeapon: UnitExplodeLarge
	SpawnActorOnDeath:
		Actor: harvester.Husk
		OwnerType: InternalName
		RequiresCondition: !worm_attack
		EffectiveOwnerFromOwner: true
	ThrowsShrapnel@ShrapnelNotEmpty:
		Weapons: Debris, Debris2, Debris3, Debris4
		Pieces: 3, 5
		Range: 1c0, 6c0
	ThrowsShrapnel@DeathHandClusterDebris:
		Weapons: DeathHandClusterDebris
		Pieces: 1, 3
		Range: 1c0, 5c0
	ThrowsShrapnel@ShrapnelEmpty:
		Weapons: Debris, Debris2
		Pieces: 0, 2
		Range: 1c0, 6c0
		RequiresCondition: harvesterEmpty
	ThrowsShrapnel@throwSpice:
		Weapons: HarvesterSpiceExplosion
		Pieces: 1, 4
		Range: 1c0, 5c0
		RequiresCondition: !harvesterEmpty
	ThrowsShrapnel@wheel:
		Weapons: debris_harvester_wheel01, debris_harvester_wheel02
		Pieces: 0, 2
		Range: 3c0, 5c0
	ProximityExternalCondition@harvesterPressence:
		Condition: harvester_near
		ValidRelationships: Ally, Enemy, Neutral
		Range: 6c0

harvester.d2k:
	Inherits@turrtes: ^HarvesterTurrets_d2k
	Inherits: harvester
	RenderSprites:
		Image: harvester


harvester.ra:
	Inherits: harvester
	Inherits@raTurrets: ^HarvesterTurrets_ra
	Inherits@ironCurtain: ^IronCurtainable
	RenderSprites:
		PlayerPalette: player_ra
	-WithHarvestOverlay:
	WithHarvestAnimation:
	Health:
		HP: 40000
	Cloak@temporeryclock:
		Palette: cloak_ra
	SpawnActorOnDeath:
		Actor: harvester.ra.husk


harvester.cnc:
	Inherits: harvester
	Inherits@cncTurrets: ^HarvesterTurrets_cnc
	RenderSprites:
		PlayerPalette: player_cnc
	-WithHarvestOverlay:
	WithHarvestAnimation:
	Cloak@temporeryclock:
		Palette: cloak_cnc
	Health:
		HP: 38000
	SpawnActorOnDeath:
		Actor: harvester.cnc.husk


harvester.normal:
	Inherits: harvester
	RenderSprites:
		Image: harvester
	-Refinery: