aboutsummaryrefslogtreecommitdiff
path: root/src/scalevalapokalypsi/Model/SingEffects.scala
blob: e0f9135103f3c966d48837c1ce779fa093ffbc1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package scalevalapokalypsi.Model

import scalevalapokalypsi.Model.Entities.Entity
import scala.collection.immutable.Map

trait SingEffect(val target: Entity):
	def apply(singQuality: Float): Event
	def getVerses: Vector[String]

class DefaultSingAttack(target: Entity) extends SingEffect(target):
	def apply(singQuality: Float): Event =
		this.target.takeDamage((singQuality * 50).toInt) // TODO: remove magic value
		Event(Map.empty, "") // The conditions are automatically shown to
		                     // clients through takeDamage, but other effects
		                     // should explain the changes they have.
	def getVerses: Vector[String] = this.target.getVerseAgainst