Skip to content

Commit

Permalink
fix blade of shahram
Browse files Browse the repository at this point in the history
  • Loading branch information
kayla-glick committed Dec 23, 2024
1 parent 29f0022 commit 84adfc1
Showing 1 changed file with 48 additions and 48 deletions.
96 changes: 48 additions & 48 deletions sim/common/vanilla/item_effects.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,34 +286,34 @@ func init() {
},
})

// This isn't explicit in-game but using a safe value that will likely never be hit
numFistOfShahramAuras := 8
fistOfShahramAuras := []*core.Aura{}
for i := 0; i < numFistOfShahramAuras; i++ {
fistOfShahramAuras = append(fistOfShahramAuras, character.GetOrRegisterAura(core.Aura{
ActionID: core.ActionID{SpellID: 16601},
Label: fmt.Sprintf("Fist of Shahram (%d)", i),
Duration: time.Second * 8,
OnGain: func(aura *core.Aura, sim *core.Simulation) {
character.MultiplyAttackSpeed(sim, 1.3)
},
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
character.MultiplyAttackSpeed(sim, 1/(1.3))
},
}))
}

fistOfShahram := character.GetOrRegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 16601},
SpellSchool: core.SpellSchoolArcane,
DefenseType: core.DefenseTypeMagic,
ProcMask: core.ProcMaskEmpty,
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
counter := 0

for counter < 10 {
fistOfShahramAura := character.GetOrRegisterAura(core.Aura{
ActionID: core.ActionID{SpellID: 16601},
Label: fmt.Sprintf("Fist of Shahram (%d)", counter),
Duration: time.Second * 8,
OnGain: func(aura *core.Aura, sim *core.Simulation) {
character.MultiplyAttackSpeed(sim, 1.3)
},
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
character.MultiplyAttackSpeed(sim, 1/(1.3))
},
})

if !fistOfShahramAura.IsActive() {
fistOfShahramAura.Activate(sim)
for i := 0; i < numFistOfShahramAuras; i++ {
if aura := fistOfShahramAuras[i]; !aura.IsActive() {
aura.Activate(sim)
break
}

counter += 1

}
},
})
Expand Down Expand Up @@ -348,43 +348,43 @@ func init() {
},
})

// This isn't explicit in-game but using a safe value that will likely never be hit
numWillOfShahramAuras := 8
willOfShahramAuras := []*core.Aura{}
willOfShahramStats := stats.Stats{
stats.Agility: 50,
stats.Intellect: 50,
stats.Stamina: 50,
stats.Spirit: 50,
stats.Strength: 50,
}

for i := 0; i < numWillOfShahramAuras; i++ {
willOfShahramAuras = append(willOfShahramAuras, character.GetOrRegisterAura(core.Aura{
ActionID: core.ActionID{SpellID: 16598},
Label: fmt.Sprintf("Will of Shahram (%d)", i),
Duration: time.Second * 20,
OnGain: func(aura *core.Aura, sim *core.Simulation) {
character.AddStatsDynamic(sim, willOfShahramStats)
},
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
character.AddStatsDynamic(sim, willOfShahramStats.Invert())
},
}))
}

willOfShahram := character.GetOrRegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 16598},
SpellSchool: core.SpellSchoolArcane,
DefenseType: core.DefenseTypeMagic,
ProcMask: core.ProcMaskEmpty,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
counter := 0

stats := stats.Stats{
stats.Agility: 50,
stats.Intellect: 50,
stats.Stamina: 50,
stats.Spirit: 50,
stats.Strength: 50,
}

for counter < 10 {
willOfShahram := character.GetOrRegisterAura(core.Aura{
ActionID: core.ActionID{SpellID: 16598},
Label: fmt.Sprintf("Will of Shahram (%d)", counter),
Duration: time.Second * 20,
OnGain: func(aura *core.Aura, sim *core.Simulation) {
character.AddStatsDynamic(sim, stats)
},
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
character.AddStatsDynamic(sim, stats.Multiply(-1.0))
},
})

if !willOfShahram.IsActive() {
willOfShahram.Activate(sim)
for i := 0; i < numWillOfShahramAuras; i++ {
if aura := willOfShahramAuras[i]; !aura.IsActive() {
aura.Activate(sim)
break
}

counter += 1

}
},
})
Expand Down

0 comments on commit 84adfc1

Please sign in to comment.