Optimize reset bonus calculation
This commit is contained in:
@@ -3069,8 +3069,11 @@ CM.Sim.ResetBonus = function(possiblePresMax) {
|
|||||||
var lastAchievementsOwned = -1;
|
var lastAchievementsOwned = -1;
|
||||||
|
|
||||||
// Calculate CPS with all Heavenly upgrades
|
// Calculate CPS with all Heavenly upgrades
|
||||||
|
var curCPS = Game.cookiesPs;
|
||||||
|
|
||||||
CM.Sim.CopyData();
|
CM.Sim.CopyData();
|
||||||
|
|
||||||
|
if (CM.Sim.Upgrades['Heavenly key'].bought == 0) {
|
||||||
CM.Sim.Upgrades['Heavenly chip secret'].bought = 1;
|
CM.Sim.Upgrades['Heavenly chip secret'].bought = 1;
|
||||||
CM.Sim.Upgrades['Heavenly cookie stand'].bought = 1;
|
CM.Sim.Upgrades['Heavenly cookie stand'].bought = 1;
|
||||||
CM.Sim.Upgrades['Heavenly bakery'].bought = 1;
|
CM.Sim.Upgrades['Heavenly bakery'].bought = 1;
|
||||||
@@ -3079,9 +3082,10 @@ CM.Sim.ResetBonus = function(possiblePresMax) {
|
|||||||
|
|
||||||
CM.Sim.CalculateGains();
|
CM.Sim.CalculateGains();
|
||||||
|
|
||||||
var curCPS = CM.Sim.cookiesPs;
|
curCPS = CM.Sim.cookiesPs;
|
||||||
|
|
||||||
CM.Sim.CopyData();
|
CM.Sim.CopyData();
|
||||||
|
}
|
||||||
|
|
||||||
if (Game.cookiesEarned >= 1000000) CM.Sim.Win('Sacrifice');
|
if (Game.cookiesEarned >= 1000000) CM.Sim.Win('Sacrifice');
|
||||||
if (Game.cookiesEarned >= 1000000000) CM.Sim.Win('Oblivion');
|
if (Game.cookiesEarned >= 1000000000) CM.Sim.Win('Oblivion');
|
||||||
|
|||||||
@@ -470,8 +470,11 @@ CM.Sim.ResetBonus = function(possiblePresMax) {
|
|||||||
var lastAchievementsOwned = -1;
|
var lastAchievementsOwned = -1;
|
||||||
|
|
||||||
// Calculate CPS with all Heavenly upgrades
|
// Calculate CPS with all Heavenly upgrades
|
||||||
|
var curCPS = Game.cookiesPs;
|
||||||
|
|
||||||
CM.Sim.CopyData();
|
CM.Sim.CopyData();
|
||||||
|
|
||||||
|
if (CM.Sim.Upgrades['Heavenly key'].bought == 0) {
|
||||||
CM.Sim.Upgrades['Heavenly chip secret'].bought = 1;
|
CM.Sim.Upgrades['Heavenly chip secret'].bought = 1;
|
||||||
CM.Sim.Upgrades['Heavenly cookie stand'].bought = 1;
|
CM.Sim.Upgrades['Heavenly cookie stand'].bought = 1;
|
||||||
CM.Sim.Upgrades['Heavenly bakery'].bought = 1;
|
CM.Sim.Upgrades['Heavenly bakery'].bought = 1;
|
||||||
@@ -480,9 +483,10 @@ CM.Sim.ResetBonus = function(possiblePresMax) {
|
|||||||
|
|
||||||
CM.Sim.CalculateGains();
|
CM.Sim.CalculateGains();
|
||||||
|
|
||||||
var curCPS = CM.Sim.cookiesPs;
|
curCPS = CM.Sim.cookiesPs;
|
||||||
|
|
||||||
CM.Sim.CopyData();
|
CM.Sim.CopyData();
|
||||||
|
}
|
||||||
|
|
||||||
if (Game.cookiesEarned >= 1000000) CM.Sim.Win('Sacrifice');
|
if (Game.cookiesEarned >= 1000000) CM.Sim.Win('Sacrifice');
|
||||||
if (Game.cookiesEarned >= 1000000000) CM.Sim.Win('Oblivion');
|
if (Game.cookiesEarned >= 1000000000) CM.Sim.Win('Oblivion');
|
||||||
|
|||||||
Reference in New Issue
Block a user