24 lines
649 B
Scala

package fmon
import scala.language.implicitConversions
import org.json4s.DefaultFormats
import org.json4s.ext.EnumNameSerializer
import scala.util.Random
import fmon.util.Dice
package object stat {
type Stat = Statistic.Value
type EffectType = EffectType.Value
type MoveType = MoveType.Value
type Gender = Gender.Value
type Nature = Nature.Val
type Target = Target.Value
type XpCurve = XpCurve.Val
implicit val formats = DefaultFormats + new EnumNameSerializer(MoveType) + new EnumNameSerializer(Gender)
implicit def rngDice(rng : Random) = new Dice(rng)
implicit def ptrToMonster(ptr : MonsterPtr) : Monster = ptr.mon
}