blob: 6702df541b2d3f1662e80bcc12c104ec8a6ef84a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
package scalevalapokalypsi.Model
import scalevalapokalypsi.Model.Entities.Entity
def defaultSingAttack(targetEntity: Entity)(singQuality: Float): Event =
targetEntity.takeDamage((singQuality * 30).toInt)
val condition = targetEntity.condition
Event(targetEntity, condition(0), condition(1))
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(target, condition(0), condition(1))
|