mirror of
https://github.com/thepaperpilot/Planar-Pioneers.git
synced 2024-11-22 00:21:31 +00:00
Implement emerald relic
This commit is contained in:
parent
563fcd7e59
commit
0aef78024d
4 changed files with 27 additions and 15 deletions
|
@ -266,8 +266,8 @@ export const passives = {
|
|||
gravelRelic: {
|
||||
description: (empowered: boolean) =>
|
||||
empowered
|
||||
? "+2% plane's resource gain per repeatable purchase"
|
||||
: "+1% plane's resource gain per repeatable purchase"
|
||||
? "+2% plane's resource gain per repeatable purchase (diminishing)"
|
||||
: "+1% plane's resource gain per repeatable purchase (diminishing)"
|
||||
},
|
||||
woodRelic: {
|
||||
description: (empowered: boolean) =>
|
||||
|
@ -304,8 +304,8 @@ export const passives = {
|
|||
emeraldRelic: {
|
||||
description: (empowered: boolean) =>
|
||||
empowered
|
||||
? "Creating portals costs a third the energy"
|
||||
: "Creating portals costs half the energy"
|
||||
? "Creating portals costs 20x less energy"
|
||||
: "Creating portals costs 10x less energy"
|
||||
},
|
||||
platinumRelic: {
|
||||
description: (empowered: boolean) =>
|
||||
|
|
|
@ -399,7 +399,7 @@ export const empowerer = {
|
|||
actionDistance: Math.PI / 4,
|
||||
actions: [
|
||||
deselectAllAction,
|
||||
getIncreaseConnectionsAction(x => x.add(3).pow_base(1000), 16),
|
||||
getIncreaseConnectionsAction(x => x.add(3).pow_base(1000), 24),
|
||||
togglePoweredAction
|
||||
],
|
||||
canAccept: canAcceptTool,
|
||||
|
|
|
@ -1078,9 +1078,12 @@ export function createPlane(
|
|||
})),
|
||||
createMultiplicativeModifier(() => ({
|
||||
multiplier: () =>
|
||||
((isEmpowered("diamond") ? 2 : 1) *
|
||||
upgrades.filter(u => u.bought.value).length) /
|
||||
10,
|
||||
Decimal.add(
|
||||
1,
|
||||
((isEmpowered("diamond") ? 2 : 1) *
|
||||
upgrades.filter(u => u.bought.value).length) /
|
||||
10
|
||||
),
|
||||
description: () =>
|
||||
(isEmpowered("diamond") ? "Empowered " : "") + tools.diamond.name,
|
||||
enabled: () => main.toolNodes.value.diamond != null
|
||||
|
@ -1104,7 +1107,8 @@ export function createPlane(
|
|||
100
|
||||
)
|
||||
.times(isEmpowered("gravelRelic") ? 2 : 1)
|
||||
.add(1),
|
||||
.add(1)
|
||||
.pow(0.75),
|
||||
description: () => (isEmpowered("gravelRelic") ? "Empowered " : "") + relics.gravel,
|
||||
enabled: () => main.toolNodes.value.gravelRelic != null
|
||||
}))
|
||||
|
|
|
@ -634,18 +634,25 @@ export const main = createLayer("main", function (this: BaseLayer) {
|
|||
);
|
||||
return Decimal.add(n, 1).times(n).div(2).add(9).pow10();
|
||||
});
|
||||
const portalCostModifier = createSequentialModifier(() =>
|
||||
(Object.keys(influences) as Influences[]).map(influence =>
|
||||
const portalCostModifier = createSequentialModifier(() => [
|
||||
...(Object.keys(influences) as Influences[]).map(influence =>
|
||||
createMultiplicativeModifier(() => ({
|
||||
multiplier: influences[influence].cost,
|
||||
description: influences[influence].display,
|
||||
enabled: () =>
|
||||
(
|
||||
portalGenerator.value?.state as unknown as PortalGeneratorState | undefined
|
||||
)?.influences.includes(influence) ?? false
|
||||
)?.influences.includes(influence) ?? false,
|
||||
smallerIsBetter: true
|
||||
}))
|
||||
)
|
||||
);
|
||||
),
|
||||
createMultiplicativeModifier(() => ({
|
||||
multiplier: () => (isEmpowered("emeraldRelic") ? 0.05 : 0.1),
|
||||
description: () => (isEmpowered("emeraldRelic") ? "Empowered " : "") + relics.emerald,
|
||||
enabled: () => toolNodes.value.emeraldRelic != null,
|
||||
smallerIsBetter: true
|
||||
}))
|
||||
]);
|
||||
const computedPortalCost = computed(() => portalCostModifier.apply(basePortalCost.value));
|
||||
|
||||
const [energyTab, energyTabCollapsed] = createCollapsibleModifierSections(() => [
|
||||
|
@ -670,7 +677,8 @@ export const main = createLayer("main", function (this: BaseLayer) {
|
|||
(portalGenerator.value?.state as unknown as PortalGeneratorState | undefined)
|
||||
?.tier ?? "dirt"
|
||||
)}-tier Base Cost`,
|
||||
visible: () => portalGenerator.value != null
|
||||
visible: () => portalGenerator.value != null,
|
||||
smallerIsBetter: true
|
||||
},
|
||||
{
|
||||
title: "Bonus Connections",
|
||||
|
|
Loading…
Reference in a new issue