Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ppsAny(Gcd, Job, level) {
- Job = Job.toUpperCase();
- sps = getSps(Gcd,level);
- let filler = Filler(Job, level); //potencies of filler spells per job
- let dot = Dot(Job, level); //[initial hit,potency, duration]
- dot[1]*= (1000+SPD(sps,level))/1000; // sps boosts dots
- let cps = Cps(Gcd,dot[2],Job); // [gcds cast between dot refreshes, total time spent casting those gcds]
- let casts = cps[0];
- let refreshtime = cps[1];
- let P = filler * (casts - 1) + dot[0]; // filler casts plus hit potency of dot
- P += dot[1] * Math.min(dot[2],refreshtime)/3; // tick potency * average ticks between refreshes
- P /= refreshtime; // potency/time of gcds
- //Job specific actions
- if(Job === "WHM"){
- P += filler * POM(Gcd,20)/120; //extra glares granted by POM divided by 120s
- P += 400/45; //assize
- }
- if(Job === "SCH"){
- P += 300/60 + 300/180; //Energy drain from AF and dissipation
- }
- if(Job === "AST"){
- let dyne = Astrodyne(Gcd,sps); // average net malefics gained by an astrodyne window [2 seal casts, 3 seal bonus]
- let dynegain = dyne[0]; //extra malefics granted by astrodyne
- dynegain+= dyne[1] * 140/225; //chance-weighting 3 seal buff
- let dynecd = 254/255 * 90 + 1/255 * 120; //"cooldown" of astrodyne, weighted averaged of delayed uses to fish for seals
- P += filler * dynegain/dynecd;
- P += 310/60; //earthly star
- P += 250/60 * 1/2; //Minor arcana average potency
- }
- if(Job === "SGE"){
- P += (510-filler)/GcdCalc(45000, sps, level); //phlegma
- }
- return P;
- }
- function Cps(Gcd,dottimer,Job) {
- let dotrecast = (Job === "SGE") ? 2.5 : Gcd; // Eukrasian dosis has an effective recast time of 2.5s regardless of sps
- let x = (dottimer - dotrecast) % Gcd > 1.5; // Decide wether or not to cast an extra gcd before refreshing dot
- let casts = Math.floor(dottimer / Gcd) + (x ? 1 : 0); // number of gcd casts between dot refreshes, including dot
- let refreshtime = Gcd * (casts-1) + dotrecast; // total time spent between dot refreshes
- return [casts,refreshtime];
- }
- //returns number of extra gcds granted on average by a 15s long sps buff
- function spsbuffgain(Gcd,buff) {
- let weave = Math.round(Gcd*60)/100 + 0.1;
- let buffgcd = Math.floor(Gcd * (100-buff))/100;
- let timer = 15 - (Gcd - weave); //effective buff time available after weaving it.
- return casts = timer/buffgcd - timer/Gcd;
- }
Advertisement
Add Comment
Please, Sign In to add comment