Skip to content

Commit

Permalink
Merge pull request #1259 from hillerstorm/ret_bugfixes
Browse files Browse the repository at this point in the history
[Ret] Some spell mod bug fixes
  • Loading branch information
hillerstorm authored Dec 12, 2024
2 parents dee9de6 + 9eb3e44 commit ca728f7
Show file tree
Hide file tree
Showing 7 changed files with 1,318 additions and 1,298 deletions.
2 changes: 2 additions & 0 deletions sim/core/test_result_compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ func compareValue(t *testing.T, loc string, vst reflect.Value, vmt reflect.Value
tolerance := baseFloatTolerance
if strings.Contains(loc, "CastTimeMs") {
tolerance = 2.2 // Castime is rounded in results and may be off 1ms per thread. In test=true sims concurrency is set to 3, 2ms diff seems to never be broken then)
} else if strings.Contains(loc, "Threat.AggregatorData.SumSq") {
tolerance *= 200 // Squared sums can be off more, and as an extension also the stdevs
} else if strings.Contains(loc, "SumSq") {
tolerance *= 100 // Squared sums can be off more, and as an extension also the stdevs
} else if strings.Contains(loc, "Stdev") {
Expand Down
18 changes: 18 additions & 0 deletions sim/paladin/ancient_guardian_pet.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,28 @@ func (ancientGuardian *AncientGuardianPet) registerRetributionVariant() {
AutoSwingMelee: true,
})

percentHitToExpertiseRating := 1 * core.PhysicalHitRatingPerHitPercent * PetExpertiseScale
draeneiPrepull := false
ancientGuardian.OnPetEnable = func(sim *core.Simulation) {
// Since Draenei racial doesn't apply to guardian, any Draenei who uses the T11 prot prepull set
// should make sure it's reforged/enchanted to 9% hit to avoid misses and dodges.
// Having a separate input for prepull set hit rating is too much of a hassle, so we just assume it's always 9%.
if sim.CurrentTime < 0 && ancientGuardian.paladinOwner.Race == proto.Race_RaceDraenei && ancientGuardian.paladinOwner.SnapshotGuardian {
ancientGuardian.AddStatDynamic(sim, stats.PhysicalHitPercent, 1.0)
ancientGuardian.AddStatDynamic(sim, stats.ExpertiseRating, percentHitToExpertiseRating)
draeneiPrepull = true
} else {
draeneiPrepull = false
}

ancientPowerAura.Activate(sim)
}
ancientGuardian.OnPetDisable = func(sim *core.Simulation) {
if draeneiPrepull {
ancientGuardian.AddStatDynamic(sim, stats.PhysicalHitPercent, -1.0)
ancientGuardian.AddStatDynamic(sim, stats.ExpertiseRating, -percentHitToExpertiseRating)
}

ancientPowerAura.Deactivate(sim)
}
}
Expand Down
2 changes: 1 addition & 1 deletion sim/paladin/items.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func (paladin *Paladin) addBloodthirstyGloves() {
switch paladin.Hands().ID {
case 64844, 70649, 60414, 65591, 72379, 70250, 70488, 73707, 73570:
paladin.AddStaticMod(core.SpellModConfig{
Kind: core.SpellMod_DamageDone_Pct,
Kind: core.SpellMod_DamageDone_Flat,
ClassMask: SpellMaskCrusaderStrike,
FloatValue: 0.05,
})
Expand Down
Loading

0 comments on commit ca728f7

Please sign in to comment.