public class LogicalOrBattleClause extends BattleClause
BattleClause is valid
If not a single clause is not valid then it fails (returns false)| Constructor and Description |
|---|
LogicalOrBattleClause(java.lang.String id,
BattleClause... clauses)
Creates the clause with the sub-clauses
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
validateSingle(Pokemon pokemon)
Checks if the rule allows a Pokémon to be chosen for battle.
|
boolean |
validateTeam(java.util.List<Pokemon> team)
Checks if the rule allows a list of Pokémon to be chosen for battle.
|
compareTo, decodeInto, encodeInto, equals, getDescription, getID, getLocalizedName, getLocalizedName, hashCode, setDescription, toStringpublic LogicalOrBattleClause(java.lang.String id,
BattleClause... clauses)
id - The unique ID of the battle clause.clauses - The clauses that cannot be violated combined.public boolean validateSingle(Pokemon pokemon)
BattleClausevalidateSingle in class BattleClausepokemon - The Pokémon to check.public boolean validateTeam(java.util.List<Pokemon> team)
BattleClausevalidateTeam in class BattleClauseteam - The Pokémon to check.