You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

17 lines
499 B

package model
import korlibs.time.*
import kotlinx.serialization.Serializable
@Serializable
/** A [BattleEffect] represents some kind of timed impact on the game as a result of a [BattleAction]. */
sealed class BattleEffect: TimedEvent()
@Serializable
data class DamageEffect(override val timestamp: TimeSpan, val id: Battler.Id, val damage: Double): BattleEffect() {
override fun Battle.EventAPI.execute() {
battler(id) {
inflictComposureDamage(damage)
}
}
}