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

Minor shouldUseGimmick refactor #4962

Merged
merged 1 commit into from
Jul 13, 2024

Conversation

AlexOn1ine
Copy link
Collaborator

#4861

Replaced shouldUseGimmick with shouldUseDynamax.

Simplifies the usage for tera since you only need to set the tera type now. Also the field was misleading since it implies you have to set it for Mega and Z moves as well which wasn't true. We still need it for dynamax though since dynamlevel is set by default. See the comment from Duke.

Also fixes an issue where enemy trainers couldn't use tera

@AlexOn1ine AlexOn1ine added this to the 1.9.0 milestone Jul 13, 2024
Comment on lines +69 to +72
if (!TESTING && !CheckBagHasItem(ITEM_TERA_ORB, 1))
return FALSE;

if (!TESTING
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since we check !TESTING twice, shouldn't we just rewrite it so it only needs to be checked once?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, this touches the same code as #4863. Does this supersede that PR, too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, it doesn't. Only thing I did was wrap it around the player check but I agree with you that it should be somehow simplified. In general I think that the whole sequence of checks is very weird which I tried to simplify in #4863. In general though I would prefer it if this pr gets merged (ideally first) and the rest is handled in the old pr.

@Bassoonian Bassoonian merged commit 5e2e2e9 into rh-hideout:upcoming Jul 13, 2024
1 check passed
@AlexOn1ine AlexOn1ine deleted the useDynamax branch November 21, 2024 22:36
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.

2 participants