Skip to content

Commit

Permalink
fixup! blank account page
Browse files Browse the repository at this point in the history
  • Loading branch information
KhafraDev committed Jul 1, 2024
1 parent b80fbaa commit c2601f3
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
28 changes: 23 additions & 5 deletions src/ImportExport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -620,13 +620,31 @@ export const promocodes = async (input: string | null, amount?: number) => {
}

if (player.highestSingularityCount >= 200 && player.highestSingularityCount < 205) {
const freeLevelOct1 = Math.max(player.octeractUpgrades.octeractGain.level / 100, Math.pow(player.octeractUpgrades.octeractGain.level * player.octeractUpgrades.octeractGain.freeLevels / 1000, 0.5))
const freeLevelOct1 = Math.max(
player.octeractUpgrades.octeractGain.level / 100,
Math.pow(
player.octeractUpgrades.octeractGain.level * player.octeractUpgrades.octeractGain.freeLevels / 1000,
0.5
)
)
player.octeractUpgrades.octeractGain.freeLevels += freeLevelOct1
freeLevels.octeractGain = freeLevelOct1
}
else if (player.highestSingularityCount >= 205) {
const freeLevelOct1 = Math.max(player.octeractUpgrades.octeractGain.level / 100, Math.pow(player.octeractUpgrades.octeractGain.level * player.octeractUpgrades.octeractGain.freeLevels / 640, 0.5))
const freeLevelOct2 = Math.max(player.octeractUpgrades.octeractGain2.level / 100, Math.pow(Math.pow(player.octeractUpgrades.octeractGain2.level, 2) * player.octeractUpgrades.octeractGain2.freeLevels / 125000, 0.333))
} else if (player.highestSingularityCount >= 205) {
const freeLevelOct1 = Math.max(
player.octeractUpgrades.octeractGain.level / 100,
Math.pow(
player.octeractUpgrades.octeractGain.level * player.octeractUpgrades.octeractGain.freeLevels / 640,
0.5
)
)
const freeLevelOct2 = Math.max(
player.octeractUpgrades.octeractGain2.level / 100,
Math.pow(
Math.pow(player.octeractUpgrades.octeractGain2.level, 2) * player.octeractUpgrades.octeractGain2.freeLevels
/ 125000,
0.333
)
)

player.octeractUpgrades.octeractGain.freeLevels += freeLevelOct1
player.octeractUpgrades.octeractGain2.freeLevels += freeLevelOct2
Expand Down
2 changes: 2 additions & 0 deletions src/Login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ export async function handleLogin () {
} else if (cookies.token) {
if (!member) {
console.log(response, globalBonus, member, personalBonus, document.cookie)
Alert('Your individual bonuses were not applied. Try refreshing the page!')
return
}

currentBonus.textContent +=
Expand Down
3 changes: 1 addition & 2 deletions src/Octeracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ export class OcteractUpgrade extends DynamicUpgrade {

if (this.level >= actualFreeLevels) {
return actualFreeLevels + this.level
}
else {
} else {
return 2 * Math.sqrt(actualFreeLevels * this.level)
}
}
Expand Down

0 comments on commit c2601f3

Please sign in to comment.