Add ability to cycle through different striking modes #40354
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
SUMMARY: Features "Add ability to cycle through Striking Modes"
Purpose of change
Add a way to give variable powered strikes to attacks. Enables some viable melee weapon alternatives due to striking power. Lighter weapons can be used against heavily armored enemies by striking harder (unarmed especially suffers from this in the current state of the game, being unable to damage zombie soldiers outside of crits). Heavier and harder hitting weapons can now be used to strike softly to reduce stamina consumption against enemies that don't necessarily need your full force.
More specifics below
Describe the solution
Add striking modes able to be cycled through using ] as the default key (previously unassigned).
Normal: Default damage and stamina consumption.
Soft: .67 damage multiplier, .5x stamina multiplier.
Hard: 1.5 damage multiplier, 2x stamina multiplier.
Note*: Normal strikes is 1.5x the damage of soft strikes, and hard strikes is 1.5x the damage of normal strikes.
The move cost for the strikes stays the same, you are simply spending more or less effort on your strikes but that doesn't make your strikes slower or faster. The stamina multipliers account for recovery time.
This also applies to bashing furniture so low str characters can smash things supposing they want to expend twice the stamina to do so. This may be useful in certain circumstances.
Stumbling also incurs penalties depending on the striking mode. Stumble penalty is 2/3 of normal if on soft, and 1.5x of normal if on hard. This means if you stike with all your might and miss, you're likely in for a bad time.
In most circumstances, staying with normal strikes is more than good enough.
Always being on soft strikes lowers your damage and make it take longer to kill your enemy. This is especially not a good idea for fast, low damage weapons. Even more especially against armored enemies. You won't be damaging them at all. This is situationally useful for conserving stamina depending on the weapon.
Always being on hard strikes may increase your damage, but the player should consider stamina cost. Over-killing zombies at all times can be counter-productive especially if the player chooses to kill many of them. This would usually be used in the circumstance the extra power is needed. i.e. a single kevlar zombie heading in your direction.
Testing
Extensive testing striking the debug monster with different striking modes to ensure damage is proper.
Debug mode check stamina consumption to confirm stamina consumption is proper.
Debugging through bashskill in bash() to ensure bashing values were being modified by the striking modes.
Lastly, ran regression tests to ensure I didn't break anything I touched. It looks like some NPC needs tests were broken (none of my changes touched on NPC behaviour, only Avatar which is player specific). None of the changes changed any existing functionality relating to melee combat.