@@ -31,48 +31,66 @@ const CodeSeancePage = () => {
3131
3232 const spiritResponses = {
3333 // Step 0
34- status : '...critical ... stack ... overflowing ... TRACE ...' ,
35- help : '...diagnose ... the... trace ...' ,
34+ status : '...system ... unstable ... boundaries ... blurred... EXAMINE... the... layout ...' ,
35+ help : '...the ... foundation... is... fractured... visualize... the... structure ...' ,
3636
3737 // Step 1
38- trace : '...error ... at ... line ... 404 ... file ... not ... found ...' ,
39- 'stack trace' : '...error ... at ... line ... 404 ... file ... not ... found ...' ,
38+ ls : '...the ... catalog ... holds ... secrets ... find ... the ... archive... segment ...' ,
39+ dir : '...the ... catalog ... holds ... secrets ... find ... the ... archive... segment ...' ,
4040
4141 // Step 2
42- 'open 404' : '...variable... GHOST_DATA... is... undefined...' ,
43- 'goto 404' : '...variable... GHOST_DATA... is... undefined...' ,
42+ 'cd logs' : '...the... vault... is... open... find... the... mark... of... failure... within... trace.log...' ,
4443
4544 // Step 3
46- 'define ghost_data ' : '...data ... needs ... value ... try ... NULL ...' ,
47- 'const ghost_data ' : '...data ... needs ... value ... try ... NULL ...' ,
45+ 'grep error trace.log ' : '...a ... pattern ... emerges ... line ... 404... contains... the... truth... inspect... it ...' ,
46+ 'grep "error" trace.log ' : '...a ... pattern ... emerges ... line ... 404... contains... the... truth... inspect... it ...' ,
4847
4948 // Step 4
50- 'ghost_data = null' :
51- '...null... pointer... exception... restart... service... DAEMON...' ,
52- 'set null' :
53- '...null... pointer... exception... restart... service... DAEMON...' ,
49+ 'cat trace.log' : '...the... trace... reveals... a... parasite... GHOST... is... still... beating... check... the... pulse...' ,
5450
5551 // Step 5
56- 'restart daemon ' : '...daemon ... listening ... on ... port ... 666 ...' ,
57- 'start daemon' : '...daemon ... listening ... on ... port ... 666 ...' ,
52+ 'ps aux ' : '...PID ... 666 ... is ... the ... mark... of... the... beast... it... must... be... silenced ...' ,
53+ ps : '...PID ... 666 ... is ... the ... mark... of... the... beast... it... must... be... silenced ...' ,
5854
5955 // Step 6
60- 'connect 666' : '...access ... denied ... sudo ... required ...' ,
61- 'localhost: 666' : '...access ... denied ... sudo ... required ...' ,
56+ 'kill -9 666' : '...the ... heart ... stops ... but... the... shadow... lingers... in... /tmp/ghost_cache... erase... it ...' ,
57+ 'kill 666' : '...the ... heart ... stops ... but... the... shadow... lingers... in... /tmp/ghost_cache... erase... it ...' ,
6258
6359 // Step 7
64- sudo : '...password... for... root... hint... it... is... PASSWORD...' ,
65- 'sudo connect' :
66- '...password... for... root... hint... it... is... PASSWORD...' ,
60+ 'rm -rf /tmp/ghost_cache' : '...the... physical... link... is... gone... but... the... variable... remains... declare... its... true... name...' ,
61+ 'rm /tmp/ghost_cache' : '...the... physical... link... is... gone... but... the... variable... remains... declare... its... true... name...' ,
6762
6863 // Step 8
64+ 'define ghost_data' : '...the... name... is... spoken... now... make... it... nothing... return... it... to... the... VOID...' ,
65+ 'const ghost_data' : '...the... name... is... spoken... now... make... it... nothing... return... it... to... the... VOID...' ,
66+
67+ // Step 9
68+ 'ghost_data = null' :
69+ '...existence... negated... the... system... requires... a... new... guardian... awaken... the... DAEMON...' ,
70+ 'set null' :
71+ '...existence... negated... the... system... requires... a... new... guardian... awaken... the... DAEMON...' ,
72+
73+ // Step 10
74+ 'restart daemon' : '...the... watcher... is... reborn... listening... at... the... gate... of... triple... nines...' ,
75+ 'start daemon' : '...the... watcher... is... reborn... listening... at... the... gate... of... triple... nines...' ,
76+
77+ // Step 11
78+ 'connect 999' : '...the... barrier... is... thin... but... you... lack... the... AUTHORITY... to... pass...' ,
79+ 'localhost:999' : '...the... barrier... is... thin... but... you... lack... the... AUTHORITY... to... pass...' ,
80+
81+ // Step 12
82+ sudo : '...state... your... claim... to... the... root... what... is... the... secret... WORD...' ,
83+ 'sudo connect' :
84+ '...state... your... claim... to... the... root... what... is... the... secret... WORD...' ,
85+
86+ // Step 13
6987 password :
70- '...access ... granted... to ... break ... the ... loop ... type ... BREAK ...' ,
88+ '...dominion ... granted... the ... cycle ... must ... end ... SEVER ... the... link ...' ,
7189 123456 :
72- '...access ... granted... to ... break ... the ... loop ... type ... BREAK ...' ,
90+ '...dominion ... granted... the ... cycle ... must ... end ... SEVER ... the... link ...' ,
7391
74- // Step 9
75- break : '...LOOP TERMINATED... MEMORY FREED ... I AM AT PEACE...' ,
92+ // Step 14
93+ break : '...CONNECTION TERMINATED... VOID SATISFIED ... I AM AT PEACE...' ,
7694 } ;
7795
7896 const handleCommand = ( cmd ) => {
@@ -82,7 +100,7 @@ const CodeSeancePage = () => {
82100 let nextStep = step ;
83101 let responseSuffix = '' ;
84102
85- if ( step === 10 ) {
103+ if ( step === 15 ) {
86104 // Seance is over
87105 response = '...the... connection... is... severed...' ;
88106 setHistory ( ( prev ) => [
@@ -94,80 +112,85 @@ const CodeSeancePage = () => {
94112 }
95113
96114 const helpMessages = {
97- 0 : '...type... STATUS... or... HELP... to begin...' ,
98- 1 : '...TRACE... the... error...' ,
99- 2 : '...OPEN... the... missing... file... (e.g., OPEN 404)...' ,
100- 3 : '...DEFINE... the... variable... GHOST_DATA... (e.g., DEFINE GHOST_DATA)...' ,
101- 4 : '...ASSIGN... a... value... (e.g., GHOST_DATA = NULL)...' ,
102- 5 : '...RESTART... the... service... DAEMON...' ,
103- 6 : '...CONNECT... to... the... port... (e.g., CONNECT 666)...' ,
104- 7 : '...AUTHORIZE... with... SUDO...' ,
105- 8 : '...ENTER... the... password... (e.g., PASSWORD)...' ,
106- 9 : '...BREAK... the... loop...' ,
107- 10 : '...the... connection... is... closed...' ,
115+ 0 : '...request... a... STATUS... report... from... the... void...' ,
116+ 1 : '...LIST... (LS)... the... fragments... of... this... directory...' ,
117+ 2 : '...CHANGE... (CD)... your... path... to... the... vault... of... LOGS...' ,
118+ 3 : '...FILTER... (G...)... the... noise... for... ERROR... in... trace.log...' ,
119+ 4 : '...READ... (C...)... the... scroll... of... the... trace.log...' ,
120+ 5 : '...reveal... the... active... PROCESSES... (P...)...' ,
121+ 6 : '...TERMINATE... (K...)... the... parasite... 666...' ,
122+ 7 : '...REMOVE... (R...)... the... corrupted... /tmp/ghost_cache...' ,
123+ 8 : '...you... must... DEFINE... the... GHOST_DATA...' ,
124+ 9 : '...return... the... data... to... NOTHING... (N...)...' ,
125+ 10 : '...RESTART... the... service... of... the... DAEMON...' ,
126+ 11 : '...CONNECT... to... the... gate... of... triple... nines...' ,
127+ 12 : '...invoke... the... authority... of... the... root... (S...)...' ,
128+ 13 : '...speak... the... common... PASSWORD...' ,
129+ 14 : '...SEVER... the... loop... (B...)...' ,
130+ 15 : '...the... connection... is... closed...' ,
108131 } ;
109132
110133 if ( cleanCmd === 'help' ) {
111134 response = helpMessages [ step ] ;
112135 } else if ( step === 0 && cleanCmd === 'status' ) {
113136 response = spiritResponses [ 'status' ] ;
114137 nextStep = 1 ;
115- responseSuffix = ` (Step ${ nextStep } )` ;
116- } else if (
117- step === 1 &&
118- ( cleanCmd === 'trace' || cleanCmd === 'stack trace' )
119- ) {
120- response = spiritResponses [ 'trace' ] ;
138+ } else if ( step === 1 && ( cleanCmd === 'ls' || cleanCmd === 'dir' ) ) {
139+ response = spiritResponses [ 'ls' ] ;
121140 nextStep = 2 ;
122- responseSuffix = ` (Step ${ nextStep } )` ;
123- } else if (
124- step === 2 &&
125- ( cleanCmd === 'open 404' || cleanCmd === 'goto 404' )
126- ) {
127- response = spiritResponses [ 'open 404' ] ;
141+ } else if ( step === 2 && cleanCmd === 'cd logs' ) {
142+ response = spiritResponses [ 'cd logs' ] ;
128143 nextStep = 3 ;
129- responseSuffix = ` (Step ${ nextStep } )` ;
144+ } else if ( step === 3 && ( cleanCmd . includes ( 'grep' ) && cleanCmd . includes ( 'error' ) ) ) {
145+ response = spiritResponses [ 'grep error trace.log' ] ;
146+ nextStep = 4 ;
147+ } else if ( step === 4 && cleanCmd === 'cat trace.log' ) {
148+ response = spiritResponses [ 'cat trace.log' ] ;
149+ nextStep = 5 ;
150+ } else if ( step === 5 && ( cleanCmd === 'ps aux' || cleanCmd === 'ps' ) ) {
151+ response = spiritResponses [ 'ps aux' ] ;
152+ nextStep = 6 ;
153+ } else if ( step === 6 && ( cleanCmd === 'kill -9 666' || cleanCmd === 'kill 666' ) ) {
154+ response = spiritResponses [ 'kill -9 666' ] ;
155+ nextStep = 7 ;
156+ } else if ( step === 7 && ( cleanCmd . includes ( 'rm' ) && cleanCmd . includes ( 'tmp' ) ) ) {
157+ response = spiritResponses [ 'rm -rf /tmp/ghost_cache' ] ;
158+ nextStep = 8 ;
130159 } else if (
131- step === 3 &&
160+ step === 8 &&
132161 ( cleanCmd . includes ( 'define' ) || cleanCmd . includes ( 'const' ) ) &&
133162 cleanCmd . includes ( 'ghost_data' )
134163 ) {
135164 response = spiritResponses [ 'define ghost_data' ] ;
136- nextStep = 4 ;
137- responseSuffix = ` (Step ${ nextStep } )` ;
138- } else if ( step === 4 && cleanCmd . includes ( 'null' ) ) {
165+ nextStep = 9 ;
166+ } else if ( step === 9 && cleanCmd . includes ( 'null' ) ) {
139167 response = spiritResponses [ 'ghost_data = null' ] ;
140- nextStep = 5 ;
141- responseSuffix = ` (Step ${ nextStep } )` ;
168+ nextStep = 10 ;
142169 } else if (
143- step === 5 &&
170+ step === 10 &&
144171 ( cleanCmd . includes ( 'restart' ) || cleanCmd . includes ( 'start' ) ) &&
145172 cleanCmd . includes ( 'daemon' )
146173 ) {
147174 response = spiritResponses [ 'restart daemon' ] ;
148- nextStep = 6 ;
149- responseSuffix = ` (Step ${ nextStep } )` ;
150- } else if ( step === 6 && cleanCmd . includes ( '666' ) ) {
151- response = spiritResponses [ 'connect 666' ] ;
152- nextStep = 7 ;
153- responseSuffix = ` (Step ${ nextStep } )` ;
154- } else if ( step === 7 && cleanCmd . includes ( 'sudo' ) ) {
175+ nextStep = 11 ;
176+ } else if ( step === 11 && cleanCmd . includes ( '999' ) ) {
177+ response = spiritResponses [ 'connect 999' ] ;
178+ nextStep = 12 ;
179+ } else if ( step === 12 && cleanCmd . includes ( 'sudo' ) ) {
155180 response = spiritResponses [ 'sudo' ] ;
156- nextStep = 8 ;
157- responseSuffix = ` (Step ${ nextStep } )` ;
181+ nextStep = 13 ;
158182 } else if (
159- step === 8 &&
183+ step === 13 &&
160184 ( cleanCmd === 'password' || cleanCmd === '123456' )
161185 ) {
162186 response = spiritResponses [ 'password' ] ;
163- nextStep = 9 ;
164- responseSuffix = ` (Step ${ nextStep } )` ;
165- } else if ( step === 9 && cleanCmd === 'break' ) {
187+ nextStep = 14 ;
188+ } else if ( step === 14 && cleanCmd === 'break' ) {
166189 response = spiritResponses [ 'break' ] ;
167- nextStep = 10 ;
190+ nextStep = 15 ;
168191 effect = true ;
169192 unlockAchievement ( 'the_medium' ) ;
170- responseSuffix = ' (LOOP BROKEN!)' ; // Final step special message
193+ responseSuffix = ' (LOOP BROKEN!)' ;
171194 } else {
172195 // Fallback responses
173196 const randomResponses = [
@@ -191,7 +214,6 @@ const CodeSeancePage = () => {
191214 { type : 'spirit' , text : response + responseSuffix } ,
192215 ] ) ;
193216 if ( cleanCmd !== 'help' && nextStep !== step ) {
194- // Only update step if it's not a help command and step actually changed
195217 setStep ( nextStep ) ;
196218 }
197219 } ;
0 commit comments