Consistently use ld [hli]/ld [hld], not ldi/ldd
Some checks failed
CI / build (push) Has been cancelled

This commit is contained in:
Rangi 2025-10-05 10:53:31 -04:00
parent 628797baff
commit e3af20b907
2 changed files with 8 additions and 8 deletions

View File

@ -4160,7 +4160,7 @@ IgnoredOrdersText:
GetDamageVarsForPlayerAttack:
xor a
ld hl, wDamage ; damage to eventually inflict, initialise to zero
ldi [hl], a
ld [hli], a
ld [hl], a
ld hl, wPlayerMovePower
ld a, [hli]
@ -4466,8 +4466,8 @@ CalculateDamage:
xor a
ld hl, hDividend
ldi [hl], a
ldi [hl], a
ld [hli], a
ld [hli], a
ld [hl], a
; Multiply level by 2
@ -4480,11 +4480,11 @@ CalculateDamage:
pop af
.nc
inc hl
ldi [hl], a
ld [hli], a
; Divide by 5
ld a, 5
ldd [hl], a
ld [hld], a
push bc
ld b, 4
call Divide
@ -4723,7 +4723,7 @@ HandleCounterMove:
; if it did damage, double it
ld a, [hl]
add a
ldd [hl], a
ld [hld], a
ld a, [hl]
adc a
ld [hl], a
@ -5074,7 +5074,7 @@ HandleBuildingRage:
call StatModifierUpEffect ; stat modifier raising function
pop hl
xor a
ldd [hl], a ; null move effect
ld [hld], a ; null move effect
ld a, RAGE
ld [hl], a ; restore the target pokemon's move number to Rage
ldh a, [hWhoseTurn]

View File

@ -39,7 +39,7 @@ SubstituteEffect_:
jr c, .notEnoughHP ; underflow means user would be left with negative health
; bug: since it only branches on carry, it will possibly leave user with 0 HP
.userHasZeroOrMoreHP
ldi [hl], a ; save resulting HP after subtraction into current HP
ld [hli], a ; save resulting HP after subtraction into current HP
ld [hl], d
ld h, b
ld l, c