<?xml version="1.0" encoding="utf-8"?>
<Patch>
	<!--Plate Helm-->
	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Mechanized_Helm_Apparel"]/statBases</xpath>
		<value>
			<Bulk>5</Bulk>
			<WornBulk>1</WornBulk>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Mechanized_Helm_Apparel"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<ArmorRating_Sharp>3.5</ArmorRating_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Mechanized_Helm_Apparel"]/statBases/ArmorRating_Blunt</xpath>
		<value>
			<ArmorRating_Blunt>5.2</ArmorRating_Blunt>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Mechanized_Helm_Apparel"]/equippedStatOffsets</xpath>
		<value>
			<SmokeSensitivity>-0.8</SmokeSensitivity>
		</value>
	</Operation>

	<!--Plate Armour-->
	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Mechanized_Plate_Apparel"]/statBases</xpath>
		<value>
			<Bulk>90</Bulk>
			<WornBulk>12</WornBulk>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Mechanized_Plate_Apparel"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<ArmorRating_Sharp>7.2</ArmorRating_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Mechanized_Plate_Apparel"]/statBases/ArmorRating_Blunt</xpath>
		<value>
			<ArmorRating_Blunt>10.8</ArmorRating_Blunt>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Mechanized_Plate_Apparel"]/apparel/bodyPartGroups</xpath>
		<value>
			<li>Hands</li>
			<li>Feet</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Mechanized_Plate_Apparel"]/equippedStatOffsets</xpath>
		<value>
			<CarryWeight>12</CarryWeight>
		</value>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="Mechanized_Plate_Apparel"]</xpath>
		<value>
			<li Class="CombatExtended.PartialArmorExt">
				<stats>
					<li>
						<ArmorRating_Sharp>0.60</ArmorRating_Sharp>
						<parts>
							<li>Neck</li>
						</parts>
					</li>
					<li>
						<ArmorRating_Blunt>0.60</ArmorRating_Blunt>
						<parts>
							<li>Neck</li>
						</parts>
					</li>
					<li>
						<ArmorRating_Sharp>0.90</ArmorRating_Sharp>
						<parts>
							<li>Leg</li>
						</parts>
					</li>
					<li>
						<ArmorRating_Blunt>0.90</ArmorRating_Blunt>
						<parts>
							<li>Leg</li>
						</parts>
					</li>
					<li>
						<ArmorRating_Sharp>0.80</ArmorRating_Sharp>
						<parts>
							<li>Arm</li>
						</parts>
					</li>
					<li>
						<ArmorRating_Blunt>0.80</ArmorRating_Blunt>
						<parts>
							<li>Arm</li>
						</parts>
					</li>
					<li>
						<ArmorRating_Sharp>0.60</ArmorRating_Sharp>
						<parts>
							<li>Hand</li>
						</parts>
					</li>
					<li>
						<ArmorRating_Blunt>0.60</ArmorRating_Blunt>
						<parts>
							<li>Hand</li>
						</parts>
					</li>
				</stats>
			</li>
		</value>
	</Operation>

	<!--Musket-->
	<!--Tools-->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Mechanized_Musket"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>Stock</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>8</power>
					<cooldownTime>1.55</cooldownTime>
					<chanceFactor>1.5</chanceFactor>
					<armorPenetrationBlunt>2.755</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Stock</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>Barrel</label>
					<capacities>
						<li>Blunt</li>
						<li>Poke</li>
					</capacities>
					<power>9</power>
					<cooldownTime>2.0</cooldownTime>
					<armorPenetrationBlunt>1.630</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Barrel</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>Bayonet</label>
					<capacities>
						<li>Stab</li>
					</capacities>
					<power>23</power>
					<cooldownTime>2.6</cooldownTime>
					<armorPenetrationSharp>4.755</armorPenetrationSharp>
					<armorPenetrationBlunt>6.5</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Muzzle</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>
	<!--Shooting-->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Mechanized_Musket</defName>
		<statBases>
			<Mass>1.25</Mass>
			<Bulk>3.90</Bulk>
			<SwayFactor>1.02</SwayFactor>
			<ShotSpread>0.36</ShotSpread>
			<SightsEfficiency>0.9</SightsEfficiency>
			<RangedWeapon_Cooldown>0.85</RangedWeapon_Cooldown>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>True</hasStandardCommand>
			<defaultProjectile>Bullet_FastMusketBall</defaultProjectile>
			<warmupTime>1.2</warmupTime>
			<range>26</range>
			<soundCast>Shot_AssaultRifle</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>4</muzzleFlashScale>
		</Properties>
		<AmmoUser>
			<magazineSize>8</magazineSize>
			<reloadTime>10</reloadTime>
			<ammoSet>AmmoSet_FastMusketBall</ammoSet>
			<reloadOneAtATime>true</reloadOneAtATime>
		</AmmoUser>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Mechanized_Musket"]/weaponTags</xpath>
		<value>
			<li>NoSwitch</li>
		</value>
	</Operation>
</Patch>