Added prettier to master (#662)
* Bump dev to 2.031.6 * Added prettier (#661) * Added prettier * Added prettier * Added prettier
This commit is contained in:
@@ -8,33 +8,33 @@ import { SimObjects } from '../VariablesAndData';
|
||||
* @returns {Object} you The static object
|
||||
*/
|
||||
export default function InitUpgrade(upgradeName) {
|
||||
const me = Game.Upgrades[upgradeName];
|
||||
const you = {};
|
||||
// Some upgrades have a function for .power (notably the valentine cookies)
|
||||
you.power = me.power;
|
||||
if (typeof (me.power) === 'function') {
|
||||
if (me.name === 'Sugar crystal cookies') {
|
||||
me.power = function () {
|
||||
let n = 5;
|
||||
for (const i in SimObjects) {
|
||||
if (SimObjects[i].level >= 10) n += 1;
|
||||
}
|
||||
return n;
|
||||
};
|
||||
}
|
||||
me.power = function () {
|
||||
let pow = 2;
|
||||
if (SimHas('Starlove')) pow = 3;
|
||||
if (Game.hasGod) {
|
||||
const godLvl = SimHasGod('seasons');
|
||||
if (godLvl === 1) pow *= 1.3;
|
||||
else if (godLvl === 2) pow *= 1.2;
|
||||
else if (godLvl === 3) pow *= 1.1;
|
||||
}
|
||||
return pow;
|
||||
};
|
||||
}
|
||||
you.pool = me.pool;
|
||||
you.name = me.name;
|
||||
return you;
|
||||
const me = Game.Upgrades[upgradeName];
|
||||
const you = {};
|
||||
// Some upgrades have a function for .power (notably the valentine cookies)
|
||||
you.power = me.power;
|
||||
if (typeof me.power === 'function') {
|
||||
if (me.name === 'Sugar crystal cookies') {
|
||||
me.power = function () {
|
||||
let n = 5;
|
||||
for (const i in SimObjects) {
|
||||
if (SimObjects[i].level >= 10) n += 1;
|
||||
}
|
||||
return n;
|
||||
};
|
||||
}
|
||||
me.power = function () {
|
||||
let pow = 2;
|
||||
if (SimHas('Starlove')) pow = 3;
|
||||
if (Game.hasGod) {
|
||||
const godLvl = SimHasGod('seasons');
|
||||
if (godLvl === 1) pow *= 1.3;
|
||||
else if (godLvl === 2) pow *= 1.2;
|
||||
else if (godLvl === 3) pow *= 1.1;
|
||||
}
|
||||
return pow;
|
||||
};
|
||||
}
|
||||
you.pool = me.pool;
|
||||
you.name = me.name;
|
||||
return you;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user