2021-06-14 03:16:38 +00:00
|
|
|
import { hasUpgrade, upgradeEffect } from '../util/features';
|
2021-05-26 01:57:02 +00:00
|
|
|
import { layers } from '../store/layers';
|
|
|
|
import { player } from '../store/proxies';
|
|
|
|
import Decimal from '../util/bignum';
|
|
|
|
import modInfo from './modInfo';
|
2021-05-22 20:29:06 +00:00
|
|
|
|
2021-05-26 01:57:02 +00:00
|
|
|
// Import initial layers
|
2021-06-12 04:38:16 +00:00
|
|
|
import f from './layers/aca/f.js';
|
|
|
|
import c from './layers/aca/c.js';
|
|
|
|
import a from './layers/aca/a.js';
|
|
|
|
const g = {
|
|
|
|
id: "g",
|
|
|
|
symbol: "TH",
|
|
|
|
branches: ["c"],
|
|
|
|
color: '#6d3678',
|
2021-06-16 04:07:32 +00:00
|
|
|
shown: true,
|
2021-06-12 04:38:16 +00:00
|
|
|
canClick() {return player.points.gte(10)},
|
|
|
|
tooltip: "Thanos your points",
|
|
|
|
onClick() {
|
|
|
|
player.points = player.points.div(2);
|
|
|
|
console.log(this.layer);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
const h = {
|
|
|
|
id: "h",
|
2021-06-16 04:07:32 +00:00
|
|
|
branches: ["g", () => ({ target: 'flatBoi', featureType: 'bar', endOffset: { x: -50 + 100 * layers.c.bars.flatBoi.progress.toNumber() } })],
|
2021-06-27 22:07:13 +00:00
|
|
|
tooltip() {return "Restore your points to {{ player.c.otherThingy }}"},
|
2021-06-12 04:38:16 +00:00
|
|
|
row: "side",
|
|
|
|
canClick() {return player.points.lt(player.c.otherThingy)},
|
|
|
|
onClick() {player.points = new Decimal(player.c.otherThingy)}
|
|
|
|
};
|
|
|
|
const spook = {
|
|
|
|
id: "spook",
|
|
|
|
row: 1,
|
|
|
|
layerShown: "ghost",
|
|
|
|
};
|
2021-05-26 01:57:02 +00:00
|
|
|
|
2021-06-12 04:38:16 +00:00
|
|
|
const main = {
|
|
|
|
id: 'main',
|
2021-06-14 14:04:08 +00:00
|
|
|
display: `<div v-frag>
|
|
|
|
<div v-if="player.devSpeed && player.devSpeed !== 1">Dev Speed: {{ format(player.devSpeed) }}x</div>
|
|
|
|
<div v-if="player.offTime != undefined">Offline Time: {{ formatTime(player.offTime.remain) }}</div>
|
|
|
|
<div>
|
|
|
|
<span v-if="player.points.lt('1e1000')">You have </span>
|
|
|
|
<h2>{{ format(player.points) }}</h2>
|
|
|
|
<span v-if="player.points.lt('1e1e6')"> points</span>
|
|
|
|
</div>
|
|
|
|
<div v-if="Decimal.gt($store.getters.pointGain, 0)">
|
|
|
|
({{ player.oompsMag != 0 ? format(player.oomps) + " OOM" + (player.oompsMag < 0 ? "^OOM" : player.oompsMag > 1 ? "^" + player.oompsMag : "") + "s" : formatSmall($store.getters.pointGain) }}/sec)
|
|
|
|
</div>
|
2021-06-16 04:07:32 +00:00
|
|
|
<spacer />
|
2021-06-14 14:04:08 +00:00
|
|
|
<tree :append="true" />
|
|
|
|
</div>`,
|
2021-06-13 08:56:42 +00:00
|
|
|
name: "Tree"
|
2021-06-14 14:04:08 +00:00
|
|
|
};
|
2021-06-12 04:38:16 +00:00
|
|
|
|
2021-06-21 04:29:55 +00:00
|
|
|
export const getInitialLayers = () => [ main, f, c, a, g, h, spook ];
|
2021-05-26 01:57:02 +00:00
|
|
|
|
|
|
|
export function getStartingData() {
|
|
|
|
return {
|
|
|
|
points: new Decimal(10),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-14 03:16:38 +00:00
|
|
|
export const getters = {
|
|
|
|
hasWon() {
|
2021-06-14 14:04:08 +00:00
|
|
|
return false;
|
2021-06-14 03:16:38 +00:00
|
|
|
},
|
|
|
|
pointGain() {
|
|
|
|
if(!hasUpgrade("c", 11))
|
|
|
|
return new Decimal(0);
|
|
|
|
let gain = new Decimal(1)
|
|
|
|
if (hasUpgrade("c", 12)) gain = gain.times(upgradeEffect("c", 12))
|
|
|
|
return gain;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/* eslint-disable-next-line no-unused-vars */
|
|
|
|
export function update(delta) {
|
2021-05-26 01:57:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* eslint-disable-next-line no-unused-vars */
|
2021-06-21 04:29:55 +00:00
|
|
|
export function fixOldSave(oldVersion, playerData) {
|
2021-05-26 01:57:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
document.title = modInfo.title;
|