io.github.pidoveproject.showdown.protocol.server.choice.PokemonChoice.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scala-showdown-api_3 Show documentation
Show all versions of scala-showdown-api_3 Show documentation
A Scala wrapper of Pokemon Showdown's API
The newest version!
package io.github.pidoveproject.showdown.protocol.server.choice
import io.github.iltotore.iron.zioJson.given
import io.github.pidoveproject.showdown.json.someOrEmptyDecoder
import io.github.pidoveproject.showdown.battle.*
import io.github.pidoveproject.showdown.team.*
import zio.json.*
/**
* Information about a selectable pokemon.
*
* @param id the team id of the pokemon
* @param details the details of the pokemon
* @param condition the health and status of the pokemon
* @param active `true` if this pokemon is on the terrain, `false` otherwise
* @param stats the stats of the pokemon
* @param moves the moves of the pokemon
* @param item the item held by the pokemon
* @param pokeball the pokeball of the pokemon, not used
* @param baseAbility the base ability of the pokemon
* @param ability the current ability of the pokemon in case of ability change (e.g Mummy, Wandering Spirit, Neutralising Gaz...)
* @param teraType the tera type of the pokemon
* @param terastallized the type thep pokemon terastallized into
*/
case class PokemonChoice(
@jsonField("ident") id: TeamId,
details: PokemonDetails,
condition: Condition,
active: Boolean,
stats: Map[StatType, Stat],
moves: MoveNames,
item: Option[ItemName],
pokeball: String,
baseAbility: AbilityName,
ability: AbilityName,
teraType: Option[Type] = None,
terastallized: Option[Type] = None
) derives JsonDecoder