Added cookies to be gained/lost to conjure tooltip

This commit is contained in:
Daniel van Noord
2020-12-01 13:38:49 +01:00
parent 26549a148a
commit 71a4407da8
2 changed files with 42 additions and 2 deletions

View File

@@ -2398,7 +2398,8 @@ CM.Disp.UpdateTooltip = function() {
l('CMTooltipArea').appendChild(lumpTooltip);
}
}
else { // Grimoire
else if (CM.Disp.tooltipType === 'g') {
// Grimoire
CM.Disp.TooltipWarn.style.display = 'none';
l('CMDispTooltipWarnLucky').style.display = 'none';
l('CMDispTooltipWarnLuckyFrenzy').style.display = 'none';
@@ -2444,6 +2445,25 @@ CM.Disp.UpdateTooltip = function() {
recover.className = CM.Disp.colorTextPre + recoverColor.color;
}
// Extra information when spell is Conjure Baked Goods (Name == 0)
if (CM.Disp.tooltipName == 0) {
tooltip.appendChild(header('Cookies to be gained/lost'));
var conjure = document.createElement('div');
conjure.id = 'CMTooltipConjure';
tooltip.appendChild(conjure);
var reward = document.createElement('span');
reward.style.color = "#33FF00"
reward.textContent = Beautify(Math.min((Game.cookies + CM.Disp.GetWrinkConfigBank()) * 0.15, CM.Cache.NoGoldSwitchCookiesPS * 60 * 30), 2)
conjure.appendChild(reward)
var seperator = document.createElement('span');
seperator.textContent = ' / '
conjure.appendChild(seperator)
var loss = document.createElement('span');
loss.style.color = "red"
loss.textContent = Beautify((CM.Cache.NoGoldSwitchCookiesPS * 60 * 15), 2);
conjure.appendChild(loss)
}
l('CMTooltipArea').appendChild(tooltip);
}
}