Rename recollection, resize recollection container to fit

This commit is contained in:
Dys 2022-07-09 22:59:49 +08:00 committed by cyip92
parent 6fe84f3218
commit 177f24f97c
9 changed files with 108 additions and 104 deletions

View File

@ -125,7 +125,7 @@ class RaPetState extends GameMechanicState {
if (!this.canGetMemoryChunks) return 0;
let res = this.rawMemoryChunksPerSecond * this.chunkUpgradeCurrentMult *
Effects.product(Ra.unlocks.continuousTTBoost.effects.memoryChunks, GlyphSacrifice.reality);
if (this.hasRecollection) res *= Ra.recollection.multiplier;
if (this.hasRemembrance) res *= Ra.remembrance.multiplier;
return res;
}
@ -133,8 +133,8 @@ class RaPetState extends GameMechanicState {
return this.isUnlocked && Ra.isRunning;
}
get hasRecollection() {
return Ra.petWithRecollection === this.name;
get hasRemembrance() {
return Ra.petWithRemembrance === this.name;
}
get memoryUpgradeCurrentMult() {
@ -228,7 +228,7 @@ export const Ra = {
displayName: "Ra",
unlocks,
pets,
recollection: {
remembrance: {
multiplier: 3,
requiredLevels: 20,
get isUnlocked() {
@ -343,11 +343,11 @@ export const Ra = {
get canBuyTriad() {
return Ra.unlocks.unlockHardV.canBeApplied;
},
get petWithRecollection() {
return player.celestials.ra.petWithRecollection;
get petWithRemembrance() {
return player.celestials.ra.petWithRemembrance;
},
set petWithRecollection(name) {
player.celestials.ra.petWithRecollection = name;
set petWithRemembrance(name) {
player.celestials.ra.petWithRemembrance = name;
},
updateAlchemyFlow(realityRealTime) {
const perSecond = 1000 / realityRealTime;

View File

@ -643,7 +643,7 @@ window.player = {
charged: new Set(),
disCharge: false,
peakGamespeed: 1,
petWithRecollection: ""
petWithRemembrance: ""
},
laitela: {
darkMatter: DC.D0,

View File

@ -85,13 +85,13 @@ GameDatabase.celestials.quotes.ra = {
"I can remember the achievements.",
]
},
recollection: {
remembrance: {
id: 10,
requirement: () => Ra.recollection.isUnlocked,
requirement: () => Ra.remembrance.isUnlocked,
lines: [
"I remembered something!",
"Watch this!",
"Recollection!",
"Remembrance!",
"I can focus even harder on remembering them now!",
]
},

View File

@ -1280,7 +1280,7 @@ Each previous Celestial within Ra gains levels by using memories, which are gene
Memory Chunks. Memory Chunks can only be gained by entering Ra's Reality, but inside of the Reality Chunks will
be generated passively based on certain resource totals. If you are storing real time, you will not gain any
Chunks inside of Ra's Reality, but Memories will still be generated normally. Having a total of
${formatInt(Ra.recollection.requiredLevels)} levels across all Celestials unlocks Recollection,
${formatInt(Ra.remembrance.requiredLevels)} levels across all Celestials unlocks Remembrance,
which allows you to choose a particular Celestial to gain more chunks while inside of Ra's Reality.
<br>
<br>

View File

@ -1414,6 +1414,10 @@ GameStorage.devMigrations = {
delete player.auto[x];
player.auto[x] = { all, isActive: true };
}
},
player => {
player.celestials.ra.petWithRemembrance = player.celestials.ra.petWithRecollection;
delete player.celestials.ra.petWithRecollection;
}
],

View File

@ -7231,7 +7231,7 @@ kbd {
.c-ra-run-button {
display: flex;
flex-direction: column;
width: 30rem;
width: 31rem;
height: 33rem;
justify-content: center;
align-items: center;
@ -7306,11 +7306,11 @@ kbd {
margin: 0 1rem;
}
.c-ra-recollection-unlock {
.c-ra-remembrance-unlock {
display: flex;
flex-direction: column;
width: 30rem;
height: 25rem;
width: 31rem;
height: 33rem;
justify-content: center;
align-items: center;
color: white;
@ -7320,20 +7320,20 @@ kbd {
padding: 1rem;
}
.s-base--metro .c-ra-recollection-unlock {
.s-base--metro .c-ra-remembrance-unlock {
border: 0.1rem solid black;
}
.c-ra-recollection-unlock-inner {
.c-ra-remembrance-unlock-inner {
display: flex;
flex-wrap: wrap;
justify-content: center;
margin-top: 1rem;
}
.c-ra-pet-recollection-button {
width: 10rem;
height: 6rem;
.c-ra-pet-remembrance-button {
width: 12rem;
height: 6.5rem;
text-align: center;
font-family: Typewriter;
font-size: 1.2rem;
@ -7344,7 +7344,7 @@ kbd {
user-select: none;
}
.s-base--metro .c-ra-pet-recollection-button {
.s-base--metro .c-ra-pet-remembrance-button {
border-color: black;
}

View File

@ -0,0 +1,57 @@
<script>
export default {
name: "RaPetRemembranceButton",
props: {
petConfig: {
type: Object,
required: true
}
},
data() {
return {
isUnlocked: false,
name: "",
hasRemembrance: false,
};
},
computed: {
petStyle() {
return {
backgroundColor: this.hasRemembrance ? this.petConfig.pet.color : "#555",
cursor: this.hasRemembrance ? "" : "pointer",
"pointer-events": this.hasRemembrance ? "none" : "",
"box-shadow": this.hasRemembrance ? "0.1rem 0.1rem 0.1rem rgba(0, 0, 0, 0.7)" : "",
"border-color": this.hasRemembrance ? "black" : ""
};
}
},
methods: {
update() {
const pet = this.petConfig.pet;
this.isUnlocked = pet.isUnlocked;
if (!this.isUnlocked) return;
this.name = pet.name;
this.hasRemembrance = pet.hasRemembrance;
},
turnOnRemembrance() {
Ra.petWithRemembrance = this.petConfig.pet.name;
}
},
};
</script>
<template>
<button
v-if="isUnlocked"
class="c-ra-pet-remembrance-button"
:style="petStyle"
@click="turnOnRemembrance"
>
<span v-if="hasRemembrance">
Remembrance given to {{ name }}
</span>
<span v-else>
Concentrate on {{ name }}
</span>
</button>
</template>

View File

@ -1,57 +0,0 @@
<script>
export default {
name: "RaPetRecollectionButton",
props: {
petConfig: {
type: Object,
required: true
}
},
data() {
return {
isUnlocked: false,
name: "",
hasRecollection: false,
};
},
computed: {
petStyle() {
return {
backgroundColor: this.hasRecollection ? this.petConfig.pet.color : "#555",
cursor: this.hasRecollection ? "" : "pointer",
"pointer-events": this.hasRecollection ? "none" : "",
"box-shadow": this.hasRecollection ? "0.1rem 0.1rem 0.1rem rgba(0, 0, 0, 0.7)" : "",
"border-color": this.hasRecollection ? "black" : ""
};
}
},
methods: {
update() {
const pet = this.petConfig.pet;
this.isUnlocked = pet.isUnlocked;
if (!this.isUnlocked) return;
this.name = pet.name;
this.hasRecollection = pet.hasRecollection;
},
turnOnRecollection() {
Ra.petWithRecollection = this.petConfig.pet.name;
}
},
};
</script>
<template>
<button
v-if="isUnlocked"
class="c-ra-pet-recollection-button"
:style="petStyle"
@click="turnOnRecollection"
>
<span v-if="hasRecollection">
Recollection given to {{ name }}
</span>
<span v-else>
Give Recollection to {{ name }}
</span>
</button>
</template>

View File

@ -1,13 +1,13 @@
<script>
import CelestialQuoteHistory from "@/components/CelestialQuoteHistory";
import RaPet from "./RaPet";
import RaPetRecollectionButton from "./RaPetRecollectionButton";
import RaPetRemembranceButton from "./RaPetRemembranceButton";
export default {
name: "RaTab",
components: {
RaPet,
RaPetRecollectionButton,
RaPetRemembranceButton,
CelestialQuoteHistory
},
data() {
@ -16,11 +16,11 @@ export default {
showReality: false,
isRaCapped: false,
totalLevels: 0,
showRecollection: false,
hasRecollection: false,
recollectionReq: 0,
recollectionMult: 1,
petWithRecollection: "",
showRemembrance: false,
hasRemembrance: false,
remembranceReq: 0,
remembranceMult: 1,
petWithRemembrance: "",
isRunning: false,
memoryBoosts: "",
};
@ -59,9 +59,9 @@ export default {
],
petStyle() {
return {
color: (this.petWithRecollection === "")
color: (this.petWithRemembrance === "")
? "white"
: this.pets.find(pet => pet.pet.name === this.petWithRecollection).pet.color,
: this.pets.find(pet => pet.pet.name === this.petWithRemembrance).pet.color,
};
},
runButtonClassObject() {
@ -81,11 +81,11 @@ export default {
this.memoriesPerChunk = Ra.productionPerMemoryChunk;
this.isRaCapped = Ra.totalPetLevel === 100;
this.totalLevels = Ra.totalPetLevel;
this.showRecollection = Ra.unlocks.effarigUnlock.canBeApplied;
this.hasRecollection = Ra.recollection.isUnlocked;
this.recollectionReq = Ra.recollection.requiredLevels;
this.recollectionMult = Ra.recollection.multiplier;
this.petWithRecollection = Ra.petWithRecollection;
this.showRemembrance = Ra.unlocks.effarigUnlock.canBeApplied;
this.hasRemembrance = Ra.remembrance.isUnlocked;
this.remembranceReq = Ra.remembrance.requiredLevels;
this.remembranceMult = Ra.remembrance.multiplier;
this.petWithRemembrance = Ra.petWithRemembrance;
this.isRunning = Ra.isRunning;
this.memoryBoosts = Ra.memoryBoostResources;
},
@ -150,20 +150,20 @@ export default {
</span>
</button>
<div
v-if="showRecollection && !isRaCapped"
class="c-ra-recollection-unlock"
v-if="showRemembrance && !isRaCapped"
class="c-ra-remembrance-unlock"
>
<h1 :style="petStyle">
Recollection
Remembrance
</h1>
<span :style="petStyle">
Whichever Celestial has Recollection will get {{ formatX(recollectionMult) }} Memory Chunk gain.
Whichever Celestial has Remembrance will get {{ formatX(remembranceMult) }} Memory Chunk gain.
</span>
<div
v-if="hasRecollection"
class="c-ra-recollection-unlock-inner"
v-if="hasRemembrance"
class="c-ra-remembrance-unlock-inner"
>
<RaPetRecollectionButton
<RaPetRemembranceButton
v-for="(pet, i) in pets"
:key="i"
:pet-config="pet"
@ -171,10 +171,10 @@ export default {
</div>
<div
v-else
class="c-ra-recollection-unlock-inner"
class="c-ra-remembrance-unlock-inner"
>
Unlocked by getting {{ formatInt(recollectionReq) }} total Celestial Memory levels
(you need {{ formatInt(recollectionReq - totalLevels) }} more)
Unlocked by getting {{ formatInt(remembranceReq) }} total Celestial Memory levels
(you need {{ formatInt(remembranceReq - totalLevels) }} more)
</div>
</div>
</div>