Skip to content
Merged
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
4 changes: 2 additions & 2 deletions sim/monk/blackout_kick.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (monk *Monk) registerBlackoutKick() {
},

ExtraCastCondition: func(sim *core.Simulation, target *core.Unit) bool {
return monk.GetChi() >= core.TernaryInt32(monk.T16Windwalker4P != nil && monk.T16Windwalker4P.IsActive(), chiCost-1, chiCost) || monk.ComboBreakerBlackoutKickAura.IsActive()
return monk.GetChi() >= monk.GetT16Windwalker4PCostReduction(chiCost) || monk.ComboBreakerBlackoutKickAura.IsActive()
},

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
Expand All @@ -90,7 +90,7 @@ func (monk *Monk) registerBlackoutKick() {
if monk.ComboBreakerBlackoutKickAura.IsActive() {
monk.onChiSpent(sim, chiCost)
} else {
monk.SpendChi(sim, core.TernaryInt32(monk.T16Windwalker4P != nil && monk.T16Windwalker4P.IsActive(), chiCost-1, chiCost), chiMetrics)
monk.SpendChi(sim, monk.GetT16Windwalker4PCostReduction(chiCost), chiCost, chiMetrics)
if monk.T16Windwalker4P != nil {
monk.T16Windwalker4P.Deactivate(sim)
}
Expand Down
3 changes: 2 additions & 1 deletion sim/monk/brewmaster/breath_of_fire.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ func (bm *BrewmasterMonk) registerBreathOfFire() {
actionID := core.ActionID{SpellID: 115181}
dotActionID := core.ActionID{SpellID: 123725}
chiMetrics := bm.NewChiMetrics(actionID)
chiCost := int32(2)

bm.RegisterSpell(core.SpellConfig{
ActionID: actionID,
Expand Down Expand Up @@ -72,7 +73,7 @@ func (bm *BrewmasterMonk) registerBreathOfFire() {
}
}

bm.SpendChi(sim, 2, chiMetrics)
bm.SpendChi(sim, chiCost, chiCost, chiMetrics)
},
})
}
3 changes: 2 additions & 1 deletion sim/monk/brewmaster/guard.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func (bm *BrewmasterMonk) registerGuard() {
actionID := core.ActionID{SpellID: spellId}
chiMetrics := bm.NewChiMetrics(actionID)
spellSchool := core.SpellSchoolPhysical | core.SpellSchoolArcane | core.SpellSchoolFire | core.SpellSchoolFrost | core.SpellSchoolHoly | core.SpellSchoolNature | core.SpellSchoolShadow
chiCost := int32(2)

if hasGlyph {
spellSchool ^= core.SpellSchoolPhysical
Expand Down Expand Up @@ -73,7 +74,7 @@ func (bm *BrewmasterMonk) registerGuard() {
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
aura.Activate(sim)
bm.PowerGuardAura.Deactivate(sim)
bm.SpendChi(sim, 2, chiMetrics)
bm.SpendChi(sim, chiCost, chiCost, chiMetrics)
},
RelatedSelfBuff: aura.Aura,
})
Expand Down
3 changes: 2 additions & 1 deletion sim/monk/brewmaster/purifying_brew.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ func (bm *BrewmasterMonk) registerPurifyingBrew() {
actionID := core.ActionID{SpellID: 119582}
chiMetrics := bm.NewChiMetrics(actionID)
t16Brewmaster4PHeal := bm.NewHealthMetrics(core.ActionID{SpellID: 145056})
chiCost := int32(1)

bm.RegisterSpell(core.SpellConfig{
ActionID: actionID,
Expand All @@ -37,7 +38,7 @@ func (bm *BrewmasterMonk) registerPurifyingBrew() {
if bm.T15Brewmaster4PProcEffect != nil && bm.T15Brewmaster4PProcEffect.IsActive() {
bm.T15Brewmaster4PProcEffect.Deactivate(sim)
} else {
bm.SpendChi(sim, 1, chiMetrics)
bm.SpendChi(sim, chiCost, chiCost, chiMetrics)
}
if bm.T16Brewmaster4P != nil && bm.T16Brewmaster4P.IsActive() {
bm.GainHealth(sim, outstandingDamage*0.15, t16Brewmaster4PHeal)
Expand Down
11 changes: 9 additions & 2 deletions sim/monk/monk.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ func (monk *Monk) AddChi(sim *core.Simulation, spell *core.Spell, pointsToAdd in
}
}

func (monk *Monk) SpendChi(sim *core.Simulation, chiToSpend int32, metrics *core.ResourceMetrics) {
func (monk *Monk) SpendChi(sim *core.Simulation, chiToSpend int32, realChiToSpend int32, metrics *core.ResourceMetrics) {
monk.SpendPartialComboPoints(sim, chiToSpend, metrics)
if monk.onChiSpent != nil {
monk.onChiSpent(sim, chiToSpend)
monk.onChiSpent(sim, realChiToSpend)
}
}

Expand All @@ -151,6 +151,13 @@ func (monk *Monk) RegisterOnNewBrewStacks(onNewBrewStacks OnNewBrewStacks) {
monk.onNewBrewStacks = onNewBrewStacks
}

func (monk *Monk) GetT16Windwalker4PCostReduction(chiCost int32) int32 {
if monk.T16Windwalker4P != nil && monk.T16Windwalker4P.IsActive() {
return chiCost - 1
}
return chiCost
}

func (monk *Monk) GetCharacter() *core.Character {
return &monk.Character
}
Expand Down
9 changes: 6 additions & 3 deletions sim/monk/stances.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ func (monk *Monk) registerStanceOfTheSturdyOx(stanceCD *core.Timer) {

currentChi := monk.GetChi()
if currentChi > 1 {
monk.SpendChi(sim, currentChi-1, chiMetrics)
currentChi -= 1
monk.SpendChi(sim, currentChi, currentChi, chiMetrics)
}
},
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
Expand Down Expand Up @@ -150,7 +151,8 @@ func (monk *Monk) registerStanceOfTheWiseSerpent(stanceCD *core.Timer) {

currentChi := monk.GetChi()
if currentChi > 1 {
monk.SpendChi(sim, currentChi-1, chiMetrics)
currentChi -= 1
monk.SpendChi(sim, currentChi, currentChi, chiMetrics)
}
},
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
Expand Down Expand Up @@ -190,7 +192,8 @@ func (monk *Monk) registerStanceOfTheFierceTiger(stanceCD *core.Timer) {

currentChi := monk.GetChi()
if currentChi > 1 {
monk.SpendChi(sim, currentChi-1, chiMetrics)
currentChi -= 1
monk.SpendChi(sim, currentChi, currentChi, chiMetrics)
}
},
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
Expand Down
2 changes: 1 addition & 1 deletion sim/monk/tiger_palm.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (monk *Monk) registerTigerPalm() {
if monk.ComboBreakerTigerPalmAura.IsActive() {
monk.onChiSpent(sim, chiCost)
} else {
monk.SpendChi(sim, chiCost, chiMetrics)
monk.SpendChi(sim, chiCost, chiCost, chiMetrics)
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion sim/monk/touch_of_death.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ func (monk *Monk) registerTouchOfDeath() {
actionID := core.ActionID{SpellID: 115080}
chiMetrics := monk.NewChiMetrics(actionID)
cooldown := time.Second*90 + core.TernaryDuration(hasGlyph, 2*time.Minute, 0)
chiCost := int32(3)

monk.RegisterSpell(core.SpellConfig{
ActionID: actionID,
Expand Down Expand Up @@ -47,7 +48,7 @@ func (monk *Monk) registerTouchOfDeath() {
if result.Landed() {
spell.DealDamage(sim, result)
if !hasGlyph {
monk.SpendChi(sim, 3, chiMetrics)
monk.SpendChi(sim, chiCost, chiCost, chiMetrics)
}
}
},
Expand Down
6 changes: 3 additions & 3 deletions sim/monk/windwalker/TestWindwalker.results
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ dps_results: {
dps_results: {
key: "TestWindwalker-AllItems-BattlegearofSevenSacredSeals"
value: {
dps: 235018.70571
tps: 221255.80239
hps: 9546.16676
dps: 237274.18473
tps: 223467.53006
hps: 9831.68677
}
}
dps_results: {
Expand Down
5 changes: 3 additions & 2 deletions sim/monk/ww_fists_of_fury.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func fistsOfFurySpellConfig(monk *Monk, isSEFClone bool, overrides core.SpellCon
func (monk *Monk) registerFistsOfFury() {
chiMetrics := monk.NewChiMetrics(fofActionID)
snapshotDamage := 0.0
chiCost := int32(3)

fistsOfFuryTickSpell := monk.RegisterSpell(fistsOfFuryTickSpellConfig(monk, nil, core.SpellConfig{
ApplyEffects: func(sim *core.Simulation, _ *core.Unit, spell *core.Spell) {
Expand Down Expand Up @@ -117,11 +118,11 @@ func (monk *Monk) registerFistsOfFury() {
},

ExtraCastCondition: func(sim *core.Simulation, target *core.Unit) bool {
return monk.GetChi() >= core.TernaryInt32(monk.T16Windwalker4P != nil && monk.T16Windwalker4P.IsActive(), 2, 3)
return monk.GetChi() >= monk.GetT16Windwalker4PCostReduction(chiCost)
},

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
monk.SpendChi(sim, core.TernaryInt32(monk.T16Windwalker4P != nil && monk.T16Windwalker4P.IsActive(), 2, 3), chiMetrics)
monk.SpendChi(sim, monk.GetT16Windwalker4PCostReduction(chiCost), chiCost, chiMetrics)
if monk.T16Windwalker4P != nil {
monk.T16Windwalker4P.Deactivate(sim)
}
Expand Down
5 changes: 3 additions & 2 deletions sim/monk/ww_rising_sun_kick.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func risingSunKickSpellConfig(monk *Monk, isSEFClone bool, overrides core.SpellC

func (monk *Monk) registerRisingSunKick() {
chiMetrics := monk.NewChiMetrics(risingSunKickActionID)
chiCost := int32(2)

risingSunKickDebuff := monk.NewEnemyAuraArray(func(target *core.Unit) *core.Aura {
return target.GetOrRegisterAura(core.Aura{
Expand All @@ -80,7 +81,7 @@ func (monk *Monk) registerRisingSunKick() {
},

ExtraCastCondition: func(sim *core.Simulation, target *core.Unit) bool {
return monk.GetChi() >= core.TernaryInt32(monk.T16Windwalker4P != nil && monk.T16Windwalker4P.IsActive(), 1, 2)
return monk.GetChi() >= monk.GetT16Windwalker4PCostReduction(chiCost)
},

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
Expand All @@ -89,7 +90,7 @@ func (monk *Monk) registerRisingSunKick() {
result := spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMeleeSpecialHitAndCrit)

if result.Landed() {
monk.SpendChi(sim, core.TernaryInt32(monk.T16Windwalker4P != nil && monk.T16Windwalker4P.IsActive(), 1, 2), chiMetrics)
monk.SpendChi(sim, monk.GetT16Windwalker4PCostReduction(chiCost), chiCost, chiMetrics)
risingSunKickDebuff.ActivateAll(sim)
if monk.T16Windwalker4P != nil {
monk.T16Windwalker4P.Deactivate(sim)
Expand Down
3 changes: 2 additions & 1 deletion sim/monk/ww_spinning_fire_blossom.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func spinningFireBlossomSpellConfig(monk *Monk, isSEFClone bool, overrides core.

func (monk *Monk) registerSpinningFireBlossom() {
chiMetrics := monk.NewChiMetrics(spinningFireBlossomActionID)
chiCost := int32(1)

monk.RegisterSpell(spinningFireBlossomSpellConfig(monk, false, core.SpellConfig{
Cast: core.CastConfig{
Expand Down Expand Up @@ -73,7 +74,7 @@ func (monk *Monk) registerSpinningFireBlossom() {
}
})

monk.SpendChi(sim, 1, chiMetrics)
monk.SpendChi(sim, chiCost, chiCost, chiMetrics)
},
}))
}
Expand Down
Loading