diff options
| author | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-02-03 18:21:53 -0500 |
|---|---|---|
| committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-02-03 19:42:56 -0500 |
| commit | 32ed487a476e01759d3d9dbc818d8566ae2c9cb7 (patch) | |
| tree | 669e90b56d36f17efff5f673235193f5298c0ceb /engine/events/pokerus | |
| parent | 6ff2cb20e67db2054486fc5dc48eb9263298d4ad (diff) | |
| parent | b35eb72290b964b98844afbe741bb7ede34b9ef3 (diff) | |
Merge branch 'master' of https://github.com/pret/pokecrystal
# Conflicts:
# audio/engine.asm
# constants/gfx_constants.asm
# constants/map_data_constants.asm
# constants/pokemon_data_constants.asm
# constants/sprite_constants.asm
# constants/wram_constants.asm
# data/maps/data.asm
# engine/battle/ai/scoring.asm
# engine/battle/core.asm
# engine/battle/effect_commands.asm
# engine/battle/misc.asm
# engine/battle_anims/getpokeballwobble.asm
# engine/breeding.asm
# engine/buy_sell_toss.asm
# engine/decorations.asm
# engine/events/battle_tower/battle_tower.asm
# engine/events/battle_tower/rules.asm
# engine/events/buena.asm
# engine/events/bug_contest/contest_2.asm
# engine/events/daycare.asm
# engine/events/dratini.asm
# engine/events/halloffame.asm
# engine/events/happiness_egg.asm
# engine/events/kurt.asm
# engine/events/lucky_number.asm
# engine/events/magnet_train.asm
# engine/events/overworld.asm
# engine/events/pokerus/pokerus.asm
# engine/events/print_unown.asm
# engine/events/print_unown_2.asm
# engine/events/unown_walls.asm
# engine/item_effects.asm
# engine/link.asm
# engine/mon_menu.asm
# engine/player_object.asm
# engine/routines/playslowcry.asm
# engine/scripting.asm
# engine/search.asm
# engine/search2.asm
# engine/specials.asm
# engine/start_menu.asm
# engine/timeset.asm
# home/battle_vars.asm
# home/map.asm
# maps/GoldenrodUndergroundSwitchRoomEntrances.asm
# maps/IlexForest.asm
# maps/KrissHouse2F.asm
# maps/Route39Barn.asm
# mobile/mobile_12_2.asm
# mobile/mobile_40.asm
# mobile/mobile_5f.asm
# wram.asm
Diffstat (limited to 'engine/events/pokerus')
| -rw-r--r-- | engine/events/pokerus/apply_pokerus_tick.asm | 4 | ||||
| -rw-r--r-- | engine/events/pokerus/check_pokerus.asm | 4 | ||||
| -rw-r--r-- | engine/events/pokerus/pokerus.asm | 16 |
3 files changed, 12 insertions, 12 deletions
diff --git a/engine/events/pokerus/apply_pokerus_tick.asm b/engine/events/pokerus/apply_pokerus_tick.asm index 3c97fdc5e..e632fbfe4 100644 --- a/engine/events/pokerus/apply_pokerus_tick.asm +++ b/engine/events/pokerus/apply_pokerus_tick.asm @@ -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 diff --git a/engine/events/pokerus/check_pokerus.asm b/engine/events/pokerus/check_pokerus.asm index 3bc294152..c739c59c5 100644 --- a/engine/events/pokerus/check_pokerus.asm +++ b/engine/events/pokerus/check_pokerus.asm @@ -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] diff --git a/engine/events/pokerus/pokerus.asm b/engine/events/pokerus/pokerus.asm index ab717407a..5728cb181 100644 --- a/engine/events/pokerus/pokerus.asm +++ b/engine/events/pokerus/pokerus.asm @@ -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 33 percent + 1 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 @@ -130,8 +130,8 @@ ConvertBerriesToBerryJuice: ; 2ede6 call Random cp 6 percent + 1 ; 1/16 chance ret nc - ld hl, PartyMons - ld a, [PartyCount] + ld hl, wPartyMons + ld a, [wPartyCount] .partyMonLoop push af push hl |
