Skip to content

Commit 833065e

Browse files
authored
Merge pull request #113 from wowsims/fix/monk-and-crit-multi
[MONK] Zen Sphere & AOE Cap
2 parents 7a1b33d + 2c669ff commit 833065e

20 files changed

Lines changed: 1380 additions & 1375 deletions

File tree

proto/apl.proto

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ message APLAction {
8585
}
8686
}
8787

88-
// NextIndex: 102
88+
// NextIndex: 101
8989
message APLValue {
9090
UUID uuid = 87;
9191

@@ -203,7 +203,6 @@ message APLValue {
203203
APLValueFrontOfTarget front_of_target = 63;
204204

205205
// Class or Spec-specific values
206-
APLValueCurrentVengeancePercent current_vengeance_percent = 101;
207206
APLValueTotemRemainingTime totem_remaining_time = 49;
208207
APLValueCatExcessEnergy cat_excess_energy = 52;
209208
APLValueCatNewSavageRoarDuration cat_new_savage_roar_duration = 61;
@@ -701,5 +700,3 @@ message APLValueShamanFireElementalDuration {}
701700
message APLValueMonkCurrentChi {}
702701
message APLValueMonkMaxChi {}
703702
message APLValueBrewmasterMonkCurrentStaggerPercent {}
704-
705-
message APLValueCurrentVengeancePercent {}

sim/core/apl_value.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,6 @@ func (rot *APLRotation) newAPLValue(config *proto.APLValue) APLValue {
142142
value = rot.newValueFocusTimeToTarget(config.GetFocusTimeToTarget(), config.Uuid)
143143
case *proto.APLValue_CurrentGenericResource:
144144
value = rot.newValueCurrentGenericResource(config.GetCurrentGenericResource(), config.Uuid)
145-
// Tank "resource"
146-
case *proto.APLValue_CurrentVengeancePercent:
147-
value = rot.newValueCurrentVengeancePercent(config.GetCurrentVengeancePercent(), config.Uuid)
148145

149146
// Resources Runes
150147
case *proto.APLValue_CurrentRuneCount:

sim/core/apl_values_resources.go

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -512,34 +512,3 @@ func (value *APLValueCurrentGenericResource) GetInt(sim *Simulation) int32 {
512512
func (value *APLValueCurrentGenericResource) String() string {
513513
return "Current {GENERIC_RESOURCE}"
514514
}
515-
516-
type APLValueCurrentVengeancePercent struct {
517-
DefaultAPLValueImpl
518-
unit *Unit
519-
aura *Aura
520-
}
521-
522-
func (rot *APLRotation) newValueCurrentVengeancePercent(config *proto.APLValueCurrentVengeancePercent, uuid *proto.UUID) APLValue {
523-
unit := rot.unit
524-
if unit == nil {
525-
return nil
526-
}
527-
vengeanceAura := unit.GetAura("Vengeance")
528-
if vengeanceAura == nil {
529-
rot.ValidationMessageByUUID(uuid, proto.LogLevel_Warning, "%s does not know Vengeance", unit.Label)
530-
return nil
531-
}
532-
return &APLValueCurrentVengeancePercent{
533-
unit: unit,
534-
aura: vengeanceAura,
535-
}
536-
}
537-
func (value *APLValueCurrentVengeancePercent) Type() proto.APLValueType {
538-
return proto.APLValueType_ValueTypeFloat
539-
}
540-
func (value *APLValueCurrentVengeancePercent) GetFloat(sim *Simulation) float64 {
541-
return float64(value.aura.GetStacks()) / value.unit.MaxHealth()
542-
}
543-
func (value *APLValueCurrentVengeancePercent) String() string {
544-
return fmt.Sprintf("Current Vengeance %%")
545-
}

sim/core/avoid_dr.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,29 +30,20 @@ var AvoidanceDRByClass = map[proto.Class]DiminishingReturnsConstants{
3030
func (unit *Unit) GetDiminishedDodgeChance() float64 {
3131
// undiminished Dodge % = D
3232
// diminished Dodge % = (D * Cd)/((k*Cd) + D)
33-
if unit.avoidanceParams.c_d == 0 {
34-
return 0
35-
}
3633
dodgePercent := unit.stats[stats.DodgeRating] / DodgeRatingPerDodgePercent
3734
return (dodgePercent * unit.avoidanceParams.c_d) / (unit.avoidanceParams.k*unit.avoidanceParams.c_d + dodgePercent) / 100
3835
}
3936

4037
func (unit *Unit) GetDiminishedParryChance() float64 {
4138
// undiminished Parry % = P
4239
// diminished Parry % = (P * Cp)/((k*Cp) + P)
43-
if unit.avoidanceParams.c_p == 0 {
44-
return 0
45-
}
4640
parryPercent := unit.stats[stats.ParryRating] / ParryRatingPerParryPercent
4741
return (parryPercent * unit.avoidanceParams.c_p) / (unit.avoidanceParams.k*unit.avoidanceParams.c_p + parryPercent) / 100
4842
}
4943

5044
func (unit *Unit) GetDiminishedBlockChance() float64 {
5145
// undiminished Block % = B
5246
// diminished Block % = (B * Cb)/((k*Cb) + B)
53-
if unit.avoidanceParams.c_b == 0 {
54-
return 0
55-
}
5647
blockPercent := unit.stats[stats.BlockPercent]
5748
return (blockPercent * unit.avoidanceParams.c_b) / (unit.avoidanceParams.k*unit.avoidanceParams.c_b + blockPercent) / 100
5849
}

sim/core/character.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -617,8 +617,8 @@ func (character *Character) GetPseudoStatsProto() []float64 {
617617

618618
// Base values are modified by Enemy attackTables, but we display for LVL 80 enemy as paperdoll default
619619
proto.PseudoStat_PseudoStatDodgePercent: (character.PseudoStats.BaseDodgeChance + character.GetDiminishedDodgeChance()) * 100,
620-
proto.PseudoStat_PseudoStatParryPercent: (character.PseudoStats.BaseParryChance + character.GetDiminishedParryChance()) * 100,
621-
proto.PseudoStat_PseudoStatBlockPercent: (character.PseudoStats.BaseBlockChance + character.GetDiminishedBlockChance()) * 100,
620+
proto.PseudoStat_PseudoStatParryPercent: Ternary(character.PseudoStats.CanParry, (character.PseudoStats.BaseParryChance+character.GetDiminishedParryChance())*100, 0),
621+
proto.PseudoStat_PseudoStatBlockPercent: Ternary(character.PseudoStats.CanBlock, (character.PseudoStats.BaseBlockChance+character.GetDiminishedBlockChance())*100, 0),
622622

623623
// Used by UI to incorporate multiplicative Haste buffs into final character stats display.
624624
proto.PseudoStat_PseudoStatRangedSpeedMultiplier: character.PseudoStats.RangedSpeedMultiplier,
@@ -686,10 +686,7 @@ func (character *Character) GetMatchingItemProcAuras(statTypesToMatch []stats.St
686686
}
687687

688688
// Uses proto reflection to set fields in a talents proto (e.g. MageTalents,
689-
// WarriorTalents) based on a talentsStr. treeSizes should contain the number
690-
// of talents in each tree, usually around 30. This is needed because talent
691-
// strings truncate 0's at the end of each tree, so we can't infer the start index
692-
// of the tree from the string.
689+
// WarriorTalents) based on a talentsStr.
693690
func FillTalentsProto(data protoreflect.Message, talentsStr string) {
694691
fieldDescriptors := data.Descriptor().Fields()
695692

sim/core/target.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func (encounter *Encounter) AOECapMultiplier() float64 {
8585
return encounter.aoeCapMultiplier
8686
}
8787
func (encounter *Encounter) updateAOECapMultiplier() {
88-
encounter.aoeCapMultiplier = min(10/float64(len(encounter.Targets)), 1)
88+
encounter.aoeCapMultiplier = min(20/float64(len(encounter.Targets)), 1)
8989
}
9090

9191
func (encounter *Encounter) doneIteration(sim *Simulation) {

0 commit comments

Comments
 (0)