Challenge Rules in a normal Battle

berger89

Rookie
Member
Joined
Jun 11, 2019
Posts
2
Is there a way to have Ruleset for normal battle-like
fx ItemClause or StandardRestriction into the battle

I would like to have it for an area like the elite four, or a random trainer would battle you but only if you meet the ruleset.
Without it is a random battler like in the battle frontier
 

ThatWelshOne_

Umbreon User
Moderator
Joined
Sep 29, 2020
Posts
194
Yes, this is possible. Before the battle is called, you can use a conditional branch to check whatever you want about the player's party. For example, there's pbHasSpecies?(species, form) pre-v19 or $Trainer.has_species?(species, form) in v19 to check whether the player has a certain species in their party. You could use that in your conditional branch to disallow certain species. You might need to create a new method if you want to ban a list of species rather than just the one, I think.

I'm not aware of a similar method for checking held items, but it should be straightforward to create a method that checks the party for certain items/duplicate items.

You could, instead, look at the Battle Frontier scripts, as I'm sure those have methods for exactly this, if you know where to find those.
 

berger89

Rookie
Member
Joined
Jun 11, 2019
Posts
2
I was more look for a way to apply a set of rules From the list "Challenge_Rulesets" for example "class LittleCup < PokemonRuleSet"
so when is start the trainer battle the "pbLittleCupRules" Would be at applied to that battle
I have the Selection of making a party for an area, so you enter a zone with the selected team and items, but I would like the Cup rules would be applied to the battle.
 
Top