14 lines
379 B
Scala
14 lines
379 B
Scala
package fmon.battle
|
|
|
|
import fmon.stat._
|
|
import fmon.stat.Statistic.Speed
|
|
|
|
case class Action(user : MonsterPtr, move : MoveTurn, target : MonsterPtr) extends Comparable[Action] {
|
|
override def compareTo(other : Action) = {
|
|
if (move.prior == other.move.prior) {
|
|
other.user(Speed) compareTo user(Speed)
|
|
} else {
|
|
other.move.prior compareTo move.prior
|
|
}
|
|
}
|
|
} |