Updated Implementing Catch EXP (markdown)

DavidJCobb 2023-11-16 02:23:38 +01:00
parent 8540693d21
commit f26e8eec9e
1 changed files with 1 additions and 1 deletions

@ -212,7 +212,7 @@ That takes us to line 9938, which is in the middle of `Cmd_handleballthrow`. The
SetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_POKEBALL, &gLastUsedItem); SetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_POKEBALL, &gLastUsedItem);
``` ```
It doesn't do anything else to "remember," within C, that a successful capture has occurred, because it doesn't really need to *remember* that; we've decided that the next script instruction to run should be the "successful capture" script, and that'll do whatever it needs to do. `Cmd_handleballthrow` doesn't do anything else to "remember" the situation in C, but it does this *one* line of code that we can take advantage of. When you catch a Pokémon, the game modifies that Pokémon to store the type of Poké Ball you used, so that you can see that ball type when viewing the Pokémon's stats. It doesn't set any variables or do anything else to "remember," within C, that a successful capture has occurred, because it doesn't really need to *remember* that; we've decided that the next script instruction to run should be the "successful capture" script, and that'll do whatever it needs to do. What *does* happen in C, though, is this *one* line of code that we can take advantage of. When you catch a Pokémon, the game modifies that Pokémon to store the type of Poké Ball you used, so that you can see that ball type when viewing the Pokémon's stats.
We *set* that information. We can *get* that information. We *set* that information. We can *get* that information.