diff options
author | yenatch <yenatch@gmail.com> | 2013-08-30 22:59:40 -0400 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2013-08-30 22:59:40 -0400 |
commit | c9d3881a2ffa4e3bdb5e5c12d98c20c0bba1e400 (patch) | |
tree | e1b80a12542896021ce624926b7fa2b00517bd92 /battle | |
parent | 70ecde3f78dc9885a04eb002f68681d03cc2d212 (diff) |
rename RNG to Random
also fix 'Far' naming scheme for BattleRandom
this was a long time coming
Diffstat (limited to 'battle')
-rw-r--r-- | battle/ai/scoring.asm | 76 | ||||
-rw-r--r-- | battle/effect_commands.asm | 98 |
2 files changed, 87 insertions, 87 deletions
diff --git a/battle/ai/scoring.asm b/battle/ai/scoring.asm index b48e04bc6..3ad219851 100644 --- a/battle/ai/scoring.asm +++ b/battle/ai/scoring.asm @@ -129,7 +129,7 @@ AIScoring_RedStatMods: ; 385e0 jr .checkmove .discourage - call RNG + call Random cp 30 jr c, .checkmove inc [hl] @@ -430,7 +430,7 @@ AIScoring_LeechHit: ; 387f7 ret .asm_38815 - call RNG + call Random cp $64 ret c @@ -575,7 +575,7 @@ AIScoring_Explosion: ; 388a6 call AICheckEnemyQuarterHP ret nc - call RNG + call Random cp 20 ret c @@ -588,7 +588,7 @@ AIScoring_Explosion: ; 388a6 AIScoring_DreamEater: ; 388ca - call RNG + call Random cp $19 ret c @@ -612,7 +612,7 @@ AIScoring_EvasionUp: ; 388d4 bit 0, a jr nz, .asm_388ef - call RNG + call Random cp $b2 jr nc, .asm_38911 @@ -628,7 +628,7 @@ AIScoring_EvasionUp: ; 388d4 jr nc, .asm_3890f - call RNG + call Random cp $a jr c, .asm_388ef @@ -683,7 +683,7 @@ AIScoring_EvasionUp: ; 388d4 ret .asm_38938 - call RNG + call Random cp $50 ret c dec [hl] @@ -744,7 +744,7 @@ AIScoring_MirrorMove: ; 3895b call AICompareSpeed ret nc - call RNG + call Random cp $19 ret c @@ -766,7 +766,7 @@ AIScoring_AccuracyDown: ; 38985 bit 0, a jr nz, .asm_3899d - call RNG + call Random cp $b2 jr nc, .asm_389bf @@ -782,7 +782,7 @@ AIScoring_AccuracyDown: ; 38985 jr nc, .asm_389bd - call RNG + call Random cp $a jr c, .asm_3899d @@ -837,7 +837,7 @@ AIScoring_AccuracyDown: ; 38985 ret .asm_389e6 - call RNG + call Random cp $50 ret c dec [hl] @@ -878,7 +878,7 @@ AIScoring_Haze: ; 389f5 .asm_38a12 pop hl - call RNG + call Random cp $28 ret c dec [hl] @@ -894,7 +894,7 @@ AIScoring_Haze: ; 389f5 AIScoring_Bide: ; 38a1e call AICheckEnemyMaxHP ret c - call RNG + call Random cp $19 ret c inc [hl] @@ -926,7 +926,7 @@ AIScoring_Moonlight: ; 38a3a ret .asm_38a45 - call RNG + call Random cp $19 ret c dec [hl] @@ -948,7 +948,7 @@ AIScoring_LightScreen: AIScoring_Reflect: ; 38a54 call AICheckEnemyMaxHP ret c - call RNG + call Random cp $14 ret c inc [hl] @@ -1041,7 +1041,7 @@ AIScoring_Unused2B: ; 38a9c ret c .asm_38acd - call RNG + call Random cp $c8 ret c @@ -1061,7 +1061,7 @@ AIScoring_Unused2B: ; 38a9c AIScoring_Confuse: ; 38adb call AICheckPlayerHalfHP ret c - call RNG + call Random cp $19 jr c, .asm_38ae7 inc [hl] @@ -1156,7 +1156,7 @@ AIScoring_SpeedDownHit: ; 38b40 ret nz call AICompareSpeed ret c - call RNG + call Random cp 30 ret c dec [hl] @@ -1183,7 +1183,7 @@ AIScoring_HyperBeam: ; 38b63 ret .asm_38b72 - call RNG + call Random cp 40 ret c inc [hl] @@ -1334,7 +1334,7 @@ AIScoring_Counter: ; 38bf1 .asm_38c30 - call RNG + call Random cp $64 jr c, .asm_38c38 @@ -1388,7 +1388,7 @@ AIScoring_Encore: ; 38c3b jr nc, .asm_38c81 .asm_38c78 - call RNG + call Random cp $46 ret c dec [hl] @@ -1527,7 +1527,7 @@ AIScoring_Spite: ; 38cd5 cp $f jr nc, .asm_38d0b - call RNG + call Random cp $64 ret nc @@ -1536,7 +1536,7 @@ AIScoring_Spite: ; 38cd5 ret .asm_38d0d - call RNG + call Random cp $64 ret c dec [hl] @@ -1700,7 +1700,7 @@ AIScoring_Conversion2: ; 38d98 ret .asm_38dc9 - call RNG + call Random cp $19 ret c @@ -1722,7 +1722,7 @@ AIScoring_Disable: ; 38dd1 pop hl jr nc, .asm_38dee - call RNG + call Random cp 100 ret c dec [hl] @@ -1734,7 +1734,7 @@ AIScoring_Disable: ; 38dd1 ret nz .asm_38df3 - call RNG + call Random cp 20 ret c inc [hl] @@ -1961,7 +1961,7 @@ AIScoring_Protect: ; 38ed2 inc [hl] .asm_38f14 - call RNG + call Random cp 20 ret c inc [hl] @@ -1985,14 +1985,14 @@ AIScoring_Foresight: ; 38f1d cp GHOST jr z, .asm_38f41 - call RNG + call Random cp 20 ret c inc [hl] ret .asm_38f41 - call RNG + call Random cp 100 ret c dec [hl] @@ -2169,7 +2169,7 @@ AIScoring_Rollout: ; 38fef cp 8 jr nc, .asm_39020 - call RNG + call Random cp 200 ret nc dec [hl] @@ -2196,7 +2196,7 @@ AIScoring_Attract: ; 39026 ret .asm_39032 - call RNG + call Random cp 200 ret nc dec [hl] @@ -2558,7 +2558,7 @@ AIScoring_MirrorCoat: ; 3918b .asm_391ca - call RNG + call Random cp 100 jr c, .asm_391d2 dec [hl] @@ -2634,7 +2634,7 @@ AIScoring_Solarbeam: ; 3920b cp WEATHER_RAIN ret nz - call RNG + call Random cp 25 ; 1/10 ret c @@ -2657,7 +2657,7 @@ AIScoring_Thunder: ; 39225 cp WEATHER_SUN ret nz - call RNG + call Random cp 25 ; 1/10 ret c @@ -3150,7 +3150,7 @@ AIScoring_Cautious: ; 39418 pop hl jr nc, .asm_39425 - call RNG + call Random cp 230 ret nc @@ -3274,7 +3274,7 @@ AIScoring_Risky: ; 394a9 call AICheckEnemyMaxHP jr c, .nextmove - call RNG + call Random cp 200 ; 1/5 jr c, .nextmove @@ -3347,14 +3347,14 @@ AIGetEnemyMove: ; 39508 Function_0x39521: ; 39521 - call RNG + call Random cp 50 ; 1/5 ret ; 39527 Function_0x39527: ; 39527 - call RNG + call Random cp $80 ; 1/2 ret ; 3952d diff --git a/battle/effect_commands.asm b/battle/effect_commands.asm index afe822a16..62c715d40 100644 --- a/battle/effect_commands.asm +++ b/battle/effect_commands.asm @@ -288,7 +288,7 @@ CheckPlayerTurn: call FarPlayBattleAnimation ; 50% chance of hitting itself - call FarBattleRNG + call BattleRandom cp $80 jr nc, .CheckAttract @@ -319,7 +319,7 @@ CheckPlayerTurn: call FarPlayBattleAnimation ; 50% chance of infatuation - call FarBattleRNG + call BattleRandom cp $80 jr c, .CheckDisabledMove @@ -353,7 +353,7 @@ CheckPlayerTurn: ret z ; 25% chance to be fully paralyzed - call FarBattleRNG + call BattleRandom cp $3f ret nc @@ -544,7 +544,7 @@ CheckEnemyTurn: ; 3421f call FarPlayBattleAnimation ; 50% chance of hitting itself - call FarBattleRNG + call BattleRandom cp $80 jr nc, .CheckAttract @@ -598,7 +598,7 @@ CheckEnemyTurn: ; 3421f call FarPlayBattleAnimation ; 50% chance of infatuation - call FarBattleRNG + call BattleRandom cp $80 jr c, .CheckDisabledMove @@ -633,7 +633,7 @@ CheckEnemyTurn: ; 3421f ret z ; 25% chance to be fully paralyzed - call FarBattleRNG + call BattleRandom cp $3f ret nc @@ -808,7 +808,7 @@ BattleCommand02: ; 343db ; Random number from 0 to obedience level + monster level .rand1 - call FarBattleRNG + call BattleRandom swap a cp b jr nc, .rand1 @@ -826,7 +826,7 @@ BattleCommand02: ; 343db ; Another random number from 0 to obedience level + monster level .rand2 - call FarBattleRNG + call BattleRandom cp b jr nc, .rand2 @@ -843,7 +843,7 @@ BattleCommand02: ; 343db ld b, a ; The chance of napping is the difference out of 256. - call FarBattleRNG + call BattleRandom swap a sub b jr c, .Nap @@ -862,7 +862,7 @@ BattleCommand02: ; 343db .Nap - call FarBattleRNG + call BattleRandom add a swap a and 7 @@ -876,7 +876,7 @@ BattleCommand02: ; 343db .DoNothing - call FarBattleRNG + call BattleRandom and 3 ; 'loafing around!' @@ -964,7 +964,7 @@ BattleCommand02: ; 343db .RandomMove - call FarBattleRNG + call BattleRandom and 3 cp b @@ -1324,7 +1324,7 @@ BattleCommand05: ; 34631 ld hl, .Chances ld b, 0 add hl, bc - call FarBattleRNG + call BattleRandom cp [hl] ret nc ld a, 1 @@ -2338,7 +2338,7 @@ BattleCommand08: ; 34cfd ; Multiply by 85-100%... .loop - call FarBattleRNG + call BattleRandom rrca cp $d9 ; 85% jr c, .loop @@ -2423,7 +2423,7 @@ BattleCommand09: ; 34d32 cp $ff jr z, .Hit - call FarBattleRNG + call BattleRandom cp b jr nc, .Miss @@ -2701,7 +2701,7 @@ BattleCommand90: ; 34ecc ld hl, EnemyMoveEffectChance .asm_34ee1 - call FarBattleRNG + call BattleRandom cp [hl] pop hl ret c @@ -2986,7 +2986,7 @@ BattleCommand0e: ; 3505e cp HELD_FOCUS_BAND ld b, $0 jr nz, .asm_3508b ; 3507a $f - call FarBattleRNG + call BattleRandom cp c jr nc, .asm_3508b ; 35080 $9 call BattleCommand4b @@ -4332,7 +4332,7 @@ BattleCommand3f: ; 35726 add b ld b, a .asm_3575d - call FarBattleRNG + call BattleRandom and a jr z, .asm_3575d ; 35761 $fa cp b @@ -4555,7 +4555,7 @@ BattleCommand41: ; 35864 bit 4, [hl] jp nz, Function0x35923 set 4, [hl] - call FarBattleRNG + call BattleRandom and $3 inc a inc a @@ -4782,7 +4782,7 @@ BattleCommand44: ; 359e6 call SwitchTurn .asm_35a13 - call FarBattleRNG + call BattleRandom and $1f cp $a jr c, .asm_35a24 ; 35a1a $8 @@ -5005,7 +5005,7 @@ BattleCommand48: ; 35b33 dec hl .asm_35b62 push hl - call FarBattleRNG + call BattleRandom and $3 ld c, a ld b, $0 @@ -5173,7 +5173,7 @@ BattleCommand4a: ; 35c0f jr z, .asm_35c91 ; 35c46 $49 push bc call GetMoveName - call FarBattleRNG + call BattleRandom and $3 inc a inc a @@ -5576,7 +5576,7 @@ BattleCommand14: ; 35e5c ld b, $3 .asm_35ea4 - call FarBattleRNG + call BattleRandom and b jr z, .asm_35ea4 cp 7 @@ -5625,7 +5625,7 @@ Function0x35ece: ; 35ece bit 5, a jr nz, .asm_35eec - call FarBattleRNG + call BattleRandom cp $40 ret c @@ -5715,7 +5715,7 @@ BattleCommand2f: ; 35f2c ld a, [PlayerSubStatus5] bit 5, a jr nz, .asm_35f89 ; 35f80 $7 - call FarBattleRNG + call BattleRandom cp $40 jr c, .asm_35fb8 ; 35f87 $2f .asm_35f89 @@ -6375,7 +6375,7 @@ BattleCommand1d: ; 362e3 cp EFFECT_ACCURACY_DOWN_HIT jr z, .DidntMiss - call FarBattleRNG + call BattleRandom cp $40 jr c, .Failed @@ -6789,7 +6789,7 @@ BattleCommandac: ; 3658f ; 1/3 chance of each status .loop - call FarBattleRNG + call BattleRandom swap a and 3 jr z, .loop @@ -7043,7 +7043,7 @@ BattleCommand22: ; 366e5 ld [de], a ld [PlayerMoveEffect], a ld [EnemyMoveEffect], a - call FarBattleRNG + call BattleRandom and $1 inc a inc a @@ -7080,7 +7080,7 @@ BattleCommand3e: ; 3671a pop af jr nz, .asm_3674c ; 3673f $b set 7, [hl] - call FarBattleRNG + call BattleRandom and $1 inc a inc a @@ -7110,7 +7110,7 @@ BattleCommand3d: ; 36751 ld a, BATTLE_VARS_SUBSTATUS3 call GetBattleVarPair set 1, [hl] - call FarBattleRNG + call BattleRandom and $1 inc a ld [de], a @@ -7152,7 +7152,7 @@ BattleCommanda0: ; 36778 ld c, a inc c .asm_367ac - call FarBattleRNG + call BattleRandom cp c jr nc, .asm_367ac ; 367b0 $fa srl b @@ -7177,7 +7177,7 @@ BattleCommanda0: ; 36778 ld c, a inc c .asm_367d2 - call FarBattleRNG + call BattleRandom cp c jr nc, .asm_367d2 ; 367d6 $fa srl b @@ -7242,7 +7242,7 @@ BattleCommand23: ; 3680f ld c, a inc c .asm_36845 - call FarBattleRNG + call BattleRandom cp c jr nc, .asm_36845 ; 36849 $fa srl b @@ -7282,7 +7282,7 @@ BattleCommand23: ; 3680f ld a, [CurOTMon] ld c, a .asm_3689a - call FarBattleRNG + call BattleRandom and $7 cp b jr nc, .asm_3689a ; 368a0 $f8 @@ -7332,7 +7332,7 @@ BattleCommand23: ; 3680f ld c, a inc c .asm_368e6 - call FarBattleRNG + call BattleRandom cp c jr nc, .asm_368e6 @@ -7378,7 +7378,7 @@ BattleCommand23: ; 3680f ld a, [CurBattleMon] ld c, a .asm_3693a - call FarBattleRNG + call BattleRandom and $7 cp b jr nc, .asm_3693a @@ -7496,7 +7496,7 @@ BattleCommand24: ; 369b6 cp EFFECT_TRIPLE_KICK jr nz, .asm_36a2b .asm_369ec - call FarBattleRNG + call BattleRandom and $3 jr z, .asm_369ec dec a @@ -7530,11 +7530,11 @@ BattleCommand24: ; 369b6 call BattleCommanda8 jp EndMoveEffect .asm_36a2b - call FarBattleRNG + call BattleRandom and $3 cp $2 jr c, .asm_36a39 ; 36a32 $5 - call FarBattleRNG + call BattleRandom and $3 .asm_36a39 inc a @@ -7670,7 +7670,7 @@ BattleCommand4d: ; 36ac9 ld d, h ld e, l call GetUserItem - call FarBattleRNG + call BattleRandom cp c ret nc call EndRechargeOpp @@ -7917,7 +7917,7 @@ BattleCommand3b: ; 36c2d call CleanGetBattleVarPair bit 4, a ret nz - call FarBattleRNG + call BattleRandom and 3 inc a inc a @@ -8116,7 +8116,7 @@ Function0x36d70: ; 36d70 .asm_36d7b set 7, [hl] - call FarBattleRNG + call BattleRandom and 3 inc a inc a @@ -8196,7 +8196,7 @@ BattleCommand30: ; 36dc7 ld a, [PlayerSubStatus5] bit 5, a jr nz, .asm_36e0e ; 36e05 $7 - call FarBattleRNG + call BattleRandom cp $40 jr c, .asm_36e52 ; 36e0c $44 .asm_36e0e @@ -8558,7 +8558,7 @@ BattleCommand37: ; 36fed and a jr z, .asm_37059 ; 3702c $2b .asm_3702e - call FarBattleRNG + call BattleRandom and $7 jr z, .asm_3702e ; 37033 $f9 inc a @@ -8677,7 +8677,7 @@ BattleCommand1f: ; 3707f call Function0x37e77 jp PrintButItFailed .asm_370d9 - call FarBattleRNG + call BattleRandom and $3 ld c, a ld b, $0 @@ -9235,7 +9235,7 @@ BattleCommand34: ; 37418 call Function0x37e36 .GetMove - call FarBattleRNG + call BattleRandom ; No invalid moves. cp BEAT_UP + 1 @@ -9596,7 +9596,7 @@ Function0x3762c: ; 3762c jr .asm_37665 .asm_37656 - call FarBattleRNG + call BattleRandom and a jr z, .asm_37656 @@ -10029,7 +10029,7 @@ BattleCommand61: ; 37874 and a jp nz, Function0x37e77 push bc - call FarBattleRNG + call BattleRandom ld b, a ld hl, .table_37907 ld c, 0 @@ -10186,7 +10186,7 @@ BattleCommand66: ; 37991 ; getmagnitude push bc - call FarBattleRNG + call BattleRandom ld b, a ld hl, .Magnitudes .asm_37999 |