io.github.pidoveproject.showdown.battle

Members list

Type members

Classlikes

case class ActiveId(position: ActivePosition, name: Surname)

The identifier of an active pokemon.

The identifier of an active pokemon.

Value parameters

name

the surname or species of the pokemon

position

the position of the pokemon on the battlefield

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ActiveId

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
ActiveId.type
case class ActivePokemon(teamSlot: TeamSlot, boosts: Map[StatType, StatBoost], volatileStatus: Set[VolatileStatus], nextMoveStatus: Set[VolatileStatus], nextTurnStatus: Set[VolatileStatus], modifiedAbility: Option[RevealedAbility], transformedSpecies: Option[SpeciesName], isTerastallized: Boolean)

An pokemon active on the battlefield.

An pokemon active on the battlefield.

Value parameters

boosts

the current boosts of the pokemon

modifiedAbility

the new ability of the pokemon, None indicates that it still has its base ability

nextMoveStatus

the status ending the next time this pokemon uses a move

nextTurnStatus

the status ending the next turn

teamSlot

the slot of this pokemon in its team, used to retrieve switch-persistent information like health

transformedSpecies

the new species of the pokemon, None indicates that it still has its base species

volatileStatus

the current volatile (not persistent after switching) status of the pokemon

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class ActivePosition(player: PlayerNumber, slot: PokemonSlot)

The position of an active pokemon.

The position of an active pokemon.

Value parameters

player

the side of the pokemon

slot

the slot of the pokemon in its side

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class Battle(state: BattleState, activePokemon: Map[ActivePosition, ActivePokemon], battleType: Option[BattleType], players: Map[PlayerNumber, Player], generation: Option[Generation], format: Option[FormatName], rules: Set[BattleRule], timerEnabled: Boolean, currentTurn: Option[TurnNumber], result: Option[BattleResult], currentRequest: Option[ChoiceRequest], weather: Option[Weather], field: Map[FieldEffect, TurnNumber], sides: Map[PlayerId, SideCondition])

The state of a battle. Represents all data about a battle.

The state of a battle. Represents all data about a battle.

Value parameters

activePokemon

the pokemon currently active on the battlefield

battleType

the type of the battle (e.g singles)

currentRequest

the last pending choice request sent by the server

currentTurn

the current turn of this battle

field

the currently active terrain effects

format

this battle's format

generation

this battle's generation

players

this battle's participants

result

the result of this battle if it ended

rules

this battle's rules

sides

the currently active side-bound effects

state

the game state of this battle (initialization, playing...)

timerEnabled

whether the time for each turn is limited or not

weather

the weather currently active on the battlefield

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Battle

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Battle.type

The result of an ended battle.

The result of an ended battle.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class BattleRule(name: String, description: String)

The rule of a battle or format.

The rule of a battle or format.

Value parameters

description

a short description of this rule

name

the name of this rule

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object BattleRule

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
BattleRule.type

The state of a Battle.

The state of a Battle.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
enum BattleType

The type of a Battle.

The type of a Battle.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class Condition(health: Health, status: Option[StatusEffect])

The health and status of a pokemon.

The health and status of a pokemon.

Value parameters

health

the health of the pokemon

status

the status of the pokemon or None if healthy.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Condition

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Condition.type
enum Effect

An instant effect, usually a cause of change in the battle state.

An instant effect, usually a cause of change in the battle state.

Attributes

Companion
object
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Effect

Attributes

Companion
enum
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Effect.type
object FieldEffect extends RefinedTypeOps[String, Not[Blank], FieldEffect]

Attributes

Supertypes
trait RefinedTypeOps[String, Not[Blank], FieldEffect]
class Object
trait Matchable
class Any
Self type
case class Health(current: IronType[Int, GreaterEqual[0]], max: IronType[Int, GreaterEqual[0]])

The health information of a pokemon.

The health information of a pokemon.

Value parameters

current

the current health of the pokemon

max

the maximum health of the pokemon

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Health

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Health.type
enum HeldItem

The held item of a pokemon.

The held item of a pokemon.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object MoveSlot extends NumericTypeOps[Int, Closed[1, 4], MoveSlot]

Attributes

Supertypes
trait NumericTypeOps[Int, Closed[1, 4], MoveSlot]
trait RefinedTypeOps[Int, Closed[1, 4], MoveSlot]
class Object
trait Matchable
class Any
Self type
MoveSlot.type
object PP extends NumericTypeOps[Int, Positive, PP]

Attributes

Supertypes
trait NumericTypeOps[Int, Positive, PP]
trait RefinedTypeOps[Int, Positive, PP]
class Object
trait Matchable
class Any
Self type
PP.type
case class Player(number: PlayerNumber, name: Option[Username], avatar: Option[AvatarName], rating: Option[Rating], team: Option[PlayerTeam])

A currently battling player.

A currently battling player.

Value parameters

avatar

this player's avatar

name

this player's username

number

this player's battle position

rating

this player's rating in the currently played format

team

