Consistent "X percent [+/- Y]" order

This commit is contained in:
Rangi 2018-02-04 21:21:34 -05:00
parent d6b00d0cc1
commit bc3cc69749
4 changed files with 26 additions and 26 deletions

View File

@ -52,7 +52,7 @@ SwitchOften: ; 38045
cp $10
jr nz, .not_10
call Random
cp 1 + 50 percent
cp 50 percent + 1
jr c, .switch
jp DontSwitch
.not_10
@ -60,7 +60,7 @@ SwitchOften: ; 38045
cp $20
jr nz, .not_20
call Random
cp -1 + 79 percent
cp 79 percent - 1
jr c, .switch
jp DontSwitch
.not_20
@ -103,7 +103,7 @@ SwitchRarely: ; 38083
; $30
call Random
cp -1 + 79 percent
cp 79 percent - 1
jp c, DontSwitch
.switch
@ -123,7 +123,7 @@ SwitchSometimes: ; 380c1
cp $10
jr nz, .not_10
call Random
cp -1 + 20 percent
cp 20 percent - 1
jr c, .switch
jp DontSwitch
.not_10
@ -131,14 +131,14 @@ SwitchSometimes: ; 380c1
cp $20
jr nz, .not_20
call Random
cp 1 + 50 percent
cp 50 percent + 1
jr c, .switch
jp DontSwitch
.not_20
; $30
call Random
cp -1 + 20 percent
cp 20 percent - 1
jp c, DontSwitch
.switch
@ -313,7 +313,7 @@ AI_Items: ; 39196
bit ALWAYS_USE_F, a
jp nz, .Use
call Random
cp -1 + 20 percent
cp 20 percent - 1
jp c, .Use
jp .DontUse
@ -325,7 +325,7 @@ AI_Items: ; 39196
cp 4
jr c, .FailToxicCheck
call Random
cp 1 + 50 percent
cp 50 percent + 1
jp c, .Use
.FailToxicCheck:
ld a, [wEnemyMonStatus]
@ -366,7 +366,7 @@ AI_Items: ; 39196
callfar AICheckEnemyQuarterHP
jp nc, .UseHealItem
call Random
cp 1 + 50 percent
cp 50 percent + 1
jp c, .UseHealItem
jp .DontUse
@ -374,7 +374,7 @@ AI_Items: ; 39196
callfar AICheckEnemyQuarterHP
jp c, .DontUse
call Random
cp -1 + 20 percent
cp 20 percent - 1
jp c, .DontUse
jr .UseHealItem
@ -384,7 +384,7 @@ AI_Items: ; 39196
callfar AICheckEnemyQuarterHP
jp nc, .UseHealItem
call Random
cp -1 + 20 percent
cp 20 percent - 1
jp nc, .DontUse
.UseHealItem: ; 38281 (e:4281)
@ -442,7 +442,7 @@ AI_Items: ; 39196
bit UNKNOWN_USE_F, a
jp z, .Use
call Random
cp 1 + 50 percent
cp 50 percent + 1
jp c, .Use
.dont_use
@ -454,7 +454,7 @@ AI_Items: ; 39196
bit UNKNOWN_USE_F, a
jp z, .DontUse
call Random
cp 1 + 39 percent
cp 39 percent + 1
jp c, .Use
jp .DontUse
; 382f9
@ -516,13 +516,13 @@ AI_Items: ; 39196
bit ALWAYS_USE_F, a
jp nz, .Use
call Random
cp 1 + 50 percent
cp 50 percent + 1
jp c, .DontUse
ld a, [bc]
bit CONTEXT_USE_F, a
jp nz, .Use
call Random
cp 1 + 50 percent
cp 50 percent + 1
jp c, .DontUse
jp .Use
.notfirstturnout
@ -530,7 +530,7 @@ AI_Items: ; 39196
bit ALWAYS_USE_F, a
jp z, .DontUse
call Random
cp -1 + 20 percent
cp 20 percent - 1
jp nc, .DontUse
jp .Use

View File

@ -463,13 +463,13 @@ DetermineMoveOrder: ; 3c314
jr z, .player_2
call BattleRandom
cp 1 + (50 percent)
cp 50 percent + 1
jp c, .player_first
jp .enemy_first
.player_2
call BattleRandom
cp 1 + (50 percent)
cp 50 percent + 1
jp c, .enemy_first
jp .player_first
@ -549,13 +549,13 @@ DetermineMoveOrder: ; 3c314
cp USING_INTERNAL_CLOCK
jr z, .player_2c
call BattleRandom
cp 1 + (50 percent)
cp 50 percent + 1
jp c, .player_first
jp .enemy_first
.player_2c
call BattleRandom
cp 1 + (50 percent)
cp 50 percent + 1
jp c, .enemy_first
.player_first
scf
@ -791,7 +791,7 @@ TryEnemyFlee: ; 3c543
call BattleRandom
ld b, a
cp 1 + (50 percent)
cp 50 percent + 1
jr nc, .Stay
push bc
@ -803,7 +803,7 @@ TryEnemyFlee: ; 3c543
jr c, .Flee
ld a, b
cp 1 + (10 percent)
cp 10 percent + 1
jr nc, .Stay
ld a, [wTempEnemyMonSpecies]
@ -6177,7 +6177,7 @@ LoadEnemyMon: ; 3e8eb
; 25% chance of getting an item
call BattleRandom
cp 1 + (75 percent)
cp 75 percent + 1
ld a, NO_ITEM
jr c, .UpdateItem

View File

@ -532,7 +532,7 @@ CheckEnemyTurn: ; 3421f
; 50% chance of hitting itself
call BattleRandom
cp 1 + 50 percent
cp 50 percent + 1
jr nc, .not_confused
; clear confusion-dependent substatus
@ -578,7 +578,7 @@ CheckEnemyTurn: ; 3421f
; 50% chance of infatuation
call BattleRandom
cp 1 + 50 percent
cp 50 percent + 1
jr c, .not_infatuated
ld hl, InfatuationText

View File

@ -665,7 +665,7 @@ DayCare_InitBreeding: ; 16a3b
cp NIDORAN_F
jr nz, .GotEggSpecies
call Random
cp 1 + 50 percent
cp 50 percent + 1
ld a, NIDORAN_F
jr c, .GotEggSpecies
ld a, NIDORAN_M