Skip to content

Commit

Permalink
First pass at mage
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Nov 26, 2024
1 parent e5b8875 commit 32d6cd7
Show file tree
Hide file tree
Showing 23 changed files with 39 additions and 1,615 deletions.
56 changes: 0 additions & 56 deletions sim/mage/arcane_barrage.go

This file was deleted.

106 changes: 0 additions & 106 deletions sim/mage/arcane_blast.go

This file was deleted.

13 changes: 2 additions & 11 deletions sim/mage/arcane_missiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"time"

"github.com/wowsims/classic/sim/core"
"github.com/wowsims/classic/sim/core/proto"
)

const ArcaneMissilesRanks = 8
Expand Down Expand Up @@ -41,9 +40,6 @@ func (mage *Mage) getArcaneMissilesSpellConfig(rank int) core.SpellConfig {
numTicks := castTime
tickLength := time.Second

hasArcaneBlastRune := mage.HasRune(proto.MageRune_RuneHandsArcaneBlast)
hasMissileBarrageRune := mage.HasRune(proto.MageRune_RuneBeltMissileBarrage)

tickSpell := mage.getArcaneMissilesTickSpell(rank)
mage.ArcaneMissilesTickSpell[rank] = tickSpell

Expand Down Expand Up @@ -74,14 +70,13 @@ func (mage *Mage) getArcaneMissilesSpellConfig(rank int) core.SpellConfig {
// TODO: This check is necessary to ensure the final tick occurs before
// Arcane Blast stacks are dropped. To fix this, ticks need to reliably
// occur before aura expirations.

//TODO: Test interaction in classic code without aura
dot := mage.ArcaneMissiles[rank].Dot(aura.Unit)
if dot.TickCount < dot.NumberOfTicks {
dot.TickCount++
dot.TickOnce(sim)
}
if hasArcaneBlastRune && mage.ArcaneBlastAura.IsActive() {
mage.ArcaneBlastAura.Deactivate(sim)
}
},
},
NumberOfTicks: numTicks,
Expand All @@ -93,10 +88,6 @@ func (mage *Mage) getArcaneMissilesSpellConfig(rank int) core.SpellConfig {

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
spell.Dot(target).Apply(sim)

if hasMissileBarrageRune && mage.MissileBarrageAura.IsActive() {
mage.MissileBarrageAura.Deactivate(sim)
}
},
ExpectedTickDamage: func(sim *core.Simulation, target *core.Unit, spell *core.Spell, _ bool) *core.SpellResult {
return tickSpell.CalcDamage(sim, target, baseTickDamage, spell.OutcomeExpectedMagicHitAndCrit)
Expand Down
86 changes: 0 additions & 86 deletions sim/mage/arcane_surge.go

This file was deleted.

29 changes: 0 additions & 29 deletions sim/mage/armors.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package mage

import (
"github.com/wowsims/classic/sim/core"
"github.com/wowsims/classic/sim/core/proto"
"github.com/wowsims/classic/sim/core/stats"
)

Expand Down Expand Up @@ -94,31 +93,3 @@ func (mage *Mage) applyMageArmor() {
},
}))
}

func (mage *Mage) applyMoltenArmor() {
if !mage.HasRune(proto.MageRune_RuneBracersMoltenArmor) {
return
}

crit := 5.0 * core.SpellCritRatingPerCritChance

mage.MoltenArmorAura = core.MakePermanent(mage.RegisterAura(core.Aura{
Label: "Molten Armor",
ActionID: core.ActionID{SpellID: int32(proto.MageRune_RuneBracersMoltenArmor)},
BuildPhase: core.CharacterBuildPhaseBuffs,
OnGain: func(aura *core.Aura, sim *core.Simulation) {
if aura.Unit.Env.MeasuringStats && aura.Unit.Env.State != core.Finalized {
mage.AddStat(stats.SpellCrit, crit)
} else {
mage.AddStatDynamic(sim, stats.SpellCrit, crit)
}
},
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
if aura.Unit.Env.MeasuringStats && aura.Unit.Env.State != core.Finalized {
mage.AddStat(stats.SpellCrit, -crit)
} else {
mage.AddStatDynamic(sim, stats.SpellCrit, -crit)
}
},
}))
}
Loading

0 comments on commit 32d6cd7

Please sign in to comment.