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

	<!-- ========== Remove Duplicate Rimsenal Smoke Grenade =========== -->
	<Operation Class="PatchOperationRemove">
		<xpath>Defs/ThingDef[defName="Proj_GrenadeSmoke" and graphicData/texPath="Things/Projectile/SmokeGrenade"]</xpath> <!-- TODO: Figure out if this also needs to be renamed-->
	</Operation>

	<Operation Class="PatchOperationRemove">
		<xpath>Defs/ThingDef[defName="Weapon_GrenadeSmoke" and graphicData/texPath="Things/A16/SmokeGrenades"]</xpath>
	</Operation>

	<!-- ========== Compound Bow =========== -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Bow_Compound</defName>
		<statBases>
			<WorkToMake>22000</WorkToMake>
			<SightsEfficiency>0.8</SightsEfficiency>
			<ShotSpread>0.6</ShotSpread>
			<SwayFactor>2</SwayFactor>
			<Bulk>4.5</Bulk>
			<Mass>1.6</Mass>
			<RangedWeapon_Cooldown>1.15</RangedWeapon_Cooldown>
		</statBases>
		<costList>
			<Steel>5</Steel>
			<ComponentIndustrial>2</ComponentIndustrial>
			<Chemfuel>15</Chemfuel>
		</costList>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Projectile_CompoundArrow_Broadhead</defaultProjectile>
			<warmupTime>1</warmupTime>
			<range>26</range>
			<soundCast>Bow_Large</soundCast>
		</Properties>
		<AmmoUser>
			<ammoSet>AmmoSet_CompoundArrow</ammoSet>
			<AmmoGenPerMagOverride>5</AmmoGenPerMagOverride>
		</AmmoUser>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>CE_Bow</li>
		</weaponTags>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Bow_Compound"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>3</power>
					<cooldownTime>1.76</cooldownTime>
					<armorPenetrationBlunt>1.76</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Base</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- ========== Throwing Axe =========== -->
	<Operation Class="PatchOperationAttributeSet">
		<xpath>Defs/ThingDef[defName="Gun_ThrowingAxes"]</xpath>
		<attribute>ParentName</attribute>
		<value>BaseWeapon</value>
	</Operation>

	<Operation Class="PatchOperationRemove">
		<xpath>Defs/ThingDef[defName="Gun_ThrowingAxes"]/costList</xpath>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Gun_ThrowingAxes"]</xpath>
		<value>
			<thingCategories>
				<li>WeaponsRanged</li>
			</thingCategories>
		</value>
	</Operation>

	<Operation Class="PatchOperationRemove">
		<xpath>Defs/ThingDef[defName="Gun_ThrowingAxes"]/recipeMaker</xpath>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Gun_ThrowingAxes"]/label</xpath>
		<value>
			<label>Throwing axe</label>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Gun_ThrowingAxes"]/statBases</xpath>
		<value>
			<statBases>
				<SightsEfficiency>1.0</SightsEfficiency>
				<ShotSpread>0.6</ShotSpread>
				<SwayFactor>2</SwayFactor>
				<Bulk>1.25</Bulk>
				<Mass>0.75</Mass>
				<RangedWeapon_Cooldown>1.5</RangedWeapon_Cooldown>
			</statBases>
			<stackLimit>25</stackLimit>
			<tradeTags>
				<li>CE_AutoEnableTrade</li>
				<li>CE_AutoEnableCrafting</li>
			</tradeTags>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Gun_ThrowingAxes"]/verbs</xpath>
		<value>
			<verbs>
				<li Class="CombatExtended.VerbPropertiesCE">
					<verbClass>CombatExtended.Verb_ShootCEOneUse</verbClass>
					<hasStandardCommand>true</hasStandardCommand>
					<defaultProjectile>Axe_Thrown</defaultProjectile>
					<warmupTime>1.5</warmupTime>
					<range>16</range>
					<soundCast>Interact_BeatFire</soundCast>
				</li>
			</verbs>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Gun_ThrowingAxes"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>handle</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>2</power>
					<cooldownTime>1.4</cooldownTime>
					<armorPenetrationBlunt>0.375</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Handle</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>edge</label>
					<capacities>
						<li>Cut</li>
					</capacities>
					<power>18</power>
					<cooldownTime>2.62</cooldownTime>
					<chanceFactor>1.5</chanceFactor>
					<armorPenetrationBlunt>1.5</armorPenetrationBlunt>
					<armorPenetrationSharp>1.25</armorPenetrationSharp>
					<linkedBodyPartsGroup>Edge</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- ========== Throwing Club =========== -->
	<Operation Class="PatchOperationAttributeSet">
		<xpath>Defs/ThingDef[defName="Gun_ThrowingClubs"]</xpath>
		<attribute>ParentName</attribute>
		<value>BaseWeapon</value>
	</Operation>

	<Operation Class="PatchOperationRemove">
		<xpath>Defs/ThingDef[defName="Gun_ThrowingClubs"]/costList</xpath>
	</Operation>

	<Operation Class="PatchOperationRemove">
		<xpath>Defs/ThingDef[defName="Gun_ThrowingClubs"]/recipeMaker</xpath>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Gun_ThrowingClubs"]</xpath>
		<value>
			<techLevel>Neolithic</techLevel>
			<thingCategories>
				<li>WeaponsRanged</li>
			</thingCategories>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Gun_ThrowingClubs"]/label</xpath>
		<value>
			<label>Throwing club</label>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Gun_ThrowingClubs"]/statBases</xpath>
		<value>
			<statBases>
				<SightsEfficiency>1.0</SightsEfficiency>
				<ShotSpread>0.6</ShotSpread>
				<SwayFactor>2</SwayFactor>
				<Bulk>1</Bulk>
				<Mass>0.5</Mass>
				<RangedWeapon_Cooldown>1.3</RangedWeapon_Cooldown>
			</statBases>
			<stackLimit>25</stackLimit>
			<tradeTags>
				<li>CE_AutoEnableTrade</li>
				<li>CE_AutoEnableCrafting_CraftingSpot</li>
			</tradeTags>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Gun_ThrowingClubs"]/verbs</xpath>
		<value>
			<verbs>
				<li Class="CombatExtended.VerbPropertiesCE">
					<verbClass>CombatExtended.Verb_ShootCEOneUse</verbClass>
					<hasStandardCommand>true</hasStandardCommand>
					<defaultProjectile>Club_Thrown</defaultProjectile>
					<warmupTime>1.5</warmupTime>
					<range>16</range>
					<soundCast>Interact_BeatFire</soundCast>
				</li>
			</verbs>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Gun_ThrowingClubs"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>handle</label>
					<capacities>
						<li>Poke</li>
					</capacities>
					<power>3</power>
					<cooldownTime>1.69</cooldownTime>
					<armorPenetrationBlunt>0.8</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Handle</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>9</power>
					<cooldownTime>3.29</cooldownTime>
					<chanceFactor>1.5</chanceFactor>
					<armorPenetrationBlunt>3.2</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Head</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- ========== No Blowgun (Yet) =========== -->
	<Operation Class="PatchOperationRemove">
		<xpath>Defs/ThingDef[defName="Gun_Blowgun"]</xpath>
	</Operation>

	<!--			
<li Class="CombatExtended.PatchOperationMakeGunCECompatible">
	<defName>Gun_Blowgun</defName>
	<statBases>
		<WorkToMake>600</WorkToMake>
		<SightsEfficiency>0.7</SightsEfficiency>
		<ShotSpread>0.6</ShotSpread>
		<SwayFactor>2.5</SwayFactor>
		<Bulk>2</Bulk>
		<Mass>1</Mass>
		<RangedWeapon_Cooldown>4</RangedWeapon_Cooldown>
	</statBases>
	<costList>
		<Wood>20</Wood>
	</costList>
	<Properties>				
		<verbClass>CombatExtended.Verb_ShootCE</verbClass>
		<hasStandardCommand>true</hasStandardCommand>
		<defaultProjectile>Projectile_Blowdart</defaultProjectile>
		<warmupTime>1</warmupTime>
		<range>22</range>
		<soundCast>Beat_Fire</soundCast>
	</Properties>
	<AmmoUser>
		<ammoSet>AmmoSet_Blowdart</ammoSet>
	</AmmoUser>
	<FireModes>
		<aiAimMode>AimedShot</aiAimMode>
	</FireModes>
	<weaponTags>
	<li>CE_Bow</li>
	</weaponTags>
</li>

-->
</Patch>