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

	<!-- === Long Bow === -->
	<!-- == Weapon == -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>VWE_Bow_Long</defName>
		<statBases>
			<SightsEfficiency>0.8</SightsEfficiency>
			<ShotSpread>1</ShotSpread>
			<SwayFactor>2</SwayFactor>
			<Bulk>5.50</Bulk>
			<RangedWeapon_Cooldown>1</RangedWeapon_Cooldown>
		</statBases>
		<costList>
			<WoodLog>65</WoodLog>
		</costList>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Projectile_GreatArrow_Stone</defaultProjectile>
			<warmupTime>1.5</warmupTime>
			<range>30</range>
			<soundCast>Bow_Large</soundCast>
		</Properties>
		<AmmoUser>
			<ammoSet>AmmoSet_GreatArrow</ammoSet>
			<AmmoGenPerMagOverride>5</AmmoGenPerMagOverride>
		</AmmoUser>
		<FireModes />
		<weaponTags>
			<li>NeolithicRangedBasic</li>
			<li>NeolithicRangedHeavy</li>
			<li>CE_Bow</li>
		</weaponTags>
		<AllowWithRunAndGun>false</AllowWithRunAndGun>
	</Operation>

	<!-- == Tools == -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="VWE_Bow_Long"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>7</power>
					<cooldownTime>1.6</cooldownTime>
					<armorPenetrationBlunt>0.65</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- === Throwing Rock === -->
	<!-- == Projectile == -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="VWE_Rock"]/projectile</xpath>
		<value>
			<projectile Class="CombatExtended.ProjectilePropertiesCE">
				<damageDef>Blunt</damageDef>
				<damageAmountBase>15</damageAmountBase>
				<armorPenetrationBlunt>3.12</armorPenetrationBlunt>
				<dropsCasings>false</dropsCasings>
				<flyOverhead>false</flyOverhead>
			</projectile>
		</value>
	</Operation>

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

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

	<Operation Class="PatchOperationRemove">
		<xpath>
			Defs/ThingDef[defName="VWE_Throwing_Rocks"]/recipeMaker |
			Defs/ThingDef[defName="VWE_Throwing_Rocks"]/costStuffCount |
			Defs/ThingDef[defName="VWE_Throwing_Rocks"]/stuffCategories
		</xpath>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="VWE_Throwing_Rocks"]/smeltable</xpath>
		<value>
			<thingClass>CombatExtended.AmmoThing</thingClass>
			<stackLimit>75</stackLimit>
			<resourceReadoutPriority>First</resourceReadoutPriority>
			<smeltable>false</smeltable>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="VWE_Throwing_Rocks"]/graphicData</xpath>
		<value>
			<color>(158,153,135)</color>
		</value>
	</Operation>

	<Operation Class="PatchOperationAttributeSet">
		<xpath>Defs/ThingDef[defName="VWE_Throwing_Rocks"]</xpath>
		<attribute>Class</attribute>
		<value>CombatExtended.AmmoDef</value>
	</Operation>

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

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>VWE_Throwing_Rocks</defName>
		<statBases>
			<Mass>0.5</Mass>
			<Bulk>0.25</Bulk>
			<SightsEfficiency>1</SightsEfficiency>
			<RangedWeapon_Cooldown>1</RangedWeapon_Cooldown>
		</statBases>
		<Properties>
			<label>throw rock</label>
			<verbClass>CombatExtended.Verb_ShootCEOneUse</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>VWE_Rock</defaultProjectile>
			<range>10</range>
			<warmupTime>1.8</warmupTime>
			<soundCast>ThrowGrenade</soundCast>
			<noiseRadius>4</noiseRadius>
			<ai_IsBuildingDestroyer>false</ai_IsBuildingDestroyer>
		</Properties>
		<weaponTags>
			<li>CE_OneHandedWeapon</li>
		</weaponTags>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="VWE_Throwing_Rocks"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>2</power>
					<cooldownTime>1.5</cooldownTime>
					<armorPenetrationBlunt>0.5</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

</Patch>