mirror of https://github.com/pret/pokecrystal.git
Consistent "X percent [+/- Y]" order
This commit is contained in:
parent
d6b00d0cc1
commit
bc3cc69749
|
@ -52,7 +52,7 @@ SwitchOften: ; 38045
|
||||||
cp $10
|
cp $10
|
||||||
jr nz, .not_10
|
jr nz, .not_10
|
||||||
call Random
|
call Random
|
||||||
cp 1 + 50 percent
|
cp 50 percent + 1
|
||||||
jr c, .switch
|
jr c, .switch
|
||||||
jp DontSwitch
|
jp DontSwitch
|
||||||
.not_10
|
.not_10
|
||||||
|
@ -60,7 +60,7 @@ SwitchOften: ; 38045
|
||||||
cp $20
|
cp $20
|
||||||
jr nz, .not_20
|
jr nz, .not_20
|
||||||
call Random
|
call Random
|
||||||
cp -1 + 79 percent
|
cp 79 percent - 1
|
||||||
jr c, .switch
|
jr c, .switch
|
||||||
jp DontSwitch
|
jp DontSwitch
|
||||||
.not_20
|
.not_20
|
||||||
|
@ -103,7 +103,7 @@ SwitchRarely: ; 38083
|
||||||
|
|
||||||
; $30
|
; $30
|
||||||
call Random
|
call Random
|
||||||
cp -1 + 79 percent
|
cp 79 percent - 1
|
||||||
jp c, DontSwitch
|
jp c, DontSwitch
|
||||||
|
|
||||||
.switch
|
.switch
|
||||||
|
@ -123,7 +123,7 @@ SwitchSometimes: ; 380c1
|
||||||
cp $10
|
cp $10
|
||||||
jr nz, .not_10
|
jr nz, .not_10
|
||||||
call Random
|
call Random
|
||||||
cp -1 + 20 percent
|
cp 20 percent - 1
|
||||||
jr c, .switch
|
jr c, .switch
|
||||||
jp DontSwitch
|
jp DontSwitch
|
||||||
.not_10
|
.not_10
|
||||||
|
@ -131,14 +131,14 @@ SwitchSometimes: ; 380c1
|
||||||
cp $20
|
cp $20
|
||||||
jr nz, .not_20
|
jr nz, .not_20
|
||||||
call Random
|
call Random
|
||||||
cp 1 + 50 percent
|
cp 50 percent + 1
|
||||||
jr c, .switch
|
jr c, .switch
|
||||||
jp DontSwitch
|
jp DontSwitch
|
||||||
.not_20
|
.not_20
|
||||||
|
|
||||||
; $30
|
; $30
|
||||||
call Random
|
call Random
|
||||||
cp -1 + 20 percent
|
cp 20 percent - 1
|
||||||
jp c, DontSwitch
|
jp c, DontSwitch
|
||||||
|
|
||||||
.switch
|
.switch
|
||||||
|
@ -313,7 +313,7 @@ AI_Items: ; 39196
|
||||||
bit ALWAYS_USE_F, a
|
bit ALWAYS_USE_F, a
|
||||||
jp nz, .Use
|
jp nz, .Use
|
||||||
call Random
|
call Random
|
||||||
cp -1 + 20 percent
|
cp 20 percent - 1
|
||||||
jp c, .Use
|
jp c, .Use
|
||||||
jp .DontUse
|
jp .DontUse
|
||||||
|
|
||||||
|
@ -325,7 +325,7 @@ AI_Items: ; 39196
|
||||||
cp 4
|
cp 4
|
||||||
jr c, .FailToxicCheck
|
jr c, .FailToxicCheck
|
||||||
call Random
|
call Random
|
||||||
cp 1 + 50 percent
|
cp 50 percent + 1
|
||||||
jp c, .Use
|
jp c, .Use
|
||||||
.FailToxicCheck:
|
.FailToxicCheck:
|
||||||
ld a, [wEnemyMonStatus]
|
ld a, [wEnemyMonStatus]
|
||||||
|
@ -366,7 +366,7 @@ AI_Items: ; 39196
|
||||||
callfar AICheckEnemyQuarterHP
|
callfar AICheckEnemyQuarterHP
|
||||||
jp nc, .UseHealItem
|
jp nc, .UseHealItem
|
||||||
call Random
|
call Random
|
||||||
cp 1 + 50 percent
|
cp 50 percent + 1
|
||||||
jp c, .UseHealItem
|
jp c, .UseHealItem
|
||||||
jp .DontUse
|
jp .DontUse
|
||||||
|
|
||||||
|
@ -374,7 +374,7 @@ AI_Items: ; 39196
|
||||||
callfar AICheckEnemyQuarterHP
|
callfar AICheckEnemyQuarterHP
|
||||||
jp c, .DontUse
|
jp c, .DontUse
|
||||||
call Random
|
call Random
|
||||||
cp -1 + 20 percent
|
cp 20 percent - 1
|
||||||
jp c, .DontUse
|
jp c, .DontUse
|
||||||
jr .UseHealItem
|
jr .UseHealItem
|
||||||
|
|
||||||
|
@ -384,7 +384,7 @@ AI_Items: ; 39196
|
||||||
callfar AICheckEnemyQuarterHP
|
callfar AICheckEnemyQuarterHP
|
||||||
jp nc, .UseHealItem
|
jp nc, .UseHealItem
|
||||||
call Random
|
call Random
|
||||||
cp -1 + 20 percent
|
cp 20 percent - 1
|
||||||
jp nc, .DontUse
|
jp nc, .DontUse
|
||||||
|
|
||||||
.UseHealItem: ; 38281 (e:4281)
|
.UseHealItem: ; 38281 (e:4281)
|
||||||
|
@ -442,7 +442,7 @@ AI_Items: ; 39196
|
||||||
bit UNKNOWN_USE_F, a
|
bit UNKNOWN_USE_F, a
|
||||||
jp z, .Use
|
jp z, .Use
|
||||||
call Random
|
call Random
|
||||||
cp 1 + 50 percent
|
cp 50 percent + 1
|
||||||
jp c, .Use
|
jp c, .Use
|
||||||
|
|
||||||
.dont_use
|
.dont_use
|
||||||
|
@ -454,7 +454,7 @@ AI_Items: ; 39196
|
||||||
bit UNKNOWN_USE_F, a
|
bit UNKNOWN_USE_F, a
|
||||||
jp z, .DontUse
|
jp z, .DontUse
|
||||||
call Random
|
call Random
|
||||||
cp 1 + 39 percent
|
cp 39 percent + 1
|
||||||
jp c, .Use
|
jp c, .Use
|
||||||
jp .DontUse
|
jp .DontUse
|
||||||
; 382f9
|
; 382f9
|
||||||
|
@ -516,13 +516,13 @@ AI_Items: ; 39196
|
||||||
bit ALWAYS_USE_F, a
|
bit ALWAYS_USE_F, a
|
||||||
jp nz, .Use
|
jp nz, .Use
|
||||||
call Random
|
call Random
|
||||||
cp 1 + 50 percent
|
cp 50 percent + 1
|
||||||
jp c, .DontUse
|
jp c, .DontUse
|
||||||
ld a, [bc]
|
ld a, [bc]
|
||||||
bit CONTEXT_USE_F, a
|
bit CONTEXT_USE_F, a
|
||||||
jp nz, .Use
|
jp nz, .Use
|
||||||
call Random
|
call Random
|
||||||
cp 1 + 50 percent
|
cp 50 percent + 1
|
||||||
jp c, .DontUse
|
jp c, .DontUse
|
||||||
jp .Use
|
jp .Use
|
||||||
.notfirstturnout
|
.notfirstturnout
|
||||||
|
@ -530,7 +530,7 @@ AI_Items: ; 39196
|
||||||
bit ALWAYS_USE_F, a
|
bit ALWAYS_USE_F, a
|
||||||
jp z, .DontUse
|
jp z, .DontUse
|
||||||
call Random
|
call Random
|
||||||
cp -1 + 20 percent
|
cp 20 percent - 1
|
||||||
jp nc, .DontUse
|
jp nc, .DontUse
|
||||||
jp .Use
|
jp .Use
|
||||||
|
|
||||||
|
|
|
@ -463,13 +463,13 @@ DetermineMoveOrder: ; 3c314
|
||||||
jr z, .player_2
|
jr z, .player_2
|
||||||
|
|
||||||
call BattleRandom
|
call BattleRandom
|
||||||
cp 1 + (50 percent)
|
cp 50 percent + 1
|
||||||
jp c, .player_first
|
jp c, .player_first
|
||||||
jp .enemy_first
|
jp .enemy_first
|
||||||
|
|
||||||
.player_2
|
.player_2
|
||||||
call BattleRandom
|
call BattleRandom
|
||||||
cp 1 + (50 percent)
|
cp 50 percent + 1
|
||||||
jp c, .enemy_first
|
jp c, .enemy_first
|
||||||
jp .player_first
|
jp .player_first
|
||||||
|
|
||||||
|
@ -549,13 +549,13 @@ DetermineMoveOrder: ; 3c314
|
||||||
cp USING_INTERNAL_CLOCK
|
cp USING_INTERNAL_CLOCK
|
||||||
jr z, .player_2c
|
jr z, .player_2c
|
||||||
call BattleRandom
|
call BattleRandom
|
||||||
cp 1 + (50 percent)
|
cp 50 percent + 1
|
||||||
jp c, .player_first
|
jp c, .player_first
|
||||||
jp .enemy_first
|
jp .enemy_first
|
||||||
|
|
||||||
.player_2c
|
.player_2c
|
||||||
call BattleRandom
|
call BattleRandom
|
||||||
cp 1 + (50 percent)
|
cp 50 percent + 1
|
||||||
jp c, .enemy_first
|
jp c, .enemy_first
|
||||||
.player_first
|
.player_first
|
||||||
scf
|
scf
|
||||||
|
@ -791,7 +791,7 @@ TryEnemyFlee: ; 3c543
|
||||||
|
|
||||||
call BattleRandom
|
call BattleRandom
|
||||||
ld b, a
|
ld b, a
|
||||||
cp 1 + (50 percent)
|
cp 50 percent + 1
|
||||||
jr nc, .Stay
|
jr nc, .Stay
|
||||||
|
|
||||||
push bc
|
push bc
|
||||||
|
@ -803,7 +803,7 @@ TryEnemyFlee: ; 3c543
|
||||||
jr c, .Flee
|
jr c, .Flee
|
||||||
|
|
||||||
ld a, b
|
ld a, b
|
||||||
cp 1 + (10 percent)
|
cp 10 percent + 1
|
||||||
jr nc, .Stay
|
jr nc, .Stay
|
||||||
|
|
||||||
ld a, [wTempEnemyMonSpecies]
|
ld a, [wTempEnemyMonSpecies]
|
||||||
|
@ -6177,7 +6177,7 @@ LoadEnemyMon: ; 3e8eb
|
||||||
|
|
||||||
; 25% chance of getting an item
|
; 25% chance of getting an item
|
||||||
call BattleRandom
|
call BattleRandom
|
||||||
cp 1 + (75 percent)
|
cp 75 percent + 1
|
||||||
ld a, NO_ITEM
|
ld a, NO_ITEM
|
||||||
jr c, .UpdateItem
|
jr c, .UpdateItem
|
||||||
|
|
||||||
|
|
|
@ -532,7 +532,7 @@ CheckEnemyTurn: ; 3421f
|
||||||
|
|
||||||
; 50% chance of hitting itself
|
; 50% chance of hitting itself
|
||||||
call BattleRandom
|
call BattleRandom
|
||||||
cp 1 + 50 percent
|
cp 50 percent + 1
|
||||||
jr nc, .not_confused
|
jr nc, .not_confused
|
||||||
|
|
||||||
; clear confusion-dependent substatus
|
; clear confusion-dependent substatus
|
||||||
|
@ -578,7 +578,7 @@ CheckEnemyTurn: ; 3421f
|
||||||
|
|
||||||
; 50% chance of infatuation
|
; 50% chance of infatuation
|
||||||
call BattleRandom
|
call BattleRandom
|
||||||
cp 1 + 50 percent
|
cp 50 percent + 1
|
||||||
jr c, .not_infatuated
|
jr c, .not_infatuated
|
||||||
|
|
||||||
ld hl, InfatuationText
|
ld hl, InfatuationText
|
||||||
|
|
|
@ -665,7 +665,7 @@ DayCare_InitBreeding: ; 16a3b
|
||||||
cp NIDORAN_F
|
cp NIDORAN_F
|
||||||
jr nz, .GotEggSpecies
|
jr nz, .GotEggSpecies
|
||||||
call Random
|
call Random
|
||||||
cp 1 + 50 percent
|
cp 50 percent + 1
|
||||||
ld a, NIDORAN_F
|
ld a, NIDORAN_F
|
||||||
jr c, .GotEggSpecies
|
jr c, .GotEggSpecies
|
||||||
ld a, NIDORAN_M
|
ld a, NIDORAN_M
|
||||||
|
|
Loading…
Reference in New Issue