diff options
Diffstat (limited to 'engine/battle/core.asm')
-rw-r--r-- | engine/battle/core.asm | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 8ec5f469..fb4daecc 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -3037,13 +3037,13 @@ AddBattleParticipant: FindMonInOTPartyToSwitchIntoBattle: ld b, -1 - ld a, $1 - ld [wBuffer1], a - ld [wBuffer2], a + ld a, %000001 + ld [wEnemyEffectivenessVsPlayerMons], a + ld [wPlayerEffectivenessVsEnemyMons], a .loop - ld hl, wBuffer1 + ld hl, wEnemyEffectivenessVsPlayerMons sla [hl] - inc hl + inc hl ; wPlayerEffectivenessVsEnemyMons sla [hl] inc b ld a, [wOTPartyCount] @@ -3067,7 +3067,7 @@ FindMonInOTPartyToSwitchIntoBattle: jr .loop .discourage - ld hl, wBuffer2 + ld hl, wPlayerEffectivenessVsEnemyMons set 0, [hl] jr .loop @@ -3102,7 +3102,7 @@ LookUpTheEffectivenessOfEveryMove: ld a, [wTypeMatchup] cp EFFECTIVE + 1 jr c, .loop - ld hl, wBuffer1 + ld hl, wEnemyEffectivenessVsPlayerMons set 0, [hl] ret .done @@ -3145,10 +3145,10 @@ IsThePlayerMonTypesEffectiveAgainstOTMon: .super_effective pop bc - ld hl, wBuffer1 + ld hl, wEnemyEffectivenessVsPlayerMons bit 0, [hl] jr nz, .reset - inc hl + inc hl ; wPlayerEffectivenessVsEnemyMons set 0, [hl] ret @@ -3158,9 +3158,9 @@ IsThePlayerMonTypesEffectiveAgainstOTMon: ScoreMonTypeMatchups: .loop1 - ld hl, wBuffer1 + ld hl, wEnemyEffectivenessVsPlayerMons sla [hl] - inc hl + inc hl ; wPlayerEffectivenessVsEnemyMons sla [hl] jr nc, .loop1 ld a, [wOTPartyCount] @@ -3174,7 +3174,7 @@ ScoreMonTypeMatchups: jr .loop2 .okay - ld a, [wBuffer1] + ld a, [wEnemyEffectivenessVsPlayerMons] and a jr z, .okay2 ld b, -1 @@ -3187,7 +3187,7 @@ ScoreMonTypeMatchups: .okay2 ld b, -1 - ld a, [wBuffer2] + ld a, [wPlayerEffectivenessVsEnemyMons] ld c, a .loop4 inc b |