You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
More splitting of main.asm; remove unneeded rept 2
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
@@ -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,9 +1510,8 @@ AI_Smart_Encore: ; 38c3b
|
||||
call Random
|
||||
cp $46
|
||||
ret c
|
||||
rept 2
|
||||
dec [hl]
|
||||
endr
|
||||
dec [hl]
|
||||
ret
|
||||
|
||||
.asm_38c81
|
||||
@@ -1685,9 +1666,8 @@ AI_Smart_Spite: ; 38cd5
|
||||
call Random
|
||||
cp $64
|
||||
ret c
|
||||
rept 2
|
||||
dec [hl]
|
||||
endr
|
||||
dec [hl]
|
||||
ret
|
||||
; 38d16
|
||||
|
||||
@@ -1755,9 +1735,8 @@ endr
|
||||
ret z
|
||||
call AI_50_50
|
||||
ret c
|
||||
rept 2
|
||||
dec [hl]
|
||||
endr
|
||||
dec [hl]
|
||||
ret
|
||||
|
||||
.no_status
|
||||
@@ -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
|
||||
|
||||
@@ -2272,9 +2246,8 @@ endr
|
||||
call AI_50_50
|
||||
ret c
|
||||
|
||||
rept 2
|
||||
dec [hl]
|
||||
endr
|
||||
dec [hl]
|
||||
ret
|
||||
|
||||
.asm_38fd8
|
||||
@@ -2296,9 +2269,8 @@ AI_Smart_FuryCutter: ; 38fdb
|
||||
|
||||
cp 2
|
||||
jr c, .end
|
||||
rept 2
|
||||
dec [hl]
|
||||
endr
|
||||
dec [hl]
|
||||
|
||||
cp 3
|
||||
jr c, .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
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user