Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified assets/database/db.bin
Binary file not shown.
599 changes: 300 additions & 299 deletions assets/database/db.json

Large diffs are not rendered by default.

Binary file modified assets/database/leftover_db.bin
Binary file not shown.
132 changes: 66 additions & 66 deletions assets/database/leftover_db.json

Large diffs are not rendered by default.

1,001 changes: 1,001 additions & 0 deletions assets/db_inputs/basestats/ItemSocketCostPerLevel.txt

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions proto/spell.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ message ScalingItemEffectProperties {
ProcEffect proc = 4;
OnUseEffect on_use = 5;
}

// A second aura this effect accumulates rather than applies, set only when the stats live
// there instead of in scaling_options above. Absent on the ordinary case.
//
// The aura named by buff_id lasts effect_duration_ms and grants nothing itself; every
// stack_period_ms it adds one stack of this one, up to its own max_cumulative_stacks, and
// its scaling_options are the stats granted *per stack*. Re-triggering restarts the outer
// window rather than extending it, and gaining a stack does not refresh it — which is why
// the two have to stay distinct instead of being flattened together.
ItemEffect stacking_aura = 8;
int32 stack_period_ms = 9; // milliseconds

}

message RppmProc {
Expand Down
111 changes: 0 additions & 111 deletions sim/common/mop/enchants.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,91 +212,6 @@ func init() {
character.ItemSwap.RegisterWeaponEnchantBuff(shield.Aura, 4445)
})

// Permanently enchants a melee weapon to sometimes increase your dodge by 1650 for 7s when dealing melee
// damage.
core.NewEnchantEffect(4446, func(agent core.Agent, _ proto.ItemLevelState) {
character := agent.GetCharacter()
duration := time.Second * 7

aura := character.NewTemporaryStatsAura(
"River's Song",
core.ActionID{SpellID: 116660}.WithTag(1),
stats.Stats{stats.DodgeRating: 1650},
duration,
)

character.MakeProcTriggerAura(core.ProcTrigger{
Name: "Enchant Weapon - River's Song",
Callback: core.CallbackOnSpellHitDealt | core.CallbackOnPeriodicDamageDealt,
RequireDamageDealt: true,
ActionID: core.ActionID{SpellID: 104441},
ICD: time.Millisecond * 250,
DPM: character.NewRPPMProcManager(
4446,
true,
false,
core.ProcMaskDirect|core.ProcMaskProc,
core.RPPMConfig{
PPM: 3.67,
Coefficient: 1.0,
}.WithHasteMod(),
),
Outcome: core.OutcomeLanded,
Handler: func(sim *core.Simulation, _ *core.Spell, _ *core.SpellResult) {
aura.Activate(sim)
},
})

character.ItemSwap.RegisterWeaponEnchantBuff(aura.Aura, 4446)
})

// Permanently enchants a melee weapon to sometimes inflict 3000 additional Elemental damage
// when dealing damage with spells and melee attacks.
core.NewEnchantEffect(4443, func(agent core.Agent, _ proto.ItemLevelState) {
character := agent.GetCharacter()

elementalForceSpell := character.RegisterSpell(core.SpellConfig{
ActionID: core.ActionID{SpellID: 116616},
SpellSchool: core.SpellSchoolElemental,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell | core.SpellFlagNoOnDamageDealt,
ProcMask: core.ProcMaskEmpty,

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

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := sim.Roll(2775, 2775+450)
spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMagicHitAndCrit)
},
})

character.MakeProcTriggerAura(core.ProcTrigger{
Name: "Enchant Weapon - Elemental Force",
Callback: core.CallbackOnSpellHitDealt | core.CallbackOnPeriodicDamageDealt,
RequireDamageDealt: true,
ActionID: core.ActionID{SpellID: 104428},

DPM: character.NewRPPMProcManager(
4443,
true,
false,
core.ProcMaskDirect|core.ProcMaskProc,
core.RPPMConfig{
PPM: 9.17,
Coefficient: 1.0,
}.WithHasteMod(),
),

Outcome: core.OutcomeLanded,
TriggerImmediately: true,

Handler: func(sim *core.Simulation, _ *core.Spell, result *core.SpellResult) {
elementalForceSpell.Cast(sim, result.Target)
},
})
})

// Synapse Springs
core.NewEnchantEffect(4898, func(agent core.Agent, _ proto.ItemLevelState) {
character := agent.GetCharacter()
Expand Down Expand Up @@ -328,32 +243,6 @@ func init() {
})
})

// Phase Fingers
core.NewEnchantEffect(4697, func(agent core.Agent, _ proto.ItemLevelState) {
character := agent.GetCharacter()
if !character.HasProfession(proto.Profession_Engineering) {
return
}

core.RegisterTemporaryStatsOnUseCD(character,
"Phase Fingers",
stats.Stats{stats.DodgeRating: 2880},
10*time.Second,
core.SpellConfig{
ActionID: core.ActionID{SpellID: 108788},
Cast: core.CastConfig{
CD: core.Cooldown{
Timer: character.NewTimer(),
Duration: time.Minute,
},
SharedCD: core.Cooldown{
Timer: character.GetDefensiveTrinketCD(),
Duration: 10 * time.Second,
},
},
})
})

