summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Disable-Catching-Pokemon.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/Disable-Catching-Pokemon.md b/Disable-Catching-Pokemon.md
new file mode 100644
index 0000000..081b868
--- /dev/null
+++ b/Disable-Catching-Pokemon.md
@@ -0,0 +1,28 @@
+## Disable Catching Pokemon
+
+Credit to ghoulslash
+
+This feature adds a flag that, when set, disables using any poke ball type in battle:
+
+<a href="https://imgur.com/fm2Q6Ds"><img src="https://i.imgur.com/fm2Q6Ds.png" title="source: imgur.com" /></a>
+
+### Add a new Flag:
+In [include/constants/flags.h](../blob/master/include/constants/flags.h), replace an unused flag with `FLAG_DISABLE_CATCHING`, eg.
+```c
+#define FLAG_DISABLE_CATCHING 0x494
+```
+
+### Make the flag functional
+Open [src/item_use.c](../blob/master/src/item_use.c). Navigate to the function, `void ItemUseInBattle_PokeBall(u8 taskId)`. Add the following code to the start of the function:
+```c
+ if (FlagGet(FLAG_DISABLE_CATCHING))
+ {
+ static const u8 sText_BallsCannotBeUsed[] = _("Poké Balls cannot be used\nright now!\p");
+ DisplayItemMessage(taskId, 1, sText_BallsCannotBeUsed, BagMenu_InitListsMenu);
+ }
+ else if (IsPlayerPartyAndPokemonStorageFull() == FALSE) // have room for mon
+ {
+ //etc...
+```
+
+When `FLAG_DISABLE_CATCHING` is set, the player will no longer be able to use a poke ball in battle.