Skip to content

Commit

Permalink
Fix Infinite Ascent level scaling for bonus levels
Browse files Browse the repository at this point in the history
  • Loading branch information
Pseudonian committed Jan 6, 2025
1 parent e1f0948 commit fd1bd40
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 15 deletions.
10 changes: 5 additions & 5 deletions Synergism.css
Original file line number Diff line number Diff line change
Expand Up @@ -4157,9 +4157,9 @@ form input:hover {

#pseudoCoinUpgradeDescription {
display: grid;
height: 128px;
height: 192px;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: 128px;
grid-template-rows: 192px;
width: 100%;
}

Expand All @@ -4170,7 +4170,7 @@ form input:hover {

#pseudoCoinUpgradeTexts {
display: grid;
grid-template-rows: repeat(3, 1fr);
grid-template-rows: repeat(6, 1fr);
grid-column: 2 / 4;
margin: auto;
width: 100%;
Expand All @@ -4179,7 +4179,7 @@ form input:hover {
}

#pCoinUpgradeDesc {
grid-row: 1 / 3;
grid-row: 1 / 6;
text-align: center;
margin: auto;
width: 100%;
Expand All @@ -4190,7 +4190,7 @@ form input:hover {
}

#pCoinButton {
grid-row: 3;
grid-row: 6;
margin: 0 auto;
width: 100%;
}
Expand Down
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4668,6 +4668,8 @@ <h1 id="pCoinUpgradeName">Welcome to the PseudoShop!</h1>
<p id="description">Buy PseudoCoin upgrades, get exclusive bonuses and support development! &#10084</p>
<p id="pCoinEffectCurr">Click on an icon to see what you can get!</p>
<p id="pCoinEffectNext">Note: you must be logged in to buy or use these!</p>
<p id="pCoinScalingEffect"></p>
<p id="pCoinScalingCosts"></p>
</div>
<div id="pCoinButton">
<button id="buy" style="display: none"></button>
Expand Down
65 changes: 65 additions & 0 deletions src/PseudoCoinUpgrades.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,68 @@ export const displayPCoinEffect = (name: PseudoCoinUpgradeNames, level: number)
return String(i18next.t('pseudoCoins.upgradeEffects.ADD_CODE_CAP_BUFF', { amount: level + 1 }))
}
}

export const showCostAndEffect = (name: PseudoCoinUpgradeNames) => {
switch(name) {
case 'INSTANT_UNLOCK_1':
return {
cost: 'Cost: 400 PseudoCoins',
effect: 'Effect: +10 Levels'
}
case 'INSTANT_UNLOCK_2':
return {
cost: 'Cost: 600 PseudoCoins',
effect: 'Effect: +6 Levels'
}
case 'CUBE_BUFF':
return {
cost: 'Cost: 100/150/200/250/300 PseudoCoins',
effect: 'Effect: 1.06/1.12/1.18/1.24/1.30x Cubes'
}
case 'AMBROSIA_LUCK_BUFF':
return {
cost: 'Cost: 100/150/200/250/300 PseudoCoins',
effect: 'Effect: 20/40/60/80/100 Ambrosia Luck'
}
case 'AMBROSIA_GENERATION_BUFF':
return {
cost: 'Cost: 100/150/200/250/300 PseudoCoins',
effect: 'Effect: 1.05/1.10/1.15/1.20/1.25x Ambrosia Generation'
}
case 'GOLDEN_QUARK_BUFF':
return {
cost: 'Cost: 100/150/200/250/300 PseudoCoins',
effect: 'Effect: 1.04/1.08/1.12/1.16/1.20x Golden Quarks'
}
case 'FREE_UPGRADE_PROMOCODE_BUFF':
return {
cost: 'Cost: 100/150/200/250/300 PseudoCoins',
effect: 'Effect: 1.02/1.04/1.06/1.08/1.10x Free Upgrade Promocodes'
}
case 'CORRUPTION_LOADOUT_SLOT_QOL':
return {
cost: 'Cost: 125/per PseudoCoins',
effect: 'Effect: +1 Loadout Slot per level'
}
case 'AMBROSIA_LOADOUT_SLOT_QOL':
return {
cost: 'Cost: 125/per PseudoCoins',
effect: 'Effect: +1 Loadout Slot per level'
}
case 'AUTO_POTION_FREE_POTIONS_QOL':
return {
cost: 'Cost: 500 PseudoCoins',
effect: 'Effect: Auto Potion gives free potions'
}
case 'OFFLINE_TIMER_CAP_BUFF':
return {
cost: 'Cost: 400/600 PseudoCoins',
effect: 'Effect: 2x/3x Offline Time Cap'
}
case 'ADD_CODE_CAP_BUFF':
return {
cost: 'Cost: 400/600 PseudoCoins',
effect: 'Effect: 2x/3x Add Code Cap'
}
}
}
14 changes: 7 additions & 7 deletions src/Shop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ export const shopData: Record<keyof Player['shopUpgrades'], IShopData> = {
shopCashGrabUltra: {
tier: 'Exalt1x30',
price: 1,
priceIncrease: 2e22,
priceIncrease: 1e22,
maxLevel: 5,
type: shopUpgradeTypes.UPGRADE,
refundable: false,
Expand All @@ -699,7 +699,7 @@ export const shopData: Record<keyof Player['shopUpgrades'], IShopData> = {
},
shopEXUltra: {
tier: 'Exalt5x20',
price: 1e22,
price: 5e21,
priceIncrease: 0,
maxLevel: 80,
type: shopUpgradeTypes.UPGRADE,
Expand All @@ -708,7 +708,7 @@ export const shopData: Record<keyof Player['shopUpgrades'], IShopData> = {
},
shopChronometerS: {
tier: 'Exalt6x15',
price: 1e22,
price: 5e21,
priceIncrease: 0,
maxLevel: 1,
type: shopUpgradeTypes.UPGRADE,
Expand All @@ -718,15 +718,15 @@ export const shopData: Record<keyof Player['shopUpgrades'], IShopData> = {
shopAmbrosiaUltra: {
tier: 'Exalt6x25',
price: 8e23,
priceIncrease: 8e23,
priceIncrease: 2e23,
maxLevel: 5,
type: shopUpgradeTypes.UPGRADE,
refundable: false,
refundMinimumLevel: 0
},
shopSingularitySpeedup: {
tier: 'Exalt7x10',
price: 2e23,
price: 2e22,
priceIncrease: 0,
maxLevel: 1,
type: shopUpgradeTypes.UPGRADE,
Expand All @@ -735,7 +735,7 @@ export const shopData: Record<keyof Player['shopUpgrades'], IShopData> = {
},
shopSingularityPotency: {
tier: 'Exalt7x20',
price: 2e24,
price: 2e23,
priceIncrease: 0,
maxLevel: 1,
type: shopUpgradeTypes.UPGRADE,
Expand All @@ -744,7 +744,7 @@ export const shopData: Record<keyof Player['shopUpgrades'], IShopData> = {
},
shopSadisticRune: {
tier: 'Exalt7x30',
price: 2e25,
price: 4.44e24,
priceIncrease: 0,
maxLevel: 1,
type: shopUpgradeTypes.UPGRADE,
Expand Down
8 changes: 7 additions & 1 deletion src/purchases/UpgradesSubtab.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import i18next from 'i18next'
import { z } from 'zod'
import { DOMCacheGetOrSet } from '../Cache/DOM'
import { displayPCoinEffect, type PseudoCoinUpgradeNames, updatePCoinCache } from '../PseudoCoinUpgrades'
import { displayPCoinEffect, type PseudoCoinUpgradeNames, showCostAndEffect, updatePCoinCache } from '../PseudoCoinUpgrades'
import { Alert } from '../UpdateHTML'
import { memoize } from '../Utility'

Expand Down Expand Up @@ -68,6 +68,9 @@ function setActiveUpgrade (upgrade: UpgradesList | undefined) {
i18next.t(displayPCoinEffect(upgrade!.internalName, upgrade!.playerLevel + 1))
}`

const costs = DOMCacheGetOrSet('pCoinScalingCosts')
const effects = DOMCacheGetOrSet('pCoinScalingEffect')

if (upgrade && upgrade.playerLevel === upgrade.maxLevel) {
buy?.setAttribute('disabled', '')
buy!.setAttribute('style', 'display: none')
Expand All @@ -81,6 +84,9 @@ function setActiveUpgrade (upgrade: UpgradesList | undefined) {
i18next.t('pseudoCoins.buyButton', { amount: Intl.NumberFormat().format(upgrade.cost[upgrade.playerLevel]) })
}`
: 'Cannot buy. Sorry!'
const info = showCostAndEffect(upgrade!.internalName)
costs.innerHTML = info.cost
effects.innerHTML = info.effect
}
}

Expand Down
2 changes: 1 addition & 1 deletion translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,7 @@
"shopChronometerS": "With this upgrade, you gain +1% Ascension Speed and Global Speed per Singularity number above 200 your Singularity takes place!",
"shopAmbrosiaUltra": "For this absurdly expensive EX Upgrade, every EXALT completion grants +1 permanent ☘ Ambrosia Luck, per level.",
"shopSingularitySpeedup": "You know all those time-gated Singularity and Octeract Upgrades? Now they accumulate 20 times faster! Thanks to this weird clock that somehow alters even <<gray | Singular Time>>...",
"shopSingularityPotency": "You know all those free Singularity Upgrades? They are now 666% more effective (so, each is worth the equivalent to 7.66 levels, before softcaps). Why? This kinda weird <<gray | Singularity Transmission Ritual Device>>! Don't question it.",
"shopSingularityPotency": "You know all those free Singularity Upgrades? They are now 266% more effective (so, each is worth the equivalent to 3.66 levels, before softcaps). Why? This kinda weird <<gray | Singularity Transmission Ritual Device>>! Don't question it.",
"shopSadisticRune": "What a weird rune; The shopkeeper (who you know no longer can see) says telepathically that it is an Infinite Ascent rune drenched in some <<gray | Singularity Matter>>. There were multiple infinite ascents?"
},
"maxed": "Maxed!",
Expand Down
2 changes: 1 addition & 1 deletion translations/source.json
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,7 @@
"shopChronometerS": "With this upgrade, you gain +1% Ascension Speed and Global Speed per Singularity number above 200 your Singularity takes place!",
"shopAmbrosiaUltra": "For this absurdly expensive EX Upgrade, every EXALT completion grants +1 permanent ☘ Ambrosia Luck, per level.",
"shopSingularitySpeedup": "You know all those time-gated Singularity and Octeract Upgrades? Now they accumulate 20 times faster! Thanks to this weird clock that somehow alters even <<gray | Singular Time>>...",
"shopSingularityPotency": "You know all those free Singularity Upgrades? They are now 666% more effective (so, each is worth the equivalent to 7.66 levels, before softcaps). Why? This kinda weird <<gray | Singularity Transmission Ritual Device>>! Don't question it.",
"shopSingularityPotency": "You know all those free Singularity Upgrades? They are now 266% more effective (so, each is worth the equivalent to 3.66 levels, before softcaps). Why? This kinda weird <<gray | Singularity Transmission Ritual Device>>! Don't question it.",
"shopSadisticRune": "What a weird rune; The shopkeeper (who you know no longer can see) says telepathically that it is an Infinite Ascent rune drenched in some <<gray | Singularity Matter>>. There were multiple infinite ascents?"
},
"maxed": "Maxed!",
Expand Down

0 comments on commit fd1bd40

Please sign in to comment.