fixing a few small bugs

This commit is contained in:
MementoMartha 2022-09-28 10:46:42 +01:00
parent f457830786
commit 91c79913fd
6 changed files with 39 additions and 18 deletions

View file

@ -5291,6 +5291,21 @@ AdjustDamageForMoveType:
ld b, a
ld a, [hl] ; a = damage multiplier
ldh [hMultiplier], a
and a ; cp NO_EFFECT ;This fixes incorrect type effectiveness messages
jr z, .gotMultiplier
cp NOT_VERY_EFFECTIVE
jr nz, .nothalf
ld a, [wDamageMultipliers]
and $7f
srl a
jr .gotMultiplier
.nothalf
cp SUPER_EFFECTIVE
jr nz, .gotMultiplier
ld a, [wDamageMultipliers]
and $7f
sla a
.gotMultiplier
add b
ld [wDamageMultipliers], a
xor a