Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. getNecrocornTime = function(log=false){//true to also output necrocorns per second
  2.     var numAlicorns = gamePage.resPool.get("alicorn").value;
  3.     var curCorruption = gamePage.religion.corruption;
  4.     var corruptionRate = 1;
  5.     if(gamePage.resPool.get("necrocorn").value > 0)
  6.         corruptionRate = 0.25 * (1+ gamePage.getEffect("corruptionBoostRatio"));
  7.     corruptionRate *= gamePage.getEffect("corruptionRatio");
  8.     if(numAlicorns <= 0){
  9.         curCorruption = 0;
  10.         corruptionRate = 0;
  11.     }
  12.     if(log)
  13.         console.log("Current corruption rate: " + (corruptionRate * gamePage.getRateUI()) + "/sec");
  14.     return gamePage.toDisplaySeconds( (1 + corruptionRate - curCorruption) / (corruptionRate * gamePage.getRateUI()) );
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement