diff options
| author | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-01-22 15:40:43 -0500 |
|---|---|---|
| committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-01-22 15:40:43 -0500 |
| commit | 3a7f518de4bbced15cbf5bb877a988055de7d063 (patch) | |
| tree | af3a8725138870cd9c3db4eaa29c56fb1422754c /engine/events | |
| parent | 4d8528f90329e2ddfac16046ad8bf309ec1887f2 (diff) | |
wStatusFlags/2 bit constants
Diffstat (limited to 'engine/events')
| -rwxr-xr-x | engine/events/field_moves.asm | 2 | ||||
| -rwxr-xr-x | engine/events/halloffame.asm | 2 | ||||
| -rw-r--r-- | engine/events/pokerus/pokerus.asm | 15 | ||||
| -rw-r--r-- | engine/events/std_scripts.asm | 4 | ||||
| -rwxr-xr-x | engine/events/sweet_scent.asm | 2 |
5 files changed, 13 insertions, 12 deletions
diff --git a/engine/events/field_moves.asm b/engine/events/field_moves.asm index 3fb1fe9e6..e6c0629de 100755 --- a/engine/events/field_moves.asm +++ b/engine/events/field_moves.asm @@ -9,7 +9,7 @@ PlayWhirlpoolSound: ; 8c7d4 BlindingFlash: ; 8c7e1 farcall Special_FadeOutPalettes ld hl, wStatusFlags - set 2, [hl] ; Flash + set STATUSFLAGS_FLASH_F, [hl] farcall ReplaceTimeOfDayPals farcall UpdateTimeOfDayPal ld b, SCGB_MAPPALS diff --git a/engine/events/halloffame.asm b/engine/events/halloffame.asm index dbd3a2d5a..3de91fa5c 100755 --- a/engine/events/halloffame.asm +++ b/engine/events/halloffame.asm @@ -12,7 +12,7 @@ HallOfFame:: ; 0x8640e ; Enable the Pokégear map to cycle through all of Kanto ld hl, wStatusFlags - set 6, [hl] ; hall of fame + set STATUSFLAGS_HALL_OF_FAME_F, [hl] farcall HallOfFame_InitSaveIfNeeded diff --git a/engine/events/pokerus/pokerus.asm b/engine/events/pokerus/pokerus.asm index d47bcb6c1..ab717407a 100644 --- a/engine/events/pokerus/pokerus.asm +++ b/engine/events/pokerus/pokerus.asm @@ -19,7 +19,7 @@ GivePokerusAndConvertBerries: ; 2ed44 ; If we haven't been to Goldenrod City at least once, ; prevent the contraction of Pokerus. ld hl, wStatusFlags2 - bit 6, [hl] + bit STATUSFLAGS2_REACHED_GOLDENROD_F, [hl] ret z call Random ld a, [hRandomAdd] @@ -61,7 +61,7 @@ GivePokerusAndConvertBerries: ; 2ed44 .TrySpreadPokerus: call Random - cp 1 + 33 percent + cp 33 percent + 1 ret nc ; 1/3 chance ld a, [PartyCount] @@ -74,7 +74,7 @@ GivePokerusAndConvertBerries: ; 2ed44 jr c, .checkPreviousMonsLoop ; no more mons after this one, go backwards call Random - cp 1 + 50 percent + cp 50 percent + 1 jr c, .checkPreviousMonsLoop ; 1/2 chance, go backwards .checkFollowingMonsLoop add hl, de @@ -121,14 +121,15 @@ GivePokerusAndConvertBerries: ; 2ed44 ld [hl], a ret -; any berry held by a Shuckle may be converted to berry juice ConvertBerriesToBerryJuice: ; 2ede6 +; If we haven't been to Goldenrod City at least once, +; prevent Shuckle from turning held Berry into Berry Juice. ld hl, wStatusFlags2 - bit 6, [hl] + bit STATUSFLAGS2_REACHED_GOLDENROD_F, [hl] ret z call Random - cp $10 - ret nc ; 1/16 chance + cp 6 percent + 1 ; 1/16 chance + ret nc ld hl, PartyMons ld a, [PartyCount] .partyMonLoop diff --git a/engine/events/std_scripts.asm b/engine/events/std_scripts.asm index 216ce0058..e4dd586b0 100644 --- a/engine/events/std_scripts.asm +++ b/engine/events/std_scripts.asm @@ -122,7 +122,7 @@ PokecenterNurseScript: checkphonecall ; elm already called about pokerus iftrue .no - checkflag ENGINE_POKERUS ; nurse already talked about pokerus + checkflag ENGINE_CAUGHT_POKERUS iftrue .no special Special_CheckPokerus iftrue .pokerus @@ -158,7 +158,7 @@ PokecenterNurseScript: closetext .pokerus_done - setflag ENGINE_POKERUS + setflag ENGINE_CAUGHT_POKERUS specialphonecall SPECIALCALL_POKERUS end diff --git a/engine/events/sweet_scent.asm b/engine/events/sweet_scent.asm index 9b75eb9b8..e936369c8 100755 --- a/engine/events/sweet_scent.asm +++ b/engine/events/sweet_scent.asm @@ -37,7 +37,7 @@ SweetScentEncounter: ; 506ef farcall CanUseSweetScent jr nc, .no_battle ld hl, wStatusFlags2 - bit 2, [hl] + bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl] jr nz, .not_in_bug_contest farcall GetMapEncounterRate ld a, b |
