You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
14
main.asm
14
main.asm
@@ -3758,13 +3758,13 @@ SpecialDratini: ; 0x8b170
|
|||||||
ld a, [$c2dd]
|
ld a, [$c2dd]
|
||||||
cp $2
|
cp $2
|
||||||
ret nc
|
ret nc
|
||||||
ld bc, TeamCount
|
ld bc, PartyCount
|
||||||
ld a, [bc]
|
ld a, [bc]
|
||||||
ld hl, 0
|
ld hl, 0
|
||||||
call GetNthTeamMon
|
call GetNthPartyMon
|
||||||
ld a, [bc]
|
ld a, [bc]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld de, TeamMon2 - TeamMon1
|
ld de, PartyMon2 - PartyMon1
|
||||||
.CheckForDratini
|
.CheckForDratini
|
||||||
; start at the end of the party and search backwards for a Dratini
|
; start at the end of the party and search backwards for a Dratini
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@@ -3810,7 +3810,7 @@ SpecialDratini: ; 0x8b170
|
|||||||
call GetFarByte
|
call GetFarByte
|
||||||
|
|
||||||
; get the address of the move's PP and update the PP
|
; get the address of the move's PP and update the PP
|
||||||
ld hl, TeamMon1PP - TeamMon1Moves
|
ld hl, PartyMon1PP - PartyMon1Moves
|
||||||
add hl, de
|
add hl, de
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
@@ -3837,7 +3837,7 @@ SpecialDratini: ; 0x8b170
|
|||||||
db 0
|
db 0
|
||||||
|
|
||||||
|
|
||||||
GetNthTeamMon: ; 0x8b1ce
|
GetNthPartyMon: ; 0x8b1ce
|
||||||
; inputs:
|
; inputs:
|
||||||
; hl must be set to 0 before calling this function.
|
; hl must be set to 0 before calling this function.
|
||||||
; a must be set to the number of Pokémon in the party.
|
; a must be set to the number of Pokémon in the party.
|
||||||
@@ -3846,13 +3846,13 @@ GetNthTeamMon: ; 0x8b1ce
|
|||||||
; returns the address of the last Pokémon in the party in hl.
|
; returns the address of the last Pokémon in the party in hl.
|
||||||
; sets carry if a is 0.
|
; sets carry if a is 0.
|
||||||
|
|
||||||
ld de, TeamMon1
|
ld de, PartyMon1
|
||||||
add hl, de
|
add hl, de
|
||||||
and a
|
and a
|
||||||
jr z, .EmptyParty
|
jr z, .EmptyParty
|
||||||
dec a
|
dec a
|
||||||
ret z
|
ret z
|
||||||
ld de, TeamMon2 - TeamMon1
|
ld de, PartyMon2 - PartyMon1
|
||||||
.loop
|
.loop
|
||||||
add hl, de
|
add hl, de
|
||||||
dec a
|
dec a
|
||||||
|
Reference in New Issue
Block a user