diff options
-rw-r--r-- | Adding-items-that-act-like-HMs.md | 21 |
1 files changed, 21 insertions, 0 deletions
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 @@ -188,6 +188,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 - call CheckPartyMove |