Start creating advanced skills

This commit is contained in:
Matt Soucy 2019-12-06 20:10:24 -05:00
parent 83edd7190d
commit 3e19060084

View File

@ -40,7 +40,7 @@ class Damage(val power : Int, val attribute : Attribute = Attribute.Neutral) {
class StatusApplier(val target : Target, val apply : (Creature) -> Unit)
@SkillMarker
class Skill(val name : String, val attribute : Attribute) {
sealed class Skill(open val name : String, val attribute : Attribute) {
val damageSteps = mutableListOf<Damage>()
val postSteps = mutableListOf<StatusApplier>()
@ -59,6 +59,11 @@ class Skill(val name : String, val attribute : Attribute) {
}
}
class AdvancedSkill(name : String, attribute : Attribute) : Skill(name, attribute) {
override val name : String get() = super.name + "+"
val baseName : String get() = super.name
}
fun skill(name : String, attribute : Attribute = Attribute.Neutral, block : Skill.() -> Unit) : Skill {
val ret = Skill(name, attribute)
ret.block()