My previous code for melee weapon range modifiers was missing, this PR
restores and adds actual functionality for weapon range modifiers in all
instances of weapon range, as well as adds specific range modifiers for
light attack and disarm attack.
🆑
- fix: Fixed melee weapons "Bonus range for heavy attacks" not
functioning correctly.
- add: Added support for melee weapons having bonus range on disarms or
light attacks.
# Description
This PR un-hardcodes the JukeSystem timer, such that individual NPC HTN
Blackboards can directly state how often, and how far they wish to juke.
The effect of this is that NPCs are no longer completely impossible to
hit with left-clicks in melee combat, while also allowing for more
"Elite" enemies that juke more aggressively and more often to be
created.
Additionally, by introducing an exit condition based on this new "Juke
Cooldown", I have made the Juke Operator run a metric shitload of
expensive calculations 5000 times less often.
<details><summary><h1>Media</h1></summary>
<p>
Melee enemy with the new default juke settings, 0.5 second juke
duration, with 5 second juke Cooldown. The reagent slime will attempt to
close to melee with its enemy, but will now only attempt to evade melee
attacks once per 5 seconds. They will otherwise attempt to stay within
melee range.
https://github.com/user-attachments/assets/653e2064-e404-4be6-a958-da43096de502
</p>
</details>
# Changelog
🆑
- tweak: JukeOperator now allows for JukeDuration and JukeCooldown
arguments. JukeCooldown is a new feature where enemies must wait an
amount of time in seconds equal to the JukeCooldown, before they are
allowed to attempt to dodge a melee attack.
- tweak: By default, NPCs will only attempt to dodge attacks once every
5 seconds.
- fix: JukeOperator now performs extremely expensive math 5000 times
less often. EXIT CONDITIONS PEOPLE!
Also includes some (non critical) changes to the solution file to re-organize the Roslyn components.
(cherry picked from commit e00f74505c62310bd15aeaba8d6530f648397074)