summaryrefslogtreecommitdiff
path: root/battle/ai/scoring.asm
diff options
context:
space:
mode:
Diffstat (limited to 'battle/ai/scoring.asm')
-rw-r--r--battle/ai/scoring.asm178
1 files changed, 68 insertions, 110 deletions
diff --git a/battle/ai/scoring.asm b/battle/ai/scoring.asm
index 9b8dd6e42..3091697e5 100644
--- a/battle/ai/scoring.asm
+++ b/battle/ai/scoring.asm
@@ -133,18 +133,16 @@ AI_Setup: ; 385e0
call AI_50_50
jr c, .checkmove
-rept 2
dec [hl]
-endr
+ dec [hl]
jr .checkmove
.discourage
call Random
cp 30
jr c, .checkmove
-rept 2
inc [hl]
-endr
+ inc [hl]
jr .checkmove
; 38635
@@ -264,9 +262,8 @@ AI_Offensive: ; 386a2
and a
jr nz, .checkmove
-rept 2
inc [hl]
-endr
+ inc [hl]
jr .checkmove
; 386be
@@ -420,9 +417,8 @@ AI_Smart_Sleep: ; 387e3
.asm_387f0
call AI_50_50
ret c
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
; 387f7
@@ -533,9 +529,8 @@ AI_Smart_LockOn: ; 3881d
call AI_50_50
ret c
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
.asm_38882
@@ -560,9 +555,8 @@ endr
cp 180
jr nc, .asm_3888b
-rept 2
dec [hl]
-endr
+ dec [hl]
jr .asm_3888b
.asm_388a2
@@ -602,9 +596,9 @@ AI_Smart_Explosion: ; 388a6
ret c
.asm_388c6
-rept 3
inc [hl]
-endr
+ inc [hl]
+ inc [hl]
ret
; 388ca
@@ -616,9 +610,9 @@ AI_Smart_DreamEater: ; 388ca
call Random
cp 25
ret c
-rept 3
dec [hl]
-endr
+ dec [hl]
+ dec [hl]
ret
; 388d4
@@ -645,9 +639,8 @@ AI_Smart_EvasionUp: ; 388d4
jr nc, .asm_38911
.asm_388ef
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
.asm_388f2
@@ -676,9 +669,8 @@ endr
jr c, .asm_38911
.asm_3890f
-rept 2
inc [hl]
-endr
+ inc [hl]
; 30% chance to end up here if enemy's HP is full and player is not badly poisoned.
; 77% chance to end up here if enemy's HP is above 50% but not full.
@@ -722,9 +714,8 @@ endr
call Random
cp $50
ret c
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
; Player is seeded.
@@ -756,9 +747,8 @@ AI_Smart_AlwaysHit: ; 38947
call AI_80_20
ret c
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
; 3895b
@@ -828,9 +818,8 @@ AI_Smart_AccuracyDown: ; 38985
jr nc, .asm_389bf
.asm_3899d
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
.asm_389a0
@@ -859,9 +848,8 @@ endr
jr c, .asm_389bf
.asm_389bd
-rept 2
inc [hl]
-endr
+ inc [hl]
; We only end up here if the move has not been already encouraged.
.asm_389bf
@@ -900,9 +888,8 @@ endr
call Random
cp $50
ret c
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
; Player is seeded.
@@ -1010,9 +997,8 @@ AI_Smart_Moonlight: ; 38a3a
call Random
cp $19
ret c
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
; 38a4e
@@ -1093,9 +1079,8 @@ AI_Smart_Bind: ; 38a71
ret nc
call AI_50_50
ret c
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
; 38a9c
@@ -1200,9 +1185,8 @@ AI_Smart_SpDefenseUp2: ; 38aed
.asm_38b09
call AI_80_20
ret c
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
.asm_38b10
@@ -1224,9 +1208,9 @@ AI_Smart_Fly: ; 38b12
call AICompareSpeed
ret nc
-rept 3
dec [hl]
-endr
+ dec [hl]
+ dec [hl]
ret
; 38b20
@@ -1255,9 +1239,8 @@ AI_Smart_Paralyze: ; 38b26
ret nc
call AI_80_20
ret c
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
.asm_38b3a
@@ -1289,9 +1272,8 @@ AI_Smart_SpeedDownHit: ; 38b40
call Random
cp 30
ret c
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
; 38b5c
@@ -1528,15 +1510,14 @@ AI_Smart_Encore: ; 38c3b
call Random
cp $46
ret c
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
.asm_38c81
-rept 3
inc [hl]
-endr
+ inc [hl]
+ inc [hl]
ret
.EncoreMoves:
@@ -1606,15 +1587,15 @@ AI_Smart_SleepTalk: ; 38cba
cp $1
jr z, .asm_38cc7
-rept 3
dec [hl]
-endr
+ dec [hl]
+ dec [hl]
ret
.asm_38cc7
-rept 3
inc [hl]
-endr
+ inc [hl]
+ inc [hl]
ret
; 38ccb
@@ -1626,9 +1607,9 @@ AI_Smart_DefrostOpponent: ; 38ccb
ld a, [EnemyMonStatus]
and $20
ret z
-rept 3
dec [hl]
-endr
+ dec [hl]
+ dec [hl]
ret
; 38cd5
@@ -1685,9 +1666,8 @@ AI_Smart_Spite: ; 38cd5
call Random
cp $64
ret c
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
; 38d16
@@ -1728,9 +1708,9 @@ AI_Smart_HealBell: ; 38d1f
jr z, .next
; status
-rept 3
dec hl
-endr
+ dec hl
+ dec hl
ld a, [hl]
or c
ld c, a
@@ -1755,9 +1735,8 @@ endr
ret z
call AI_50_50
ret c
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
.no_status
@@ -1795,9 +1774,9 @@ AI_Smart_PriorityHit: ; 38d5a
ld a, [BattleMonHP]
sbc b
ret nc
-rept 3
dec [hl]
-endr
+ dec [hl]
+ dec [hl]
ret
; 38d93
@@ -1921,9 +1900,9 @@ AI_Smart_MeanLook: ; 38dfb
.asm_38e26
call AI_80_20
ret c
-rept 3
dec [hl]
-endr
+ dec [hl]
+ dec [hl]
ret
; 38e2e
@@ -2007,15 +1986,13 @@ AI_Smart_Curse: ; 38e5c
ret nc
call AI_80_20
ret c
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
.asm_38e90
-rept 2
inc [hl]
-endr
+ inc [hl]
.asm_38e92
inc [hl]
.asm_38e93
@@ -2065,9 +2042,8 @@ endr
call AI_50_50
ret c
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
; 38ed2
@@ -2119,9 +2095,8 @@ AI_Smart_Protect: ; 38ed2
call Random
cp 20
ret c
-rept 2
inc [hl]
-endr
+ inc [hl]
ret
; 38f1d
@@ -2151,9 +2126,8 @@ AI_Smart_Foresight: ; 38f1d
call Random
cp 100
ret c
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
; 38f4a
@@ -2259,9 +2233,9 @@ AI_Smart_Endure: ; 38fac
call AI_80_20
ret c
-rept 3
dec [hl]
-endr
+ dec [hl]
+ dec [hl]
ret
.asm_38fcb
@@ -2272,9 +2246,8 @@ endr
call AI_50_50
ret c
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
.asm_38fd8
@@ -2296,15 +2269,14 @@ AI_Smart_FuryCutter: ; 38fdb
cp 2
jr c, .end
-rept 2
dec [hl]
-endr
+ dec [hl]
cp 3
jr c, .end
-rept 3
dec [hl]
-endr
+ dec [hl]
+ dec [hl]
.end
@@ -2344,9 +2316,8 @@ AI_Smart_Rollout: ; 38fef
call Random
cp 200
ret nc
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
.asm_39020
@@ -2406,9 +2377,8 @@ AI_Smart_Earthquake: ; 39044
call AICompareSpeed
ret nc
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
.could_dig
@@ -2455,9 +2425,8 @@ AI_Smart_Pursuit: ; 39072
.asm_3907d
call AI_50_50
ret c
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
; 39084
@@ -2482,9 +2451,8 @@ AI_Smart_RapidSpin: ; 39084
call AI_80_20
ret c
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
; 3909e
@@ -2611,9 +2579,9 @@ AI_Smart_WeatherMove: ; 3910d
; 3911e
AIBadWeatherType: ; 3911e
-rept 3
inc [hl]
-endr
+ inc [hl]
+ inc [hl]
ret
; 39122
@@ -2636,9 +2604,8 @@ AIGoodWeatherType: ; 39122
ret nz
.good
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
; 39134
@@ -2733,9 +2700,8 @@ AI_Smart_PsychUp: ; 39152
ret
.asm_39188
-rept 2
inc [hl]
-endr
+ inc [hl]
ret
; 3918b
@@ -2820,9 +2786,8 @@ AI_Smart_Gust: ; 391d5
call AICompareSpeed
ret nc
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
; Try to predict if the player will use Fly this turn.
@@ -2849,9 +2814,8 @@ AI_Smart_FutureSight: ; 391f3
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
ret z
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
; 39200
@@ -2886,18 +2850,16 @@ AI_Smart_Solarbeam: ; 3920b
cp 25 ; 1/10
ret c
-rept 2
inc [hl]
-endr
+ inc [hl]
ret
.asm_3921e
call AI_80_20
ret c
-rept 2
dec [hl]
-endr
+ dec [hl]
ret
; 39225
@@ -2991,9 +2953,8 @@ AICheckPlayerHalfHP: ; 3926e
ld c, [hl]
sla c
rl b
-rept 2
inc hl
-endr
+ inc hl
ld a, [hld]
cp c
ld a, [hl]
@@ -3013,9 +2974,8 @@ AICheckEnemyHalfHP: ; 39281
ld c, [hl]
sla c
rl b
-rept 2
inc hl
-endr
+ inc hl
ld a, [hld]
cp c
ld a, [hl]
@@ -3039,9 +2999,8 @@ AICheckEnemyQuarterHP: ; 39298
rl b
sla c
rl b
-rept 2
inc hl
-endr
+ inc hl
ld a, [hld]
cp c
ld a, [hl]
@@ -3063,9 +3022,8 @@ AICheckPlayerQuarterHP: ; 392b3
rl b
sla c
rl b
-rept 2
inc hl
-endr
+ inc hl
ld a, [hld]
cp c
ld a, [hl]