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

CanTerastallize Adjustments #4440

Merged
merged 4 commits into from
May 3, 2024
Merged

Conversation

AgustinGDLV
Copy link
Collaborator

The default behavior on upcoming allows for Terastallization from the get-go, which is hopefully the last slip-up as that wasn't intended behavior. The expansion user should be required to set B_FLAG_TERA_ORB_CHARGED so that the player requires not just the Tera Orb item but a "charged" Tera Orb.

@@ -47,10 +47,11 @@ bool32 CanTerastallize(u32 battler)
u32 holdEffect = GetBattlerHoldEffect(battler, FALSE);

// Check if Player has Tera Orb and has charge.
if (B_FLAG_TERA_ORB_CHARGED != 0
&& (battler == B_POSITION_PLAYER_LEFT || (!(gBattleTypeFlags & BATTLE_TYPE_MULTI) && battler == B_POSITION_PLAYER_RIGHT))
if (!(B_FLAG_TERA_ORB_NO_COST != 0 && FlagGet(B_FLAG_TERA_ORB_NO_COST))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is the check needed since the Tera Orb doesn't lose it's charge once B_FLAG_TERA_ORB_NO_COST is set?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I originally left it out but decided I would add it in case a user sets the NO_COST flag but not the CHARGED flag so that the player wouldn't have to recharge it first, but I suppose on the flip side it makes it hard to disable Terastallization in case the user intentionally wants to remove the charge.

@AgustinGDLV
Copy link
Collaborator Author

I originally left it out but decided I would add it in case a user sets the NO_COST flag but not the CHARGED flag so that the player wouldn't have to recharge it first, but I suppose on the flip side it makes it hard to disable Terastallization in case the user intentionally wants to remove the charge.

Currently standing by this, did some adjustments for readability (sort of) and tested here. The flags 0x264 and 0x265 correspond to B_TERA_ORB_CHARGE and B_TERA_ORB_NO_COST.

@AgustinGDLV AgustinGDLV requested a review from AlexOn1ine May 3, 2024 04:00
@AlexOn1ine AlexOn1ine merged commit 9c46b83 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.

2 participants