You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Prefix wram labels with w, part 2.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
ApplyPokerusTick: ; 13988
|
||||
; decreases all pokemon's pokerus counter by b. if the lower nybble reaches zero, the pokerus is cured.
|
||||
ld hl, PartyMon1PokerusStatus ; PartyMon1 + MON_PKRS
|
||||
ld a, [PartyCount]
|
||||
ld hl, wPartyMon1PokerusStatus ; wPartyMon1 + MON_PKRS
|
||||
ld a, [wPartyCount]
|
||||
and a
|
||||
ret z ; make sure it's not wasting time on an empty party
|
||||
ld c, a
|
||||
|
@@ -2,12 +2,12 @@ CheckPokerus: ; 4d860
|
||||
; Return carry if a monster in your party has Pokerus
|
||||
|
||||
; Get number of monsters to iterate over
|
||||
ld a, [PartyCount]
|
||||
ld a, [wPartyCount]
|
||||
and a
|
||||
jr z, .NoPokerus
|
||||
ld b, a
|
||||
; Check each monster in the party for Pokerus
|
||||
ld hl, PartyMon1PokerusStatus
|
||||
ld hl, wPartyMon1PokerusStatus
|
||||
ld de, PARTYMON_STRUCT_LENGTH
|
||||
.Check:
|
||||
ld a, [hl]
|
||||
|
@@ -1,7 +1,7 @@
|
||||
GivePokerusAndConvertBerries: ; 2ed44
|
||||
call ConvertBerriesToBerryJuice
|
||||
ld hl, PartyMon1PokerusStatus
|
||||
ld a, [PartyCount]
|
||||
ld hl, wPartyMon1PokerusStatus
|
||||
ld a, [wPartyCount]
|
||||
ld b, a
|
||||
ld de, PARTYMON_STRUCT_LENGTH
|
||||
; Check to see if any of your Pokemon already has Pokerus.
|
||||
@@ -28,14 +28,14 @@ GivePokerusAndConvertBerries: ; 2ed44
|
||||
ld a, [hRandomSub]
|
||||
cp $3
|
||||
ret nc ; 3/65536 chance (00 00, 00 01 or 00 02)
|
||||
ld a, [PartyCount]
|
||||
ld a, [wPartyCount]
|
||||
ld b, a
|
||||
.randomMonSelectLoop
|
||||
call Random
|
||||
and $7
|
||||
cp b
|
||||
jr nc, .randomMonSelectLoop
|
||||
ld hl, PartyMon1PokerusStatus
|
||||
ld hl, wPartyMon1PokerusStatus
|
||||
call GetPartyLocation ; get pokerus byte of random mon
|
||||
ld a, [hl]
|
||||
and $f0
|
||||
@@ -64,7 +64,7 @@ GivePokerusAndConvertBerries: ; 2ed44
|
||||
cp 1 + 33 percent
|
||||
ret nc ; 1/3 chance
|
||||
|
||||
ld a, [PartyCount]
|
||||
ld a, [wPartyCount]
|
||||
cp 1
|
||||
ret z ; only one mon, nothing to do
|
||||
|
||||
@@ -91,7 +91,7 @@ GivePokerusAndConvertBerries: ; 2ed44
|
||||
ret
|
||||
|
||||
.checkPreviousMonsLoop
|
||||
ld a, [PartyCount]
|
||||
ld a, [wPartyCount]
|
||||
cp b
|
||||
ret z ; no more mons
|
||||
ld a, l
|
||||
@@ -129,8 +129,8 @@ ConvertBerriesToBerryJuice: ; 2ede6
|
||||
call Random
|
||||
cp $10
|
||||
ret nc ; 1/16 chance
|
||||
ld hl, PartyMons
|
||||
ld a, [PartyCount]
|
||||
ld hl, wPartyMons
|
||||
ld a, [wPartyCount]
|
||||
.partyMonLoop
|
||||
push af
|
||||
push hl
|
||||
|
Reference in New Issue
Block a user