Skip to content

Commit

Permalink
weapon procs
Browse files Browse the repository at this point in the history
  • Loading branch information
turinpt committed Nov 25, 2023
1 parent cfc92b4 commit 1a9d34b
Show file tree
Hide file tree
Showing 8 changed files with 130 additions and 31 deletions.
2 changes: 1 addition & 1 deletion dist/css/style.css

Large diffs are not rendered by default.

24 changes: 14 additions & 10 deletions gear/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
for (let item of Item) {
let obj = {};
obj.id = parseInt(item.ID);
if (obj.id == 22478) debugger;
//if (obj.id == 22478) debugger;

obj.type = getType(item.ClassID, item.SubclassID);
if (!obj.type) continue;
Expand Down Expand Up @@ -89,10 +89,7 @@
if (parseInt(item.Resistances_4)) obj.resist.frost = parseInt(item.Resistances_4);
if (parseInt(item.Resistances_5)) obj.resist.shadow = parseInt(item.Resistances_5);





let spells = getRows('ItemEffect', 'ParentItemID', item.ID);
if (spells.length) {
spells.forEach((spell, index) => {
Expand Down Expand Up @@ -195,12 +192,7 @@


// todo items
// https://www.wowhead.com/classic/item=869/dazzling-longsword
// https://www.wowhead.com/classic/item=7961/phantom-blade
// https://www.wowhead.com/classic/item=10626/ragehammer
// https://www.wowhead.com/classic/item=9423/the-jackhammer
// https://www.wowhead.com/classic/item=11817/lord-generals-sword
// https://www.wowhead.com/classic/item=9418/stoneslayer

// https://www.wowhead.com/classic/item=13204/bashguuder
// https://www.wowhead.com/classic/item=22988/the-end-of-dreams
// https://www.wowhead.com/classic/item=19901/zulian-slicer
Expand Down Expand Up @@ -345,6 +337,18 @@
{i:19334,s:"Untamed"},
{i:9465,s:"Vibroblade"},
{i:9485,s:"Vibroblade"},
{i:869,s:"Vibroblade"},
{i:7961,s:"Vibroblade"},
{i:10626,s:"Ragehammer"},
{i:9423,s:"Jackhammer"},
{i:11817,s:"LordGeneral"},
{i:9418,s:"Stoneslayer"},







];

Expand Down
6 changes: 0 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,11 @@
<!--
TODO
revamp filters
prettify
new items
later:
last item procs
sweeping strikes
test lvl 25 rage gen
item timings
resists
crusaders
-->

Expand Down
6 changes: 6 additions & 0 deletions js/classes/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -579,9 +579,15 @@ class Player {
this.stats.haste *= (1 + this.auras.spider.mult_stats.haste / 100);
if (this.auras.voidmadness && this.auras.voidmadness.timer)
this.stats.haste *= (1 + this.auras.voidmadness.mult_stats.haste / 100);
if (this.auras.jackhammer && this.auras.jackhammer.timer)
this.stats.haste *= (1 + this.auras.jackhammer.mult_stats.haste / 100);
if (this.auras.ragehammer && this.auras.ragehammer.timer)
this.stats.haste *= (1 + this.auras.ragehammer.mult_stats.haste / 100);
}
updateBonusDmg() {
let bonus = 0;
if (this.auras.stoneslayer && this.auras.stoneslayer.timer)
bonus += this.auras.stoneslayer.stats.bonusdmg;
if (this.auras.zeal && this.auras.zeal.timer)
bonus += this.auras.zeal.stats.bonusdmg;
if (this.auras.zandalarian && this.auras.zandalarian.timer)
Expand Down
83 changes: 83 additions & 0 deletions js/classes/spell.js
Original file line number Diff line number Diff line change
Expand Up @@ -1459,4 +1459,87 @@ class WeaponBleed extends Aura {
this.timer = step + this.duration * 1000;
this.starttimer = step;
}
}

class Ragehammer extends Aura {
constructor(player, id) {
super(player, id);
this.duration = 15;
this.stats = { ap: 20 }
this.mult_stats = { haste: 5 };
}
use() {
if (this.timer) this.uptime += (step - this.starttimer);
this.timer = step + this.duration * 1000;
this.starttimer = step;
this.player.updateAP();
this.player.updateHaste();
/* start-log */ if (log) this.player.log(`${this.name} applied`); /* end-log */
}
step() {
if (step >= this.timer) {
this.uptime += (this.timer - this.starttimer);
this.timer = 0;
this.firstuse = false;
this.player.updateAP();
this.player.updateHaste();
/* start-log */ if (log) this.player.log(`${this.name} removed`); /* end-log */
}
}
}

class Jackhammer extends Aura {
constructor(player, id) {
super(player, id);
this.duration = 10;
this.mult_stats = { haste: 30 };
}
use() {
if (this.timer) this.uptime += (step - this.starttimer);
this.timer = step + this.duration * 1000;
this.starttimer = step;
this.player.updateHaste();
/* start-log */ if (log) this.player.log(`${this.name} applied`); /* end-log */
}
step() {
if (step >= this.timer) {
this.uptime += (this.timer - this.starttimer);
this.timer = 0;
this.firstuse = false;
this.player.updateHaste();
/* start-log */ if (log) this.player.log(`${this.name} removed`); /* end-log */
}
}
}

class LordGeneral extends Aura {
constructor(player, id) {
super(player, id);
this.duration = 30;
this.stats = { ap: 50 };
}
}

class Stoneslayer extends Aura {
constructor(player, id) {
super(player, id);
this.duration = 8;
this.stats = { bonusdmg: 10 };
}
use() {
if (this.timer) this.uptime += (step - this.starttimer);
this.timer = step + this.duration * 1000;
this.starttimer = step;
this.player.updateBonusDmg();
/* start-log */ if (log) this.player.log(`${this.name} applied`); /* end-log */
}
step() {
if (step >= this.timer) {
this.uptime += (this.timer - this.starttimer);
this.timer = 0;
this.firstuse = false;
this.player.updateBonusDmg();
/* start-log */ if (log) this.player.log(`${this.name} removed`); /* end-log */
}
}
}
30 changes: 24 additions & 6 deletions js/data/gear_sod.js
Original file line number Diff line number Diff line change
Expand Up @@ -28196,7 +28196,10 @@ var gear = {
"name": "Dazzling Longsword",
"speed": 1.7,
"mindmg": 37,
"maxdmg": 70
"maxdmg": 70,
"proc": {
"spell": "Vibroblade"
}
},
{
"id": 871,
Expand Down Expand Up @@ -30363,7 +30366,10 @@ var gear = {
"name": "Phantom Blade",
"speed": 2.6,
"mindmg": 59,
"maxdmg": 111
"maxdmg": 111,
"proc": {
"spell": "Vibroblade"
}
},
{
"id": 8006,
Expand Down Expand Up @@ -31287,7 +31293,10 @@ var gear = {
"name": "Lord General's Sword",
"speed": 2.6,
"mindmg": 67,
"maxdmg": 125
"maxdmg": 125,
"proc": {
"spell": "LordGeneral"
}
},
{
"id": 11856,
Expand Down Expand Up @@ -44271,7 +44280,10 @@ var gear = {
"name": "Stoneslayer",
"speed": 3.9,
"mindmg": 133,
"maxdmg": 200
"maxdmg": 200,
"proc": {
"spell": "Stoneslayer"
}
},
{
"id": 9423,
Expand All @@ -44283,7 +44295,10 @@ var gear = {
"name": "The Jackhammer",
"speed": 2.5,
"mindmg": 79,
"maxdmg": 119
"maxdmg": 119,
"proc": {
"spell": "Jackhammer"
}
},
{
"id": 9425,
Expand Down Expand Up @@ -44522,7 +44537,10 @@ var gear = {
"name": "Ragehammer",
"speed": 3.7,
"mindmg": 128,
"maxdmg": 193
"maxdmg": 193,
"proc": {
"spell": "Ragehammer"
}
},
{
"id": 10627,
Expand Down
6 changes: 0 additions & 6 deletions js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,12 +424,6 @@ SIM.SETTINGS = {
ul.append(`<li data-id="echargeblockactive" class="${spell.echargeblockactive ? 'active' : ''}">Don't use rage below <input type="text" name="echargeblock" value="${spell.echargeblock}" data-numberonly="true" /> CbR charges</li>`);



// if (spell.crusaders !== undefined)
// ul.append(`<li data-id="active" class="${spell.crusaders ? 'active' : ''}">Use when <input type="text" name="timetoend" value="${spell.timetoend}" data-numberonly="true" /> seconds of the fight</li>`);



details.css('visibility','hidden');
details.append(ul);
let height = details.height();
Expand Down
4 changes: 2 additions & 2 deletions scss/gear.scss
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,10 @@ section.main {


@include tablet {
th:not(:first-child):not(:last-child) {
th:not(:nth-child(2)):not(:first-child):not(:last-child) {
display: none;
}
td:not(:first-child):not(:last-child) {
td:not(:nth-child(2)):not(:first-child):not(:last-child) {
display: none;
}
}
Expand Down

0 comments on commit 1a9d34b

Please sign in to comment.