Health

io.github.pidoveproject.showdown.battle.Health
See theHealth companion class
object Health

Attributes

Companion
class
Source
Health.scala
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Health.type

Members list

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
Source
Mirror.scala
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

def fromString(value: String): Either[ProtocolError, Health]

Parse health information from a String.

Parse health information from a String.

Value parameters

value

the text to parse

Attributes

Returns

the read instance or a ProtocolError if it failed

Source
Health.scala
def percent(current: IronType[Int, Closed[0, 100]]): Health

Create health information from percentage.

Create health information from percentage.

Value parameters

current

the current health of the pokemon, between 0 and 100

Attributes

Returns

a new Health with max HP set to 100

Source
Health.scala