diff --git a/battle/ai/scoring.asm b/battle/ai/scoring.asm index a509db6f6..b48e04bc6 100644 --- a/battle/ai/scoring.asm +++ b/battle/ai/scoring.asm @@ -391,19 +391,16 @@ AIScoring_Smart: ; 386be AIScoring_Sleep: ; 387e3 - ld b, $8 - call Function_0x392ca - + ld b, EFFECT_DREAM_EATER + call AIHasMove jr c, .asm_387f0 - ld b, $6b - call Function_0x392ca - + ld b, EFFECT_NIGHTMARE + call AIHasMove ret nc .asm_387f0 call Function_0x39527 - ret c dec [hl] dec [hl] @@ -413,15 +410,13 @@ AIScoring_Sleep: ; 387e3 AIScoring_LeechHit: ; 387f7 push hl - ld a, $1 + ld a, 1 ld [hBattleTurn], a - ld hl, $47c8 - ld a, $d - rst FarCall - + callab Function0x347c8 pop hl + ld a, [$d265] - cp $a + cp 10 ; 1.0 jr c, .asm_38815 ret z @@ -564,31 +559,24 @@ AIScoring_LockOn: ; 3881d AIScoring_Explosion: ; 388a6 push hl - ld a, $d - ld hl, $49f4 - rst FarCall - + callba Function0x349f4 pop hl jr nc, .asm_388b7 push hl - call Function_0x38e2e - + call AICheckLastPlayerMon pop hl jr nz, .asm_388c6 - .asm_388b7 call AICheckEnemyHalfHP - jr c, .asm_388c6 call AICheckEnemyQuarterHP - ret nc - call RNG - cp $14 + call RNG + cp 20 ret c .asm_388c6 @@ -916,9 +904,7 @@ AIScoring_Bide: ; 38a1e AIScoring_Whirlwind: ; 38a2a push hl - ld hl, $484e - ld a, $d - rst FarCall + callab Function0x3484e ld a, [$c716] cp $a pop hl @@ -1171,7 +1157,7 @@ AIScoring_SpeedDownHit: ; 38b40 call AICompareSpeed ret c call RNG - cp $1e + cp 30 ret c dec [hl] dec [hl] @@ -1198,7 +1184,7 @@ AIScoring_HyperBeam: ; 38b63 .asm_38b72 call RNG - cp $28 + cp 40 ret c inc [hl] call Function_0x39527 @@ -1725,7 +1711,6 @@ AIScoring_Conversion2: ; 38d98 AIScoring_Disable: ; 38dd1 call AICompareSpeed - jr nc, .asm_38df3 push hl @@ -1738,8 +1723,7 @@ AIScoring_Disable: ; 38dd1 jr nc, .asm_38dee call RNG - - cp $64 + cp 100 ret c dec [hl] ret @@ -1751,8 +1735,7 @@ AIScoring_Disable: ; 38dd1 .asm_38df3 call RNG - - cp $14 + cp 20 ret c inc [hl] ret @@ -1761,28 +1744,23 @@ AIScoring_Disable: ; 38dd1 AIScoring_MeanLook: ; 38dfb call AICheckEnemyHalfHP - jr nc, .asm_38e24 push hl - call Function_0x38e2e - + call AICheckLastPlayerMon pop hl jp z, AIDiscourageMove ld a, [EnemySubStatus5] - bit 0, a + bit SUBSTATUS_TOXIC, a jr nz, .asm_38e26 ld a, [PlayerSubStatus1] - and $c9 + and 1<