Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case MENU_STATE_TRY_OVERWRITE_MOVE:
- if (!gPaletteFade.active)
- {
- if (sMoveRelearnerStruct->moveSlot == MAX_MON_MOVES)
- {
- sMoveRelearnerStruct->state = MENU_STATE_PRINT_STOP_TEACHING;
- }
- else
- {
- u16 moveId = GetMonData(&gPlayerParty[sMoveRelearnerStruct->partyMon], MON_DATA_MOVE1 + sMoveRelearnerStruct->moveSlot);
- u8 oldPP;
- if (FlagGet(FLAG_PARTY_MOVES))
- {
- StringCopy(gStringVar3, gMoveNames[moveId]);
- RemoveMonPPBonus(&gPlayerParty[sMoveRelearnerStruct->partyMon], sMoveRelearnerStruct->moveSlot);
- oldPP = GetMonData(&gPlayerParty[sMoveRelearnerStruct->partyMon], MON_DATA_PP1 + GetMoveSlotToReplace(), NULL);
- SetMonMoveSlot(&gPlayerParty[sMoveRelearnerStruct->partyMon], GetCurrentSelectedMove(), sMoveRelearnerStruct->moveSlot);
- if (GetMonData(&gPlayerParty[sMoveRelearnerStruct->partyMon], MON_DATA_PP1 + GetMoveSlotToReplace(), NULL) > oldPP)
- SetMonData(&gPlayerParty[sMoveRelearnerStruct->partyMon], MON_DATA_PP1 + GetMoveSlotToReplace(), &oldPP);
- StringCopy(gStringVar2, gMoveNames[GetCurrentSelectedMove()]);
- FormatAndPrintText(gText_MoveRelearnerAndPoof);
- sMoveRelearnerStruct->state = MENU_STATE_DOUBLE_FANFARE_FORGOT_MOVE;
- gSpecialVar_0x8004 = TRUE;
- }
- else
- {
- StringCopy(gStringVar3, gMoveNames[moveId]);
- RemoveMonPPBonus(&gPlayerParty[sMoveRelearnerStruct->partyMon], sMoveRelearnerStruct->moveSlot);
- SetMonMoveSlot(&gPlayerParty[sMoveRelearnerStruct->partyMon], GetCurrentSelectedMove(), sMoveRelearnerStruct->moveSlot);
- StringCopy(gStringVar2, gMoveNames[GetCurrentSelectedMove()]);
- FormatAndPrintText(gText_MoveRelearnerAndPoof);
- sMoveRelearnerStruct->state = MENU_STATE_DOUBLE_FANFARE_FORGOT_MOVE;
- gSpecialVar_0x8004 = TRUE;
- }
- }
- }
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement