From 1862f70466d6047d1585fe2487de5aa4fa1e8324 Mon Sep 17 00:00:00 2001 From: jiangzhengwenjz Date: Thu, 17 Oct 2019 12:26:01 +0800 Subject: thru BattleIntroDrawTrainersOrMonsSprites --- src/battle_script_commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/battle_script_commands.c') diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index ecc8e3d36..46120085a 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -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 -- cgit v1.2.3 From b0400ef6ba6e6cf49ad2bdc19a29eb2abef26701 Mon Sep 17 00:00:00 2001 From: jiangzhengwenjz Date: Mon, 21 Oct 2019 03:07:59 +0800 Subject: battle_setup funcs --- src/battle_script_commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/battle_script_commands.c') diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 46120085a..aec6eec8e 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)) @@ -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) -- cgit v1.2.3 From b4692071218344995fed976ea1023df4702caa9e Mon Sep 17 00:00:00 2001 From: jiangzhengwenjz Date: Thu, 24 Oct 2019 14:05:20 +0800 Subject: rename BATTLE_TYPE_OLD_MAN_TUTORIAL --- src/battle_script_commands.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/battle_script_commands.c') diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 179a0ee79..a7d8cb6fa 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1223,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)) @@ -4415,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))) @@ -9437,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); -- cgit v1.2.3