Fix static farcalls in AI scoring.

This commit is contained in:
yenatch 2014-05-05 03:30:51 -04:00
parent 1fcc69e495
commit c8055c17f2

View File

@ -22,9 +22,7 @@ AIScoring_RedStatus: ; 38591
push hl push hl
push de push de
push bc push bc
ld a, $b callba Function2c41a
ld hl, $441a
rst FarCall
pop bc pop bc
pop de pop de
pop hl pop hl
@ -494,9 +492,8 @@ AIScoring_LockOn: ; 3881d
ld [hBattleTurn], a ld [hBattleTurn], a
push hl push hl
push bc push bc
ld a, $d
ld hl, $47c8 callba Function347c8
rst FarCall
ld a, [$d265] ld a, [$d265]
cp $a cp $a
@ -1105,7 +1102,7 @@ AIScoring_SpDefenseUp2: ; 38aed
AIScoring_Fly: ; 38b12 AIScoring_Fly: ; 38b12
ld a, [PlayerSubStatus3] ld a, [PlayerSubStatus3]
and 1<<SUBSTATUS_FLYING | 1<<SUBSTATUS_UNDERGROUND and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
ret z ret z
call AICompareSpeed call AICompareSpeed
ret nc ret nc
@ -1244,9 +1241,7 @@ AIScoring_Mimic: ; 38ba8
ld a, $1 ld a, $1
ld [hBattleTurn], a ld [hBattleTurn], a
ld hl, $47c8 callab Function347c8
ld a, $d
rst FarCall
ld a, [$d265] ld a, [$d265]
cp $a cp $a
@ -1444,7 +1439,7 @@ AIScoring_PainSplit: ; 38ca4
ld c, [hl] ld c, [hl]
sla c sla c
rl b rl b
ld hl, $c63d ld hl, BattleMonHP + 1
ld a, [hld] ld a, [hld]
cp c cp c
ld a, [hl] ld a, [hl]
@ -1622,30 +1617,21 @@ AIScoring_PriorityHit: ; 38d5a
ret c ret c
ld a, [PlayerSubStatus3] ld a, [PlayerSubStatus3]
and $60 and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
jp nz, AIDiscourageMove jp nz, AIDiscourageMove
ld a, $1 ld a, $1
ld [hBattleTurn], a ld [hBattleTurn], a
push hl push hl
ld hl, $53f6 callab EnemyAttackDamage
ld a, $d callab BattleCommand62
rst FarCall callab BattleCommand07
ld hl, $5612
ld a, $d
rst FarCall
ld hl, $46d2
ld a, $d
rst FarCall
pop hl pop hl
ld a, [$d257] ld a, [CurDamage + 1]
ld c, a ld c, a
ld a, [CurDamage] ld a, [CurDamage]
ld b, a ld b, a
ld a, [$c63d] ld a, [BattleMonHP + 1]
cp c cp c
ld a, [BattleMonHP] ld a, [BattleMonHP]
sbc b sbc b
@ -1683,9 +1669,7 @@ AIScoring_Conversion2: ; 38d98
xor a xor a
ld [hBattleTurn], a ld [hBattleTurn], a
ld hl, $47c8 callab Function347c8
ld a, $d
rst FarCall
ld a, [$d265] ld a, [$d265]
cp $a cp $a
@ -2296,9 +2280,7 @@ AIScoring_HiddenPower: ; 3909e
push hl push hl
ld a, 1 ld a, 1
ld [hBattleTurn], a ld [hBattleTurn], a
ld hl, $7ced callab HiddenPowerDamage
ld a, $3e
rst FarCall
callab Function347c8 callab Function347c8
pop hl pop hl
@ -2604,7 +2586,7 @@ AIScoring_FutureSight: ; 391f3
ret nc ret nc
ld a, [PlayerSubStatus3] ld a, [PlayerSubStatus3]
and 1<<SUBSTATUS_FLYING | 1<<SUBSTATUS_UNDERGROUND and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
ret z ret z
dec [hl] dec [hl]