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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/battle_terastal.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ void PrepareBattlerForTera(u32 battler)

// Remove Tera Orb charge.
if (B_FLAG_TERA_ORB_CHARGED != 0
&& B_FLAG_TERA_ORB_NO_COST != 0
&& !FlagGet(B_FLAG_TERA_ORB_NO_COST)
&& (B_FLAG_TERA_ORB_NO_COST == 0 || !FlagGet(B_FLAG_TERA_ORB_NO_COST))
&& side == B_SIDE_PLAYER
&& !(gBattleTypeFlags & BATTLE_TYPE_DOUBLE && !IsPartnerMonFromSameTrainer(battler)))
{
Expand All @@ -47,10 +46,10 @@ 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))
&& !(CheckBagHasItem(ITEM_TERA_ORB, 1)
&& FlagGet(B_FLAG_TERA_ORB_CHARGED)))
if (!CheckBagHasItem(ITEM_TERA_ORB, 1)
|| !((B_FLAG_TERA_ORB_NO_COST != 0 && FlagGet(B_FLAG_TERA_ORB_NO_COST))
|| (B_FLAG_TERA_ORB_CHARGED != 0 && FlagGet(B_FLAG_TERA_ORB_CHARGED)
&& ((battler == B_POSITION_PLAYER_LEFT || (!(gBattleTypeFlags & BATTLE_TYPE_MULTI) && battler == B_POSITION_PLAYER_RIGHT))))))
{
return FALSE;
}
Expand Down
Loading