mirror of
https://github.com/pret/pokefirered.git
synced 2026-04-25 07:19:36 -05:00
Allow 1-mon doubles without duplicating player lead
This commit is contained in:
parent
e9ff05c45c
commit
ddea807c87
|
|
@ -2323,6 +2323,15 @@ static void BattleStartClearSetData(void)
|
|||
gBattleScripting.animTargetsHit = 0;
|
||||
gLeveledUpInBattle = 0;
|
||||
gAbsentBattlerFlags = 0;
|
||||
if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
|
||||
&& !(gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_LINK)))
|
||||
{
|
||||
u8 playerLeft = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT);
|
||||
u8 playerRight = GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT);
|
||||
|
||||
if (gBattlerPartyIndexes[playerLeft] == gBattlerPartyIndexes[playerRight])
|
||||
gAbsentBattlerFlags |= gBitTable[playerRight];
|
||||
}
|
||||
gBattleStruct->runTries = 0;
|
||||
gBattleStruct->safariRockThrowCounter = 0;
|
||||
gBattleStruct->safariBaitThrowCounter = 0;
|
||||
|
|
|
|||
|
|
@ -94,12 +94,15 @@ void HasEnoughMonsForDoubleBattle(void)
|
|||
case PLAYER_HAS_TWO_USABLE_MONS:
|
||||
gSpecialVar_Result = PLAYER_HAS_TWO_USABLE_MONS;
|
||||
break;
|
||||
case PLAYER_HAS_ONE_USABLE_MON:
|
||||
// Allow scripted double battles to start even when the player can only
|
||||
// field one battler. Battle init will mark the right-side battler slot
|
||||
// absent so the lead mon is not duplicated.
|
||||
gSpecialVar_Result = PLAYER_HAS_TWO_USABLE_MONS;
|
||||
break;
|
||||
case PLAYER_HAS_ONE_MON:
|
||||
gSpecialVar_Result = PLAYER_HAS_ONE_MON;
|
||||
break;
|
||||
case PLAYER_HAS_ONE_USABLE_MON:
|
||||
gSpecialVar_Result = PLAYER_HAS_ONE_USABLE_MON;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user