Skip to content

Commit

Permalink
Compute stock market in chocolate egg value (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chorizorro committed Nov 25, 2020
1 parent c46a8d9 commit b421757
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
12 changes: 11 additions & 1 deletion CookieMonster.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,16 @@ CM.Cache.RemakeSellForChoEgg = function() {
sellTotal += CM.Sim.BuildingSell(me, me.basePrice, amount, me.free, amount, 1);
}
}
// Compute cookies earned by selling stock market goods
if (Game.Objects.Bank.minigameLoaded) {
var marketGoods = Game.Objects.Bank.minigame.goods;
var goodsVal = 0;
for (var i in marketGoods) {
var marketGood = marketGoods[i];
goodsVal += marketGood.stock * marketGood.val;
}
sellTotal += goodsVal * Game.cookiesPsRawHighest;
}
CM.Cache.SellForChoEgg = sellTotal;
}

Expand Down Expand Up @@ -2919,7 +2929,7 @@ CM.Disp.TooltipText = [
['NextPrestTooltipPlaceholder', 'Calculated with cookies gained from wrinklers and Chocolate egg', '200px'],
['HeavenChipMaxTooltipPlaceholder', 'The MAX heavenly chips is calculated with the cookies gained from popping all wrinklers with Skruuia god in Diamond slot, selling all buildings with Earth Shatterer and Reality Bending auras, and buying Chocolate egg', '330px'],
['ResetTooltipPlaceholder', 'The bonus income you would get from new prestige levels unlocked at 100% of its potential and from reset achievements if you have the same buildings/upgrades after reset', '370px'],
['ChoEggTooltipPlaceholder', 'The amount of cookies you would get from popping all wrinklers with Skruuia god in Diamond slot, selling all buildings with Earth Shatterer and Reality Bending auras, and then buying Chocolate egg', '300px']
['ChoEggTooltipPlaceholder', 'The amount of cookies you would get from popping all wrinklers with Skruuia god in Diamond slot, selling all buildings with Earth Shatterer and Reality Bending auras, selling all stock market goods, and then buying Chocolate egg', '300px']
];

/********
Expand Down
10 changes: 10 additions & 0 deletions src/Cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,16 @@ CM.Cache.RemakeSellForChoEgg = function() {
sellTotal += CM.Sim.BuildingSell(me, me.basePrice, amount, me.free, amount, 1);
}
}
// Compute cookies earned by selling stock market goods
if (Game.Objects.Bank.minigameLoaded) {
var marketGoods = Game.Objects.Bank.minigame.goods;
var goodsVal = 0;
for (var i in marketGoods) {
var marketGood = marketGoods[i];
goodsVal += marketGood.stock * marketGood.val;
}
sellTotal += goodsVal * Game.cookiesPsRawHighest;
}
CM.Cache.SellForChoEgg = sellTotal;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Disp.js
Original file line number Diff line number Diff line change
Expand Up @@ -2292,6 +2292,6 @@ CM.Disp.TooltipText = [
['NextPrestTooltipPlaceholder', 'Calculated with cookies gained from wrinklers and Chocolate egg', '200px'],
['HeavenChipMaxTooltipPlaceholder', 'The MAX heavenly chips is calculated with the cookies gained from popping all wrinklers with Skruuia god in Diamond slot, selling all buildings with Earth Shatterer and Reality Bending auras, and buying Chocolate egg', '330px'],
['ResetTooltipPlaceholder', 'The bonus income you would get from new prestige levels unlocked at 100% of its potential and from reset achievements if you have the same buildings/upgrades after reset', '370px'],
['ChoEggTooltipPlaceholder', 'The amount of cookies you would get from popping all wrinklers with Skruuia god in Diamond slot, selling all buildings with Earth Shatterer and Reality Bending auras, and then buying Chocolate egg', '300px']
['ChoEggTooltipPlaceholder', 'The amount of cookies you would get from popping all wrinklers with Skruuia god in Diamond slot, selling all buildings with Earth Shatterer and Reality Bending auras, selling all stock market goods, and then buying Chocolate egg', '300px']
];

0 comments on commit b421757

Please sign in to comment.