Skip to content

Commit

Permalink
rend & glance formula
Browse files Browse the repository at this point in the history
  • Loading branch information
turinpt committed Nov 12, 2023
1 parent 2ea646c commit ff5a1f9
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 35 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/session.min.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

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

4 changes: 2 additions & 2 deletions js/classes/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,8 @@ class Player {
}
getGlanceReduction(weapon) {
let diff = this.target.defense - this.stats['skill_' + weapon.type];
let low = Math.min(1.3 - 0.05 * diff, 0.91);
let high = Math.min(1.2 - 0.03 * diff, 0.99);
let low = Math.max(Math.min(1.3 - 0.05 * diff, 0.91), 0.01);
let high = Math.max(Math.min(1.2 - 0.03 * diff, 0.99), 0.2);
if (this.weaponrng) return Math.random() * (high - low) + low;
else return avg(low, high);
}
Expand Down
15 changes: 8 additions & 7 deletions js/classes/spell.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class Spell {
if (spell.reaction) this.maxdelay = parseInt(spell.reaction);
if (spell.cooldown) this.cooldown = parseInt(spell.cooldown) || 0;
if (spell.durationactive) this.cooldown = Math.max(parseInt(spell.duration), this.cooldown);
if (spell.value1) this.value1 = spell.value1;
if (spell.value2) this.value2 = spell.value2;
if (spell.value1) this.value1 = parseInt(spell.value1);
if (spell.value2) this.value2 = parseInt(spell.value2);
if (spell.priorityapactive) this.priorityap = parseInt(spell.priorityap);
if (spell.flagellation) this.flagellation = spell.flagellation;
if (spell.consumedrage) this.consumedrage = spell.consumedrage;
Expand Down Expand Up @@ -1277,7 +1277,8 @@ class ConsumedRage extends Aura {
class Rend extends Aura {
constructor(player, id) {
super(player, id);
this.duration = this.duration || 9;
let dur = this.value2 * 3;
this.duration = Math.max(this.duration || dur, dur);
this.cost = 10;
this.idmg = 0;
this.totaldmg = 0;
Expand All @@ -1287,8 +1288,8 @@ class Rend extends Aura {
step() {
while (step >= this.nexttick && this.stacks) {
let dmg = this.value1 * this.player.stats.dmgmod * this.dmgmod;
this.idmg += ~~(dmg / 3);
this.totaldmg += ~~(dmg / 3);
this.idmg += ~~(dmg / this.value2);
this.totaldmg += ~~(dmg / this.value2);

if (this.player.bleedrage) {
let oldRage = this.player.rage;
Expand All @@ -1298,7 +1299,7 @@ class Rend extends Aura {
this.player.auras.consumedrage.use();
}

/* start-log */ if (log) this.player.log(`${this.name} tick for ${~~(dmg / 3)}`); /* end-log */
/* start-log */ if (log) this.player.log(`${this.name} tick for ${~~(dmg / this.value2)}`); /* end-log */

this.nexttick += 3000;
this.stacks--;
Expand All @@ -1315,7 +1316,7 @@ class Rend extends Aura {
this.nexttick = step + 3000;
this.timer = step + this.duration * 1000;
this.starttimer = step;
this.stacks = 3;
this.stacks = this.value2;
/* start-log */ if (log) this.player.log(`${this.name} applied`); /* end-log */
}
canUse() {
Expand Down
14 changes: 7 additions & 7 deletions js/data/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var session = {
"minlevel": 4,
"maxlevel": 9,
"value1": 15,
"duration": 10,
"duration": 16,
"durationactive": true,
"active": false,
"aura": true
Expand All @@ -50,7 +50,7 @@ var session = {
"minlevel": 10,
"maxlevel": 19,
"value1": 28,
"duration": 10,
"duration": 16,
"durationactive": true,
"active": false,
"aura": true
Expand All @@ -63,7 +63,7 @@ var session = {
"minlevel": 20,
"maxlevel": 29,
"value1": 45,
"duration": 10,
"duration": 16,
"durationactive": true,
"active": false,
"aura": true
Expand All @@ -76,7 +76,7 @@ var session = {
"minlevel": 30,
"maxlevel": 39,
"value1": 66,
"duration": 10,
"duration": 16,
"durationactive": true,
"active": false,
"aura": true
Expand All @@ -89,7 +89,7 @@ var session = {
"minlevel": 40,
"maxlevel": 49,
"value1": 98,
"duration": 10,
"duration": 16,
"durationactive": true,
"active": false,
"aura": true
Expand All @@ -102,7 +102,7 @@ var session = {
"minlevel": 50,
"maxlevel": 59,
"value1": 126,
"duration": 10,
"duration": 16,
"durationactive": true,
"active": false,
"aura": true
Expand All @@ -114,7 +114,7 @@ var session = {
"iconname": "ability_gouge",
"minlevel": 60,
"value1": 147,
"duration": 10,
"duration": 16,
"durationactive": true,
"active": false,
"aura": true
Expand Down
Loading

0 comments on commit ff5a1f9

Please sign in to comment.