• 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!
  • Scottie, Todd, Serena, Kris - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

Check if one Pokémon is evolutionarily related to another Pokémon

  • 4
    Posts
    10
    Years
    • Seen Jul 6, 2018
    So I'm working on modifying the Dubious Clause that is found in Mej71's Challenge Modes/Uranium Nuzlocke Scripts. I have a question on a particular problem that I've run into.

    Code:
    $PokemonGlobal.nuzlockeMaps.push([$game_map.map_id,1]) if ($PokemonGlobal.dubiousClause  && !@battlers[1].owned)

    Instead of checking @battlers[1].owned, I want to check all forms of that pokemon (i.e. all evolved stages).

    For example. Let's say I caught a Poliwhirl in the wild and I ended up running into a Poliwag on a later route. I don't own a Poliwag, but the dubious clause will count that Poliwag as the first Pokemon on the route, so if I miss it, I won't be able to catch another. I want the if statement to count Poliwag as owned since I already have a Poliwhirl.

    So how do I check for something like the following:
    Code:
    $PokemonGlobal.nuzlockeMaps.push([$game_map.map_id,1]) if ($PokemonGlobal.dubiousClause  && !in_array(evolutionArray(@battlers[1])))

    in_array() is just a function I know in PHP, I'll end up looping through it or doing something similar in Ruby if I need to, this is just for the example's sake.

    If there is already a predefined method available, I would like to know what it is. If not, a hint on how to start would be great. I'm learning how to code in Ruby so I don't need the answer given to me. I just need to know where to start looking.

    Thanks in advance!
     
    Last edited:
    Back
    Top