Soda5601 commited on
Commit
88a14a4
·
verified ·
1 Parent(s): cf1b2f9

imgur isnot working - Initial Deployment

Browse files
Files changed (2) hide show
  1. README.md +7 -5
  2. index.html +634 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Zb
3
- emoji: 🌖
4
- colorFrom: blue
5
- colorTo: blue
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: zb
3
+ emoji: 🐳
4
+ colorFrom: purple
5
+ colorTo: gray
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,634 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Anti-Zombie Venter - Threat Department</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ @keyframes flicker {
11
+ 0% { opacity: 1; }
12
+ 25% { opacity: 0.8; }
13
+ 50% { opacity: 0.6; }
14
+ 75% { opacity: 0.8; }
15
+ 100% { opacity: 1; }
16
+ }
17
+ .flicker {
18
+ animation: flicker 2s infinite;
19
+ }
20
+ .camera-feed {
21
+ background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1518709268805-4e9042af9f23?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2048&q=80');
22
+ background-size: cover;
23
+ background-position: center;
24
+ }
25
+ .jumpscare {
26
+ position: fixed;
27
+ top: 0;
28
+ left: 0;
29
+ width: 100%;
30
+ height: 100%;
31
+ background-color: black;
32
+ z-index: 100;
33
+ display: flex;
34
+ justify-content: center;
35
+ align-items: center;
36
+ opacity: 0;
37
+ pointer-events: none;
38
+ transition: opacity 0.1s;
39
+ }
40
+ .jumpscare img {
41
+ width: 100%;
42
+ height: 100%;
43
+ object-fit: cover;
44
+ }
45
+ .mutant-presence {
46
+ position: absolute;
47
+ transition: all 0.5s;
48
+ opacity: 0;
49
+ }
50
+ .mutant-presence.visible {
51
+ opacity: 1;
52
+ }
53
+ .power-bar {
54
+ transition: width 0.5s;
55
+ }
56
+ .serum-progress {
57
+ transition: width 1s;
58
+ }
59
+ </style>
60
+ </head>
61
+ <body class="bg-gray-900 text-white font-mono overflow-hidden">
62
+ <!-- Jumpscare Screen -->
63
+ <div class="jumpscare" id="jumpscare">
64
+ <img src="" alt="Jumpscare" id="jumpscare-image">
65
+ </div>
66
+
67
+ <!-- Main Game Container -->
68
+ <div class="container mx-auto px-4 py-8 relative" id="game-container">
69
+ <!-- Header -->
70
+ <header class="flex justify-between items-center mb-6 border-b border-red-700 pb-4">
71
+ <h1 class="text-3xl font-bold text-red-500 flicker">THREAT DEPARTMENT</h1>
72
+ <div class="text-right">
73
+ <p class="text-yellow-400">NIGHT <span id="night-number">1</span></p>
74
+ <p class="text-sm text-gray-400">Anti-Zombie Venter System</p>
75
+ </div>
76
+ </header>
77
+
78
+ <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
79
+ <!-- Camera Select Section -->
80
+ <div class="bg-gray-800 p-4 rounded-lg border border-gray-700">
81
+ <h2 class="text-xl font-bold text-red-400 mb-4 border-b border-gray-700 pb-2">CAM SELECT</h2>
82
+ <div class="grid grid-cols-2 gap-3">
83
+ <button class="cam-btn bg-gray-700 hover:bg-gray-600 py-2 px-3 rounded text-sm" data-cam="1">CAM 1: Main Hall</button>
84
+ <button class="cam-btn bg-gray-700 hover:bg-gray-600 py-2 px-3 rounded text-sm" data-cam="2">CAM 2: East Corridor</button>
85
+ <button class="cam-btn bg-gray-700 hover:bg-gray-600 py-2 px-3 rounded text-sm" data-cam="3">CAM 3: West Corridor</button>
86
+ <button class="cam-btn bg-gray-700 hover:bg-gray-600 py-2 px-3 rounded text-sm" data-cam="4">CAM 4: Storage Room</button>
87
+ <button class="cam-btn bg-gray-700 hover:bg-gray-600 py-2 px-3 rounded text-sm" data-cam="5">CAM 5: Lab Entrance</button>
88
+ <button class="cam-btn bg-gray-700 hover:bg-gray-600 py-2 px-3 rounded text-sm" data-cam="6">CAM 6: Ventilation</button>
89
+ <button class="cam-btn bg-gray-700 hover:bg-gray-600 py-2 px-3 rounded text-sm" data-cam="7">CAM 7: Serum Storage</button>
90
+ <button class="cam-btn bg-gray-700 hover:bg-gray-600 py-2 px-3 rounded text-sm" data-cam="8">CAM 8: Office Hall</button>
91
+ </div>
92
+ </div>
93
+
94
+ <!-- Camera Feed Section -->
95
+ <div class="bg-gray-800 p-4 rounded-lg border border-gray-700 lg:col-span-2">
96
+ <div class="flex justify-between items-center mb-4 border-b border-gray-700 pb-2">
97
+ <h2 class="text-xl font-bold text-red-400">CAM FEED</h2>
98
+ <div class="text-sm text-yellow-400" id="current-cam">CAM 1: Main Hall</div>
99
+ </div>
100
+ <div class="camera-feed h-64 md:h-96 rounded-lg relative overflow-hidden" id="camera-feed">
101
+ <!-- Mutants will appear here -->
102
+ <div class="mutant-presence" id="mutant-1">
103
+ <img src="https://cdn.pixabay.com/photo/2023/10/15/11/03/zombie-8317034_640.png" alt="Mutant 1" class="h-24 absolute bottom-0 right-4">
104
+ </div>
105
+ <div class="mutant-presence" id="mutant-2">
106
+ <img src="https://cdn.pixabay.com/photo/2023/10/15/11/03/zombie-8317035_640.png" alt="Mutant 2" class="h-24 absolute bottom-0 left-4">
107
+ </div>
108
+ <div class="mutant-presence" id="mutant-3">
109
+ <img src="https://cdn.pixabay.com/photo/2023/10/15/11/03/zombie-8317036_640.png" alt="Mutant 3" class="h-24 absolute bottom-0 right-10">
110
+ </div>
111
+ <div class="mutant-presence" id="mutant-4">
112
+ <img src="https://cdn.pixabay.com/photo/2023/10/15/11/03/zombie-8317037_640.png" alt="Mutant 4" class="h-24 absolute bottom-0 left-10">
113
+ </div>
114
+ </div>
115
+ <div class="mt-4 flex justify-between items-center">
116
+ <button class="bg-red-700 hover:bg-red-600 py-2 px-4 rounded flex items-center" id="serum-btn">
117
+ <i class="fas fa-syringe mr-2"></i> DELIVER SERUM (<span id="serum-count">3</span>)
118
+ </button>
119
+ <div class="text-xs text-gray-400">Serum progress: <span id="serum-percent">0</span>%</div>
120
+ </div>
121
+ <div class="w-full bg-gray-700 h-2 mt-2 rounded">
122
+ <div class="bg-green-500 h-2 rounded serum-progress" id="serum-progress" style="width: 0%"></div>
123
+ </div>
124
+ </div>
125
+ </div>
126
+
127
+ <!-- Office Controls Section -->
128
+ <div class="mt-6 bg-gray-800 p-4 rounded-lg border border-gray-700">
129
+ <h2 class="text-xl font-bold text-red-400 mb-4 border-b border-gray-700 pb-2">OFFICE CONTROLS</h2>
130
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
131
+ <div>
132
+ <h3 class="text-lg font-bold text-yellow-400 mb-2">DOOR CONTROLS</h3>
133
+ <div class="flex space-x-4">
134
+ <div>
135
+ <button class="door-btn bg-gray-700 hover:bg-gray-600 py-2 px-4 rounded flex items-center mb-2" data-door="left">
136
+ <i class="fas fa-door-closed mr-2" id="left-door-icon"></i> LEFT DOOR
137
+ </button>
138
+ <div class="text-xs text-center">Power: <span id="left-door-power">100</span>%</div>
139
+ </div>
140
+ <div>
141
+ <button class="door-btn bg-gray-700 hover:bg-gray-600 py-2 px-4 rounded flex items-center mb-2" data-door="right">
142
+ <i class="fas fa-door-closed mr-2" id="right-door-icon"></i> RIGHT DOOR
143
+ </button>
144
+ <div class="text-xs text-center">Power: <span id="right-door-power">100</span>%</div>
145
+ </div>
146
+ </div>
147
+ </div>
148
+
149
+ <div>
150
+ <h3 class="text-lg font-bold text-yellow-400 mb-2">VENT CONTROLS</h3>
151
+ <div class="flex space-x-4">
152
+ <div>
153
+ <button class="vent-btn bg-gray-700 hover:bg-gray-600 py-2 px-4 rounded flex items-center mb-2" data-vent="left">
154
+ <i class="fas fa-fan mr-2" id="left-vent-icon"></i> LEFT VENT
155
+ </button>
156
+ <div class="text-xs text-center">Power: <span id="left-vent-power">100</span>%</div>
157
+ </div>
158
+ <div>
159
+ <button class="vent-btn bg-gray-700 hover:bg-gray-600 py-2 px-4 rounded flex items-center mb-2" data-vent="right">
160
+ <i class="fas fa-fan mr-2" id="right-vent-icon"></i> RIGHT VENT
161
+ </button>
162
+ <div class="text-xs text-center">Power: <span id="right-vent-power">100</span>%</div>
163
+ </div>
164
+ </div>
165
+ </div>
166
+
167
+ <div>
168
+ <h3 class="text-lg font-bold text-yellow-400 mb-2">SYSTEM STATUS</h3>
169
+ <div class="mb-2">
170
+ <div class="flex justify-between text-sm mb-1">
171
+ <span>POWER</span>
172
+ <span id="power-percent">100%</span>
173
+ </div>
174
+ <div class="w-full bg-gray-700 h-4 rounded">
175
+ <div class="bg-blue-500 h-4 rounded power-bar" id="power-bar" style="width: 100%"></div>
176
+ </div>
177
+ </div>
178
+ <div class="text-sm">
179
+ <div class="flex justify-between">
180
+ <span>Time:</span>
181
+ <span id="game-time">12:00 AM</span>
182
+ </div>
183
+ <div class="flex justify-between">
184
+ <span>Serum:</span>
185
+ <span id="serum-status">Ready</span>
186
+ </div>
187
+ <div class="flex justify-between">
188
+ <span>Threat Level:</span>
189
+ <span id="threat-level">Low</span>
190
+ </div>
191
+ </div>
192
+ </div>
193
+ </div>
194
+ </div>
195
+
196
+ <!-- Audio elements -->
197
+ <audio id="camera-sound" src="https://www.soundjay.com/mechanical/sounds/camera-shutter-click-01.mp3" preload="auto"></audio>
198
+ <audio id="door-sound" src="https://www.soundjay.com/mechanical/sounds/door-creak-1.mp3" preload="auto"></audio>
199
+ <audio id="vent-sound" src="https://www.soundjay.com/mechanical/sounds/fan-01.mp3" preload="auto"></audio>
200
+ <audio id="serum-sound" src="https://www.soundjay.com/mechanical/sounds/beep-07.mp3" preload="auto"></audio>
201
+ <audio id="jumpscare-sound" src="https://www.soundjay.com/human/sounds/scream-06.mp3" preload="auto"></audio>
202
+ <audio id="static-sound" src="https://www.soundjay.com/communication/sounds/radio-static-1.mp3" preload="auto" loop></audio>
203
+ </div>
204
+
205
+ <script>
206
+ // Game State
207
+ const gameState = {
208
+ currentCam: 1,
209
+ power: 100,
210
+ leftDoor: true,
211
+ rightDoor: true,
212
+ leftVent: false,
213
+ rightVent: false,
214
+ serumCount: 3,
215
+ serumProgress: 0,
216
+ night: 1,
217
+ time: 0, // 0-6 hours (0-360 minutes)
218
+ gameOver: false,
219
+ mutants: {
220
+ 1: { name: "Necro", location: 8, aggression: 1, fakeMoves: 0 },
221
+ 2: { name: "Venom", location: 8, aggression: 2, fakeMoves: 0 },
222
+ 3: { name: "Fester", location: 8, aggression: 3, fakeMoves: 0 },
223
+ 4: { name: "Rot", location: 8, aggression: 4, fakeMoves: 0 }
224
+ },
225
+ mutantLocations: {
226
+ 1: "Main Hall",
227
+ 2: "East Corridor",
228
+ 3: "West Corridor",
229
+ 4: "Storage Room",
230
+ 5: "Lab Entrance",
231
+ 6: "Ventilation",
232
+ 7: "Serum Storage",
233
+ 8: "Office Hall"
234
+ }
235
+ };
236
+
237
+ // DOM Elements
238
+ const elements = {
239
+ gameContainer: document.getElementById('game-container'),
240
+ jumpscare: document.getElementById('jumpscare'),
241
+ jumpscareImage: document.getElementById('jumpscare-image'),
242
+ currentCamDisplay: document.getElementById('current-cam'),
243
+ cameraFeed: document.getElementById('camera-feed'),
244
+ powerBar: document.getElementById('power-bar'),
245
+ powerPercent: document.getElementById('power-percent'),
246
+ leftDoorIcon: document.getElementById('left-door-icon'),
247
+ rightDoorIcon: document.getElementById('right-door-icon'),
248
+ leftVentIcon: document.getElementById('left-vent-icon'),
249
+ rightVentIcon: document.getElementById('right-vent-icon'),
250
+ leftDoorPower: document.getElementById('left-door-power'),
251
+ rightDoorPower: document.getElementById('right-door-power'),
252
+ leftVentPower: document.getElementById('left-vent-power'),
253
+ rightVentPower: document.getElementById('right-vent-power'),
254
+ serumCount: document.getElementById('serum-count'),
255
+ serumProgress: document.getElementById('serum-progress'),
256
+ serumPercent: document.getElementById('serum-percent'),
257
+ serumStatus: document.getElementById('serum-status'),
258
+ gameTime: document.getElementById('game-time'),
259
+ threatLevel: document.getElementById('threat-level'),
260
+ nightNumber: document.getElementById('night-number'),
261
+ // Audio elements
262
+ cameraSound: document.getElementById('camera-sound'),
263
+ doorSound: document.getElementById('door-sound'),
264
+ ventSound: document.getElementById('vent-sound'),
265
+ serumSound: document.getElementById('serum-sound'),
266
+ jumpscareSound: document.getElementById('jumpscare-sound'),
267
+ staticSound: document.getElementById('static-sound')
268
+ };
269
+
270
+ // Initialize game
271
+ function initGame() {
272
+ // Set up event listeners
273
+ document.querySelectorAll('.cam-btn').forEach(btn => {
274
+ btn.addEventListener('click', () => switchCamera(parseInt(btn.dataset.cam)));
275
+ });
276
+
277
+ document.querySelectorAll('.door-btn').forEach(btn => {
278
+ btn.addEventListener('click', () => toggleDoor(btn.dataset.door));
279
+ });
280
+
281
+ document.querySelectorAll('.vent-btn').forEach(btn => {
282
+ btn.addEventListener('click', () => toggleVent(btn.dataset.vent));
283
+ });
284
+
285
+ document.getElementById('serum-btn').addEventListener('click', deliverSerum);
286
+
287
+ // Start game loop
288
+ setInterval(gameLoop, 1000);
289
+ setInterval(cameraStatic, 5000);
290
+ setInterval(updatePower, 30000);
291
+ }
292
+
293
+ // Game loop
294
+ function gameLoop() {
295
+ if (gameState.gameOver) return;
296
+
297
+ // Update time
298
+ gameState.time += 1;
299
+ updateTimeDisplay();
300
+
301
+ // Check for mutants in office
302
+ checkForAttack();
303
+
304
+ // Update UI
305
+ updatePowerDisplay();
306
+ updateMutantVisibility();
307
+ updateThreatLevel();
308
+ }
309
+
310
+ // Camera static effect
311
+ function cameraStatic() {
312
+ if (Math.random() < 0.3) { // 30% chance of static
313
+ elements.cameraFeed.style.backgroundImage = 'none';
314
+ elements.cameraFeed.style.backgroundColor = 'black';
315
+ elements.staticSound.currentTime = 0;
316
+ elements.staticSound.play();
317
+ setTimeout(() => {
318
+ elements.cameraFeed.style.backgroundImage = 'linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url("https://images.unsplash.com/photo-1518709268805-4e9042af9f23?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2048&q=80")';
319
+ }, 500);
320
+ }
321
+ }
322
+
323
+ // Switch camera view
324
+ function switchCamera(camNumber) {
325
+ if (gameState.gameOver) return;
326
+
327
+ gameState.currentCam = camNumber;
328
+ elements.currentCamDisplay.textContent = `CAM ${camNumber}: ${gameState.mutantLocations[camNumber]}`;
329
+
330
+ // Play camera sound
331
+ elements.cameraSound.currentTime = 0;
332
+ elements.cameraSound.play();
333
+
334
+ // Use a bit of power
335
+ gameState.power -= 0.2;
336
+ if (gameState.power < 0) gameState.power = 0;
337
+
338
+ updatePowerDisplay();
339
+ }
340
+
341
+ // Toggle door
342
+ function toggleDoor(doorSide) {
343
+ if (gameState.gameOver) return;
344
+
345
+ // Play door sound
346
+ elements.doorSound.currentTime = 0;
347
+ elements.doorSound.play();
348
+
349
+ if (doorSide === 'left') {
350
+ gameState.leftDoor = !gameState.leftDoor;
351
+ elements.leftDoorIcon.className = gameState.leftDoor ? 'fas fa-door-open mr-2' : 'fas fa-door-closed mr-2';
352
+ } else {
353
+ gameState.rightDoor = !gameState.rightDoor;
354
+ elements.rightDoorIcon.className = gameState.rightDoor ? 'fas fa-door-open mr-2' : 'fas fa-door-closed mr-2';
355
+ }
356
+ }
357
+
358
+ // Toggle vent
359
+ function toggleVent(ventSide) {
360
+ if (gameState.gameOver) return;
361
+
362
+ // Play vent sound
363
+ elements.ventSound.currentTime = 0;
364
+ elements.ventSound.play();
365
+
366
+ if (ventSide === 'left') {
367
+ gameState.leftVent = !gameState.leftVent;
368
+ elements.leftVentIcon.className = gameState.leftVent ? 'fas fa-fan mr-2 text-green-500' : 'fas fa-fan mr-2';
369
+ } else {
370
+ gameState.rightVent = !gameState.rightVent;
371
+ elements.rightVentIcon.className = gameState.rightVent ? 'fas fa-fan mr-2 text-green-500' : 'fas fa-fan mr-2';
372
+ }
373
+ }
374
+
375
+ // Deliver serum
376
+ function deliverSerum() {
377
+ if (gameState.gameOver || gameState.serumCount <= 0 || gameState.serumProgress >= 100) return;
378
+
379
+ // Play serum sound
380
+ elements.serumSound.currentTime = 0;
381
+ elements.serumSound.play();
382
+
383
+ gameState.serumCount--;
384
+ gameState.serumProgress += 33;
385
+
386
+ if (gameState.serumProgress >= 99) {
387
+ gameState.serumProgress = 99;
388
+ elements.serumStatus.textContent = "Complete";
389
+ // Win condition
390
+ setTimeout(() => {
391
+ alert(`Congratulations! You survived Night ${gameState.night}!`);
392
+ gameState.night++;
393
+ elements.nightNumber.textContent = gameState.night;
394
+ resetNight();
395
+ }, 1000);
396
+ }
397
+
398
+ updateSerumDisplay();
399
+ }
400
+
401
+ // Check for mutant attack
402
+ function checkForAttack() {
403
+ Object.keys(gameState.mutants).forEach(mutantId => {
404
+ const mutant = gameState.mutants[mutantId];
405
+
406
+ if (mutant.location === 8) { // Office Hall
407
+ // Check if door is closed
408
+ if ((mutantId % 2 === 0 && !gameState.rightDoor) || (mutantId % 2 !== 0 && !gameState.leftDoor)) {
409
+ // Attack!
410
+ triggerJumpscare(mutantId);
411
+ }
412
+ }
413
+ });
414
+ }
415
+
416
+ // Trigger jumpscare
417
+ function triggerJumpscare(mutantId) {
418
+ gameState.gameOver = true;
419
+
420
+ // Set jumpscare image based on mutant
421
+ const mutantImages = {
422
+ 1: "https://cdn.pixabay.com/photo/2023/10/15/11/03/zombie-8317034_640.png",
423
+ 2: "https://cdn.pixabay.com/photo/2023/10/15/11/03/zombie-8317035_640.png",
424
+ 3: "https://cdn.pixabay.com/photo/2023/10/15/11/03/zombie-8317036_640.png",
425
+ 4: "https://cdn.pixabay.com/photo/2023/10/15/11/03/zombie-8317037_640.png"
426
+ };
427
+
428
+ elements.jumpscareImage.src = mutantImages[mutantId];
429
+
430
+ // Play sounds
431
+ elements.jumpscareSound.currentTime = 0;
432
+ elements.jumpscareSound.play();
433
+ elements.staticSound.currentTime = 0;
434
+ elements.staticSound.play();
435
+
436
+ // Show jumpscare
437
+ elements.jumpscare.style.opacity = "1";
438
+
439
+ // Game over
440
+ setTimeout(() => {
441
+ alert(`Game Over! You were caught by ${gameState.mutants[mutantId].name} on Night ${gameState.night}.`);
442
+ resetNight();
443
+ }, 2000);
444
+ }
445
+
446
+ // Update power display
447
+ function updatePowerDisplay() {
448
+ elements.powerBar.style.width = `${gameState.power}%`;
449
+ elements.powerPercent.textContent = `${Math.floor(gameState.power)}%`;
450
+
451
+ // Low power effects
452
+ if (gameState.power < 20) {
453
+ elements.powerBar.classList.add('bg-red-500');
454
+ elements.powerBar.classList.remove('bg-blue-500');
455
+
456
+ // Random flickering
457
+ if (Math.random() < 0.3) {
458
+ elements.gameContainer.classList.add('opacity-50');
459
+ setTimeout(() => {
460
+ elements.gameContainer.classList.remove('opacity-50');
461
+ }, 200);
462
+ }
463
+ } else {
464
+ elements.powerBar.classList.remove('bg-red-500');
465
+ elements.powerBar.classList.add('bg-blue-500');
466
+ }
467
+
468
+ // Power outage
469
+ if (gameState.power <= 0) {
470
+ gameState.power = 0;
471
+ triggerPowerOutage();
472
+ }
473
+ }
474
+
475
+ // Update time display
476
+ function updateTimeDisplay() {
477
+ const hours = Math.floor(gameState.time / 60);
478
+ const minutes = gameState.time % 60;
479
+ const ampm = hours >= 6 ? 'PM' : 'AM';
480
+ const displayHours = hours % 12 || 12;
481
+
482
+ elements.gameTime.textContent = `${displayHours}:${minutes < 10 ? '0' + minutes : minutes} ${ampm}`;
483
+
484
+ // Night completion
485
+ if (gameState.time >= 360) {
486
+ alert(`Congratulations! You survived Night ${gameState.night}!`);
487
+ gameState.night++;
488
+ elements.nightNumber.textContent = gameState.night;
489
+ resetNight();
490
+ }
491
+ }
492
+
493
+ // Update mutant visibility
494
+ function updateMutantVisibility() {
495
+ // Hide all mutants first
496
+ document.querySelectorAll('.mutant-presence').forEach(el => {
497
+ el.classList.remove('visible');
498
+ });
499
+
500
+ // Show mutants in current camera view
501
+ Object.keys(gameState.mutants).forEach(mutantId => {
502
+ const mutant = gameState.mutants[mutantId];
503
+ if (mutant.location === gameState.currentCam) {
504
+ const mutantEl = document.getElementById(`mutant-${mutantId}`);
505
+ mutantEl.classList.add('visible');
506
+
507
+ // Show fake movements
508
+ if (mutant.fakeMoves > 0) {
509
+ mutantEl.style.transform = `translateX(${Math.random() * 20 - 10}px)`;
510
+ }
511
+ }
512
+ });
513
+ }
514
+
515
+ // Update threat level
516
+ function updateThreatLevel() {
517
+ let threatScore = 0;
518
+
519
+ Object.keys(gameState.mutants).forEach(mutantId => {
520
+ const mutant = gameState.mutants[mutantId];
521
+ threatScore += mutant.location * mutant.aggression;
522
+ });
523
+
524
+ threatScore = threatScore / 10 + (gameState.time / 60);
525
+
526
+ if (threatScore < 5) {
527
+ elements.threatLevel.textContent = "Low";
528
+ elements.threatLevel.className = "text-green-500";
529
+ } else if (threatScore < 10) {
530
+ elements.threatLevel.textContent = "Medium";
531
+ elements.threatLevel.className = "text-yellow-500";
532
+ } else if (threatScore < 20) {
533
+ elements.threatLevel.textContent = "High";
534
+ elements.threatLevel.className = "text-orange-500";
535
+ } else {
536
+ elements.threatLevel.textContent = "Extreme";
537
+ elements.threatLevel.className = "text-red-500";
538
+ }
539
+ }
540
+
541
+ // Update serum display
542
+ function updateSerumDisplay() {
543
+ elements.serumCount.textContent = gameState.serumCount;
544
+ elements.serumProgress.style.width = `${gameState.serumProgress}%`;
545
+ elements.serumPercent.textContent = Math.floor(gameState.serumProgress);
546
+
547
+ if (gameState.serumProgress >= 100) {
548
+ elements.serumStatus.textContent = "Complete";
549
+ elements.serumStatus.className = "text-green-500";
550
+ } else if (gameState.serumCount <= 0) {
551
+ elements.serumStatus.textContent = "Depleted";
552
+ elements.serumStatus.className = "text-red-500";
553
+ } else {
554
+ elements.serumStatus.textContent = "Ready";
555
+ elements.serumStatus.className = "text-yellow-500";
556
+ }
557
+ }
558
+
559
+ // Update power consumption
560
+ function updatePower() {
561
+ // Base power drain
562
+ gameState.power -= 2;
563
+
564
+ // Base power drain only
565
+
566
+ if (gameState.power < 0) gameState.power = 0;
567
+
568
+ updatePowerDisplay();
569
+ }
570
+
571
+ // Trigger power outage
572
+ function triggerPowerOutage() {
573
+ elements.staticSound.currentTime = 0;
574
+ elements.staticSound.play();
575
+
576
+ // Disable all systems
577
+ gameState.leftDoor = false;
578
+ gameState.rightDoor = false;
579
+ gameState.leftVent = false;
580
+ gameState.rightVent = false;
581
+
582
+ // Update UI
583
+ elements.leftDoorIcon.className = 'fas fa-door-open mr-2';
584
+ elements.rightDoorIcon.className = 'fas fa-door-open mr-2';
585
+ elements.leftVentIcon.className = 'fas fa-fan mr-2';
586
+ elements.rightVentIcon.className = 'fas fa-fan mr-2';
587
+
588
+ // Game over soon if mutants are nearby
589
+ setTimeout(() => {
590
+ if (!gameState.gameOver) {
591
+ triggerJumpscare(Math.floor(Math.random() * 4) + 1);
592
+ }
593
+ }, 5000);
594
+ }
595
+
596
+ // Reset for new night
597
+ function resetNight() {
598
+ gameState.power = 100;
599
+ gameState.leftDoor = false;
600
+ gameState.rightDoor = false;
601
+ gameState.leftVent = false;
602
+ gameState.rightVent = false;
603
+ gameState.serumCount = 3;
604
+ gameState.serumProgress = 0;
605
+ gameState.time = 0;
606
+ gameState.gameOver = false;
607
+
608
+ // Reset mutants
609
+ Object.keys(gameState.mutants).forEach(mutantId => {
610
+ gameState.mutants[mutantId].location = 1;
611
+ gameState.mutants[mutantId].fakeMoves = 0;
612
+ });
613
+
614
+ // Reset UI
615
+ elements.jumpscare.style.opacity = "0";
616
+ elements.staticSound.pause();
617
+ elements.leftDoorIcon.className = 'fas fa-door-open mr-2';
618
+ elements.rightDoorIcon.className = 'fas fa-door-open mr-2';
619
+ elements.leftVentIcon.className = 'fas fa-fan mr-2';
620
+ elements.rightVentIcon.className = 'fas fa-fan mr-2';
621
+ elements.currentCamDisplay.textContent = 'CAM 1: Main Hall';
622
+ gameState.currentCam = 1;
623
+
624
+ updatePowerDisplay();
625
+ updateSerumDisplay();
626
+ updateTimeDisplay();
627
+ updateMutantVisibility();
628
+ }
629
+
630
+ // Initialize game when page loads
631
+ window.onload = initGame;
632
+ </script>
633
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Soda5601/zb" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
634
+ </html>