Skip to content
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
merged 9 commits into from
Apr 19, 2020

Conversation

mlangsdorf
Copy link
Contributor

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 into Character::

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.

@mlangsdorf 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
wapcaplet and others added 8 commits April 18, 2020 12:34
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.
@Hirmuolio
Copy link
Contributor

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.
@lgtm-com
Copy link

lgtm-com bot commented Apr 18, 2020

This pull request fixes 1 alert when merging 8a1a71b into 074dd18 - view on LGTM.com

fixed alerts:

  • 1 for Use of c-style math functions

@kevingranade kevingranade merged commit 2a9b997 into CleverRaven:master Apr 19, 2020
@mlangsdorf mlangsdorf deleted the polearms_neft branch April 21, 2020 11:00
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants