• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!

Challenge Rules in a normal Battle

Bergium

Bergium#0216
Member
Joined
Jun 11, 2019
Posts
74
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_

Champion
Member
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.
 

Bergium

Bergium#0216
Member
Joined
Jun 11, 2019
Posts
74
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.
 
Back
Top