Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add caught mon to full party by sending a different mon to the Box #6058

Open
wants to merge 20 commits into
base: upcoming
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions asm/macros/battle_script.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1277,8 +1277,9 @@
.byte 0xef
.endm

.macro givecaughtmon
.macro givecaughtmon passInstr:req
.byte 0xf0
.4byte \passInstr
.endm

.macro trysetcaughtmondexflags failInstr:req
Expand All @@ -1290,9 +1291,8 @@
.byte 0xf2
.endm

.macro trygivecaughtmonnick successInstr:req
.macro trygivecaughtmonnick
.byte 0xf3
.4byte \successInstr
.endm

.macro subattackerhpbydmg
Expand Down
6 changes: 3 additions & 3 deletions data/battle_scripts_2.s
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,13 @@ BattleScript_TryNicknameCaughtMon::
printstring STRINGID_GIVENICKNAMECAPTURED
waitstate
setbyte gBattleCommunication, 0
trygivecaughtmonnick BattleScript_GiveCaughtMonEnd
givecaughtmon
trygivecaughtmonnick
givecaughtmon BattleScript_SuccessBallThrowEnd
printfromtable gCaughtMonStringIds
waitmessage B_WAIT_TIME_LONG
goto BattleScript_SuccessBallThrowEnd
BattleScript_GiveCaughtMonEnd::
givecaughtmon
givecaughtmon BattleScript_SuccessBallThrowEnd
BattleScript_SuccessBallThrowEnd::
setbyte gBattleOutcome, B_OUTCOME_CAUGHT
finishturn
Expand Down
6 changes: 6 additions & 0 deletions data/text/pc_transfer.inc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ gText_PkmnTransferredLanettesPCBoxFull::
.string "{STR_VAR_2} was transferred to\n"
.string "BOX “{STR_VAR_1}.”$"

gText_PkmnSentToPCAfterCatch::
.string "{STR_VAR_2} was sent to\n"
.string "{B_PC_CREATOR_NAME} PC.\p"
.string "It was placed in \n"
.string "BOX “{STR_VAR_1}”.$"

gText_NoMoreRoomForPokemon::
.string "There's no more room for POKéMON!\p"
.string "The POKéMON BOXES are full and\n"
Expand Down
2 changes: 2 additions & 0 deletions include/config/battle.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@
#define B_LAST_USED_BALL TRUE // If TRUE, the "last used ball" feature from Gen 7 will be implemented
#define B_LAST_USED_BALL_BUTTON R_BUTTON // If last used ball is implemented, this button (or button combo) will trigger throwing the last used ball.
#define B_LAST_USED_BALL_CYCLE TRUE // If TRUE, then holding B_LAST_USED_BALL_BUTTON while pressing the D-Pad cycles through the balls
#define B_CATCH_SWAP_INTO_PARTY GEN_LATEST // In Gen 7+, the option to swap the caught wild mon to the party will appear, allowing you to send a different mon to the box.
#define B_CATCH_SWAP_CHECK_HMS TRUE // If TRUE, the catch swap feature above will prevent returning mons to the box if they know HMs.

// Other settings
#define B_DOUBLE_WILD_CHANCE 0 // % chance of encountering two Pokémon in a Wild Encounter.
Expand Down
14 changes: 9 additions & 5 deletions include/constants/battle_string_ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -727,8 +727,10 @@
#define STRINGID_SUPEREFFECTIVETWOFOES 725
#define STRINGID_NOTVERYEFFECTIVETWOFOES 726
#define STRINGID_ITDOESNTAFFECTTWOFOES 727
#define STRINGID_SENDCAUGHTMONPARTYORBOX 728
#define STRINGID_PKMNSENTTOPCAFTERCATCH 729

#define BATTLESTRINGS_COUNT 728
#define BATTLESTRINGS_COUNT 730

// This is the string id that gBattleStringsTable starts with.
// String ids before this (e.g. STRINGID_INTROMSG) are not in the table,
Expand Down Expand Up @@ -892,10 +894,12 @@
#define B_MSG_WEAKEN_FIRE 1

