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

Added Difficulty Fallback for Trainer Slides #6088

Merged
merged 4 commits into from
Jan 29, 2025

Conversation

pkmnsnfrn
Copy link
Collaborator

Description

Adds fallback behavior for Trainers to use DIFFICULTY_NORMAL Trainer Slides when not defined for the player's current difficulty

Trainer Slides arrays match the Trainer structs, allowing developers to create Trainer Slides variants for each level of difficulty.

For all other difficulty related features, if the Trainer was not defined for the current difficulty level, the game would fall back to whatever was defined for the trainer on DIFFICULTY_NORMAL.

This fallback behavior did not exist for Trainer Slides - if the player was on DIFFICULTY_HARD and battled TRAINER_WALLACE who had Slides defined for DIFFUCLTY_NORMAL but not DIFFICULTY_HARD, then nothing would play.

This PR adds this fallback behavior.

Discord contact info

pkmnsnfrn

There is a discussion thread.

…er of Trainers

Updated sTestTrainerSlides to use TRAINERS_COUNT instead of FRONTIER_TRAINERS_COUNT
Added GetTrainerSlideArray to better support fallback
@pkmnsnfrn
Copy link
Collaborator Author

Specifically asking Jasper to review because he pointed out the need for the feature and I want to make sure it works as he expects

src/trainer_slide.c Outdated Show resolved Hide resolved
@hedara90
Copy link
Collaborator

Didn't the trainerslides have difficulty fallback before the refactor?
I remember talking about it during the difficulty review.

@pkmnsnfrn
Copy link
Collaborator Author

Didn't the trainerslides have difficulty fallback before the refactor? I remember talking about it during the difficulty review.

https://discord.com/channels/419213663107416084/1207720924414087168/1323390084401332337

I don't remember if you actually PR'd a fix but I don't think you did

but even so, this PR adds it either way /shrug

@hedara90
Copy link
Collaborator

I can't get the fallback to work when fighting Tiana on Easy with a team for easy but no slide for that difficulty.

Fixed difficulty bug where fallback was occuring too early
@pkmnsnfrn
Copy link
Collaborator Author

I can't get the fallback to work when fighting Tiana on Easy with a team for easy but no slide for that difficulty.

Stupid errors on my side added late. Fixed now.

@hedara90
Copy link
Collaborator

Can confirm that the fallbacks work properly now.

@Bassoonian Bassoonian merged commit b130a38 into rh-hideout:upcoming Jan 29, 2025
1 check passed
@pkmnsnfrn pkmnsnfrn added the category: battle-mechanic Pertains to battle mechanics label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: battle-mechanic Pertains to battle mechanics type: cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants