Skip to content

Commit 4cfc52b

Browse files
committed
show what I mean
1 parent ef95c69 commit 4cfc52b

4 files changed

Lines changed: 13 additions & 13 deletions

File tree

src/Features/Ants/AntUpgrades/lib/get-cost.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const getCostNextAntUpgrade = (antUpgrade: AntUpgrades) => {
1818
player.ants.upgrades[antUpgrade] - 1
1919
)
2020
)
21-
: new Decimal(0)
21+
: Decimal.fromNumber(0)
2222
return nextCost.sub(lastCost)
2323
}
2424

@@ -28,7 +28,7 @@ export const getCostMaxAntUpgrades = (antUpgrade: AntUpgrades) => {
2828

2929
const spent = player.ants.upgrades[antUpgrade] > 0
3030
? Decimal.pow(data.costIncrease, player.ants.upgrades[antUpgrade] - 1).times(data.baseCost)
31-
: new Decimal(0)
31+
: Decimal.fromNumber(0)
3232

3333
const maxAntUpgradeCost = Decimal.pow(data.costIncrease, maxBuyable - 1).times(data.baseCost)
3434

@@ -44,7 +44,7 @@ export const getMaxPurchasableAntUpgrades = (antUpgrade: AntUpgrades, budget: De
4444
player.ants.upgrades[antUpgrade] - 1
4545
)
4646
)
47-
: new Decimal(0)
47+
: Decimal.fromNumber(0)
4848
const realBudget = budget.add(sunkCost)
4949

5050
return Math.max(0, 1 + Math.floor(Decimal.log(realBudget.div(data.baseCost), data.costIncrease)))
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Decimal from 'break_infinity.js'
22

3-
export const defaultCrumbs = new Decimal('1')
4-
export const defaultHighestCrumbsThisSacrifice = new Decimal('1')
5-
export const defaultHighestCrumbsEver = new Decimal('1')
3+
export const defaultCrumbs = Decimal.fromString('1')
4+
export const defaultHighestCrumbsThisSacrifice = Decimal.fromString('1')
5+
export const defaultHighestCrumbsEver = Decimal.fromString('1')

src/Features/Ants/Crumbs/player/reset.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ import { player } from '../../../../Synergism'
44

55
export const resetPlayerAntCrumbs = (resetTier: AntSacrificeTiers): void => {
66
if (resetTier >= AntSacrificeTiers.sacrifice) {
7-
player.ants.crumbs = new Decimal('1')
8-
player.ants.highestCrumbsThisSacrifice = new Decimal('1')
7+
player.ants.crumbs = Decimal.fromString('1')
8+
player.ants.highestCrumbsThisSacrifice = Decimal.fromString('1')
99
}
1010
// Sing Perk
1111
if (player.highestSingularityCount >= 20) {
12-
player.ants.crumbs = new Decimal('1e100')
12+
player.ants.crumbs = Decimal.fromString('1e100')
1313
}
1414
// If player resets the game
1515
if (resetTier >= AntSacrificeTiers.never) {
16-
player.ants.highestCrumbsEver = new Decimal('1')
16+
player.ants.highestCrumbsEver = Decimal.fromString('1')
1717
}
1818
}

src/Features/Ants/player/default.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ export const defaultPlayerAnts: PlayerAnts = {
1717
producers: { ...defaultAntProducers },
1818
masteries: { ...defaultAntMasteries },
1919
upgrades: { ...defaultAntUpgrades },
20-
crumbs: new Decimal(defaultCrumbs),
21-
highestCrumbsThisSacrifice: new Decimal(defaultHighestCrumbsThisSacrifice),
22-
highestCrumbsEver: new Decimal(defaultHighestCrumbsEver),
20+
crumbs: Decimal.fromDecimal(defaultCrumbs),
21+
highestCrumbsThisSacrifice: Decimal.fromDecimal(defaultHighestCrumbsThisSacrifice),
22+
highestCrumbsEver: Decimal.fromDecimal(defaultHighestCrumbsEver),
2323
immortalELO: defaultAntImmortalELO,
2424
rebornELO: defaultAntRebornELO,
2525
highestRebornELODaily: [...defaultHighestRebornELODaily],

0 commit comments

Comments
 (0)