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

	<!-- FENRIS -->
	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="RE_Mechanoids_FENRIS"]</xpath>
		<value>
			<li Class="CombatExtended.RacePropertiesExtensionCE">
				<bodyShape>Quadruped</bodyShape>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="RE_Mechanoids_FENRIS"]/statBases</xpath>
		<value>
			<MeleeDodgeChance>1</MeleeDodgeChance>
			<MeleeCritChance>0.28</MeleeCritChance>
			<MeleeParryChance>0.15</MeleeParryChance>
			<CarryWeight>50</CarryWeight>
			<CarryBulk>80</CarryBulk>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="RE_Mechanoids_FENRIS"]/statBases/ArmorRating_Blunt</xpath>
		<value>
			<ArmorRating_Blunt>16</ArmorRating_Blunt>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="RE_Mechanoids_FENRIS"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<ArmorRating_Sharp>6</ArmorRating_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="RE_Mechanoids_FENRIS"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>11</power>
					<cooldownTime>1.8</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<chanceFactor>0.2</chanceFactor>
					<armorPenetrationSharp>3</armorPenetrationSharp>
					<armorPenetrationBlunt>6</armorPenetrationBlunt>
					<extraMeleeDamages>
						<li>
							<def>Taser</def>
							<amount>4</amount>
						</li>
					</extraMeleeDamages>
				</li>
			</tools>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="RE_Mechanoids_FENRIS"]/comps</xpath>
		<value>
			<li Class="CombatExtended.CompProperties_ArmorDurability">
				<Durability>600</Durability>
				<Regenerates>true</Regenerates>
				<RegenInterval>1250</RegenInterval>
				<RegenValue>5</RegenValue>
				<Repairable>true</Repairable>
				<RepairIngredients>
					<Steel>5</Steel>
					<Plasteel>5</Plasteel>
				</RepairIngredients>
				<RepairTime>300</RepairTime>
				<RepairValue>200</RepairValue>
				<MinArmorPct>0.5</MinArmorPct>
			</li>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="RE_Mechanoids_LOKI"]/statBases</xpath>
		<value>
			<AimingAccuracy>1.0</AimingAccuracy>
			<ShootingAccuracyPawn>1.0</ShootingAccuracyPawn>
			<MeleeDodgeChance>0.5</MeleeDodgeChance>
			<MeleeCritChance>0.21</MeleeCritChance>
			<MeleeParryChance>0.2</MeleeParryChance>
			<CarryWeight>100</CarryWeight>
			<CarryBulk>80</CarryBulk>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="RE_Mechanoids_LOKI"]/statBases/ArmorRating_Blunt</xpath>
		<value>
			<ArmorRating_Blunt>13</ArmorRating_Blunt>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="RE_Mechanoids_LOKI"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<ArmorRating_Sharp>9</ArmorRating_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="RE_Mechanoids_LOKI"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>5</power>
					<cooldownTime>1.85</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<chanceFactor>0.2</chanceFactor>
					<armorPenetrationSharp>0</armorPenetrationSharp>
					<armorPenetrationBlunt>2</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="RE_Mechanoids_LOKI"]/comps</xpath>
		<value>
			<li Class="CombatExtended.CompProperties_ArmorDurability">
				<Durability>1250</Durability>
				<Regenerates>true</Regenerates>
				<RegenInterval>1250</RegenInterval>
				<RegenValue>5</RegenValue>
				<Repairable>true</Repairable>
				<RepairIngredients>
					<Steel>5</Steel>
					<Plasteel>5</Plasteel>
				</RepairIngredients>
				<RepairTime>300</RepairTime>
				<RepairValue>200</RepairValue>
				<MinArmorPct>0.5</MinArmorPct>
			</li>
		</value>
	</Operation>

	<!-- YMIR -->
	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="RE_Mechanoids_YMIR"]</xpath>
		<value>
			<li Class="CombatExtended.RacePropertiesExtensionCE">
				<bodyShape>Vehicle</bodyShape>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="RE_Mechanoids_YMIR"]/race/baseBodySize</xpath>
		<value>
			<baseBodySize>2</baseBodySize>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="RE_Mechanoids_YMIR"]/statBases</xpath>
		<value>
			<AimingAccuracy>1.1</AimingAccuracy>
			<ShootingAccuracyPawn>1.1</ShootingAccuracyPawn>
			<MeleeDodgeChance>0.1</MeleeDodgeChance>
			<MeleeCritChance>0.8</MeleeCritChance>
			<MeleeParryChance>0.5</MeleeParryChance>
			<CarryWeight>400</CarryWeight>
			<CarryBulk>800</CarryBulk>
			<MaxHitPoints>500</MaxHitPoints>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="RE_Mechanoids_YMIR"]/statBases/ArmorRating_Blunt</xpath>
		<value>
			<ArmorRating_Blunt>75</ArmorRating_Blunt>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="RE_Mechanoids_YMIR"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<ArmorRating_Sharp>22</ArmorRating_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="RE_Mechanoids_YMIR"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>43</power>
					<cooldownTime>2.68</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<armorPenetrationSharp>0</armorPenetrationSharp>
					<armorPenetrationBlunt>124.25</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="RE_Mechanoids_YMIR"]/comps</xpath>
		<value>
			<li Class="CombatExtended.CompProperties_ArmorDurability">
				<Durability>3000</Durability>
				<Regenerates>true</Regenerates>
				<RegenInterval>1250</RegenInterval>
				<RegenValue>5</RegenValue>
				<Repairable>true</Repairable>
				<RepairIngredients>
					<Steel>5</Steel>
					<Plasteel>5</Plasteel>
				</RepairIngredients>
				<RepairTime>300</RepairTime>
				<RepairValue>200</RepairValue>
				<MinArmorPct>0.5</MinArmorPct>
			</li>
		</value>
	</Operation>
	
	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="RE_Mechanoids_LOKI"]/comps</xpath>
		<value>
			<li Class="CombatExtended.CompProperties_Inventory" />
			<li Class="CombatExtended.CompProperties_TacticalManager" />
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="RE_Mechanoids_YMIR"]/comps</xpath>
		<value>
			<li Class="CombatExtended.CompProperties_Inventory" />
			<li Class="CombatExtended.CompProperties_TacticalManager" />
		</value>
	</Operation>	
	
		<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="RE_Mechanoids_LOKI"]/comps</xpath>
		<value>
			<li>
				<compClass>CombatExtended.CompPawnGizmo</compClass>
			</li>
			<li>
				<compClass>CombatExtended.CompAmmoGiver</compClass>
			</li>
			<li Class="CombatExtended.CompProperties_MechAmmo">
				<gizmoIconSetMagCount>UI/Buttons/SetMagCount</gizmoIconSetMagCount>
				<gizmoIconTakeAmmoNow>UI/Buttons/TakeAmmoNow</gizmoIconTakeAmmoNow>
			</li>				
		</value>
	</Operation>
	
	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="RE_Mechanoids_YMIR"]/comps</xpath>
		<value>
			<li>
				<compClass>CombatExtended.CompPawnGizmo</compClass>
			</li>
			<li>
				<compClass>CombatExtended.CompAmmoGiver</compClass>
			</li>
			<li Class="CombatExtended.CompProperties_MechAmmo">
				<gizmoIconSetMagCount>UI/Buttons/SetMagCount</gizmoIconSetMagCount>
				<gizmoIconTakeAmmoNow>UI/Buttons/TakeAmmoNow</gizmoIconTakeAmmoNow>
			</li>			
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="RE_Mechanoids_FENRIS"]/comps/li[@Class="Asimov.CompProperties_Automaton"]/canUseMelee</xpath>
		<value>
			<canUseMelee>false</canUseMelee>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="RE_Mechanoids_FENRIS"]/comps/li[@Class="Asimov.CompProperties_Automaton"]/canUseRanged</xpath>
		<value>
			<canUseRanged>false</canUseRanged>
		</value>
	</Operation>

</Patch>