diff options
author | ExpoSeed <43502820+ExpoSeed@users.noreply.github.com> | 2020-07-27 18:53:53 -0500 |
---|---|---|
committer | ExpoSeed <43502820+ExpoSeed@users.noreply.github.com> | 2020-07-27 18:53:53 -0500 |
commit | 5d727f5a9d24e8b94d367e87874713b1b9a29798 (patch) | |
tree | 932e791a0207091ddf7766b324eb18229320c43c | |
parent | 83c6956ed230a68a37201ec39f34e0fdf754675d (diff) |
Updated Learn moves upon evolution (markdown)
-rw-r--r-- | Learn-moves-upon-evolution.md | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Learn-moves-upon-evolution.md b/Learn-moves-upon-evolution.md index 60e0eeb..b08851a 100644 --- a/Learn-moves-upon-evolution.md +++ b/Learn-moves-upon-evolution.md @@ -14,6 +14,7 @@ u16 MonTryLearningNewMoveEvolution(struct Pokemon *mon, bool8 firstMove) u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL); u8 level = GetMonData(mon, MON_DATA_LEVEL, NULL); s32 i; + u32 retVal = 0; // since you can learn more than one move per level // the game needs to know whether you decided to // learn it or keep the old set to avoid asking @@ -29,11 +30,11 @@ u16 MonTryLearningNewMoveEvolution(struct Pokemon *mon, bool8 firstMove) { gMoveToLearn = gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID; sLearningMoveTableID++; - return GiveMoveToMon(mon, gMoveToLearn); + retVal = GiveMoveToMon(mon, gMoveToLearn); } sLearningMoveTableID++; } - return 0; + return retVal; } ``` This iterates through the mon's level up learnset and attempts to teach all the moves that are either level 0 or the same level as the mon. |