diff options
| author | dannye <33dannye@gmail.com> | 2024-09-25 00:45:00 -0500 |
|---|---|---|
| committer | dannye <33dannye@gmail.com> | 2024-09-25 00:45:00 -0500 |
| commit | a02a98ee7ada1a658e28698484058be2796dc0df (patch) | |
| tree | 945986054565bd8b5212fc755415096050d1d3a8 /engine/pokemon/add_mon.asm | |
| parent | Use long option flags for rgbgfx, same as tools/gfx (diff) | |
| parent | Use `const_skip` (diff) | |
| download | pokeyellow-a02a98ee7ada1a658e28698484058be2796dc0df.tar.gz pokeyellow-a02a98ee7ada1a658e28698484058be2796dc0df.tar.xz pokeyellow-a02a98ee7ada1a658e28698484058be2796dc0df.zip | |
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'engine/pokemon/add_mon.asm')
| -rw-r--r-- | engine/pokemon/add_mon.asm | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/engine/pokemon/add_mon.asm b/engine/pokemon/add_mon.asm index c498f02a..a0b1ef0a 100644 --- a/engine/pokemon/add_mon.asm +++ b/engine/pokemon/add_mon.asm @@ -21,7 +21,7 @@ _AddPartyMon:: jr nc, .noCarry inc d .noCarry - ld a, [wcf91] + ld a, [wCurPartySpecies] ld [de], a ; write species of new mon in party list inc de ld a, $ff ; terminator @@ -64,8 +64,8 @@ _AddPartyMon:: ld e, l ld d, h push hl - ld a, [wcf91] - ld [wd0b5], a + ld a, [wCurPartySpecies] + ld [wCurSpecies], a call GetMonHeader ld hl, wMonHeader ld a, [hli] @@ -80,20 +80,20 @@ _AddPartyMon:: jr nz, .next4 ; If the mon is being added to the player's party, update the pokedex. - ld a, [wcf91] - ld [wd11e], a + ld a, [wCurPartySpecies] + ld [wPokedexNum], a push de predef IndexToPokedex pop de - ld a, [wd11e] + ld a, [wPokedexNum] dec a ld c, a ld b, FLAG_TEST ld hl, wPokedexOwned call FlagAction ld a, c ; whether the mon was already flagged as owned - ld [wUnusedD153], a ; not read - ld a, [wd11e] + ld [wUnusedAlreadyOwnedFlag], a + ld a, [wPokedexNum] dec a ld c, a ld b, FLAG_SET @@ -170,7 +170,7 @@ _AddPartyMon:: inc de ld a, [hli] ; catch rate (held item in gen 2) ld [de], a - ld a, [wcf91] + ld a, [wCurPartySpecies] cp KADABRA jr nz, .notKadabra ld a, TWISTEDSPOON_GSC @@ -205,7 +205,7 @@ _AddPartyMon:: inc de ld [de], a push de - ld a, [wCurEnemyLVL] + ld a, [wCurEnemyLevel] ld d, a callfar CalcExperience pop de @@ -230,7 +230,7 @@ _AddPartyMon:: pop hl call AddPartyMon_WriteMovePP inc de - ld a, [wCurEnemyLVL] + ld a, [wCurEnemyLevel] ld [de], a inc de ld a, [wIsInBattle] @@ -267,13 +267,13 @@ AddPartyMon_WriteMovePP: ld hl, Moves ld bc, MOVE_LENGTH call AddNTimes - ld de, wcd6d + ld de, wMoveData ld a, BANK(Moves) call FarCopyData pop bc pop de pop hl - ld a, [wcd6d + 5] ; PP is byte 5 of move data + ld a, [wMoveData + MOVE_PP] .empty inc de ld [de], a @@ -281,7 +281,7 @@ AddPartyMon_WriteMovePP: jr nz, .pploop ; there are still moves to read ret -; adds enemy mon [wcf91] (at position [wWhichPokemon] in enemy list) to own party +; adds enemy mon [wCurPartySpecies] (at position [wWhichPokemon] in enemy list) to own party ; used in the cable club trade center _AddEnemyMonToPlayerParty:: ld hl, wPartyCount @@ -294,7 +294,7 @@ _AddEnemyMonToPlayerParty:: ld c, a ld b, $0 add hl, bc - ld a, [wcf91] + ld a, [wCurPartySpecies] ld [hli], a ; add mon as last list entry ld [hl], $ff ; write new sentinel ld hl, wPartyMons @@ -328,10 +328,10 @@ _AddEnemyMonToPlayerParty:: call SkipFixedLengthTextEntries ld bc, NAME_LENGTH call CopyData ; write new mon's nickname (from an enemy mon) - ld a, [wcf91] - ld [wd11e], a + ld a, [wCurPartySpecies] + ld [wPokedexNum], a predef IndexToPokedex - ld a, [wd11e] + ld a, [wPokedexNum] dec a ld c, a ld b, FLAG_SET @@ -377,7 +377,7 @@ _MoveMon:: cp DAYCARE_TO_PARTY ld a, [wDayCareMon] jr z, .copySpecies - ld a, [wcf91] + ld a, [wCurPartySpecies] .copySpecies ld [hli], a ; write new mon ID ld [hl], $ff ; write new sentinel @@ -506,7 +506,7 @@ _MoveMon:: call LoadMonData farcall CalcLevelFromExperience ld a, d - ld [wCurEnemyLVL], a + ld [wCurEnemyLevel], a pop hl ld bc, wBoxMon2 - wBoxMon1 add hl, bc |
