Added the ability for statuses to have data (like duration) and the sleep and toxic status effects

This commit is contained in:
James Daly
2019-06-02 22:46:32 -04:00
parent 40553d36b9
commit 34cd67c36f
7 changed files with 127 additions and 56 deletions

View File

@@ -51,7 +51,7 @@ class BattleEngine(val player: Party, val enemy: Party)(implicit val rng: Random
val move = action.move
val target = action.target
if (user.isAlive) {
if (user.status.forall(_.onBeforeMove(user, move, target, rng))) {
if (user.status.forall(_.onBeforeMove(user, move, target))) {
move.useMove(user, target)
}
}