Compute stock market in chocolate egg value (#345)

This commit is contained in:
Chorizorro
2020-11-25 14:06:55 +01:00
committed by GitHub
parent 8a98c6f4db
commit e05db88a72
3 changed files with 22 additions and 2 deletions

View File

@@ -303,6 +303,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;
}