-
Notifications
You must be signed in to change notification settings - Fork 0
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
Potion of Oblivion vs FE Refund #8
Comments
First attempt to fix was tested by Bella'kor. This time, we detected a bug where drinking the Potion of Oblivion resulted in the character getting refunded more points than they were supposed to based on the number of times they leveled up. Suspected CauseThe Proposed SolutionIn the same hook that I wrote for Possible Edge Case?My brain is too tired to work out the details right now, but we will need to consider what is the effect of the Proposed Solution for the following edge case:
Will revisit this potential edge case next time and analyse the impact. |
Edge Case ConsideredBy following the Proposed Solution outlined in the previous comment, the Possible Edge Case raised would be handled. Consider the following example:
Thus, we have successfully started with 2 Perks Owned and ended with 2 Available Perk Points. The above illustration shows that our Edge Case is handled by the Proposed Solution |
Reported by Bella'kor on Discord: https://discord.com/channels/547043336465154049/1088956924516634707/1112341341452640316
To summarize the issue:
Current Behaviour
Expected Behaviour
Code Analysis and Proposed Fix
Currently the FE Perk refund process checks for the existence of a flag in the actor, and will only refund the point if the flag is not already present. (see
legend_favoured_enemy_skill.onUpdate()
)When drinking Potion of Oblivion, the flags are not removed, so when the Player picks the FE Perk again, this check will detect the flags and not refund the Perk Point.
I propose we hook the
entity/tactical/actor.resetPerks()
function to also remove all FE Perk-related flags in the actor.The text was updated successfully, but these errors were encountered: