Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DK] Add Blood Strike #1183

Merged
merged 1 commit into from
Nov 7, 2024
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
76 changes: 76 additions & 0 deletions sim/death_knight/blood_strike.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
package death_knight

import (
"github.com/wowsims/cata/sim/core"
"github.com/wowsims/cata/sim/core/proto"
)

var bloodStrikeActionID = core.ActionID{SpellID: 45902}

func (dk *DeathKnight) registerBloodStrikeSpell() {
ohSpell := dk.GetOrRegisterSpell(core.SpellConfig{
ActionID: bloodStrikeActionID.WithTag(2),
SpellSchool: core.SpellSchoolPhysical,
ProcMask: core.ProcMaskMeleeOHSpecial,
Flags: core.SpellFlagMeleeMetrics,
ClassSpellMask: DeathKnightSpellBloodStrike,

DamageMultiplier: 0.8,
DamageMultiplierAdditive: 1,
CritMultiplier: dk.DefaultMeleeCritMultiplier(),
ThreatMultiplier: 1,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := dk.ClassSpellScaling*0.37799999118 +
spell.Unit.OHNormalizedWeaponDamage(sim, spell.MeleeAttackPower())

baseDamage *= dk.GetDiseaseMulti(target, 1.0, 0.025)

spell.CalcAndDealDamage(sim, target, baseDamage, spell.OutcomeMeleeSpecialCritOnly)
},
})

hasReaping := dk.Inputs.Spec == proto.Spec_SpecUnholyDeathKnight

dk.GetOrRegisterSpell(core.SpellConfig{
ActionID: bloodStrikeActionID.WithTag(1),
SpellSchool: core.SpellSchoolPhysical,
ProcMask: core.ProcMaskMeleeMHSpecial,
Flags: core.SpellFlagMeleeMetrics | core.SpellFlagAPL,
ClassSpellMask: DeathKnightSpellBloodStrike,

RuneCost: core.RuneCostOptions{
BloodRuneCost: 1,
RunicPowerGain: 10,
Refundable: true,
},
Cast: core.CastConfig{
DefaultCast: core.Cast{
GCD: core.GCDDefault,
},
IgnoreHaste: true,
},

DamageMultiplier: 0.8,
CritMultiplier: dk.DefaultMeleeCritMultiplier(),
ThreatMultiplier: 1,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
baseDamage := dk.ClassSpellScaling*0.75599998236 +
spell.Unit.MHNormalizedWeaponDamage(sim, spell.MeleeAttackPower())

baseDamage *= dk.GetDiseaseMulti(target, 1.0, 0.125)

result := spell.CalcDamage(sim, target, baseDamage, spell.OutcomeMeleeWeaponSpecialHitAndCrit)

if hasReaping {
spell.SpendRefundableCostAndConvertBloodRune(sim, result, 1)
} else {
spell.SpendRefundableCost(sim, result)
}
dk.ThreatOfThassarianProc(sim, result, ohSpell)

spell.DealDamage(sim, result)
},
})
}
2 changes: 2 additions & 0 deletions sim/death_knight/death_knight.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ func (dk *DeathKnight) Initialize() {
dk.registerDeathPactSpell()
dk.registerAntiMagicShellSpell()
dk.registerRunicPowerDecay()
dk.registerBloodStrikeSpell()
}

func (dk *DeathKnight) Reset(sim *core.Simulation) {
Expand Down Expand Up @@ -351,6 +352,7 @@ const (
DeathKnightSpellDancingRuneWeapon
DeathKnightSpellDeathPact
DeathKnightSpellUnholyBlight
DeathKnightSpellBloodStrike

DeathKnightSpellKillingMachine // Used to react to km procs
DeathKnightSpellConvertToDeathRune // Used to react to death rune gains
Expand Down
33 changes: 24 additions & 9 deletions ui/core/proto_utils/action_id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,11 @@ export class ActionId {
const baseName = tooltipData['name'];
let name = baseName;

// handle DRT
let tag = this.tag
// handle DRT
let tag = this.tag;
if (tag >= 71086) {
name = "Dragonwrath - " + name;
tag -= 71086
name = 'Dragonwrath - ' + name;
tag -= 71086;
}

switch (baseName) {
Expand Down Expand Up @@ -461,12 +461,12 @@ export class ActionId {
if (tag === playerIndex || playerIndex == undefined) {
name += ` (self)`;
} else {
name += ` (from #${tag + 1})`;
}
} else {
name += ' (raid)';
name += ` (from #${tag + 1})`;
}
break;
} else {
name += ' (raid)';
}
break;
case 'Elemental Mastery':
if (this.spellId === 64701) {
name = `${name} (Buff)`;
Expand Down Expand Up @@ -497,6 +497,7 @@ export class ActionId {
case 'Obliterate':
case 'Blood-Caked Strike':
case 'Festering Strike':
case 'Blood Strike':
case 'Razor Frost':
case 'Lightning Speed':
case 'Windfury Weapon':
Expand Down Expand Up @@ -855,6 +856,20 @@ const spellIdTooltipOverrides: Map<string, ActionIdOverride> = new Map([
[JSON.stringify({ spellId: 879, tag: 3 }), { spellId: 54934 }], // Paladin - Glyph of Exorcism
[JSON.stringify({ spellId: 49020, tag: 3 }), { spellId: 99000 }], // Death Knight - T12 4P Flaming Torment
[JSON.stringify({ spellId: 55090, tag: 3 }), { spellId: 99000 }], // Death Knight - T12 4P Flaming Torment

// Off-Hand attacks
[JSON.stringify({ spellId: 45902, tag: 2 }), { spellId: 66215 }], // Death Knight - Blood Strike Off-Hand
[JSON.stringify({ spellId: 45462, tag: 2 }), { spellId: 49998 }], // Death Knight - Death Strike Off-Hand
[JSON.stringify({ spellId: 85948, tag: 2 }), { spellId: 86061 }], // Death Knight - Festering Strike Off-Hand
[JSON.stringify({ spellId: 49143, tag: 2 }), { spellId: 66196 }], // Death Knight - Frost Strike Off-Hand
[JSON.stringify({ spellId: 49020, tag: 2 }), { spellId: 66198 }], // Death Knight - Obliterate Off-Hand
[JSON.stringify({ spellId: 45462, tag: 2 }), { spellId: 66216 }], // Death Knight - Plague Strike Off-Hand
[JSON.stringify({ spellId: 56815, tag: 2 }), { spellId: 66217 }], // Death Knight - Rune Strike Off-Hand
[JSON.stringify({ spellId: 1329, tag: 2 }), { spellId: 27576 }], // Rogue - Mutilate Off-Hand
[JSON.stringify({ spellId: 17364, tag: 2 }), { spellId: 32176 }], // Shaman - Stormstrike Off-Hand
[JSON.stringify({ spellId: 85288, tag: 2 }), { spellId: 85384 }], // Warrior - Raging Blow Off-Hand
[JSON.stringify({ spellId: 1464, tag: 2 }), { spellId: 97992 }], // Warrior - Slam Off-Hand
[JSON.stringify({ spellId: 1680, tag: 2 }), { spellId: 44949 }], // Warrior - Whirlwind Off-Hand
]);

export const defaultTargetIcon = 'https://wow.zamimg.com/images/wow/icons/large/spell_shadow_metamorphosis.jpg';
Expand Down
Loading