Fixed to work with Version 2.0106 of CC (Issue #179 and #181)

This commit is contained in:
Aktanusa
2018-04-24 18:58:18 -04:00
parent 07253531ef
commit f6164a9b85
4 changed files with 314 additions and 264 deletions

View File

@@ -185,13 +185,13 @@ CM.Cache.RemakeChain = function() {
CM.Cache.Chain = 0;
}
else {
CM.Cache.Chain = CM.Cache.NextNumber(CM.Cache.ChainReward) / 0.25;
CM.Cache.Chain = CM.Cache.NextNumber(CM.Cache.ChainReward) / 0.5;
}
if (maxPayout < CM.Cache.ChainWrathReward) {
CM.Cache.ChainWrath = 0;
}
else {
CM.Cache.ChainWrath = CM.Cache.NextNumber(CM.Cache.ChainWrathReward) / 0.25;
CM.Cache.ChainWrath = CM.Cache.NextNumber(CM.Cache.ChainWrathReward) / 0.5;
}
CM.Cache.ChainFrenzyReward = CM.Cache.MaxChainMoni(7, maxPayout * 7);
@@ -202,13 +202,13 @@ CM.Cache.RemakeChain = function() {
CM.Cache.ChainFrenzy = 0;
}
else {
CM.Cache.ChainFrenzy = CM.Cache.NextNumber(CM.Cache.ChainFrenzyReward) / 0.25;
CM.Cache.ChainFrenzy = CM.Cache.NextNumber(CM.Cache.ChainFrenzyReward) / 0.5;
}
if ((maxPayout * 7) < CM.Cache.ChainFrenzyWrathReward) {
CM.Cache.ChainFrenzyWrath = 0;
}
else {
CM.Cache.ChainFrenzyWrath = CM.Cache.NextNumber(CM.Cache.ChainFrenzyWrathReward) / 0.25;
CM.Cache.ChainFrenzyWrath = CM.Cache.NextNumber(CM.Cache.ChainFrenzyWrathReward) / 0.5;
}
}
@@ -1760,7 +1760,7 @@ CM.Disp.AddMenuStats = function(title) {
var chainWrathRewardMax = CM.Cache.ChainWrathReward;
var chainFrenzyRewardMax = CM.Cache.ChainFrenzyReward;
var chainFrenzyWrathRewardMax = CM.Cache.ChainFrenzyWrathReward;
var chainCurMax = Math.min(CM.Cache.NoGoldSwitchCookiesPS * 60 * 60 * 6, (Game.cookies + CM.Disp.GetWrinkConfigBank()) * 0.25);
var chainCurMax = Math.min(CM.Cache.NoGoldSwitchCookiesPS * 60 * 60 * 6, (Game.cookies + CM.Disp.GetWrinkConfigBank()) * 0.5);
var chainCur = CM.Cache.MaxChainMoni(7, chainCurMax);
var chainCurWrath = CM.Cache.MaxChainMoni(6, chainCurMax);
if (Game.hasAura('Ancestral Metamorphosis')) {
@@ -2050,7 +2050,7 @@ CM.Disp.CreateTooltipWarnCaut = function() {
l('tooltipAnchor').appendChild(CM.Disp.TooltipWarnCaut);
}
CM.Disp.ToggleToolWarnCaut = function() {
CM.Disp.ToggleToolWarnCaut = function() { // Pointless?
if (CM.Config.ToolWarnCaut == 1) {
CM.Disp.TooltipWarnCaut.style.display = 'block';
}
@@ -2205,8 +2205,9 @@ CM.Disp.Tooltip = function(type, name) {
}
CM.Disp.UpdateTooltip = function() {
if (l('tooltipAnchor').style.display != 'none' && l('CMTooltipArea') != null) {
if (l('tooltipAnchor').style.display != 'none') {
if (l('CMTooltipArea') != null) {
if (CM.Disp.tooltipType == 'b' || CM.Disp.tooltipType == 'u') {
// Error checking
if (CM.Disp.tooltipType == 'u' && (typeof Game.UpgradesInStore[CM.Disp.tooltipName] === 'undefined' || typeof CM.Cache.Upgrades[Game.UpgradesInStore[CM.Disp.tooltipName].name] === 'undefined')) {
@@ -2258,6 +2259,7 @@ CM.Disp.UpdateTooltip = function() {
}
if (CM.Config.ToolWarnCaut == 1) {
CM.Disp.TooltipWarnCaut.style.display = 'block';
var warn = CM.Cache.Lucky;
if (CM.Config.ToolWarnCautBon == 1) {
var bonusNoFren = bonus;
@@ -2296,8 +2298,12 @@ CM.Disp.UpdateTooltip = function() {
l('CMDispTooltipCaut').style.display = 'none';
}
}
else {
CM.Disp.TooltipWarnCaut.style.display = 'none';
}
}
else { // Grimoire
CM.Disp.TooltipWarnCaut.style.display = 'none';
l('CMDispTooltipWarn').style.display = 'none';
l('CMDispTooltipCaut').style.display = 'none';
@@ -2345,6 +2351,10 @@ CM.Disp.UpdateTooltip = function() {
}
}
}
else {
CM.Disp.TooltipWarnCaut.style.display = 'none';
}
}
}
CM.Disp.DrawTooltipWarnCaut = function() {
@@ -2919,6 +2929,9 @@ CM.Sim.CalculateGains = function() {
if (Game.ascensionMode != 1) mult += parseFloat(CM.Sim.prestige) * 0.01 * CM.Sim.heavenlyPower * CM.Sim.GetHeavenlyMultiplier();
// TODO Store minigame buffs?
mult *= Game.eff('cps');
var cookieMult = 0;
for (var i in Game.cookieUpgrades) {
var me = Game.cookieUpgrades[i];
@@ -2959,7 +2972,7 @@ CM.Sim.CalculateGains = function() {
var godLvl = Game.hasGod('industry');
if (godLvl == 1) buildMult *= 1.1;
else if (godLvl == 2) buildMult *= 1.05;
else if (godLvl == 2) buildMult *= 1.06;
else if (godLvl == 3) buildMult *= 1.03;
var godLvl = Game.hasGod('labor');
@@ -2985,9 +2998,12 @@ CM.Sim.CalculateGains = function() {
if (Game.hasGod) {
var godLvl = Game.hasGod('mother');
if (godLvl == 1) milkMult *= 1.1;
else if (godLvl == 2) milkMult *= 1.06;
else if (godLvl == 2) milkMult *= 1.05;
else if (godLvl == 3) milkMult *= 1.03;
}
// TODO Store minigame buffs?
milkMult *= Game.eff('milk');
if (CM.Sim.Has('Kitten helpers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.1 * milkMult);
if (CM.Sim.Has('Kitten workers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.125 * milkMult);
if (CM.Sim.Has('Kitten engineers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.15 * milkMult);
@@ -2997,7 +3013,8 @@ CM.Sim.CalculateGains = function() {
if (CM.Sim.Has('Kitten specialists')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
if (CM.Sim.Has('Kitten experts')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
if (CM.Sim.Has('Kitten consultants')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
if (CM.Sim.Has('Kitten assistants to the regional manager')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
if (CM.Sim.Has('Kitten assistants to the regional manager')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.175 * milkMult);
if (CM.Sim.Has('Kitten marketeers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.15 * milkMult);
if (CM.Sim.Has('Kitten angels')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.1 * milkMult);
var eggMult = 1;
@@ -3030,7 +3047,7 @@ CM.Sim.CalculateGains = function() {
if (Game.hasAura('Dragon\'s Fortune')) {
var n = Game.shimmerTypes['golden'].n;
for (var i = 0; i < n; i++) {
mult *= 2.11;
mult *= 2.23;
}
}
@@ -3105,6 +3122,9 @@ CM.Sim.CheckOtherAchiev = function() {
if (minAmount >= 200) CM.Sim.Win('Bicentennial');
if (minAmount >= 250) CM.Sim.Win('Bicentennial and a half');
if (minAmount >= 300) CM.Sim.Win('Tricentennial');
if (minAmount >= 350) CM.Sim.Win('Tricentennial and a half');
if (minAmount >= 400) CM.Sim.Win('Quadricentennial');
if (minAmount >= 450) CM.Sim.Win('Quadricentennial and a half');
if (buildingsOwned >= 100) CM.Sim.Win('Builder');
if (buildingsOwned >= 500) CM.Sim.Win('Architect');
@@ -3257,6 +3277,11 @@ CM.Sim.ResetBonus = function(possiblePresMax) {
if (Game.cookiesEarned >= 1000000000000000000000000000) CM.Sim.Win('Obliterate');
if (Game.cookiesEarned >= 1000000000000000000000000000000) CM.Sim.Win('Negative void');
if (Game.cookiesEarned >= 1000000000000000000000000000000000) CM.Sim.Win('To crumbs, you say?');
if (Game.cookiesEarned >= 1000000000000000000000000000000000000) CM.Sim.Win('You get nothing');
if (Game.cookiesEarned >= 1000000000000000000000000000000000000000) CM.Sim.Win('Humble rebeginnings');
if (Game.cookiesEarned >= 1000000000000000000000000000000000000000000) CM.Sim.Win('The end of the world');
if (Game.cookiesEarned >= 1000000000000000000000000000000000000000000000) CM.Sim.Win('Oh, you\'re back');
if (Game.cookiesEarned >= 1000000000000000000000000000000000000000000000000) CM.Sim.Win('Lazarus');
CM.Sim.Upgrades['Heavenly chip secret'].bought = 1;
CM.Sim.Upgrades['Heavenly cookie stand'].bought = 1;

View File

@@ -165,13 +165,13 @@ CM.Cache.RemakeChain = function() {
CM.Cache.Chain = 0;
}
else {
CM.Cache.Chain = CM.Cache.NextNumber(CM.Cache.ChainReward) / 0.25;
CM.Cache.Chain = CM.Cache.NextNumber(CM.Cache.ChainReward) / 0.5;
}
if (maxPayout < CM.Cache.ChainWrathReward) {
CM.Cache.ChainWrath = 0;
}
else {
CM.Cache.ChainWrath = CM.Cache.NextNumber(CM.Cache.ChainWrathReward) / 0.25;
CM.Cache.ChainWrath = CM.Cache.NextNumber(CM.Cache.ChainWrathReward) / 0.5;
}
CM.Cache.ChainFrenzyReward = CM.Cache.MaxChainMoni(7, maxPayout * 7);
@@ -182,13 +182,13 @@ CM.Cache.RemakeChain = function() {
CM.Cache.ChainFrenzy = 0;
}
else {
CM.Cache.ChainFrenzy = CM.Cache.NextNumber(CM.Cache.ChainFrenzyReward) / 0.25;
CM.Cache.ChainFrenzy = CM.Cache.NextNumber(CM.Cache.ChainFrenzyReward) / 0.5;
}
if ((maxPayout * 7) < CM.Cache.ChainFrenzyWrathReward) {
CM.Cache.ChainFrenzyWrath = 0;
}
else {
CM.Cache.ChainFrenzyWrath = CM.Cache.NextNumber(CM.Cache.ChainFrenzyWrathReward) / 0.25;
CM.Cache.ChainFrenzyWrath = CM.Cache.NextNumber(CM.Cache.ChainFrenzyWrathReward) / 0.5;
}
}

View File

@@ -1210,7 +1210,7 @@ CM.Disp.AddMenuStats = function(title) {
var chainWrathRewardMax = CM.Cache.ChainWrathReward;
var chainFrenzyRewardMax = CM.Cache.ChainFrenzyReward;
var chainFrenzyWrathRewardMax = CM.Cache.ChainFrenzyWrathReward;
var chainCurMax = Math.min(CM.Cache.NoGoldSwitchCookiesPS * 60 * 60 * 6, (Game.cookies + CM.Disp.GetWrinkConfigBank()) * 0.25);
var chainCurMax = Math.min(CM.Cache.NoGoldSwitchCookiesPS * 60 * 60 * 6, (Game.cookies + CM.Disp.GetWrinkConfigBank()) * 0.5);
var chainCur = CM.Cache.MaxChainMoni(7, chainCurMax);
var chainCurWrath = CM.Cache.MaxChainMoni(6, chainCurMax);
if (Game.hasAura('Ancestral Metamorphosis')) {
@@ -1500,7 +1500,7 @@ CM.Disp.CreateTooltipWarnCaut = function() {
l('tooltipAnchor').appendChild(CM.Disp.TooltipWarnCaut);
}
CM.Disp.ToggleToolWarnCaut = function() {
CM.Disp.ToggleToolWarnCaut = function() { // Pointless?
if (CM.Config.ToolWarnCaut == 1) {
CM.Disp.TooltipWarnCaut.style.display = 'block';
}
@@ -1655,8 +1655,9 @@ CM.Disp.Tooltip = function(type, name) {
}
CM.Disp.UpdateTooltip = function() {
if (l('tooltipAnchor').style.display != 'none' && l('CMTooltipArea') != null) {
if (l('tooltipAnchor').style.display != 'none') {
if (l('CMTooltipArea') != null) {
if (CM.Disp.tooltipType == 'b' || CM.Disp.tooltipType == 'u') {
// Error checking
if (CM.Disp.tooltipType == 'u' && (typeof Game.UpgradesInStore[CM.Disp.tooltipName] === 'undefined' || typeof CM.Cache.Upgrades[Game.UpgradesInStore[CM.Disp.tooltipName].name] === 'undefined')) {
@@ -1708,6 +1709,7 @@ CM.Disp.UpdateTooltip = function() {
}
if (CM.Config.ToolWarnCaut == 1) {
CM.Disp.TooltipWarnCaut.style.display = 'block';
var warn = CM.Cache.Lucky;
if (CM.Config.ToolWarnCautBon == 1) {
var bonusNoFren = bonus;
@@ -1746,8 +1748,12 @@ CM.Disp.UpdateTooltip = function() {
l('CMDispTooltipCaut').style.display = 'none';
}
}
else {
CM.Disp.TooltipWarnCaut.style.display = 'none';
}
}
else { // Grimoire
CM.Disp.TooltipWarnCaut.style.display = 'none';
l('CMDispTooltipWarn').style.display = 'none';
l('CMDispTooltipCaut').style.display = 'none';
@@ -1795,6 +1801,10 @@ CM.Disp.UpdateTooltip = function() {
}
}
}
else {
CM.Disp.TooltipWarnCaut.style.display = 'none';
}
}
}
CM.Disp.DrawTooltipWarnCaut = function() {

View File

@@ -163,6 +163,9 @@ CM.Sim.CalculateGains = function() {
if (Game.ascensionMode != 1) mult += parseFloat(CM.Sim.prestige) * 0.01 * CM.Sim.heavenlyPower * CM.Sim.GetHeavenlyMultiplier();
// TODO Store minigame buffs?
mult *= Game.eff('cps');
var cookieMult = 0;
for (var i in Game.cookieUpgrades) {
var me = Game.cookieUpgrades[i];
@@ -203,7 +206,7 @@ CM.Sim.CalculateGains = function() {
var godLvl = Game.hasGod('industry');
if (godLvl == 1) buildMult *= 1.1;
else if (godLvl == 2) buildMult *= 1.05;
else if (godLvl == 2) buildMult *= 1.06;
else if (godLvl == 3) buildMult *= 1.03;
var godLvl = Game.hasGod('labor');
@@ -229,9 +232,12 @@ CM.Sim.CalculateGains = function() {
if (Game.hasGod) {
var godLvl = Game.hasGod('mother');
if (godLvl == 1) milkMult *= 1.1;
else if (godLvl == 2) milkMult *= 1.06;
else if (godLvl == 2) milkMult *= 1.05;
else if (godLvl == 3) milkMult *= 1.03;
}
// TODO Store minigame buffs?
milkMult *= Game.eff('milk');
if (CM.Sim.Has('Kitten helpers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.1 * milkMult);
if (CM.Sim.Has('Kitten workers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.125 * milkMult);
if (CM.Sim.Has('Kitten engineers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.15 * milkMult);
@@ -241,7 +247,8 @@ CM.Sim.CalculateGains = function() {
if (CM.Sim.Has('Kitten specialists')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
if (CM.Sim.Has('Kitten experts')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
if (CM.Sim.Has('Kitten consultants')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
if (CM.Sim.Has('Kitten assistants to the regional manager')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.2 * milkMult);
if (CM.Sim.Has('Kitten assistants to the regional manager')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.175 * milkMult);
if (CM.Sim.Has('Kitten marketeers')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.15 * milkMult);
if (CM.Sim.Has('Kitten angels')) mult *= (1 + (CM.Sim.AchievementsOwned / 25) * 0.1 * milkMult);
var eggMult = 1;
@@ -274,7 +281,7 @@ CM.Sim.CalculateGains = function() {
if (Game.hasAura('Dragon\'s Fortune')) {
var n = Game.shimmerTypes['golden'].n;
for (var i = 0; i < n; i++) {
mult *= 2.11;
mult *= 2.23;
}
}
@@ -349,6 +356,9 @@ CM.Sim.CheckOtherAchiev = function() {
if (minAmount >= 200) CM.Sim.Win('Bicentennial');
if (minAmount >= 250) CM.Sim.Win('Bicentennial and a half');
if (minAmount >= 300) CM.Sim.Win('Tricentennial');
if (minAmount >= 350) CM.Sim.Win('Tricentennial and a half');
if (minAmount >= 400) CM.Sim.Win('Quadricentennial');
if (minAmount >= 450) CM.Sim.Win('Quadricentennial and a half');
if (buildingsOwned >= 100) CM.Sim.Win('Builder');
if (buildingsOwned >= 500) CM.Sim.Win('Architect');
@@ -501,6 +511,11 @@ CM.Sim.ResetBonus = function(possiblePresMax) {
if (Game.cookiesEarned >= 1000000000000000000000000000) CM.Sim.Win('Obliterate');
if (Game.cookiesEarned >= 1000000000000000000000000000000) CM.Sim.Win('Negative void');
if (Game.cookiesEarned >= 1000000000000000000000000000000000) CM.Sim.Win('To crumbs, you say?');
if (Game.cookiesEarned >= 1000000000000000000000000000000000000) CM.Sim.Win('You get nothing');
if (Game.cookiesEarned >= 1000000000000000000000000000000000000000) CM.Sim.Win('Humble rebeginnings');
if (Game.cookiesEarned >= 1000000000000000000000000000000000000000000) CM.Sim.Win('The end of the world');
if (Game.cookiesEarned >= 1000000000000000000000000000000000000000000000) CM.Sim.Win('Oh, you\'re back');
if (Game.cookiesEarned >= 1000000000000000000000000000000000000000000000000) CM.Sim.Win('Lazarus');
CM.Sim.Upgrades['Heavenly chip secret'].bought = 1;
CM.Sim.Upgrades['Heavenly cookie stand'].bought = 1;