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

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="Race_Antipode"]</xpath>
		<value>
			<li Class="CombatExtended.RacePropertiesExtensionCE">
				<bodyShape>Humanoid</bodyShape>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Race_Antipode"]/statBases</xpath>
		<value>
			<MeleeDodgeChance>0.17</MeleeDodgeChance>
			<MeleeCritChance>0.21</MeleeCritChance>
			<MeleeParryChance>0.17</MeleeParryChance>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Race_Antipode"]/comps</xpath>
		<value>
			<li>
				<compClass>CombatExtended.CompPawnGizmo</compClass>
			</li>
			<li Class="CombatExtended.CompProperties_Suppressable"/>
			<li>
				<compClass>CombatExtended.CompAmmoGiver</compClass>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Race_Antipode"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>left claw</label>
					<capacities>
						<li>Scratch</li>
					</capacities>
					<power>15</power>
					<cooldownTime>1.3</cooldownTime>
					<linkedBodyPartsGroup>LeftHand</linkedBodyPartsGroup>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>21</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
					<armorPenetrationSharp>0.3</armorPenetrationSharp>
					<armorPenetrationBlunt>5</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right claw</label>
					<capacities>
						<li>Scratch</li>
					</capacities>
					<power>15</power>
					<cooldownTime>1.3</cooldownTime>
					<linkedBodyPartsGroup>RightHand</linkedBodyPartsGroup>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>21</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
					<armorPenetrationSharp>0.3</armorPenetrationSharp>
					<armorPenetrationBlunt>5</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<capacities>
						<li>Bite</li>
					</capacities>
					<power>10</power>
					<cooldownTime>2.0</cooldownTime>
					<linkedBodyPartsGroup>Teeth</linkedBodyPartsGroup>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>21</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
					<armorPenetrationSharp>1.25</armorPenetrationSharp>
					<armorPenetrationBlunt>9.5</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>8</power>
					<cooldownTime>2.22</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<chanceFactor>0.2</chanceFactor>
					<armorPenetrationBlunt>4.235</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/PawnKindDef[defName="AntipodeWarrior"]/weaponTags</xpath>
		<value>
			<li>MedievalMeleeDecent</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/PawnKindDef[defName="AntipodeWarrior"]/weaponMoney</xpath>
		<value>
			<weaponMoney>
				<min>200</min>
				<max>400</max>
			</weaponMoney>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/PawnKindDef[defName="AntipodeHunter"]/weaponTags</xpath>
		<value>
			<li>CE_Bow</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/PawnKindDef[defName="AntipodeHunter" or defName="AntipodeChampion"]</xpath>
		<value>
			<li Class="CombatExtended.LoadoutPropertiesExtension">
				<primaryMagazineCount>
					<min>4</min>
					<max>7</max>
				</primaryMagazineCount>
				<shieldMoney>
					<min>100</min>
					<max>130</max>
				</shieldMoney>
				<shieldTags>
					<li>TribalShield</li>
				</shieldTags>
				<shieldChance>0.6</shieldChance>
				<sidearms>
					<li>
						<sidearmMoney>
							<min>80</min>
							<max>160</max>
						</sidearmMoney>
						<weaponTags>
							<li>CE_Sidearm_Tribal</li>
						</weaponTags>
					</li>
				</sidearms>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/PawnKindDef[defName="AntipodeWarrior"]</xpath>
		<value>
			<li Class="CombatExtended.LoadoutPropertiesExtension">
				<shieldMoney>
					<min>100</min>
					<max>130</max>
				</shieldMoney>
				<shieldTags>
					<li>TribalShield</li>
				</shieldTags>
				<shieldChance>0.6</shieldChance>
				<sidearms>
					<li>
						<sidearmMoney>
							<min>80</min>
							<max>160</max>
						</sidearmMoney>
						<weaponTags>
							<li>CE_Sidearm_Tribal</li>
						</weaponTags>
					</li>
				</sidearms>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>
			Defs/PawnKindDef[
			defName="AntipodeWarrior" or
			defName="AntipodeHunter" or
			defName="AntipodeChampion"
			]
		</xpath>
		<value>
			<combatEnhancingDrugsChance>1</combatEnhancingDrugsChance>
			<combatEnhancingDrugsCount>1</combatEnhancingDrugsCount>
		</value>
	</Operation>
</Patch>