diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-07-28 19:27:34 -0400 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-07-29 00:25:52 -0400 |
commit | 9dec80b07e3638c722b9768a1ca0184edea20392 (patch) | |
tree | fdd5e227f20540b838ec45d282e40b083ae56c72 /engine/battle/ai/scoring.asm | |
parent | 2ec900d96c3b6020be0816151b9ad606c04114b5 (diff) |
Add meaningful aliases for wd265
Introduce MONICON_* constants
Introduce BATTLEPLAYERACTION_* constants
Diffstat (limited to 'engine/battle/ai/scoring.asm')
-rw-r--r-- | engine/battle/ai/scoring.asm | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/engine/battle/ai/scoring.asm b/engine/battle/ai/scoring.asm index 3cd0e56c4..752796892 100644 --- a/engine/battle/ai/scoring.asm +++ b/engine/battle/ai/scoring.asm @@ -171,10 +171,10 @@ AI_Types: pop bc pop hl - ld a, [wd265] + ld a, [wTypeMatchup] and a jr z, .immune - cp 10 ; 1.0 + cp EFFECTIVE jr z, .checkmove jr c, .noteffective @@ -415,8 +415,8 @@ AI_Smart_LeechHit: pop hl ; 60% chance to discourage this move if not very effective. - ld a, [wd265] - cp 10 ; 1.0 + ld a, [wTypeMatchup] + cp EFFECTIVE jr c, .asm_38815 ; Do nothing if effectiveness is neutral. @@ -491,8 +491,8 @@ AI_Smart_LockOn: push hl push bc farcall BattleCheckTypeMatchup - ld a, [wd265] - cp $a + ld a, [wTypeMatchup] + cp EFFECTIVE pop bc pop hl jr c, .asm_3884f @@ -1292,8 +1292,8 @@ AI_Smart_Mimic: ld [hBattleTurn], a callfar BattleCheckTypeMatchup - ld a, [wd265] - cp $a + ld a, [wTypeMatchup] + cp EFFECTIVE pop hl jr c, .asm_38bef jr z, .asm_38bd4 @@ -1408,8 +1408,8 @@ AI_Smart_Encore: predef CheckTypeMatchup pop hl - ld a, [wd265] - cp $a + ld a, [wTypeMatchup] + cp EFFECTIVE jr nc, .asm_38c68 and a @@ -1679,8 +1679,8 @@ AI_Smart_Conversion2: callfar BattleCheckTypeMatchup - ld a, [wd265] - cp $a + ld a, [wTypeMatchup] + cp EFFECTIVE pop hl jr c, .asm_38dc9 ret z @@ -2293,8 +2293,8 @@ AI_Smart_HiddenPower: pop hl ; Discourage Hidden Power if not very effective. - ld a, [wd265] - cp 10 + ld a, [wTypeMatchup] + cp EFFECTIVE jr c, .bad ; Discourage Hidden Power if its base power is lower than 50. @@ -2303,8 +2303,8 @@ AI_Smart_HiddenPower: jr c, .bad ; Encourage Hidden Power if super-effective. - ld a, [wd265] - cp 11 + ld a, [wTypeMatchup] + cp EFFECTIVE + 1 jr nc, .good ; Encourage Hidden Power if its base power is 70. @@ -3125,7 +3125,7 @@ AI_Status: pop bc pop hl - ld a, [wd265] + ld a, [wTypeMatchup] and a jr nz, .checkmove |