Skip to content

Commit 3948d6f

Browse files
committed
Merge branch 'master' into feature/aoe-cap-multiplier-flag
2 parents f515999 + 76632a0 commit 3948d6f

33 files changed

Lines changed: 2890 additions & 2952 deletions

sim/core/TestProtoVersioning.results

Lines changed: 0 additions & 1 deletion
This file was deleted.

sim/core/buffs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1201,7 +1201,7 @@ func StormLashAura(character *Character, actionTag int32) *Aura {
12011201
}
12021202

12031203
baseMultiplierExtension := getStormLashSpellOverride(spell)
1204-
ap := Ternary(spell.IsMelee(), stormlashSpell.MeleeAttackPower(), stormlashSpell.RangedAttackPower())
1204+
ap := Ternary(spell.IsRanged(), stormlashSpell.RangedAttackPower(), stormlashSpell.MeleeAttackPower())
12051205
sp := stormlashSpell.SpellPower()
12061206
scaledAP := ap * 0.2
12071207
scaledSP := sp * 0.3

sim/core/raid.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,19 @@ func (raid *Raid) GetFirstEmptyRaidIndex() (*Party, int) {
210210
panic("Raid is full")
211211
}
212212

213+
func (raid *Raid) GetTargetDummies() []*TargetDummy {
214+
var targetDummies = []*TargetDummy{}
215+
for _, party := range raid.Parties {
216+
for _, player := range party.Players {
217+
dummy, ok := player.(*TargetDummy)
218+
if ok {
219+
targetDummies = append(targetDummies, dummy)
220+
}
221+
}
222+
}
223+
return targetDummies
224+
}
225+
213226
func (raid *Raid) GetFirstTargetDummy() *TargetDummy {
214227
for _, party := range raid.Parties {
215228
for _, player := range party.Players {

sim/druid/_lacerate.go

Lines changed: 0 additions & 97 deletions
This file was deleted.

sim/druid/_talents.go

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -690,30 +690,6 @@ func (druid *Druid) applyStampede() {
690690
})
691691
}
692692

693-
// Modifies the Bleed aura to apply the bonus.
694-
func (druid *Druid) applyRendAndTear(aura core.Aura) core.Aura {
695-
if druid.FerociousBite == nil || druid.Talents.RendAndTear == 0 || druid.AssumeBleedActive {
696-
return aura
697-
}
698-
699-
bonusCritPercent := []float64{0.0, 8.0, 17.0, 25.0}[druid.Talents.RendAndTear]
700-
701-
aura.ApplyOnGain(func(aura *core.Aura, sim *core.Simulation) {
702-
if druid.BleedsActive == 0 {
703-
druid.FerociousBite.BonusCritPercent += bonusCritPercent
704-
}
705-
druid.BleedsActive++
706-
})
707-
aura.ApplyOnExpire(func(aura *core.Aura, sim *core.Simulation) {
708-
druid.BleedsActive--
709-
if druid.BleedsActive == 0 {
710-
druid.FerociousBite.BonusCritPercent -= bonusCritPercent
711-
}
712-
})
713-
714-
return aura
715-
}
716-
717693
// func (druid *Druid) applyEclipse() {
718694
// druid.SolarICD = core.Cooldown{Timer: druid.NewTimer(), Duration: 0}
719695
// druid.LunarICD = core.Cooldown{Timer: druid.NewTimer(), Duration: 0}

sim/druid/druid.go

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ type Druid struct {
5050
MangleBear *DruidSpell
5151
MangleCat *DruidSpell
5252
Maul *DruidSpell
53-
MaulQueueSpell *DruidSpell
5453
Moonfire *DruidSpell
55-
Pulverize *DruidSpell
5654
Rebirth *DruidSpell
5755
Rake *DruidSpell
5856
Ravage *DruidSpell
@@ -79,8 +77,8 @@ type Druid struct {
7977
BarkskinAura *core.Aura
8078
BlazeOfGloryAura *core.Aura
8179
BearFormAura *core.Aura
82-
BerserkAura *core.Aura
83-
BerserkProcAura *core.Aura
80+
BerserkBearAura *core.Aura
81+
BerserkCatAura *core.Aura
8482
CatFormAura *core.Aura
8583
ClearcastingAura *core.Aura
8684
DemoralizingRoarAuras core.AuraArray
@@ -98,11 +96,7 @@ type Druid struct {
9896
StampedeBearAura *core.Aura
9997
SurvivalInstinctsAura *core.Aura
10098

101-
BleedCategories core.ExclusiveCategoryArray
102-
103-
PrimalMadnessRageMetrics *core.ResourceMetrics
104-
PrimalPrecisionRecoveryMetrics *core.ResourceMetrics
105-
SavageRoarDurationTable [6]time.Duration
99+
SavageRoarDurationTable [6]time.Duration
106100

107101
ProcOoc func(sim *core.Simulation)
108102

@@ -119,8 +113,6 @@ type Druid struct {
119113
GuardianLeatherSpecDep *stats.StatDependency
120114

121115
// Item sets
122-
T11Feral2pBonus *core.Aura
123-
T11Feral4pBonus *core.Aura
124116
T13Feral4pBonus *core.Aura
125117
}
126118

@@ -298,15 +290,14 @@ func (druid *Druid) RegisterFeralCatSpells() {
298290
// druid.registerBerserkCD()
299291
// druid.registerCatCharge()
300292
druid.registerCatFormSpell()
301-
// druid.registerEnrageSpell()
302-
// druid.registerFerociousBiteSpell()
303-
// druid.registerLacerateSpell()
304-
// druid.registerMangleBearSpell()
305-
// druid.registerMangleCatSpell()
306-
// druid.registerMaulSpell()
293+
druid.registerFerociousBiteSpell()
294+
druid.registerLacerateSpell()
295+
druid.registerMangleBearSpell()
296+
druid.registerMangleCatSpell()
297+
druid.registerMaulSpell()
307298
// druid.registerRakeSpell()
308299
// druid.registerRavageSpell()
309-
// druid.registerRipSpell()
300+
druid.registerRipSpell()
310301
// druid.registerSavageRoarSpell()
311302
// druid.registerShredSpell()
312303
//druid.registerSwipeBearSpell()
@@ -321,11 +312,10 @@ func (druid *Druid) RegisterFeralTankSpells() {
321312
// druid.registerBerserkCD()
322313
//druid.registerDemoralizingRoarSpell()
323314
// druid.registerEnrageSpell()
324-
//druid.registerFrenziedRegenerationCD()
325-
// druid.registerMangleBearSpell()
326-
// druid.registerMaulSpell()
327-
// druid.registerLacerateSpell()
328-
// druid.registerPulverizeSpell()
315+
druid.registerFrenziedRegenerationSpell()
316+
druid.registerMangleBearSpell()
317+
druid.registerMaulSpell()
318+
druid.registerLacerateSpell()
329319
// druid.registerRakeSpell()
330320
// druid.registerRipSpell()
331321
//druid.registerSavageDefensePassive()
@@ -403,11 +393,6 @@ func (ds *DruidSpell) IsEqual(s *core.Spell) bool {
403393
func (druid *Druid) UpdateBleedPower(bleedSpell *DruidSpell, sim *core.Simulation, target *core.Unit, updateCurrent bool, updateNew bool) {
404394
snapshotPower := bleedSpell.ExpectedTickDamage(sim, target)
405395

406-
// Assume that Mangle will be up soon if not currently active.
407-
if !druid.BleedCategories.Get(target).AnyActive() {
408-
snapshotPower *= 1.3
409-
}
410-
411396
if updateCurrent {
412397
bleedSpell.CurrentSnapshotPower = snapshotPower
413398

sim/druid/faerie_fire.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,20 @@ func (druid *Druid) registerFaerieFireSpell() {
5959
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
6060
baseDamage := 0.0
6161
outcome := spell.OutcomeMagicHit
62+
6263
if druid.InForm(Bear) {
6364
baseDamage = 10.0 + 0.302*spell.MeleeAttackPower()
6465
outcome = spell.OutcomeMagicHitAndCrit
6566
}
6667

6768
result := spell.CalcAndDealDamage(sim, target, baseDamage, outcome)
69+
6870
if result.Landed() {
6971
druid.TryApplyFaerieFireEffect(sim, target)
72+
73+
if druid.InForm(Bear) && sim.Proc(0.25, "Mangle CD Reset") {
74+
druid.MangleBear.CD.Reset()
75+
}
7076
}
7177
},
7278

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,20 @@ import (
66
"github.com/wowsims/mop/sim/core"
77
)
88

9+
const RendAndTearBonusCritPercent = 35.0
10+
911
func (druid *Druid) registerFerociousBiteSpell() {
1012
// Raw parameters from spell database
11-
coefficient := 0.38299998641
12-
variance := 0.74000000954
13-
resourceCoefficient := 0.58399999142
13+
const coefficient = 0.45699998736
14+
const variance = 0.74000000954
15+
const resourceCoefficient = 0.69599997997
16+
const scalingPerComboPoint = 0.196
1417

1518
// Scaled parameters for spell code
1619
avgBaseDamage := coefficient * druid.ClassSpellScaling
1720
damageSpread := variance * avgBaseDamage
1821
minBaseDamage := avgBaseDamage - damageSpread/2
1922
dmgPerComboPoint := resourceCoefficient * druid.ClassSpellScaling
20-
scalingPerComboPoint := 0.125
21-
ripRefreshChance := 0.5 * float64(druid.Talents.BloodInTheWater)
2223

2324
druid.FerociousBite = druid.RegisterSpell(Cat, core.SpellConfig{
2425
ActionID: core.ActionID{SpellID: 22568},
@@ -40,8 +41,8 @@ func (druid *Druid) registerFerociousBiteSpell() {
4041
return druid.ComboPoints() > 0
4142
},
4243

43-
BonusCritPercent: core.TernaryFloat64(druid.AssumeBleedActive, []float64{0.0, 8.0, 17.0, 25.0}[druid.Talents.RendAndTear], 0),
44-
DamageMultiplier: 1 + 0.05*float64(druid.Talents.FeralAggression),
44+
BonusCritPercent: core.TernaryFloat64(druid.AssumeBleedActive, RendAndTearBonusCritPercent, 0),
45+
DamageMultiplier: 1,
4546
CritMultiplier: druid.DefaultCritMultiplier(),
4647
ThreatMultiplier: 1,
4748
MaxRange: core.MaxMeleeRange,
@@ -61,15 +62,14 @@ func (druid *Druid) registerFerociousBiteSpell() {
6162

6263
if result.Landed() {
6364
druid.SpendEnergy(sim, excessEnergy, spell.EnergyMetrics())
64-
druid.ApplyFeral4pT12(sim)
6565
druid.SpendComboPoints(sim, spell.ComboPointMetrics())
6666

6767
// Blood in the Water
6868
ripDot := druid.Rip.Dot(target)
6969

70-
if sim.IsExecutePhase25() && ripDot.IsActive() && sim.Proc(ripRefreshChance, "Blood in the Water") {
70+
if sim.IsExecutePhase25() && ripDot.IsActive() {
7171
ripDot.BaseTickCount = RipBaseNumTicks
72-
ripDot.Apply(sim)
72+
ripDot.ApplyRollover(sim)
7373
}
7474
} else {
7575
spell.IssueRefund(sim)
@@ -94,3 +94,26 @@ func (druid *Druid) registerFerociousBiteSpell() {
9494
func (druid *Druid) CurrentFerociousBiteCost() float64 {
9595
return druid.FerociousBite.Cost.GetCurrentCost()
9696
}
97+
98+
// Modifies the Bleed aura to apply the bonus.
99+
func (druid *Druid) applyRendAndTear(aura core.Aura) core.Aura {
100+
if druid.FerociousBite == nil || druid.AssumeBleedActive {
101+
return aura
102+
}
103+
104+
aura.ApplyOnGain(func(_ *core.Aura, _ *core.Simulation) {
105+
if druid.BleedsActive == 0 {
106+
druid.FerociousBite.BonusCritPercent += RendAndTearBonusCritPercent
107+
}
108+
druid.BleedsActive++
109+
})
110+
aura.ApplyOnExpire(func(_ *core.Aura, _ *core.Simulation) {
111+
druid.BleedsActive--
112+
if druid.BleedsActive == 0 {
113+
druid.FerociousBite.BonusCritPercent -= RendAndTearBonusCritPercent
114+
}
115+
})
116+
117+
return aura
118+
}
119+

0 commit comments

Comments
 (0)