mirror of
https://github.com/thepaperpilot/Planar-Pioneers.git
synced 2024-11-24 17:31:47 +00:00
Implemented silver relic
This commit is contained in:
parent
702e9fa912
commit
45c0c5e40d
3 changed files with 36 additions and 4 deletions
|
@ -293,7 +293,9 @@ export const passives = {
|
|||
},
|
||||
silverRelic: {
|
||||
description: (empowered: boolean) =>
|
||||
empowered ? "(Power machines)^2 boost ore dropped" : "Power machines boost ore dropped"
|
||||
empowered
|
||||
? "(Powered machines)^2 boost quarry speed"
|
||||
: "Powered machines boost quarry speed"
|
||||
},
|
||||
goldRelic: {
|
||||
description: (empowered: boolean) =>
|
||||
|
@ -307,7 +309,7 @@ export const passives = {
|
|||
},
|
||||
platinumRelic: {
|
||||
description: (empowered: boolean) =>
|
||||
empowered ? "Triple dimensions' tick rate" : "Double dimensions' tick rate"
|
||||
empowered ? "Quadruple dimensions' tick rate" : "Double dimensions' tick rate"
|
||||
},
|
||||
diamondRelic: {
|
||||
description: (empowered: boolean) =>
|
||||
|
|
|
@ -47,6 +47,7 @@ import {
|
|||
influences,
|
||||
passives,
|
||||
relics,
|
||||
resourceNames,
|
||||
tools
|
||||
} from "./data";
|
||||
import { GenericPlane, createPlane } from "./planes";
|
||||
|
@ -213,10 +214,32 @@ export const factory = {
|
|||
draggable: true
|
||||
} as NodeTypeOptions;
|
||||
|
||||
const romanNumerals = [
|
||||
"I",
|
||||
"II",
|
||||
"III",
|
||||
"IV",
|
||||
"V",
|
||||
"VI",
|
||||
"VII",
|
||||
"VIII",
|
||||
"IX",
|
||||
"X",
|
||||
"XI",
|
||||
"XII",
|
||||
"XIII",
|
||||
"XIV",
|
||||
"XV",
|
||||
"XVI"
|
||||
];
|
||||
export const resource = {
|
||||
shape: Shape.Circle,
|
||||
size: 50,
|
||||
title: node => camelToTitle((node.state as unknown as ResourceState).type),
|
||||
title: node =>
|
||||
camelToTitle((node.state as unknown as ResourceState).type) +
|
||||
" (" +
|
||||
romanNumerals[resourceNames.indexOf((node.state as unknown as ResourceState).type)] +
|
||||
")",
|
||||
subtitle: node => formatWhole((node.state as unknown as ResourceState).amount),
|
||||
progress: node => getResourceLevelProgress((node.state as unknown as ResourceState).type),
|
||||
// Make clicking resources a no-op so they can't be selected
|
||||
|
|
|
@ -222,10 +222,17 @@ export const main = createLayer("main", function (this: BaseLayer) {
|
|||
return 0;
|
||||
}
|
||||
const resources = (quarry.value.state as unknown as QuarryState).resources;
|
||||
return resources.reduce(
|
||||
let progress = resources.reduce(
|
||||
(acc, curr) => Decimal.div(100, dropRates[curr].computedModifier.value).add(acc),
|
||||
Decimal.dZero
|
||||
);
|
||||
if (toolNodes.value.silverRelic != null) {
|
||||
progress = Decimal.div(progress, Decimal.add(numPoweredMachines.value, 1));
|
||||
if (isEmpowered("silverRelic")) {
|
||||
progress = Decimal.div(progress, Decimal.add(numPoweredMachines.value, 1));
|
||||
}
|
||||
}
|
||||
return progress;
|
||||
});
|
||||
|
||||
const board = createBoard(board => ({
|
||||
|
|
Loading…
Reference in a new issue