diff --git a/dist/js/classes/spell.min.js b/dist/js/classes/spell.min.js index 6a6a1679a..bc2499087 100644 --- a/dist/js/classes/spell.min.js +++ b/dist/js/classes/spell.min.js @@ -1 +1 @@ -class Spell{constructor(t,s,e){this.id=s,this.timer=0,this.cost=0,this.cooldown=0,this.player=t,this.refund=!0,this.canDodge=!0,this.totaldmg=0,this.data=[0,0,0,0,0],this.name=e||this.constructor.name,this.useonly=!1,this.maxdelay=100,this.weaponspell=!0,this.minrage=0;let i=spells.filter(t=>t.id==this.id)[0];i&&(i.minrageactive&&(this.minrage=parseInt(i.minrage)),i.maxrageactive&&(this.maxrage=parseInt(i.maxrage)),i.maincdactive&&(this.maincd=1e3*parseInt(i.maincd)),i.reaction&&(this.maxdelay=parseInt(i.reaction)),i.cooldown&&(this.cooldown=parseInt(i.cooldown)||0),i.durationactive&&(this.cooldown=Math.max(parseInt(i.duration),this.cooldown)),i.value1&&(this.value1=i.value1),i.value2&&(this.value2=i.value2),i.priorityapactive&&(this.priorityap=parseInt(i.priorityap)),void 0!==i.globals&&(this.globals=parseInt(i.globals)),i.flagellation&&(this.flagellation=i.flagellation),i.consumedrage&&(this.consumedrage=i.consumedrage),i.unqueueactive&&(this.unqueue=parseInt(i.unqueue)),i.exmacro&&(this.exmacro=i.exmacro),i.execute&&(this.execute=i.execute))}dmg(){return 0}use(){this.player.timer=1500,this.player.rage-=this.cost,this.timer=1e3*this.cooldown}step(t){return this.timer<=t?(this.timer=0,log&&this.player.log(`${this.name} off cooldown`)):this.timer-=t,this.timer}canUse(){return!this.timer&&!this.player.timer&&this.cost<=this.player.rage&&this.player.rage>=this.minrage}}class Bloodthirst extends Spell{constructor(t,s){super(t,s),this.cost=30,this.cooldown=6,this.weaponspell=!1}dmg(){return.45*this.player.stats.ap}canUse(){return!this.timer&&!this.player.timer&&this.cost<=this.player.rage&&this.player.rage>=this.minrage}}class Whirlwind extends Spell{constructor(t,s){super(t,s),this.cost=25,this.cooldown=10,this.refund=!1}dmg(){let t;return(t=this.player.weaponrng?rng(this.player.mh.mindmg+this.player.mh.bonusdmg,this.player.mh.maxdmg+this.player.mh.bonusdmg):avg(this.player.mh.mindmg+this.player.mh.bonusdmg,this.player.mh.maxdmg+this.player.mh.bonusdmg))+this.player.stats.ap/14*this.player.mh.normSpeed}canUse(){return!this.timer&&!this.player.timer&&this.cost<=this.player.rage&&(!this.minrage&&!this.maincd||this.minrage&&this.player.rage>=this.minrage||this.maincd&&(!this.player.spells.bloodthirst||this.player.spells.bloodthirst&&this.player.spells.bloodthirst.timer>=this.maincd)||this.maincd&&(!this.player.spells.mortalstrike||this.player.spells.mortalstrike&&this.player.spells.mortalstrike.timer>=this.maincd))}}class Overpower extends Spell{constructor(t,s){super(t,s),this.cost=5,this.cooldown=5,this.canDodge=!1}dmg(){let t;return(t=this.player.weaponrng?this.value1+rng(this.player.mh.mindmg+this.player.mh.bonusdmg,this.player.mh.maxdmg+this.player.mh.bonusdmg):this.value1+avg(this.player.mh.mindmg+this.player.mh.bonusdmg,this.player.mh.maxdmg+this.player.mh.bonusdmg))+this.player.stats.ap/14*this.player.mh.normSpeed}use(){this.player.timer=1500,this.player.dodgetimer=0,this.timer=1e3*this.cooldown,this.player.stance&&!this.player.gladstance&&(this.player.auras.battlestance.use(),this.player.rage=Math.min(this.player.rage,this.player.talents.rageretained)),this.player.rage-=this.cost}canUse(){return!this.timer&&!this.player.timer&&this.cost<=this.player.rage&&this.player.dodgetimer&&(!this.maxrage&&!this.maincd||this.maxrage&&this.player.rage<=this.maxrage||this.maincd&&(!this.player.spells.bloodthirst||this.player.spells.bloodthirst&&this.player.spells.bloodthirst.timer>=this.maincd)||this.maincd&&(!this.player.spells.mortalstrike||this.player.spells.mortalstrike&&this.player.spells.mortalstrike.timer>=this.maincd))}}class Execute extends Spell{constructor(t,s){super(t,s),this.cost=15-t.talents.executecost,this.usedrage=0,this.refund=!1,this.weaponspell=!1}dmg(){return this.value1+this.value2*this.usedrage}use(t){t&&t.exmacro&&t.canUse()&&(this.player.cast(t),this.player.heroicdelay=0),this.player.timer=1500,this.player.rage-=this.cost,this.usedrage=~~this.player.rage,this.timer=batching-step%batching}step(t){return this.timer<=t?(this.timer=0,this.result!=RESULT.MISS&&this.result!=RESULT.DODGE&&(this.player.rage=0),log&&this.player.log(`Execute batch (${Object.keys(RESULT)[this.result]})`)):this.timer-=t,this.timer}canUse(){return!this.player.timer&&this.cost<=this.player.rage}}class Bloodrage extends Spell{constructor(t,s){super(t,s),this.cost=0,this.rage=10+t.talents.bloodragebonus,this.cooldown=60,this.useonly=!0}use(){this.timer=1e3*this.cooldown;let t=this.player.rage;this.player.rage=Math.min(this.player.rage+this.rage,100),this.player.auras.bloodrage.use(),this.player.auras.flagellation&&this.player.auras.flagellation.use(),this.player.auras.consumedrage&&t<=80&&this.player.rage>80&&this.player.auras.consumedrage.use()}canUse(){return 0==this.timer&&(!this.flagellation||!this.player.auras.bloodrage||!this.player.auras.bloodrage.timer)&&(!this.consumedrage||!this.player.auras.consumedrage||this.player.auras.consumedrage.timer)}}class HeroicStrike extends Spell{constructor(t,s){super(t,s,"Heroic Strike"),this.cost=15-t.talents.impheroicstrike,this.bonus=t.aqbooks?157:this.value1,this.useonly=!0,this.unqueuetimer=300,this.maxdelay=300}use(){this.player.nextswinghs=!0}canUse(){return!this.player.nextswinghs&&this.cost<=this.player.rage&&(!this.minrage&&!this.maincd||this.minrage&&this.player.rage>=this.minrage||this.maincd&&(!this.player.spells.bloodthirst||this.player.spells.bloodthirst&&this.player.spells.bloodthirst.timer>=this.maincd)||this.maincd&&(!this.player.spells.mortalstrike||this.player.spells.mortalstrike&&this.player.spells.mortalstrike.timer>=this.maincd))&&(!this.unqueue||this.player.mh.timer>this.unqueuetimer)}}class MortalStrike extends Spell{constructor(t,s){super(t,s,"Mortal Strike"),this.cost=30,this.cooldown=6}dmg(){let t;return(t=this.player.weaponrng?160+rng(this.player.mh.mindmg+this.player.mh.bonusdmg,this.player.mh.maxdmg+this.player.mh.bonusdmg):160+avg(this.player.mh.mindmg+this.player.mh.bonusdmg,this.player.mh.maxdmg+this.player.mh.bonusdmg))+this.player.stats.ap/14*this.player.mh.normSpeed}canUse(){return!this.timer&&!this.player.timer&&this.cost<=this.player.rage&&this.player.rage>=this.minrage}}class SunderArmor extends Spell{constructor(t,s){super(t,s,"Sunder Armor"),this.cost=15-t.talents.impsunderarmor,this.stacks=0,this.nocrit=!0}use(){this.player.timer=1500,this.player.rage-=this.cost,this.stacks++}canUse(){return!this.player.timer&&this.stacks80&&this.player.auras.consumedrage.use()}canUse(){return 0==this.timer&&!this.player.timer&&(!this.flagellation||!this.player.auras.bloodrage||!this.player.auras.bloodrage.timer)&&(!this.consumedrage||!this.player.auras.consumedrage||this.player.auras.consumedrage.timer)}}class QuickStrike extends Spell{constructor(t,s){super(t,s,"Quick Strike"),this.cost=20-t.talents.impheroicstrike,this.cooldown=0}dmg(){let t;return(t=(this.player.weaponrng,66))+this.player.stats.ap/14*this.player.mh.normSpeed}canUse(){return!this.timer&&!this.player.timer&&this.cost<=this.player.rage&&this.player.rage>=this.minrage}}class RagePotion extends Spell{constructor(t,s){super(t,s,"Rage Potion"),this.cost=0,this.rage=100,this.minrage=80,this.cooldown=120,this.useonly=!0}use(){this.timer=1e3*this.cooldown;let t=this.player.rage;this.player.rage=Math.min(this.player.rage+~~rng(this.value1,this.value2),100),this.player.auras.consumedrage&&t<=80&&this.player.rage>80&&this.player.auras.consumedrage.use()}canUse(){return 0==this.timer&&this.player.raget.id==this.id)[0];i||(i=buffs.filter(t=>t.id==this.id)[0]),i&&(i.durationactive&&(this.duration=parseInt(i.duration)),i.timetoend&&(this.timetoend=1e3*parseInt(i.timetoend)),i.crusaders&&(this.crusaders=parseInt(i.crusaders)),i.haste&&(this.mult_stats={haste:parseInt(i.haste)}),i.value1&&(this.value1=i.value1),i.value2&&(this.value2=i.value2),i.procblock&&(this.procblock=i.procblock),i.rageblockactive&&(this.rageblock=parseInt(i.rageblock)),i.wfap&&(this.wfap=parseInt(i.wfap)),i.wfapperc&&(this.wfapperc=parseInt(i.wfapperc)))}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateAuras(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateAuras(),log&&this.player.log(`${this.name} removed`))}end(){this.uptime+=step-this.starttimer,this.timer=0,this.stacks=0}}class Recklessness extends Aura{constructor(t,s){super(t,s),this.duration=15,this.stats={crit:100}}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.player.timer=1500,this.starttimer=step,this.player.updateAuras(),log&&this.player.log(`${this.name} applied`)}canUse(){return this.firstuse&&!this.timer&&!this.player.timer&&step>=this.usestep}}class Flurry extends Aura{constructor(t,s){super(t,s),this.duration=12,this.mult_stats={haste:t.talents.flurry}}proc(){this.stacks--,this.stacks||(this.uptime+=step-this.starttimer,this.timer=0,this.player.updateHaste(),log&&this.player.log(`${this.name} removed`))}use(){this.timer=1,this.stacks||(this.starttimer=step,this.player.updateHaste()),this.stacks=3,log&&this.player.log(`${this.name} applied`)}}class DeepWounds extends Aura{constructor(t,s){super(t,s,"Deep Wounds"),this.duration=12,this.idmg=0,this.totaldmg=0,this.lasttick=0}step(){for(;step>=this.nexttick;){let t=(this.player.mh.mindmg+this.player.mh.bonusdmg+this.player.stats.ap/14*this.player.mh.speed+(this.player.mh.maxdmg+this.player.mh.bonusdmg+this.player.stats.ap/14*this.player.mh.speed))/2;if(t*=this.player.mh.modifier*this.player.stats.dmgmod*this.player.talents.deepwounds,this.idmg+=~~(t/4),this.totaldmg+=~~(t/4),this.player.bleedrage){let t=this.player.rage;this.player.rage+=this.player.bleedrage,this.player.rage>100&&(this.player.rage=100),this.player.auras.consumedrage&&t<=80&&this.player.rage>80&&this.player.auras.consumedrage.use()}log&&this.player.log(`${this.name} tick for ${~~(t/4)}`),this.nexttick+=3e3}step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1)}use(){this.timer&&(this.uptime+=step-this.starttimer),this.nexttick=step+3e3,this.timer=step+1e3*this.duration,this.starttimer=step,log&&this.player.log(`${this.name} applied`)}}class Crusader extends Aura{constructor(t,s){super(t,s),this.duration=15,this.stats={str:100}}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateStrength(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.player.updateStrength(),log&&this.player.log(`${this.name} removed`))}}class Cloudkeeper extends Aura{constructor(t,s){super(t,s),this.duration=30,this.stats={ap:100}}use(){this.player.timer=1500,this.player.itemtimer=1e3*this.duration,this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateAuras(),log&&this.player.log(`${this.name} applied`)}canUse(){return this.firstuse&&!this.player.itemtimer&&!this.timer&&!this.player.timer}}class Felstriker extends Aura{constructor(t,s){super(t,s),this.duration=3,this.stats={crit:100,hit:100}}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.player.update(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.update(),log&&this.player.log(`${this.name} removed`))}}class DeathWish extends Aura{constructor(t,s){super(t,s,"Death Wish"),this.duration=30,this.mult_stats={dmgmod:20}}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.player.rage-=10,this.player.timer=1500,this.starttimer=step,this.player.updateDmgMod(),log&&this.player.log(`${this.name} applied`)}canUse(){return this.firstuse&&!this.timer&&!this.player.timer&&this.player.rage>=10&&(step>=this.usestep||1==this.crusaders&&(this.player.auras.crusader1&&this.player.auras.crusader1.timer||this.player.auras.crusader2&&this.player.auras.crusader2.timer)||2==this.crusaders&&this.player.auras.crusader1&&this.player.auras.crusader1.timer&&this.player.auras.crusader2&&this.player.auras.crusader2.timer)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateDmgMod(),log&&this.player.log(`${this.name} removed`))}}class BattleStance extends Aura{constructor(t,s){super(t,s,"Battle Stance"),this.duration=2,this.stats={crit:-3}}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.player.timer=1500,this.firstuse=!1,this.player.updateAuras(),this.player.rage=Math.min(this.player.rage,this.player.talents.rageretained),log&&this.player.log(`${this.name} removed`))}}class MightyRagePotion extends Aura{constructor(t,s){super(t,s,"Mighty Rage Potion"),this.stats={str:60},this.duration=20}use(){this.timer&&(this.uptime+=step-this.starttimer);let t=this.player.rage;this.player.rage=Math.min(this.player.rage+~~rng(this.value1,this.value2),100),this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateStrength(),this.player.auras.consumedrage&&t<=80&&this.player.rage>80&&this.player.auras.consumedrage.use(),log&&this.player.log(`${this.name} applied`)}canUse(){return this.firstuse&&!this.timer&&(step>=this.usestep||1==this.crusaders&&(this.player.auras.crusader1&&this.player.auras.crusader1.timer||this.player.auras.crusader2&&this.player.auras.crusader2.timer)||2==this.crusaders&&this.player.auras.crusader1&&this.player.auras.crusader1.timer&&this.player.auras.crusader2&&this.player.auras.crusader2.timer)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateStrength(),log&&this.player.log(`${this.name} removed`))}}class BloodFury extends Aura{constructor(t,s){super(t,s,"Blood Fury"),this.duration=15,this.mult_stats={baseapmod:25}}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.player.timer=1500,this.player.updateAuras(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateAuras(),log&&this.player.log(`${this.name} removed`))}canUse(){return this.firstuse&&!this.timer&&!this.player.timer&&step>=this.usestep}}class Berserking extends Aura{constructor(t,s){super(t,s),this.duration=10}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.player.rage-=5,this.player.timer=1500,this.player.updateHaste(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateHaste(),log&&this.player.log(`${this.name} removed`))}canUse(){return this.firstuse&&!this.timer&&!this.player.timer&&this.player.rage>=5&&step>=this.usestep}}class Empyrean extends Aura{constructor(t,s){super(t,s),this.duration=10,this.mult_stats={haste:20},this.name="Empyrean Haste"}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateHaste(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateHaste(),log&&this.player.log(`${this.name} removed`))}}class Eskhandar extends Aura{constructor(t,s){super(t,s),this.duration=5,this.mult_stats={haste:30},this.name="Eskhandar Haste"}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateHaste(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateHaste(),log&&this.player.log(`${this.name} removed`))}}class Zeal extends Aura{constructor(t,s){super(t,s),this.duration=15,this.stats={bonusdmg:10}}use(){this.player.timer&&this.player.timer<1500||(this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateBonusDmg(),log&&this.player.log(`${this.name} applied`))}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateBonusDmg(),log&&this.player.log(`${this.name} removed`))}}class Annihilator extends Aura{constructor(t,s){super(t,s),this.duration=45,this.armor=200,this.stacks=0}use(){rng10k()2?3:this.stacks+1,this.player.updateArmorReduction(),log&&this.player.log(`${this.name} applied`))}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateArmorReduction(),log&&this.player.log(`${this.name} removed`))}}class Rivenspike extends Aura{constructor(t,s){super(t,s),this.duration=30,this.armor=200,this.stacks=0}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.stacks=this.stacks>2?3:this.stacks+1,this.player.updateArmorReduction(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateArmorReduction(),log&&this.player.log(`${this.name} removed`))}}class Bonereaver extends Aura{constructor(t,s){super(t,s),this.duration=10,this.armor=700,this.stacks=0}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.stacks=this.stacks>2?3:this.stacks+1,this.player.updateArmorReduction(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateArmorReduction(),log&&this.player.log(`${this.name} removed`))}}class Destiny extends Aura{constructor(t,s){super(t,s),this.duration=10,this.stats={str:200}}}class Untamed extends Aura{constructor(t,s){super(t,s),this.duration=8,this.stats={str:300},this.name="The Untamed Blade"}}class Pummeler extends Aura{constructor(t,s){super(t,s),this.duration=30,this.mult_stats={haste:50},this.name="Manual Crowd Pummeler"}use(){this.player.timer=1500,this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateHaste(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateHaste(),log&&this.player.log(`${this.name} removed`))}canUse(){return this.firstuse&&!this.timer&&!this.player.timer&&!this.player.itemtimer}}class Windfury extends Aura{constructor(t,s){super(t,s),this.wfap&&(this.stats={ap:this.wfap}),this.wfapperc&&(this.mult_stats={apmod:this.wfapperc})}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1500,this.starttimer=step,this.mintime=step%batching,this.stacks=2,this.player.updateAP(),this.player.extraattacks++,log&&this.player.log(`${this.name} applied`)}proc(){this.stacks<2?(step=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.stacks=0,this.firstuse=!1,this.player.updateAP(),log&&this.player.log(`${this.name} removed`))}}class Swarmguard extends Aura{constructor(t,s){super(t,s),this.duration=30,this.armor=200,this.stacks=0,this.chance=5e3,this.timetoend=3e4}use(){this.timer=step+1e3*this.duration,this.starttimer=step,this.stacks=0,log&&this.player.log(`${this.name} applied`)}canUse(){return this.firstuse&&!this.timer&&step>=this.usestep}proc(){this.stacks=Math.min(this.stacks+1,6),this.player.updateArmorReduction(),log&&this.player.log(`${this.name} proc`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.stacks=0,this.firstuse=!1,this.player.updateArmorReduction(),log&&this.player.log(`${this.name} removed`))}}class Flask extends Aura{constructor(t,s){super(t,s),this.duration=60,this.stats={str:75},this.name="Diamond Flask"}use(){this.player.timer=1500,this.player.itemtimer=1e3*this.duration,this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateAuras(),log&&this.player.log(`${this.name} applied`)}canUse(){return this.firstuse&&!this.timer&&!this.player.timer&&!this.player.itemtimer}}class Slayer extends Aura{constructor(t,s){super(t,s),this.duration=20,this.stats={ap:260},this.name="Slayer's Crest"}use(){this.player.timer=1500,this.player.itemtimer=1e3*this.duration,this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateAP(),log&&this.player.log(`${this.name} applied`)}canUse(){return this.firstuse&&!this.timer&&!this.player.timer&&!this.player.itemtimer}}class Spider extends Aura{constructor(t,s){super(t,s),this.duration=15,this.mult_stats={haste:20},this.name="Kiss of the Spider"}use(){this.player.timer=1500,this.player.itemtimer=1e3*this.duration,this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateHaste(),log&&this.player.log(`${this.name} applied`)}canUse(){return this.firstuse&&!this.timer&&!this.player.timer&&!this.player.itemtimer}}class Earthstrike extends Aura{constructor(t,s){super(t,s),this.duration=20,this.stats={ap:280}}use(){this.player.timer=1500,this.player.itemtimer=1e3*this.duration,this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateAP(),log&&this.player.log(`${this.name} applied`)}canUse(){return this.firstuse&&!this.timer&&!this.player.timer&&!this.player.itemtimer}}class Gabbar extends Aura{constructor(t,s){super(t,s),this.duration=20,this.stats={ap:65},this.name="Jom Gabbar"}use(){this.stats.ap=65,this.player.timer=1500,this.player.itemtimer=1e3*this.duration,this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateAP(),log&&this.player.log(`${this.name} applied`)}canUse(){return this.firstuse&&!this.timer&&!this.player.timer&&!this.player.itemtimer}step(){(step-this.starttimer)%2e3==0&&(this.stats.ap+=65,this.player.updateAP(),log&&this.player.log(`${this.name} tick`)),step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateAP(),log&&this.player.log(`${this.name} removed`))}}class PrimalBlessing extends Aura{constructor(t,s){super(t,s),this.duration=12,this.stats={ap:300},this.name="Primal Blessing"}}class BloodrageAura extends Aura{constructor(t,s){super(t,s),this.duration=10,this.name="Bloodrage"}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,log&&this.player.log(`${this.name} applied`)}step(){return(step-this.starttimer)%1e3==0&&(this.player.rage=Math.min(this.player.rage+1,100),this.player.auras.consumedrage&&this.player.rage>80&&this.player.rage<=81&&this.player.auras.consumedrage.use(),log&&this.player.log(`${this.name} tick`)),step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,log&&this.player.log(`${this.name} removed`)),this.timer}}class Zandalarian extends Aura{constructor(t,s){super(t,s),this.duration=20,this.stats={bonusdmg:40}}use(){this.player.timer=1500,this.player.itemtimer=1e3*this.duration,this.timer=step+1e3*this.duration,this.starttimer=step,this.stats.bonusdmg=40,this.player.updateBonusDmg(),log&&this.player.log(`${this.name} applied`)}proc(){this.stats.bonusdmg-=2,this.player.updateBonusDmg(),this.stats.bonusdmg<=0&&(this.timer=step,this.step())}canUse(){return this.firstuse&&!this.timer&&!this.player.timer&&!this.player.itemtimer}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateBonusDmg(),log&&this.player.log(`${this.name} removed`))}}class Avenger extends Aura{constructor(t,s){super(t,s),this.duration=10,this.stats={ap:200},this.name="Argent Avenger"}}class Flagellation extends Aura{constructor(t,s){super(t,s),this.duration=12,this.mult_stats={dmgmod:25}}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateDmgMod(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.player.updateDmgMod(),log&&this.player.log(`${this.name} removed`))}}class BerserkerRageAura extends Aura{constructor(t,s){super(t,s),this.duration=10,this.name="Berserker Rage"}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,log&&this.player.log(`${this.name} removed`))}}class ConsumedRage extends Aura{constructor(t,s){super(t,s,"Consumed by Rage"),this.duration=12,this.mult_stats={dmgmod:25}}proc(){this.stacks--,this.stacks||(this.uptime+=step-this.starttimer,this.timer=0,this.player.updateDmgMod(),log&&this.player.log(`${this.name} removed`))}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.stacks=12,this.player.updateDmgMod(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.stacks=0,this.firstuse=!1,this.player.updateDmgMod(),log&&this.player.log(`${this.name} removed`))}}class Rend extends Aura{constructor(t,s){super(t,s),this.duration=this.duration||9,this.cost=10,this.idmg=0,this.totaldmg=0,this.lasttick=0,this.dmgmod=1+this.player.talents.rendmod/100}step(){for(;step>=this.nexttick&&this.stacks;){let t=this.value1*this.player.stats.dmgmod*this.dmgmod;if(this.idmg+=~~(t/3),this.totaldmg+=~~(t/3),this.player.bleedrage){let t=this.player.rage;this.player.rage+=this.player.bleedrage,this.player.rage>100&&(this.player.rage=100),this.player.auras.consumedrage&&t<=80&&this.player.rage>80&&this.player.auras.consumedrage.use()}log&&this.player.log(`${this.name} tick for ${~~(t/3)}`),this.nexttick+=3e3,this.stacks--}step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1)}use(){this.timer&&(this.uptime+=step-this.starttimer),this.nexttick=step+3e3,this.timer=step+1e3*this.duration,this.starttimer=step,this.stacks=3,log&&this.player.log(`${this.name} applied`)}canUse(){return!this.timer&&!this.player.timer&&this.player.rage>=this.cost}}class Vibroblade extends Aura{constructor(t,s){super(t,s),this.duration=30,this.armor=100}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateArmorReduction(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.player.updateArmorReduction(),log&&this.player.log(`${this.name} removed`))}} \ No newline at end of file +class Spell{constructor(t,s,e){this.id=s,this.timer=0,this.cost=0,this.cooldown=0,this.player=t,this.refund=!0,this.canDodge=!0,this.totaldmg=0,this.data=[0,0,0,0,0],this.name=e||this.constructor.name,this.useonly=!1,this.maxdelay=100,this.weaponspell=!0,this.minrage=0;let i=spells.filter(t=>t.id==this.id)[0];i&&(i.minrageactive&&(this.minrage=parseInt(i.minrage)),i.maxrageactive&&(this.maxrage=parseInt(i.maxrage)),i.maincdactive&&(this.maincd=1e3*parseInt(i.maincd)),i.reaction&&(this.maxdelay=parseInt(i.reaction)),i.cooldown&&(this.cooldown=parseInt(i.cooldown)||0),i.durationactive&&(this.cooldown=Math.max(parseInt(i.duration),this.cooldown)),i.value1&&(this.value1=i.value1),i.value2&&(this.value2=i.value2),i.priorityapactive&&(this.priorityap=parseInt(i.priorityap)),void 0!==i.globals&&(this.globals=parseInt(i.globals)),i.flagellation&&(this.flagellation=i.flagellation),i.consumedrage&&(this.consumedrage=i.consumedrage),i.unqueueactive&&(this.unqueue=parseInt(i.unqueue)),i.exmacro&&(this.exmacro=i.exmacro),i.execute&&(this.execute=i.execute))}dmg(){return 0}use(){this.player.timer=1500,this.player.rage-=this.cost,this.timer=1e3*this.cooldown}step(t){return this.timer<=t?(this.timer=0,log&&this.player.log(`${this.name} off cooldown`)):this.timer-=t,this.timer}canUse(){return!this.timer&&!this.player.timer&&this.cost<=this.player.rage&&this.player.rage>=this.minrage}}class Bloodthirst extends Spell{constructor(t,s){super(t,s),this.cost=30,this.cooldown=6,this.weaponspell=!1}dmg(){return.45*this.player.stats.ap}canUse(){return!this.timer&&!this.player.timer&&this.cost<=this.player.rage&&this.player.rage>=this.minrage}}class Whirlwind extends Spell{constructor(t,s){super(t,s),this.cost=25,this.cooldown=10,this.refund=!1}dmg(){let t;return(t=this.player.weaponrng?rng(this.player.mh.mindmg+this.player.mh.bonusdmg,this.player.mh.maxdmg+this.player.mh.bonusdmg):avg(this.player.mh.mindmg+this.player.mh.bonusdmg,this.player.mh.maxdmg+this.player.mh.bonusdmg))+this.player.stats.ap/14*this.player.mh.normSpeed}canUse(){return!this.timer&&!this.player.timer&&this.cost<=this.player.rage&&(!this.minrage&&!this.maincd||this.minrage&&this.player.rage>=this.minrage||this.maincd&&(!this.player.spells.bloodthirst||this.player.spells.bloodthirst&&this.player.spells.bloodthirst.timer>=this.maincd)||this.maincd&&(!this.player.spells.mortalstrike||this.player.spells.mortalstrike&&this.player.spells.mortalstrike.timer>=this.maincd))}}class Overpower extends Spell{constructor(t,s){super(t,s),this.cost=5,this.cooldown=5,this.canDodge=!1}dmg(){let t;return(t=this.player.weaponrng?this.value1+rng(this.player.mh.mindmg+this.player.mh.bonusdmg,this.player.mh.maxdmg+this.player.mh.bonusdmg):this.value1+avg(this.player.mh.mindmg+this.player.mh.bonusdmg,this.player.mh.maxdmg+this.player.mh.bonusdmg))+this.player.stats.ap/14*this.player.mh.normSpeed}use(){this.player.timer=1500,this.player.dodgetimer=0,this.timer=1e3*this.cooldown,this.player.stance&&!this.player.gladstance&&(this.player.auras.battlestance.use(),this.player.rage=Math.min(this.player.rage,this.player.talents.rageretained)),this.player.rage-=this.cost}canUse(){return!this.timer&&!this.player.timer&&this.cost<=this.player.rage&&this.player.dodgetimer&&(!this.maxrage&&!this.maincd||this.maxrage&&this.player.rage<=this.maxrage||this.maincd&&(!this.player.spells.bloodthirst||this.player.spells.bloodthirst&&this.player.spells.bloodthirst.timer>=this.maincd)||this.maincd&&(!this.player.spells.mortalstrike||this.player.spells.mortalstrike&&this.player.spells.mortalstrike.timer>=this.maincd))}}class Execute extends Spell{constructor(t,s){super(t,s),this.cost=15-t.talents.executecost,this.usedrage=0,this.refund=!1,this.weaponspell=!1}dmg(){return this.value1+this.value2*this.usedrage}use(t){t&&t.exmacro&&t.canUse()&&(this.player.cast(t),this.player.heroicdelay=0),this.player.timer=1500,this.player.rage-=this.cost,this.usedrage=~~this.player.rage,this.timer=batching-step%batching}step(t){return this.timer<=t?(this.timer=0,this.result!=RESULT.MISS&&this.result!=RESULT.DODGE&&(this.player.rage=0),log&&this.player.log(`Execute batch (${Object.keys(RESULT)[this.result]})`)):this.timer-=t,this.timer}canUse(){return!this.player.timer&&this.cost<=this.player.rage}}class Bloodrage extends Spell{constructor(t,s){super(t,s),this.cost=0,this.rage=10+t.talents.bloodragebonus,this.cooldown=60,this.useonly=!0}use(){this.timer=1e3*this.cooldown;let t=this.player.rage;this.player.rage=Math.min(this.player.rage+this.rage,100),this.player.auras.bloodrage.use(),this.player.auras.flagellation&&this.player.auras.flagellation.use(),this.player.auras.consumedrage&&t<=80&&this.player.rage>80&&this.player.auras.consumedrage.use()}canUse(){return 0==this.timer&&(!this.flagellation||!this.player.auras.bloodrage||!this.player.auras.bloodrage.timer)&&(!this.consumedrage||!this.player.auras.consumedrage||this.player.auras.consumedrage.timer)}}class HeroicStrike extends Spell{constructor(t,s){super(t,s,"Heroic Strike"),this.cost=15-t.talents.impheroicstrike,this.bonus=t.aqbooks?157:this.value1,this.useonly=!0,this.unqueuetimer=300,this.maxdelay=300}use(){this.player.nextswinghs=!0}canUse(){return!this.player.nextswinghs&&this.cost<=this.player.rage&&(!this.minrage&&!this.maincd||this.minrage&&this.player.rage>=this.minrage||this.maincd&&(!this.player.spells.bloodthirst||this.player.spells.bloodthirst&&this.player.spells.bloodthirst.timer>=this.maincd)||this.maincd&&(!this.player.spells.mortalstrike||this.player.spells.mortalstrike&&this.player.spells.mortalstrike.timer>=this.maincd))&&(!this.unqueue||this.player.mh.timer>this.unqueuetimer)}}class MortalStrike extends Spell{constructor(t,s){super(t,s,"Mortal Strike"),this.cost=30,this.cooldown=6}dmg(){let t;return(t=this.player.weaponrng?160+rng(this.player.mh.mindmg+this.player.mh.bonusdmg,this.player.mh.maxdmg+this.player.mh.bonusdmg):160+avg(this.player.mh.mindmg+this.player.mh.bonusdmg,this.player.mh.maxdmg+this.player.mh.bonusdmg))+this.player.stats.ap/14*this.player.mh.normSpeed}canUse(){return!this.timer&&!this.player.timer&&this.cost<=this.player.rage&&this.player.rage>=this.minrage}}class SunderArmor extends Spell{constructor(t,s){super(t,s,"Sunder Armor"),this.cost=15-t.talents.impsunderarmor,this.stacks=0,this.nocrit=!0}use(){this.player.timer=1500,this.player.rage-=this.cost,this.stacks++}canUse(){return!this.player.timer&&this.stacks80&&this.player.auras.consumedrage.use()}canUse(){return 0==this.timer&&!this.player.timer&&(!this.flagellation||!this.player.auras.bloodrage||!this.player.auras.bloodrage.timer)&&(!this.consumedrage||!this.player.auras.consumedrage||this.player.auras.consumedrage.timer)}}class QuickStrike extends Spell{constructor(t,s){super(t,s,"Quick Strike"),this.cost=20-t.talents.impheroicstrike,this.cooldown=0}dmg(){return~~rng(.15*this.player.stats.ap,.25*this.player.stats.ap)}canUse(){return!this.timer&&!this.player.timer&&this.cost<=this.player.rage&&this.player.rage>=this.minrage}}class RagePotion extends Spell{constructor(t,s){super(t,s,"Rage Potion"),this.cost=0,this.rage=100,this.minrage=80,this.cooldown=120,this.useonly=!0}use(){this.timer=1e3*this.cooldown;let t=this.player.rage;this.player.rage=Math.min(this.player.rage+~~rng(this.value1,this.value2),100),this.player.auras.consumedrage&&t<=80&&this.player.rage>80&&this.player.auras.consumedrage.use()}canUse(){return 0==this.timer&&this.player.raget.id==this.id)[0];i||(i=buffs.filter(t=>t.id==this.id)[0]),i&&(i.durationactive&&(this.duration=parseInt(i.duration)),i.timetoend&&(this.timetoend=1e3*parseInt(i.timetoend)),i.crusaders&&(this.crusaders=parseInt(i.crusaders)),i.haste&&(this.mult_stats={haste:parseInt(i.haste)}),i.value1&&(this.value1=i.value1),i.value2&&(this.value2=i.value2),i.procblock&&(this.procblock=i.procblock),i.rageblockactive&&(this.rageblock=parseInt(i.rageblock)),i.wfap&&(this.wfap=parseInt(i.wfap)),i.wfapperc&&(this.wfapperc=parseInt(i.wfapperc)))}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateAuras(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateAuras(),log&&this.player.log(`${this.name} removed`))}end(){this.uptime+=step-this.starttimer,this.timer=0,this.stacks=0}}class Recklessness extends Aura{constructor(t,s){super(t,s),this.duration=15,this.stats={crit:100}}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.player.timer=1500,this.starttimer=step,this.player.updateAuras(),log&&this.player.log(`${this.name} applied`)}canUse(){return this.firstuse&&!this.timer&&!this.player.timer&&step>=this.usestep}}class Flurry extends Aura{constructor(t,s){super(t,s),this.duration=12,this.mult_stats={haste:t.talents.flurry}}proc(){this.stacks--,this.stacks||(this.uptime+=step-this.starttimer,this.timer=0,this.player.updateHaste(),log&&this.player.log(`${this.name} removed`))}use(){this.timer=1,this.stacks||(this.starttimer=step,this.player.updateHaste()),this.stacks=3,log&&this.player.log(`${this.name} applied`)}}class DeepWounds extends Aura{constructor(t,s){super(t,s,"Deep Wounds"),this.duration=12,this.idmg=0,this.totaldmg=0,this.lasttick=0}step(){for(;step>=this.nexttick;){let t=(this.player.mh.mindmg+this.player.mh.bonusdmg+this.player.stats.ap/14*this.player.mh.speed+(this.player.mh.maxdmg+this.player.mh.bonusdmg+this.player.stats.ap/14*this.player.mh.speed))/2;if(t*=this.player.mh.modifier*this.player.stats.dmgmod*this.player.talents.deepwounds,this.idmg+=~~(t/4),this.totaldmg+=~~(t/4),this.player.bleedrage){let t=this.player.rage;this.player.rage+=this.player.bleedrage,this.player.rage>100&&(this.player.rage=100),this.player.auras.consumedrage&&t<=80&&this.player.rage>80&&this.player.auras.consumedrage.use()}log&&this.player.log(`${this.name} tick for ${~~(t/4)}`),this.nexttick+=3e3}step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1)}use(){this.timer&&(this.uptime+=step-this.starttimer),this.nexttick=step+3e3,this.timer=step+1e3*this.duration,this.starttimer=step,log&&this.player.log(`${this.name} applied`)}}class Crusader extends Aura{constructor(t,s){super(t,s),this.duration=15,this.stats={str:100}}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateStrength(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.player.updateStrength(),log&&this.player.log(`${this.name} removed`))}}class Cloudkeeper extends Aura{constructor(t,s){super(t,s),this.duration=30,this.stats={ap:100}}use(){this.player.timer=1500,this.player.itemtimer=1e3*this.duration,this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateAuras(),log&&this.player.log(`${this.name} applied`)}canUse(){return this.firstuse&&!this.player.itemtimer&&!this.timer&&!this.player.timer}}class Felstriker extends Aura{constructor(t,s){super(t,s),this.duration=3,this.stats={crit:100,hit:100}}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.player.update(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.update(),log&&this.player.log(`${this.name} removed`))}}class DeathWish extends Aura{constructor(t,s){super(t,s,"Death Wish"),this.duration=30,this.mult_stats={dmgmod:20}}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.player.rage-=10,this.player.timer=1500,this.starttimer=step,this.player.updateDmgMod(),log&&this.player.log(`${this.name} applied`)}canUse(){return this.firstuse&&!this.timer&&!this.player.timer&&this.player.rage>=10&&(step>=this.usestep||1==this.crusaders&&(this.player.auras.crusader1&&this.player.auras.crusader1.timer||this.player.auras.crusader2&&this.player.auras.crusader2.timer)||2==this.crusaders&&this.player.auras.crusader1&&this.player.auras.crusader1.timer&&this.player.auras.crusader2&&this.player.auras.crusader2.timer)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateDmgMod(),log&&this.player.log(`${this.name} removed`))}}class BattleStance extends Aura{constructor(t,s){super(t,s,"Battle Stance"),this.duration=2,this.stats={crit:-3}}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.player.timer=1500,this.firstuse=!1,this.player.updateAuras(),this.player.rage=Math.min(this.player.rage,this.player.talents.rageretained),log&&this.player.log(`${this.name} removed`))}}class MightyRagePotion extends Aura{constructor(t,s){super(t,s,"Mighty Rage Potion"),this.stats={str:60},this.duration=20}use(){this.timer&&(this.uptime+=step-this.starttimer);let t=this.player.rage;this.player.rage=Math.min(this.player.rage+~~rng(this.value1,this.value2),100),this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateStrength(),this.player.auras.consumedrage&&t<=80&&this.player.rage>80&&this.player.auras.consumedrage.use(),log&&this.player.log(`${this.name} applied`)}canUse(){return this.firstuse&&!this.timer&&(step>=this.usestep||1==this.crusaders&&(this.player.auras.crusader1&&this.player.auras.crusader1.timer||this.player.auras.crusader2&&this.player.auras.crusader2.timer)||2==this.crusaders&&this.player.auras.crusader1&&this.player.auras.crusader1.timer&&this.player.auras.crusader2&&this.player.auras.crusader2.timer)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateStrength(),log&&this.player.log(`${this.name} removed`))}}class BloodFury extends Aura{constructor(t,s){super(t,s,"Blood Fury"),this.duration=15,this.mult_stats={baseapmod:25}}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.player.timer=1500,this.player.updateAuras(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateAuras(),log&&this.player.log(`${this.name} removed`))}canUse(){return this.firstuse&&!this.timer&&!this.player.timer&&step>=this.usestep}}class Berserking extends Aura{constructor(t,s){super(t,s),this.duration=10}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.player.rage-=5,this.player.timer=1500,this.player.updateHaste(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateHaste(),log&&this.player.log(`${this.name} removed`))}canUse(){return this.firstuse&&!this.timer&&!this.player.timer&&this.player.rage>=5&&step>=this.usestep}}class Empyrean extends Aura{constructor(t,s){super(t,s),this.duration=10,this.mult_stats={haste:20},this.name="Empyrean Haste"}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateHaste(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateHaste(),log&&this.player.log(`${this.name} removed`))}}class Eskhandar extends Aura{constructor(t,s){super(t,s),this.duration=5,this.mult_stats={haste:30},this.name="Eskhandar Haste"}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateHaste(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateHaste(),log&&this.player.log(`${this.name} removed`))}}class Zeal extends Aura{constructor(t,s){super(t,s),this.duration=15,this.stats={bonusdmg:10}}use(){this.player.timer&&this.player.timer<1500||(this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateBonusDmg(),log&&this.player.log(`${this.name} applied`))}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateBonusDmg(),log&&this.player.log(`${this.name} removed`))}}class Annihilator extends Aura{constructor(t,s){super(t,s),this.duration=45,this.armor=200,this.stacks=0}use(){rng10k()2?3:this.stacks+1,this.player.updateArmorReduction(),log&&this.player.log(`${this.name} applied`))}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateArmorReduction(),log&&this.player.log(`${this.name} removed`))}}class Rivenspike extends Aura{constructor(t,s){super(t,s),this.duration=30,this.armor=200,this.stacks=0}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.stacks=this.stacks>2?3:this.stacks+1,this.player.updateArmorReduction(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateArmorReduction(),log&&this.player.log(`${this.name} removed`))}}class Bonereaver extends Aura{constructor(t,s){super(t,s),this.duration=10,this.armor=700,this.stacks=0}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.stacks=this.stacks>2?3:this.stacks+1,this.player.updateArmorReduction(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateArmorReduction(),log&&this.player.log(`${this.name} removed`))}}class Destiny extends Aura{constructor(t,s){super(t,s),this.duration=10,this.stats={str:200}}}class Untamed extends Aura{constructor(t,s){super(t,s),this.duration=8,this.stats={str:300},this.name="The Untamed Blade"}}class Pummeler extends Aura{constructor(t,s){super(t,s),this.duration=30,this.mult_stats={haste:50},this.name="Manual Crowd Pummeler"}use(){this.player.timer=1500,this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateHaste(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateHaste(),log&&this.player.log(`${this.name} removed`))}canUse(){return this.firstuse&&!this.timer&&!this.player.timer&&!this.player.itemtimer}}class Windfury extends Aura{constructor(t,s){super(t,s),this.wfap&&(this.stats={ap:this.wfap}),this.wfapperc&&(this.mult_stats={apmod:this.wfapperc})}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1500,this.starttimer=step,this.mintime=step%batching,this.stacks=2,this.player.updateAP(),this.player.extraattacks++,log&&this.player.log(`${this.name} applied`)}proc(){this.stacks<2?(step=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.stacks=0,this.firstuse=!1,this.player.updateAP(),log&&this.player.log(`${this.name} removed`))}}class Swarmguard extends Aura{constructor(t,s){super(t,s),this.duration=30,this.armor=200,this.stacks=0,this.chance=5e3,this.timetoend=3e4}use(){this.timer=step+1e3*this.duration,this.starttimer=step,this.stacks=0,log&&this.player.log(`${this.name} applied`)}canUse(){return this.firstuse&&!this.timer&&step>=this.usestep}proc(){this.stacks=Math.min(this.stacks+1,6),this.player.updateArmorReduction(),log&&this.player.log(`${this.name} proc`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.stacks=0,this.firstuse=!1,this.player.updateArmorReduction(),log&&this.player.log(`${this.name} removed`))}}class Flask extends Aura{constructor(t,s){super(t,s),this.duration=60,this.stats={str:75},this.name="Diamond Flask"}use(){this.player.timer=1500,this.player.itemtimer=1e3*this.duration,this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateAuras(),log&&this.player.log(`${this.name} applied`)}canUse(){return this.firstuse&&!this.timer&&!this.player.timer&&!this.player.itemtimer}}class Slayer extends Aura{constructor(t,s){super(t,s),this.duration=20,this.stats={ap:260},this.name="Slayer's Crest"}use(){this.player.timer=1500,this.player.itemtimer=1e3*this.duration,this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateAP(),log&&this.player.log(`${this.name} applied`)}canUse(){return this.firstuse&&!this.timer&&!this.player.timer&&!this.player.itemtimer}}class Spider extends Aura{constructor(t,s){super(t,s),this.duration=15,this.mult_stats={haste:20},this.name="Kiss of the Spider"}use(){this.player.timer=1500,this.player.itemtimer=1e3*this.duration,this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateHaste(),log&&this.player.log(`${this.name} applied`)}canUse(){return this.firstuse&&!this.timer&&!this.player.timer&&!this.player.itemtimer}}class Earthstrike extends Aura{constructor(t,s){super(t,s),this.duration=20,this.stats={ap:280}}use(){this.player.timer=1500,this.player.itemtimer=1e3*this.duration,this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateAP(),log&&this.player.log(`${this.name} applied`)}canUse(){return this.firstuse&&!this.timer&&!this.player.timer&&!this.player.itemtimer}}class Gabbar extends Aura{constructor(t,s){super(t,s),this.duration=20,this.stats={ap:65},this.name="Jom Gabbar"}use(){this.stats.ap=65,this.player.timer=1500,this.player.itemtimer=1e3*this.duration,this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateAP(),log&&this.player.log(`${this.name} applied`)}canUse(){return this.firstuse&&!this.timer&&!this.player.timer&&!this.player.itemtimer}step(){(step-this.starttimer)%2e3==0&&(this.stats.ap+=65,this.player.updateAP(),log&&this.player.log(`${this.name} tick`)),step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateAP(),log&&this.player.log(`${this.name} removed`))}}class PrimalBlessing extends Aura{constructor(t,s){super(t,s),this.duration=12,this.stats={ap:300},this.name="Primal Blessing"}}class BloodrageAura extends Aura{constructor(t,s){super(t,s),this.duration=10,this.name="Bloodrage"}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,log&&this.player.log(`${this.name} applied`)}step(){return(step-this.starttimer)%1e3==0&&(this.player.rage=Math.min(this.player.rage+1,100),this.player.auras.consumedrage&&this.player.rage>80&&this.player.rage<=81&&this.player.auras.consumedrage.use(),log&&this.player.log(`${this.name} tick`)),step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,log&&this.player.log(`${this.name} removed`)),this.timer}}class Zandalarian extends Aura{constructor(t,s){super(t,s),this.duration=20,this.stats={bonusdmg:40}}use(){this.player.timer=1500,this.player.itemtimer=1e3*this.duration,this.timer=step+1e3*this.duration,this.starttimer=step,this.stats.bonusdmg=40,this.player.updateBonusDmg(),log&&this.player.log(`${this.name} applied`)}proc(){this.stats.bonusdmg-=2,this.player.updateBonusDmg(),this.stats.bonusdmg<=0&&(this.timer=step,this.step())}canUse(){return this.firstuse&&!this.timer&&!this.player.timer&&!this.player.itemtimer}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1,this.player.updateBonusDmg(),log&&this.player.log(`${this.name} removed`))}}class Avenger extends Aura{constructor(t,s){super(t,s),this.duration=10,this.stats={ap:200},this.name="Argent Avenger"}}class Flagellation extends Aura{constructor(t,s){super(t,s),this.duration=12,this.mult_stats={dmgmod:25}}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateDmgMod(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.player.updateDmgMod(),log&&this.player.log(`${this.name} removed`))}}class BerserkerRageAura extends Aura{constructor(t,s){super(t,s),this.duration=10,this.name="Berserker Rage"}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,log&&this.player.log(`${this.name} removed`))}}class ConsumedRage extends Aura{constructor(t,s){super(t,s,"Consumed by Rage"),this.duration=12,this.mult_stats={dmgmod:25}}proc(){this.stacks--,this.stacks||(this.uptime+=step-this.starttimer,this.timer=0,this.player.updateDmgMod(),log&&this.player.log(`${this.name} removed`))}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.stacks=12,this.player.updateDmgMod(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.stacks=0,this.firstuse=!1,this.player.updateDmgMod(),log&&this.player.log(`${this.name} removed`))}}class Rend extends Aura{constructor(t,s){super(t,s),this.duration=this.duration||9,this.cost=10,this.idmg=0,this.totaldmg=0,this.lasttick=0,this.dmgmod=1+this.player.talents.rendmod/100}step(){for(;step>=this.nexttick&&this.stacks;){let t=this.value1*this.player.stats.dmgmod*this.dmgmod;if(this.idmg+=~~(t/3),this.totaldmg+=~~(t/3),this.player.bleedrage){let t=this.player.rage;this.player.rage+=this.player.bleedrage,this.player.rage>100&&(this.player.rage=100),this.player.auras.consumedrage&&t<=80&&this.player.rage>80&&this.player.auras.consumedrage.use()}log&&this.player.log(`${this.name} tick for ${~~(t/3)}`),this.nexttick+=3e3,this.stacks--}step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.firstuse=!1)}use(){this.timer&&(this.uptime+=step-this.starttimer),this.nexttick=step+3e3,this.timer=step+1e3*this.duration,this.starttimer=step,this.stacks=3,log&&this.player.log(`${this.name} applied`)}canUse(){return!this.timer&&!this.player.timer&&this.player.rage>=this.cost}}class Vibroblade extends Aura{constructor(t,s){super(t,s),this.duration=30,this.armor=100}use(){this.timer&&(this.uptime+=step-this.starttimer),this.timer=step+1e3*this.duration,this.starttimer=step,this.player.updateArmorReduction(),log&&this.player.log(`${this.name} applied`)}step(){step>=this.timer&&(this.uptime+=this.timer-this.starttimer,this.timer=0,this.player.updateArmorReduction(),log&&this.player.log(`${this.name} removed`))}} \ No newline at end of file diff --git a/dist/js/data/runes.min.js b/dist/js/data/runes.min.js index 41106258a..09d980452 100644 --- a/dist/js/data/runes.min.js +++ b/dist/js/data/runes.min.js @@ -1 +1 @@ -var runes={chest:[{id:402877,name:"Flagellation",description:"Gain a 25% bonus to physical damage done for 12 sec after activating Bloodrage or Berserker Rage.",iconname:"Flagellation",flagellation:!0},{id:412507,name:"Blood Frenzy",description:"Each time you deal Bleed damage, you gain 3 rage.",iconname:"Blood-Frenzy",bleedrage:3},{id:402911,name:"Raging Blow",description:"A ferocious strike that deals 100% weapon damage, but can only be used while Enrage, Berserker Rage, or Bloodrage is active.
[ASSUMED NO SWING RESET, 8 SECOND CD AND NO RAGE COST]",iconname:"Raging-Blow",enable:402911},{id:425421,name:"Warbringer",description:"Your Charge, Intercept, and Intervene abilities are now usable while in combat and in any stance, and will all remove movement impairing effects when activated.",iconname:"Warbringer"}],hands:[{id:403219,name:"Furious Thunder",description:"Thunder Clap now increases the time between attacks by an additional 6% and can be used in any stance.",iconname:"Furious-Thunder"},{id:425418,name:"Consumed by Rage",description:"Enrages you and grants you a 25% melee damage bonus for 12 sec or up to a maximum of 12 swings after you exceed 80 Rage.",iconname:"Consumed-by-Rage",enable:425418},{id:431046,name:"Frenzied Assault",description:"While wielding 2-handed weapons, your attack speed is increased by 20%.",iconname:"Frenzied-Assault",haste2h:20}],legs:[{id:402927,name:"Victory Rush",description:"Instantly attack the target causing Attack power * 45 / 100 damage and healing you for 10% of your maximum health. Only usable within 20 sec after you kill an enemy that yields experience or honor.",iconname:"Victory-Rush",enable:402927},{id:403218,name:"Endless Rage",description:"You generate 25% more Rage from all damage you deal.
[ASSUMED NO EFFECT ON REFUNDS]",iconname:"Endless-Rage",ragemod:1.25},{id:403195,name:"Devastate",description:"While you are in Defensive Stance and have a shield equipped, Sunder Armor also deals 100% weapon damage, increased by 10% per application of Sunder Armor already on the target.
[NOT IMPLEMENTED]",iconname:"Devastate"},{id:430472,name:"Single-Minded Fury",description:"While dual-wielding, your Physical damage and movement speed are increased by 10%.",iconname:"Single-Minded-Fury",dmgdw:10},{id:429765,name:"Quick Strike",description:"A reckless instant melee attack with your two-handed weapon dealing X physical damage. This ability benefits from and triggers all effects associated with Heroic Strike.
[DONT REALLY KNOW HOW THIS WORKS, ASSUMED X = 66, SCALES WITH AP, NO CD, 20 RAGE COST, NO SWING RESET, NO INTERACTION WITH HS QUEUE]",iconname:"inv_axe_03",twohandonly:!0,enable:429765}]}; \ No newline at end of file +var runes={chest:[{id:402877,name:"Flagellation",description:"Gain a 25% bonus to physical damage done for 12 sec after activating Bloodrage or Berserker Rage.",iconname:"Flagellation",flagellation:!0},{id:412507,name:"Blood Frenzy",description:"Each time you deal Bleed damage, you gain 3 rage.",iconname:"Blood-Frenzy",bleedrage:3},{id:402911,name:"Raging Blow",description:"A ferocious strike that deals 100% weapon damage, but can only be used while Enrage, Berserker Rage, or Bloodrage is active.",iconname:"Raging-Blow",enable:402911},{id:425421,name:"Warbringer",description:"Your Charge, Intercept, and Intervene abilities are now usable while in combat and in any stance, and will all remove movement impairing effects when activated.",iconname:"Warbringer"}],hands:[{id:403219,name:"Furious Thunder",description:"Thunder Clap now increases the time between attacks by an additional 6% and can be used in any stance.",iconname:"Furious-Thunder"},{id:425418,name:"Consumed by Rage",description:"Enrages you and grants you a 25% melee damage bonus for 12 sec or up to a maximum of 12 swings after you exceed 80 Rage.",iconname:"Consumed-by-Rage",enable:425418},{id:431046,name:"Frenzied Assault",description:"While wielding 2-handed weapons, your attack speed is increased by 20%.",iconname:"Frenzied-Assault",haste2h:20}],legs:[{id:402927,name:"Victory Rush",description:"Instantly attack the target causing Attack power * 45 / 100 damage and healing you for 10% of your maximum health. Only usable within 20 sec after you kill an enemy that yields experience or honor.",iconname:"Victory-Rush",enable:402927},{id:403218,name:"Endless Rage",description:"You generate 25% more Rage from all damage you deal.
[ASSUMED NO EFFECT ON REFUNDS]",iconname:"Endless-Rage",ragemod:1.25},{id:403195,name:"Devastate",description:"While you are in Defensive Stance and have a shield equipped, Sunder Armor also deals 100% weapon damage, increased by 10% per application of Sunder Armor already on the target.
[NOT IMPLEMENTED]",iconname:"Devastate"},{id:430472,name:"Single-Minded Fury",description:"While dual-wielding, your Physical damage and movement speed are increased by 10%.",iconname:"Single-Minded-Fury",dmgdw:10},{id:429765,name:"Quick Strike",description:"A reckless instant melee attack with your two-handed weapon dealing (Attack power * 15 / 100) to (Attack power * 25 / 100) physical damage. This ability benefits from and triggers all effects associated with Heroic Strike.
[DONT REALLY KNOW HOW THIS WORKS DOES IT INTERACT WITH HS QUEUE?]",iconname:"inv_axe_03",twohandonly:!0,enable:429765}]}; \ No newline at end of file diff --git a/js/classes/spell.js b/js/classes/spell.js index e9b3bf6e3..f4f615b88 100644 --- a/js/classes/spell.js +++ b/js/classes/spell.js @@ -327,10 +327,7 @@ class QuickStrike extends Spell { this.cooldown = 0; } dmg() { - let dmg; - if (this.player.weaponrng) dmg = 66; - else dmg = 66; - return dmg + (this.player.stats.ap / 14) * this.player.mh.normSpeed; + return ~~rng(this.player.stats.ap * 0.15, this.player.stats.ap * 0.25); } canUse() { return !this.timer && !this.player.timer && this.cost <= this.player.rage && this.player.rage >= this.minrage; diff --git a/js/data/runes.js b/js/data/runes.js index 76b4197c9..7c1dc92b2 100644 --- a/js/data/runes.js +++ b/js/data/runes.js @@ -17,7 +17,7 @@ var runes = { { id: 402911, name: 'Raging Blow', - description: "A ferocious strike that deals 100% weapon damage, but can only be used while Enrage, Berserker Rage, or Bloodrage is active.
[ASSUMED NO SWING RESET, 8 SECOND CD AND NO RAGE COST]", + description: "A ferocious strike that deals 100% weapon damage, but can only be used while Enrage, Berserker Rage, or Bloodrage is active.", iconname: 'Raging-Blow', enable: 402911 }, @@ -81,7 +81,7 @@ var runes = { { id: 429765, name: 'Quick Strike', - description: "A reckless instant melee attack with your two-handed weapon dealing X physical damage. This ability benefits from and triggers all effects associated with Heroic Strike.
[DONT REALLY KNOW HOW THIS WORKS, ASSUMED X = 66, SCALES WITH AP, NO CD, 20 RAGE COST, NO SWING RESET, NO INTERACTION WITH HS QUEUE]", + description: "A reckless instant melee attack with your two-handed weapon dealing (Attack power * 15 / 100) to (Attack power * 25 / 100) physical damage. This ability benefits from and triggers all effects associated with Heroic Strike.
[DONT REALLY KNOW HOW THIS WORKS DOES IT INTERACT WITH HS QUEUE?]", iconname: 'inv_axe_03', twohandonly: true, enable: 429765,