diff options
Diffstat (limited to 'src/scalevalapokalypsi/Model/SingEffects.scala')
-rw-r--r-- | src/scalevalapokalypsi/Model/SingEffects.scala | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/scalevalapokalypsi/Model/SingEffects.scala b/src/scalevalapokalypsi/Model/SingEffects.scala index 6702df5..42f5188 100644 --- a/src/scalevalapokalypsi/Model/SingEffects.scala +++ b/src/scalevalapokalypsi/Model/SingEffects.scala @@ -1,11 +1,7 @@ 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)) +import scala.collection.immutable.Map trait SingEffect(val target: Entity): def apply(singQuality: Float): Event @@ -14,4 +10,4 @@ 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)) + Event(Map.from(Vector((target, condition(0)))), condition(1)) |