]> git.localhorst.tv Git - alttp.git/blob - tests/js/helpers/logic/inverted.test.js
add myustery circus link
[alttp.git] / tests / js / helpers / logic / inverted.test.js
1 import {
2         CONFIG,
3         applyLogic,
4         configureDungeons,
5         getLocationStatus,
6         makeEmptyState,
7 } from 'helpers/tracker';
8
9 describe('base reachability', () => {
10         const config = {
11                 ...CONFIG,
12                 worldState: 'inverted',
13         };
14         const dungeons = configureDungeons(config);
15         const state = makeEmptyState();
16         const logic = applyLogic(config, dungeons, state);
17
18         test('Dungeon Entrances', () => {
19                 expect(getLocationStatus('hc', logic, state)).toBe('unavailable');
20                 expect(getLocationStatus('ct', logic, state)).toBe('unavailable');
21                 expect(getLocationStatus('gt', logic, state)).toBe('unavailable');
22
23                 expect(getLocationStatus('ep', logic, state)).toBe('unavailable');
24                 expect(getLocationStatus('dp', logic, state)).toBe('unavailable');
25                 expect(getLocationStatus('th', logic, state)).toBe('unavailable');
26
27                 expect(getLocationStatus('pd', logic, state)).toBe('unavailable');
28                 expect(getLocationStatus('sp', logic, state)).toBe('unavailable');
29                 expect(getLocationStatus('sw', logic, state)).toBe('available');
30                 expect(getLocationStatus('tt', logic, state)).toBe('available');
31                 expect(getLocationStatus('ip', logic, state)).toBe('unavailable');
32                 expect(getLocationStatus('mm', logic, state)).toBe('unavailable');
33                 expect(getLocationStatus('tr', logic, state)).toBe('unavailable');
34         });
35
36         test('East Light World', () => {
37                 expect(getLocationStatus('potion-shop', logic, state)).toBe('unavailable');
38                 expect(getLocationStatus('saha', logic, state)).toBe('unavailable');
39                 expect(getLocationStatus('saha-left', logic, state)).toBe('unavailable');
40                 expect(getLocationStatus('saha-mid', logic, state)).toBe('unavailable');
41                 expect(getLocationStatus('saha-right', logic, state)).toBe('unavailable');
42                 expect(getLocationStatus('secret-passage', logic, state)).toBe('unavailable');
43                 expect(getLocationStatus('uncle', logic, state)).toBe('unavailable');
44                 expect(getLocationStatus('waterfall-fairy-left', logic, state)).toBe('unavailable');
45                 expect(getLocationStatus('waterfall-fairy-right', logic, state)).toBe('unavailable');
46                 expect(getLocationStatus('zora', logic, state)).toBe('unavailable');
47                 expect(getLocationStatus('zora-ledge', logic, state)).toBe('unavailable');
48         });
49
50         test('West Light World', () => {
51                 expect(getLocationStatus('blinds-hut-far-left', logic, state)).toBe('unavailable');
52                 expect(getLocationStatus('blinds-hut-left', logic, state)).toBe('unavailable');
53                 expect(getLocationStatus('blinds-hut-right', logic, state)).toBe('unavailable');
54                 expect(getLocationStatus('blinds-hut-far-right', logic, state)).toBe('unavailable');
55                 expect(getLocationStatus('blinds-hut-top', logic, state)).toBe('unavailable');
56                 expect(getLocationStatus('bonk-rocks', logic, state)).toBe('unavailable');
57                 expect(getLocationStatus('bottle-vendor', logic, state)).toBe('unavailable');
58                 expect(getLocationStatus('chicken-house', logic, state)).toBe('unavailable');
59                 expect(getLocationStatus('graveyard-ledge', logic, state)).toBe('unavailable');
60                 expect(getLocationStatus('kak-well-bottom', logic, state)).toBe('unavailable');
61                 expect(getLocationStatus('kak-well-left', logic, state)).toBe('unavailable');
62                 expect(getLocationStatus('kak-well-right', logic, state)).toBe('unavailable');
63                 expect(getLocationStatus('kak-well-mid', logic, state)).toBe('unavailable');
64                 expect(getLocationStatus('kak-well-top', logic, state)).toBe('unavailable');
65                 expect(getLocationStatus('kings-tomb', logic, state)).toBe('unavailable');
66                 expect(getLocationStatus('lost-woods-hideout', logic, state)).toBe('unavailable');
67                 expect(getLocationStatus('lumberjack', logic, state)).toBe('unavailable');
68                 expect(getLocationStatus('magic-bat', logic, state)).toBe('unavailable');
69                 expect(getLocationStatus('pedestal', logic, state)).toBe('unavailable');
70                 expect(getLocationStatus('sick-kid', logic, state)).toBe('unavailable');
71                 expect(getLocationStatus('tavern', logic, state)).toBe('unavailable');
72         });
73
74         test('South Light World', () => {
75                 expect(getLocationStatus('aginah', logic, state)).toBe('unavailable');
76                 expect(getLocationStatus('checkerboard', logic, state)).toBe('unavailable');
77                 expect(getLocationStatus('desert-ledge', logic, state)).toBe('unavailable');
78                 expect(getLocationStatus('flooded-chest', logic, state)).toBe('unavailable');
79                 expect(getLocationStatus('hobo', logic, state)).toBe('unavailable');
80                 expect(getLocationStatus('ice-rod-cave', logic, state)).toBe('unavailable');
81                 expect(getLocationStatus('lake-hylia-island', logic, state)).toBe('unavailable');
82                 expect(getLocationStatus('library', logic, state)).toBe('unavailable');
83                 expect(getLocationStatus('mini-moldorm-far-left', logic, state)).toBe('unavailable');
84                 expect(getLocationStatus('mini-moldorm-left', logic, state)).toBe('unavailable');
85                 expect(getLocationStatus('mini-moldorm-right', logic, state)).toBe('unavailable');
86                 expect(getLocationStatus('mini-moldorm-far-right', logic, state)).toBe('unavailable');
87                 expect(getLocationStatus('mini-moldorm-npc', logic, state)).toBe('unavailable');
88                 expect(getLocationStatus('race-game', logic, state)).toBe('unavailable');
89                 expect(getLocationStatus('sunken-treasure', logic, state)).toBe('unavailable');
90         });
91
92         test('Death Mountain', () => {
93                 expect(getLocationStatus('ether-tablet', logic, state)).toBe('unavailable');
94                 expect(getLocationStatus('floating-island', logic, state)).toBe('unavailable');
95                 expect(getLocationStatus('mimic-cave', logic, state)).toBe('unavailable');
96                 expect(getLocationStatus('old-man', logic, state)).toBe('unavailable');
97                 expect(getLocationStatus('paradox-lower-far-left', logic, state)).toBe('unavailable');
98                 expect(getLocationStatus('paradox-lower-left', logic, state)).toBe('unavailable');
99                 expect(getLocationStatus('paradox-lower-mid', logic, state)).toBe('unavailable');
100                 expect(getLocationStatus('paradox-lower-right', logic, state)).toBe('unavailable');
101                 expect(getLocationStatus('paradox-lower-far-right', logic, state)).toBe('unavailable');
102                 expect(getLocationStatus('paradox-upper-left', logic, state)).toBe('unavailable');
103                 expect(getLocationStatus('paradox-upper-right', logic, state)).toBe('unavailable');
104                 expect(getLocationStatus('spec-rock', logic, state)).toBe('unavailable');
105                 expect(getLocationStatus('spec-rock-cave', logic, state)).toBe('unavailable');
106                 expect(getLocationStatus('spiral-cave', logic, state)).toBe('unavailable');
107         });
108
109         test('East Dark World', () => {
110                 expect(getLocationStatus('brewery', logic, state)).toBe('available');
111                 expect(getLocationStatus('bumper-cave', logic, state)).toBe('unavailable');
112                 expect(getLocationStatus('c-house', logic, state)).toBe('available');
113                 expect(getLocationStatus('chest-game', logic, state)).toBe('available');
114                 expect(getLocationStatus('hammer-pegs', logic, state)).toBe('unavailable');
115                 expect(getLocationStatus('purple-chest', logic, state)).toBe('unavailable');
116         });
117
118         test('West Dark World', () => {
119                 expect(getLocationStatus('catfish', logic, state)).toBe('unavailable');
120                 expect(getLocationStatus('pyramid', logic, state)).toBe('unavailable');
121                 expect(getLocationStatus('pyramid-fairy-left', logic, state)).toBe('unavailable');
122                 expect(getLocationStatus('pyramid-fairy-right', logic, state)).toBe('unavailable');
123         });
124
125         test('South Dark World', () => {
126                 expect(getLocationStatus('blacksmith', logic, state)).toBe('unavailable');
127                 expect(getLocationStatus('digging-game', logic, state)).toBe('available');
128                 expect(getLocationStatus('hype-cave-top', logic, state)).toBe('available');
129                 expect(getLocationStatus('hype-cave-left', logic, state)).toBe('available');
130                 expect(getLocationStatus('hype-cave-right', logic, state)).toBe('available');
131                 expect(getLocationStatus('hype-cave-bottom', logic, state)).toBe('available');
132                 expect(getLocationStatus('hype-cave-npc', logic, state)).toBe('available');
133                 expect(getLocationStatus('links-house', logic, state)).toBe('available');
134                 expect(getLocationStatus('stumpy', logic, state)).toBe('available');
135         });
136
137         test('Dark Death Mountain', () => {
138                 expect(getLocationStatus('hookshot-cave-tl', logic, state)).toBe('unavailable');
139                 expect(getLocationStatus('hookshot-cave-tr', logic, state)).toBe('unavailable');
140                 expect(getLocationStatus('hookshot-cave-bl', logic, state)).toBe('unavailable');
141                 expect(getLocationStatus('hookshot-cave-br', logic, state)).toBe('unavailable');
142                 expect(getLocationStatus('spike-cave', logic, state)).toBe('unavailable');
143                 expect(getLocationStatus('super-bunny-top', logic, state)).toBe('unavailable');
144                 expect(getLocationStatus('super-bunny-bottom', logic, state)).toBe('unavailable');
145         });
146 });