Skip to content

Commit

Permalink
Merge pull request #3348 from SaltyKarl/Pluse_Stunstick_update
Browse files Browse the repository at this point in the history
make Pulse Weaponry Stunstick one handed
  • Loading branch information
N7Huntsman authored Aug 13, 2024
2 parents 36f45f1 + 9e04115 commit 5ed4749
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 2 deletions.
46 changes: 46 additions & 0 deletions ModPatches/Pulse Weaponry/Defs/Pulse Weaponry/Damage.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<Defs>

<ManeuverDef>
<defName>StunstickSmash</defName>
<requiredCapacity>PW_Taser</requiredCapacity>
<verb>
<verbClass Class="CombatExtended.VerbPropertiesCE">CombatExtended.Verb_MeleeAttackCE</verbClass>
<meleeDamageDef>PW_Taser</meleeDamageDef>
</verb>
<logEntryDef>MeleeAttack</logEntryDef>
<combatLogRulesHit>Maneuver_Smash_MeleeHit</combatLogRulesHit>
<combatLogRulesDeflect>Maneuver_Smash_MeleeDeflect</combatLogRulesDeflect>
<combatLogRulesMiss>Maneuver_Smash_MeleeMiss</combatLogRulesMiss>
<combatLogRulesDodge>Maneuver_Smash_MeleeDodge</combatLogRulesDodge>
</ManeuverDef>

<ToolCapacityDef>
<defName>PW_Taser</defName>
<label>shock</label>
</ToolCapacityDef>

<DamageDef ParentName="Electrical">
<defName>PW_Taser</defName>
<label>shock</label>
<deathMessage>{0} has been shocked to death.</deathMessage>
<hediff>StunstickBurn</hediff>
<defaultArmorPenetration>0.45</defaultArmorPenetration>
<causeStun>true</causeStun>
<modExtensions>
<li Class="CombatExtended.DamageDefExtensionCE">
<harmOnlyOutsideLayers>true</harmOnlyOutsideLayers>
</li>
</modExtensions>
</DamageDef>

<HediffDef ParentName="ElectricalBurn">
<defName>StunstickBurn</defName>
<label>stunstick burn</label>
<labelNoun>a stunstick burn</labelNoun>
<comps>
<li Class="CombatExtended.HediffCompProperties_Beanbag" />
</comps>
</HediffDef>

</Defs>
22 changes: 20 additions & 2 deletions ModPatches/Pulse Weaponry/Patches/Pulse Weaponry/RangedSpacer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
<li Class="CombatExtended.ToolCE">
<label>head</label>
<capacities>
<li>Poke</li>
<li>PW_Taser</li>
</capacities>
<power>5</power>
<extraMeleeDamages>
<li>
<def>Stun</def>
<amount>32</amount>
<chance>0.20</chance>
<chance>0.40</chance>
</li>
</extraMeleeDamages>
<cooldownTime>1.68</cooldownTime>
Expand Down Expand Up @@ -65,6 +65,24 @@
</value>
</Operation>

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

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

<Operation Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName = "DV_PulseSMG" or defName = "DV_PulseSuppressor"]/tools</xpath>
<value>
Expand Down

0 comments on commit 5ed4749

Please sign in to comment.