• Be sure to join the discussion on our discord at: Discord.gg/serebii
  • If you're still waiting for the e-mail, be sure to check your junk/spam e-mail folders

Formula questions

Status
Not open for further replies.

ekkoper

Member
Hi!
I'm writing a PHP script for a pokemon game and I would like it to be as perfect as possible resambling the original games. That's why I'm continuously looking for formulae. Some things will be very simple, but then I just don't know how it is calculated, but sometimes there are advanced formulae needed.
I hope some of you can help me out with both of these questions.

Thanks!
Eduard


My first question is how is the order of attacking in battles determined concerning your pokemon VS an enemy. Is it just the SPEED stat which must be higher or is there a random (of specified) number involved?

My next question is about the strategy the enemy uses, where is it based on? Is it random or is it a (very) complicated formula?
 

Munchlax Master

Munchlax Ruler
the first one is speed, if they are the same its a 50% chance either one will go, and i dont know about the other one but i think it is random
 

Volteon

Back I guess??
As for the second question, I think that in wild (non important battles) the attacks are random, but in buildings (Gym leaders or Frontier) it´s all based in AI (Artificial Inteligence).
 

Slim

Crazy Trainer
huh, I thought I replied to this already...

Anyway, the attack priority is as follows:

5: Helping Hand
4: Magic Coat, Snatch
3: Protect, Detect, Endure, Follow Me
1: Quick Attack, Mach Punch, Extremespeed, Fake Out
0: All other attacks
-1: Vital Throw
-3: Focus Punch
-4: Revenge
-5: Counter, Mirror Coat
-6: Whirlwind, Roar

Attacks with higher priority will go first. If the attacks have the same priority, the faster pokemon goes first.
 
Status
Not open for further replies.
Top