-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
251 lines (122 loc) · 4.44 KB
/
script.js
File metadata and controls
251 lines (122 loc) · 4.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
const introScreen = document.getElementById("intro-screen");
const storyScreen = document.getElementById("story-screen");
const endingScreen = document.getElementById("ending-screen");
const startBtn = document.getElementById("startBtn");
const nextBtn = document.getElementById("nextBtn");
const restartBtn = document.getElementById("restartBtn");
const storyBox = document.getElementById("story-box");
const bgm = document.getElementById("bgm");
const secret = document.getElementById("secret");
const storyLines = [
"experiment name:<br><br>RATS + miu attempting emotional regulation.",
"result:<br><br>failed successfully.",
"subjects communicated primarily through arguments, sarcasm, and emotionally concerning humor.",
"physical interaction logs:<br><br>multiple punches recorded.",
"research confirms:<br><br>RATS was usually the problem.",
"pain level:<br><br>manageable. mostly.",
"compatibility status:<br><br>concerningly high.",
"subjects repeatedly insulted each other instead of communicating properly.",
"yet somehow remained emotionally synchronized.",
"observed behavior:<br><br>fighting for 40 minutes.<br>sending memes 3 minutes later.",
"memory fragment recovered:<br><br>the 2am conversations.",
"memory fragment recovered:<br><br>turning trauma into comedy.",
"memory fragment recovered:<br><br>acting unserious during serious moments.",
"memory fragment recovered:<br><br>that one conversation neither of us forgot.",
"eventually, life stopped giving us the same timings.",
"different schedules.<br>different battles.<br>different versions of ourselves.",
"<span class='glitch'>same attachment.</span>",
"but some people do not disappear.<br><br>they just become background gravity.",
"some people become memories.<br><br>you became a reflex.",
"WARNING:<br><br>opening emotional archive may cause feelings.",
"proceed anyway?",
"bad decision recorded.",
"final lab conclusion loading...",
"connection status:<br><br>still active."
];
let currentIndex = 0;
startBtn.addEventListener("click", () => {
introScreen.classList.remove("active");
storyScreen.classList.add("active");
bgm.play().catch(() => {});
showLine();
});
function showLine() {
storyBox.classList.remove("fade");
storyBox.style.opacity = 0;
setTimeout(() => {
storyBox.innerHTML =
storyLines[currentIndex];
const emotionalTriggers = [
"background gravity",
"you became a reflex",
"same attachment",
"still active"
];
const currentText =
storyLines[currentIndex];
if (
emotionalTriggers.some(word =>
currentText.includes(word))
) {
document.body.classList.add("flash-red");
setTimeout(() => {
document.body.classList.remove("flash-red");
}, 600);
}
storyBox.classList.add("fade");
storyBox.style.opacity = 1;
}, 300);
}
nextBtn.addEventListener("click", () => {
currentIndex++;
if (currentIndex >= storyLines.length) {
storyScreen.classList.remove("active");
endingScreen.classList.add("active");
return;
}
showLine();
});
restartBtn.addEventListener("click", () => {
document.body.innerHTML = `
<div style="
background:black;
color:#8cffb0;
width:100vw;
height:100vh;
display:flex;
justify-content:center;
align-items:center;
font-family:Courier New;
text-align:center;
padding:20px;
font-size:22px;
">
connection status:<br><br>still active.
</div>
`;
});
const secretMessages = [
"classified note: miu punches harder than expected.",
"incident report: RATS deserved it though.",
"warning: subjects weaponize sarcasm during emotional situations.",
"medical note: both specimens are emotionally stupid.",
"archive corruption detected: too many cursed conversations.",
"warning: miu has anger issues but in a cute way.",
"system note: subjects emotionally attached against medical advice.",
"classified observation: neither subject knows how to communicate normally."
];
secret.addEventListener("click", () => {
const randomMessage =
secretMessages[
Math.floor(Math.random() * secretMessages.length)
];
alert(randomMessage);
});
setInterval(() => {
if (Math.random() > 0.92) {
document.body.style.opacity = "0.96";
setTimeout(() => {
document.body.style.opacity = "1";
}, 80);
}
}, 1000);