Fixed linting issues
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
import GetCPSBuffMult from '../../Cache/CPS/GetCPSBuffMult';
|
||||
import { CacheCentEgg } from '../../Cache/VariablesAndData';
|
||||
import {
|
||||
CenturyDateAtBeginLoop,
|
||||
CycliusDateAtBeginLoop,
|
||||
} from '../../Main/VariablesAndData';
|
||||
import { CenturyDateAtBeginLoop, CycliusDateAtBeginLoop } from '../../Main/VariablesAndData';
|
||||
import SimAuraMult from '../ReplacedGameFunctions/SimAuraMult';
|
||||
import SimEff from '../ReplacedGameFunctions/SimEff';
|
||||
import SimGetHeavenlyMultiplier from '../ReplacedGameFunctions/SimGetHeavenlyMultiplier';
|
||||
@@ -44,16 +41,11 @@ export default function CalculateGains() {
|
||||
SimEffs = effs; // eslint-disable-line no-unused-vars
|
||||
|
||||
if (Game.ascensionMode !== 1)
|
||||
mult +=
|
||||
parseFloat(SimPrestige) *
|
||||
0.01 *
|
||||
SimHeavenlyPower *
|
||||
SimGetHeavenlyMultiplier();
|
||||
mult += parseFloat(SimPrestige) * 0.01 * SimHeavenlyPower * SimGetHeavenlyMultiplier();
|
||||
|
||||
mult *= SimEff('cps');
|
||||
|
||||
if (SimHas('Heralds') && Game.ascensionMode !== 1)
|
||||
mult *= 1 + 0.01 * Game.heralds;
|
||||
if (SimHas('Heralds') && Game.ascensionMode !== 1) mult *= 1 + 0.01 * Game.heralds;
|
||||
|
||||
Object.keys(Game.cookieUpgrades).forEach((i) => {
|
||||
const me = Game.cookieUpgrades[i];
|
||||
@@ -94,26 +86,11 @@ export default function CalculateGains() {
|
||||
|
||||
godLvl = SimHasGod('ages');
|
||||
if (godLvl === 1)
|
||||
mult *=
|
||||
1 +
|
||||
0.15 *
|
||||
Math.sin(
|
||||
(CycliusDateAtBeginLoop / 1000 / (60 * 60 * 3)) * Math.PI * 2,
|
||||
);
|
||||
mult *= 1 + 0.15 * Math.sin((CycliusDateAtBeginLoop / 1000 / (60 * 60 * 3)) * Math.PI * 2);
|
||||
else if (godLvl === 2)
|
||||
mult *=
|
||||
1 +
|
||||
0.15 *
|
||||
Math.sin(
|
||||
(CycliusDateAtBeginLoop / 1000 / (60 * 60 * 12)) * Math.PI * 2,
|
||||
);
|
||||
mult *= 1 + 0.15 * Math.sin((CycliusDateAtBeginLoop / 1000 / (60 * 60 * 12)) * Math.PI * 2);
|
||||
else if (godLvl === 3)
|
||||
mult *=
|
||||
1 +
|
||||
0.15 *
|
||||
Math.sin(
|
||||
(CycliusDateAtBeginLoop / 1000 / (60 * 60 * 24)) * Math.PI * 2,
|
||||
);
|
||||
mult *= 1 + 0.15 * Math.sin((CycliusDateAtBeginLoop / 1000 / (60 * 60 * 24)) * Math.PI * 2);
|
||||
|
||||
godLvl = SimHasGod('decadence');
|
||||
if (godLvl === 1) buildMult *= 0.93;
|
||||
@@ -151,35 +128,25 @@ export default function CalculateGains() {
|
||||
if (SimHas('Kitten helpers')) catMult *= 1 + milkProgress * 0.1 * milkMult;
|
||||
if (SimHas('Kitten workers')) catMult *= 1 + milkProgress * 0.125 * milkMult;
|
||||
if (SimHas('Kitten engineers')) catMult *= 1 + milkProgress * 0.15 * milkMult;
|
||||
if (SimHas('Kitten overseers'))
|
||||
catMult *= 1 + milkProgress * 0.175 * milkMult;
|
||||
if (SimHas('Kitten overseers')) catMult *= 1 + milkProgress * 0.175 * milkMult;
|
||||
if (SimHas('Kitten managers')) catMult *= 1 + milkProgress * 0.2 * milkMult;
|
||||
if (SimHas('Kitten accountants'))
|
||||
catMult *= 1 + milkProgress * 0.2 * milkMult;
|
||||
if (SimHas('Kitten specialists'))
|
||||
catMult *= 1 + milkProgress * 0.2 * milkMult;
|
||||
if (SimHas('Kitten accountants')) catMult *= 1 + milkProgress * 0.2 * milkMult;
|
||||
if (SimHas('Kitten specialists')) catMult *= 1 + milkProgress * 0.2 * milkMult;
|
||||
if (SimHas('Kitten experts')) catMult *= 1 + milkProgress * 0.2 * milkMult;
|
||||
if (SimHas('Kitten consultants'))
|
||||
catMult *= 1 + milkProgress * 0.2 * milkMult;
|
||||
if (SimHas('Kitten consultants')) catMult *= 1 + milkProgress * 0.2 * milkMult;
|
||||
if (SimHas('Kitten assistants to the regional manager'))
|
||||
catMult *= 1 + milkProgress * 0.175 * milkMult;
|
||||
if (SimHas('Kitten marketeers'))
|
||||
catMult *= 1 + milkProgress * 0.15 * milkMult;
|
||||
if (SimHas('Kitten marketeers')) catMult *= 1 + milkProgress * 0.15 * milkMult;
|
||||
if (SimHas('Kitten analysts')) catMult *= 1 + milkProgress * 0.125 * milkMult;
|
||||
if (SimHas('Kitten executives'))
|
||||
catMult *= 1 + milkProgress * 0.115 * milkMult;
|
||||
if (SimHas('Kitten executives')) catMult *= 1 + milkProgress * 0.115 * milkMult;
|
||||
if (SimHas('Kitten angels')) catMult *= 1 + milkProgress * 0.1 * milkMult;
|
||||
if (SimHas('Fortune #103')) catMult *= 1 + milkProgress * 0.05 * milkMult;
|
||||
|
||||
Object.keys(SimObjects).forEach((i) => {
|
||||
const me = SimObjects[i];
|
||||
let storedCps = me.cps(me);
|
||||
if (Game.ascensionMode !== 1)
|
||||
storedCps *= (1 + me.level * 0.01) * buildMult;
|
||||
if (
|
||||
me.name === 'Grandma' &&
|
||||
SimHas('Milkhelp® lactose intolerance relief tablets')
|
||||
)
|
||||
if (Game.ascensionMode !== 1) storedCps *= (1 + me.level * 0.01) * buildMult;
|
||||
if (me.name === 'Grandma' && SimHas('Milkhelp® lactose intolerance relief tablets'))
|
||||
storedCps *= 1 + 0.05 * milkProgress * milkMult;
|
||||
SimCookiesPs += me.amount * storedCps;
|
||||
});
|
||||
@@ -204,10 +171,7 @@ export default function CalculateGains() {
|
||||
if (SimHas('Century egg')) {
|
||||
// The boost increases a little every day, with diminishing returns up to +10% on the 100th day
|
||||
let day =
|
||||
(Math.floor((CenturyDateAtBeginLoop - Game.startDate) / 1000 / 10) * 10) /
|
||||
60 /
|
||||
60 /
|
||||
24;
|
||||
(Math.floor((CenturyDateAtBeginLoop - Game.startDate) / 1000 / 10) * 10) / 60 / 60 / 24;
|
||||
day = Math.min(day, 100);
|
||||
// Sets a Cache value to be displayed in the Stats page, could be moved...
|
||||
CacheCentEgg = 1 + (1 - (1 - day / 100) ** 3) * 0.1;
|
||||
@@ -222,8 +186,7 @@ export default function CalculateGains() {
|
||||
|
||||
const rawCookiesPs = SimCookiesPs * mult;
|
||||
Object.keys(Game.CpsAchievements).forEach((i) => {
|
||||
if (rawCookiesPs >= Game.CpsAchievements[i].threshold)
|
||||
SimWin(Game.CpsAchievements[i].name);
|
||||
if (rawCookiesPs >= Game.CpsAchievements[i].threshold) SimWin(Game.CpsAchievements[i].name);
|
||||
});
|
||||
|
||||
SimCookiesPsRaw = rawCookiesPs; // eslint-disable-line no-unused-vars
|
||||
|
||||
@@ -32,11 +32,7 @@ export default function CheckOtherAchiev() {
|
||||
mathematician = 0;
|
||||
}
|
||||
if (!SimHasAchiev('Base 10')) {
|
||||
if (
|
||||
SimObjects[i].amount <
|
||||
(Game.ObjectsById.length - Game.Objects[i].id) * 10
|
||||
)
|
||||
base10 = 0;
|
||||
if (SimObjects[i].amount < (Game.ObjectsById.length - Game.Objects[i].id) * 10) base10 = 0;
|
||||
}
|
||||
});
|
||||
if (minAmount >= 1) SimWin('One with everything');
|
||||
@@ -69,11 +65,9 @@ export default function CheckOtherAchiev() {
|
||||
if (SimUpgradesOwned >= 400) SimWin("When there's nothing left to add");
|
||||
|
||||
if (buildingsOwned >= 4000 && SimUpgradesOwned >= 300) SimWin('Polymath');
|
||||
if (buildingsOwned >= 8000 && SimUpgradesOwned >= 400)
|
||||
SimWin('Renaissance baker');
|
||||
if (buildingsOwned >= 8000 && SimUpgradesOwned >= 400) SimWin('Renaissance baker');
|
||||
|
||||
if (SimObjects.Cursor.amount + SimObjects.Grandma.amount >= 777)
|
||||
SimWin('The elder scrolls');
|
||||
if (SimObjects.Cursor.amount + SimObjects.Grandma.amount >= 777) SimWin('The elder scrolls');
|
||||
|
||||
let hasAllHalloCook = true;
|
||||
Object.keys(HalloCookies).forEach((i) => {
|
||||
|
||||
@@ -70,8 +70,7 @@ export default function InitialBuildingData(buildingName) {
|
||||
|
||||
let add = 0;
|
||||
if (SimHas('One mind')) add += SimObjects.Grandma.amount * 0.02;
|
||||
if (SimHas('Communal brainsweep'))
|
||||
add += SimObjects.Grandma.amount * 0.02;
|
||||
if (SimHas('Communal brainsweep')) add += SimObjects.Grandma.amount * 0.02;
|
||||
if (SimHas('Elder Pact')) add += SimObjects.Portal.amount * 0.05;
|
||||
|
||||
let num = 0;
|
||||
|
||||
@@ -7,19 +7,14 @@ import SimHas from './SimHas';
|
||||
export default function SimGetTieredCpsMult(me) {
|
||||
let mult = 1;
|
||||
Object.keys(me.tieredUpgrades).forEach((i) => {
|
||||
if (
|
||||
!Game.Tiers[me.tieredUpgrades[i].tier].special &&
|
||||
SimHas(me.tieredUpgrades[i].name)
|
||||
)
|
||||
if (!Game.Tiers[me.tieredUpgrades[i].tier].special && SimHas(me.tieredUpgrades[i].name))
|
||||
mult *= 2;
|
||||
});
|
||||
Object.keys(me.synergies).forEach((i) => {
|
||||
if (SimHas(me.synergies[i].name)) {
|
||||
const syn = me.synergies[i];
|
||||
if (syn.buildingTie1.name === me.name)
|
||||
mult *= 1 + 0.05 * syn.buildingTie2.amount;
|
||||
else if (syn.buildingTie2.name === me.name)
|
||||
mult *= 1 + 0.001 * syn.buildingTie1.amount;
|
||||
if (syn.buildingTie1.name === me.name) mult *= 1 + 0.05 * syn.buildingTie2.amount;
|
||||
else if (syn.buildingTie2.name === me.name) mult *= 1 + 0.001 * syn.buildingTie1.amount;
|
||||
}
|
||||
});
|
||||
if (me.fortune && SimHas(me.fortune.name)) mult *= 1.07;
|
||||
|
||||
@@ -5,10 +5,6 @@ import { SimUpgrades } from '../VariablesAndData';
|
||||
*/
|
||||
export default function SimHas(what) {
|
||||
const it = SimUpgrades[what];
|
||||
if (
|
||||
Game.ascensionMode === 1 &&
|
||||
(it.pool === 'prestige' || it.tier === 'fortune')
|
||||
)
|
||||
return 0;
|
||||
if (Game.ascensionMode === 1 && (it.pool === 'prestige' || it.tier === 'fortune')) return 0;
|
||||
return it ? it.bought : 0;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
CacheDragonAura,
|
||||
CacheDragonAura2,
|
||||
} from '../../Cache/VariablesAndData';
|
||||
import { CacheDragonAura, CacheDragonAura2 } from '../../Cache/VariablesAndData';
|
||||
import CalculateGains from '../Calculations/CalculateGains';
|
||||
import CheckOtherAchiev from '../Calculations/CheckOtherAchiev';
|
||||
import CopyData from '../SimulationData/CopyData';
|
||||
@@ -24,18 +21,13 @@ export default function CalculateChangeAura(aura) {
|
||||
CopyData();
|
||||
|
||||
// Check if aura being changed is first or second aura
|
||||
const auraToBeChanged = l('promptContent').children[0].innerHTML.includes(
|
||||
'secondary',
|
||||
);
|
||||
const auraToBeChanged = l('promptContent').children[0].innerHTML.includes('secondary');
|
||||
if (auraToBeChanged) SimDragonAura2 = aura;
|
||||
else SimDragonAura = aura;
|
||||
|
||||
// Sell highest building but only if aura is different
|
||||
let price = 0;
|
||||
if (
|
||||
SimDragonAura !== CacheDragonAura ||
|
||||
SimDragonAura2 !== CacheDragonAura2
|
||||
) {
|
||||
if (SimDragonAura !== CacheDragonAura || SimDragonAura2 !== CacheDragonAura2) {
|
||||
for (let i = Game.ObjectsById.length - 1; i > -1; --i) {
|
||||
if (Game.ObjectsById[i].amount > 0) {
|
||||
const highestBuilding = SimObjects[Game.ObjectsById[i].name].name;
|
||||
@@ -44,12 +36,7 @@ export default function CalculateChangeAura(aura) {
|
||||
price =
|
||||
SimObjects[highestBuilding].basePrice *
|
||||
Game.priceIncrease **
|
||||
Math.max(
|
||||
0,
|
||||
SimObjects[highestBuilding].amount -
|
||||
1 -
|
||||
SimObjects[highestBuilding].free,
|
||||
);
|
||||
Math.max(0, SimObjects[highestBuilding].amount - 1 - SimObjects[highestBuilding].free);
|
||||
price = Game.modifyBuildingPrice(SimObjects[highestBuilding], price);
|
||||
price = Math.ceil(price);
|
||||
break;
|
||||
|
||||
@@ -9,18 +9,11 @@
|
||||
* @param {number} increase Increase of building
|
||||
* @returns {number} moni Total price
|
||||
*/
|
||||
export default function BuildingGetPrice(
|
||||
build,
|
||||
basePrice,
|
||||
start,
|
||||
free,
|
||||
increase,
|
||||
) {
|
||||
export default function BuildingGetPrice(build, basePrice, start, free, increase) {
|
||||
let startingAmount = start;
|
||||
let moni = 0;
|
||||
for (let i = 0; i < increase; i += 1) {
|
||||
let price =
|
||||
basePrice * Game.priceIncrease ** Math.max(0, startingAmount - free);
|
||||
let price = basePrice * Game.priceIncrease ** Math.max(0, startingAmount - free);
|
||||
price = Game.modifyBuildingPrice(build, price);
|
||||
price = Math.ceil(price);
|
||||
moni += price;
|
||||
|
||||
@@ -2,11 +2,7 @@ import CalculateGains from '../Calculations/CalculateGains';
|
||||
import CheckOtherAchiev from '../Calculations/CheckOtherAchiev';
|
||||
import CopyData from '../SimulationData/CopyData';
|
||||
import SimWin from '../SimulationData/SimWin';
|
||||
import {
|
||||
SimAchievementsOwned,
|
||||
SimCookiesPs,
|
||||
SimObjects,
|
||||
} from '../VariablesAndData';
|
||||
import { SimAchievementsOwned, SimCookiesPs, SimObjects } from '../VariablesAndData';
|
||||
|
||||
/**
|
||||
* This function calculates the bonus income of buying a building
|
||||
@@ -34,10 +30,7 @@ export default function BuyBuildingsBonusIncome(building, amount) {
|
||||
if (me.amount >= 800) SimWin("The devil's workshop");
|
||||
} else {
|
||||
Object.keys(Game.Objects[me.name].tieredAchievs).forEach((j) => {
|
||||
if (
|
||||
me.amount >=
|
||||
Game.Tiers[Game.Objects[me.name].tieredAchievs[j].tier].achievUnlock
|
||||
) {
|
||||
if (me.amount >= Game.Tiers[Game.Objects[me.name].tieredAchievs[j].tier].achievUnlock) {
|
||||
SimWin(Game.Objects[me.name].tieredAchievs[j].name);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -63,13 +63,7 @@ function MouseCps() {
|
||||
if (SimHas('Dragon claw')) mult *= 1.03;
|
||||
|
||||
if (SimHas('Aura gloves')) {
|
||||
mult *=
|
||||
1 +
|
||||
0.05 *
|
||||
Math.min(
|
||||
Game.Objects.Cursor.level,
|
||||
SimHas('Luminous gloves') ? 20 : 10,
|
||||
);
|
||||
mult *= 1 + 0.05 * Math.min(Game.Objects.Cursor.level, SimHas('Luminous gloves') ? 20 : 10);
|
||||
}
|
||||
|
||||
mult *= SimEff('click');
|
||||
@@ -83,8 +77,7 @@ function MouseCps() {
|
||||
}
|
||||
|
||||
Object.keys(Game.buffs).forEach((i) => {
|
||||
if (typeof Game.buffs[i].multClick !== 'undefined')
|
||||
mult *= Game.buffs[i].multClick;
|
||||
if (typeof Game.buffs[i].multClick !== 'undefined') mult *= Game.buffs[i].multClick;
|
||||
});
|
||||
|
||||
// if (CM.Sim.auraMult('Dragon Cursor')) mult*=1.05;
|
||||
@@ -129,8 +122,7 @@ export default function BuyUpgradesBonusIncome(upgrade) {
|
||||
} else {
|
||||
SimUpgrades[upgrade].bought = (SimUpgrades[upgrade].bought + 1) % 2;
|
||||
}
|
||||
if (Game.CountsAsUpgradeOwned(Game.Upgrades[upgrade].pool))
|
||||
SimUpgradesOwned += 1; // eslint-disable-line no-unused-vars
|
||||
if (Game.CountsAsUpgradeOwned(Game.Upgrades[upgrade].pool)) SimUpgradesOwned += 1; // eslint-disable-line no-unused-vars
|
||||
|
||||
if (upgrade === 'Elder Pledge') {
|
||||
SimPledges += 1;
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
import CalculateGains from '../Calculations/CalculateGains';
|
||||
import CheckOtherAchiev from '../Calculations/CheckOtherAchiev';
|
||||
import CopyData from '../SimulationData/CopyData';
|
||||
import {
|
||||
SimAchievementsOwned,
|
||||
SimCookiesPs,
|
||||
SimGod1,
|
||||
SimGod2,
|
||||
SimGod3,
|
||||
} from '../VariablesAndData';
|
||||
import { SimAchievementsOwned, SimCookiesPs, SimGod1, SimGod2, SimGod3 } from '../VariablesAndData';
|
||||
|
||||
/**
|
||||
* This functions calculates the cps and cost of changing a Dragon Aura
|
||||
|
||||
@@ -3,12 +3,7 @@ import CalculateGains from '../Calculations/CalculateGains';
|
||||
import CheckOtherAchiev from '../Calculations/CheckOtherAchiev';
|
||||
import CopyData from '../SimulationData/CopyData';
|
||||
import SimWin from '../SimulationData/SimWin';
|
||||
import {
|
||||
SimAchievementsOwned,
|
||||
SimCookiesPs,
|
||||
SimPrestige,
|
||||
SimUpgrades,
|
||||
} from '../VariablesAndData';
|
||||
import { SimAchievementsOwned, SimCookiesPs, SimPrestige, SimUpgrades } from '../VariablesAndData';
|
||||
|
||||
/**
|
||||
* This function calculates the cookies per click difference betwene current and after a ascension
|
||||
@@ -41,37 +36,23 @@ export default function ResetBonus(newHeavenlyChips) {
|
||||
if (CacheRealCookiesEarned >= 1000000000000) SimWin('From scratch');
|
||||
if (CacheRealCookiesEarned >= 1000000000000000) SimWin('Nihilism');
|
||||
if (CacheRealCookiesEarned >= 1000000000000000000) SimWin('Dematerialize');
|
||||
if (CacheRealCookiesEarned >= 1000000000000000000000)
|
||||
SimWin('Nil zero zilch');
|
||||
if (CacheRealCookiesEarned >= 1000000000000000000000000)
|
||||
SimWin('Transcendence');
|
||||
if (CacheRealCookiesEarned >= 1000000000000000000000000000)
|
||||
SimWin('Obliterate');
|
||||
if (CacheRealCookiesEarned >= 1000000000000000000000000000000)
|
||||
SimWin('Negative void');
|
||||
if (CacheRealCookiesEarned >= 1000000000000000000000000000000000)
|
||||
SimWin('To crumbs, you say?');
|
||||
if (CacheRealCookiesEarned >= 1000000000000000000000000000000000000)
|
||||
SimWin('You get nothing');
|
||||
if (CacheRealCookiesEarned >= 1000000000000000000000) SimWin('Nil zero zilch');
|
||||
if (CacheRealCookiesEarned >= 1000000000000000000000000) SimWin('Transcendence');
|
||||
if (CacheRealCookiesEarned >= 1000000000000000000000000000) SimWin('Obliterate');
|
||||
if (CacheRealCookiesEarned >= 1000000000000000000000000000000) SimWin('Negative void');
|
||||
if (CacheRealCookiesEarned >= 1000000000000000000000000000000000) SimWin('To crumbs, you say?');
|
||||
if (CacheRealCookiesEarned >= 1000000000000000000000000000000000000) SimWin('You get nothing');
|
||||
if (CacheRealCookiesEarned >= 1000000000000000000000000000000000000000)
|
||||
SimWin('Humble rebeginnings');
|
||||
if (CacheRealCookiesEarned >= 1000000000000000000000000000000000000000000)
|
||||
SimWin('The end of the world');
|
||||
if (CacheRealCookiesEarned >= 1000000000000000000000000000000000000000000000)
|
||||
SimWin("Oh, you're back");
|
||||
if (
|
||||
CacheRealCookiesEarned >= 1000000000000000000000000000000000000000000000000
|
||||
)
|
||||
if (CacheRealCookiesEarned >= 1000000000000000000000000000000000000000000000000)
|
||||
SimWin('Lazarus');
|
||||
if (
|
||||
CacheRealCookiesEarned >=
|
||||
1000000000000000000000000000000000000000000000000000
|
||||
)
|
||||
if (CacheRealCookiesEarned >= 1000000000000000000000000000000000000000000000000000)
|
||||
SimWin('Smurf account');
|
||||
if (
|
||||
CacheRealCookiesEarned >=
|
||||
1000000000000000000000000000000000000000000000000000000
|
||||
)
|
||||
if (CacheRealCookiesEarned >= 1000000000000000000000000000000000000000000000000000000)
|
||||
SimWin("If at first you don't succeed");
|
||||
|
||||
SimUpgrades['Heavenly chip secret'].bought = 1;
|
||||
|
||||
@@ -12,14 +12,7 @@ import SimModifyBuildingPrice from '../ReplacedGameFunctions/SimModifyBuidlingPr
|
||||
* @param {number} noSim 1 of 0 depending on if function is called from CM.Sim
|
||||
* @returns {number} moni Total price gained
|
||||
*/
|
||||
export default function BuildingSell(
|
||||
build,
|
||||
basePrice,
|
||||
start,
|
||||
free,
|
||||
amount,
|
||||
noSim,
|
||||
) {
|
||||
export default function BuildingSell(build, basePrice, start, free, amount, noSim) {
|
||||
// Calculate money gains from selling buildings
|
||||
// If noSim is set, use Game methods to compute price instead of Sim ones.
|
||||
const noSimRes = typeof noSim === 'undefined' ? 0 : noSim;
|
||||
@@ -29,15 +22,12 @@ export default function BuildingSell(
|
||||
if (amount === -1) toChange = startingAmount;
|
||||
if (!amount) toChange = Game.buyBulk;
|
||||
for (let i = 0; i < toChange; i++) {
|
||||
let price =
|
||||
basePrice * Game.priceIncrease ** Math.max(0, startingAmount - free);
|
||||
let price = basePrice * Game.priceIncrease ** Math.max(0, startingAmount - free);
|
||||
price = noSimRes
|
||||
? Game.modifyBuildingPrice(build, price)
|
||||
: SimModifyBuildingPrice(build, price);
|
||||
price = Math.ceil(price);
|
||||
const giveBack = noSimRes
|
||||
? build.getSellMultiplier()
|
||||
: SimGetSellMultiplier();
|
||||
const giveBack = noSimRes ? build.getSellMultiplier() : SimGetSellMultiplier();
|
||||
price = Math.floor(price * giveBack);
|
||||
if (startingAmount > 0) {
|
||||
moni += price;
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import CopyData from '../SimulationData/CopyData';
|
||||
import {
|
||||
SimBuildingsOwned,
|
||||
SimDragonAura,
|
||||
SimDragonAura2,
|
||||
SimObjects,
|
||||
} from '../VariablesAndData';
|
||||
import { SimBuildingsOwned, SimDragonAura, SimDragonAura2, SimObjects } from '../VariablesAndData';
|
||||
import BuildingSell from './SellBuilding';
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user