Made last relic win the game

This commit is contained in:
thepaperpilot 2023-05-08 07:43:53 -05:00
parent 545b1c94d1
commit 003d304668
2 changed files with 13 additions and 12 deletions

View file

@ -37,11 +37,16 @@ import { VueFeature, render, renderRow, trackHover } from "util/vue";
import { ComputedRef, Ref, computed, ref, unref } from "vue";
import { useToast } from "vue-toastification";
import { createCollapsibleModifierSections, createFormulaPreview, estimateTime } from "./common";
import type { PortalState, ResourceState, Resources } from "./projEntry";
import {
import type {
BoosterState,
InfluenceState,
Influences,
PortalState,
ResourceState,
Resources
} from "./projEntry";
import {
hasWon,
influences as influenceTypes,
main,
mineLootTable,
@ -702,6 +707,10 @@ export function createPlane(
case "relic":
description = `Gain the ${tier}-tier planar relic (${relics[tier]})`;
onComplete = () => {
if (tier === "ultimatum") {
hasWon.value = true;
return;
}
if (!(`${tier}Relic` in main.toolNodes.value)) {
const node = {
id: getUniqueNodeID(main.board),

View file

@ -330,16 +330,10 @@ const passives = {
empowered ? "Repeatables/dimensions buy max at once" : "Repeatables buy max at once"
},
beryliumRelic: {
description: (empowered: boolean) =>
empowered
? "(Max tier plane finished)^2 boosts quarry speed"
: "Max tier plane finished boosts quarry speed"
},
unobtainiumRelic: {
description: (empowered: boolean) =>
empowered ? "ln(energy) boosts planar speed" : "log(energy) boosts planar speed"
},
ultimatumRelic: {
unobtainiumRelic: {
description: (empowered: boolean) =>
empowered
? "Upgrades/repeatables/dimensions/prestige no longer spend on purchase"
@ -2275,9 +2269,7 @@ export const getInitialLayers = (
/**
* A computed ref whose value is true whenever the game is over.
*/
export const hasWon = computed(() => {
return false;
});
export const hasWon = ref(false);
/**
* Given a player save data object being loaded with a different version, update the save data object to match the structure of the current version.