-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Bug] Stat Stages are now changed individually instead of all at once #4457
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.
It seems like the reason this bug exists is because we combine stat changes into a single SSCPhase which is different from mainline where each stat change is handled individually. It speeds things up but apparently also causes bugs. It might be better to instead have the SSCPhase check if it's changing multiple stats at once, and to unshift a new SSCPhase for each stat and end the current SSCPhase after doing so.
This is what I was thinking originally but I wasnt sure where to start when trying to implement this - I figured the solution I committed would be simpler and easier to understand. Where do I start when trying to add multiple SSCPhases? Also should I be hard coding it in for specifically defiant and competitive? |
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.
I'd like to see Defiant test cases as well
At the beginning of the SSCPhase's start() {
if (this.stats.length > 1) {
for (let i = 0; i < this.stats.length; i++) {
const stat = [this.stats[i]];
this.scene.unshiftPhase(new StatStageChangePhase(this.scene, this.battlerIndex, this.selfTarget, stat, this.stages, this.showMessage, this.ignoreAbilities, this.canBeCopied, this.onChange));
}
return this.end();
} |
Updated the OP with the changes. |
Co-authored-by: Adrian T. <[email protected]>
What are the changes the user will see?
Defiant and Competitive will now properly interact with moves that modify multiple stats stages.
Why am I making these changes?
Fixes #4281
What are the changes from a developer perspective?
If multiple stats are being changed in
StatStageChangePhase
, a new SSCPhase is created for each individual stat and then the current SSCPhase is ended.Screenshots/Videos
defiant.fix.mp4
How to test the changes?
Override file, or the test file made
Checklist
beta
as my base branch[ ] If I have text, did I make it translatable and add a key in the English locale file(s)?npm run test
)