diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-09-24 10:17:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-24 10:17:34 -0400 |
commit | 42d2fefe0218f529f9c22f3b6b4230ca91a00de5 (patch) | |
tree | db4ae87659baced2022e440109306266c1c80e3b /src/battle_script_commands.c | |
parent | f8f7617946e150514313267ba52a35ebd9052936 (diff) | |
parent | 09fd4fc4c57796036905cdc5caaa53fb96c436f8 (diff) |
Merge branch 'master' into tag-none
Diffstat (limited to 'src/battle_script_commands.c')
-rw-r--r-- | src/battle_script_commands.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index cea30bb21..2a5b4c112 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -833,9 +833,9 @@ static const u8 sTerrainToType[] = // - ITEM_ULTRA_BALL skips Master Ball and ITEM_NONE static const u8 sBallCatchBonuses[] = { - [ITEM_ULTRA_BALL - ITEM_ULTRA_BALL] = 20, - [ITEM_GREAT_BALL - ITEM_ULTRA_BALL] = 15, - [ITEM_POKE_BALL - ITEM_ULTRA_BALL] = 10, + [ITEM_ULTRA_BALL - ITEM_ULTRA_BALL] = 20, + [ITEM_GREAT_BALL - ITEM_ULTRA_BALL] = 15, + [ITEM_POKE_BALL - ITEM_ULTRA_BALL] = 10, [ITEM_SAFARI_BALL - ITEM_ULTRA_BALL] = 15 }; @@ -3519,7 +3519,7 @@ static void Cmd_unknown_24(void) if (HP_count == 0) gBattleOutcome |= B_OUTCOME_LOST; - + HP_count = 0; for (i = 0; i < PARTY_SIZE; i++) @@ -3544,7 +3544,7 @@ static void Cmd_unknown_24(void) if ((gHitMarker & HITMARKER_FAINTED2(i)) && (!gSpecialStatuses[i].flag40)) foundPlayer++; } - + foundOpponent = 0; for (i = 1; i < gBattlersCount; i += 2) @@ -4610,9 +4610,9 @@ static void Cmd_switchindataupdate(void) SwitchInClearSetData(); - if (gBattleTypeFlags & BATTLE_TYPE_PALACE + if (gBattleTypeFlags & BATTLE_TYPE_PALACE && gBattleMons[gActiveBattler].maxHP / 2 >= gBattleMons[gActiveBattler].hp - && gBattleMons[gActiveBattler].hp != 0 + && gBattleMons[gActiveBattler].hp != 0 && !(gBattleMons[gActiveBattler].status1 & STATUS1_SLEEP)) { gBattleStruct->palaceFlags |= gBitTable[gActiveBattler]; |