Skip to content

Commit

Permalink
Merge pull request #49 from wowsims/Hemo
Browse files Browse the repository at this point in the history
Hemo
  • Loading branch information
sanguinerarogue authored Dec 23, 2024
2 parents d2f19ea + a8ee583 commit 1e13f95
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 31 deletions.
18 changes: 5 additions & 13 deletions sim/core/debuffs.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,23 +493,15 @@ func GiftOfArthasAura(target *Unit) *Aura {
})
}

func HemorrhageAura(target *Unit, casterLevel int32) *Aura {
debuffBonusDamage := map[int32]float64{
40: 3,
50: 5,
60: 7,
}[casterLevel]

spellID := map[int32]int32{
40: 16511,
50: 17347,
60: 17348,
}[casterLevel]
func HemorrhageAura(target *Unit) *Aura {
debuffBonusDamage := 7.0

spellID := int32(17348)

return target.GetOrRegisterAura(Aura{
Label: "Hemorrhage",
ActionID: ActionID{SpellID: spellID},
Duration: time.Second * 8,
Duration: time.Second * 15,
MaxStacks: 30,
OnGain: func(aura *Aura, sim *Simulation) {
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexPhysical] += debuffBonusDamage
Expand Down
22 changes: 4 additions & 18 deletions sim/rogue/hemorrhage.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,14 @@ func (rogue *Rogue) registerHemorrhageSpell() {
return
}

spellID := map[int32]int32{
40: 16511,
50: 17347,
60: 17348,
}[rogue.Level]
spellID := int32(17348)

actionID := core.ActionID{SpellID: spellID}

var numPlayers int
for _, u := range rogue.Env.Raid.AllUnits {
if u.Type == core.PlayerUnit {
numPlayers++
}
}

var hemoAuras core.AuraArray

if numPlayers >= 2 {
hemoAuras = rogue.NewEnemyAuraArray(func(target *core.Unit) *core.Aura {
return core.HemorrhageAura(target, rogue.Level)
})
}
hemoAuras = rogue.NewEnemyAuraArray(func(target *core.Unit) *core.Aura {
return core.HemorrhageAura(target)
})

rogue.Hemorrhage = rogue.RegisterSpell(core.SpellConfig{
SpellCode: SpellCode_RogueHemorrhage,
Expand Down

0 comments on commit 1e13f95

Please sign in to comment.