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

IsMoveEffectInPlus stat Id fix #5366

Merged

Conversation

Pawkkie
Copy link
Collaborator

@Pawkkie Pawkkie commented Sep 10, 2024

Description

Full credit to @ghoulslash for this I'm just PRing it.

In AI_IsMoveEffectInPlus, the check for move effects that lower stats by 2 stages uses the incorrect effect Id. When ShouldLowerStat is called, it knows what stat to reference by offsetting the move effect such that it relates to the 0 - 6 scale of Pokemon stats.

This works as intended for the cases where single stage effects are offset by MOVE_EFFECT_ATK_MINUS_1, but two stage effects are also offset by MOVE_EFFECT_ATK_MINUS_1 when they should be offset by MOVE_EFFECT_ATK_MINUS_2. This PR just corrects that offset.

Issue(s) that this PR fixes

Fixes #5197

People who collaborated with me in this PR

@ghoulslash for identifying / fixing, I'm just PRing it and explaining it for posterity.

Discord contact info

@Pawkkie

@Pawkkie Pawkkie added category: battle-ai Pertains to Battle Engine Upgrade's AI bugfix Bugfixes labels Sep 10, 2024
@AlexOn1ine AlexOn1ine merged commit 3aa46c3 into rh-hideout:master Sep 10, 2024
1 check passed
@Pawkkie Pawkkie deleted the IsMoveEffectInPlus-stat-Id-fix branch October 1, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Bugfixes category: battle-ai Pertains to Battle Engine Upgrade's AI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IsMoveEffectInPlus wrong stat Id check
2 participants