From 5af7716e1cd0ecb3cc462edcc807c014d01fa2f4 Mon Sep 17 00:00:00 2001 From: NobodySociety <43542553+NobodySociety@users.noreply.github.com> Date: Wed, 26 Feb 2020 18:01:41 -0500 Subject: Updated Adding items that act like HMs (markdown) --- Adding-items-that-act-like-HMs.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Adding-items-that-act-like-HMs.md b/Adding-items-that-act-like-HMs.md index 5b03f06..41842cc 100644 --- a/Adding-items-that-act-like-HMs.md +++ b/Adding-items-that-act-like-HMs.md @@ -187,6 +187,27 @@ Even with the item added and it being functional, the game will still check for If we look in [engine/events/overworld.asm](../blob/master/engine/events/overworld.asm) at the bottom, we'll see `TryCutOW`. This function is called when the player interacts with a cuttable tree, normally it checks the party first for a pokemon with cut, then for the appropriate badge, so we'll change it. +```Diff +CutFunction: +... + +.CheckAble: +- ld de, ENGINE_HIVEBADGE +- call CheckBadge +- jr c, .nohivebadge + call CheckMapForSomethingToCut + jr c, .nothingtocut + ld a, $1 + ret + +-.nohivebadge +- ld a, $80 +- ret + +``` + +and + ```Diff TryCutOW:: - ld d, CUT -- cgit v1.2.3