Skip to content

Commit 228fd58

Browse files
committed
Merge branch 'exclude-locations' into s8-tournament
2 parents 2c71541 + 3933bfe commit 228fd58

5 files changed

Lines changed: 57 additions & 5 deletions

File tree

src/services/__snapshots__/logic-tweaks.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2489,7 +2489,7 @@ exports[`LogicTweaks applyTweaks when no options are set updates the locations 1
24892489
"types": "Short Sidequest",
24902490
},
24912491
"Chu Jelly Juice Shop - Give 15 Blue Chu Jelly": {
2492-
"need": "Blue Chu Jelly x15",
2492+
"need": "(Spoils Bag & Blue Chu Jelly x15) | Can Obtain 15 Blue Chu Jelly",
24932493
"originalItem": "Blue Potion",
24942494
"types": "Spoils Trading, Long Sidequest",
24952495
},

src/services/__snapshots__/tracker-controller.test.js.snap

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

src/services/logic-calculation.test.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2140,6 +2140,10 @@ describe('LogicCalculation', () => {
21402140
describe('blue chus', () => {
21412141
beforeEach(() => {
21422142
fullSetup();
2143+
2144+
logic = new LogicCalculation(
2145+
logic.state().incrementItem('Spoils Bag'),
2146+
);
21432147
});
21442148

21452149
describe('when the player has no blue chus', () => {
@@ -2173,6 +2177,27 @@ describe('LogicCalculation', () => {
21732177
});
21742178
});
21752179

2180+
describe('when the player is able to obtain 15 blue chus', () => {
2181+
beforeEach(() => {
2182+
logic = new LogicCalculation(
2183+
logic.state().decrementItem('Deku Leaf'),
2184+
);
2185+
});
2186+
2187+
test('blue chus location is available', () => {
2188+
const isBlueChusLocationAvailable = logic.isLocationAvailable(
2189+
'Windfall Island',
2190+
'Chu Jelly Juice Shop - Give 15 Blue Chu Jelly',
2191+
);
2192+
expect(isBlueChusLocationAvailable).toEqual(true);
2193+
});
2194+
2195+
test('blue chu count is 0', () => {
2196+
const blueChuCount = logic.state().getItemValue(LogicHelper.BLUE_CHU_JELLY_COUNT_ITEM);
2197+
expect(blueChuCount).toEqual(0);
2198+
});
2199+
});
2200+
21762201
describe('when the player collects 15 blue chus', () => {
21772202
beforeEach(() => {
21782203
logic = new LogicCalculation(
@@ -2207,6 +2232,27 @@ describe('LogicCalculation', () => {
22072232
const blueChuCount = logic.state().getItemValue(LogicHelper.BLUE_CHU_JELLY_COUNT_ITEM);
22082233
expect(blueChuCount).toEqual(15);
22092234
});
2235+
2236+
describe('when the player does not have spoils bag', () => {
2237+
beforeEach(() => {
2238+
logic = new LogicCalculation(
2239+
logic.state().decrementItem('Spoils Bag'),
2240+
);
2241+
});
2242+
2243+
test('blue chus location is unavailable', () => {
2244+
const isBlueChusLocationAvailable = logic.isLocationAvailable(
2245+
'Windfall Island',
2246+
'Chu Jelly Juice Shop - Give 15 Blue Chu Jelly',
2247+
);
2248+
expect(isBlueChusLocationAvailable).toEqual(false);
2249+
});
2250+
2251+
test('blue chu count is 15', () => {
2252+
const blueChuCount = logic.state().getItemValue(LogicHelper.BLUE_CHU_JELLY_COUNT_ITEM);
2253+
expect(blueChuCount).toEqual(15);
2254+
});
2255+
});
22102256
});
22112257
});
22122258
});

src/services/logic-tweaks.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,17 @@ class LogicTweaks {
8686
}
8787

8888
static #updateBlueChuJelly() {
89+
const originalRequirement = Locations.getLocation(
90+
LogicHelper.ISLANDS.WINDFALL_ISLAND,
91+
'Chu Jelly Juice Shop - Give 15 Blue Chu Jelly',
92+
Locations.KEYS.NEED,
93+
);
94+
8995
Locations.setLocation(
9096
LogicHelper.ISLANDS.WINDFALL_ISLAND,
9197
'Chu Jelly Juice Shop - Give 15 Blue Chu Jelly',
9298
Locations.KEYS.NEED,
93-
`${LogicHelper.BLUE_CHU_JELLY_COUNT_ITEM} x${LogicHelper.BLUE_CHU_JELLY_COUNT_REQUIRED}`,
99+
`(${LogicHelper.ITEMS.SPOILS_BAG} & ${LogicHelper.BLUE_CHU_JELLY_COUNT_ITEM} x${LogicHelper.BLUE_CHU_JELLY_COUNT_REQUIRED}) | ${originalRequirement}`,
94100
);
95101
}
96102

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = (env, argv) => {
1313
const isProduction = argv.mode === 'production';
1414

1515
const commitHash = execSync('git rev-parse --short HEAD').toString();
16-
const date = moment.utc().format('YYYY-MM-DD kk:mm:ss');
16+
const date = moment.utc().format('YYYY-MM-DD HH:mm:ss');
1717

1818
const faviconsWebpackPluginSettings = {
1919
logo: path.resolve('src/images/icon.png'),

0 commit comments

Comments
 (0)