Skip to content

Commit

Permalink
Double cap bribe (#588)
Browse files Browse the repository at this point in the history
* double capacity w/ bribe code

* only allow code once
  • Loading branch information
KhafraDev authored Apr 2, 2024
1 parent 4fa03e3 commit 5ab5b8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ImportExport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -514,12 +514,12 @@ export const promocodes = async (input: string | null, amount?: number) => {

const cap = craft.computeActualCap()

if (cap <= craft.BAL + 1) {
if (cap >= 1e300) {
return Alert(i18next.t('importexport.promocodes.bribe.overCapacity'))
}

player.codes.set(47, true)
craft.BAL++
craft.CAP = Math.min(1e300, craft.CAP * 2)

return Alert(i18next.t('importexport.promocodes.bribe.thanks'))
} else if (input.toLowerCase() === 'daily' && !player.dailyCodeUsed) {
Expand Down
2 changes: 2 additions & 0 deletions src/Reset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1338,6 +1338,7 @@ export const singularity = async (setSingNumber = -1): Promise<void> => {
const saveCode44 = player.codes.get(44) ?? false
const saveCode45 = player.codes.get(45) ?? false
const saveCode46 = player.codes.get(46) ?? false
const saveCode47 = player.codes.get(47) ?? false

// Import Game

Expand All @@ -1359,6 +1360,7 @@ export const singularity = async (setSingNumber = -1): Promise<void> => {
player.codes.set(44, saveCode44)
player.codes.set(45, saveCode45)
player.codes.set(46, saveCode46)
player.codes.set(47, saveCode47)
updateSingularityMilestoneAwards()

player.rngCode = Date.now()
Expand Down

0 comments on commit 5ab5b8d

Please sign in to comment.