• 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.

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

  • 4
    Posts
    9
    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