CanTerastallize Adjustments (#4440)
* updated CanTerastallize to be disabled if B_FLAG_TERA_ORB_CHARGED undefined * added check for B_FLAG_TERA_ORB_NO_COST * reworked and tested CanTerastallize again * fixed infinite cost if NO_COST flag not assigned
This commit is contained in:
parent
e791bc08e7
commit
9c46b83dbd
1 changed files with 5 additions and 6 deletions
|
@ -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)))
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue