mirror of
https://github.com/IvarK/AntimatterDimensionsSourceCode.git
synced 2024-11-10 06:02:13 +00:00
Merge pull request #1738 from IvarK/earth/low-priority-new-cool-modals
This commit is contained in:
commit
a44b4c7ffd
@ -163,6 +163,7 @@
|
||||
"no-nested-ternary": "error",
|
||||
"no-new-object": "error",
|
||||
"no-tabs": "error",
|
||||
"no-trailing-spaces": "warn",
|
||||
"no-unneeded-ternary": "error",
|
||||
"no-whitespace-before-property": "error",
|
||||
"object-curly-spacing": [
|
||||
|
@ -1,5 +1,5 @@
|
||||
Vue.component('pelle-tab', {
|
||||
data: function() {
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
|
@ -8,37 +8,14 @@ Vue.component("antimatter-dim-boost-row", {
|
||||
isBuyable: false,
|
||||
purchasedBoosts: 0,
|
||||
imaginaryBoosts: 0,
|
||||
lockText: null
|
||||
lockText: null,
|
||||
unlockedByBoost: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
dimName() {
|
||||
return AntimatterDimension(this.requirement.tier).displayName;
|
||||
},
|
||||
buttonText() {
|
||||
const boosts = this.purchasedBoosts;
|
||||
|
||||
let newUnlock = "";
|
||||
if (!EternityMilestone.unlockAllND.isReached && boosts < DimBoost.maxDimensionsUnlockable - 4) {
|
||||
newUnlock = `unlock the ${boosts + 5}th Dimension`;
|
||||
} else if (boosts === 4 && !NormalChallenge(10).isRunning && !EternityChallenge(3).isRunning) {
|
||||
newUnlock = "unlock Sacrifice";
|
||||
}
|
||||
|
||||
const formattedMultText = `give a ${formatX(DimBoost.power, 2, 1)} multiplier `;
|
||||
let dimensionRange = `to the 1st Dimension`;
|
||||
if (boosts > 0) dimensionRange = `to Dimensions 1-${Math.min(boosts + 1, 8)}`;
|
||||
if (boosts >= DimBoost.maxDimensionsUnlockable - 1) dimensionRange = `to all Dimensions`;
|
||||
|
||||
let boostEffects = "";
|
||||
if (NormalChallenge(8).isRunning) boostEffects = ` to ${newUnlock}`;
|
||||
else if (newUnlock === "") boostEffects = ` to ${formattedMultText} ${dimensionRange}`;
|
||||
else boostEffects = ` to ${newUnlock} and ${formattedMultText} ${dimensionRange}`;
|
||||
|
||||
return this.lockText === null
|
||||
? `Reset your Dimensions${boostEffects}`
|
||||
: this.lockText;
|
||||
},
|
||||
boostCountText() {
|
||||
const parts = [this.purchasedBoosts];
|
||||
if (this.imaginaryBoosts !== 0) {
|
||||
@ -63,8 +40,14 @@ Vue.component("antimatter-dim-boost-row", {
|
||||
this.purchasedBoosts = DimBoost.purchasedBoosts;
|
||||
this.imaginaryBoosts = DimBoost.imaginaryBoosts;
|
||||
this.lockText = DimBoost.lockText;
|
||||
this.unlockedByBoost = DimBoost.unlockedByBoost;
|
||||
},
|
||||
dimensionBoost(bulk) {
|
||||
if (!DimBoost.requirement.isSatisfied || !DimBoost.canBeBought) return;
|
||||
if (player.options.confirmations.dimensionBoost) {
|
||||
Modal.dimensionBoost.show({ bulk });
|
||||
return;
|
||||
}
|
||||
requestDimensionBoost(bulk);
|
||||
Tutorial.turnOffEffect(TUTORIAL_STATE.DIMBOOST);
|
||||
}
|
||||
@ -82,7 +65,7 @@ Vue.component("antimatter-dim-boost-row", {
|
||||
@click.exact="dimensionBoost(true)"
|
||||
@click.shift.exact="dimensionBoost(false)"
|
||||
>
|
||||
{{ buttonText }}
|
||||
{{ unlockedByBoost }}
|
||||
</primary-button>
|
||||
</div>`
|
||||
});
|
||||
|
@ -13,7 +13,8 @@ Vue.component("antimatter-dim-galaxy-row", {
|
||||
},
|
||||
canBeBought: false,
|
||||
distantStart: 0,
|
||||
lockText: null
|
||||
lockText: null,
|
||||
canBulkBuy: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -73,8 +74,15 @@ Vue.component("antimatter-dim-galaxy-row", {
|
||||
this.canBeBought = requirement.isSatisfied && Galaxy.canBeBought;
|
||||
this.distantStart = EternityChallenge(5).isRunning ? 0 : Galaxy.costScalingStart;
|
||||
this.lockText = Galaxy.lockText;
|
||||
this.canBulkBuy = EternityMilestone.autobuyMaxGalaxies.isReached;
|
||||
},
|
||||
buyGalaxy(bulk) {
|
||||
if (!this.canBeBought) return;
|
||||
if (player.options.confirmations.antimatterGalaxy) {
|
||||
const buyBulk = this.canBulkBuy && bulk;
|
||||
Modal.antimatterGalaxy.show({ bulk: buyBulk });
|
||||
return;
|
||||
}
|
||||
requestGalaxyReset(bulk);
|
||||
Tutorial.turnOffEffect(TUTORIAL_STATE.GALAXY);
|
||||
},
|
||||
|
@ -46,6 +46,11 @@ Vue.component("replicanti-galaxy-button", {
|
||||
handleAutoToggle(value) {
|
||||
Autobuyer.replicantiGalaxy.isActive = value;
|
||||
this.update();
|
||||
},
|
||||
handleClick() {
|
||||
if (!this.isAvailable) return;
|
||||
if (player.options.confirmations.replicantiGalaxy) Modal.replicantiGalaxy.show();
|
||||
else replicantiGalaxy();
|
||||
}
|
||||
},
|
||||
template: `
|
||||
@ -53,7 +58,7 @@ Vue.component("replicanti-galaxy-button", {
|
||||
<primary-button
|
||||
:enabled="isAvailable"
|
||||
class="o-primary-btn--replicanti-galaxy"
|
||||
onclick="replicantiGalaxy()"
|
||||
@click="handleClick"
|
||||
>
|
||||
{{ resetActionDisplay }} for a Replicanti Galaxy
|
||||
<br>
|
||||
|
@ -20,7 +20,8 @@ Vue.component("replicanti-tab", {
|
||||
distantRG: 0,
|
||||
remoteRG: 0,
|
||||
effarigInfinityBonusRG: 0,
|
||||
nextEffarigRGThreshold: 0
|
||||
nextEffarigRGThreshold: 0,
|
||||
canSeeGalaxyButton: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -103,6 +104,7 @@ Vue.component("replicanti-tab", {
|
||||
this.remoteRG = ReplicantiUpgrade.galaxies.remoteRGStart;
|
||||
this.effarigInfinityBonusRG = Effarig.bonusRG;
|
||||
this.nextEffarigRGThreshold = Decimal.NUMBER_MAX_VALUE.pow(Effarig.bonusRG + 2);
|
||||
this.canSeeGalaxyButton = Replicanti.galaxies.max >= 1 || PlayerProgress.eternityUnlocked();
|
||||
}
|
||||
},
|
||||
template: `
|
||||
@ -150,7 +152,7 @@ Vue.component("replicanti-tab", {
|
||||
<br><br>
|
||||
<replicanti-gain-text />
|
||||
<br>
|
||||
<replicanti-galaxy-button />
|
||||
<replicanti-galaxy-button v-if="canSeeGalaxyButton" />
|
||||
</template>
|
||||
</div>`
|
||||
});
|
||||
|
@ -9,14 +9,19 @@ import "./modal-std-store.js";
|
||||
import "./modal-h2p.js";
|
||||
import "./modal-progress-bar.js";
|
||||
import "./modal-away-progress.js";
|
||||
import "./modal-glyph-purge.js";
|
||||
import "./modal-delete-companion.js";
|
||||
import "./modal-start-normal-challenge.js";
|
||||
import "./modal-start-infinity-challenge.js";
|
||||
import "./modal-start-eternity-challenge.js";
|
||||
import "./modal-enter-dilation.js";
|
||||
import "./modal-big-crunch.js";
|
||||
import "./modal-sacrifice.js";
|
||||
import "./modal-dimension-boost.js";
|
||||
import "./modal-antimatter-galaxy.js";
|
||||
import "./modal-break-infinity.js";
|
||||
import "./modal-eternity.js";
|
||||
import "./modal-replicanti-galaxy.js";
|
||||
import "./modal-hard-reset.js";
|
||||
import "./modal-automator-script-delete.js";
|
||||
import "./modal-automator-script-import.js";
|
||||
@ -32,6 +37,8 @@ import "./modal-glyph-delete.js";
|
||||
import "./modal-glyph-replace.js";
|
||||
import "./modal-glyph-refine.js";
|
||||
import "./modal-glyph-showcase-panel.js";
|
||||
import "./modal-delete-all-unprotected-glyphs.js";
|
||||
import "./modal-delete-all-rejected-glyphs.js";
|
||||
import "./options/modal-options.js";
|
||||
import "./options/modal-news-options.js";
|
||||
import "./options/modal-animation-options.js";
|
||||
|
84
javascripts/components/modals/modal-antimatter-galaxy.js
Normal file
84
javascripts/components/modals/modal-antimatter-galaxy.js
Normal file
@ -0,0 +1,84 @@
|
||||
Vue.component("modal-antimatter-galaxy", {
|
||||
props: { modalConfig: Object },
|
||||
data() {
|
||||
return {
|
||||
newGalaxies: 0,
|
||||
keepAntimatter: false,
|
||||
perkANRBought: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.on$(GAME_EVENT.DIMBOOST_AFTER, () =>
|
||||
(BreakInfinityUpgrade.autobuyMaxDimboosts.isBought ? this.emitClose() : undefined));
|
||||
this.on$(GAME_EVENT.BIG_CRUNCH_AFTER, this.emitClose);
|
||||
this.on$(GAME_EVENT.ETERNITY_RESET_AFTER, this.emitClose);
|
||||
this.on$(GAME_EVENT.REALITY_RESET_AFTER, this.emitClose);
|
||||
},
|
||||
computed: {
|
||||
bulk() { return this.modalConfig.bulk; },
|
||||
topLabel() {
|
||||
if (this.bulk) return `You are about to purchase ${quantifyInt("Antimatter Galaxy", this.newGalaxies)}`;
|
||||
return `You are about to purchase an Antimatter Galaxy`;
|
||||
},
|
||||
message() {
|
||||
let message = "";
|
||||
if (this.perkANRBought) message = `This will reset nothing, and you will receive a small
|
||||
boost to Tickspeed upgrades.`;
|
||||
else if (this.keepAntimatter) message = `This will reset all of your Antimatter Dimensions,
|
||||
your Dimension Boosts, and Tickspeed. However, you will receive a small boost
|
||||
to Tickspeed upgrades.`;
|
||||
else message = `This will reset all of your Antimatter Dimensions, your Dimension Boosts,
|
||||
Tickspeed, and Antimatter. However, you will receive a small boost to Tickspeed upgrades.`;
|
||||
if (this.bulk) return `Are you sure you want to purchase
|
||||
${quantifyInt("Antimatter Galaxy", this.newGalaxies)}? ${message}`;
|
||||
return `Are you sure you want to purchase an Antimatter Galaxy?
|
||||
${message}`;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
update() {
|
||||
if (this.bulk) {
|
||||
const req = Galaxy.requirement;
|
||||
const dim = AntimatterDimension(req.tier);
|
||||
const bulk = bulkBuyBinarySearch(dim.totalAmount, {
|
||||
costFunction: x => Galaxy.requirementAt(x).amount,
|
||||
cumulative: false,
|
||||
}, player.galaxies);
|
||||
if (bulk) {
|
||||
this.newGalaxies = Galaxy.buyableGalaxies(Math.round(dim.totalAmount.toNumber())) - player.galaxies;
|
||||
}
|
||||
}
|
||||
this.keepAntimatter = Achievement(111).isUnlocked;
|
||||
this.perkANRBought = Perk.antimatterNoReset.isBought;
|
||||
},
|
||||
handleYesClick() {
|
||||
this.emitClose();
|
||||
requestGalaxyReset(this.bulk);
|
||||
Tutorial.turnOffEffect(TUTORIAL_STATE.GALAXY);
|
||||
},
|
||||
handleNoClick() {
|
||||
this.emitClose();
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<div class="c-modal-message l-modal-content--centered">
|
||||
<h2>{{ topLabel }}</h2>
|
||||
<div class="c-modal-message__text">
|
||||
{{ message }}
|
||||
</div>
|
||||
<div class="l-options-grid__row">
|
||||
<primary-button
|
||||
class="o-primary-btn--width-medium c-modal-message__okay-btn"
|
||||
@click="handleNoClick"
|
||||
>
|
||||
Cancel
|
||||
</primary-button>
|
||||
<primary-button
|
||||
class="o-primary-btn--width-medium c-modal-message__okay-btn c-modal__confirm-btn"
|
||||
@click="handleYesClick"
|
||||
>
|
||||
Confirm
|
||||
</primary-button>
|
||||
</div>
|
||||
</div>`
|
||||
});
|
54
javascripts/components/modals/modal-big-crunch.js
Normal file
54
javascripts/components/modals/modal-big-crunch.js
Normal file
@ -0,0 +1,54 @@
|
||||
Vue.component("modal-big-crunch", {
|
||||
data() {
|
||||
return {
|
||||
gainedInfinities: Decimal,
|
||||
gainedInfinityPoints: Decimal,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.$on(GAME_EVENT.INFINITY_RESET_AFTER, this.emitClose);
|
||||
this.$on(GAME_EVENT.ETERNITY_RESET_AFTER, this.emitClose);
|
||||
this.$on(GAME_EVENT.REALITY_RESET_AFTER, this.emitClose);
|
||||
},
|
||||
computed: {
|
||||
message() {
|
||||
return `Upon Infinity, all Dimensions, Dimension Boosts, and Antimatter Galaxies are reset. You will gain
|
||||
${quantify("Infinity Point", this.gainedInfinityPoints, 2, 2)} on Infinity,
|
||||
and ${quantify("Infinity", this.gainedInfinities)}.`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
update() {
|
||||
this.gainedInfinities = gainedInfinities().round();
|
||||
this.gainedInfinityPoints = gainedInfinityPoints().round();
|
||||
},
|
||||
handleYesClick() {
|
||||
this.emitClose();
|
||||
bigCrunchResetRequest();
|
||||
},
|
||||
handleNoClick() {
|
||||
this.emitClose();
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<div class="c-modal-message l-modal-content--centered">
|
||||
<h2>You are about to Infinity</h2>
|
||||
<div class="c-modal-message__text">
|
||||
{{ message }}
|
||||
</div>
|
||||
<div class="l-options-grid__row">
|
||||
<primary-button
|
||||
class="o-primary-btn--width-medium c-modal-message__okay-btn"
|
||||
@click="handleNoClick"
|
||||
>
|
||||
Cancel
|
||||
</primary-button>
|
||||
<primary-button
|
||||
class="o-primary-btn--width-medium c-modal-message__okay-btn c-modal__confirm-btn"
|
||||
@click="handleYesClick"
|
||||
>
|
||||
Confirm
|
||||
</primary-button>
|
||||
</div>
|
||||
</div>`
|
||||
});
|
@ -0,0 +1,66 @@
|
||||
Vue.component("modal-delete-all-rejected-glyphs", {
|
||||
data() {
|
||||
return {
|
||||
glyphsTotal: Number,
|
||||
glyphsDeleted: Number,
|
||||
isRefining: Boolean,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
refiningOrSacrificing() {
|
||||
if (this.isRefining) return `Refine`;
|
||||
return `Sacrifice`;
|
||||
},
|
||||
topLabel() {
|
||||
return `You are about to ${this.refiningOrSacrificing} all rejected Glyphs`;
|
||||
},
|
||||
message() {
|
||||
return `Are you sure you want to ${this.refiningOrSacrificing} all rejected Glyphs? This will remove
|
||||
all Glyphs that would be rejected by your new Glyph Filter settings that were previously not removed.
|
||||
This process is irreversible!`;
|
||||
},
|
||||
extraMessage() {
|
||||
if (this.glyphsDeleted === 0) return `This will remove no Glyphs.`;
|
||||
if (this.glyphsDeleted === this.glyphsTotal) return `This will remove all your Glyphs.`;
|
||||
return `This process will remove ${this.glyphsDeleted}/${this.glyphsTotal} Glyphs.`;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
update() {
|
||||
this.glyphsTotal = Glyphs.inventory.filter(slot => slot !== null).length;
|
||||
this.glyphsDeleted = Glyphs.deleteAllRejected(false);
|
||||
this.isRefining = GlyphSacrificeHandler.isRefining;
|
||||
},
|
||||
handleYesClick() {
|
||||
this.emitClose();
|
||||
Glyphs.deleteAllRejected(true);
|
||||
},
|
||||
handleNoClick() {
|
||||
this.emitClose();
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<div class="c-modal-message l-modal-content--centered">
|
||||
<h2>{{ topLabel }}</h2>
|
||||
<div class="c-modal-message__text">
|
||||
{{ message }}
|
||||
</div>
|
||||
<div class="c-modal-hard-reset-danger">
|
||||
{{ extraMessage }}
|
||||
</div>
|
||||
<div class="l-options-grid__row">
|
||||
<primary-button
|
||||
class="o-primary-btn--width-medium c-modal-message__okay-btn"
|
||||
@click="handleNoClick"
|
||||
>
|
||||
Cancel
|
||||
</primary-button>
|
||||
<primary-button
|
||||
class="o-primary-btn--width-medium c-modal-message__okay-btn c-modal__confirm-btn"
|
||||
@click="handleYesClick"
|
||||
>
|
||||
Confirm
|
||||
</primary-button>
|
||||
</div>
|
||||
</div>`
|
||||
});
|
@ -0,0 +1,56 @@
|
||||
Vue.component("modal-delete-all-unprotected-glyphs", {
|
||||
data() {
|
||||
return {
|
||||
isRefining: Boolean,
|
||||
isSacrificing: Boolean,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
refiningSacrificingOrDeleting() {
|
||||
if (this.isRefining) return `Refine`;
|
||||
if (this.isSacrificing) return `Sacrifice`;
|
||||
return `delete`;
|
||||
},
|
||||
topLabel() {
|
||||
return `You are about to ${this.refiningSacrificingOrDeleting} all unprotected Glyphs`;
|
||||
},
|
||||
message() {
|
||||
return `Are you sure you want to ${this.refiningSacrificingOrDeleting} all unprotected Glyphs
|
||||
in your inventory? This process is irreversible!`;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
update() {
|
||||
this.isRefining = GlyphSacrificeHandler.isRefining;
|
||||
this.isSacrificing = GlyphSacrificeHandler.canSacrifice;
|
||||
},
|
||||
handleYesClick() {
|
||||
this.emitClose();
|
||||
Glyphs.deleteAllUnprotected();
|
||||
},
|
||||
handleNoClick() {
|
||||
this.emitClose();
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<div class="c-modal-message l-modal-content--centered">
|
||||
<h2>{{ topLabel }}</h2>
|
||||
<div class="c-modal-hard-reset-danger">
|
||||
{{ message }}
|
||||
</div>
|
||||
<div class="l-options-grid__row">
|
||||
<primary-button
|
||||
class="o-primary-btn--width-medium c-modal-message__okay-btn"
|
||||
@click="handleNoClick"
|
||||
>
|
||||
Cancel
|
||||
</primary-button>
|
||||
<primary-button
|
||||
class="o-primary-btn--width-medium c-modal-message__okay-btn c-modal__confirm-btn"
|
||||
@click="handleYesClick"
|
||||
>
|
||||
Confirm
|
||||
</primary-button>
|
||||
</div>
|
||||
</div>`
|
||||
});
|
53
javascripts/components/modals/modal-dimension-boost.js
Normal file
53
javascripts/components/modals/modal-dimension-boost.js
Normal file
@ -0,0 +1,53 @@
|
||||
Vue.component("modal-dimension-boost", {
|
||||
props: { modalConfig: Object },
|
||||
created() {
|
||||
this.on$(GAME_EVENT.DIMBOOST_AFTER, this.emitClose);
|
||||
this.on$(GAME_EVENT.BIG_CRUNCH_AFTER, this.emitClose);
|
||||
this.on$(GAME_EVENT.ETERNITY_RESET_AFTER, this.emitClose);
|
||||
this.on$(GAME_EVENT.REALITY_RESET_AFTER, this.emitClose);
|
||||
},
|
||||
computed: {
|
||||
bulk() { return this.modalConfig.bulk; },
|
||||
topLabel() {
|
||||
return `You are about to do a Dimension Boost Reset`;
|
||||
},
|
||||
message() {
|
||||
const areDimensionsReset = Perk.antimatterNoReset.isBought || Achievement(111).isUnlocked
|
||||
? `not reset anything because you have ${Perk.antimatterNoReset.isBought ? "Perk ANR" : "Achievement 111"}`
|
||||
: `reset your Antimatter and Antimatter Dimensions`;
|
||||
|
||||
return `This will ${areDimensionsReset}. Are you sure you want to do this?`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
handleYesClick() {
|
||||
this.emitClose();
|
||||
requestDimensionBoost(this.bulk);
|
||||
Tutorial.turnOffEffect(TUTORIAL_STATE.DIMBOOST);
|
||||
},
|
||||
handleNoClick() {
|
||||
this.emitClose();
|
||||
},
|
||||
},
|
||||
template: `
|
||||
<div class="c-modal-message l-modal-content--centered">
|
||||
<h2>{{ topLabel }}</h2>
|
||||
<div class="c-modal-message__text">
|
||||
{{ message }}
|
||||
</div>
|
||||
<div class="l-options-grid__row">
|
||||
<primary-button
|
||||
class="o-primary-btn--width-medium c-modal-message__okay-btn"
|
||||
@click="handleNoClick"
|
||||
>
|
||||
Cancel
|
||||
</primary-button>
|
||||
<primary-button
|
||||
class="o-primary-btn--width-medium c-modal-message__okay-btn c-modal__confirm-btn"
|
||||
@click="handleYesClick"
|
||||
>
|
||||
Confirm
|
||||
</primary-button>
|
||||
</div>
|
||||
</div>`
|
||||
});
|
@ -2,7 +2,8 @@ Vue.component("modal-eternity", {
|
||||
data() {
|
||||
return {
|
||||
exitingEC: false,
|
||||
startingIP: new Decimal(0)
|
||||
startingIP: new Decimal(0),
|
||||
gainedEternityPoints: new Decimal(0),
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -18,7 +19,7 @@ Vue.component("modal-eternity", {
|
||||
on the Statistics tab. You will also gain an Eternity Point and unlock various upgrades.`;
|
||||
},
|
||||
gainedEPOnEternity() {
|
||||
return `You will gain ${quantify("Eternity Point", gainedEternityPoints(), 2)} on Eternity.`;
|
||||
return `You will gain ${quantify("Eternity Point", this.gainedEternityPoints, 2)} on Eternity.`;
|
||||
},
|
||||
startWithIP() {
|
||||
return this.startingIP.gt(0)
|
||||
@ -41,6 +42,7 @@ Vue.component("modal-eternity", {
|
||||
update() {
|
||||
this.exitingEC = EternityChallenge.isRunning;
|
||||
this.startingIP = Currency.infinityPoints.startingValue;
|
||||
this.gainedEternityPoints = gainedEternityPoints();
|
||||
},
|
||||
handleNoClick() {
|
||||
this.emitClose();
|
||||
|
71
javascripts/components/modals/modal-glyph-purge.js
Normal file
71
javascripts/components/modals/modal-glyph-purge.js
Normal file
@ -0,0 +1,71 @@
|
||||
Vue.component("modal-glyph-purge", {
|
||||
props: { modalConfig: Object },
|
||||
data() {
|
||||
return {
|
||||
glyphsTotal: Number,
|
||||
glyphsDeleted: Number,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
harsh() { return this.modalConfig.harsh; },
|
||||
threshold() { return this.harsh ? 1 : 5; },
|
||||
extraMessage() {
|
||||
if (this.glyphsDeleted === 0) return `This will Purge no Glyphs.`;
|
||||
if (this.glyphsDeleted === this.glyphsTotal) return `This will Purge all your Glyphs.`;
|
||||
return `${this.harsh ? `Harsh Purging` : `Purging`} will delete ${this.glyphsDeleted}/${this.glyphsTotal}
|
||||
of your Glyphs.`;
|
||||
},
|
||||
explanation() {
|
||||
if (this.harsh) return `Harsh Purging deletes Glyphs that are strictly worse than any other Glyph in your
|
||||
inventory. For example, if there is a Glyph that has all better effects than another, the worse is deleted.`;
|
||||
return `Purging deletes Glyphs that are worse than enough other Glyphs. Instead of keeping one good Glyph,
|
||||
like Harsh Purge, it keeps five.`;
|
||||
},
|
||||
topLabel() {
|
||||
return `You are about to ${this.harsh ? `Harsh Purge` : `Purge`} your Glyphs`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
update() {
|
||||
this.glyphsTotal = Glyphs.inventory.filter(slot => slot !== null).length;
|
||||
this.glyphsDeleted = Glyphs.autoClean(this.threshold, false);
|
||||
},
|
||||
handleYesClick() {
|
||||
this.emitClose();
|
||||
Glyphs.autoClean(this.threshold, true);
|
||||
},
|
||||
handleNoClick() {
|
||||
this.emitClose();
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<div class="c-modal-message l-modal-content--centered">
|
||||
<h2>{{ topLabel }}</h2>
|
||||
<div class="c-modal-message__text">
|
||||
This could delete Glyphs in your inventory that are good enough that you might want to use them
|
||||
later. Are you sure you want to do this? This process is irreversible! Purging will Purge Glyphs based on your
|
||||
Purge mode.
|
||||
<br>
|
||||
<br>
|
||||
{{ explanation }}
|
||||
</div>
|
||||
<br>
|
||||
<div class="c-modal-hard-reset-danger">
|
||||
{{ extraMessage }}
|
||||
</div>
|
||||
<div class="l-options-grid__row">
|
||||
<primary-button
|
||||
class="o-primary-btn--width-medium c-modal-message__okay-btn"
|
||||
@click="handleNoClick"
|
||||
>
|
||||
Cancel
|
||||
</primary-button>
|
||||
<primary-button
|
||||
class="o-primary-btn--width-medium c-modal-message__okay-btn c-modal__confirm-btn"
|
||||
@click="handleYesClick"
|
||||
>
|
||||
Confirm
|
||||
</primary-button>
|
||||
</div>
|
||||
</div>`
|
||||
});
|
64
javascripts/components/modals/modal-replicanti-galaxy.js
Normal file
64
javascripts/components/modals/modal-replicanti-galaxy.js
Normal file
@ -0,0 +1,64 @@
|
||||
Vue.component("modal-replicanti-galaxy", {
|
||||
data() {
|
||||
return {
|
||||
replicanti: new Decimal(0),
|
||||
divideReplicanti: false,
|
||||
canBeBought: 0,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.on$(GAME_EVENT.ETERNITY_RESET_AFTER, this.emitClose);
|
||||
this.on$(GAME_EVENT.REALITY_RESET_AFTER, this.emitClose);
|
||||
},
|
||||
computed: {
|
||||
topLabel() {
|
||||
return `You are about to purchase ${quantifyInt("Replicanti Galaxy", this.canBeBought)}`;
|
||||
},
|
||||
message() {
|
||||
const reductionString = this.divideReplicanti
|
||||
? `divide your Replicanti by ${format(Number.MAX_VALUE, 2, 2)} for each Replicanti Galaxy purchased
|
||||
(${format(this.replicanti, 2, 2)} to
|
||||
${format(this.replicanti.divide(Decimal.NUMBER_MAX_VALUE.pow(this.canBeBought)), 2, 2)})`
|
||||
: `reset your Replicanti to ${formatInt(1)}`;
|
||||
return `A Replicanti Galaxy boosts Tickspeed the same way an Antimatter Galaxy does. However, it does not
|
||||
increase the cost of Antimatter Galaxies, nor is it affected by multipliers to Antimatter Galaxies specifically.
|
||||
It will ${reductionString}.`;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
update() {
|
||||
this.replicanti.copyFrom(player.replicanti.amount);
|
||||
this.divideReplicanti = Achievement(126).isUnlocked;
|
||||
this.canBeBought = Replicanti.galaxies.gain;
|
||||
if (this.replicanti.lt(Number.MAX_VALUE)) this.emitClose();
|
||||
},
|
||||
handleYesClick() {
|
||||
replicantiGalaxy();
|
||||
this.emitClose();
|
||||
},
|
||||
handleNoClick() {
|
||||
this.emitClose();
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<div class="c-modal-message l-modal-content--centered">
|
||||
<h2>{{ topLabel }}</h2>
|
||||
<div class="c-modal-message__text">
|
||||
{{ message }}
|
||||
</div>
|
||||
<div class="l-options-grid__row">
|
||||
<primary-button
|
||||
class="o-primary-btn--width-medium c-modal-message__okay-btn"
|
||||
@click="handleNoClick"
|
||||
>
|
||||
Cancel
|
||||
</primary-button>
|
||||
<primary-button
|
||||
class="o-primary-btn--width-medium c-modal-message__okay-btn c-modal__confirm-btn"
|
||||
@click="handleYesClick"
|
||||
>
|
||||
Confirm
|
||||
</primary-button>
|
||||
</div>
|
||||
</div>`
|
||||
});
|
@ -1,4 +1,10 @@
|
||||
Vue.component("modal-sacrifice", {
|
||||
data() {
|
||||
return {
|
||||
currentMultiplier: new Decimal(0),
|
||||
nextMultiplier: new Decimal(0),
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.on$(GAME_EVENT.DIMBOOST_AFTER, this.emitClose);
|
||||
this.on$(GAME_EVENT.GALAXY_RESET_AFTER, this.emitClose);
|
||||
@ -16,14 +22,18 @@ Vue.component("modal-sacrifice", {
|
||||
1st Antmatter Dimensions you had at the time of Sacrificing.`;
|
||||
},
|
||||
currently() {
|
||||
return `Multiplier is currently ${formatX(Sacrifice.totalBoost, 2, 2)}.`;
|
||||
return `Multiplier is currently ${formatX(this.currentMultiplier, 2, 2)}.`;
|
||||
},
|
||||
afterSacrifice() {
|
||||
return `Multiplier will increase to ${formatX(Sacrifice.nextBoost.times(Sacrifice.totalBoost), 2, 2)}
|
||||
return `Multiplier will increase to ${formatX(this.nextMultiplier, 2, 2)}
|
||||
on Dimensional Sacrifice.`;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
update() {
|
||||
this.currentMultiplier.copyFrom(Sacrifice.totalBoost);
|
||||
this.nextMultiplier.copyFrom(Sacrifice.nextBoost.times(Sacrifice.totalBoost));
|
||||
},
|
||||
handleNoClick() {
|
||||
this.emitClose();
|
||||
},
|
||||
|
@ -12,18 +12,27 @@ Vue.component("modal-confirmation-options", {
|
||||
resetReality: false,
|
||||
glyphReplace: false,
|
||||
glyphSacrifice: false,
|
||||
autoClean: false,
|
||||
glyphSelection: false,
|
||||
harshAutoClean: false,
|
||||
glyphUndo: false,
|
||||
resetCelestial: false,
|
||||
deleteGlyphSetSave: false,
|
||||
glyphRefine: false,
|
||||
bigCrunch: false,
|
||||
antimatterGalaxy: false,
|
||||
dimensionBoost: false,
|
||||
replicantiGalaxy: false,
|
||||
|
||||
realityAutobuyerUnlocked: false,
|
||||
sacrificeUnlocked: false,
|
||||
glyphSacrificeUnlocked: false,
|
||||
glyphUndoUnlocked: false,
|
||||
resetCelestialUnlocked: false,
|
||||
glyphSetSaveUnlocked: false,
|
||||
glyphRefineUnlocked: false,
|
||||
infinityBroken: false,
|
||||
replicantUnlocked: false,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -51,6 +60,9 @@ Vue.component("modal-confirmation-options", {
|
||||
glyphSacrifice(newValue) {
|
||||
player.options.confirmations.glyphSacrifice = newValue;
|
||||
},
|
||||
autoClean(newValue) {
|
||||
player.options.confirmations.autoClean = newValue;
|
||||
},
|
||||
glyphSelection(newValue) {
|
||||
player.options.confirmations.glyphSelection = newValue;
|
||||
},
|
||||
@ -69,6 +81,18 @@ Vue.component("modal-confirmation-options", {
|
||||
glyphRefine(newValue) {
|
||||
player.options.confirmations.glyphRefine = newValue;
|
||||
},
|
||||
bigCrunch(newValue) {
|
||||
player.options.confirmations.bigCrunch = newValue;
|
||||
},
|
||||
replicantiGalaxy(newValue) {
|
||||
player.options.confirmations.replicantiGalaxy = newValue;
|
||||
},
|
||||
antimatterGalaxy(newValue) {
|
||||
player.options.confirmations.antimatterGalaxy = newValue;
|
||||
},
|
||||
dimensionBoost(newValue) {
|
||||
player.options.confirmations.dimensionBoost = newValue;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
update() {
|
||||
@ -81,34 +105,45 @@ Vue.component("modal-confirmation-options", {
|
||||
this.resetReality = options.resetReality;
|
||||
this.glyphReplace = options.glyphReplace;
|
||||
this.glyphSacrifice = options.glyphSacrifice;
|
||||
this.autoClean = options.autoClean;
|
||||
this.glyphSelection = options.glyphSelection;
|
||||
this.harshAutoClean = options.harshAutoClean;
|
||||
this.glyphUndo = options.glyphUndo;
|
||||
this.resetCelestial = options.resetCelestial;
|
||||
this.deleteGlyphSetSave = options.deleteGlyphSetSave;
|
||||
this.glyphRefine = options.glyphRefine;
|
||||
this.bigCrunch = options.bigCrunch;
|
||||
this.antimatterGalaxy = options.antimatterGalaxy;
|
||||
this.dimensionBoost = options.dimensionBoost;
|
||||
this.replicantiGalaxy = options.replicantiGalaxy;
|
||||
|
||||
this.sacrificeUnlocked = PlayerProgress.infinityUnlocked() || player.dimensionBoosts >= 5 || player.galaxies > 0;
|
||||
this.glyphSacrificeUnlocked = GlyphSacrificeHandler.canSacrifice;
|
||||
this.realityAutobuyerUnlocked = Autobuyer.reality.isUnlocked;
|
||||
this.sacrificeUnlocked = Sacrifice.isVisible;
|
||||
this.glyphSacrificeUnlocked = GlyphSacrificeHandler.canSacrifice;
|
||||
this.glyphUndoUnlocked = Teresa.has(TERESA_UNLOCKS.UNDO);
|
||||
this.resetCelestialUnlocked = Teresa.has(TERESA_UNLOCKS.RUN);
|
||||
this.glyphSetSaveUnlocked = EffarigUnlock.setSaves.isUnlocked;
|
||||
this.glyphRefineUnlocked = Ra.has(RA_UNLOCKS.GLYPH_ALCHEMY);
|
||||
this.infinityBroken = player.break;
|
||||
this.replicantiUnlocked = PlayerProgress.eternityUnlocked() || player.replicanti.unl;
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<modal-options @close="emitClose" style="width: 50rem">
|
||||
<div class="c-modal-options__button-container">
|
||||
<wide-on-off-button v-if="sacrificeUnlocked" v-model="sacrifice" text="Sacrifice:" />
|
||||
<wide-on-off-button v-if="sacrificeUnlocked" v-model="dimensionBoost" text="Dimension Boost:" />
|
||||
<wide-on-off-button v-if="infinityUnlocked" v-model="antimatterGalaxy" text="Antimatter Galaxy:" />
|
||||
<wide-on-off-button v-if="infinityUnlocked" v-model="challenges" text="Challenges:" />
|
||||
<wide-on-off-button v-if="infinityBroken" v-model="bigCrunch" text="Big Crunch:" />
|
||||
<wide-on-off-button v-if="replicantiUnlocked" v-model="replicantiGalaxy" text="Replicanti Galaxy:" />
|
||||
<wide-on-off-button v-if="eternityUnlocked" v-model="eternity" text="Eternity:" />
|
||||
<wide-on-off-button v-if="dilationUnlocked" v-model="dilation" text="Dilation:" />
|
||||
<wide-on-off-button v-if="realityUnlocked" v-model="reality" text="Reality:" />
|
||||
<wide-on-off-button v-if="realityUnlocked" v-model="resetReality" text="Reset Reality:" />
|
||||
<wide-on-off-button v-if="realityUnlocked" v-model="glyphReplace" text="Glyph replace:" />
|
||||
<wide-on-off-button v-if="glyphSacrificeUnlocked" v-model="glyphSacrifice" text="Glyph Sacrifice:" />
|
||||
<wide-on-off-button v-if="glyphSacrificeUnlocked" v-model="harshAutoClean" text="Harsh auto clean:" />
|
||||
<wide-on-off-button v-if="glyphSacrificeUnlocked" v-model="autoClean" text="Glyph Purge:" />
|
||||
<wide-on-off-button v-if="realityAutobuyerUnlocked" v-model="glyphSelection" text="Glyph Selection:" />
|
||||
<wide-on-off-button v-if="glyphUndoUnlocked" v-model="glyphUndo" text="Glyph undo:" />
|
||||
<wide-on-off-button v-if="resetCelestialUnlocked" v-model="resetCelestial" text="Reset Celestial:" />
|
||||
|
@ -8,37 +8,14 @@ Vue.component("new-dim-boost-row", {
|
||||
isBuyable: false,
|
||||
purchasedBoosts: 0,
|
||||
imaginaryBoosts: 0,
|
||||
lockText: null
|
||||
lockText: null,
|
||||
unlockedByBoost: null,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
dimName() {
|
||||
return AntimatterDimension(this.requirement.tier).shortDisplayName;
|
||||
},
|
||||
buttonText() {
|
||||
const boosts = this.purchasedBoosts;
|
||||
|
||||
let newUnlock = "";
|
||||
if (!EternityMilestone.unlockAllND.isReached && boosts < DimBoost.maxDimensionsUnlockable - 4) {
|
||||
newUnlock = `unlock the ${boosts + 5}th Dimension`;
|
||||
} else if (boosts === 4 && !NormalChallenge(10).isRunning && !EternityChallenge(3).isRunning) {
|
||||
newUnlock = "unlock Sacrifice";
|
||||
}
|
||||
|
||||
const formattedMultText = `give a ${formatX(DimBoost.power, 2, 1)} multiplier `;
|
||||
let dimensionRange = `to the 1st Dimension`;
|
||||
if (boosts > 0) dimensionRange = `to Dimensions 1-${Math.min(boosts + 1, 8)}`;
|
||||
if (boosts >= DimBoost.maxDimensionsUnlockable - 1) dimensionRange = `to all Dimensions`;
|
||||
|
||||
let boostEffects = "";
|
||||
if (NormalChallenge(8).isRunning) boostEffects = ` to ${newUnlock}`;
|
||||
else if (newUnlock === "") boostEffects = ` to ${formattedMultText} ${dimensionRange}`;
|
||||
else boostEffects = ` to ${newUnlock} and ${formattedMultText} ${dimensionRange}`;
|
||||
|
||||
return this.lockText === null
|
||||
? `Reset your Dimensions${boostEffects}`
|
||||
: this.lockText;
|
||||
},
|
||||
boostCountText() {
|
||||
const parts = [this.purchasedBoosts];
|
||||
if (this.imaginaryBoosts !== 0) {
|
||||
@ -63,8 +40,14 @@ Vue.component("new-dim-boost-row", {
|
||||
this.purchasedBoosts = DimBoost.purchasedBoosts;
|
||||
this.imaginaryBoosts = DimBoost.imaginaryBoosts;
|
||||
this.lockText = DimBoost.lockText;
|
||||
this.unlockedByBoost = DimBoost.unlockedByBoost;
|
||||
},
|
||||
dimensionBoost(bulk) {
|
||||
if (!DimBoost.requirement.isSatisfied || !DimBoost.canBeBought) return;
|
||||
if (player.options.confirmations.dimensionBoost) {
|
||||
Modal.dimensionBoost.show({ bulk });
|
||||
return;
|
||||
}
|
||||
requestDimensionBoost(bulk);
|
||||
Tutorial.turnOffEffect(TUTORIAL_STATE.DIMBOOST);
|
||||
}
|
||||
@ -80,7 +63,7 @@ Vue.component("new-dim-boost-row", {
|
||||
@click.exact="dimensionBoost(true)"
|
||||
@click.shift.exact="dimensionBoost(false)"
|
||||
>
|
||||
{{ buttonText }}
|
||||
{{ unlockedByBoost }}
|
||||
</button>
|
||||
</div>`
|
||||
});
|
||||
|
@ -13,7 +13,8 @@ Vue.component("new-galaxy-row", {
|
||||
},
|
||||
canBeBought: false,
|
||||
distantStart: 0,
|
||||
lockText: null
|
||||
lockText: null,
|
||||
canBulkBuy: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -73,8 +74,15 @@ Vue.component("new-galaxy-row", {
|
||||
this.canBeBought = requirement.isSatisfied && Galaxy.canBeBought;
|
||||
this.distantStart = EternityChallenge(5).isRunning ? 0 : Galaxy.costScalingStart;
|
||||
this.lockText = Galaxy.lockText;
|
||||
this.canBulkBuy = EternityMilestone.autobuyMaxGalaxies.isReached;
|
||||
},
|
||||
buyGalaxy(bulk) {
|
||||
if (!this.canBeBought) return;
|
||||
if (player.options.confirmations.antimatterGalaxy) {
|
||||
const buyBulk = this.canBulkBuy && bulk;
|
||||
Modal.antimatterGalaxy.show({ bulk: buyBulk });
|
||||
return;
|
||||
}
|
||||
requestGalaxyReset(bulk);
|
||||
Tutorial.turnOffEffect(TUTORIAL_STATE.GALAXY);
|
||||
},
|
||||
|
@ -67,13 +67,18 @@ Vue.component("game-header-big-crunch-button", {
|
||||
switchToInfinity() {
|
||||
Tab.dimensions.infinity.show(true);
|
||||
},
|
||||
crunch() {
|
||||
if (!Player.canCrunch) return;
|
||||
if (player.options.confirmations.bigCrunch) Modal.bigCrunch.show();
|
||||
else bigCrunchResetRequest();
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<button
|
||||
v-if="isVisible && !tesseractAffordable"
|
||||
:class="buttonClassObject"
|
||||
class="o-prestige-button o-infinity-button l-game-header__big-crunch-btn"
|
||||
onclick="bigCrunchResetRequest()"
|
||||
@click="crunch"
|
||||
@mouseover="hover = true"
|
||||
@mouseleave="hover = false"
|
||||
>
|
||||
|
@ -16,6 +16,9 @@ Vue.component("game-header-new-dim-button", {
|
||||
this.requirement.copyFrom(requirement);
|
||||
this.isAffordable = player.records.thisEternity.maxAM.gte(requirement);
|
||||
this.anyInfinityDimensionUnlocked = InfinityDimension(1).isUnlocked;
|
||||
},
|
||||
tryUnlockNextInfinityDimension() {
|
||||
InfinityDimensions.unlockNext(true);
|
||||
}
|
||||
},
|
||||
template: `
|
||||
@ -23,7 +26,7 @@ Vue.component("game-header-new-dim-button", {
|
||||
v-if="isVisible"
|
||||
:enabled="isAffordable"
|
||||
class="o-primary-btn--new-dim l-game-header__new-dim-btn"
|
||||
onclick="InfinityDimensions.unlockNext(); Tab.dimensions.infinity.show()"
|
||||
@click="tryUnlockNextInfinityDimension"
|
||||
>
|
||||
Get {{ format(requirement) }} antimatter
|
||||
<br>
|
||||
|
@ -6,6 +6,7 @@ Vue.component("glyph-clean-button-group", {
|
||||
hasFilter: false,
|
||||
inventory: [],
|
||||
isRefining: false,
|
||||
removeCount: 0,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -23,12 +24,9 @@ Vue.component("glyph-clean-button-group", {
|
||||
ANY other glyph${this.hasPerkShop ? " (includes Music Glyphs)" : ""}`;
|
||||
},
|
||||
deleteRejectedTooltip() {
|
||||
const removeCount = this.inventory
|
||||
.filter(g => g !== null && g.idx >= Glyphs.protectedSlots && !AutoGlyphProcessor.wouldKeep(g))
|
||||
.length;
|
||||
return removeCount === 0
|
||||
return this.removeCount === 0
|
||||
? `This will not remove any Glyphs, adjust your filter settings to remove some.`
|
||||
: `This will remove ${quantifyInt("Glyph", removeCount)}!`;
|
||||
: `This will remove ${quantifyInt("Glyph", this.removeCount)}!`;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -39,18 +37,29 @@ Vue.component("glyph-clean-button-group", {
|
||||
this.inventory = Glyphs.inventory.map(GlyphGenerator.copy);
|
||||
this.isRefining = AutoGlyphProcessor.sacMode === AUTO_GLYPH_REJECT.REFINE ||
|
||||
AutoGlyphProcessor.sacMode === AUTO_GLYPH_REJECT.REFINE_TO_CAP;
|
||||
this.removeCount = this.inventory
|
||||
.filter(g => g !== null && g.idx >= Glyphs.protectedSlots && !AutoGlyphProcessor.wouldKeep(g))
|
||||
.length;
|
||||
},
|
||||
autoClean() {
|
||||
Glyphs.autoClean();
|
||||
if (player.options.confirmations.autoClean) {
|
||||
Modal.glyphPurge.show({ harsh: false });
|
||||
} else {
|
||||
Glyphs.autoClean(5);
|
||||
}
|
||||
},
|
||||
harshAutoClean() {
|
||||
Glyphs.harshAutoClean();
|
||||
if (player.options.confirmations.autoClean) {
|
||||
Modal.glyphPurge.show({ harsh: true });
|
||||
} else {
|
||||
Glyphs.autoClean(1);
|
||||
}
|
||||
},
|
||||
deleteAllUnprotected() {
|
||||
Glyphs.deleteAllUnprotected();
|
||||
Modal.deleteAllUnprotectedGlyphs.show();
|
||||
},
|
||||
deleteAllRejected() {
|
||||
Glyphs.deleteAllRejected();
|
||||
Modal.deleteAllRejectedGlyphs.show();
|
||||
},
|
||||
slotClass(index) {
|
||||
return index < Glyphs.protectedSlots ? "c-glyph-inventory__protected-slot" : "c-glyph-inventory__slot";
|
||||
|
@ -248,7 +248,7 @@ const MatterScale = {
|
||||
enough to ${scale.verb} ${amount} ${scale.name}`];
|
||||
}
|
||||
const scale = this.microScale(matter);
|
||||
return [`If every antimatter were ${format(this.proton / scale.amount / matter.toNumber(), 2, 1)} ${scale.name},
|
||||
return [`If every antimatter were ${format(this.proton.div(scale.amount).div(matter), 2, 1)} ${scale.name},
|
||||
you would have enough to make a proton.`];
|
||||
},
|
||||
|
||||
|
@ -55,6 +55,11 @@ class AchievementState extends GameMechanicState {
|
||||
if (this.id === 85 || this.id === 93) {
|
||||
Autobuyer.bigCrunch.bumpAmount(4);
|
||||
}
|
||||
if (this.id === 55 && !PlayerProgress.realityUnlocked()) {
|
||||
Modal.message.show(`Since you just Infinitied in under a minute, the UI changed on the screen.
|
||||
Instead of the Dimensions disappearing, they stay and the Big Crunch button appears on top of them.
|
||||
This is purely visual, and is there to prevent flickering.`);
|
||||
}
|
||||
if (auto) {
|
||||
GameUI.notify.reality(`Automatically unlocked: ${this.name}`);
|
||||
} else {
|
||||
|
@ -73,12 +73,15 @@ Modal.studyString = new Modal("modal-study-string");
|
||||
Modal.automatorScriptDelete = new Modal("modal-automator-script-delete");
|
||||
Modal.glyphSetSaveDelete = new Modal("modal-set-save-delete");
|
||||
Modal.deleteCompanion = new Modal("modal-delete-companion");
|
||||
Modal.glyphPurge = new Modal("modal-glyph-purge");
|
||||
Modal.glyphShowcasePanel = new Modal("modal-glyph-showcase-panel");
|
||||
Modal.glyphUndo = new Modal("modal-glyph-undo");
|
||||
Modal.glyphReplace = new Modal("modal-glyph-replace");
|
||||
Modal.glyphSacrifice = new Modal("modal-glyph-sacrifice");
|
||||
Modal.glyphDelete = new Modal("modal-glyph-delete");
|
||||
Modal.glyphRefine = new Modal("modal-glyph-refine");
|
||||
Modal.deleteAllUnprotectedGlyphs = new Modal("modal-delete-all-unprotected-glyphs");
|
||||
Modal.deleteAllRejectedGlyphs = new Modal("modal-delete-all-rejected-glyphs");
|
||||
Modal.enslavedHints = new Modal("modal-enslaved-hints");
|
||||
Modal.realityGlyph = new Modal("modal-reality-glyph-creation");
|
||||
Modal.singularityMilestones = new Modal("singularity-milestones-modal");
|
||||
@ -88,8 +91,12 @@ Modal.hiddenTabs = new Modal("modal-hidden-tabs");
|
||||
Modal.startEternityChallenge = new ChallengeConfirmationModal("modal-start-eternity-challenge");
|
||||
Modal.startInfinityChallenge = new ChallengeConfirmationModal("modal-start-infinity-challenge");
|
||||
Modal.startNormalChallenge = new ChallengeConfirmationModal("modal-start-normal-challenge");
|
||||
Modal.bigCrunch = new Modal("modal-big-crunch");
|
||||
Modal.sacrifice = new Modal("modal-sacrifice");
|
||||
Modal.dimensionBoost = new Modal("modal-dimension-boost");
|
||||
Modal.antimatterGalaxy = new Modal("modal-antimatter-galaxy");
|
||||
Modal.breakInfinity = new Modal("modal-break-infinity");
|
||||
Modal.replicantiGalaxy = new Modal("modal-replicanti-galaxy");
|
||||
Modal.eternity = new Modal("modal-eternity");
|
||||
Modal.reality = new Modal("modal-reality");
|
||||
Modal.resetReality = new Modal("modal-reset-reality");
|
||||
|
@ -4,7 +4,7 @@ export const notify = (function() {
|
||||
const enterAnimation = "a-notification--enter";
|
||||
const leaveAnimation = "a-notification--leave";
|
||||
function showNotification(text, elClass, duration = 2000) {
|
||||
if(!GameUI.initialized) {
|
||||
if (!GameUI.initialized) {
|
||||
setTimeout(showNotification, 500, text, elClass, duration);
|
||||
return;
|
||||
}
|
||||
|
@ -49,6 +49,10 @@ export function bigCrunchReset() {
|
||||
bigCrunchCheckUnlocks();
|
||||
|
||||
EventHub.dispatch(GAME_EVENT.BIG_CRUNCH_AFTER);
|
||||
if (firstInfinity) Modal.message.show(`Upon Infinity, all Dimensions, Dimension Boosts, and Antimatter
|
||||
Galaxies are reset, but in return, you gain an Infinity Point (IP). This allows you to buy multiple upgrades that
|
||||
you can find in the Infinity tab. You will also gain an Infinitied stat, which is the stat shown in the Statistics
|
||||
tab.`);
|
||||
}
|
||||
|
||||
function bigCrunchUpdateStatistics() {
|
||||
|
@ -122,6 +122,33 @@ export class DimBoost {
|
||||
return new DimBoostRequirement(tier, amount);
|
||||
}
|
||||
|
||||
static get unlockedByBoost() {
|
||||
if (DimBoost.lockText !== null) return DimBoost.lockText;
|
||||
const boosts = DimBoost.purchasedBoosts;
|
||||
|
||||
let newUnlock = "";
|
||||
if (!EternityMilestone.unlockAllND.isReached && boosts < DimBoost.maxDimensionsUnlockable - 4) {
|
||||
newUnlock = `unlock the ${boosts + 5}th Dimension`;
|
||||
} else if (boosts === 4 && !NormalChallenge(10).isRunning && !EternityChallenge(3).isRunning) {
|
||||
newUnlock = "unlock Sacrifice";
|
||||
}
|
||||
|
||||
const formattedMultText = `give a ${formatX(DimBoost.power, 2, 1)} multiplier `;
|
||||
let dimensionRange = `to the 1st Dimension`;
|
||||
if (boosts > 0) dimensionRange = `to Dimensions 1-${Math.min(boosts + 1, 8)}`;
|
||||
if (boosts >= DimBoost.maxDimensionsUnlockable - 1) dimensionRange = `to all Dimensions`;
|
||||
|
||||
let boostEffects = "";
|
||||
if (NormalChallenge(8).isRunning) boostEffects = ` to ${newUnlock}`;
|
||||
else if (newUnlock === "") boostEffects = ` to ${formattedMultText} ${dimensionRange}`;
|
||||
else boostEffects = ` to ${newUnlock} and ${formattedMultText} ${dimensionRange}`;
|
||||
|
||||
const areDimensionsReset = `Reset
|
||||
${(Perk.antimatterNoReset.isBought || Achievement(111).isUnlocked) ? "nothing" : "your Dimensions"}`;
|
||||
|
||||
return `${areDimensionsReset}${boostEffects}`;
|
||||
}
|
||||
|
||||
static get purchasedBoosts() {
|
||||
return Math.floor(player.dimensionBoosts);
|
||||
}
|
||||
|
@ -280,12 +280,13 @@ export const InfinityDimensions = {
|
||||
all: InfinityDimension.index.compact(),
|
||||
HARDCAP_PURCHASES: 2000000,
|
||||
|
||||
unlockNext() {
|
||||
unlockNext(switchTab) {
|
||||
if (InfinityDimension(8).isUnlocked) return;
|
||||
const next = InfinityDimensions.next();
|
||||
if (!Perk.bypassIDAntimatter.isBought && player.records.thisEternity.maxAM.lt(next.requirement)) return;
|
||||
next.isUnlocked = true;
|
||||
EventHub.dispatch(GAME_EVENT.INFINITY_DIMENSION_UNLOCKED, next.tier);
|
||||
if (switchTab) Tab.dimensions.infinity.show();
|
||||
},
|
||||
|
||||
next() {
|
||||
|
@ -439,17 +439,11 @@ export const Glyphs = {
|
||||
const betterCount = toCompare.countWhere(other => !hasSomeBetterEffects(glyph, other, comparedEffects));
|
||||
return betterCount >= compareThreshold;
|
||||
},
|
||||
autoClean(threshold = 5) {
|
||||
autoClean(threshold = 5, deleteGlyphs = true) {
|
||||
const isHarsh = threshold < 5;
|
||||
let toBeDeleted = 0;
|
||||
// If the player hasn't unlocked sacrifice yet, prevent them from removing any glyphs.
|
||||
if (!GlyphSacrificeHandler.canSacrifice) return;
|
||||
// If auto clean could remove useful glyphs, we warn them.
|
||||
if (isHarsh && player.options.confirmations.harshAutoClean &&
|
||||
// eslint-disable-next-line prefer-template
|
||||
!confirm("This could delete glyphs in your inventory that are good enough that you might want to use them " +
|
||||
"later. Are you sure you want to do this?")) {
|
||||
return;
|
||||
}
|
||||
if (!GlyphSacrificeHandler.canSacrifice) return toBeDeleted;
|
||||
// We look in backwards order so that later glyphs get cleaned up first
|
||||
for (let inventoryIndex = this.totalSlots - 1; inventoryIndex >= this.protectedSlots; --inventoryIndex) {
|
||||
const glyph = this.inventory[inventoryIndex];
|
||||
@ -460,10 +454,12 @@ export const Glyphs = {
|
||||
// If the threshold for better glyphs needed is zero, the glyph is definitely getting deleted
|
||||
// no matter what (well, unless it can't be gotten rid of in current glyph removal mode).
|
||||
if (threshold === 0 || this.isObjectivelyUseless(glyph, threshold)) {
|
||||
AutoGlyphProcessor.getRidOfGlyph(glyph);
|
||||
if (deleteGlyphs) AutoGlyphProcessor.getRidOfGlyph(glyph);
|
||||
toBeDeleted++;
|
||||
}
|
||||
}
|
||||
if (player.reality.autoCollapse) this.collapseEmptySlots();
|
||||
return toBeDeleted;
|
||||
},
|
||||
harshAutoClean() {
|
||||
this.autoClean(1);
|
||||
@ -471,13 +467,16 @@ export const Glyphs = {
|
||||
deleteAllUnprotected() {
|
||||
this.autoClean(0);
|
||||
},
|
||||
deleteAllRejected() {
|
||||
deleteAllRejected(deleteGlyphs = true) {
|
||||
let toBeDeleted = 0;
|
||||
for (const glyph of Glyphs.inventory) {
|
||||
if (glyph !== null && glyph.idx >= this.protectedSlots && !AutoGlyphProcessor.wouldKeep(glyph)) {
|
||||
AutoGlyphProcessor.getRidOfGlyph(glyph);
|
||||
if (deleteGlyphs) AutoGlyphProcessor.getRidOfGlyph(glyph);
|
||||
toBeDeleted++;
|
||||
}
|
||||
}
|
||||
if (player.reality.autoCollapse) this.collapseEmptySlots();
|
||||
return toBeDeleted;
|
||||
},
|
||||
collapseEmptySlots() {
|
||||
const unprotectedGlyphs = player.reality.glyphs.inventory
|
||||
|
@ -667,12 +667,17 @@ window.player = {
|
||||
resetReality: true,
|
||||
glyphReplace: true,
|
||||
glyphSacrifice: true,
|
||||
autoClean: true,
|
||||
glyphSelection: true,
|
||||
harshAutoClean: true,
|
||||
glyphUndo: true,
|
||||
resetCelestial: true,
|
||||
deleteGlyphSetSave: true,
|
||||
glyphRefine: true,
|
||||
bigCrunch: true,
|
||||
replicantiGalaxy: true,
|
||||
antimatterGalaxy: true,
|
||||
dimensionBoost: true
|
||||
},
|
||||
awayProgress: {
|
||||
antimatter: true,
|
||||
|
@ -279,6 +279,14 @@ function giveRealityRewards(realityProps) {
|
||||
}
|
||||
|
||||
if (Teresa.isRunning) {
|
||||
const current = Teresa.runRewardMultiplier;
|
||||
const newMultiplier = Teresa.rewardMultiplier(player.antimatter);
|
||||
const isHigher = newMultiplier > current;
|
||||
Modal.message.show(`You have completed Teresa's Reality! ${isHigher
|
||||
? `Since you gained more Antimatter, you increased your
|
||||
Glyph Sacrifice multiplier from ${format(current, 2, 2)} to ${format(newMultiplier, 2, 2)}`
|
||||
: `You did not gain more Antimatter during this run, so the Glyph Sacrifice multiplier
|
||||
from Teresa did not increase`}.`);
|
||||
if (Currency.antimatter.gt(player.celestials.teresa.bestRunAM)) {
|
||||
player.celestials.teresa.bestRunAM = Currency.antimatter.value;
|
||||
player.celestials.teresa.bestAMSet = Glyphs.copyForRecords(Glyphs.active.filter(g => g !== null));
|
||||
|
@ -24,19 +24,12 @@ function addReplicantiGalaxies(newGalaxies) {
|
||||
|
||||
export function replicantiGalaxy() {
|
||||
if (!Replicanti.galaxies.canBuyMore) return;
|
||||
const galaxyGain = Replicanti.galaxies.gain;
|
||||
if (galaxyGain < 1) return;
|
||||
player.replicanti.timer = 0;
|
||||
let galaxyGain = 1;
|
||||
if (Achievement(126).isUnlocked) {
|
||||
// Attempt to buy bulk if RG divides by e308 instead of resetting
|
||||
const maxGain = Replicanti.galaxies.max - player.replicanti.galaxies;
|
||||
const logReplicanti = Replicanti.amount.log10();
|
||||
galaxyGain = Math.min(maxGain, Math.floor(logReplicanti / LOG10_MAX_VALUE));
|
||||
// In the unlikely case of different rounding error between canBuyMore and the above
|
||||
if (galaxyGain < 1) return;
|
||||
Replicanti.amount = Decimal.pow10(logReplicanti - LOG10_MAX_VALUE * galaxyGain);
|
||||
} else {
|
||||
Replicanti.amount = DC.D1;
|
||||
}
|
||||
Replicanti.amount = Achievement(126).isUnlocked
|
||||
? Decimal.pow10(Replicanti.amount.log10() - LOG10_MAX_VALUE * galaxyGain)
|
||||
: DC.D1;
|
||||
addReplicantiGalaxies(galaxyGain);
|
||||
}
|
||||
|
||||
@ -464,5 +457,14 @@ export const Replicanti = {
|
||||
const buyer = Autobuyer.replicantiGalaxy;
|
||||
return (buyer.canTick && buyer.isEnabled) || this.isPlayerHoldingR;
|
||||
},
|
||||
},
|
||||
get gain() {
|
||||
if (!this.canBuyMore) return 0;
|
||||
if (Achievement(126).isUnlocked) {
|
||||
const maxGain = Replicanti.galaxies.max - player.replicanti.galaxies;
|
||||
const logReplicanti = Replicanti.amount.log10();
|
||||
return Math.min(maxGain, Math.floor(logReplicanti / LOG10_MAX_VALUE));
|
||||
}
|
||||
return 1;
|
||||
},
|
||||
}
|
||||
};
|
||||
|
@ -13,6 +13,7 @@ export class Sacrifice {
|
||||
}
|
||||
|
||||
static get disabledCondition() {
|
||||
if (NormalChallenge(10).isRunning) return "8th Dimensions are disabled";
|
||||
if (EternityChallenge(3).isRunning) return "Eternity Challenge 3";
|
||||
if (DimBoost.totalBoosts < 5) return `Requires ${formatInt(5)} Dimension Boosts`;
|
||||
if (AntimatterDimension(8).totalAmount.eq(0)) return "No 8th Antimatter Dimensions";
|
||||
|
Loading…
Reference in New Issue
Block a user