Advertisement
Guest User

Cookie Clicker Force the Hand of Fate Predictor

a guest
Feb 23rd, 2019
492
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Cookie Clicker script by klattmose
  2. // based largely on the mod by Shylight with some modifications by Gouchnox (found at https://pastebin.com/raw/6pbdStD0)
  3. // and incorporating code from Cookie Clicker FtHoF Planner (found at http://fthof-planner.s3-website.us-east-2.amazonaws.com/)
  4.  
  5. function choose(arr) {return arr[Math.floor(Math.random()*arr.length)];}
  6. if (!("statsloaded" in window)) {
  7.    
  8.     var style = document.createElement('style')
  9.     style.type = 'text/css'
  10.     style.innerHTML = `
  11.     .diceIcon{
  12.         padding-left: 18px;
  13.         position: relative;
  14.         cursor: pointer;
  15.     }
  16.     .diceIcon:before{
  17.         content: '';
  18.         background-image: url(img/icons.png?v=2.0042);
  19.         background-position: -304px 0px;
  20.         background-size: 480px;
  21.         width: 16px;
  22.         height: 16px;
  23.         display: block;
  24.         position: absolute;
  25.         left: 0;
  26.         top: 0px;
  27.     }
  28.     b{
  29.         opacity: 1!important;
  30.         color: rgba(255,255,255,0.6);
  31.     }`
  32.     var diceIcon = '<span class="diceIcon"></span>'
  33.     //class="diceIcon" onclick="Game.seed=Game.makeSeed()"
  34.    
  35.     document.getElementsByTagName('head')[0].appendChild(style)
  36.    
  37.     eval('Game.UpdateMenu=' + Game.UpdateMenu.toString().replace(/(str\+=.*Statistics)/,
  38.         `with(Game){
  39.             var spellOutcome     = '';
  40.             if (isMinigameReady(Objects["Wizard tower"])){
  41.                 var spellsCast    = Objects["Wizard tower"].minigame.spellsCastTotal
  42.                 var target        = spellsCast + 10
  43.                 while(spellsCast < target){
  44.                     Math.seedrandom(\`\${Game.seed}/\${spellsCast}\`)
  45.                     roll = Math.random()
  46.                    
  47.                     if(roll < 0.85){
  48.                         /* Random is called a few times in setting up the golden cookie */
  49.                         if (Game.chimeType==1 && Game.ascensionMode!=1) Math.random();
  50.                         if (Game.season=='valentines' || Game.season=='easter') Math.random();
  51.                         Math.random();
  52.                         Math.random();
  53.                         /**/
  54.                        
  55.                         var choices=[];
  56.                         choices.push('Frenzy','Lucky');
  57.                         if (Game.dragonAura!=10 && Game.dragonAura2!=10) choices.push('Click Frenzy');
  58.                         if (Math.random()<0.1) choices.push('Cookie Storm','Cookie Storm','Blab');
  59.                         if (Math.random()<0.25) choices.push('Building Special');
  60.                         if (Math.random()<0.15) choices=['Cookie Storm Drop'];
  61.                         if (Math.random()<0.0001) choices.push('Free Sugar Lump');
  62.                        
  63.                         var FTHOFcookie = choose(choices);
  64.                        
  65.                         spellOutcome += "<b><font color=#66ff66>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + FTHOFcookie + "</font></b><br/>"
  66.                        
  67.                     } else {
  68.                         /* Random is called a few times in setting up the golden cookie */
  69.                         if (Game.chimeType==1 && Game.ascensionMode!=1) Math.random();
  70.                         if (Game.season=='valentines' || Game.season=='easter') Math.random();
  71.                         Math.random();
  72.                         Math.random();
  73.                         /**/
  74.                        
  75.                         var choices=[];
  76.                         choices.push('Clot','Ruin');
  77.                         if (Math.random()<0.1) choices.push('Cursed Finger','Elder Frenzy');
  78.                         if (Math.random()<0.003) choices.push('Free Sugar Lump');
  79.                         if (Math.random()<0.1) choices=['Blab'];
  80.                        
  81.                         var FTHOFcookie = choose(choices);
  82.                        
  83.                         spellOutcome += "<b><font color=#ff6666>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + FTHOFcookie + "</font></b><br/>"
  84.                        
  85.                     }
  86.                    
  87.                     spellsCast+=1
  88.                     Math.seedrandom()
  89.                 }
  90.             }
  91.         }
  92.         $1`).replace(/(Game\.wrinklersPopped>0\?.*)/,
  93.         `$1
  94.         \`<div class="listing"><b onclick="Game.seed=Game.makeSeed()" title="Reroll outcomes">\${diceIcon}</b> <b>Next spells:</b><br/> \${spellOutcome}</div>\`+`
  95.         )
  96.     )
  97. };
  98.  
  99. statsloaded = 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement