diff options
author | PikalaxALT <PikalaxALT@gmail.com> | 2019-10-26 10:23:13 -0400 |
---|---|---|
committer | PikalaxALT <PikalaxALT@gmail.com> | 2019-10-26 10:23:13 -0400 |
commit | 93f0703fcdda810062071fde4febe111146c18cc (patch) | |
tree | 241164c7e5fd5e71a9e3eca6eb8d6a918566d963 /src/battle_script_commands.c | |
parent | fd78afa5a7d4441fe0d76693e301deb6bc2557dc (diff) | |
parent | 1f569f0136952135a0e17fe22cf180c0e87dd007 (diff) |
Merge branch 'master' of github.com:pret/pokefirered into script_menu
Diffstat (limited to 'src/battle_script_commands.c')
-rw-r--r-- | src/battle_script_commands.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 3de2a6dea..a7d8cb6fa 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -48,6 +48,7 @@ #include "constants/abilities.h" #include "constants/pokemon.h" #include "constants/trainers.h" +#include "constants/map_types.h" #define DEFENDER_IS_PROTECTED ((gProtectStructs[gBattlerTarget].protected) && (gBattleMoves[gCurrentMove].flags & FLAG_PROTECT_AFFECTED)) @@ -1222,7 +1223,7 @@ static void atk04_critcalc(void) critChance = NELEMS(sCriticalHitChance) - 1; if ((gBattleMons[gBattlerTarget].ability != ABILITY_BATTLE_ARMOR && gBattleMons[gBattlerTarget].ability != ABILITY_SHELL_ARMOR) && !(gStatuses3[gBattlerAttacker] & STATUS3_CANT_SCORE_A_CRIT) - && !(gBattleTypeFlags & BATTLE_TYPE_OLDMAN_TUTORIAL) + && !(gBattleTypeFlags & BATTLE_TYPE_OLD_MAN_TUTORIAL) && !(Random() % sCriticalHitChance[critChance]) && (!(gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE) || sub_80EB2E0(1)) && !(gBattleTypeFlags & BATTLE_TYPE_POKEDUDE)) @@ -4414,7 +4415,7 @@ static void atk4E_switchinanim(void) && !(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_LEGENDARY - | BATTLE_TYPE_OLDMAN_TUTORIAL + | BATTLE_TYPE_OLD_MAN_TUTORIAL | BATTLE_TYPE_POKEDUDE | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_GHOST))) @@ -9436,7 +9437,7 @@ static void atkEF_handleballthrow(void) MarkBattlerForControllerExec(gActiveBattler); gBattlescriptCurrInstr = BattleScript_TrainerBallBlock; } - else if (gBattleTypeFlags & (BATTLE_TYPE_POKEDUDE | BATTLE_TYPE_OLDMAN_TUTORIAL)) + else if (gBattleTypeFlags & (BATTLE_TYPE_POKEDUDE | BATTLE_TYPE_OLD_MAN_TUTORIAL)) { BtlController_EmitBallThrowAnim(0, BALL_3_SHAKES_SUCCESS); MarkBattlerForControllerExec(gActiveBattler); @@ -9451,7 +9452,6 @@ static void atkEF_handleballthrow(void) catchRate = gBattleStruct->safariCatchFactor * 1275 / 100; else catchRate = gBaseStats[gBattleMons[gBattlerTarget].species].catchRate; - if (gLastUsedItem > ITEM_SAFARI_BALL) { switch (gLastUsedItem) @@ -9515,7 +9515,7 @@ static void atkEF_handleballthrow(void) else { if (gBattleResults.catchAttempts[gLastUsedItem - ITEM_ULTRA_BALL] < 0xFF) - gBattleResults.catchAttempts[gLastUsedItem - ITEM_ULTRA_BALL]++; + ++gBattleResults.catchAttempts[gLastUsedItem - ITEM_ULTRA_BALL]; } } if (odds > 254) // mon caught |