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

	<!-- ============== Changing Projectile's thingClass to CE ones ================ -->

	<Operation Class="PatchOperationRemove">
		<xpath>Defs/ThingDef[defName="AI_ElectricBolt"]/thingClass
		</xpath>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[
			defName="AI_PoisonBolt" or
			defName="AI_AcidBolt" or
			defName="AI_Quill" or			
			defName="AI_Web" or
			defName="AI_Plasma"]
		</xpath>
		<value>
			<thingClass>CombatExtended.BulletCE</thingClass>
		</value>
	</Operation>

	<!-- =============== Now defining Projectiles in CE Procedure ============= -->

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="AI_Web"]/projectile</xpath>
		<value>
			<projectile Class="CombatExtended.ProjectilePropertiesCE">
				<flyOverhead>false</flyOverhead>
				<damageDef>Stun</damageDef>
				<damageAmountBase>15</damageAmountBase>
				<speed>15</speed>
				<armorPenetrationBlunt>0.25</armorPenetrationBlunt>
			</projectile>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="AI_PoisonBolt"]/projectile</xpath>
		<value>
			<projectile Class="CombatExtended.ProjectilePropertiesCE">
				<flyOverhead>false</flyOverhead>
				<damageDef>AI_ToxicBolt</damageDef>
				<damageAmountBase>9</damageAmountBase>
				<speed>25</speed>
				<armorPenetrationSharp>2.3</armorPenetrationSharp>
				<armorPenetrationBlunt>1.5</armorPenetrationBlunt>
			</projectile>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="AI_AcidBolt"]/projectile</xpath>
		<value>
			<projectile Class="CombatExtended.ProjectilePropertiesCE">
				<flyOverhead>false</flyOverhead>
				<damageDef>AI_AcidSpit</damageDef>
				<damageAmountBase>5</damageAmountBase>
				<speed>36</speed>
				<armorPenetrationSharp>7</armorPenetrationSharp>
			</projectile>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="AI_ElectricBolt"]/projectile</xpath>
		<value>
			<projectile Class="CombatExtended.ProjectilePropertiesCE">
				<flyOverhead>false</flyOverhead>
				<damageDef>AI_Electric</damageDef>
				<damageAmountBase>12</damageAmountBase>
				<speed>50</speed>
			</projectile>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="AI_Plasma"]/projectile</xpath>
		<value>
			<projectile Class="CombatExtended.ProjectilePropertiesCE">
				<flyOverhead>false</flyOverhead>
				<damageDef>Flame</damageDef>
				<damageAmountBase>25</damageAmountBase>
				<speed>30</speed>
				<armorPenetrationSharp>16</armorPenetrationSharp>
				<armorPenetrationBlunt>14.4</armorPenetrationBlunt>
			</projectile>
		</value>
	</Operation>

</Patch>