mirror of
https://github.com/IvarK/AntimatterDimensionsSourceCode.git
synced 2024-11-22 20:22:51 +00:00
Address PR comments, also fix #1912
This commit is contained in:
parent
a3e78f08fb
commit
b641b9303f
@ -7,19 +7,22 @@ Vue.component("dilation-time-study", {
|
||||
data() {
|
||||
return {
|
||||
showRequirement: false,
|
||||
currentTT: new Decimal(0),
|
||||
requirementTemplate: "",
|
||||
requirement: ""
|
||||
};
|
||||
},
|
||||
created() {
|
||||
if (this.id === 1) {
|
||||
this.requirement = `Requirement: ${formatInt(5)} EC11 and EC12 completions
|
||||
and ${formatInt(Currency.timeTheorems.max)}/${formatInt(13000)} total Time Theorems`;
|
||||
this.requirementTemplate = `Requirement: ${formatInt(5)} EC11 and EC12 completions
|
||||
and [currentTT]/${formatInt(13000)} total Time Theorems`;
|
||||
}
|
||||
if (this.id === 6) {
|
||||
if (Perk.firstPerk.isBought) {
|
||||
this.requirement = `Requirement: ${format("1e4000")} Eternity Points`;
|
||||
this.requirementTemplate = `Requirement: ${format("1e4000")} Eternity Points`;
|
||||
} else {
|
||||
this.requirement = `Requirement: ${format("1e4000")} Eternity Points and ${formatInt(13)} rows of Achievements`;
|
||||
this.requirementTemplate = `Requirement: ${format("1e4000")} Eternity Points and
|
||||
${formatInt(13)} rows of Achievements`;
|
||||
}
|
||||
this.showRequirement = true;
|
||||
}
|
||||
@ -38,12 +41,14 @@ Vue.component("dilation-time-study", {
|
||||
if (id === 1) {
|
||||
this.showRequirement = !this.study.isBought && !Perk.bypassECDilation.isBought;
|
||||
}
|
||||
this.currentTT.copyFrom(Currency.timeTheorems.max);
|
||||
this.requirement = this.requirementTemplate.replace("[currentTT]", formatInt(this.currentTT));
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<time-study :setup="setup">
|
||||
<description-display :config="study.config" />
|
||||
<template v-if="showRequirement">
|
||||
<template v-if="showRequirement" :key="currentTT">
|
||||
<br>
|
||||
<span>{{ requirement }}</span>
|
||||
</template>
|
||||
|
@ -35,7 +35,7 @@ Vue.component("normal-time-study", {
|
||||
// of all current studies for every study, and even then it looks odd in practice because then a few studies
|
||||
// appear more expensive simply due to buy order.
|
||||
this.showSTCost = V.has(V_UNLOCKS.V_ACHIEVEMENT_UNLOCK) && !TimeStudy(this.study.id).isBought &&
|
||||
this.study.config.requiresST !== undefined && this.study.config.requiresST();
|
||||
TimeStudy(this.study.id).costsST();
|
||||
},
|
||||
},
|
||||
template: `
|
||||
|
@ -47,7 +47,7 @@ Vue.component("modal-away-progress", {
|
||||
},
|
||||
isBlackHole() {
|
||||
// If its a Black Hole we need different formatting, so find that
|
||||
return this.name.includes("Black Hole");
|
||||
return this.item.name.includes("BlackHole");
|
||||
},
|
||||
formatBlackHoleActivations() {
|
||||
const activations = this.after - this.before;
|
||||
|
@ -45,12 +45,15 @@ Vue.component("modal-progress-bar", {
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<primary-button v-for="button in buttons" v-if="button.condition(progress.current, progress.max)"
|
||||
class="o-primary-btn--width-medium"
|
||||
:key="button.text"
|
||||
@click="button.click()">
|
||||
{{ button.text }}
|
||||
</primary-button>
|
||||
<div class="l-modal-progress-bar__buttons">
|
||||
<primary-button v-for="button in buttons" v-if="button.condition(progress.current, progress.max)"
|
||||
class="o-primary-btn--width-medium"
|
||||
:key="button.text"
|
||||
@click="button.click"
|
||||
>
|
||||
{{ button.text }}
|
||||
</primary-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>`,
|
||||
});
|
||||
|
@ -22,8 +22,9 @@ Vue.component("automator-tab", {
|
||||
const speedupText = `Each Reality makes it run ${formatPercents(0.006, 1)} faster, up to a maximum of
|
||||
${formatInt(1000)} per second.`;
|
||||
return this.interval === 1
|
||||
? `The Automator is running at max speed (${formatInt(1000)} commands per second).`
|
||||
: `The Automator is running ${format(1000 / this.interval, 2, 2)} commands per second. ${speedupText}`;
|
||||
? `The Automator is running at max speed (${formatInt(1000)} commands per real-time second).`
|
||||
: `The Automator is running ${format(1000 / this.interval, 2, 2)} commands per real-time second.
|
||||
${speedupText}`;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -91,7 +91,7 @@ Vue.component("past-runs-container", {
|
||||
>
|
||||
<span class="o-run-drop-down-icon" v-html="dropDown" />
|
||||
<span>
|
||||
<h3>Last {{ formatInt(10) }} {{ plural }}:</h3>
|
||||
<h3>Last {{ formatInt(10) }} {{ prestigeCount }}:</h3>
|
||||
</span>
|
||||
</div>
|
||||
<div v-show="shown">
|
||||
@ -118,15 +118,15 @@ Vue.component("past-runs-container", {
|
||||
<br>
|
||||
</div>
|
||||
<div v-if="!hasEmptyRecord">
|
||||
Last {{ formatInt(10) }} {{ plural }} average time: {{ runTime(averageRun) }}
|
||||
Last {{ formatInt(10) }} {{ prestigeCount }} average time: {{ runTime(averageRun) }}
|
||||
<span v-if="isRealityUnlocked">({{ realRunTime(averageRun) }} real time)</span>
|
||||
<br>
|
||||
Average {{ points }} gain: {{ averageRunGain(averageRun, 1, points) }}
|
||||
<br>
|
||||
Average {{ prestigeCount }} gain: {{ averageRunGain(averageRun, 2, prestigeCount) }}
|
||||
</div>
|
||||
<div v-else>
|
||||
You have no records for {{ plural }} yet.
|
||||
<div v-else style="height: 5.4rem;">
|
||||
You have no records for {{ prestigeCount }} yet.
|
||||
</div>
|
||||
</div>`
|
||||
});
|
||||
|
@ -177,7 +177,7 @@ Vue.component("statistics-tab", {
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
<div v-if="infinity.isUnlocked">
|
||||
<div v-if="infinity.isUnlocked" class="c-stats-tab-subheader">
|
||||
<div class="c-stats-tab-general c-stats-tab-infinity">Infinity</div>
|
||||
<div>
|
||||
You have {{ infinityCountString }}<span v-if="eternity.isUnlocked"> this Eternity</span>.
|
||||
@ -205,7 +205,7 @@ Vue.component("statistics-tab", {
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
<div v-if="eternity.isUnlocked">
|
||||
<div v-if="eternity.isUnlocked" class="c-stats-tab-subheader">
|
||||
<div class="c-stats-tab-general c-stats-tab-eternity">Eternity</div>
|
||||
<div>
|
||||
You have {{ eternityCountString }}<span v-if="reality.isUnlocked"> this Reality</span>.
|
||||
@ -215,6 +215,9 @@ Vue.component("statistics-tab", {
|
||||
{{ "Infinity" | pluralize(infinity.projectedBanked, "Infinities") }} on Eternity
|
||||
({{ formatDecimalAmount(infinity.bankRate) }} per minute).
|
||||
</div>
|
||||
<div v-else-if="infinity.banked.gt(0)">
|
||||
You will gain no Banked Infinities on Eternity.
|
||||
</div>
|
||||
<div v-if="eternity.hasBest">Your fastest Eternity was {{ eternity.best.toStringShort() }}.</div>
|
||||
<div v-else>You have no fastest Eternity<span v-if="reality.isUnlocked"> this Reality</span>.</div>
|
||||
<div>You have spent {{ eternity.this.toStringShort() }} in this Eternity.
|
||||
@ -229,7 +232,7 @@ Vue.component("statistics-tab", {
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
<div v-if="reality.isUnlocked">
|
||||
<div v-if="reality.isUnlocked" class="c-stats-tab-subheader">
|
||||
<div class="c-stats-tab-general c-stats-tab-reality">Reality</div>
|
||||
<div>You have {{ formatInt(reality.count) }} {{ "Reality" | pluralize(reality.count, "Realities") }}.</div>
|
||||
<div>Your fastest game-time Reality was {{ reality.best.toStringShort() }}.</div>
|
||||
|
@ -624,8 +624,8 @@ const RA_UNLOCKS = {
|
||||
INSTANT_AUTOEC: {
|
||||
id: 22,
|
||||
description: "Get V to level 2",
|
||||
reward: () => `Auto-Eternity Challenges happen instantly and Time Dilation is unlocked automatically
|
||||
at ${formatInt(17000)} Time Theorems`,
|
||||
reward: () => `Time Dilation is unlocked automatically for free at ${formatInt(13000)} Time Theorems outside of
|
||||
Celestial Realities and Auto-Eternity Challenges happen instantly`,
|
||||
pet: Ra.pets.v,
|
||||
level: 2,
|
||||
displayIcon: `<span class="fas fa-fast-forward"></span>`
|
||||
|
@ -174,7 +174,7 @@ GameDatabase.reality.perks = {
|
||||
id: 42,
|
||||
label: "UD1",
|
||||
family: PERK_FAMILY.DILATION,
|
||||
description: "After unlocking Dilation, automatically purchase the second row of Dilation Upgrades.",
|
||||
description: "After unlocking Dilation, automatically unlock the second row of Dilation Upgrades for free.",
|
||||
defaultPosition: {
|
||||
x: 165,
|
||||
y: 565
|
||||
@ -184,7 +184,7 @@ GameDatabase.reality.perks = {
|
||||
id: 43,
|
||||
label: "UD2",
|
||||
family: PERK_FAMILY.DILATION,
|
||||
description: "After unlocking Dilation, automatically purchase the third row of Dilation Upgrades.",
|
||||
description: "After unlocking Dilation, automatically unlock the third row of Dilation Upgrades for free.",
|
||||
defaultPosition: {
|
||||
x: 310,
|
||||
y: 605
|
||||
|
@ -251,6 +251,10 @@ class NormalTimeStudyState extends TimeStudyState {
|
||||
return GameCache.timeStudies.value[this.id];
|
||||
}
|
||||
|
||||
costsST() {
|
||||
return this.config.requiresST && this.config.requiresST();
|
||||
}
|
||||
|
||||
checkRequirement() {
|
||||
const req = this.config.requirement;
|
||||
return typeof req === "number" ? TimeStudy(req).isBought : req();
|
||||
@ -259,8 +263,7 @@ class NormalTimeStudyState extends TimeStudyState {
|
||||
// This checks for and forbids buying studies due to being part of a set which can't normally be bought
|
||||
// together (eg. active/passive/idle and light/dark) unless the player has the requisite ST.
|
||||
checkSetRequirement() {
|
||||
if (!this.config.requiresST) return true;
|
||||
return this.config.requiresST() ? V.availableST >= this.STCost : true;
|
||||
return this.costsST() ? V.availableST >= this.STCost : true;
|
||||
}
|
||||
|
||||
get canBeBought() {
|
||||
@ -273,9 +276,7 @@ class NormalTimeStudyState extends TimeStudyState {
|
||||
|
||||
purchase() {
|
||||
if (this.isBought || !this.isAffordable || !this.canBeBought) return false;
|
||||
if (this.config.requiresST && this.config.requiresST()) {
|
||||
player.celestials.v.STSpent += this.STCost;
|
||||
}
|
||||
if (this.costsST()) player.celestials.v.STSpent += this.STCost;
|
||||
player.timestudy.studies.push(this.id);
|
||||
player.requirementChecks.reality.maxStudies = Math.clampMin(player.requirementChecks.reality.maxStudies,
|
||||
player.timestudy.studies.length);
|
||||
|
@ -586,8 +586,11 @@ function gameLoop(passDiff, options = {}) {
|
||||
|
||||
BlackHoles.updatePhases(blackHoleDiff);
|
||||
|
||||
// Code to auto-unlock dilation; 16617 is the cost for buying literally all time studies and unlocking dilation
|
||||
if (Ra.has(RA_UNLOCKS.INSTANT_AUTOEC) && Currency.timeTheorems.max.gte(16617)) {
|
||||
// Instant EC also unlocks dilation at a certain total TT count for free, but we add the cost first in order to make
|
||||
// sure that TT count doesn't go negative and that we can actually buy it. This technically bumps the max theorem
|
||||
// amount up as well, but at this point of the game 5k TT is insignificant to basically all other sources of TT.
|
||||
if (Ra.has(RA_UNLOCKS.INSTANT_AUTOEC) && Currency.timeTheorems.max.gte(13000) && !isInCelestialReality()) {
|
||||
Currency.timeTheorems.add(TimeStudy.dilation.cost);
|
||||
TimeStudy.dilation.purchase(true);
|
||||
}
|
||||
|
||||
|
@ -2545,6 +2545,10 @@ screen and (max-width: 480px) {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.c-stats-tab-subheader {
|
||||
height: 15rem;
|
||||
}
|
||||
|
||||
.c-stats-tab-infinity {
|
||||
color: var(--color-infinity);
|
||||
}
|
||||
@ -5547,6 +5551,14 @@ kbd {
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.l-modal-progress-bar__buttons {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 25rem;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.l-modal-progress-bar__bg {
|
||||
width: 20rem;
|
||||
margin-left: 1rem;
|
||||
|
Loading…
Reference in New Issue
Block a user