<?xml version="1.0" encoding="utf-8"?>
<Patch>
	<!-- === Thumper Rocket Launcher === -->
	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Gun_Thumper"]</xpath>
		<value>
			<stackLimit>5</stackLimit>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Bullet_Thumper"]/projectile</xpath>
		<value>
			<projectile Class="CombatExtended.ProjectilePropertiesCE">
				<damageDef>Bullet</damageDef>
				<damageAmountBase>100</damageAmountBase>
				<armorPenetrationBlunt>2.2</armorPenetrationBlunt>
				<armorPenetrationSharp>20</armorPenetrationSharp>
				<speed>40</speed>
				<soundAmbient>RocketPropelledLoop_Small</soundAmbient>
			</projectile>
			<comps>
				<li Class="CombatExtended.CompProperties_ExplosiveCE">
					<damageAmountBase>35</damageAmountBase>
					<explosiveDamageType>Bomb</explosiveDamageType>
					<explosiveRadius>2.5</explosiveRadius>
					<explosionSound>MortarBomb_Explode</explosionSound>
					<applyDamageToExplosionCellsNeighbors>true</applyDamageToExplosionCellsNeighbors>
				</li>
				<li Class="CombatExtended.CompProperties_Fragments">
					<fragments>
						<Fragment_Large>40</Fragment_Large>
					</fragments>
				</li>
			</comps>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Bullet_Thumper"]/thingClass</xpath>
		<value>
			<thingClass>CombatExtended.ProjectileCE_Explosive</thingClass>
		</value>
	</Operation>

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Gun_Thumper</defName>
		<statBases>
			<Mass>6</Mass>
			<RangedWeapon_Cooldown>4.8</RangedWeapon_Cooldown>
			<SightsEfficiency>0.8</SightsEfficiency>
			<ShotSpread>0.16</ShotSpread>
			<SwayFactor>1.46</SwayFactor>
			<Bulk>10</Bulk>
			<WorkToMake>29500</WorkToMake>
		</statBases>
		<costList>
			<ChunkSlagSteel>1</ChunkSlagSteel>
			<Steel>30</Steel>
			<FSX>3</FSX>
			<ComponentIndustrial>1</ComponentIndustrial>
		</costList>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCEOneUse</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_Thumper</defaultProjectile>
			<warmupTime>3.5</warmupTime>
			<range>34</range>
			<minRange>5</minRange>
			<soundCast>InfernoCannon_Fire</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<onlyManualCast>true</onlyManualCast>
			<stopBurstWithoutLos>false</stopBurstWithoutLos>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
			<muzzleFlashScale>14</muzzleFlashScale>
		</Properties>
		<weaponTags>
			<li>FeralGun</li>
			<li>FeralGunHeavy</li>
		</weaponTags>
		<researchPrerequisite>CE_Launchers</researchPrerequisite>
		<FireModes />
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Gun_Thumper"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>barrel</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>10</power>
					<cooldownTime>2.44</cooldownTime>
					<armorPenetrationBlunt>3.5</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Barrel</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- === Madness Fusion Device === -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Proj_MADness"]</xpath>
		<value>
			<ThingDef ParentName="BaseGrenadeProjectile">
				<defName>Proj_MADness</defName>
				<label>fusion device</label>
				<graphicData>
					<texPath>Projectile/MADness</texPath>
					<graphicClass>Graphic_Single</graphicClass>
				</graphicData>
				<projectile Class="CombatExtended.ProjectilePropertiesCE">
					<explosionRadius>29.5</explosionRadius>
					<damageDef>BombSuper</damageDef>
					<explosionDamageFalloff>true</explosionDamageFalloff>
					<damageAmountBase>400</damageAmountBase>
					<explosionDelay>600</explosionDelay>
					<soundExplode>Explosion_GiantBomb</soundExplode>
					<dropsCasings>false</dropsCasings>
				</projectile>
			</ThingDef>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Weapon_MADness"]</xpath>
		<value>
			<ThingDef Class="CombatExtended.AmmoDef" ParentName="BaseGrenadeEquipment">
				<defName>Weapon_MADness</defName>
				<equipmentType>Primary</equipmentType>
				<label>fusion device</label>
				<techLevel>Spacer</techLevel>
				<description>Modified portable fusion reactor, used for rimworld scale Mutual Assured Destruction strategy.</description>
				<graphicData>
					<texPath>Things/A13/MADness</texPath>
					<graphicClass>Graphic_Single</graphicClass>
				</graphicData>
				<soundInteract>Interact_Grenade</soundInteract>
				<statBases>
					<MarketValue>2500</MarketValue>
					<SightsEfficiency>1</SightsEfficiency>
					<RangedWeapon_Cooldown>3</RangedWeapon_Cooldown>
				</statBases>
				<thingCategories>
					<li>Grenades</li>
				</thingCategories>
				<verbs>
					<li Class="CombatExtended.VerbPropertiesCE">
						<label>deploy fusion device</label>
						<verbClass>CombatExtended.Verb_ShootCEOneUse</verbClass>
						<hasStandardCommand>true</hasStandardCommand>
						<range>2.9</range>
						<warmupTime>8.95</warmupTime>
						<noiseRadius>4</noiseRadius>
						<ai_IsBuildingDestroyer>false</ai_IsBuildingDestroyer>
						<soundCast>ThrowGrenade</soundCast>
						<targetParams>
							<canTargetLocations>true</canTargetLocations>
						</targetParams>
						<defaultProjectile>Proj_MADness</defaultProjectile>
						<onlyManualCast>true</onlyManualCast>
						<ignorePartialLoSBlocker>true</ignorePartialLoSBlocker>
					</li>
				</verbs>
				<comps>
					<li Class="CombatExtended.CompProperties_ExplosiveCE">
						<damageAmountBase>400</damageAmountBase>
						<explosiveDamageType>BombSuper</explosiveDamageType>
						<explosiveRadius>12</explosiveRadius>
						<explosionSound>Explosion_GiantBomb</explosionSound>
					</li>
				</comps>
			</ThingDef>
		</value>
	</Operation>

	<!-- === Rat Stick Grenade === -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Bullet_RatStick"]</xpath>
		<value>
			<ThingDef ParentName="BaseGrenadeProjectile">
				<defName>Bullet_RatStick</defName>
				<label>rat stick</label>
				<graphicData>
					<texPath>Projectile/BoomStick</texPath>
					<graphicClass>Graphic_Single</graphicClass>
					<shaderType>TransparentPostLight</shaderType>
				</graphicData>
				<projectile Class="CombatExtended.ProjectilePropertiesCE">
					<explosionRadius>1.8</explosionRadius>
					<damageDef>PrometheumFlame</damageDef>
					<damageAmountBase>15</damageAmountBase>
					<preExplosionSpawnThingDef>FilthPrometheum</preExplosionSpawnThingDef>
					<preExplosionSpawnChance>1</preExplosionSpawnChance>
				</projectile>
			</ThingDef>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Gun_RatStick"]</xpath>
		<value>
			<ThingDef Class="CombatExtended.AmmoDef" ParentName="BaseGrenadeEquipment">
				<defName>Gun_RatStick</defName>
				<label>feral rat sticks</label>
				<description>Javelins tied with explosive boomrat tumor.</description>
				<graphicData>
					<texPath>Things/A13/BoomStick</texPath>
					<graphicClass>Graphic_Single</graphicClass>
					<onGroundRandomRotateAngle>35</onGroundRandomRotateAngle>
				</graphicData>
				<thingCategories>
					<li>FeralWeapons</li>
				</thingCategories>
				<generateCommonality>0.1</generateCommonality>
				<soundInteract>Interact_BeatFire</soundInteract>
				<statBases>
					<SightsEfficiency>1.0</SightsEfficiency>
					<ShotSpread>1.5</ShotSpread>
					<SwayFactor>2.5</SwayFactor>
					<Bulk>5.00</Bulk>
					<Mass>4.00</Mass>
					<RangedWeapon_Cooldown>1</RangedWeapon_Cooldown>
				</statBases>
				<altitudeLayer>Item</altitudeLayer>
				<alwaysHaulable>True</alwaysHaulable>
				<tickerType>Normal</tickerType>
				<techLevel>Neolithic</techLevel>
				<equippedAngleOffset>30</equippedAngleOffset>
				<stackLimit>75</stackLimit>
				<weaponTags>
					<li>GrenadeDestructive</li>
					<li>FeralGun</li>
					<li>FeralGrenade</li>
				</weaponTags>
				<verbs>
					<li Class="CombatExtended.VerbPropertiesCE">
						<verbClass>CombatExtended.Verb_ShootCEOneUse</verbClass>
						<targetParams>
							<canTargetLocations>true</canTargetLocations>
						</targetParams>
						<hasStandardCommand>true</hasStandardCommand>
						<defaultProjectile>Bullet_RatStick</defaultProjectile>
						<warmupTime>1.5</warmupTime>
						<range>11</range>
						<soundCast>Interact_BeatFire</soundCast>
					</li>
				</verbs>
				<tools>
					<li Class="CombatExtended.ToolCE">
						<label>shaft</label>
						<capacities>
							<li>Blunt</li>
						</capacities>
						<power>7</power>
						<cooldownTime>1.40</cooldownTime>
						<armorPenetrationBlunt>2.25</armorPenetrationBlunt>
						<linkedBodyPartsGroup>Shaft</linkedBodyPartsGroup>
					</li>
					<li Class="CombatExtended.ToolCE">
						<label>point</label>
						<capacities>
							<li>Stab</li>
						</capacities>
						<power>15</power>
						<cooldownTime>1.43</cooldownTime>
						<chanceFactor>1.5</chanceFactor>
						<armorPenetrationBlunt>1.69</armorPenetrationBlunt>
						<armorPenetrationSharp>0.30</armorPenetrationSharp>
						<linkedBodyPartsGroup>Point</linkedBodyPartsGroup>
					</li>
				</tools>
			</ThingDef>
		</value>
	</Operation>
</Patch>