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

Fix movement cost for throwing stacking items #39090

Merged
merged 1 commit into from
Mar 28, 2020
Merged

Fix movement cost for throwing stacking items #39090

merged 1 commit into from
Mar 28, 2020

Conversation

KurzedMetal
Copy link
Contributor

@KurzedMetal KurzedMetal commented Mar 28, 2020

Summary

SUMMARY: Bugfixes "Fix throwing movement cost for stacking items like bola/net/throwing stick."

Purpose of change

Fixes #39077

Describe the solution

Like I explained in #39077, the problem was itemp.cpp attack_time() formula using full stack weight/volume instead of a single item. I just added a division to the formula to divide that part by the stack item count.

Describe alternatives you've considered

I checked if any existing method I could returned volume/weight for single item so I could reuse them, but they don't exist.

Testing

Tested in a local build, before the change, throwing a bola from a stack of 3 costed 170, 130 for the first 2 throws, now it cost 70 for every throw (at least for my testing character, numbers may vary for other char).

@kevingranade kevingranade merged commit a0fe8c1 into CleverRaven:master Mar 28, 2020
@KurzedMetal KurzedMetal deleted the fix-throwing-stacking-items branch March 29, 2020 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stacking throwing items have variable "Moves to fire" based on their stack count (bigger stack = more moves)
3 participants