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

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

trait SingEffect(val target: Entity):
	def apply(singQuality: Float): Event

class DefaultSingAttack(target: Entity) extends SingEffect(target):
	def apply(singQuality: Float): Event =
		this.target.takeDamage((singQuality * 50).toInt) // TODO: remove magic value
		val condition = this.target.condition
		Event(Map.from(Vector((target, condition(0)))), condition(1))