Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var pdRate = Number(prompt("What is the monster PDR?"));
- var speed = Number(prompt("What is the speed of the weapon?"));
- function Character(skill, delay, hits, mobs, critRate, critMin, critMax, ignoreDEF, damageInc,
- faRate, faDmg, base, mastery, summDmg, summDelay) {
- this.skill = skill;
- this.delay = delay;
- this.hits = hits;
- this.mobs = mobs;
- this.skillDelay = function () {
- if (speed != 6) {
- var dela3 = ((10 + speed) / 16) * this.delay;
- var dela2 = dela3 % 30;
- return dela3 - dela2;
- } else {
- return this.delay;
- }
- };
- this.skillPerSecond = function () {
- return (1000 / (this.skillDelay(this.delay))) * this.skill * this.hits * this.mobs;
- };
- this.critRate = critRate;
- this.critMin = critMin;
- this.critMax = critMax;
- this.critDmg = function () {
- var critRate1 = this.critRate / 100;
- var critMin1 = this.critMin / 100;
- var critMax1 = this.critMax / 100;
- return 1 + (critRate1 * ((critMin1 + critMax1) / 2));
- };
- this.ignoreDEF = ignoreDEF;
- this.damageInc = damageInc;
- this.physicalDEF = function () {
- var ignoreDef1 = this.ignoreDEF / 100;
- var pdrate1 = pdRate / 100;
- if (ignoreDef1 != 1) {
- return ((1 - pdrate1) + (pdrate1 * ignoreDef1));
- } else {
- return 1;
- }
- };
- this.faRate = faRate;
- this.faDmg = faDmg;
- this.faCalc = function () {
- var faRate1 = this.faRate / 100;
- return faRate1 * this.faDmg;
- };
- this.mastery = mastery;
- this.base = base;
- this.adjMastery = function () {
- if (this.mastery !== 0) {
- var mastery1 = this.mastery / 100;
- var base1 = this.base/100;
- var mastery2 = ((mastery1 + 1) / 2);
- var base2 = ((base1 + 1) / 2);
- return mastery2/base2;
- } else {
- return 0;
- }
- };
- this.summDmg = summDmg;
- this.summDelay = summDelay;
- this.summonDamage = function () {
- if (this.summDmg !== 0) {
- var summDelay1 = this.summDelay / 1000;
- return this.summDmg / summDelay1;
- } else {
- return 0;
- }
- };
- this.addSE = function () {
- this.critRate += 20;
- this.critMax += 30;
- };
- this.addThreaten = function () {
- this.ignoreDEF += 30;
- };
- this.addLegendarySpear = function () {
- this.ignoreDEF += 20;
- };
- this.addDamageInc = function () {
- var x = Number(prompt("How much damage increase?"));
- this.damageInc += x;
- };
- this.setSkill = function (newSkill) {
- this.skill = newSkill;
- };
- this.setDelay = function (newDelay) {
- this.delay = newDelay;
- };
- this.setHits = function (newHits) {
- this.hits = newHits;
- };
- this.setMobs = function (newMobs) {
- this.mobs = newMobs;
- };
- this.setSkill = function () {
- this.skill += this.faCalc();
- };
- this.totalDPS = function () {
- return Math.floor(this.skillPerSecond() * this.critDmg() * this.physicalDEF() * this.adjMastery() * ((this.damageInc / 100) + 1) + this.summonDamage());
- };
- }
- var bowmaster = new Character(250, 120, 1, 1, 65, 35, 80, 25, 15, 70, 210, 65, 85, 390, 3030); //100% crit with dodge change(65)
- bowmaster.setSkill();
- bowmaster.totalDPS();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement