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

Fix AI's right slot switching-in too early #4851

Merged
merged 3 commits into from
Jun 21, 2024

Conversation

DizzyEggg
Copy link
Collaborator

@DizzyEggg DizzyEggg commented Jun 21, 2024

Fixes #4656

I didn't have to do much, because the code functionality for this is already coded! In link battles, everyone chooses their switches and then the mons are switched-in, so this functionality is now also added for trainer double battles.

I created a new config, but can rename/delete it if you guys feel it's unnecessary.

I also got rid of the Link label in scripts, since it'll no longer be used just for link battles.
Note: Please squash when merging
Before:
before

After:
after

#define B_MEGA_EVO_TURN_ORDER GEN_LATEST // In Gen7, a Pokémon's Speed after Mega Evolution is used to determine turn order, not its Speed before.
#define B_RECALC_TURN_AFTER_ACTIONS GEN_LATEST // In Gen8, switching/using a move affects the current turn's order of actions, better known as dynamic speed.
#define B_FAINT_SWITCH_IN GEN_LATEST // In Gen4+, sending out a new Pokémon after the previous one fainted happens at the end of the turn. Before, it would happen after each action.
#define B_FAIR_MULTI_SWITCH_IN_DOUBLES FALSE // In double trainer battles pokemon are switched at the same time, that is the player doesn't know the trainer's pokemon before they switch theirs.
Copy link
Collaborator

@AlexOn1ine AlexOn1ine Jun 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason this is set to false? Also are we sure we need a config for this since our doubles battles are already not gen3 compatible.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, this should be set to true lmao. I can get rid of the config

@AlexOn1ine AlexOn1ine merged commit d0bb03e into rh-hideout:master Jun 21, 2024
1 check passed
@DizzyEggg DizzyEggg deleted the ai_switch branch June 22, 2024 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In a Double Battle, the AI's right slot switches in early
2 participants