Address some issues with charge/pulse rework

This commit is contained in:
SpectralFlame 2023-01-16 13:21:20 -06:00 committed by cyip92
parent e94d49859b
commit 25fc54baab
5 changed files with 13 additions and 5 deletions

View File

@ -584,7 +584,6 @@ window.player = {
storedReal: 0,
autoStoreReal: false,
isAutoReleasing: false,
storedFraction: 1,
quoteBits: 0,
unlocks: [],
run: false,

View File

@ -186,8 +186,8 @@ GameDatabase.celestials.ra = {
},
autoPulseTime: {
id: 17,
reward: () => `Black Hole charging can be done at a ${formatPercents(0.99)} rate and automatically
pulsed every ${formatInt(5)} ticks. You can toggle this in The Nameless Ones' tab and the header.`,
reward: () => `Black Hole charging now only uses ${formatPercents(0.99)} of your game speed and you can
automatically discharge ${formatPercents(0.01)} of your stored game time every ${formatInt(5)} ticks.`,
pet: "enslaved",
level: 10,
displayIcon: `<span class="fas fa-expand-arrows-alt"></span>`,

View File

@ -83,7 +83,8 @@ GameDatabase.multiplierTabValues.gamespeed = {
},
chargingBH: {
name: "Black Hole Charging",
multValue: () => (Enslaved.isAutoReleasing ? 0.99 : 1),
// The 0 in multValue is irrelevant; if this upgrade isn't available, the subtab is hidden by 1x total effect
multValue: () => (Ra.unlocks.autoPulseTime.canBeApplied ? 0.01 : 0),
isActive: () => Enslaved.isStoringGameTime,
icon: MultiplierTabIcons.BLACK_HOLE,
},

View File

@ -157,6 +157,9 @@ GameStorage.migrations = {
GameStorage.migrations.moveTS33(player);
GameStorage.migrations.addBestPrestigeCurrency(player);
GameStorage.migrations.migrateTheme(player);
},
14: player => {
GameStorage.migrations.reworkBHPulsing(player);
}
},
@ -941,6 +944,11 @@ GameStorage.migrations = {
delete player.options.secretThemeKey;
},
// This change removed the ability to adjust stored time rate after Ra-Nameless 10, instead forcing it to be 99%
reworkBHPulsing(player) {
delete player.celestials.enslaved.storedFraction;
},
prePatch(saveData) {
// Initialize all possibly undefined properties that were not present in
// previous versions and which could be overwritten by deepmerge

View File

@ -349,7 +349,7 @@ export function getGameSpeedupFactor(effectsToConsider, blackHolesActiveOverride
}
if (Enslaved.isStoringGameTime && effects.includes(GAME_SPEED_EFFECT.TIME_STORAGE)) {
const storedTimeWeight = 0.99;
const storedTimeWeight = Ra.unlocks.autoPulseTime.canBeApplied ? 0.99 : 1;
factor = factor * (1 - storedTimeWeight) + storedTimeWeight;
}