Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into resource-values
Browse files Browse the repository at this point in the history
  • Loading branch information
rosenrusinov committed Mar 20, 2024
2 parents 78cee68 + b4f0911 commit 98604bc
Show file tree
Hide file tree
Showing 36 changed files with 855 additions and 847 deletions.
11 changes: 7 additions & 4 deletions sim/_paladin/talents.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,15 @@ func (paladin *Paladin) applyArdentDefender() {

// Spell to heal you when AD has procced; fire this before fatal damage so that a Death is not detected
procHeal := paladin.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 66233},
SpellSchool: core.SpellSchoolHoly,
ProcMask: core.ProcMaskSpellHealing,
CritMultiplier: 1, // Assuming this can't really crit?
ActionID: core.ActionID{SpellID: 66233},
SpellSchool: core.SpellSchoolHoly,
ProcMask: core.ProcMaskSpellHealing,

CritMultiplier: 1, // Assuming this can't really crit?

ThreatMultiplier: 0.25,
DamageMultiplier: 1,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
spell.CalcAndDealHealing(sim, &paladin.Unit, ardentHealAmount*paladin.MaxHealth(), spell.OutcomeHealingCrit)
},
Expand Down
8 changes: 7 additions & 1 deletion sim/common/itemhelpers/weaponprocs.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,22 @@ import (
// Create a simple weapon proc that deals damage.
func CreateWeaponProcDamage(itemId int32, itemName string, ppm float64, spellId int32, school core.SpellSchool,
dmgMin float64, dmgRange float64, bonusCoef float64, defType core.DefenseType) {

core.NewItemEffect(itemId, func(agent core.Agent) {
character := agent.GetCharacter()

critMultiplier := character.DefaultSpellCritMultiplier()
if defType == core.DefenseTypeMelee || defType == core.DefenseTypeRanged {
critMultiplier = character.DefaultMeleeCritMultiplier()
}

sc := core.SpellConfig{
ActionID: core.ActionID{SpellID: spellId},
SpellSchool: school,
ProcMask: core.ProcMaskEmpty,

DamageMultiplier: 1,
CritMultiplier: character.DefaultSpellCritMultiplier(),
CritMultiplier: critMultiplier,
ThreatMultiplier: 1,
}

Expand Down
8 changes: 2 additions & 6 deletions sim/common/sod/crafted/phase_2.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,9 @@ func init() {
},

DamageMultiplier: 1,
CritMultiplier: 1,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
// TODO: Verify if this can crit
result := spell.CalcDamage(sim, &character.Unit, sim.Roll(343, 757), spell.OutcomeMagicCrit)
result := spell.CalcDamage(sim, &character.Unit, sim.Roll(343, 757), spell.OutcomeAlwaysHit)
if sim.Log != nil {
character.Log(sim, "Took %.1f damage from Gneuro-Logical Shock.", result.Damage)
}
Expand Down Expand Up @@ -264,11 +262,9 @@ func init() {
},

DamageMultiplier: 1,
CritMultiplier: 1,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
// TODO: Verify if this can crit
result := spell.CalcDamage(sim, &character.Unit, sim.Roll(312, 668), spell.OutcomeMagicCrit)
result := spell.CalcDamage(sim, &character.Unit, sim.Roll(312, 668), spell.OutcomeAlwaysHit)
character.RemoveHealth(sim, result.Damage)
buffAura.Activate(sim)
},
Expand Down
13 changes: 5 additions & 8 deletions sim/common/sod/enchant_effects.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,18 @@ func init() {
core.NewEnchantEffect(7210, func(agent core.Agent) {
character := agent.GetCharacter()

procChance := 0.10
baseDamageLow := 60.0
baseDamageHigh := 90.0

procSpell := character.GetOrRegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 439164},
SpellSchool: core.SpellSchoolNature,
ProcMask: core.ProcMaskSpellDamage,

CritMultiplier: character.DefaultSpellCritMultiplier(),

DamageMultiplier: 1,
CritMultiplier: 1,
ThreatMultiplier: 1,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
spell.CalcAndDealDamage(sim, target, sim.Roll(baseDamageLow, baseDamageHigh), spell.OutcomeMagicHitAndCrit)
spell.CalcAndDealDamage(sim, target, sim.Roll(60, 90), spell.OutcomeMagicHitAndCrit)
},
})

Expand Down Expand Up @@ -74,7 +71,7 @@ func init() {
}

if spell.ProcMask.Matches(core.ProcMaskSpellDamage) {
if sim.RandomFloat("Dismantle") < procChance {
if sim.RandomFloat("Dismantle") < 0.10 {
// Spells proc both Main-Hand and Off-Hand if both are enchanted
if character.GetMHWeapon() != nil && character.GetMHWeapon().Enchant.EffectID == 7210 {
procSpell.Cast(sim, result.Target)
Expand All @@ -83,7 +80,7 @@ func init() {
procSpell.Cast(sim, result.Target)
}
}
} else if sim.RandomFloat("Dismantle") < procChance {
} else if sim.RandomFloat("Dismantle") < 0.10 {
// Physical hits only proc on the hand that was hit with
procSpell.Cast(sim, result.Target)
}
Expand Down
1 change: 1 addition & 0 deletions sim/core/aura.go
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@ func (aura *Aura) Activate(sim *Simulation) {
aura.onPeriodicHealTakenIndex = int32(len(aura.Unit.onPeriodicHealTakenAuras))
aura.Unit.onPeriodicHealTakenAuras = append(aura.Unit.onPeriodicHealTakenAuras, aura)
}

if aura.OnRageChange != nil {
aura.onRageChangeIndex = int32(len(aura.Unit.onRageChangeAuras))
aura.Unit.onRageChangeAuras = append(aura.Unit.onRageChangeAuras, aura)
Expand Down
23 changes: 14 additions & 9 deletions sim/core/consumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func applyConsumeEffects(agent Agent, partyBuffs *proto.PartyBuffs) {
}

if consumes.DragonBreathChili {
MakePermanent(DragonBreathChiliAura(&character.Unit))
MakePermanent(DragonBreathChiliAura(character))
}

if consumes.AgilityElixir != proto.AgilityElixir_AgilityElixirUnknown {
Expand Down Expand Up @@ -464,26 +464,27 @@ func registerExplosivesCD(agent Agent, consumes *proto.Consumes) {
}
}

func DragonBreathChiliAura(unit *Unit) *Aura {
func DragonBreathChiliAura(character *Character) *Aura {
baseDamage := 60.0
procChance := .05

procSpell := unit.RegisterSpell(SpellConfig{
procSpell := character.RegisterSpell(SpellConfig{
ActionID: ActionID{SpellID: 15851},
SpellSchool: SpellSchoolFire,
ProcMask: ProcMaskEmpty,
Flags: SpellFlagNone,

CritMultiplier: character.DefaultSpellCritMultiplier(),

DamageMultiplier: 1,
CritMultiplier: 1,
ThreatMultiplier: 1,

ApplyEffects: func(sim *Simulation, target *Unit, spell *Spell) {
spell.CalcAndDealDamage(sim, target, baseDamage+spell.SpellDamage(), spell.OutcomeMagicHitAndCrit)
},
})

aura := unit.GetOrRegisterAura(Aura{
aura := character.GetOrRegisterAura(Aura{
Label: "Dragonbreath Chili",
ActionID: ActionID{SpellID: 15852},
Duration: NeverExpires,
Expand Down Expand Up @@ -529,9 +530,11 @@ func (character *Character) newBasicExplosiveSpellConfig(sharedTimer *Timer, act
},

// Explosives always have 1% resist chance, so just give them hit cap.
BonusHitRating: 100 * SpellHitRatingPerHitChance,
BonusHitRating: 100 * SpellHitRatingPerHitChance,

CritMultiplier: character.DefaultSpellCritMultiplier(),

DamageMultiplier: 1,
CritMultiplier: 2,
ThreatMultiplier: 1,

ApplyEffects: func(sim *Simulation, target *Unit, spell *Spell) {
Expand Down Expand Up @@ -584,9 +587,11 @@ func (character *Character) newRadiationBombSpellConfig(sharedTimer *Timer, acti
},

// Explosives always have 1% resist chance, so just give them hit cap.
BonusHitRating: 100 * SpellHitRatingPerHitChance,
BonusHitRating: 100 * SpellHitRatingPerHitChance,

CritMultiplier: character.DefaultSpellCritMultiplier(),

DamageMultiplier: 1,
CritMultiplier: 2,
ThreatMultiplier: 1,

// TODO: This should use another spell (443813) as the DoT
Expand Down
4 changes: 2 additions & 2 deletions sim/druid/feral/TestFeral.results
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,8 @@ dps_results: {
dps_results: {
key: "TestFeral-Lvl40-AllItems-StormshroudArmor"
value: {
dps: 497.55193
tps: 367.72499
dps: 497.54349
tps: 367.719
}
}
dps_results: {
Expand Down
3 changes: 2 additions & 1 deletion sim/encounters/naxxramas/patchwerk10_ai.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ func (ai *Patchwerk10AI) registerHatefulStrikeSpell(target *core.Target) {
},
},

CritMultiplier: 1,

DamageMultiplier: 1,
CritMultiplier: 1,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := sim.Roll(27750, 32250)
Expand Down
3 changes: 2 additions & 1 deletion sim/encounters/naxxramas/patchwerk25_ai.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ func (ai *Patchwerk25AI) registerHatefulStrikeSpell(target *core.Target) {
},
},

CritMultiplier: 1,

DamageMultiplier: 1,
CritMultiplier: 1,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := sim.Roll(79000, 81000)
Expand Down
Loading

0 comments on commit 98604bc

Please sign in to comment.