- 971
- Posts
- 7
- Years
- Age 21
- Seen Nov 28, 2022
I'm trying to make an evolution method where a Pokémon evolves if certain Pokémon (plural or single) is in the player's party. While checking for other Pokémon to be isn't hard at all, I want it to be able to check for two or even three of the same Pokémon. Here is an example:
I want my Turtonator here to evolve if besides itself, there is another Turtonator in the player's party. How would I check for that?
PS: The method itself is already setup properly, but I don't think you really need to see that as it's irrelevant.
EDIT: To summarize everything, I want something like HasInParty, but I want to be able to check for two Pokémon (The one evolving and another one in the party).
Code:
when PBEvolution::StackOne
if pokemon.level>=level
for i in $Trainer.party
return poke if i.isConst?(pokemon.species,PBSpecies,:TURTONATOR)
end
end
PS: The method itself is already setup properly, but I don't think you really need to see that as it's irrelevant.
EDIT: To summarize everything, I want something like HasInParty, but I want to be able to check for two Pokémon (The one evolving and another one in the party).
Last edited: