diff options
author | pikalaxalt <PikalaxALT@gmail.com> | 2016-06-19 20:38:52 -0400 |
---|---|---|
committer | pikalaxalt <PikalaxALT@gmail.com> | 2016-06-19 20:39:22 -0400 |
commit | 8ff2f5e63999114f82777c91be4963470161573b (patch) | |
tree | 761de53076d742ff7719b14579aed6070a328540 | |
parent | c002a609731ec6ae5ccb97387d895f7ab693328c (diff) |
Next phase of disassembling specials
-rwxr-xr-x | engine/specials.asm | 55 | ||||
-rw-r--r-- | main.asm | 20 |
2 files changed, 67 insertions, 8 deletions
diff --git a/engine/specials.asm b/engine/specials.asm index 1e8965aa..9e0917ba 100755 --- a/engine/specials.asm +++ b/engine/specials.asm @@ -139,22 +139,65 @@ SpecialNone: ; c389 ret Special_GameCornerPrizeMonCheckDex: ; c38a - dr $c38a, $c3ac + ld a, [wScriptVar] + dec a + call CheckCaughtMon + ret nz + ld a, [wScriptVar] + dec a + call SetSeenAndCaughtMon + call FadeToMenu + ld a, [wScriptVar] + ld [wd151], a + ld a, $3e + ld hl, $7981 + rst FarCall + call ExitAllMenus + ret SpecialSeenMon: ; c3ac - dr $c3ac, $c3b4 + ld a, [wScriptVar] + dec a + call SetSeenMon + ret Special_FindGreaterThanThatLevel: ; c3b4 - dr $c3b4, $c3c2 + ld a, [wScriptVar] + ld b, a + callba Functione6a9 + jr z, asm_c3f2 + jr asm_c3ec Special_FindAtLeastThatHappy: ; c3c2 - dr $c3c2, $c3d0 + ld a, [wScriptVar] + ld b, a + callba Functione6b0 + jr z, asm_c3f2 + jr asm_c3ec Special_FindThatSpecies: ; c3d0 - dr $c3d0, $c3de + ld a, [wScriptVar] + ld b, a + callba Functione6b7 + jr z, asm_c3f2 + jr asm_c3ec Special_FindThatSpeciesYourTrainerID: ; c3de - dr $c3de, $c3f7 + ld a, [wScriptVar] + ld b, a + callba Functione6bd + jr z, asm_c3f2 + jr asm_c3ec + +asm_c3ec + ld a, $1 + ld [wScriptVar], a + ret + +asm_c3f2 + xor a + ld [wScriptVar], a + ret Special_NameRival: ; c3f7 ld b, $2 @@ -272,7 +272,15 @@ CheckTossableItem_:: RemoveMonFromPartyOrBox: dr $e03f, $e513 CheckCurPartyMonFainted: - dr $e513, $e7a6 + dr $e513, $e6a9 +Functione6a9: + dr $e6a9, $e6b0 +Functione6b0: + dr $e6b0, $e6b7 +Functione6b7: + dr $e6b7, $e6bd +Functione6bd: + dr $e6bd, $e7a6 DoItemEffect_:: dr $e7a6, $fa3e ENDC @@ -292,7 +300,15 @@ CheckTossableItem_:: RemoveMonFromPartyOrBox: dr $e03d, $e511 CheckCurPartyMonFainted: - dr $e511, $e7a4 + dr $e511, $e6a7 +Functione6a9: + dr $e6a7, $e6ae +Functione6b0: + dr $e6ae, $e6b5 +Functione6b7: + dr $e6b5, $e6bb +Functione6bd: + dr $e6bb, $e7a4 DoItemEffect_:: dr $e7a4, $fa3c ENDC |