diff options
Diffstat (limited to 'engine/events/treemons.asm')
-rw-r--r--[-rwxr-xr-x] | engine/events/treemons.asm | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/engine/events/treemons.asm b/engine/events/treemons.asm index 6d55004f4..cd78421d6 100755..100644 --- a/engine/events/treemons.asm +++ b/engine/events/treemons.asm @@ -1,4 +1,4 @@ -TreeMonEncounter: ; b81ea +TreeMonEncounter: farcall StubbedTrainerRankings_TreeEncounters xor a @@ -25,10 +25,8 @@ TreeMonEncounter: ; b81ea xor a ld [wScriptVar], a ret -; b8219 - -RockMonEncounter: ; b8219 +RockMonEncounter: xor a ld [wTempWildMonSpecies], a ld [wCurPartyLevel], a @@ -54,11 +52,10 @@ RockMonEncounter: ; b8219 .no_battle xor a ret -; b823e db $05 ; ???? -GetTreeMonSet: ; b823f +GetTreeMonSet: ; Return carry and treemon set in a ; if the current map is in table hl. ld a, [wMapNumber] @@ -93,11 +90,10 @@ GetTreeMonSet: ; b823f ld a, [hl] scf ret -; b825e INCLUDE "data/wild/treemon_maps.asm" -GetTreeMons: ; b82d2 +GetTreeMons: ; Return the address of TreeMon table a in hl. ; Return nc if table a doesn't exist. @@ -123,11 +119,10 @@ GetTreeMons: ; b82d2 .quit xor a ret -; b82e8 INCLUDE "data/wild/treemons.asm" -GetTreeMon: ; b83e5 +GetTreeMon: push hl call GetTreeScore pop hl @@ -168,9 +163,8 @@ GetTreeMon: ; b83e5 jr nz, .skip call SelectTreeMon ret -; b841f -SelectTreeMon: ; b841f +SelectTreeMon: ; Read a TreeMons table and pick one monster at random. ld a, 100 @@ -195,14 +189,13 @@ SelectTreeMon: ; b841f scf ret -NoTreeMon: ; b843b +NoTreeMon: xor a ld [wTempWildMonSpecies], a ld [wCurPartyLevel], a ret -; b8443 -GetTreeScore: ; b8443 +GetTreeScore: call .CoordScore ld [wBuffer1], a call .OTIDScore @@ -228,9 +221,8 @@ GetTreeScore: ; b8443 .rare ld a, TREEMON_SCORE_RARE ret -; b8466 -.CoordScore: ; b8466 +.CoordScore: call GetFacingTileCoord ld hl, 0 ld c, e @@ -269,9 +261,8 @@ GetTreeScore: ; b8443 ld a, [hQuotient + 3] ret -; b849d -.OTIDScore: ; b849d +.OTIDScore: ld a, [wPlayerID] ld [hDividend], a ld a, [wPlayerID + 1] @@ -282,4 +273,3 @@ GetTreeScore: ; b8443 call Divide ld a, [hQuotient + 3] ret -; b84b3 |