All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.pidoveproject.showdown.protocol.server.choice.PokemonChoice.scala Maven / Gradle / Ivy

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy