diff options
author | Rangi <35663410+Rangi42@users.noreply.github.com> | 2020-07-07 19:48:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-07 19:48:22 -0400 |
commit | 9571c550b6a0dcb3a4f54513c881661a87271024 (patch) | |
tree | d73507228a57e4f3cece2fb93fe7df3a9439553f /engine/battle/move_effects | |
parent | c480632d5494d04f7f5f0298a31877a2293b564e (diff) | |
parent | bbf2f51a02b2544f1bef32a5868503b474ae2fef (diff) |
Merge pull request #263 from Rangi42/master
Syncing style with pokecrystal
Diffstat (limited to 'engine/battle/move_effects')
-rw-r--r-- | engine/battle/move_effects/conversion.asm | 2 | ||||
-rw-r--r-- | engine/battle/move_effects/drain_hp.asm | 12 | ||||
-rw-r--r-- | engine/battle/move_effects/focus_energy.asm | 6 | ||||
-rw-r--r-- | engine/battle/move_effects/haze.asm | 2 | ||||
-rw-r--r-- | engine/battle/move_effects/heal.asm | 10 | ||||
-rw-r--r-- | engine/battle/move_effects/leech_seed.asm | 6 | ||||
-rw-r--r-- | engine/battle/move_effects/mist.asm | 6 | ||||
-rw-r--r-- | engine/battle/move_effects/one_hit_ko.asm | 2 | ||||
-rw-r--r-- | engine/battle/move_effects/paralyze.asm | 14 | ||||
-rw-r--r-- | engine/battle/move_effects/pay_day.asm | 24 | ||||
-rw-r--r-- | engine/battle/move_effects/recoil.asm | 8 | ||||
-rw-r--r-- | engine/battle/move_effects/reflect_light_screen.asm | 2 | ||||
-rw-r--r-- | engine/battle/move_effects/substitute.asm | 4 | ||||
-rw-r--r-- | engine/battle/move_effects/transform.asm | 8 |
14 files changed, 53 insertions, 53 deletions
diff --git a/engine/battle/move_effects/conversion.asm b/engine/battle/move_effects/conversion.asm index 662f65e0..1f64ec5b 100644 --- a/engine/battle/move_effects/conversion.asm +++ b/engine/battle/move_effects/conversion.asm @@ -1,7 +1,7 @@ ConversionEffect_: ld hl, wEnemyMonType1 ld de, wBattleMonType1 - ld a, [hWhoseTurn] + ldh a, [hWhoseTurn] and a ld a, [wEnemyBattleStatus1] jr z, .conversionEffect diff --git a/engine/battle/move_effects/drain_hp.asm b/engine/battle/move_effects/drain_hp.asm index 452ccf0c..04a585cc 100644 --- a/engine/battle/move_effects/drain_hp.asm +++ b/engine/battle/move_effects/drain_hp.asm @@ -14,7 +14,7 @@ DrainHPEffect_: .getAttackerHP ld hl, wBattleMonHP ld de, wBattleMonMaxHP - ld a, [hWhoseTurn] + ldh a, [hWhoseTurn] and a jp z, .addDamageToAttackerHP ld hl, wEnemyMonHP @@ -69,21 +69,21 @@ DrainHPEffect_: ld [wHPBarNewHP+1], a inc de .next - ld a, [hWhoseTurn] + ldh a, [hWhoseTurn] and a - coord hl, 10, 9 + hlcoord 10, 9 ld a, $1 jr z, .next2 - coord hl, 2, 2 + hlcoord 2, 2 xor a .next2 ld [wHPBarType], a predef UpdateHPBar2 predef DrawPlayerHUDAndHPBar predef DrawEnemyHUDAndHPBar - callab ReadPlayerMonCurHPAndStatus + callfar ReadPlayerMonCurHPAndStatus ld hl, SuckedHealthText - ld a, [hWhoseTurn] + ldh a, [hWhoseTurn] and a ld a, [wPlayerMoveEffect] jr z, .next3 diff --git a/engine/battle/move_effects/focus_energy.asm b/engine/battle/move_effects/focus_energy.asm index 7a426d2c..1fafe920 100644 --- a/engine/battle/move_effects/focus_energy.asm +++ b/engine/battle/move_effects/focus_energy.asm @@ -1,6 +1,6 @@ FocusEnergyEffect_: ld hl, wPlayerBattleStatus2 - ld a, [hWhoseTurn] + ldh a, [hWhoseTurn] and a jr z, .notEnemy ld hl, wEnemyBattleStatus2 @@ -8,13 +8,13 @@ FocusEnergyEffect_: bit GETTING_PUMPED, [hl] ; is mon already using focus energy? jr nz, .alreadyUsing set GETTING_PUMPED, [hl] ; mon is now using focus energy - callab PlayCurrentMoveAnimation + callfar PlayCurrentMoveAnimation ld hl, GettingPumpedText jp PrintText .alreadyUsing ld c, 50 call DelayFrames - jpab PrintButItFailedText_ + jpfar PrintButItFailedText_ GettingPumpedText: text_pause diff --git a/engine/battle/move_effects/haze.asm b/engine/battle/move_effects/haze.asm index 521ff662..915eeed8 100644 --- a/engine/battle/move_effects/haze.asm +++ b/engine/battle/move_effects/haze.asm @@ -15,7 +15,7 @@ HazeEffect_: ; cure non-volatile status, but only for the target ld hl, wEnemyMonStatus ld de, wEnemySelectedMove - ld a, [hWhoseTurn] + ldh a, [hWhoseTurn] and a jr z, .cureStatuses ld hl, wBattleMonStatus diff --git a/engine/battle/move_effects/heal.asm b/engine/battle/move_effects/heal.asm index 8cc9da93..e9fb62a7 100644 --- a/engine/battle/move_effects/heal.asm +++ b/engine/battle/move_effects/heal.asm @@ -1,5 +1,5 @@ HealEffect_: - ld a, [hWhoseTurn] + ldh a, [hWhoseTurn] and a ld de, wBattleMonHP ld hl, wBattleMonMaxHP @@ -27,7 +27,7 @@ HealEffect_: ld c, 50 call DelayFrames ld hl, wBattleMonStatus - ld a, [hWhoseTurn] + ldh a, [hWhoseTurn] and a jr z, .restEffect ld hl, wEnemyMonStatus @@ -87,12 +87,12 @@ HealEffect_: .playAnim ld hl, PlayCurrentMoveAnimation call BankswitchEtoF - ld a, [hWhoseTurn] + ldh a, [hWhoseTurn] and a - coord hl, 10, 9 + hlcoord 10, 9 ld a, $1 jr z, .updateHPBar - coord hl, 2, 2 + hlcoord 2, 2 xor a .updateHPBar ld [wHPBarType], a diff --git a/engine/battle/move_effects/leech_seed.asm b/engine/battle/move_effects/leech_seed.asm index 74360233..61bd982a 100644 --- a/engine/battle/move_effects/leech_seed.asm +++ b/engine/battle/move_effects/leech_seed.asm @@ -1,11 +1,11 @@ LeechSeedEffect_: - callab MoveHitTest + callfar MoveHitTest ld a, [wMoveMissed] and a jr nz, .moveMissed ld hl, wEnemyBattleStatus2 ld de, wEnemyMonType1 - ld a, [hWhoseTurn] + ldh a, [hWhoseTurn] and a jr z, .leechSeedEffect ld hl, wPlayerBattleStatus2 @@ -22,7 +22,7 @@ LeechSeedEffect_: bit SEEDED, [hl] jr nz, .moveMissed set SEEDED, [hl] - callab PlayCurrentMoveAnimation + callfar PlayCurrentMoveAnimation ld hl, WasSeededText jp PrintText .moveMissed diff --git a/engine/battle/move_effects/mist.asm b/engine/battle/move_effects/mist.asm index 67ee4921..163d386f 100644 --- a/engine/battle/move_effects/mist.asm +++ b/engine/battle/move_effects/mist.asm @@ -1,6 +1,6 @@ MistEffect_: ld hl, wPlayerBattleStatus2 - ld a, [hWhoseTurn] + ldh a, [hWhoseTurn] and a jr z, .mistEffect ld hl, wEnemyBattleStatus2 @@ -8,11 +8,11 @@ MistEffect_: bit PROTECTED_BY_MIST, [hl] ; is mon protected by mist? jr nz, .mistAlreadyInUse set PROTECTED_BY_MIST, [hl] ; mon is now protected by mist - callab PlayCurrentMoveAnimation + callfar PlayCurrentMoveAnimation ld hl, ShroudedInMistText jp PrintText .mistAlreadyInUse - jpab PrintButItFailedText_ + jpfar PrintButItFailedText_ ShroudedInMistText: text_far _ShroudedInMistText diff --git a/engine/battle/move_effects/one_hit_ko.asm b/engine/battle/move_effects/one_hit_ko.asm index 347a4c7b..7e5db0f7 100644 --- a/engine/battle/move_effects/one_hit_ko.asm +++ b/engine/battle/move_effects/one_hit_ko.asm @@ -7,7 +7,7 @@ OneHitKOEffect_: ld [wCriticalHitOrOHKO], a ld hl, wBattleMonSpeed + 1 ld de, wEnemyMonSpeed + 1 - ld a, [hWhoseTurn] + ldh a, [hWhoseTurn] and a jr z, .compareSpeed ld hl, wEnemyMonSpeed + 1 diff --git a/engine/battle/move_effects/paralyze.asm b/engine/battle/move_effects/paralyze.asm index b01aa5cf..dbaa0fb8 100644 --- a/engine/battle/move_effects/paralyze.asm +++ b/engine/battle/move_effects/paralyze.asm @@ -1,7 +1,7 @@ ParalyzeEffect_: ld hl, wEnemyMonStatus ld de, wPlayerMoveType - ld a, [hWhoseTurn] + ldh a, [hWhoseTurn] and a jp z, .next ld hl, wBattleMonStatus @@ -26,22 +26,22 @@ ParalyzeEffect_: jr z, .doesntAffect .hitTest push hl - callab MoveHitTest + callfar MoveHitTest pop hl ld a, [wMoveMissed] and a jr nz, .didntAffect set PAR, [hl] - callab QuarterSpeedDueToParalysis + callfar QuarterSpeedDueToParalysis ld c, 30 call DelayFrames - callab PlayCurrentMoveAnimation - jpab PrintMayNotAttackText + callfar PlayCurrentMoveAnimation + jpfar PrintMayNotAttackText .didntAffect ld c, 50 call DelayFrames - jpab PrintDidntAffectText + jpfar PrintDidntAffectText .doesntAffect ld c, 50 call DelayFrames - jpab PrintDoesntAffectText + jpfar PrintDoesntAffectText diff --git a/engine/battle/move_effects/pay_day.asm b/engine/battle/move_effects/pay_day.asm index 11140ec2..fa373038 100644 --- a/engine/battle/move_effects/pay_day.asm +++ b/engine/battle/move_effects/pay_day.asm @@ -2,7 +2,7 @@ PayDayEffect_: xor a ld hl, wcd6d ld [hli], a - ld a, [hWhoseTurn] + ldh a, [hWhoseTurn] and a ld a, [wBattleMonLevel] jr z, .payDayEffect @@ -10,28 +10,28 @@ PayDayEffect_: .payDayEffect ; level * 2 add a - ld [hDividend + 3], a + ldh [hDividend + 3], a xor a - ld [hDividend], a - ld [hDividend + 1], a - ld [hDividend + 2], a + ldh [hDividend], a + ldh [hDividend + 1], a + ldh [hDividend + 2], a ; convert to BCD ld a, 100 - ld [hDivisor], a + ldh [hDivisor], a ld b, $4 call Divide - ld a, [hQuotient + 3] + ldh a, [hQuotient + 3] ld [hli], a - ld a, [hRemainder] - ld [hDividend + 3], a + ldh a, [hRemainder] + ldh [hDividend + 3], a ld a, 10 - ld [hDivisor], a + ldh [hDivisor], a ld b, $4 call Divide - ld a, [hQuotient + 3] + ldh a, [hQuotient + 3] swap a ld b, a - ld a, [hRemainder] + ldh a, [hRemainder] add b ld [hl], a ld de, wTotalPayDayMoney + 2 diff --git a/engine/battle/move_effects/recoil.asm b/engine/battle/move_effects/recoil.asm index 63aff429..85110d50 100644 --- a/engine/battle/move_effects/recoil.asm +++ b/engine/battle/move_effects/recoil.asm @@ -1,5 +1,5 @@ RecoilEffect_: - ld a, [hWhoseTurn] + ldh a, [hWhoseTurn] and a ld a, [wPlayerMoveNum] ld hl, wBattleMonMaxHP @@ -53,12 +53,12 @@ RecoilEffect_: ld [hli], a ld [hl], a .getHPBarCoords - coord hl, 10, 9 - ld a, [hWhoseTurn] + hlcoord 10, 9 + ldh a, [hWhoseTurn] and a ld a, $1 jr z, .updateHPBar - coord hl, 2, 2 + hlcoord 2, 2 xor a .updateHPBar ld [wHPBarType], a diff --git a/engine/battle/move_effects/reflect_light_screen.asm b/engine/battle/move_effects/reflect_light_screen.asm index 07338c9a..7bdc7be7 100644 --- a/engine/battle/move_effects/reflect_light_screen.asm +++ b/engine/battle/move_effects/reflect_light_screen.asm @@ -1,7 +1,7 @@ ReflectLightScreenEffect_: ld hl, wPlayerBattleStatus3 ld de, wPlayerMoveEffect - ld a, [hWhoseTurn] + ldh a, [hWhoseTurn] and a jr z, .reflectLightScreenEffect ld hl, wEnemyBattleStatus3 diff --git a/engine/battle/move_effects/substitute.asm b/engine/battle/move_effects/substitute.asm index 95c43462..860b76b6 100644 --- a/engine/battle/move_effects/substitute.asm +++ b/engine/battle/move_effects/substitute.asm @@ -4,7 +4,7 @@ SubstituteEffect_: ld hl, wBattleMonMaxHP ld de, wPlayerSubstituteHP ld bc, wPlayerBattleStatus2 - ld a, [hWhoseTurn] + ldh a, [hWhoseTurn] and a jr z, .notEnemy ld hl, wEnemyMonMaxHP @@ -55,7 +55,7 @@ SubstituteEffect_: call Bankswitch ; jump to routine depending on animation setting ld hl, SubstituteText call PrintText - jpab DrawHUDsAndHPBars + jpfar DrawHUDsAndHPBars .alreadyHasSubstitute ld hl, HasSubstituteText jr .printText diff --git a/engine/battle/move_effects/transform.asm b/engine/battle/move_effects/transform.asm index da26d031..46cea51c 100644 --- a/engine/battle/move_effects/transform.asm +++ b/engine/battle/move_effects/transform.asm @@ -3,7 +3,7 @@ TransformEffect_: ld de, wEnemyMonSpecies ld bc, wEnemyBattleStatus3 ld a, [wEnemyBattleStatus1] - ld a, [hWhoseTurn] + ldh a, [hWhoseTurn] and a jr nz, .hitTest ld hl, wEnemyMonSpecies @@ -18,7 +18,7 @@ TransformEffect_: push de push bc ld hl, wPlayerBattleStatus2 - ld a, [hWhoseTurn] + ldh a, [hWhoseTurn] and a jr z, .transformEffect ld hl, wEnemyBattleStatus2 @@ -64,7 +64,7 @@ TransformEffect_: inc bc inc bc call CopyData - ld a, [hWhoseTurn] + ldh a, [hWhoseTurn] and a jr z, .next ; save enemy mon DVs at wTransformedEnemyMonOriginalDVs @@ -128,7 +128,7 @@ TransformEffect_: jp PrintText .copyBasedOnTurn - ld a, [hWhoseTurn] + ldh a, [hWhoseTurn] and a jr z, .gotStatsOrModsToCopy push hl |