// Nitro Boosts
core.NewEnchantEffect(4223, func(agent core.Agent, _ proto.ItemLevelState) {
character := agent.GetCharacter()
Expand Down
67 changes: 67 additions & 0 deletions sim/common/mop/enchants_auto_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,65 @@ package mop
import (
"github.com/wowsims/mop/sim/common/shared"
"github.com/wowsims/mop/sim/core"
"github.com/wowsims/mop/sim/core/proto"
)

func RegisterAllEnchants() {

// Enchants

// TODO: Manual implementation required
// This can be ignored if the effect has already been implemented.
// With next db run the item will be removed if implemented.
//
// Attaches a ghost iron spike to your shield that sometimes deals 209 damage when you block with it.
//
// Attaching a ghost iron spike to your shield causes it to become soulbound.
// shared.NewProcDamageEffect(shared.ProcDamageEffect{
// EnchantID: 5001,
// SpellID: 131465,
// School: core.SpellSchoolPhysical,
// MinDmg: 600,
// MaxDmg: 1000,
// Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell | core.SpellFlagNoOnDamageDealt,
// Trigger: core.ProcTrigger{
// Name: "Ghost Iron Shield Spike",
// Callback: core.CallbackOnSpellHitTaken,
// ProcMask: core.ProcMaskMeleeMHAuto | core.ProcMaskMeleeOHAuto | core.ProcMaskMeleeMHSpecial | core.ProcMaskMeleeOHSpecial,
// Outcome: core.OutcomeLanded,
// RequireDamageDealt: true,
// },
// })

// Permanently enchants a melee weapon to sometimes inflict 2774 additional Elemental damage when dealing
// damage with spells and melee attacks.
shared.NewProcDamageEffect(shared.ProcDamageEffect{
EnchantID: 4443,
SpellID: 116616,
School: core.SpellSchoolFire | core.SpellSchoolNature | core.SpellSchoolFrost,
MinDmg: 2775,
MaxDmg: 3225,
Flags: core.SpellFlagNoOnCastComplete | core.SpellFlagPassiveSpell | core.SpellFlagNoOnDamageDealt,
Trigger: core.ProcTrigger{
Name: "Enchant Weapon - Elemental Force",
Callback: core.CallbackOnSpellHitDealt | core.CallbackOnPeriodicDamageDealt,
ProcMask: core.ProcMaskMeleeMHAuto | core.ProcMaskMeleeOHAuto | core.ProcMaskMeleeMHSpecial | core.ProcMaskMeleeOHSpecial | core.ProcMaskRangedAuto | core.ProcMaskRangedSpecial | core.ProcMaskSpellDamage | core.ProcMaskSpellProc | core.ProcMaskMeleeProc | core.ProcMaskRangedProc,
Outcome: core.OutcomeLanded,
RequireDamageDealt: false,
},
})

// Permanently enchants a melee weapon to sometimes increase your dodge by 1650 for 7s when dealing melee
// damage.
shared.NewProcStatBonusEffect(shared.ProcStatBonusEffect{
Name: "Enchant Weapon - River's Song",
EnchantID: 4446,
Callback: core.CallbackOnSpellHitDealt | core.CallbackOnPeriodicDamageDealt,
ProcMask: core.ProcMaskMeleeMHAuto | core.ProcMaskMeleeOHAuto | core.ProcMaskMeleeMHSpecial | core.ProcMaskMeleeOHSpecial | core.ProcMaskRangedAuto | core.ProcMaskRangedSpecial | core.ProcMaskSpellDamage | core.ProcMaskSpellProc | core.ProcMaskMeleeProc | core.ProcMaskRangedProc,
Outcome: core.OutcomeLanded,
RequireDamageDealt: false,
})

// Permanently attaches Lord Blastington's special scope to a ranged weapon, sometimes increasing Agility
// by 1800 for 10s when dealing damage with ranged attacks.
//
Expand Down Expand Up @@ -76,4 +129,18 @@ func RegisterAllEnchants() {
Outcome: core.OutcomeLanded,
RequireDamageDealt: true,
})

// OnUseEnchants

// Phase Fingers: map[9:2880] for 10000ms, 60000ms cooldown, category 1141
shared.NewActiveStatBonusEffect(shared.ActiveStatBonusEffect{
EnchantID: 4697,
RequiredProfession: proto.Profession_Engineering,
})

// Skipped
// Not simulated: Goblin Glider: "Goblin Glider" (126389) - ignored aura type 105
// https://www.wowhead.com/mop/spell=126389
// Not simulated: Watergliding Jets: "Watergliding Jets" (131459) - ignored aura type 104
// https://www.wowhead.com/mop/spell=131459
}
Loading
Loading