Fix hit bonus from BS_WEAPONRESEARCH being applied twice in pre-renewal #3221
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.
Pull Request Prelude
This condition is for renewal
For the pre-renewal bonus hit, the rate bonus is already calculated in status.c
If both are active (battle.c and status.c), in pre-renewal it will give +20 HIT (this is BS_WEAPONRESEARCH pre-renewal behavior) first and then add +20% accuracy after the hit rate is determined (this is BS_WEAPONRESEARCH renewal behavior).
For the pre-renewal bonus hit, just use the bonus from status.c
Note: Sorry for the previous commit, I made a mess. That was my first commit to other people's project.
Changes Proposed
Based on this wiki
https://irowiki.org/classic/Weaponry_Research
https://irowiki.org/wiki/Weaponry_Research
The renewal uses a percentage (+20% accuracy after the hit rate determine) while the pre-renewal use fix HIT number (+20 HIT)
Issues addressed: