@@ -8,32 +8,44 @@ import (
88
99func (fire * FireMage ) registerCriticalMass () {
1010
11- getCritPercent := func () float64 {
12- return fire .GetStat (stats .SpellCritPercent ) * fire .criticalMassMultiplier
11+ getCritPercent := func (isPyroblast bool ) float64 {
12+ pyroblastCritChance := core .TernaryFloat64 (isPyroblast && fire .T15_4pc != nil && fire .T15_4pc .IsActive (), 5 , 0 )
13+ return pyroblastCritChance + ((fire .GetStat (stats .SpellCritPercent ) + pyroblastCritChance ) * fire .criticalMassMultiplier )
1314 }
1415
1516 criticalMassCritBuffMod := fire .AddDynamicMod (core.SpellModConfig {
16- FloatValue : getCritPercent (),
17- ClassMask : mage .MageSpellFireball | mage .MageSpellFrostfireBolt | mage .MageSpellScorch | mage .MageSpellPyroblast | mage .MageSpellPyroblastDot ,
17+ FloatValue : getCritPercent (false ),
18+ ClassMask : mage .MageSpellFireball | mage .MageSpellFrostfireBolt | mage .MageSpellScorch ,
19+ Kind : core .SpellMod_BonusCrit_Percent ,
20+ })
21+
22+ // Separate mod for Pyroblast since it has a different crit bonus from T15 4-piece
23+ // which is additive and Critical Mass is multiplicative.
24+ criticalMassPyroCritBuffMod := fire .AddDynamicMod (core.SpellModConfig {
25+ FloatValue : getCritPercent (true ),
26+ ClassMask : mage .MageSpellPyroblast | mage .MageSpellPyroblastDot ,
1827 Kind : core .SpellMod_BonusCrit_Percent ,
1928 })
2029
2130 core .MakePermanent (fire .RegisterAura (core.Aura {
2231 Label : "Critical Mass" ,
2332 OnGain : func (aura * core.Aura , sim * core.Simulation ) {
2433 criticalMassCritBuffMod .Activate ()
34+ criticalMassPyroCritBuffMod .Activate ()
2535 },
2636 OnExpire : func (aura * core.Aura , sim * core.Simulation ) {
2737 criticalMassCritBuffMod .Deactivate ()
38+ criticalMassPyroCritBuffMod .Deactivate ()
2839 },
2940 }))
3041
3142 fire .AddOnTemporaryStatsChange (func (sim * core.Simulation , buffAura * core.Aura , statsChangeWithoutDeps stats.Stats ) {
32- criticalMassCritBuffMod .UpdateFloatValue (getCritPercent ())
43+ criticalMassCritBuffMod .UpdateFloatValue (getCritPercent (false ))
44+ criticalMassPyroCritBuffMod .UpdateFloatValue (getCritPercent (true ))
3345 })
3446
3547 fire .RegisterResetEffect (func (sim * core.Simulation ) {
36- criticalMassCritBuffMod .UpdateFloatValue (getCritPercent ())
48+ criticalMassCritBuffMod .UpdateFloatValue (getCritPercent (false ))
49+ criticalMassPyroCritBuffMod .UpdateFloatValue (getCritPercent (true ))
3750 })
38-
3951}
0 commit comments