diff options
Diffstat (limited to 'engine/battle/moveEffects')
-rw-r--r-- | engine/battle/moveEffects/conversion_effect.asm | 2 | ||||
-rw-r--r-- | engine/battle/moveEffects/drain_hp_effect.asm | 10 | ||||
-rw-r--r-- | engine/battle/moveEffects/haze_effect.asm | 10 | ||||
-rw-r--r-- | engine/battle/moveEffects/heal_effect.asm | 2 | ||||
-rw-r--r-- | engine/battle/moveEffects/leech_seed_effect.asm | 14 | ||||
-rw-r--r-- | engine/battle/moveEffects/one_hit_ko_effect.asm | 8 | ||||
-rw-r--r-- | engine/battle/moveEffects/paralyze_effect.asm | 4 | ||||
-rw-r--r-- | engine/battle/moveEffects/pay_day_effect.asm | 6 | ||||
-rw-r--r-- | engine/battle/moveEffects/recoil_effect.asm | 2 | ||||
-rw-r--r-- | engine/battle/moveEffects/substitute_effect.asm | 26 | ||||
-rw-r--r-- | engine/battle/moveEffects/transform_effect.asm | 14 |
11 files changed, 49 insertions, 49 deletions
diff --git a/engine/battle/moveEffects/conversion_effect.asm b/engine/battle/moveEffects/conversion_effect.asm index 2f05afb3..e4c5b4bd 100644 --- a/engine/battle/moveEffects/conversion_effect.asm +++ b/engine/battle/moveEffects/conversion_effect.asm @@ -13,7 +13,7 @@ ConversionEffect_: ; 139a3 (4:79a3) .conversionEffect bit Invulnerable, a ; is mon immune to typical attacks (dig/fly) jr nz, PrintButItFailedText -; copy target's types to user +; copy target's types to user ld a, [hli] ld [de], a inc de diff --git a/engine/battle/moveEffects/drain_hp_effect.asm b/engine/battle/moveEffects/drain_hp_effect.asm index 517d53d1..be52e76d 100644 --- a/engine/battle/moveEffects/drain_hp_effect.asm +++ b/engine/battle/moveEffects/drain_hp_effect.asm @@ -1,5 +1,5 @@ DrainHPEffect_: ; 783f (1:783f) - ld hl, W_DAMAGE + ld hl, W_DAMAGE ld a, [hl] srl a ; divide damage by 2 ld [hli], a @@ -17,8 +17,8 @@ DrainHPEffect_: ; 783f (1:783f) ld a, [H_WHOSETURN] and a jp z, .addDamageToAttackerHP - ld hl, wEnemyMonHP - ld de, wEnemyMonMaxHP + ld hl, wEnemyMonHP + ld de, wEnemyMonMaxHP .addDamageToAttackerHP ld bc, wHPBarOldHP+1 ; copy current HP to wHPBarOldHP @@ -41,7 +41,7 @@ DrainHPEffect_: ; 783f (1:783f) add b ld [hld], a ld [wHPBarNewHP], a - ld a, [W_DAMAGE] + ld a, [W_DAMAGE] ld b, [hl] adc b ld [hli], a @@ -87,7 +87,7 @@ DrainHPEffect_: ; 783f (1:783f) and a ld a, [W_PLAYERMOVEEFFECT] jr z, .next3 - ld a, [W_ENEMYMOVEEFFECT] + ld a, [W_ENEMYMOVEEFFECT] .next3 cp DREAM_EATER_EFFECT jr nz, .printText diff --git a/engine/battle/moveEffects/haze_effect.asm b/engine/battle/moveEffects/haze_effect.asm index 14b5f5dd..5c5443c0 100644 --- a/engine/battle/moveEffects/haze_effect.asm +++ b/engine/battle/moveEffects/haze_effect.asm @@ -1,11 +1,11 @@ HazeEffect_: ; 139da (4:79da) ld a, $7 -; store 7 on every stat mod +; store 7 on every stat mod ld hl, wPlayerMonAttackMod call ResetStatMods ld hl, wEnemyMonAttackMod call ResetStatMods -; copy unmodified stats to battle stats +; copy unmodified stats to battle stats ld hl, wPlayerMonUnmodifiedAttack ld de, wBattleMonAttack call ResetStats @@ -25,7 +25,7 @@ HazeEffect_: ; 139da (4:79da) ld [hl], $0 and SLP | (1 << FRZ) jr z, .cureVolatileStatuses -; prevent the Pokemon from executing a move if it was asleep or frozen +; prevent the Pokemon from executing a move if it was asleep or frozen ld a, $ff ld [de], a @@ -51,7 +51,7 @@ CureVolatileStatuses: ; 13a37 (4:7a37) inc hl ; BATTSTATUS2 ld a, [hl] ; clear UsingXAccuracy, ProtectedByMist, GettingPumped, and Seeded statuses - and $ff ^((1 << UsingXAccuracy) | (1 << ProtectedByMist) | (1 << GettingPumped) | (1 << Seeded)) + and $ff ^((1 << UsingXAccuracy) | (1 << ProtectedByMist) | (1 << GettingPumped) | (1 << Seeded)) ld [hli], a ; BATTSTATUS3 ld a, [hl] and %11110000 | (1 << Transformed) ; clear Bad Poison, Reflect and Light Screen statuses @@ -61,7 +61,7 @@ CureVolatileStatuses: ; 13a37 (4:7a37) ResetStatMods: ; 13a43 (4:7a43) ld b, $8 .loop - ld [hli], a + ld [hli], a dec b jr nz, .loop ret diff --git a/engine/battle/moveEffects/heal_effect.asm b/engine/battle/moveEffects/heal_effect.asm index 862917f7..d9729747 100644 --- a/engine/battle/moveEffects/heal_effect.asm +++ b/engine/battle/moveEffects/heal_effect.asm @@ -76,7 +76,7 @@ HealEffect_: ; 3b9ec (e:79ec) ld a, [de] sbc [hl] jr c, .playAnim -; copy max HP to current HP if an overflow ocurred +; copy max HP to current HP if an overflow ocurred ld a, [hli] ld [de], a ld [wHPBarNewHP+1], a diff --git a/engine/battle/moveEffects/leech_seed_effect.asm b/engine/battle/moveEffects/leech_seed_effect.asm index e29fd7c2..284ca2c0 100644 --- a/engine/battle/moveEffects/leech_seed_effect.asm +++ b/engine/battle/moveEffects/leech_seed_effect.asm @@ -1,20 +1,20 @@ LeechSeedEffect_: ; 2bea9 (a:7ea9) callab MoveHitTest - ld a, [W_MOVEMISSED] + ld a, [W_MOVEMISSED] and a jr nz, .moveMissed - ld hl, W_ENEMYBATTSTATUS2 - ld de, wEnemyMonType1 - ld a, [H_WHOSETURN] + ld hl, W_ENEMYBATTSTATUS2 + ld de, wEnemyMonType1 + ld a, [H_WHOSETURN] and a jr z, .leechSeedEffect - ld hl, W_PLAYERBATTSTATUS2 - ld de, wBattleMonType1 + ld hl, W_PLAYERBATTSTATUS2 + ld de, wBattleMonType1 .leechSeedEffect ; miss if the target is grass-type or already seeded ld a, [de] cp GRASS - jr z, .moveMissed + jr z, .moveMissed inc de ld a, [de] cp GRASS diff --git a/engine/battle/moveEffects/one_hit_ko_effect.asm b/engine/battle/moveEffects/one_hit_ko_effect.asm index cc0eca7b..907db80c 100644 --- a/engine/battle/moveEffects/one_hit_ko_effect.asm +++ b/engine/battle/moveEffects/one_hit_ko_effect.asm @@ -1,5 +1,5 @@ OneHitKOEffect_: ; 33f57 (c:7f57) - ld hl, W_DAMAGE + ld hl, W_DAMAGE xor a ld [hli], a ld [hl], a ; set the damage output to zero @@ -7,7 +7,7 @@ OneHitKOEffect_: ; 33f57 (c:7f57) ld [wCriticalHitOrOHKO], a ld hl, wBattleMonSpeed + 1 ld de, wEnemyMonSpeed + 1 - ld a, [H_WHOSETURN] + ld a, [H_WHOSETURN] and a jr z, .compareSpeed ld hl, wEnemyMonSpeed + 1 @@ -24,7 +24,7 @@ OneHitKOEffect_: ; 33f57 (c:7f57) ld a, [hl] sbc b jr c, .userIsSlower - ld hl, W_DAMAGE + ld hl, W_DAMAGE ld a, $ff ld [hli], a ld [hl], a @@ -34,5 +34,5 @@ OneHitKOEffect_: ; 33f57 (c:7f57) .userIsSlower ; keep damage at 0 and set move missed flag if target's current speed is higher instead ld a, $1 - ld [W_MOVEMISSED], a + ld [W_MOVEMISSED], a ret diff --git a/engine/battle/moveEffects/paralyze_effect.asm b/engine/battle/moveEffects/paralyze_effect.asm index 69acbb01..b88e6479 100644 --- a/engine/battle/moveEffects/paralyze_effect.asm +++ b/engine/battle/moveEffects/paralyze_effect.asm @@ -4,7 +4,7 @@ ParalyzeEffect_: ; 52601 (14:6601) ld a, [H_WHOSETURN] and a jp z, .next - ld hl, wBattleMonStatus + ld hl, wBattleMonStatus ld de, W_ENEMYMOVETYPE .next ld a, [hl] @@ -28,7 +28,7 @@ ParalyzeEffect_: ; 52601 (14:6601) push hl callab MoveHitTest pop hl - ld a, [W_MOVEMISSED] + ld a, [W_MOVEMISSED] and a jr nz, .didntAffect set PAR, [hl] diff --git a/engine/battle/moveEffects/pay_day_effect.asm b/engine/battle/moveEffects/pay_day_effect.asm index fc937d1b..26e69ef5 100644 --- a/engine/battle/moveEffects/pay_day_effect.asm +++ b/engine/battle/moveEffects/pay_day_effect.asm @@ -9,19 +9,19 @@ PayDayEffect_ ; 2feb8 (b:7eb8) ld a, [wEnemyMonLevel] .payDayEffect ; level * 2 - add a + add a ld [H_DIVIDEND + 3], a xor a ld [H_DIVIDEND], a ld [H_DIVIDEND + 1], a ld [H_DIVIDEND + 2], a -; convert to BCD +; convert to BCD ld a, 100 ld [H_DIVISOR], a ld b, $4 call Divide ld a, [H_QUOTIENT + 3] - ld [hli], a + ld [hli], a ld a, [H_REMAINDER] ld [H_DIVIDEND + 3], a ld a, 10 diff --git a/engine/battle/moveEffects/recoil_effect.asm b/engine/battle/moveEffects/recoil_effect.asm index fe516c03..95b54922 100644 --- a/engine/battle/moveEffects/recoil_effect.asm +++ b/engine/battle/moveEffects/recoil_effect.asm @@ -46,7 +46,7 @@ RecoilEffect_: ; 1392c (4:792c) ld [wHPBarNewHP+1], a jr nc, .getHPBarCoords ; if recoil damage is higher than the Pokemon's HP, set its HP to 0 - xor a + xor a ld [hli], a ld [hl], a ld hl, wHPBarNewHP diff --git a/engine/battle/moveEffects/substitute_effect.asm b/engine/battle/moveEffects/substitute_effect.asm index 8412e281..444c755b 100644 --- a/engine/battle/moveEffects/substitute_effect.asm +++ b/engine/battle/moveEffects/substitute_effect.asm @@ -11,15 +11,15 @@ SubstituteEffect_: ; 17dad (5:7dad) ld de, wEnemySubstituteHP ld bc, W_ENEMYBATTSTATUS2 .notEnemy - ld a, [bc] + ld a, [bc] bit HasSubstituteUp, a ; user already has substitute? - jr nz, .alreadyHasSubstitute + jr nz, .alreadyHasSubstitute ; quarter health to remove from user -; assumes max HP is 1023 or lower +; assumes max HP is 1023 or lower push bc ld a, [hli] ld b, [hl] - srl a + srl a rr b srl a rr b ; max hp / 4 @@ -27,29 +27,29 @@ SubstituteEffect_: ; 17dad (5:7dad) ld de, wBattleMonHP - wBattleMonMaxHP add hl, de ; point hl to current HP low byte pop de - ld a, b + ld a, b ld [de], a ; save copy of HP to subtract in ccd7/ccd8 [how much HP substitute has] ld a, [hld] -; subtract [max hp / 4] to current HP - sub b +; subtract [max hp / 4] to current HP + sub b ld d, a ld a, [hl] - sbc 0 + sbc 0 pop bc jr c, .notEnoughHP ; underflow means user would be left with negative health ; bug: since it only brances on carry, it will possibly leave user with 0 HP .userHasZeroOrMoreHP ldi [hl], a ; save resulting HP after substraction into current HP - ld [hl], d + ld [hl], d ld h, b ld l, c - set HasSubstituteUp, [hl] - ld a, [W_OPTIONS] + set HasSubstituteUp, [hl] + ld a, [W_OPTIONS] bit 7, a ; battle animation is enabled? - ld hl, PlayCurrentMoveAnimation + ld hl, PlayCurrentMoveAnimation ld b, BANK(PlayCurrentMoveAnimation) jr z, .animationEnabled - ld hl, AnimationSubstitute + ld hl, AnimationSubstitute ld b, BANK(AnimationSubstitute) .animationEnabled call Bankswitch ; jump to routine depending on animation setting diff --git a/engine/battle/moveEffects/transform_effect.asm b/engine/battle/moveEffects/transform_effect.asm index 6504bf03..1b992df6 100644 --- a/engine/battle/moveEffects/transform_effect.asm +++ b/engine/battle/moveEffects/transform_effect.asm @@ -24,7 +24,7 @@ TransformEffect_: ; 3bab1 (e:7ab1) ld hl, W_ENEMYBATTSTATUS2 .transformEffect ; animation(s) played are different if target has Substitute up - bit HasSubstituteUp, [hl] + bit HasSubstituteUp, [hl] push af ld hl, Func_79747 ld b, BANK(Func_79747) @@ -49,13 +49,13 @@ TransformEffect_: ; 3bab1 (e:7ab1) pop de pop hl push hl -; transform user into opposing Pokemon +; transform user into opposing Pokemon ; species - ld a, [hl] + ld a, [hl] ld [de], a -; type 1, type 2, catch rate, and moves +; type 1, type 2, catch rate, and moves ld bc, $5 - add hl, bc + add hl, bc inc de inc de inc de @@ -82,7 +82,7 @@ TransformEffect_: ; 3bab1 (e:7ab1) ld a, [hli] ld [de], a inc de -; Attack, Defense, Speed, and Special stats +; Attack, Defense, Speed, and Special stats inc hl inc hl inc hl @@ -91,7 +91,7 @@ TransformEffect_: ; 3bab1 (e:7ab1) inc de ld bc, $8 call CopyData - ld bc, wBattleMonMoves - wBattleMonPP + ld bc, wBattleMonMoves - wBattleMonPP add hl, bc ; ld hl, wBattleMonMoves ld b, NUM_MOVES .copyPPLoop |