Skip to content

Commit e3af20b

Browse files
committed
Consistently use ld [hli]/ld [hld], not ldi/ldd
1 parent 628797b commit e3af20b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

engine/battle/core.asm

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4160,7 +4160,7 @@ IgnoredOrdersText:
41604160
GetDamageVarsForPlayerAttack:
41614161
xor a
41624162
ld hl, wDamage ; damage to eventually inflict, initialise to zero
4163-
ldi [hl], a
4163+
ld [hli], a
41644164
ld [hl], a
41654165
ld hl, wPlayerMovePower
41664166
ld a, [hli]
@@ -4466,8 +4466,8 @@ CalculateDamage:
44664466

44674467
xor a
44684468
ld hl, hDividend
4469-
ldi [hl], a
4470-
ldi [hl], a
4469+
ld [hli], a
4470+
ld [hli], a
44714471
ld [hl], a
44724472

44734473
; Multiply level by 2
@@ -4480,11 +4480,11 @@ CalculateDamage:
44804480
pop af
44814481
.nc
44824482
inc hl
4483-
ldi [hl], a
4483+
ld [hli], a
44844484

44854485
; Divide by 5
44864486
ld a, 5
4487-
ldd [hl], a
4487+
ld [hld], a
44884488
push bc
44894489
ld b, 4
44904490
call Divide
@@ -4723,7 +4723,7 @@ HandleCounterMove:
47234723
; if it did damage, double it
47244724
ld a, [hl]
47254725
add a
4726-
ldd [hl], a
4726+
ld [hld], a
47274727
ld a, [hl]
47284728
adc a
47294729
ld [hl], a
@@ -5074,7 +5074,7 @@ HandleBuildingRage:
50745074
call StatModifierUpEffect ; stat modifier raising function
50755075
pop hl
50765076
xor a
5077-
ldd [hl], a ; null move effect
5077+
ld [hld], a ; null move effect
50785078
ld a, RAGE
50795079
ld [hl], a ; restore the target pokemon's move number to Rage
50805080
ldh a, [hWhoseTurn]

engine/battle/move_effects/substitute.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ SubstituteEffect_:
3939
jr c, .notEnoughHP ; underflow means user would be left with negative health
4040
; bug: since it only branches on carry, it will possibly leave user with 0 HP
4141
.userHasZeroOrMoreHP
42-
ldi [hl], a ; save resulting HP after subtraction into current HP
42+
ld [hli], a ; save resulting HP after subtraction into current HP
4343
ld [hl], d
4444
ld h, b
4545
ld l, c

0 commit comments

Comments
 (0)