// gCaughtMonStringIds
#define B_MSG_SENT_SOMEONES_PC 0
#define B_MSG_SENT_LANETTES_PC 1
#define B_MSG_SOMEONES_BOX_FULL 2
#define B_MSG_LANETTES_BOX_FULL 3
#define B_MSG_NO_MESSSAGE_SKIP 0
#define B_MSG_SENT_SOMEONES_PC 1
#define B_MSG_SENT_LANETTES_PC 2
#define B_MSG_SOMEONES_BOX_FULL 3
#define B_MSG_LANETTES_BOX_FULL 4
#define B_MSG_SWAPPED_INTO_PARTY 5

// gPrimalWeatherBlocksStringIds
#define B_MSG_PRIMAL_WEATHER_FIZZLED_BY_RAIN 0
Expand Down
4 changes: 3 additions & 1 deletion include/constants/party_menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#define PARTY_ACTION_CHOOSE_AND_CLOSE 11
#define PARTY_ACTION_MOVE_TUTOR 12
#define PARTY_ACTION_MINIGAME 13
#define PARTY_ACTION_REUSABLE_ITEM 14 // Unused. The only reusable items are handled separately
#define PARTY_ACTION_SEND_MON_TO_BOX 14 // Reused from PARTY_ACTION_REUSABLE_ITEM. The only reusable items are handled separately
#define PARTY_ACTION_CHOOSE_FAINTED_MON 15

// IDs for DisplayPartyMenuStdMessage, to display the message at the bottom of the party menu
Expand Down Expand Up @@ -82,6 +82,8 @@
#define PARTY_MSG_WHICH_APPLIANCE 27
#define PARTY_MSG_CHOOSE_SECOND_FUSION 28
#define PARTY_MSG_NO_POKEMON 29
#define PARTY_MSG_CHOOSE_MON_FOR_BOX 30

#define PARTY_MSG_NONE 127

// IDs for DisplayPartyPokemonDescriptionText, to display a message in the party pokemon's box
Expand Down
2 changes: 2 additions & 0 deletions include/naming_screen.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ enum {
NAMING_SCREEN_WALDA,
};

extern void BattleMainCB2(void);

void DoNamingScreen(u8 templateNum, u8 *destBuffer, u16 monSpecies, u16 monGender, u32 monPersonality, MainCallback returnCallback);

#endif // GUARD_NAMING_SCREEN_H
5 changes: 5 additions & 0 deletions include/strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -1551,6 +1551,7 @@ extern const u8 gText_PkmnTransferredSomeonesPCBoxFull[];
extern const u8 gText_PkmnTransferredLanettesPCBoxFull[];
extern const u8 gText_PkmnTransferredSomeonesPC[];
extern const u8 gText_PkmnTransferredLanettesPC[];
extern const u8 gText_PkmnSentToPCAfterCatch[];

// hall of fame
extern const u8 gText_LeagueChamp[];
Expand Down Expand Up @@ -1584,6 +1585,7 @@ extern const u8 gDaycareText_PlayOther[];
extern const u8 gText_ChoosePokemon[];
extern const u8 gText_ChoosePokemonCancel[];
extern const u8 gText_ChoosePokemonConfirm[];
extern const u8 gText_SendWhichMonToPC[];
extern const u8 gText_MoveToWhere[];
extern const u8 gText_TeachWhichPokemon[];
extern const u8 gText_UseOnWhichPokemon[];
Expand Down Expand Up @@ -2429,4 +2431,7 @@ extern const u8 gText_PlayerScurriedBackHome[];
extern const u8 gText_Relearn[]; // move relearner from summary screen
extern const u8 gText_Rename[]; // change nickname from summary screen

// Switch Caught Mon into Party
extern const u8 gText_CannotSendMonToBoxHM[];

#endif // GUARD_STRINGS_H
3 changes: 2 additions & 1 deletion src/battle_controller_player.c
Original file line number Diff line number Diff line change
Expand Up @@ -2172,7 +2172,8 @@ static void PlayerHandleChoosePokemon(u32 battler)
gBattlePartyCurrentOrder[i] = gBattleResources->bufferA[battler][4 + i];

