Class LogicalOrBattleClause
java.lang.Object
com.pixelmonmod.pixelmon.battles.api.rules.clauses.BattleClause
com.pixelmonmod.pixelmon.battles.api.rules.clauses.type.LogicalOrBattleClause
- All Implemented Interfaces:
IEncodeable,Comparable<BattleClause>
- Direct Known Subclasses:
AbilityComboClauseLogicalOr,LogicalOrBattleClauseSingle
Checks that a single sub-clause of the
BattleClause is valid
If not a single clause is not valid then it fails (returns false)-
Constructor Summary
ConstructorsConstructorDescriptionLogicalOrBattleClause(String id, BattleClause... clauses) Creates the clause with the sub-clauses -
Method Summary
Modifier and TypeMethodDescriptionbooleanvalidateSingle(Pokemon pokemon) Checks if the rule allows a Pokémon to be chosen for battle.booleanvalidateTeam(List<Pokemon> team) Checks if the rule allows a list of Pokémon to be chosen for battle.Methods inherited from class com.pixelmonmod.pixelmon.battles.api.rules.clauses.BattleClause
compareTo, decodeInto, encodeInto, equals, getDescription, getID, getLocalizedName, getLocalizedName, hashCode, setDescription, toString
-
Constructor Details
-
LogicalOrBattleClause
Creates the clause with the sub-clauses- Parameters:
id- The unique ID of the battle clause.clauses- The clauses that cannot be violated combined.
-
-
Method Details
-
validateSingle
Description copied from class:BattleClauseChecks if the rule allows a Pokémon to be chosen for battle.- Overrides:
validateSinglein classBattleClause- Parameters:
pokemon- The Pokémon to check.- Returns:
- Whether the rule allows the given Pokémon to be chosen for battle.
-
validateTeam
Description copied from class:BattleClauseChecks if the rule allows a list of Pokémon to be chosen for battle.- Overrides:
validateTeamin classBattleClause- Parameters:
team- The Pokémon to check.- Returns:
- Whether the rule allows the given team to be chosen for battle.
-