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/battle/move_effects/beat_up.asm | |
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/battle/move_effects/beat_up.asm')
-rw-r--r-- | engine/battle/move_effects/beat_up.asm | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/engine/battle/move_effects/beat_up.asm b/engine/battle/move_effects/beat_up.asm index 31b07726e..18e350504 100644 --- a/engine/battle/move_effects/beat_up.asm +++ b/engine/battle/move_effects/beat_up.asm @@ -5,27 +5,27 @@ BattleCommand_BeatUp: ; 35461 ld a, [hBattleTurn] and a jp nz, .enemy_beats_up - ld a, [PlayerSubStatus3] + ld a, [wPlayerSubStatus3] bit SUBSTATUS_IN_LOOP, a jr nz, .next_mon ld c, 20 call DelayFrames xor a - ld [PlayerRolloutCount], a + ld [wPlayerRolloutCount], a ld [wd002], a ld [wBeatUpHitAtLeastOnce], a jr .got_mon .next_mon - ld a, [PlayerRolloutCount] + ld a, [wPlayerRolloutCount] ld b, a - ld a, [PartyCount] + ld a, [wPartyCount] sub b ld [wd002], a .got_mon ld a, [wd002] - ld hl, PartyMonNicknames + ld hl, wPartyMonNicknames call GetNick ld a, MON_HP call GetBeatupMonLocation @@ -34,11 +34,11 @@ BattleCommand_BeatUp: ; 35461 jp z, .beatup_fail ; fainted ld a, [wd002] ld c, a - ld a, [CurBattleMon] + ld a, [wCurBattleMon] ; BUG: this can desynchronize link battles ; Change "cp [hl]" to "cp c" to fix cp [hl] - ld hl, BattleMonStatus + ld hl, wBattleMonStatus jr z, .active_mon ld a, MON_STATUS call GetBeatupMonLocation @@ -51,18 +51,18 @@ BattleCommand_BeatUp: ; 35461 ld [wBeatUpHitAtLeastOnce], a ld hl, BeatUpAttackText call StdBattleTextBox - ld a, [EnemyMonSpecies] - ld [CurSpecies], a + ld a, [wEnemyMonSpecies] + ld [wCurSpecies], a call GetBaseData - ld a, [BaseDefense] + ld a, [wBaseDefense] ld c, a push bc ld a, MON_SPECIES call GetBeatupMonLocation ld a, [hl] - ld [CurSpecies], a + ld [wCurSpecies], a call GetBaseData - ld a, [BaseAttack] + ld a, [wBaseAttack] pop bc ld b, a push bc @@ -76,20 +76,20 @@ BattleCommand_BeatUp: ; 35461 ret .enemy_beats_up - ld a, [EnemySubStatus3] + ld a, [wEnemySubStatus3] bit SUBSTATUS_IN_LOOP, a jr nz, .not_first_enemy_beatup xor a - ld [EnemyRolloutCount], a + ld [wEnemyRolloutCount], a ld [wd002], a ld [wBeatUpHitAtLeastOnce], a jr .enemy_continue .not_first_enemy_beatup - ld a, [EnemyRolloutCount] + ld a, [wEnemyRolloutCount] ld b, a - ld a, [OTPartyCount] + ld a, [wOTPartyCount] sub b ld [wd002], a .enemy_continue @@ -101,14 +101,14 @@ BattleCommand_BeatUp: ; 35461 and a jr nz, .link_or_tower - ld a, [InBattleTowerBattle] + ld a, [wInBattleTowerBattle] and a jr nz, .link_or_tower ld a, [wd002] ld c, a ld b, 0 - ld hl, OTPartySpecies + ld hl, wOTPartySpecies add hl, bc ld a, [hl] ld [wNamedObjectIndexBuffer], a @@ -117,10 +117,10 @@ BattleCommand_BeatUp: ; 35461 .link_or_tower ld a, [wd002] - ld hl, OTPartyMonNicknames + ld hl, wOTPartyMonNicknames ld bc, NAME_LENGTH call AddNTimes - ld de, StringBuffer1 + ld de, wStringBuffer1 call CopyBytes .got_enemy_nick ld a, MON_HP @@ -130,9 +130,9 @@ BattleCommand_BeatUp: ; 35461 jp z, .beatup_fail ld a, [wd002] ld b, a - ld a, [CurOTMon] + ld a, [wCurOTMon] cp b - ld hl, EnemyMonStatus + ld hl, wEnemyMonStatus jr z, .active_enemy ld a, MON_STATUS @@ -147,7 +147,7 @@ BattleCommand_BeatUp: ; 35461 jr .finish_beatup .wild - ld a, [EnemyMonSpecies] + ld a, [wEnemyMonSpecies] ld [wNamedObjectIndexBuffer], a call GetPokemonName ld hl, BeatUpAttackText @@ -157,18 +157,18 @@ BattleCommand_BeatUp: ; 35461 .finish_beatup ld hl, BeatUpAttackText call StdBattleTextBox - ld a, [BattleMonSpecies] - ld [CurSpecies], a + ld a, [wBattleMonSpecies] + ld [wCurSpecies], a call GetBaseData - ld a, [BaseDefense] + ld a, [wBaseDefense] ld c, a push bc ld a, MON_SPECIES call GetBeatupMonLocation ld a, [hl] - ld [CurSpecies], a + ld [wCurSpecies], a call GetBaseData - ld a, [BaseAttack] + ld a, [wBaseAttack] pop bc ld b, a push bc @@ -207,9 +207,9 @@ GetBeatupMonLocation: ; 355bd ld b, 0 ld a, [hBattleTurn] and a - ld hl, PartyMon1Species + ld hl, wPartyMon1Species jr z, .got_species - ld hl, OTPartyMon1Species + ld hl, wOTPartyMon1Species .got_species ld a, [wd002] |