if (gBattleTypeFlags & BATTLE_TYPE_ARENA && (gBattleResources->bufferA[battler][1] & 0xF) != PARTY_ACTION_CANT_SWITCH
&& (gBattleResources->bufferA[battler][1] & 0xF) != PARTY_ACTION_CHOOSE_FAINTED_MON)
&& (gBattleResources->bufferA[battler][1] & 0xF) != PARTY_ACTION_CHOOSE_FAINTED_MON
&& (gBattleResources->bufferA[battler][1] & 0xF) != PARTY_ACTION_SEND_MON_TO_BOX)
{
BtlController_EmitChosenMonReturnValue(battler, BUFFER_B, gBattlerPartyIndexes[battler] + 1, gBattlePartyCurrentOrder);
PlayerBufferExecCompleted(battler);
Expand Down
11 changes: 7 additions & 4 deletions src/battle_message.c
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,8 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
[STRINGID_SUPEREFFECTIVETWOFOES] = COMPOUND_STRING("It's super effective on {B_DEF_NAME_WITH_PREFIX2} and {B_DEF_PARTNER_NAME}!"),
[STRINGID_NOTVERYEFFECTIVETWOFOES] = COMPOUND_STRING("It's not very effective on {B_DEF_NAME_WITH_PREFIX2} and {B_DEF_PARTNER_NAME}!"),
[STRINGID_ITDOESNTAFFECTTWOFOES] = COMPOUND_STRING("It doesn't affect {B_DEF_NAME_WITH_PREFIX2} and {B_DEF_PARTNER_NAME}…"),
[STRINGID_SENDCAUGHTMONPARTYORBOX] = COMPOUND_STRING("Add {B_DEF_NAME} to your party?"),
[STRINGID_PKMNSENTTOPCAFTERCATCH] = gText_PkmnSentToPCAfterCatch,
};

const u16 gTrainerUsedItemStringIds[] =
Expand Down Expand Up @@ -1355,10 +1357,11 @@ const u16 gFlashFireStringIds[] =

const u16 gCaughtMonStringIds[] =
{
[B_MSG_SENT_SOMEONES_PC] = STRINGID_PKMNTRANSFERREDSOMEONESPC,
[B_MSG_SENT_LANETTES_PC] = STRINGID_PKMNTRANSFERREDLANETTESPC,
[B_MSG_SOMEONES_BOX_FULL] = STRINGID_PKMNBOXSOMEONESPCFULL,
[B_MSG_LANETTES_BOX_FULL] = STRINGID_PKMNBOXLANETTESPCFULL,
[B_MSG_SENT_SOMEONES_PC] = STRINGID_PKMNTRANSFERREDSOMEONESPC,
[B_MSG_SENT_LANETTES_PC] = STRINGID_PKMNTRANSFERREDLANETTESPC,
[B_MSG_SOMEONES_BOX_FULL] = STRINGID_PKMNBOXSOMEONESPCFULL,
[B_MSG_LANETTES_BOX_FULL] = STRINGID_PKMNBOXLANETTESPCFULL,
[B_MSG_SWAPPED_INTO_PARTY] = STRINGID_PKMNSENTTOPCAFTERCATCH,
};

