• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Random occurences in battles

401
Posts
19
Years
  • Age 29
  • Seen Dec 4, 2016
Hey everyone, quick question regarding the battle system in Essentials (and in Pokemon in general I guess). I'm wondering which procedures are entirely or partly random and/or rely on probability calculations. I am aware of critical hits, and move effects like confusion, paralysis, burn etc etc but I was wondering if there are any others. It's been a while since I've messed with Essentials or even played Pokemon so it would be a big help. Cheers.
 

FL

Pokémon Island Creator
2,444
Posts
13
Years
  • Seen Apr 22, 2024
Generally uses this method:

Code:
def pbRandom(x)
  return rand(x)
end

rand ranges from 0...x

Critical hit are done using 'pbIsCritical?' method. Some effects durations like confusion are setted when the pokémon become confused.
 
Back
Top