-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
melee: make polearms do less damage against adjacent targets #39694
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mlangsdorf
added
Game: Balance
Balancing of (existing) in-game features.
Game: Mechanics Change
Code that changes how major features work
Melee
Melee weapons, tactics, techniques, reach attack
labels
Apr 18, 2020
Results are closer to expectations now, though not quite there yet. ex. trench knife vs. debug monster: Actual 13.0157, Expected 20.160
commit 8ef3706 moved a bunch of melee related functions out of player:: and into Character::, but failed to call the new renamed version of get_hit() correctly.
Fix some long lines and use std:: functions in place of math.h functions in a few places.
Move the accuracy bonus out of the avatar's hit bonuses where they may or may not be set correctly via reset() and into get_hit_weapon() where they are definitely set and applied correctly. Add some statistics counters to the melee code to make writing test cases easier. Add unit tests to verify that increase a weapon's accuracy increases to hit rates and DPS.
Don't calculate dps for monsters that aren't going to be displayed. Adjust the unit tests based on relative values (epsilon) instead of fixed values (margin).
use average of effective dps against evaluation monsters in melee_value(), with an additional bonus for reach weapons and for weapons that work with a martial art the NPC knows.
Include the Melee Evaluation spreadsheet and a description of it, and update GAME_BALANCE.md with the new formulas.
I think the info text should be more specific on how much less damage it deals. |
Add a new flag, "POLEARM", which causes a reach weapon to do 70% of its normal damage (before armor) if it is used against an adjacent target. Apply the flag to most polearm weapons and pikes but not spears. Update the NPC melee weapon evaluation to reduce the value of polearms.
mlangsdorf
force-pushed
the
polearms_neft
branch
from
April 18, 2020 19:01
1e6e167
to
8a1a71b
Compare
This pull request fixes 1 alert when merging 8a1a71b into 074dd18 - view on LGTM.com fixed alerts:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Game: Balance
Balancing of (existing) in-game features.
Game: Mechanics Change
Code that changes how major features work
Melee
Melee weapons, tactics, techniques, reach attack
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: Balance "melee: make polearms do less damage against adjacent targets"
Purpose of change
Built on #39564
Give polearms an interesting tactical niche by reducing their raw damage to 70% of normal when the target is adjacent. Polearms do a lot of damage, but only at reach 2.
Describe the solution
Move
reach_attack()
and related variables intoCharacter::
Add a POLEARM flag to polearm weapons and pikes.
When a character makes an attack with a POLEARM, if the attack is not a reach attack, adjust the damage multipliers for all damage types by multiplying them by 0.7.
Testing
Spawned a debug monster and a halberd. Attacking a range 2, each strike was doing 40-45 damage. Moving to adjacent, damage per strike dropped down to 24-28.