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

Change Battle Frontier validation to species flag #4341

Merged
merged 16 commits into from
May 3, 2024

Conversation

kittenchilly
Copy link

@kittenchilly kittenchilly commented Apr 3, 2024

Description

EDIT by Edu: This PR adds isFrontierBanned instead of splitting the legendary flag in two.

I split the isLegendary flag into 2 flags that more closely respect how Pokemon are flagged in the games: isRestrictedLegendary and isSubLegendary.
These can be used for any custom stuff but without any of that currently they are used for:
isRestrictedLegendary must have 3 perfect IVs, and additionally can't be used in the Battle Frontier.
isSubLegendary must have 3 perfect IVs.

With this change, I also updated the Battle Frontier validity check to use the isRestrictedLegendary and isMythical flags isFrontierBanned flag for if a mon should be banned, rather than a separate hardcoded array. This should make updating the banlist easier, and also consequently fixes Terapagos and Pecharunt not being banned.

Also renamed isParadoxForm to isParadox since they aren't forms, and removed the isParadox flag from Koraidon and Miraidon since they are just legendaries.

Discord contact info

kittenchilly

include/pokemon.h Outdated Show resolved Hide resolved
@AlexOn1ine
Copy link
Collaborator

doesn't compile on modern.

@kittenchilly
Copy link
Author

Reviews addressed and modern fixed

src/frontier_util.c Outdated Show resolved Hide resolved
@kittenchilly
Copy link
Author

Reviews addressed again, should be fast now without using a hardcoded list

@AsparagusEduardo
Copy link
Collaborator

Reviews addressed again, should be fast now without using a hardcoded list

"Should be"? I guess I gotta test it in-game myself if you aren't.

@AsparagusEduardo
Copy link
Collaborator

"Should be"? I guess I gotta test it in-game myself if you aren't.

Sorry if this was too mean. After what happened with #4373, I got a bit on edge about not testing code that theorically works.

@kittenchilly
Copy link
Author

"Should be"? I guess I gotta test it in-game myself if you aren't.

Sorry if this was too mean. After what happened with #4373, I got a bit on edge about not testing code that theorically works.

It's ok. I actually did test it and thought it was faster but I just wanted other people to judge for themselves, I guess. Sorry for the confusing language

Copy link
Collaborator

@AsparagusEduardo AsparagusEduardo left a comment

Choose a reason for hiding this comment

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

Forgot to remove the isMythical from the frontier functions ^^;

src/frontier_util.c Outdated Show resolved Hide resolved
src/frontier_util.c Outdated Show resolved Hide resolved
src/party_menu.c Outdated Show resolved Hide resolved
@kittenchilly
Copy link
Author

Forgot to remove the isMythical from the frontier functions ^^;

Done

@AsparagusEduardo
Copy link
Collaborator

Done

Lol, I was about to do that too 😂

@AsparagusEduardo AsparagusEduardo changed the title Split isLegendary into isRestrictedLegendary and isSubLegendary + change Battle Frontier validation Change Battle Frontier validation to species flag May 3, 2024
src/frontier_util.c Outdated Show resolved Hide resolved
src/party_menu.c Outdated Show resolved Hide resolved
src/frontier_util.c Outdated Show resolved Hide resolved
src/frontier_util.c Outdated Show resolved Hide resolved
src/party_menu.c Outdated Show resolved Hide resolved
@AsparagusEduardo AsparagusEduardo merged commit 0aad2a9 into rh-hideout:upcoming May 3, 2024
1 check passed
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.

4 participants