Skip to content

Commit

Permalink
Merge pull request #2115 from wowsims/fixes
Browse files Browse the repository at this point in the history
Implement most remaining item effects, including all healing items. Also fix bug causing other_items.go effects to not be tested.
  • Loading branch information
jimmyt857 authored Dec 9, 2022
2 parents 8cb36a5 + 4cdfe5b commit db0adcf
Show file tree
Hide file tree
Showing 50 changed files with 5,666 additions and 318 deletions.
Binary file modified assets/database/db.bin
Binary file not shown.
1 change: 1 addition & 0 deletions assets/database/db.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
{"id":20837,"name":"Sunstrider Axe","icon":"inv_axe_01","type":"ItemTypeWeapon","weaponType":"WeaponTypeAxe","handType":"HandTypeMainHand","stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"socketBonus":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"weaponDamageMin":5,"weaponDamageMax":9,"weaponSpeed":3.5,"ilvl":5,"phase":1,"quality":"ItemQualityCommon"},
{"id":20966,"name":"Jade Pendant of Blasting","icon":"inv_jewelry_necklace_01","type":"ItemTypeNeck","stats":[0,0,0,3,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"socketBonus":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ilvl":36,"phase":1,"quality":"ItemQualityUncommon"},
{"id":21278,"name":"Stormshroud Gloves","icon":"inv_gauntlets_05","type":"ItemTypeHands","armorType":"ArmorTypeLeather","stats":[0,0,0,0,0,0,0,10,19,0,0,0,10,19,0,0,0,0,0,0,99,0,0,0,0,0,0,0,0,0,0,0,0,0],"socketBonus":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ilvl":55,"phase":1,"quality":"ItemQualityRare","setName":"Stormshroud Armor"},
{"id":21625,"name":"Scarab Brooch","icon":"inv_misc_ahnqirajtrinket_06","type":"ItemTypeTrinket","stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"socketBonus":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ilvl":78,"phase":1,"quality":"ItemQualityEpic","unique":true},
{"id":23565,"name":"Embrace of the Twisting Nether","icon":"inv_chest_chain_17","type":"ItemTypeChest","armorType":"ArmorTypeMail","stats":[0,0,56,27,0,0,13,0,35,0,0,84,0,35,0,0,0,0,0,0,1022,84,0,0,0,0,0,0,0,0,0,0,0,0],"gemSockets":["GemColorRed","GemColorYellow","GemColorBlue"],"socketBonus":[0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ilvl":146,"phase":1,"quality":"ItemQualityEpic"},
{"id":24114,"name":"Braided Eternium Chain","icon":"inv_jewelry_necklace_07","type":"ItemTypeNeck","stats":[0,0,0,0,0,0,0,21,0,0,0,0,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"socketBonus":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ilvl":102,"phase":1,"quality":"ItemQualityRare"},
{"id":27510,"name":"Tidefury Gauntlets","icon":"inv_gauntlets_10","type":"ItemTypeHands","armorType":"ArmorTypeMail","stats":[0,0,22,26,0,29,9,0,0,0,0,0,0,0,0,0,0,0,0,0,407,0,0,0,0,0,0,0,0,0,0,0,0,0],"socketBonus":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ilvl":115,"phase":1,"quality":"ItemQualityRare","setName":"Tidefury Raiment"},
Expand Down
Binary file modified assets/database/leftover_db.bin
Binary file not shown.
1 change: 0 additions & 1 deletion assets/database/leftover_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -7090,7 +7090,6 @@
{"id":21622,"name":"Sharpened Silithid Femur","icon":"inv_sword_83","type":"ItemTypeWeapon","weaponType":"WeaponTypeSword","handType":"HandTypeMainHand","stats":[0,0,14,7,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"socketBonus":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"weaponDamageMin":54,"weaponDamageMax":137,"weaponSpeed":2.3,"ilvl":78,"phase":1,"quality":"ItemQualityEpic","unique":true},
{"id":21623,"name":"Gauntlets of the Righteous Champion","icon":"inv_gauntlets_26","type":"ItemTypeHands","armorType":"ArmorTypePlate","stats":[15,0,17,13,10,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,627,0,0,0,0,0,0,0,0,0,0,0,0,0],"socketBonus":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ilvl":78,"phase":1,"quality":"ItemQualityEpic"},
{"id":21624,"name":"Gauntlets of Kalimdor","icon":"inv_gauntlets_26","type":"ItemTypeHands","armorType":"ArmorTypeMail","stats":[14,0,15,13,10,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,353,0,0,0,0,0,0,0,0,0,0,0,0,0],"socketBonus":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ilvl":78,"phase":1,"quality":"ItemQualityEpic"},
{"id":21625,"name":"Scarab Brooch","icon":"inv_misc_ahnqirajtrinket_06","type":"ItemTypeTrinket","stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"socketBonus":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ilvl":78,"phase":1,"quality":"ItemQualityEpic","unique":true},
{"id":21626,"name":"Slime-coated Leggings","icon":"inv_pants_mail_11","type":"ItemTypeLegs","armorType":"ArmorTypeMail","stats":[0,0,28,16,0,11,0,0,0,0,0,40,0,0,0,0,0,0,0,0,494,40,0,0,0,0,0,0,0,0,0,0,28,0],"socketBonus":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ilvl":78,"phase":1,"quality":"ItemQualityEpic"},
{"id":21627,"name":"Cloak of Untold Secrets","icon":"inv_misc_cape_20","type":"ItemTypeBack","stats":[0,0,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0,0,0,0,0,0,20],"socketBonus":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ilvl":77,"phase":1,"quality":"ItemQualityEpic"},
{"id":21635,"name":"Barb of the Sand Reaver","icon":"inv_weapon_halberd_ahnqiraj","type":"ItemTypeWeapon","weaponType":"WeaponTypePolearm","handType":"HandTypeTwoHand","stats":[0,32,31,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0],"socketBonus":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"weaponDamageMin":225,"weaponDamageMax":338,"weaponSpeed":3.7,"ilvl":77,"phase":1,"quality":"ItemQualityEpic"},
Expand Down
59 changes: 59 additions & 0 deletions sim/common/tbc/caster_trinkets.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,64 @@ func init() {
core.NewItemEffect(itemID, func(core.Agent) {})
}

core.NewItemEffect(21625, func(agent core.Agent) { // Scarab Brooch
character := agent.GetCharacter()
actionID := core.ActionID{ItemID: 21625}

shieldID := core.ActionID{SpellID: 26470}
shields := core.NewAllyShieldArray(
&character.Unit,
core.Shield{
Spell: character.GetOrRegisterSpell(core.SpellConfig{
ActionID: shieldID,
SpellSchool: core.SpellSchoolNature,
ProcMask: core.ProcMaskSpellHealing,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagHelpful,

DamageMultiplier: 1,
ThreatMultiplier: 1,
}),
},
core.Aura{
Label: "Power Word Shield",
ActionID: shieldID,
Duration: time.Second * 30,
})

activeAura := core.MakeProcTriggerAura(&character.Unit, core.ProcTrigger{
Name: "Persistent Shield",
ActionID: core.ActionID{SpellID: 26467},
Callback: core.CallbackOnHealDealt | core.CallbackOnPeriodicHealDealt,
Duration: time.Second * 30,
Handler: func(sim *core.Simulation, _ *core.Spell, result *core.SpellResult) {
shield := shields[result.Target.UnitIndex]
shield.Apply(sim, result.Damage*0.15)
},
})

spell := character.RegisterSpell(core.SpellConfig{
ActionID: actionID,
SpellSchool: core.SpellSchoolPhysical,
ProcMask: core.ProcMaskEmpty,
Flags: core.SpellFlagNoOnCastComplete,

Cast: core.CastConfig{
CD: core.Cooldown{
Timer: character.NewTimer(),
Duration: time.Minute * 3,
},
},

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
activeAura.Activate(sim)
},
})

character.AddMajorCooldown(core.MajorCooldown{
Type: core.CooldownTypeDPS,
Spell: spell,
})
})

core.AddEffectsToTest = true
}
6 changes: 4 additions & 2 deletions sim/common/wotlk/highest_stat_effects.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,11 @@ func init() {
})
})
}
core.AddEffectsToTest = false
newDMCGreatnessEffect(42987)
newDMCGreatnessEffect(44253)
newDMCGreatnessEffect(44254)
core.AddEffectsToTest = false
core.AddEffectsToTest = true
newDMCGreatnessEffect(44255)

newDeathsChoiceEffect := func(itemID int32, name string, amount float64) {
Expand Down Expand Up @@ -104,9 +105,10 @@ func init() {
})
})
}
newDeathsChoiceEffect(47115, "Deaths Verdict", 450)
core.AddEffectsToTest = false
newDeathsChoiceEffect(47115, "Deaths Verdict", 450)
newDeathsChoiceEffect(47131, "Deaths Verdict H", 510)
newDeathsChoiceEffect(47303, "Deaths Choice", 450)
core.AddEffectsToTest = true
newDeathsChoiceEffect(47464, "Deaths Choice H", 510)
}
47 changes: 44 additions & 3 deletions sim/common/wotlk/item_sets.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ var ItemSetPurifiedShardOfTheGods = core.NewItemSet(core.ItemSet{
Bonuses: map[int32]core.ApplyEffect{
2: func(agent core.Agent) {
agent.GetCharacter().AddStats(stats.Stats{stats.SpellPower: 222})
applyShardOfTheGods(agent.GetCharacter(), false)
applyShardOfTheGodsDamageProc(agent.GetCharacter(), false)
applyShardOfTheGodsHealingProc(agent.GetCharacter(), false)
},
},
})
Expand All @@ -26,12 +27,13 @@ var ItemSetShinyShardOfTheGods = core.NewItemSet(core.ItemSet{
Bonuses: map[int32]core.ApplyEffect{
2: func(agent core.Agent) {
agent.GetCharacter().AddStats(stats.Stats{stats.SpellPower: 250})
applyShardOfTheGods(agent.GetCharacter(), true)
applyShardOfTheGodsDamageProc(agent.GetCharacter(), true)
applyShardOfTheGodsHealingProc(agent.GetCharacter(), true)
},
},
})

func applyShardOfTheGods(character *core.Character, isHeroic bool) {
func applyShardOfTheGodsDamageProc(character *core.Character, isHeroic bool) {
name := "Searing Flames"
actionID := core.ActionID{SpellID: 69729}
tickAmount := 477.0
Expand Down Expand Up @@ -81,6 +83,45 @@ func applyShardOfTheGods(character *core.Character, isHeroic bool) {
})
}

func applyShardOfTheGodsHealingProc(character *core.Character, isHeroic bool) {
name := "Cauterizing Heal"
actionID := core.ActionID{SpellID: 69733}
minHeal := 2269.0
maxHeal := 2773.0
if isHeroic {
name += " H"
actionID = core.ActionID{SpellID: 69734}
minHeal = 2530.0
maxHeal = 3092.0
}

spell := character.RegisterSpell(core.SpellConfig{
ActionID: actionID,
SpellSchool: core.SpellSchoolHoly,
ProcMask: core.ProcMaskSpellHealing,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagHelpful,

DamageMultiplier: 1,
ThreatMultiplier: 1,
CritMultiplier: character.DefaultHealingCritMultiplier(),

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseHealing := sim.Roll(minHeal, maxHeal)
spell.CalcAndDealHealing(sim, target, baseHealing, spell.OutcomeHealingCrit)
},
})

core.MakeProcTriggerAura(&character.Unit, core.ProcTrigger{
Name: name + " Trigger",
Callback: core.CallbackOnHealDealt,
ProcChance: 0.25,
ICD: time.Second * 50,
Handler: func(sim *core.Simulation, _ *core.Spell, result *core.SpellResult) {
spell.Cast(sim, result.Target)
},
})
}

func makeUndeadSet(setName string) *core.ItemSet {
return core.NewItemSet(core.ItemSet{
Name: setName,
Expand Down
Loading

0 comments on commit db0adcf

Please sign in to comment.