<?xml version="1.0" encoding="utf-8"?>
<Patch>

	<!-- ========== Light Mechanoid ========== -->

	<Operation Class="PatchOperationConditional">
		<xpath>Defs/ThingDef[defName="Mech_Militor_Scout"]/comps</xpath>
		<nomatch Class="PatchOperationAdd">
			<xpath>Defs/ThingDef[defName="Mech_Militor_Scout"]</xpath>
			<value>
				<comps />
			</value>
		</nomatch>
	</Operation>

	<Operation Class="PatchOperationConditional">
		<xpath>Defs/ThingDef[defName="Mech_Militor_Sniper"]/comps</xpath>
		<nomatch Class="PatchOperationAdd">
			<xpath>Defs/ThingDef[defName="Mech_Militor_Sniper"]</xpath>
			<value>
				<comps />
			</value>
		</nomatch>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Mech_Militor_Sniper" or defName="Mech_Militor_Scout"]/comps</xpath>
		<value>
			<li Class="CombatExtended.CompProperties_ArmorDurability">
				<Durability>700</Durability>
				<Regenerates>true</Regenerates>
				<RegenInterval>1250</RegenInterval>
				<RegenValue>5</RegenValue>
				<Repairable>true</Repairable>
				<RepairIngredients>
					<Steel>5</Steel>
					<Plasteel>5</Plasteel>
				</RepairIngredients>
				<RepairTime>300</RepairTime>
				<RepairValue>200</RepairValue>
				<MinArmorPct>0.75</MinArmorPct>
			</li>
		</value>
	</Operation>

	<!-- ========== Militor ========== -->

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="Mech_Militor_Sniper" or defName="Mech_Militor_Scout"]</xpath>
		<value>
			<li Class="CombatExtended.RacePropertiesExtensionCE">
				<bodyShape>Humanoid</bodyShape>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Mech_Militor_Sniper" or defName="Mech_Militor_Scout"]/statBases</xpath>
		<value>
			<ArmorRating_Blunt>4</ArmorRating_Blunt>
			<ArmorRating_Sharp>2.5</ArmorRating_Sharp>
			<AimingAccuracy>0.6</AimingAccuracy>
			<ShootingAccuracyPawn>0.769</ShootingAccuracyPawn> <!-- Equivalent to a Level 5 Shooter, even if they are snipers they would be too strong as they are basic tech and subcore -->
			<MeleeDodgeChance>0.13</MeleeDodgeChance>
			<MeleeCritChance>0.05</MeleeCritChance>
			<MeleeParryChance>0.05</MeleeParryChance>
			<MaxHitPoints>150</MaxHitPoints>
			<NightVisionEfficiency>0.4</NightVisionEfficiency>
		</value>
	</Operation>
	
</Patch>