Add meaningful aliases for wd265

Introduce MONICON_* constants
Introduce BATTLEPLAYERACTION_* constants
This commit is contained in:
Rangi
2018-07-28 19:27:34 -04:00
parent 2ec900d96c
commit 9dec80b07e
83 changed files with 436 additions and 404 deletions

View File

@@ -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