-
Notifications
You must be signed in to change notification settings - Fork 288
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
feat(balance): make AoE damage falloff based on range #6035
feat(balance): make AoE damage falloff based on range #6035
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Compiled and load-tested.
- Spawned in a shotgun and loaded it with birdshot.
- Spawned in a gaggle of zombies to test it against.
- Observed the damage numbers seem to vary with distance.
That said uh, AoE can crit it turns out, completely at random and separately for every single zed hit by it, which makes it REALLY hard to actually tell if this is scaling right or not. XD
Next person in line is unexpectedly actually less injured instead of more:
Fourth in line took slightly MORE damage than third place?
Last guy at the end actually looks like damage falloff has happened:
the damage log should show how much damage has been dealt with like my screenshot shows |
So given that, that seems to confirm it works. Will go ahead and wait for others to look at it too, mainly because I dunno if they'd want to suggest a different rate of damage falloff of whether they're fine with the current "half damage at max range" scaling. |
went to 50% scaling because it's simple, just as Coolthulhu intended |
aa0d4ec
to
b5eb4de
Compare
loses at most 50% damage see: cataclysmbnteam#6028 (comment) Co-authored-by: Bardcore <[email protected]>
b5eb4de
to
540acc0
Compare
Only issue is the phrasing implies more aggressive scaling than "half at max range", hecc. Decided to pester him on the server and wait for a reply to clarify if that's what he meant or not before making any code suggestions tho: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the event that Coolthulhu does say to scale it all the way down instead of half damage being the minimum damage, the below is the change that'd be needed to implement it. Can just leave it here while we wait to find out whether it's needed or not, and mark as resolved if we end up not using it.
With buckshot (10 range) previous tests showed this increased level scaling will produce 60% damage when target is 5 tiles away and 10% damage when target is the full 10 tiles away.
const float dist = trig_dist( sh.get_origin(), atk.end_point ); | ||
const float range = std::max( 1, atk.proj.range ); | ||
|
||
return 1 - ( 0.5 * ( std::max( 0.0f, dist - 1 ) / range ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return 1 - ( 0.5 * ( std::max( 0.0f, dist - 1 ) / range ) ); | |
return 1 - ( 1 * ( std::max( 0.0f, dist - 1 ) / range ) ); |
Purpose of change (The Why)
Describe the solution (The How)
see: #6028 (comment)
falloff is limited to at most 50% of damage
Describe alternatives you've considered
Testing
2025-02-02_12-17-54.mp4
Checklist
Mandatory
closes #1234
in Summary of the PR so it can be closed automatically.main
so it won't cause conflict when updatingmain
branch later.