diff options
| author | entrpntr <entrpntr@gmail.com> | 2020-05-12 13:10:01 -0400 |
|---|---|---|
| committer | entrpntr <entrpntr@gmail.com> | 2020-05-12 13:31:27 -0400 |
| commit | 3e40a1ecd0dc81d1d5be5f1adda1fbbe14b67d83 (patch) | |
| tree | f16febfeb0c404b6fd1c0e630d26da14eaf07a71 /engine/events | |
| parent | dac57cee381b68350ef50317619334892c140945 (diff) | |
Simple cleanups in constants/data/macros and banks 1-4.
Diffstat (limited to 'engine/events')
| -rwxr-xr-x | engine/events/happiness_egg.asm | 6 | ||||
| -rw-r--r-- | engine/events/pokerus/pokerus.asm | 30 | ||||
| -rwxr-xr-x | engine/events/shuckle.asm | 3 | ||||
| -rwxr-xr-x | engine/events/specials.asm | 3 | ||||
| -rwxr-xr-x | engine/events/whiteout.asm | 6 |
5 files changed, 25 insertions, 23 deletions
diff --git a/engine/events/happiness_egg.asm b/engine/events/happiness_egg.asm index 85b6f710..bb2e949c 100755 --- a/engine/events/happiness_egg.asm +++ b/engine/events/happiness_egg.asm @@ -140,11 +140,13 @@ StepHappiness:: ret DayCareStep:: +; Raise the experience of Day-Care Pokémon every step cycle. + ld a, [wDayCareMan] bit DAYCAREMAN_HAS_MON_F, a jr z, .day_care_lady - ld a, [wBreedMon1Level] + ld a, [wBreedMon1Level] ; level cp MAX_LEVEL jr nc, .day_care_lady ld hl, wBreedMon1Exp + 2 ; exp @@ -196,7 +198,7 @@ DayCareStep:: callfar CheckBreedmonCompatibility ld a, [wBreedingCompatibility] cp 230 - ld b, 32 percent - 1 + ld b, 31 percent + 1 jr nc, .okay ld a, [wBreedingCompatibility] cp 170 diff --git a/engine/events/pokerus/pokerus.asm b/engine/events/pokerus/pokerus.asm index 63eb7fe1..99a5652c 100644 --- a/engine/events/pokerus/pokerus.asm +++ b/engine/events/pokerus/pokerus.asm @@ -26,8 +26,8 @@ GivePokerusAndConvertBerries: and a ret nz ldh a, [hRandomSub] - cp $3 - ret nc ; 3/65536 chance (00 00, 00 01 or 00 02) + cp 3 + ret nc ; 3/65536 chance (00 00, 00 01 or 00 02) ld a, [wPartyCount] ld b, a .randomMonSelectLoop @@ -36,11 +36,11 @@ GivePokerusAndConvertBerries: cp b jr nc, .randomMonSelectLoop ld hl, wPartyMon1PokerusStatus - call GetPartyLocation ; get pokerus byte of random mon + call GetPartyLocation ; get pokerus byte of random mon ld a, [hl] and $f0 - ret nz ; if it already has pokerus, do nothing -.randomPokerusLoop ; Simultaneously sample the strain and duration + ret nz ; if it already has pokerus, do nothing +.randomPokerusLoop ; Simultaneously sample the strain and duration call Random and a jr z, .randomPokerusLoop @@ -62,20 +62,20 @@ GivePokerusAndConvertBerries: .TrySpreadPokerus: call Random cp 33 percent + 1 - ret nc ; 1/3 chance + ret nc ; 1/3 chance ld a, [wPartyCount] cp 1 - ret z ; only one mon, nothing to do + ret z ; only one mon, nothing to do ld c, [hl] ld a, b cp 2 - jr c, .checkPreviousMonsLoop ; no more mons after this one, go backwards + jr c, .checkPreviousMonsLoop ; no more mons after this one, go backwards call Random cp 50 percent + 1 - jr c, .checkPreviousMonsLoop ; 1/2 chance, go backwards + jr c, .checkPreviousMonsLoop ; 1/2 chance, go backwards .checkFollowingMonsLoop add hl, de ld a, [hl] @@ -83,8 +83,8 @@ GivePokerusAndConvertBerries: jr z, .infectMon ld c, a and $3 - ret z ; if mon has cured pokerus, stop searching - dec b ; go on to next mon + ret z ; if mon has cured pokerus, stop searching + dec b ; go on to next mon ld a, b cp 1 jr nz, .checkFollowingMonsLoop ; no more mons left @@ -93,7 +93,7 @@ GivePokerusAndConvertBerries: .checkPreviousMonsLoop ld a, [wPartyCount] cp b - ret z ; no more mons + ret z ; no more mons ld a, l sub e ld l, a @@ -105,8 +105,8 @@ GivePokerusAndConvertBerries: jr z, .infectMon ld c, a and $3 - ret z ; if mon has cured pokerus, stop searching - inc b ; go on to next mon + ret z ; if mon has cured pokerus, stop searching + inc b ; go on to next mon jr .checkPreviousMonsLoop .infectMon @@ -128,7 +128,7 @@ ConvertBerriesToBerryJuice: bit STATUSFLAGS2_REACHED_GOLDENROD_F, [hl] ret z call Random - cp 6 percent + 1 ; 1/16 chance + cp 1 out_of 16 ; 6.25% chance ret nc ld hl, wPartyMons ld a, [wPartyCount] diff --git a/engine/events/shuckle.asm b/engine/events/shuckle.asm index db6db8f9..668a99b0 100755 --- a/engine/events/shuckle.asm +++ b/engine/events/shuckle.asm @@ -2,7 +2,7 @@ MANIA_OT_ID EQU 00518 GiveShuckle: ; Adding to the party. - xor a + xor a ; PARTYMON ld [wMonType], a ; Level 15 Shuckle. @@ -63,6 +63,7 @@ GiveShuckle: SpecialShuckleOT: db "MANIA@" + SpecialShuckleNick: db "SHUCKIE@" diff --git a/engine/events/specials.asm b/engine/events/specials.asm index f4b6437d..91ca4208 100755 --- a/engine/events/specials.asm +++ b/engine/events/specials.asm @@ -458,3 +458,6 @@ TrainerHouse: ld a, [sMysteryGiftTrainerHouseFlag] ld [wScriptVar], a jp CloseSRAM + +; unused + nop diff --git a/engine/events/whiteout.asm b/engine/events/whiteout.asm index f8bfce12..635be636 100755 --- a/engine/events/whiteout.asm +++ b/engine/events/whiteout.asm @@ -61,11 +61,7 @@ GetWhiteoutSpawn: ld d, a ld a, [wLastSpawnMapNumber] ld e, a - - ld a, $05 - ld hl, $5465 - rst $08 - + farcall IsSpawnPoint ld a, c jr c, .yes xor a ; SPAWN_HOME |
