diff --git a/src/commonMain/kotlin/character/Proc.kt b/src/commonMain/kotlin/character/Proc.kt index d1d222615..27fe05dcf 100644 --- a/src/commonMain/kotlin/character/Proc.kt +++ b/src/commonMain/kotlin/character/Proc.kt @@ -93,6 +93,9 @@ abstract class Proc { SHAMAN_CAST_STORMSTRIKE, SHAMAN_CRIT_LIGHTNING_BOLT, + DRUID_CAST_STARFIRE, + DRUID_CAST_WRATH, + WARLOCK_CRIT_INCINERATE, WARLOCK_CRIT_SHADOW_BOLT, WARLOCK_HIT_INCINERATE, diff --git a/src/commonMain/kotlin/character/classes/druid/abilities/Innervate.kt b/src/commonMain/kotlin/character/classes/druid/abilities/Innervate.kt new file mode 100644 index 000000000..0f4f206e4 --- /dev/null +++ b/src/commonMain/kotlin/character/classes/druid/abilities/Innervate.kt @@ -0,0 +1,7 @@ +package character.classes.druid.abilities + +/** + * + */ +class Innervate { +} \ No newline at end of file diff --git a/src/commonMain/kotlin/character/classes/druid/abilities/InsectSwarm.kt b/src/commonMain/kotlin/character/classes/druid/abilities/InsectSwarm.kt new file mode 100644 index 000000000..a6dcc9632 --- /dev/null +++ b/src/commonMain/kotlin/character/classes/druid/abilities/InsectSwarm.kt @@ -0,0 +1,7 @@ +package character.classes.druid.abilities + +/** + * + */ +class InsectSwarm { +} \ No newline at end of file diff --git a/src/commonMain/kotlin/character/classes/druid/abilities/Moonfire.kt b/src/commonMain/kotlin/character/classes/druid/abilities/Moonfire.kt new file mode 100644 index 000000000..efee40afb --- /dev/null +++ b/src/commonMain/kotlin/character/classes/druid/abilities/Moonfire.kt @@ -0,0 +1,88 @@ +package character.classes.druid.abilities + +import character.Ability +import character.Proc +import character.classes.druid.debuff.MoonfireDot +import character.classes.druid.talents.* +import data.Constants +import mechanics.General +import mechanics.Spell +import sim.Event +import sim.EventResult +import sim.EventType +import sim.SimParticipant + +/** + * + */ +class Moonfire : Ability() { + companion object { + const val name = "Moonfire" + } + + // TODO: lookup this actual value + override val id: Int = 100 + override val name: String = Companion.name + override fun gcdMs(sp: SimParticipant): Int = sp.spellGcd().toInt() + + val baseCost = 495.0 + override fun resourceCost(sp: SimParticipant): Double { + val moonglow = sp.getTalent(Moonglow.name) + val costReductionPercent = moonglow?.reducedManaCostPercent() ?: 0.0 + return General.resourceCostReduction(baseCost, listOf(costReductionPercent)) + } + + val baseDamage = Pair(305.0, 357.0) + val baseDot = 600.0 + val school = Constants.DamageType.ARCANE + override fun cast(sp: SimParticipant) { + val impMoonfire = sp.getTalent(ImprovedMoonfire.name) + val impMoonfireIncreasedCritChance = impMoonfire?.increasedMoonfireCritChancePercent() ?: 0.0 + val impMoonfireIncreasedDamagePercent = impMoonfire?.increasedMoonfireDamagePercent() ?: 0.0 + + val vengeance = sp.getTalent(Vengeance.name) + val increasedCritBonusDamage = vengeance?.increasedCritBonusDamagePercent() ?: 0.0 + + val moonfury = sp.getTalent(Moonfury.name) + val moonfuryBonusDamagePercent = moonfury?.increasedDamagePercent() ?: 0.0 + + val instantSpellPowerCoeff = 0.1495 + + val damageMulti = 1.0 + impMoonfireIncreasedDamagePercent + moonfuryBonusDamagePercent + + val damageRoll = Spell.baseDamageRoll(sp, baseDamage.first, baseDamage.second, school, instantSpellPowerCoeff) * damageMulti + val damageResult = Spell.attackRoll( + sp, + damageRoll, + school, + isBinary = false, + bonusCritChance = impMoonfireIncreasedCritChance, + bonusCritMultiplier = 1.0 + increasedCritBonusDamage + ) + + val event = Event( + eventType = EventType.DAMAGE, + damageType = school, + abilityName = name, + amount = damageResult.first, + result = damageResult.second + ) + sp.logEvent(event) + + sp.sim.target.addDebuff(MoonfireDot(sp)) + + // Proc anything that can proc off non-periodic spell damage + val triggerTypes = when(damageResult.second) { + EventResult.HIT -> listOf(Proc.Trigger.SPELL_HIT, Proc.Trigger.ARCANE_DAMAGE) + EventResult.CRIT -> listOf(Proc.Trigger.SPELL_CRIT, Proc.Trigger.ARCANE_DAMAGE) + EventResult.RESIST -> listOf(Proc.Trigger.SPELL_RESIST) + EventResult.PARTIAL_RESIST_HIT -> listOf(Proc.Trigger.SPELL_HIT, Proc.Trigger.ARCANE_DAMAGE) + EventResult.PARTIAL_RESIST_CRIT -> listOf(Proc.Trigger.SPELL_CRIT, Proc.Trigger.ARCANE_DAMAGE) + else -> null + } + + if (triggerTypes != null) { + sp.fireProc(triggerTypes, listOf(), this, event) + } + } +} \ No newline at end of file diff --git a/src/commonMain/kotlin/character/classes/druid/abilities/Starfire.kt b/src/commonMain/kotlin/character/classes/druid/abilities/Starfire.kt new file mode 100644 index 000000000..2d736efce --- /dev/null +++ b/src/commonMain/kotlin/character/classes/druid/abilities/Starfire.kt @@ -0,0 +1,10 @@ +package character.classes.druid.abilities + +import character.Ability + +/** + * + */ +class Starfire { + +} \ No newline at end of file diff --git a/src/commonMain/kotlin/character/classes/druid/abilities/Wrath.kt b/src/commonMain/kotlin/character/classes/druid/abilities/Wrath.kt new file mode 100644 index 000000000..b0bd05849 --- /dev/null +++ b/src/commonMain/kotlin/character/classes/druid/abilities/Wrath.kt @@ -0,0 +1,7 @@ +package character.classes.druid.abilities + +/** + * + */ +class Wrath { +} \ No newline at end of file diff --git a/src/commonMain/kotlin/character/classes/druid/debuff/MoonfireDot.kt b/src/commonMain/kotlin/character/classes/druid/debuff/MoonfireDot.kt new file mode 100644 index 000000000..5710fd022 --- /dev/null +++ b/src/commonMain/kotlin/character/classes/druid/debuff/MoonfireDot.kt @@ -0,0 +1,60 @@ +package character.classes.druid.debuff + +import character.Ability +import character.Debuff +import character.Proc +import character.classes.druid.talents.ImprovedMoonfire +import character.classes.druid.talents.Moonfury +import data.Constants +import data.itemsets.CorruptorRaiment +import data.itemsets.VoidheartRaiment +import mechanics.Spell +import sim.Event +import sim.EventResult +import sim.EventType + +import sim.SimParticipant +import kotlin.reflect.KProperty + +class MoonfireDot(owner: SimParticipant) : Debuff(owner) { + companion object { + const val name = "Moonfire (DoT)" + } + override val name: String = Companion.name + override val durationMs: Int = 12000 + override val tickDeltaMs: Int = 3000 + + val moonfireDot = object : Ability() { + override val id: Int = 26988 + override val name: String = Companion.name + override fun gcdMs(sp: SimParticipant): Int = 0 + + val dmgPerTick = 150.0 + val numTicks = durationMs / tickDeltaMs + val school = Constants.DamageType.ARCANE + override fun cast(sp: SimParticipant) { + val spellPowerCoeff = 0.1302 + + val impMoonfire = sp.getTalent(ImprovedMoonfire.name) + val impMoonfireIncreasedDamagePercent = impMoonfire?.increasedMoonfireDamagePercent() ?: 0.0 + + val moonfury = sp.getTalent(Moonfury.name) + val moonFuryIncreasedDamagePercent = moonfury?.increasedDamagePercent() ?: 0.0 + + val damageMulti = 1.0 + impMoonfireIncreasedDamagePercent + moonFuryIncreasedDamagePercent + val damageRoll = Spell.baseDamageRollSingle(owner, dmgPerTick, school, spellPowerCoeff) * damageMulti + + val event = Event( + eventType = EventType.DAMAGE, + damageType = school, + abilityName = name, + amount = damageRoll, + result = EventResult.HIT, + ) + owner.logEvent(event) + } +} + override fun tick(sp: SimParticipant) { + moonfireDot.cast(sp) + } +} diff --git a/src/commonMain/kotlin/character/classes/druid/specs/Boomkin.kt b/src/commonMain/kotlin/character/classes/druid/specs/Boomkin.kt new file mode 100644 index 000000000..f8be92da1 --- /dev/null +++ b/src/commonMain/kotlin/character/classes/druid/specs/Boomkin.kt @@ -0,0 +1,27 @@ +package character.classes.druid.specs + +import character.Spec +import character.SpecEpDelta + +/** + */ +class Boomkin : Spec() { + override val name: String = "Boomkin" + override val epBaseStat: SpecEpDelta = spellPowerBase + override val epStatDeltas: List = defaultCasterDeltas + + override fun redSocketEp(deltas: Map): Double { + // 12 spell dmg + return 12.0 + } + + override fun yellowSocketEp(deltas: Map): Double { + // 5 hit rating / 6 spell dmg + return ((deltas["spellHitRating"] ?: 0.0) * 5.0) + 6.0 + } + + override fun blueSocketEp(deltas: Map): Double { + // 6 spell dmg + return 6.0 + } +} \ No newline at end of file diff --git a/src/commonMain/kotlin/character/classes/druid/talents/BalanceOfPower.kt b/src/commonMain/kotlin/character/classes/druid/talents/BalanceOfPower.kt new file mode 100644 index 000000000..e4551b1b9 --- /dev/null +++ b/src/commonMain/kotlin/character/classes/druid/talents/BalanceOfPower.kt @@ -0,0 +1,32 @@ +package character.classes.druid.talents + +import character.Buff +import character.Stats +import character.Talent +import mechanics.Rating +import sim.SimParticipant + +/** + * + */ +class BalanceOfPower(currentRank: Int) : Talent(currentRank) { + companion object { + const val name = "Balance of Power" + } + + override val name: String = Companion.name + override val maxRank: Int = 2 + + val buff = object : Buff() { + override val name: String = MoonkinForm.name + override val durationMs: Int = -1 + override val hidden: Boolean = true + + override fun modifyStats(sp: SimParticipant): Stats { + // TODO: is it easier to do this than add the 2% hit on each spell call? + return Stats(spellHitRating= currentRank * 2 * Rating.spellHitPerPct) + } + } + + override fun buffs(sp: SimParticipant): List = listOf(buff) +} \ No newline at end of file diff --git a/src/commonMain/kotlin/character/classes/druid/talents/Dreamstate.kt b/src/commonMain/kotlin/character/classes/druid/talents/Dreamstate.kt new file mode 100644 index 000000000..8af659586 --- /dev/null +++ b/src/commonMain/kotlin/character/classes/druid/talents/Dreamstate.kt @@ -0,0 +1,38 @@ +package character.classes.druid.talents + +import character.Buff +import character.Stats +import character.Talent +import sim.SimParticipant + +/** + * + */ +class Dreamstate(currentRank: Int) : Talent(currentRank) { + companion object { + const val name = "Dreamstate" + } + + override val name: String = Companion.name + override val maxRank: Int = 3 + + val buff = object : Buff() { + override val name: String = Companion.name + override val durationMs: Int = -1 + override val hidden: Boolean = true + + override fun modifyStats(sp: SimParticipant): Stats { + val percentOfInt: Double = when(currentRank) { + 3 -> .1 + 2 -> .07 + 1 -> .04 + else -> 0.0 + } + + return Stats(manaPer5Seconds = (sp.intellect() * percentOfInt).toInt()) + } + } + + override fun buffs(sp: SimParticipant): List = listOf(buff) + +} \ No newline at end of file diff --git a/src/commonMain/kotlin/character/classes/druid/talents/FocusedStarlight.kt b/src/commonMain/kotlin/character/classes/druid/talents/FocusedStarlight.kt new file mode 100644 index 000000000..675b2b462 --- /dev/null +++ b/src/commonMain/kotlin/character/classes/druid/talents/FocusedStarlight.kt @@ -0,0 +1,23 @@ +package character.classes.druid.talents + +import character.Talent + +/** + * + */ +class FocusedStarlight(currentRank: Int) : Talent(currentRank) { + companion object { + const val name = "Focused Starlight" + } + + override val name: String = Companion.name + override val maxRank: Int = 2 + + fun increasedWrathCritChancePercent() : Double { + return currentRank * .02 + } + + fun increasedStarfireCritChancePercent() : Double { + return increasedWrathCritChancePercent() + } +} \ No newline at end of file diff --git a/src/commonMain/kotlin/character/classes/druid/talents/ForceOfNature.kt b/src/commonMain/kotlin/character/classes/druid/talents/ForceOfNature.kt new file mode 100644 index 000000000..379165148 --- /dev/null +++ b/src/commonMain/kotlin/character/classes/druid/talents/ForceOfNature.kt @@ -0,0 +1,7 @@ +package character.classes.druid.talents + +/** + * + */ +class ForceOfNature { +} \ No newline at end of file diff --git a/src/commonMain/kotlin/character/classes/druid/talents/ImprovedMarkOfTheWild.kt b/src/commonMain/kotlin/character/classes/druid/talents/ImprovedMarkOfTheWild.kt new file mode 100644 index 000000000..0dcf73512 --- /dev/null +++ b/src/commonMain/kotlin/character/classes/druid/talents/ImprovedMarkOfTheWild.kt @@ -0,0 +1,7 @@ +package character.classes.druid.talents + +/** + * + */ +class ImprovedMarkOfTheWild { +} \ No newline at end of file diff --git a/src/commonMain/kotlin/character/classes/druid/talents/ImprovedMoonfire.kt b/src/commonMain/kotlin/character/classes/druid/talents/ImprovedMoonfire.kt new file mode 100644 index 000000000..7d5359143 --- /dev/null +++ b/src/commonMain/kotlin/character/classes/druid/talents/ImprovedMoonfire.kt @@ -0,0 +1,23 @@ +package character.classes.druid.talents + +import character.Talent + +/** + * + */ +class ImprovedMoonfire(currentRank: Int) : Talent(currentRank) { + companion object { + const val name = "Improved Moonfire" + } + + override val name: String = Companion.name + override val maxRank: Int = 2 + + fun increasedMoonfireCritChancePercent() : Double { + return 0.05 * currentRank + } + + fun increasedMoonfireDamagePercent() : Double { + return increasedMoonfireCritChancePercent() + } +} \ No newline at end of file diff --git a/src/commonMain/kotlin/character/classes/druid/talents/InsectSwarm.kt b/src/commonMain/kotlin/character/classes/druid/talents/InsectSwarm.kt new file mode 100644 index 000000000..2a98ed924 --- /dev/null +++ b/src/commonMain/kotlin/character/classes/druid/talents/InsectSwarm.kt @@ -0,0 +1,15 @@ +package character.classes.druid.talents + +import character.Talent + +/** + * + */ +class InsectSwarm(currentRank: Int) : Talent(currentRank) { + companion object { + const val name = "Insect Swarm" + } + + override val name: String = Companion.name + override val maxRank: Int = 1 +} \ No newline at end of file diff --git a/src/commonMain/kotlin/character/classes/druid/talents/Intensity.kt b/src/commonMain/kotlin/character/classes/druid/talents/Intensity.kt new file mode 100644 index 000000000..b5d77a0f0 --- /dev/null +++ b/src/commonMain/kotlin/character/classes/druid/talents/Intensity.kt @@ -0,0 +1,34 @@ +package character.classes.druid.talents + +import character.Buff +import character.Stats +import character.Talent +import mechanics.General +import sim.SimParticipant + +/** + * + */ +class Intensity(currentRank: Int) : Talent(currentRank) { + companion object { + const val name = "Intensity" + } + + override val name: String = Companion.name + override val maxRank: Int = 3 + + val buff = object : Buff() { + override val name: String = Companion.name + override val durationMs: Int = -1 + override val hidden: Boolean = true + + override fun modifyStats(sp: SimParticipant): Stats { + val percentOfRegen: Double = currentRank * .1 + + return Stats(manaPer5Seconds = (General.mp5FromSpiritNotCasting(sp) * percentOfRegen).toInt()) + } + } + + override fun buffs(sp: SimParticipant): List = listOf(buff) + +} \ No newline at end of file diff --git a/src/commonMain/kotlin/character/classes/druid/talents/LunarGuidance.kt b/src/commonMain/kotlin/character/classes/druid/talents/LunarGuidance.kt new file mode 100644 index 000000000..78724a042 --- /dev/null +++ b/src/commonMain/kotlin/character/classes/druid/talents/LunarGuidance.kt @@ -0,0 +1,41 @@ +package character.classes.druid.talents + +import character.Buff +import character.Stats +import character.Talent +import mechanics.Rating +import sim.SimParticipant + +/** + * + */ +class LunarGuidance(currentRank: Int) : Talent(currentRank) { + companion object { + const val name = "Lunar Guidance" + } + + override val name: String = Companion.name + override val maxRank: Int = 3 + + fun increasedSpellDamagePercentByIntellect() : Double { + return when(currentRank) { + 1 -> 0.08 + 2 -> 0.16 + 3 -> 0.25 + else -> 0.0 + } + } + + val buff = object : Buff() { + override val name: String = MoonkinForm.name + override val durationMs: Int = -1 + override val hidden: Boolean = true + + override fun modifyStats(sp: SimParticipant): Stats { + // TODO: is it easier to do this than add the 5% crit on each spell call? + return Stats(spellDamage= (increasedSpellDamagePercentByIntellect() * sp.spellDamage()).toInt()) + } + } + + override fun buffs(sp: SimParticipant): List = listOf(buff) +} \ No newline at end of file diff --git a/src/commonMain/kotlin/character/classes/druid/talents/Moonfury.kt b/src/commonMain/kotlin/character/classes/druid/talents/Moonfury.kt new file mode 100644 index 000000000..c1353f30e --- /dev/null +++ b/src/commonMain/kotlin/character/classes/druid/talents/Moonfury.kt @@ -0,0 +1,19 @@ +package character.classes.druid.talents + +import character.Talent + +/** + * + */ +class Moonfury(currentRank: Int) : Talent(currentRank) { + companion object { + const val name = "Moonfury" + } + + override val name: String = Companion.name + override val maxRank: Int = 5 + + fun increasedDamagePercent(): Double { + return (0.02 * currentRank) + } +} \ No newline at end of file diff --git a/src/commonMain/kotlin/character/classes/druid/talents/Moonglow.kt b/src/commonMain/kotlin/character/classes/druid/talents/Moonglow.kt new file mode 100644 index 000000000..c22ba6de9 --- /dev/null +++ b/src/commonMain/kotlin/character/classes/druid/talents/Moonglow.kt @@ -0,0 +1,19 @@ +package character.classes.druid.talents + +import character.Talent + +/** + * + */ +class Moonglow(currentRank: Int) : Talent(currentRank) { + companion object { + const val name = "Moonglow" + } + + override val name: String = Companion.name + override val maxRank: Int = 3 + + fun reducedManaCostPercent(): Double { + return (0.03 * currentRank) + } +} \ No newline at end of file diff --git a/src/commonMain/kotlin/character/classes/druid/talents/MoonkinForm.kt b/src/commonMain/kotlin/character/classes/druid/talents/MoonkinForm.kt new file mode 100644 index 000000000..a66190f4b --- /dev/null +++ b/src/commonMain/kotlin/character/classes/druid/talents/MoonkinForm.kt @@ -0,0 +1,33 @@ +package character.classes.druid.talents + +import character.Buff +import character.Stats +import character.Talent +import mechanics.General +import mechanics.Rating +import sim.SimParticipant + +/** + * + */ +class MoonkinForm(currentRank: Int) : Talent(currentRank) { + companion object { + const val name = "Moonkin Form" + } + + override val name: String = Companion.name + override val maxRank: Int = 1 + + val buff = object : Buff() { + override val name: String = Companion.name + override val durationMs: Int = -1 + override val hidden: Boolean = true + + override fun modifyStats(sp: SimParticipant): Stats { + // TODO: is it easier to do this than add the 5% crit on each spell call? + return Stats(spellCritRating = 5 * Rating.critPerPct) + } + } + + override fun buffs(sp: SimParticipant): List = listOf(buff) +} \ No newline at end of file diff --git a/src/commonMain/kotlin/character/classes/druid/talents/NaturesGrace.kt b/src/commonMain/kotlin/character/classes/druid/talents/NaturesGrace.kt new file mode 100644 index 000000000..53ed8cb3f --- /dev/null +++ b/src/commonMain/kotlin/character/classes/druid/talents/NaturesGrace.kt @@ -0,0 +1,64 @@ +package character.classes.druid.talents + +import character.Ability +import character.Buff +import character.Proc +import character.Talent +import data.model.Item +import sim.Event +import sim.SimParticipant + +/** + * + */ +class NaturesGrace(currentRank: Int) : Talent(currentRank) { + companion object { + const val name = "Nature's Grace" + } + + override val name: String = Companion.name + override val maxRank: Int = 1 + + val consumeProc = fun(buff: Buff): Proc { + return object: Proc() { + override val triggers: List = listOf( + Trigger.DRUID_CAST_STARFIRE, + Trigger.DRUID_CAST_WRATH + ) + override val type: Type = Type.STATIC + + override fun proc(sp: SimParticipant, items: List?, ability: Ability?, event: Event?) { + sp.consumeBuff(buff) + } + } + } + + val postCritBuff = object : Buff() { + override val name: String = "Nature's Grace" + override val durationMs: Int = 15000 + override val maxCharges: Int = 1 + + val proc = consumeProc(this) + + override fun procs(sp: SimParticipant): List = listOf(proc) + } + + val staticBuff = object : Buff() { + override val name: String = "Nature's Grace (static)" + override val durationMs: Int = -1 + override val hidden: Boolean = true + + val onCritProc = object : Proc() { + override val triggers: List = listOf(Trigger.SPELL_CRIT) + override val type: Type = Type.STATIC + + override fun proc(sp: SimParticipant, items: List?, ability: Ability?, event: Event?) { + sp.addBuff(postCritBuff) + } + } + + override fun procs(sp: SimParticipant): List = listOf(onCritProc) + } + + override fun buffs(sp: SimParticipant): List = listOf(staticBuff) +} \ No newline at end of file diff --git a/src/commonMain/kotlin/character/classes/druid/talents/NaturesReach.kt b/src/commonMain/kotlin/character/classes/druid/talents/NaturesReach.kt new file mode 100644 index 000000000..2b757b41d --- /dev/null +++ b/src/commonMain/kotlin/character/classes/druid/talents/NaturesReach.kt @@ -0,0 +1,19 @@ +package character.classes.druid.talents + +import character.Talent + +/** + * + */ +class NaturesReach(currentRank: Int) : Talent(currentRank) { + companion object { + const val name = "Nature's Reach" + } + + override val name: String = Companion.name + override val maxRank: Int = 2 + + fun increasedBalanceSpellRangePercent() : Double { + return 10.0 * currentRank + } +} \ No newline at end of file diff --git a/src/commonMain/kotlin/character/classes/druid/talents/StarlightWrath.kt b/src/commonMain/kotlin/character/classes/druid/talents/StarlightWrath.kt new file mode 100644 index 000000000..b71f958e3 --- /dev/null +++ b/src/commonMain/kotlin/character/classes/druid/talents/StarlightWrath.kt @@ -0,0 +1,19 @@ +package character.classes.druid.talents + +import character.Talent + +/** + * + */ +class StarlightWrath(currentRank: Int) : Talent(currentRank) { + companion object { + const val name = "Starlight Wrath" + } + + override val name: String = Companion.name + override val maxRank: Int = 5 + + fun reducedWrathCooldownSeconds() : Double { + return 0.1 * currentRank; + } +} \ No newline at end of file diff --git a/src/commonMain/kotlin/character/classes/druid/talents/Vengeance.kt b/src/commonMain/kotlin/character/classes/druid/talents/Vengeance.kt new file mode 100644 index 000000000..b4dde2c8a --- /dev/null +++ b/src/commonMain/kotlin/character/classes/druid/talents/Vengeance.kt @@ -0,0 +1,19 @@ +package character.classes.druid.talents + +import character.Talent + +/** + * + */ +class Vengeance(currentRank: Int) : Talent(currentRank) { + companion object { + const val name = "Vengeance" + } + + override val name: String = Companion.name + override val maxRank: Int = 5 + + fun increasedCritBonusDamagePercent() : Double { + return 0.2 * currentRank + } +} \ No newline at end of file diff --git a/src/commonMain/kotlin/character/classes/druid/talents/WrathOfCenarius.kt b/src/commonMain/kotlin/character/classes/druid/talents/WrathOfCenarius.kt new file mode 100644 index 000000000..fdc25e402 --- /dev/null +++ b/src/commonMain/kotlin/character/classes/druid/talents/WrathOfCenarius.kt @@ -0,0 +1,23 @@ +package character.classes.druid.talents + +import character.Talent + +/** + * + */ +class WrathOfCenarius(currentRank: Int) : Talent(currentRank) { + companion object { + const val name = "Wrath of Cenarius" + } + + override val name: String = Dreamstate.name + override val maxRank: Int = 5 + + fun increasedSpellfireDamagePercent() : Double { + return .04 * currentRank + } + + fun increasedWrathDamagePercent() : Double { + return .02 * currentRank + } +} \ No newline at end of file diff --git a/src/commonMain/kotlin/sim/SimParticipant.kt b/src/commonMain/kotlin/sim/SimParticipant.kt index b2f64c6f6..a7a633cd8 100644 --- a/src/commonMain/kotlin/sim/SimParticipant.kt +++ b/src/commonMain/kotlin/sim/SimParticipant.kt @@ -20,6 +20,7 @@ import sim.rotation.Rotation import sim.rotation.Rule import kotlin.js.JsExport import kotlin.math.floor +import kotlin.reflect.KClass @JsExport class SimParticipant(val character: Character, val rotation: Rotation, val sim: SimIteration, val owner: SimParticipant? = null, val epStatMod: Stats? = null) { @@ -117,6 +118,10 @@ class SimParticipant(val character: Character, val rotation: Rotation, val sim: return this } + inline fun getTalent(talentName: String): T? { + return this.character.klass.talents[talentName] as T + } + fun onGcd(): Boolean { return sim.elapsedTimeMs < gcdEndMs }