Skip to content

Commit

Permalink
Sudden Death fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
turinpt committed Jun 16, 2024
1 parent 3403109 commit 6013b36
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 11 deletions.
2 changes: 1 addition & 1 deletion dist/js/classes/player.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/classes/spell.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/data/buffs.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/data/enchants.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/data/gear_sod.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/classes/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -1327,8 +1327,8 @@ class Player {
if (this.auras.voodoofrenzy && rng10k() < 1500) {
this.auras.voodoofrenzy.use();
}
// Sudden Death
if (this.auras.suddendeath && rng10k() < 1000) {
// Sudden Death - Execute proc is handled on execute spell
if (!(spell instanceof Execute) && this.auras.suddendeath && rng10k() < 1000) {
this.auras.suddendeath.use();
}
// Fresh Meat
Expand Down
20 changes: 17 additions & 3 deletions js/classes/spell.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,24 @@ class Execute extends Spell {
this.player.rage -= this.cost;
this.usedrage = ~~this.player.rage;
this.totalusedrage += this.usedrage - (this.player.auras.suddendeath && this.player.auras.suddendeath.timer ? 10 : 0);
this.timer = batching - (step % batching);
this.timer = 1 - (step % 1);
this.maxdelay = rng(this.player.reactionmin, this.player.reactionmax);
}
step(a) {
if (this.timer <= a) {
this.timer = 0;
if (this.result != RESULT.MISS && this.result != RESULT.DODGE)
this.player.rage = this.player.auras.suddendeath && this.player.auras.suddendeath.timer ? 10 : 0;
if (this.result != RESULT.MISS && this.result != RESULT.DODGE) {
if (this.player.auras.suddendeath && this.player.auras.suddendeath.timer) {
this.player.rage = Math.min(this.player.rage, 10);
this.player.auras.suddendeath.remove();
// proc new sudden death
if (rng10k() < 1000) this.player.auras.suddendeath.use();
}
else {
this.player.rage = 0;
}
}

/* start-log */ if (log) this.player.log(`Execute batch (${Object.keys(RESULT)[this.result]})`); /* end-log */
}
else {
Expand Down Expand Up @@ -2334,4 +2344,8 @@ class SuddenDeath extends Aura {
/* start-log */ if (log) this.player.log(`${this.name} removed`); /* end-log */
}
}
remove() {
this.timer = 0;
this.step();
}
}
28 changes: 27 additions & 1 deletion js/data/enchants.js
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,8 @@ var enchant = {
name: 'Battlegear of Valor',
items: [226765,226764,226766,226770,226771,226769,226767,226768],
bonus: [
{ count: 4, stats: { ap: 40 } }
{ count: 4, stats: { ap: 40 } },
{ count: 6, stats: { procspell: "WarriorsResolve", procchance: 2 } }
]
},
{
Expand All @@ -1094,4 +1095,29 @@ var enchant = {
{ count: 6, stats: { gladdmg: 4 } },
]
},
{
id: 1761,
name: 'Champion\'s Battlegear',
items: [227050,227051,227043,227042,227049,227048],
bonus: [
{ count: 2, stats: { ap: 40 } }
]
},
{
id: 1775,
name: 'Lieutenant Commander\'s Battlegear',
items: [227046,227047,227053,227052,227044,227045],
bonus: [
{ count: 2, stats: { ap: 40 } }
]
},
{
id: 1778,
name: 'Battlegear of Heroism',
items: [226879,226880,226878,226877,226876,226875,226874,226873],
bonus: [
{ count: 2, stats: { ap: 40 } },
{ count: 4, stats: { procspell: "WarriorsResolve", procchance: 2 } }
]
},
];

0 comments on commit 6013b36

Please sign in to comment.