This is topic Ruby/Sapphire formulas? in forum Research Lab at The Azure Heights Forum.

To visit this topic, use this URL:
https://www.math.miami.edu/~jam/azure/forum/buzz/ultimatebb.cgi?ubb=get_topic;f=1;t=001403

Posted by DeathChill (Member # 3538) on 02-07-2004, 03:03 PM:

Yes, I know there's tons but I was wondering if anyone would be able to compile a list in this thread of the following (if it's not too much trouble ^_^):
Battle formula
TrainerBattle/Money formula
The six experience tables
Chance of unfreezing/waking up/etc
IV Calculation (at the beginning, it's random for each stat I believe but what's the highest number? 31?)

And any other formulas from Ruby/Sapphire would also be quite nice (Except the formula for special attacks as I'm just going to use pokefor.tk for that information). This information is not for a site or anything, for a project ^_^;;

Posted by Thomaz (Member # 3330) on 02-07-2004, 07:03 PM:

The damage formula:

((2L / 5 + 2) * B * A / 50 / D + 2) * T * M * R / 255; rounded down

L = Level of attacker
B = Base Damage
A = Corresponding Attack stat
D = Corresponding Defense stat
T = STAB (1 or 1.5 or 1.1* or 1.65**)
M = Type Modifier (4, 2, 1, 0.5, 0.25 or 0)
R = Random variable between 217 and 255 (for average damage, R = 236)

* benificial boosting item
** benificial boosting item + STAB
_________________________________________________

Growth formulas:
Fast - 0.8N^3
Med-Fast - N^3
Med-Slow - 1.2N^3-15N^2+100N-140
Slow - 1.25N^3

N = Level

Erratic* (600,000 exp. to reach Lv.100)
-------------------------------------

Fast (800,000 exp. to reach Lv.100)
----------------------------------
Azurill, Marill, Azumarill, Skitty, Delcatty, Mawile, Spoink, Grumpig, Spinda, Lunatone, Solrock, Igglybuff, Jigglypuff, Wigglytuff, Shuppet, Banette, Duskull, Dusclops, Chimecho, Corsola, Luvdisc

Med-Fast (1,000,000 exp. to reach Lv.100)
---------------------------------------
Poochyena, Mightyena, Jigzagoon, Linoone, Wurmple, Silcoon, Beautifly, Cascoon, Dustox, Wingull, Pelipper, Surskit, Masquerain, Goldeen, Seaking, Nosepass, Zubat, Golbat, Crobat, Meditite, Medicham, Plusle, Mainan, Magnemite, Magneton, Voltorb, Electrode, Doduo, Dodrio, Numel, Camerupt, Slugma, Magcargo, Torkoal, Grimer, Muk, Koffing, Weezing, Sandshrew, Sandslash, Barboach, Whiscash, Baltoy, Claydol, Castform, Vulpix, Ninetales, Pichu, Pikachu, Raichu, Psyduck, Golduck, Wynaut, Wobbuffet, Natu, Xatu, Girafarig, Phanpy, Donphan, Snorunt, Glalie, Horsea, Seadra, Kingdra

Med-Slow (1,059,860 exp. to reach Lv.100)
---------------------------------------
Treecko, Grovyle, Sceptile, Torchic, Combusken, Blaziken, Mudkip, Marshtomp, Swampert, Lotad, Lombre, Ludicolo, Seedot, Nuzleaf, Shiftry, Taillow, Swellow, Abra, Kadabra, Alakazam, Whismur, Loudred, Exploud, Geodude, Graveler, Golem, Sableye, Machop, Machoke, Machamp, Oddish, Gloom, Vileplume, Bellossom, Roselia, Trapinch, Vibrava, Flygon, Cacnea, Cacturne, Kecleon, Absol, Spheal, Sealeo, Walrein

Slow (1,250,000 exp. to reach Lv.100)
-----------------------------------
Ralts, Kirlia, Gardevoir, Slakoth, Vigoroth, Slaking, Magikarp, Gyarados, Tentacool, Tentacruel, Aron, Lairon, Aggron, Electrike, Manectric, Carvanha, Sharpedo, Skarmory, Staryu, Starmie, Tropius, Pinsir, Heracross, Rhyhorn, Rhydon, Relicanth, Chinchou, Lanturn, Bagon, Shelgon, Salamence, Beldum, Metang, Metagross, Regirock, Regice, Registeel, Latias, Latios, Kyogre, Groudon, Rayquaza, Jirachi, Deoxys

Fluctuating* (1,640,000 exp. to reach Lv.100)
------------------------------------------
Shroomish, Breloom, Makuhita, Hariyama, Illumise, Gulpin, Swalot, Wailmer, Wailord, Seviper, Corphish, Crawdaunt

* these formulas are currently unknown.
_________________________________________________

Poison does 1/16 from your max HP as damage, Burn does 1/8. Badly Poisoned gets stronger every turn. Increasing with one (1/16 -> 2/16 -> 3/16 etc).
_________________________________________________

Minimum IV is 0 and maximum is 31.
_________________________________________________

Oh, I don't know the other formulas. Btw, I got the first two formulas from sites, I was too lazy to type it myself. ^^

[ 02-07-2004, 07:06 PM: Message edited by: Thomaz ]

Posted by DeathChill (Member # 3538) on 02-08-2004, 01:30 PM:

Ah, thank you, but isn't the battle formula from Ruby/Sapphire *slightly* modified from that one? As well, I know there's six experience tables, I used to have them (so there were no formulas involved) but I appear to have lost them

Posted by Fluorine (Member # 2904) on 02-08-2004, 01:58 PM:

Battle formula

int a
a = 2 * Level;
if(criticalhit) a *= 2; (a CH takes effect in this spot in the equation)
a /= 5;
a += 2;
a *= Power * Attack;
a /= Defense;
a /= 50;
a += 2;
a *= Mod;
a *= (rand()%39 + 217);

Mod = Stab, Type chart, Thick fat, Hustle, Flash fire, items that give a 10% boost to the type, Overgrow/etc. all multiplied together.

Note that the flooring is done at each step.

TrainerBattle/Money formula
The six experience tables

No idea.

Normal poison is 12.5% or 1/8 of your health.

Toxic starts at 1/16 and deals 1/16 additionnal damage each turn. The counter is reset once the pokemon is switched out, but if it is switched back in the damage will still increase (from 1/16th on).

Chance of unfreezing/waking up/etc

Unfreezing is 10% IIRC. For sleep, it is determined at the moment a pokemon is put to sleep. A pokemon can sleep from 1 to 7 turns. Early bird cuts the sleeping time in half.

Internally, an asleep pokemon has a status ranging from 1 to 7, and it is decremented of one each turn, until it reaches 0. Early bird probably decrements it of two.

IV Calculation (at the beginning, it's random for each stat I believe but what's the highest number? 31?)

There is a random IV for each of the six stats, ranging from 0 to 31.

For effort values, the maximal amount of effort points that can be gathered for one statistic is 255. The maximal amount for all stats is 510.

[ 02-08-2004, 02:05 PM: Message edited by: Fluorine ]

Posted by White Cat (Member # 42) on 02-08-2004, 05:45 PM:

Normal poison is 12.5% or 1/8 of your health.

Er, no. Thomaz has it right; in GSC it's 1/8, but in RBY and RS it's 1/16.

Posted by Fluorine (Member # 2904) on 02-09-2004, 08:45 AM:

quote:
Originally posted by White Cat:
Normal poison is 12.5% or 1/8 of your health.

Er, no. Thomaz has it right; in GSC it's 1/8, but in RBY and RS it's 1/16.

Zigzagoon used poisonpowder, torchic was poisoned, health fell from 27/35 to 23/35. 35/8 = 4.375, 35/16 = 2.15375.

It's 1/8.

Karpe Diem