this player's pokemon team

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class PlayerId(number: PlayerNumber, name: Username)

The position of a player.

The position of a player.

Value parameters

name

the name of the player

number

the player id

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object PlayerId

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
PlayerId.type
object PlayerNumber extends NumericTypeOps[Int, Positive, PlayerNumber]

Attributes

Supertypes
trait NumericTypeOps[Int, Positive, PlayerNumber]
trait RefinedTypeOps[Int, Positive, PlayerNumber]
class Object
trait Matchable
class Any
Self type
case class PlayerTeam(size: Count, members: Map[TeamSlot, TeamMember])

The pokemon team of a player.

The pokemon team of a player.

Value parameters

members

the pokemon members of the team

size

the size of the team

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class PokemonDetails(species: SpeciesName, shiny: Boolean, level: Option[Level], gender: Option[Gender], teraType: Option[Type])

The known permanent details of a pokemon.

The known permanent details of a pokemon.

Value parameters

gender

the gender of the pokemon

level

the level of the pokemon

shiny

whether the pokemon is shiny or not

species

the species of the pokemon

teraType

the tera type of the pokememon

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
object PokemonSlot extends RefinedTypeOps[Int, Closed[0, 2], PokemonSlot]

Attributes

Supertypes
trait RefinedTypeOps[Int, Closed[0, 2], PokemonSlot]
class Object
trait Matchable
class Any
Self type
object Rating extends NumericTypeOps[Int, Positive, Rating]

Attributes

Supertypes
trait NumericTypeOps[Int, Positive, Rating]
trait RefinedTypeOps[Int, Positive, Rating]
class Object
trait Matchable
class Any
Self type
Rating.type
case class RelativePosition(side: RelativeSide, slot: PokemonSlot)

The relative position of an active pokemon.

The relative position of an active pokemon.

Value parameters

side

the relative side of the pokemon

slot

the slot of the pokemon

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

A player side relative to another.

A player side relative to another.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

A revealed ability.

A revealed ability.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class SideCondition(effects: Map[SideFieldEffect, Count])

The condition of a side.

The condition of a side.

Value parameters

effects

the effects bound to the represented side

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object SideFieldEffect extends RefinedTypeOps[String, Not[Blank], SideFieldEffect]

Attributes

Supertypes
trait RefinedTypeOps[String, Not[Blank], SideFieldEffect]
class Object
trait Matchable
class Any
Self type
object StatBoost extends NumericTypeOps[Int, Closed[-6, 6], StatBoost]

Attributes

Supertypes
trait NumericTypeOps[Int, Closed[-6, 6], StatBoost]
trait RefinedTypeOps[Int, Closed[-6, 6], StatBoost]
class Object
trait Matchable
class Any
Self type
StatBoost.type
object StatusEffect extends RefinedTypeOps[String, Not[Blank], StatusEffect]

Attributes

Supertypes
trait RefinedTypeOps[String, Not[Blank], StatusEffect]
class Object
trait Matchable
class Any
Self type
case class TeamId(player: PlayerNumber, name: Surname)

A member identifier relative to a team.

A member identifier relative to a team.

Value parameters

name

the name of the pokemon

player

the owner

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object TeamId

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
TeamId.type
case class TeamMember(details: PokemonDetails, condition: Condition, item: HeldItem, ability: Option[AbilityName])

An inactive pokemon.

An inactive pokemon.

Value parameters

ability

the ability of this pokemon

condition

the condition of this pokemon

details

the known details of this pokemon

item

the item currently held by this pokemon

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object TeamSlot extends NumericTypeOps[Int, Closed[1, 6], TeamSlot]

Attributes

Supertypes
trait NumericTypeOps[Int, Closed[1, 6], TeamSlot]
trait RefinedTypeOps[Int, Closed[1, 6], TeamSlot]
class Object
trait Matchable
class Any
Self type
TeamSlot.type
object TurnNumber extends NumericTypeOps[Int, Positive, TurnNumber]

Attributes

Supertypes
trait NumericTypeOps[Int, Positive, TurnNumber]
trait RefinedTypeOps[Int, Positive, TurnNumber]
class Object
trait Matchable
class Any
Self type
TurnNumber.type
object VolatileStatus extends RefinedTypeOps[String, Not[Blank], VolatileStatus]

Attributes

Supertypes
trait RefinedTypeOps[String, Not[Blank], VolatileStatus]
class Object
trait Matchable
class Any
Self type
object Weather extends RefinedTypeOps[String, Not[Blank], Weather]

Attributes

Supertypes
trait RefinedTypeOps[String, Not[Blank], Weather]
class Object
trait Matchable
class Any
Self type
Weather.type

Types

opaque type FieldEffect
opaque type MoveSlot
opaque type PP
opaque type PlayerNumber
opaque type PokemonSlot
opaque type Rating
opaque type SideFieldEffect
opaque type StatBoost
opaque type StatusEffect
opaque type TeamSlot
opaque type TurnNumber
opaque type VolatileStatus
opaque type Weather