fix type matchup damage

This commit is contained in:
Llinos Evans 2025-07-25 18:26:49 +01:00
parent 8e9f9d8657
commit 0ae24ced3c
3 changed files with 31 additions and 143 deletions

View file

@ -1263,10 +1263,10 @@ INCLUDE "data/battle/critical_hit_chances.asm"
INCLUDE "engine/battle/move_effects/triple_kick.asm"
GetNextTypeMatchupsByte:
ld a, BANK(TypeMatchups)
call GetFarByte
ret
;GetNextTypeMatchupsByte:
; ld a, BANK(TypeMatchups)
; call GetFarByte
; ret
BattleCommand_Stab:
; STAB = Same Type Attack Bonus
@ -1352,9 +1352,9 @@ BattleCommand_Stab:
ld hl, TypeMatchups
.TypesLoop:
; ld a, [hli]
call GetNextTypeMatchupsByte
inc hl
ld a, [hli]
; call GetNextTypeMatchupsByte
; inc hl
cp -1
jr z, .end
@ -1372,8 +1372,8 @@ BattleCommand_Stab:
.SkipForesightCheck:
cp b
jr nz, .SkipType
; ld a, [hl]
call GetNextTypeMatchupsByte
ld a, [hl]
; call GetNextTypeMatchupsByte
cp d
jr z, .GotMatchup
cp e
@ -1478,9 +1478,9 @@ CheckTypeMatchup:
ld [wTypeMatchup], a
ld hl, TypeMatchups
.TypesLoop:
; ld a, [hli]
call GetNextTypeMatchupsByte
inc hl
ld a, [hli]
; call GetNextTypeMatchupsByte
; inc hl
cp -1
jr z, .End
cp -2
@ -1494,9 +1494,9 @@ CheckTypeMatchup:
.Next:
cp d
jr nz, .Nope
; ld a, [hli]
call GetNextTypeMatchupsByte
inc hl
ld a, [hli]
; call GetNextTypeMatchupsByte
; inc hl
cp b
jr z, .Yup
cp c
@ -1514,9 +1514,9 @@ CheckTypeMatchup:
ldh [hDividend + 0], a
ldh [hMultiplicand + 0], a
ldh [hMultiplicand + 1], a
; ld a, [hli]
call GetNextTypeMatchupsByte
inc hl
ld a, [hli]
; call GetNextTypeMatchupsByte
; inc hl
ldh [hMultiplicand + 2], a
ld a, [wTypeMatchup]
ldh [hMultiplier], a
@ -1558,7 +1558,7 @@ BattleCommand_ResetTypeMatchup:
INCLUDE "engine/battle/ai/switch.asm"
;INCLUDE "data/types/type_matchups.asm"
INCLUDE "data/types/type_matchups.asm"
BattleCommand_DamageVariation:
; Modify the damage spread between 85% and 100%.