Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
77
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.     corruptionRate *= gamePage.getRateUI();
  13.     if(log)
  14.         console.log("Current corruption rate: " + corruptionRate + "/sec");
  15.     return gamePage.toDisplaySeconds( (1 + corruptionRate - curCorruption) / (corruptionRate) );
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement