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