Skip to content

Commit 741c71c

Browse files
committed
fix(trinkets): fix both Marks of the Champions
1 parent 5930d79 commit 741c71c

15 files changed

Lines changed: 1128 additions & 1106 deletions

File tree

sim/common/tbc/items_trinkets.go

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -898,24 +898,46 @@ func init() {
898898
// Mark of the Champion (physical): +150 AP vs Undead and Demons.
899899
core.NewItemEffect(23206, func(agent core.Agent) {
900900
character := agent.GetCharacter()
901-
character.Env.RegisterPostFinalizeEffect(func() {
902-
for _, at := range character.AttackTables {
903-
bonus := stats.Stats{stats.AttackPower: 150, stats.RangedAttackPower: 150}
904-
at.MobTypeBonusStats[proto.MobType_MobTypeUndead] = at.MobTypeBonusStats[proto.MobType_MobTypeUndead].Add(bonus)
905-
at.MobTypeBonusStats[proto.MobType_MobTypeDemon] = at.MobTypeBonusStats[proto.MobType_MobTypeDemon].Add(bonus)
906-
}
907-
})
901+
bonus := stats.Stats{stats.AttackPower: 150, stats.RangedAttackPower: 150}
902+
aura := core.MakePermanent(character.RegisterAura(core.Aura{
903+
Label: "Mark of the Champion (Physical)",
904+
ActionID: core.ActionID{ItemID: 23206},
905+
})).
906+
ApplyOnGain(func(_ *core.Aura, _ *core.Simulation) {
907+
for _, at := range character.AttackTables {
908+
at.MobTypeBonusStats[proto.MobType_MobTypeUndead] = at.MobTypeBonusStats[proto.MobType_MobTypeUndead].Add(bonus)
909+
at.MobTypeBonusStats[proto.MobType_MobTypeDemon] = at.MobTypeBonusStats[proto.MobType_MobTypeDemon].Add(bonus)
910+
}
911+
}).
912+
ApplyOnExpire(func(_ *core.Aura, _ *core.Simulation) {
913+
for _, at := range character.AttackTables {
914+
at.MobTypeBonusStats[proto.MobType_MobTypeUndead] = at.MobTypeBonusStats[proto.MobType_MobTypeUndead].Subtract(bonus)
915+
at.MobTypeBonusStats[proto.MobType_MobTypeDemon] = at.MobTypeBonusStats[proto.MobType_MobTypeDemon].Subtract(bonus)
916+
}
917+
})
918+
character.ItemSwap.RegisterProc(23206, aura)
908919
})
909920

910921
// Mark of the Champion (spell): +85 spell damage vs Undead and Demons.
911922
core.NewItemEffect(23207, func(agent core.Agent) {
912923
character := agent.GetCharacter()
913-
character.Env.RegisterPostFinalizeEffect(func() {
914-
for _, at := range character.AttackTables {
915-
bonus := stats.Stats{stats.SpellDamage: 85}
916-
at.MobTypeBonusStats[proto.MobType_MobTypeUndead] = at.MobTypeBonusStats[proto.MobType_MobTypeUndead].Add(bonus)
917-
at.MobTypeBonusStats[proto.MobType_MobTypeDemon] = at.MobTypeBonusStats[proto.MobType_MobTypeDemon].Add(bonus)
918-
}
919-
})
924+
bonus := stats.Stats{stats.SpellDamage: 85}
925+
aura := core.MakePermanent(character.RegisterAura(core.Aura{
926+
Label: "Mark of the Champion (Spell)",
927+
ActionID: core.ActionID{ItemID: 23207},
928+
})).
929+
ApplyOnGain(func(_ *core.Aura, _ *core.Simulation) {
930+
for _, at := range character.AttackTables {
931+
at.MobTypeBonusStats[proto.MobType_MobTypeUndead] = at.MobTypeBonusStats[proto.MobType_MobTypeUndead].Add(bonus)
932+
at.MobTypeBonusStats[proto.MobType_MobTypeDemon] = at.MobTypeBonusStats[proto.MobType_MobTypeDemon].Add(bonus)
933+
}
934+
}).
935+
ApplyOnExpire(func(_ *core.Aura, _ *core.Simulation) {
936+
for _, at := range character.AttackTables {
937+
at.MobTypeBonusStats[proto.MobType_MobTypeUndead] = at.MobTypeBonusStats[proto.MobType_MobTypeUndead].Subtract(bonus)
938+
at.MobTypeBonusStats[proto.MobType_MobTypeDemon] = at.MobTypeBonusStats[proto.MobType_MobTypeDemon].Subtract(bonus)
939+
}
940+
})
941+
character.ItemSwap.RegisterProc(23207, aura)
920942
})
921943
}

sim/druid/balance/TestBalance.results

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ dps_results: {
9494
tps: 1225.01389
9595
}
9696
}
97+
dps_results: {
98+
key: "TestBalance-AllItems-Biznicks247x128Accurascope-2523"
99+
value: {
100+
dps: 1412.39069
101+
tps: 1339.58641
102+
}
103+
}
97104
dps_results: {
98105
key: "TestBalance-AllItems-BlackenedNaaruSliver-34427"
99106
value: {
@@ -585,13 +592,6 @@ dps_results: {
585592
tps: 1339.58641
586593
}
587594
}
588-
dps_results: {
589-
key: "TestBalance-AllItems-StabilizedEterniumScope-2523"
590-
value: {
591-
dps: 1412.39069
592-
tps: 1339.58641
593-
}
594-
}
595595
dps_results: {
596596
key: "TestBalance-AllItems-StaffofNaturalFury-31334"
597597
value: {

sim/druid/feralbear/TestFeralBear.results

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,15 @@ dps_results: {
349349
hps: 71.35766
350350
}
351351
}
352+
dps_results: {
353+
key: "TestFeralBear-AllItems-Biznicks247x128Accurascope-2523"
354+
value: {
355+
dps: 421.70348
356+
tps: 650.89173
357+
dtps: 1095.61128
358+
hps: 74.14484
359+
}
360+
}
352361
dps_results: {
353362
key: "TestFeralBear-AllItems-BlackenedNaaruSliver-34427"
354363
value: {
@@ -1510,15 +1519,6 @@ dps_results: {
15101519
hps: 74.14484
15111520
}
15121521
}
1513-
dps_results: {
1514-
key: "TestFeralBear-AllItems-StabilizedEterniumScope-2523"
1515-
value: {
1516-
dps: 421.70348
1517-
tps: 650.89173
1518-
dtps: 1095.61128
1519-
hps: 74.14484
1520-
}
1521-
}
15221522
dps_results: {
15231523
key: "TestFeralBear-AllItems-StaffofNaturalFury-31334"
15241524
value: {

0 commit comments

Comments
 (0)