From 3e190600842878532bafa6608ad9b0fba72c39cf Mon Sep 17 00:00:00 2001 From: Matt Soucy Date: Fri, 6 Dec 2019 20:10:24 -0500 Subject: [PATCH] Start creating advanced skills --- core/src/me/msoucy/ptures/model/Skills.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/src/me/msoucy/ptures/model/Skills.kt b/core/src/me/msoucy/ptures/model/Skills.kt index b849f8f..9ef6c13 100644 --- a/core/src/me/msoucy/ptures/model/Skills.kt +++ b/core/src/me/msoucy/ptures/model/Skills.kt @@ -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() val postSteps = mutableListOf() @@ -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()