Skip to content

Commit

Permalink
Protoswords patch
Browse files Browse the repository at this point in the history
  • Loading branch information
skycrossercat committed Sep 22, 2023
1 parent 6ae4eef commit 434cc25
Show file tree
Hide file tree
Showing 2 changed files with 236 additions and 0 deletions.
211 changes: 211 additions & 0 deletions Patches/Protoswords/Proto_CE.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
<?xml version="1.0" encoding="utf-8"?>
<Patch>

<Operation Class="PatchOperationFindMod">
<mods>
<li>Protoswords</li>
</mods>
<match Class="PatchOperationSequence">
<operations>

<!--Protosword-->
<li Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName="BON_Protosword"]/tools</xpath>
<value>
<tools>
<li Class="CombatExtended.ToolCE">
<label>handle</label>
<capacities>
<li>Poke</li>
</capacities>
<power>2</power>
<chanceFactor>0.1</chanceFactor>
<cooldownTime>1.5</cooldownTime>
<armorPenetrationBlunt>0.5</armorPenetrationBlunt>
<linkedBodyPartsGroup>Handle</linkedBodyPartsGroup>
</li>
<li Class="CombatExtended.ToolCE">
<label>edge</label>
<capacities>
<li>Cut</li>
</capacities>
<power>26</power>
<extraMeleeDamages>
<li>
<def>Bomb</def>
<amount>6</amount>
<chance>0.3</chance>
</li>
</extraMeleeDamages>
<cooldownTime>1.3</cooldownTime>
<armorPenetrationBlunt>2.88</armorPenetrationBlunt>
<armorPenetrationSharp>15</armorPenetrationSharp>
<linkedBodyPartsGroup>Edge</linkedBodyPartsGroup>
</li>
<li Class="CombatExtended.ToolCE">
<label>point</label>
<capacities>
<li>Stab</li>
</capacities>
<power>13</power>
<extraMeleeDamages>
<li>
<def>Bomb</def>
<amount>6</amount>
<chance>0.3</chance>
</li>
</extraMeleeDamages>
<cooldownTime>1.35</cooldownTime>
<armorPenetrationBlunt>1.28</armorPenetrationBlunt>
<armorPenetrationSharp>18</armorPenetrationSharp>
</li>
</tools>
</value>
</li>


<li Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="BON_Protosword"]/statBases</xpath>
<value>
<Bulk>6</Bulk>
<MeleeCounterParryBonus>0.36</MeleeCounterParryBonus>
</value>
</li>

<li Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="BON_Protosword"]</xpath>
<value>
<equippedStatOffsets>
<MeleeCritChance>0.45</MeleeCritChance>
<MeleeParryChance>0.32</MeleeParryChance>
<MeleeDodgeChance>0.23</MeleeDodgeChance>
</equippedStatOffsets>
</value>
</li>

<li Class="PatchOperationConditional">
<xpath>Defs/ThingDef[defName="BON_Protosword"]/weaponTags</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="BON_Protosword"]</xpath>
<value>
<weaponTags />
</value>
</nomatch>
</li>

<li Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="BON_Protosword"]/weaponTags</xpath>
<value>
<li>CE_OneHandedWeapon</li>
</value>
</li>

<!-- Patch sear damage type -->
<li Class="PatchOperationAddModExtension">
<xpath>Defs/DamageDef[defName="BON_SearDamage"]</xpath>
<value>
<li Class="CombatExtended.DamageDefExtensionCE">
<isAmbientDamage>true</isAmbientDamage>
</li>
</value>
</li>


<!--Phase sword -->
<li Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName="BON_Phasesword"]/tools</xpath>
<value>
<tools>
<li Class="CombatExtended.ToolCE">
<label>hilt</label>
<capacities>
<li>Poke</li>
</capacities>
<power>3</power>
<chanceFactor>0.1</chanceFactor>
<cooldownTime>1.5</cooldownTime>
<armorPenetrationBlunt>0.65</armorPenetrationBlunt>
<linkedBodyPartsGroup>Handle</linkedBodyPartsGroup>
</li>
<li Class="CombatExtended.ToolCE">
<label>edge</label>
<capacities>
<li>BON_SearCut</li>
</capacities>
<power>36</power>
<extraMeleeDamages>
<li>
<def>Flame</def>
<amount>4</amount>
<chance>0.3</chance>
</li>
</extraMeleeDamages>
<cooldownTime>1.19</cooldownTime>
<armorPenetrationBlunt>3.16</armorPenetrationBlunt>
<armorPenetrationSharp>20</armorPenetrationSharp>
<linkedBodyPartsGroup>Edge</linkedBodyPartsGroup>
</li>
<li Class="CombatExtended.ToolCE">
<label>point</label>
<capacities>
<li>BON_SearStab</li>
</capacities>
<power>18</power>
<extraMeleeDamages>
<li>
<def>Flame</def>
<amount>4</amount>
<chance>0.3</chance>
</li>
</extraMeleeDamages>
<cooldownTime>1.32</cooldownTime>
<armorPenetrationBlunt>1.68</armorPenetrationBlunt>
<armorPenetrationSharp>26</armorPenetrationSharp>
</li>
</tools>
</value>
</li>


<li Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="BON_Phasesword"]/statBases</xpath>
<value>
<Bulk>4</Bulk>
<MeleeCounterParryBonus>0.45</MeleeCounterParryBonus>
</value>
</li>

<li Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="BON_Phasesword"]</xpath>
<value>
<equippedStatOffsets>
<MeleeCritChance>0.71</MeleeCritChance>
<MeleeParryChance>0.45</MeleeParryChance>
<MeleeDodgeChance>0.29</MeleeDodgeChance>
</equippedStatOffsets>
</value>
</li>

<li Class="PatchOperationConditional">
<xpath>Defs/ThingDef[defName="BON_Phasesword"]/weaponTags</xpath>
<nomatch Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="BON_Phasesword"]</xpath>
<value>
<weaponTags />
</value>
</nomatch>
</li>

<li Class="PatchOperationAdd">
<xpath>Defs/ThingDef[defName="BON_Phasesword"]/weaponTags</xpath>
<value>
<li>CE_OneHandedWeapon</li>
</value>
</li>


</operations>
</match>
</Operation>

</Patch>
25 changes: 25 additions & 0 deletions Patches/Protoswords/ToolCapacity_CE.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<Patch>

<Operation Class="PatchOperationFindMod">
<mods>
<li>Protoswords</li>
</mods>
<match Class="PatchOperationSequence">
<operations>


<li Class="PatchOperationAddModExtension">
<xpath>Defs/ToolCapacityDef[defName="BON_SearStab"]</xpath>
<value>
<li Class="CombatExtended.ModExtensionMeleeToolPenetration">
<canHitInternal>true</canHitInternal>
</li>
</value>
</li>

</operations>
</match>
</Operation>

</Patch>

0 comments on commit 434cc25

Please sign in to comment.