Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hemo #49

Merged
merged 2 commits into from
Dec 23, 2024
Merged

Hemo #49

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading