Skip to content

Commit

Permalink
Maelstorm & Obsidian Champion
Browse files Browse the repository at this point in the history
  • Loading branch information
turinpt committed Nov 14, 2024
1 parent 5ed1b57 commit 2e7d7b9
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 7 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/classes/weapon.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions gear/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,9 @@
{i:234428,magic:true,dmg:413},
{i:233796,magic:true,dmg:413},
{i:233491,magic:true,dmg:413},
{i:233490,magic:true,dmg:413},
{i:234178,c:2,magic:true,dmg:417},




Expand Down
23 changes: 23 additions & 0 deletions js/classes/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ class Player {
this.spells.sunderarmor.nocrit = false;
}


if (this.items.includes(233490)) {
this.auras.obsidianstrength = new ObsidianStrength(this);
this.auras.obsidianhaste = new ObsidianHaste(this);
}

this.update();
if (this.oh)
this.oh.timer = Math.round(this.oh.speed * 1000 / this.stats.haste / 2);
Expand Down Expand Up @@ -897,6 +903,8 @@ class Player {
this.stats.haste *= (1 + this.auras.jujuflurry.mult_stats.haste / 100);
if (this.auras.crusaderzeal && this.auras.crusaderzeal.timer)
this.stats.haste *= (1 + this.auras.crusaderzeal.mult_stats.haste / 100);
if (this.auras.obsidianhaste && this.auras.obsidianhaste.timer)
this.stats.haste *= (1 + this.auras.obsidianhaste.mult_stats.haste / 100);

}
updateHasteDamage() {
Expand Down Expand Up @@ -931,6 +939,8 @@ class Player {
taken += this.auras.meltarmor.stats.moddmgtaken;
if (this.auras.crusaderzeal && this.auras.crusaderzeal.timer)
bonus += this.auras.crusaderzeal.stats.moddmgdone;
if (this.auras.obsidianhaste && this.auras.obsidianhaste.timer)
bonus += this.auras.obsidianhaste.stats.moddmgdone;
this.stats.moddmgdone = this.base.moddmgdone + bonus;
this.stats.moddmgtaken = this.base.moddmgtaken + taken;
this.mh.bonusdmg = this.mh.basebonusdmg;
Expand Down Expand Up @@ -1133,6 +1143,8 @@ class Player {
if (this.auras.moonstalkerfury && this.auras.moonstalkerfury.timer) this.auras.moonstalkerfury.step();
if (this.auras.jujuflurry && this.auras.jujuflurry.timer) this.auras.jujuflurry.step();
if (this.auras.grilekguard && this.auras.grilekguard.timer) this.auras.grilekguard.step();
if (this.auras.obsidianhaste && this.auras.obsidianhaste.timer) this.auras.obsidianhaste.step();
if (this.auras.obsidianstrength && this.auras.obsidianstrength.timer) this.auras.obsidianstrength.step();

if (this.mh.windfury && this.mh.windfury.timer) this.mh.windfury.step();
if (this.trinketproc1 && this.trinketproc1.spell && this.trinketproc1.spell.timer) this.trinketproc1.spell.step();
Expand Down Expand Up @@ -1202,6 +1214,8 @@ class Player {
if (this.auras.wrathwray && this.auras.wrathwray.timer) this.auras.wrathwray.end();
if (this.auras.jujuflurry && this.auras.jujuflurry.timer) this.auras.jujuflurry.end();
if (this.auras.grilekguard && this.auras.grilekguard.timer) this.auras.grilekguard.end();
if (this.auras.obsidianhaste && this.auras.obsidianhaste.timer) this.auras.obsidianhaste.end();
if (this.auras.obsidianstrength && this.auras.obsidianstrength.timer) this.auras.obsidianstrength.end();


if (this.mh.windfury && this.mh.windfury.timer) this.mh.windfury.end();
Expand Down Expand Up @@ -1582,6 +1596,15 @@ class Player {
else extras++;
/* start-log */ if (this.logging) this.log(`Timeworn proc`); /* end-log */
}
// Obsidian Champion
if (weapon.id == 233490 && rng10k() < weapon.proc1.chance && !(this.timer && this.timer < 1500)) {
this.auras.obsidianstrength.use();
/* start-log */ if (this.logging) this.log(`${weapon.name} Strength proc`); /* end-log */
}
if (weapon.id == 233490 && rng10k() < weapon.proc1.chance && !(this.timer && this.timer < 1500)) {
this.auras.obsidianhaste.use();
/* start-log */ if (this.logging) this.log(`${weapon.name} Haste proc`); /* end-log */
}
// Blood Surge
if (this.bloodsurge && (spell instanceof Whirlwind || spell instanceof Bloodthirst || spell instanceof HeroicStrike || spell instanceof QuickStrike) && rng10k() < 3000) {
this.freeslam = true;
Expand Down
19 changes: 19 additions & 0 deletions js/classes/spell.js
Original file line number Diff line number Diff line change
Expand Up @@ -2990,3 +2990,22 @@ class GrilekGuard extends Aura {
return this.firstuse && !this.timer && !this.player.itemtimer && step >= this.usestep;
}
}

class ObsidianStrength extends Aura {
constructor(player, id) {
super(player, id);
this.duration = 30;
this.stats = { str: 120 };
this.name = 'Obsidian Strength';
}
}

class ObsidianHaste extends Aura {
constructor(player, id) {
super(player, id);
this.duration = 15;
this.stats = { moddmgdone: 20 };
this.mult_stats = { haste: 5 };
this.name = 'Obsidian Haste';
}
}
1 change: 1 addition & 0 deletions js/classes/weapon.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ var WEAPONTYPE = {
class Weapon {
constructor(player, item, enchant, tempenchant, offhand, twohand) {
this.player = player;
this.id = item.id;
this.name = item.name;
this.mindmg = item.mindmg;
this.maxdmg = item.maxdmg;
Expand Down
20 changes: 17 additions & 3 deletions js/data/gear_sod.js
Original file line number Diff line number Diff line change
Expand Up @@ -47259,7 +47259,12 @@ var gear = {
"q": "4",
"i": "66",
"name": "Darkmoon Card: Maelstrom",
"p": "inv_misc_ticket_tarot_maelstrom_01"
"p": "inv_misc_ticket_tarot_maelstrom_01",
"proc": {
"chance": 2,
"magic": true,
"dmg": 417
}
},
{
"id": 234462,
Expand Down Expand Up @@ -47770,7 +47775,12 @@ var gear = {
"q": "4",
"i": "66",
"name": "Darkmoon Card: Maelstrom",
"p": "inv_misc_ticket_tarot_maelstrom_01"
"p": "inv_misc_ticket_tarot_maelstrom_01",
"proc": {
"chance": 2,
"magic": true,
"dmg": 417
}
},
{
"id": 234462,
Expand Down Expand Up @@ -77848,7 +77858,11 @@ var gear = {
"speed": 2,
"mindmg": 117,
"maxdmg": 176,
"p": "inv_sword_39"
"p": "inv_sword_39",
"proc": {
"magic": true,
"dmg": 413
}
},
{
"id": 233491,
Expand Down

0 comments on commit 2e7d7b9

Please sign in to comment.