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

Updated Trainer Ids used in Trainer Slides tests #6138

Merged

Conversation

pkmnsnfrn
Copy link
Collaborator

Description

@AlexOn1ine discovered an issue where Trainer Slides were being executed in non-Trainer slide tests, despite the Trainer Slide tests using specific Trainer Ids for each test.

This was occuring because TRAINER_SLIDE_BEFORE_FIRST_TURN is the same value as TRAINER_NONE (the default Trainer Id for tests). "Before First Turn" always triggers before the first turn, so this would always run.

This changes the Trainer IDs used in tests to start at a value higher than TRAINER_NONE.

Images

image

People who collaborated with me in this PR

@AlexOn1ine found the original bug, @AsparagusEduardo confirmed it

Discord contact info

pkmnsnfrn
Discussion was here: https://discord.com/channels/419213663107416084/1077009799293710357/1334184936596574359

@AlexOn1ine AlexOn1ine merged commit bc5adca into rh-hideout:upcoming Jan 29, 2025
1 check passed
@pkmnsnfrn pkmnsnfrn added bugfix Bugfixes category: battle-tests Related to the automated test environment type: cleanup labels Jan 29, 2025
@AsparagusEduardo
Copy link

Just now checking this. Wouldn't it be better to update the enum itself by adding a TRAINER_SLIDE_NONE?

@pkmnsnfrn
Copy link
Collaborator Author

Just now checking this. Wouldn't it be better to update the enum itself by adding a TRAINER_SLIDE_NONE?

I was originally going to do that, but it would waste some bits in gBattleStruct since that slide would never get used.

@AsparagusEduardo
Copy link

I was originally going to do that, but it would waste some bits in gBattleStruct since that slide would never get used.

Why do you need to use bits in gBattleStruct for it in the first place? 🤔

Just did it locally without adding any bits and it works fine.
mGBA_tZgLPdUiLn
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Bugfixes category: battle-tests Related to the automated test environment type: cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants