Added back prestige statistics (Issue #46)

This commit is contained in:
Aktanusa
2016-02-27 23:11:50 -05:00
parent cd09bd55fc
commit c5ddda54c5
4 changed files with 90 additions and 46 deletions

View File

@@ -754,11 +754,11 @@ CM.Disp.UpdateTitle = function() {
CM.Disp.CreateResetTooltip = function() {
CM.Disp.ResetTooltipPlaceholder = document.createElement('div');
var resetTitleDesc = document.createElement('div');
resetTitleDesc.style.minWidth = '260px';
resetTitleDesc.style.minWidth = '340px';
resetTitleDesc.style.marginBottom = '4px';
var div = document.createElement('div');
div.style.textAlign = 'left';
div.textContent = 'The bonus income you would get from new heavenly chips/reset achievements if you have the same buildings/upgrades after reset';
div.textContent = 'The bonus income you would get from new prestige levels at 100% of its potential and from reset achievements if you have the same buildings/upgrades after reset';
resetTitleDesc.appendChild(div);
CM.Disp.ResetTooltipPlaceholder.appendChild(resetTitleDesc);
}
@@ -1037,22 +1037,19 @@ CM.Disp.AddMenuStats = function(title) {
stats.appendChild(listing('\"Chain\" Reward (CUR) (Wrath)', document.createTextNode(Beautify(chainCurWrath))));
}
// Useless for now; cleanup later
/*stats.appendChild(header('Heavenly Chips', 'HC'));
if (CM.Config.StatsPref.HC) {
var possibleHC = Game.HowMuchPrestige(Game.cookiesEarned + Game.cookiesReset);
var neededCook = Game.HowManyCookiesReset(possibleHC + 1) - (Game.cookiesEarned + Game.cookiesReset);
stats.appendChild(header('Prestige', 'Prestige'));
if (CM.Config.StatsPref.Prestige) {
var possiblePres = Math.floor(Game.HowMuchPrestige(Game.cookiesEarned + Game.cookiesReset));
var neededCook = Game.HowManyCookiesReset(possiblePres + 1) - (Game.cookiesEarned + Game.cookiesReset);
var hcMaxFrag = document.createDocumentFragment();
hcMaxFrag.appendChild(document.createTextNode(Beautify(possibleHC)));
stats.appendChild(listing('Heavenly Chips (MAX)', hcMaxFrag));
var hcCurFrag = document.createDocumentFragment();
// Remove all chip stats?
//hcCurFrag.appendChild(document.createTextNode(Beautify(Game.heavenlyChipsEarned)));
//stats.appendChild(listing('Heavenly Chips (CUR)', hcCurFrag));
stats.appendChild(listing('Cookies To Next Chip', document.createTextNode(Beautify(neededCook))));
stats.appendChild(listing('Time To Next Chip', document.createTextNode(CM.Disp.FormatTime(neededCook / (Game.cookiesPs * (1 - Game.cpsSucked)), 1))));
// Unneeded?
var presMaxFrag = document.createDocumentFragment();
presMaxFrag.appendChild(document.createTextNode(Beautify(possiblePres)));
stats.appendChild(listing('Prestige (MAX)', presMaxFrag));
var presCurFrag = document.createDocumentFragment();
presCurFrag.appendChild(document.createTextNode(Beautify(Game.prestige)));
stats.appendChild(listing('Prestige (CUR)', presCurFrag));
stats.appendChild(listing('Cookies To Next Level', document.createTextNode(Beautify(neededCook))));
stats.appendChild(listing('Time To Next Level', document.createTextNode(CM.Disp.FormatTime(neededCook / (Game.cookiesPs * (1 - Game.cpsSucked)), 1))));
var resetTitleFrag = document.createDocumentFragment();
resetTitleFrag.appendChild(document.createTextNode('Reset Bonus Income '))
var resetTitleSpan = document.createElement('span');
@@ -1079,8 +1076,8 @@ CM.Disp.AddMenuStats = function(title) {
resetSmall.textContent = ' (' + (increase / 100) + '% of income)';
resetFrag.appendChild(resetSmall);
}
//stats.appendChild(listing(resetTitleFrag, resetFrag));
}*/
stats.appendChild(listing(resetTitleFrag, resetFrag));
}
var choEgg = (Game.HasUnlocked('Chocolate egg') && !Game.Has('Chocolate egg')); // Needs to be done for the checking below
@@ -1092,7 +1089,7 @@ CM.Disp.AddMenuStats = function(title) {
var sucked = Game.wrinklers[i].sucked;
var toSuck = 1.1;
if (Game.Has('Sacrilegious corruption')) toSuck *= 1.05;
if (Game.wrinklers[i].type==1) toSuck *= 3; //shiny wrinklers are an elusive, profitable breed
if (Game.wrinklers[i].type==1) toSuck *= 3; // Shiny wrinklers
sucked *= toSuck;
if (Game.Has('Wrinklerspawn')) sucked *= 1.05;
totalSucked += sucked;
@@ -1261,7 +1258,7 @@ CM.Disp.UpdateTooltipLocation = function() {
}
// Kept for future possible use if the code changes again
/*else if (!Game.onCrate && !Game.OnAscend && CM.Config.TimerBar == 1 && CM.Config.TimerBarPos == 0) {
//Game.tooltip.tta.style.top = (parseInt(Game.tooltip.tta.style.top) + parseInt(CM.Disp.TimerBar.style.height)) + 'px';
Game.tooltip.tta.style.top = (parseInt(Game.tooltip.tta.style.top) + parseInt(CM.Disp.TimerBar.style.height)) + 'px';
}*/
}
@@ -1598,7 +1595,7 @@ CM.Disp.UpdateWrinklerTooltip = function() {
var sucked = Game.wrinklers[CM.Disp.TooltipWrinkler].sucked;
var toSuck = 1.1;
if (Game.Has('Sacrilegious corruption')) toSuck *= 1.05;
if (Game.wrinklers[CM.Disp.TooltipWrinkler].type == 1) toSuck *= 3; //shiny wrinklers are an elusive, profitable breed
if (Game.wrinklers[CM.Disp.TooltipWrinkler].type == 1) toSuck *= 3; // Shiny wrinklers
sucked *= toSuck;
if (Game.Has('Wrinklerspawn')) sucked *= 1.05;
l('CMTooltipWrinkler').textContent = Beautify(sucked);