damage count
Nintenerd7 (0)

I've made a snippet of a Pokemon wild encounter. is there any way to make a random switch re-roll the chances of damage? i'm trying to make a Hp count of both wild and party Pokemon.

You are viewing a single comment. View All
ash15khng (471)

@Nintenerd7 Could you post a link to the repl and tell us what language you're using?
Anyways, to (kind of) answer your question, you could do something like:

this isn't in any language this is just the logic behind what you're trying to do

hit = random(1, 100)
if hit > 20 {
    # move hits
    crit = random(1, 100)
    if crit > 60 {
        # move hits + crit
    }
    # move hits normally
}

You put the crit chance in the hit chance.