• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • 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.

[Scripting Question] [16.2] Ability that may hit twice.

  • 465
    Posts
    8
    Years
    • Seen Jun 17, 2024
    Im working on a more complicated ability idea, each move (Depending on stab or not) has a chance to either hit twice or hit with stab damage (if not stab) planning to be 1/3 chance for stab damage then a 1/3 chance for double hitting (cant get both) leaving a 1/3 chance for nothing to happen.

    i can do all the coding for stab or not, and the stab damage, its the part about hitting twice thats hard. i have tried basing on parentalbond and i know thats the way but im not sure how to do the chance check first (So the 2/3 of it not hitting twice and 1/3 it hitting twice) first or where the check after that would go to active the double hit.

    any help will be great, just stuck with this tiny bit.
     
    Back
    Top