extract lastCost into a var

This commit is contained in:
Omsi 2019-08-29 12:13:52 -07:00
parent d8a543290c
commit 55f5135a05

View File

@ -71,11 +71,9 @@ function buyTickSpeed() {
player.thisInfinityLastBuyTime = player.thisInfinityTime;
player.secretUnlocks.why++;
if (NormalChallenge(9).isRunning || InfinityChallenge(5).isRunning) {
multiplySameCosts(
Tickspeed.costScale.calculateCost(player.totalTickBought +
player.chall9TickspeedPurchaseBumps -
1)
);
const lastCost =
Tickspeed.costScale.calculateCost(player.totalTickBought + player.chall9TickspeedPurchaseBumps - 1);
multiplySameCosts(lastCost);
}
if (NormalChallenge(2).isRunning) player.chall2Pow = 0;
GameUI.update();