Garden Probability Bug Fixes (#1245)
* Fix icons for locked plants in garden not showing * Fix NaNs for weed mult edge case * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix ESLint issue caused by pre-commit --------- Co-authored-by: srs42006 <45675882+srs42006@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
2
dist/CookieMonster.js
vendored
2
dist/CookieMonster.js
vendored
File diff suppressed because one or more lines are too long
2
dist/CookieMonster.js.map
vendored
2
dist/CookieMonster.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/CookieMonsterDev.js
vendored
2
dist/CookieMonsterDev.js
vendored
File diff suppressed because one or more lines are too long
2
dist/CookieMonsterDev.js.map
vendored
2
dist/CookieMonsterDev.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -43,18 +43,22 @@ export default function CalculateAllPlotChances(minigame, auraMult) {
|
||||
switch (id) {
|
||||
case 7:
|
||||
ageMult = 1.03;
|
||||
weedMult = 1;
|
||||
range = 1;
|
||||
break;
|
||||
case 31:
|
||||
ageMult = 1;
|
||||
weedMult = 0;
|
||||
range = 2;
|
||||
break;
|
||||
case 32:
|
||||
ageMult = 1;
|
||||
weedMult = 0;
|
||||
range = 1;
|
||||
break;
|
||||
case 33:
|
||||
ageMult = 0.5;
|
||||
weedMult = 1;
|
||||
range = 1;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -71,14 +71,11 @@ export default function GardenPlots() {
|
||||
|
||||
const showIcon = [];
|
||||
for (const id in minigame.plantsById) {
|
||||
showIcon[id] = false;
|
||||
if (minigame.plantsById[id].unlocked !== 0) {
|
||||
showIcon[id] = true;
|
||||
continue; // eslint-disable-line no-continue
|
||||
}
|
||||
showIcon[id] = minigame.plantsById[id].unlocked !== 0;
|
||||
for (let y = 0; y < 6 && !showIcon[id]; y++) {
|
||||
for (let x = 0; x < 6; x++) {
|
||||
if (minigame.plot[y][x][0] - 1 === id) {
|
||||
// eslint-disable-next-line eqeqeq
|
||||
if (minigame.plot[y][x][0] - 1 == id) {
|
||||
showIcon[id] = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user