-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Reusable TMs #2903
Reusable TMs #2903
Conversation
You could include it though. There kind of isn't a reason not to, it's quick and it'd save the trouble of having to submit it in a separate PR, not to mention it's obviously related to the action of making TMs reusable. In
In static void Task_PartyMenuReplaceMove(u8 taskId)
{
struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId];
u16 move = gPartyMenu.data1;
u8 oldPP = GetMonData(mon, MON_DATA_PP1 + GetMoveSlotToReplace(), NULL);
if (IsPartyMenuTextPrinterActive() != TRUE)
{
RemoveMonPPBonus(mon, GetMoveSlotToReplace());
SetMonMoveSlot(mon, move, GetMoveSlotToReplace());
#if I_TMS_RESTORE_PP == TRUE
if (GetMonData(mon, MON_DATA_PP1 + GetMoveSlotToReplace(), NULL) > oldPP)
SetMonData(mon, MON_DATA_PP1 + GetMoveSlotToReplace(), &oldPP);
#endif
Task_LearnedMove(taskId);
}
} |
Ready for re-review. Doesn't include the PP restoration thing because tasks and my lack of expertise in regards to them. |
Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
A quick and straightforward way to make TMs reusable by assigning them an importance value of 1. Any TM that does not have this importance value functions as expected. Item removal after teaching a move is no longer based on item ID but rather on importance now. A gen-based config has been added for easy toggling for now, but perhaps a plain TRUE/FALSE config would be more straightforward to use.
This PR does NOT include retaining PP of the older move when a new one is taught, as is the case in the official games. This mechanic would also affect the move relearner if it can be accessed from the party menu and should perhaps evaluate a different config.
Discord contact info
Jasper#5206