const u16 gRoomsStringIds[] =
Expand Down
176 changes: 144 additions & 32 deletions src/battle_script_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,16 @@ static const u16 sBadgeFlags[8] = {

static const u16 sWhiteOutBadgeMoney[9] = { 8, 16, 24, 36, 48, 64, 80, 100, 120 };

enum GiveCaughtMonStates
{
GIVECAUGHTMON_CHECK_PARTY_SIZE,
GIVECAUGHTMON_ASK_ADD_TO_PARTY,
GIVECAUGHTMON_HANDLE_INPUT,
GIVECAUGHTMON_DO_CHOOSE_MON,
GIVECAUGHTMON_HANDLE_CHOSEN_MON,
GIVECAUGHTMON_GIVE_AND_SHOW_MSG,
};

#define STAT_CHANGE_WORKED 0
#define STAT_CHANGE_DIDNT_WORK 1

Expand Down Expand Up @@ -15791,41 +15801,145 @@ static void Cmd_handleballthrow(void)

static void Cmd_givecaughtmon(void)
{
CMD_ARGS();

if (B_RESTORE_HELD_BATTLE_ITEMS >= GEN_9)
{
u16 lostItem = gBattleStruct->itemLost[B_SIDE_OPPONENT][gBattlerPartyIndexes[GetCatchingBattler()]].originalItem;
if (lostItem != ITEM_NONE && ItemId_GetPocket(lostItem) != POCKET_BERRIES)
SetMonData(&gEnemyParty[gBattlerPartyIndexes[GetCatchingBattler()]], MON_DATA_HELD_ITEM, &lostItem); // Restore non-berry items
}
CMD_ARGS(const u8 *passInstr);
enum GiveCaughtMonStates state = gBattleCommunication[MULTIUSE_STATE];

if (GiveMonToPlayer(&gEnemyParty[gBattlerPartyIndexes[GetCatchingBattler()]]) != MON_GIVEN_TO_PARTY)
switch (state)
{
if (!ShouldShowBoxWasFullMessage())
case GIVECAUGHTMON_CHECK_PARTY_SIZE:
if (CalculatePlayerPartyCount() == PARTY_SIZE && B_CATCH_SWAP_INTO_PARTY >= GEN_7)
{
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SENT_SOMEONES_PC;
StringCopy(gStringVar1, GetBoxNamePtr(VarGet(VAR_PC_BOX_TO_SEND_MON)));
GetMonData(&gEnemyParty[gBattlerPartyIndexes[GetCatchingBattler()]], MON_DATA_NICKNAME, gStringVar2);
PrepareStringBattle(STRINGID_SENDCAUGHTMONPARTYORBOX, gBattlerAttacker);
gBattleCommunication[MSG_DISPLAY] = 1;
gBattleCommunication[MULTIUSE_STATE] = GIVECAUGHTMON_ASK_ADD_TO_PARTY;
}
else
{
StringCopy(gStringVar1, GetBoxNamePtr(VarGet(VAR_PC_BOX_TO_SEND_MON))); // box the mon was sent to
GetMonData(&gEnemyParty[gBattlerPartyIndexes[GetCatchingBattler()]], MON_DATA_NICKNAME, gStringVar2);
StringCopy(gStringVar3, GetBoxNamePtr(GetPCBoxToSendMon())); //box the mon was going to be sent to
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SOMEONES_BOX_FULL;
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_NO_MESSSAGE_SKIP;
gBattleCommunication[MULTIUSE_STATE] = GIVECAUGHTMON_GIVE_AND_SHOW_MSG;
}
break;
case GIVECAUGHTMON_ASK_ADD_TO_PARTY:
HandleBattleWindow(YESNOBOX_X_Y, 0);
BattlePutTextOnWindow(gText_BattleYesNoChoice, B_WIN_YESNO);
gBattleCommunication[MULTIUSE_STATE] = GIVECAUGHTMON_HANDLE_INPUT;
gBattleCommunication[CURSOR_POSITION] = 0;
BattleCreateYesNoCursorAt(0);
break;
case GIVECAUGHTMON_HANDLE_INPUT:
if (JOY_NEW(DPAD_UP) && gBattleCommunication[CURSOR_POSITION] != 0)
{
PlaySE(SE_SELECT);
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
gBattleCommunication[CURSOR_POSITION] = 0;
BattleCreateYesNoCursorAt(0);
}
if (JOY_NEW(DPAD_DOWN) && gBattleCommunication[CURSOR_POSITION] == 0)
{
PlaySE(SE_SELECT);
BattleDestroyYesNoCursorAt(gBattleCommunication[CURSOR_POSITION]);
gBattleCommunication[CURSOR_POSITION] = 1;
BattleCreateYesNoCursorAt(1);
}
if (JOY_NEW(A_BUTTON))
{
PlaySE(SE_SELECT);
if (gBattleCommunication[CURSOR_POSITION] == 0)
{
gBattleCommunication[MULTIUSE_STATE] = GIVECAUGHTMON_DO_CHOOSE_MON;
}
else
{
gBattleCommunication[MULTIUSE_STATE] = GIVECAUGHTMON_GIVE_AND_SHOW_MSG;
}
}
else if (JOY_NEW(B_BUTTON))
{
PlaySE(SE_SELECT);
gBattleCommunication[MULTIUSE_STATE] = GIVECAUGHTMON_GIVE_AND_SHOW_MSG;
}
break;
case GIVECAUGHTMON_DO_CHOOSE_MON:
if (!gPaletteFade.active)
{
BtlController_EmitChoosePokemon(gBattlerAttacker, BUFFER_A, PARTY_ACTION_SEND_MON_TO_BOX, PARTY_SIZE, ABILITY_NONE, gBattleStruct->battlerPartyOrders[gBattlerAttacker]);
MarkBattlerForControllerExec(gBattlerAttacker);
gBattleCommunication[MULTIUSE_STATE] = GIVECAUGHTMON_HANDLE_CHOSEN_MON;
}
break;
case GIVECAUGHTMON_HANDLE_CHOSEN_MON:
if (gSelectedMonPartyId != PARTY_SIZE)
{
if (gSelectedMonPartyId > PARTY_SIZE)
{
// Choosing Pokemon was cancelled
gSelectedMonPartyId = PARTY_SIZE;
gBattleCommunication[MULTIUSE_STATE] = GIVECAUGHTMON_GIVE_AND_SHOW_MSG;
}
else
{
// Mon chosen, try to put it in the PC
if (CopyMonToPC(&gPlayerParty[gSelectedMonPartyId]) == MON_GIVEN_TO_PC)
{
GetMonNickname(&gPlayerParty[gSelectedMonPartyId], gStringVar2);
StringCopy(gStringVar1, GetBoxNamePtr(GetPCBoxToSendMon()));
ZeroMonData(&gPlayerParty[gSelectedMonPartyId]);
gBattleStruct->itemLost[B_SIDE_PLAYER][gSelectedMonPartyId].originalItem = ITEM_NONE;
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SWAPPED_INTO_PARTY;
gSelectedMonPartyId = PARTY_SIZE;
gBattleCommunication[MULTIUSE_STATE] = GIVECAUGHTMON_GIVE_AND_SHOW_MSG;
}
else
{
gSelectedMonPartyId = PARTY_SIZE;
gBattleCommunication[MULTIUSE_STATE] = GIVECAUGHTMON_GIVE_AND_SHOW_MSG;
}
}
}
break;
case GIVECAUGHTMON_GIVE_AND_SHOW_MSG:
if (B_RESTORE_HELD_BATTLE_ITEMS >= GEN_9)
{
u16 lostItem = gBattleStruct->itemLost[B_SIDE_OPPONENT][gBattlerPartyIndexes[GetCatchingBattler()]].originalItem;
if (lostItem != ITEM_NONE && ItemId_GetPocket(lostItem) != POCKET_BERRIES)
SetMonData(&gEnemyParty[gBattlerPartyIndexes[GetCatchingBattler()]], MON_DATA_HELD_ITEM, &lostItem); // Restore non-berry items
}

// Change to B_MSG_SENT_LANETTES_PC or B_MSG_LANETTES_BOX_FULL
if (FlagGet(FLAG_SYS_PC_LANETTE))
gBattleCommunication[MULTISTRING_CHOOSER]++;
}
if (GiveMonToPlayer(&gEnemyParty[gBattlerPartyIndexes[GetCatchingBattler()]]) != MON_GIVEN_TO_PARTY
&& gBattleCommunication[MULTISTRING_CHOOSER] != B_MSG_SWAPPED_INTO_PARTY)
{
if (!ShouldShowBoxWasFullMessage())
{
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SENT_SOMEONES_PC;
StringCopy(gStringVar1, GetBoxNamePtr(VarGet(VAR_PC_BOX_TO_SEND_MON)));
GetMonData(&gEnemyParty[gBattlerPartyIndexes[GetCatchingBattler()]], MON_DATA_NICKNAME, gStringVar2);
}
else
{
StringCopy(gStringVar1, GetBoxNamePtr(VarGet(VAR_PC_BOX_TO_SEND_MON))); // box the mon was sent to
GetMonData(&gEnemyParty[gBattlerPartyIndexes[GetCatchingBattler()]], MON_DATA_NICKNAME, gStringVar2);
StringCopy(gStringVar3, GetBoxNamePtr(GetPCBoxToSendMon())); //box the mon was going to be sent to
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SOMEONES_BOX_FULL;
}

gBattleResults.caughtMonSpecies = GetMonData(&gEnemyParty[gBattlerPartyIndexes[GetCatchingBattler()]], MON_DATA_SPECIES, NULL);
GetMonData(&gEnemyParty[gBattlerPartyIndexes[GetCatchingBattler()]], MON_DATA_NICKNAME, gBattleResults.caughtMonNick);
gBattleResults.caughtMonBall = GetMonData(&gEnemyParty[gBattlerPartyIndexes[GetCatchingBattler()]], MON_DATA_POKEBALL, NULL);
// Change to B_MSG_SENT_LANETTES_PC or B_MSG_LANETTES_BOX_FULL
if (FlagGet(FLAG_SYS_PC_LANETTE))
gBattleCommunication[MULTISTRING_CHOOSER]++;
}

gBattlescriptCurrInstr = cmd->nextInstr;
gBattleResults.caughtMonSpecies = GetMonData(&gEnemyParty[gBattlerPartyIndexes[GetCatchingBattler()]], MON_DATA_SPECIES, NULL);
GetMonData(&gEnemyParty[gBattlerPartyIndexes[GetCatchingBattler()]], MON_DATA_NICKNAME, gBattleResults.caughtMonNick);
gBattleResults.caughtMonBall = GetMonData(&gEnemyParty[gBattlerPartyIndexes[GetCatchingBattler()]], MON_DATA_POKEBALL, NULL);

gSelectedMonPartyId = PARTY_SIZE;
gBattleCommunication[MULTIUSE_STATE] = 0;

if (gBattleCommunication[MULTISTRING_CHOOSER] == B_MSG_NO_MESSSAGE_SKIP)
gBattlescriptCurrInstr = cmd->passInstr;
else
gBattlescriptCurrInstr = cmd->nextInstr;
break;
}
}

static void Cmd_trysetcaughtmondexflags(void)
Expand Down Expand Up @@ -15968,7 +16082,7 @@ void BattleDestroyYesNoCursorAt(u8 cursorPosition)

static void Cmd_trygivecaughtmonnick(void)
{
CMD_ARGS(const u8 *successInstr);
CMD_ARGS();

switch (gBattleCommunication[MULTIUSE_STATE])
{
Expand Down Expand Up @@ -16023,7 +16137,7 @@ static void Cmd_trygivecaughtmonnick(void)
GetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_SPECIES),
GetMonGender(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]]),
GetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_PERSONALITY, NULL),
BattleMainCB2);
ReshowBattleScreenAfterMenu);

gBattleCommunication[MULTIUSE_STATE]++;
}
Expand All @@ -16032,14 +16146,12 @@ static void Cmd_trygivecaughtmonnick(void)
if (gMain.callback2 == BattleMainCB2 && !gPaletteFade.active)
{
SetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_NICKNAME, gBattleStruct->caughtMonNick);
gBattlescriptCurrInstr = cmd->successInstr;
gBattleCommunication[MULTIUSE_STATE]++;
}
break;
case 4:
if (CalculatePlayerPartyCount() == PARTY_SIZE)
gBattlescriptCurrInstr = cmd->nextInstr;
else
gBattlescriptCurrInstr = cmd->successInstr;
gBattleCommunication[MULTIUSE_STATE] = 0;
gBattlescriptCurrInstr = cmd->nextInstr;
break;
}
}
Expand Down
Loading