-
Notifications
You must be signed in to change notification settings - Fork 1
/
alioth.html
684 lines (672 loc) · 50.3 KB
/
alioth.html
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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Alioth</title>
<link rel="stylesheet" type="text/css" href="css/browser_reset.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
<style>
html {
background: url("images/Alioth.jpeg") no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
</style>
<script>
var dialoguecount = 0;
function stats() {
if (sessionStorage.getItem("ship") == "bloodstar") {
document.getElementById("shipicon").innerHTML = "<img src='images/Bloodstar.jpeg' width='150' alt='The Bloodstar ship' /><p style='font-size: 15px;'>Ship: Bloodstar</p><p style='font-size: 15px;'>HP: " + hp + "</p><p style='font-size: 15px;'>Bonus: Extra HP</p>";
} else if (sessionStorage.getItem("ship") == "blue fyre") {
document.getElementById("shipicon").innerHTML = "<img src='images/Blue_Fyre.png' width='150' alt='The Blue Fyre ship' /><p style='font-size: 15px;'>Ship: Blue Fyre</p><p style='font-size: 15px;'>HP: " + hp + "</p><p style='font-size: 10px;'>Bonus: 50% chance to attack twice</p>";
} else if (sessionStorage.getItem("ship") == "gator custom") {
document.getElementById("shipicon").innerHTML = "<img src='images/Gator_Custom.png' width='150' alt='The Gator Custom ship' /><p style='font-size: 15px;'>Ship: Gator Custom</p><p style='font-size: 15px;'>HP: " + hp + "</p><p style='font-size: 8px;'>Bonus: 100% more dmg with missiles</p>";
} else if (sessionStorage.getItem("ship") == "amboss") {
document.getElementById("shipicon").innerHTML = "<img src='images/Amboss.png' width='150' alt='The Amboss ship' /><p style='font-size: 15px;'>Ship: Amboss</p><p style='font-size: 15px;'>HP: " + hp + "</p><p style='font-size: 10px;'>Bonus: 40% dodge chance</p>";
} else if (sessionStorage.getItem("ship") == "dark angel") {
document.getElementById("shipicon").innerHTML = "<img src='images/Dark_Angel.jpeg' width='150' alt='The Dark Angel ship' /><p style='font-size: 15px;'>Ship: Dark Angel</p><p style='font-size: 15px;'>HP: " + hp + "</p><p style='font-size: 8px;'>Bonus: 300% more dmg under 50% HP</p>";
}
return false;
}
function continuebutton() {
dialoguecount += 1;
if (sessionStorage.getItem("victoryalioth") == null) {
gamestart();
} else {
afterbattle();
}
return false;
}
function gamestart() {
if (sessionStorage.getItem("victoryalioth") == "beaten") {
dialoguecount = -1;
}
if (dialoguecount == 0) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>The Narrator<img src='images/Narrator.png' width='60' alt='The narrator' style='margin-right: 20px; margin-left: 20px;'/>Our hero is taken to Alioth, a modern Nivelian station in the Augmenta system. Here, in jail, he meets an unexpected friend.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='displayBattle()'>Skip</button></div>";
} else if (dialoguecount == 1) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Keith T. Maxwell<img src='images/Keith_T_Maxwell.png' width='50' alt='Keith T Maxwell icon' style='margin-right: 20px; margin-left: 20px;'/>Wow, jail is really boring. Hold on... is that...?<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='displayBattle()'>Skip</button></div>";
} else if (dialoguecount == 2) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>Keith T. Maxwell? Keith!<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='displayBattle()'>Skip</button></div>";
} else if (dialoguecount == 3) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Keith T. Maxwell<img src='images/Keith_T_Maxwell.png' width='50' alt='Keith T Maxwell icon' style='margin-right: 20px; margin-left: 20px;'/>Brent Snocom! It's been years! I'd never thought I'd see you on this side of the galaxy.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='displayBattle()'>Skip</button></div>";
} else if (dialoguecount == 4) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>Good to see you, old friend. And I never thought I'd see you in jail.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='displayBattle()'>Skip</button></div>";
} else if (dialoguecount == 5) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Keith T. Maxwell<img src='images/Keith_T_Maxwell.png' width='50' alt='Keith T Maxwell icon' style='margin-right: 20px; margin-left: 20px;'/>Some lunatics in Yrdal Gedal mistook me for a pirate. Still, it feels like I'm the one who's gone mad!<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='displayBattle()'>Skip</button></div>";
} else if (dialoguecount == 6) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>C'mon, I'll bail you out. They've made me a commander five years ago. What've you been up to? You look like you haven't aged a day.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='displayBattle()'>Skip</button></div>";
} else if (dialoguecount == 7) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Keith T. Maxwell<img src='images/Keith_T_Maxwell.png' width='50' alt='Keith T Maxwell icon' style='margin-right: 20px; margin-left: 20px;'/>Oh, it's a long story, trust me. So, what's been going on these past few years?<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='displayBattle()'>Skip</button></div>";
} else if (dialoguecount == 8) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>A lot, actually. Have you ever heard of the Voids?<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='displayBattle()'>Skip</button></div>";
} else if (dialoguecount == 9) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>Starting a decade ago, a mysterious race of aliens with supremely advanced technology have been raiding stations all over the galaxy.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='displayBattle()'>Skip</button></div>";
} else if (dialoguecount == 10) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Keith T. Maxwell<img src='images/Keith_T_Maxwell.png' width='50' alt='Keith T Maxwell icon' style='margin-right: 20px; margin-left: 20px;'/>No, never heard of them. Wait, the galaxy? How big is their civilization?<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='displayBattle()'>Skip</button></div>";
} else if (dialoguecount == 11) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>That's the thing. They know how to use and create wormholes. They can appear anywhere, anytime, without warning. No one is safe.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='displayBattle()'>Skip</button></div>";
} else if (dialoguecount == 12) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>Their attacks are really starting to take a toll on the economy. Factions are unwilling to trade more frequently.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='displayBattle()'>Skip</button></div>";
} else if (dialoguecount == 13) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>They're the biggest threat in the galaxy. We've never found their home system. Some believe perhaps it's not in our galaxy.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='displayBattle()'>Skip</button></div>";
} else if (dialoguecount == 14) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Keith T. Maxwell<img src='images/Keith_T_Maxwell.png' width='50' alt='Keith T Maxwell icon' style='margin-right: 20px; margin-left: 20px;'/>Wow. They sound strong. Well, I'm technically M.I.A. for Eden Prime. I suppose I can help you deal with them here.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='displayBattle()'>Skip</button></div>";
} else if (dialoguecount == 15) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>Missing in action? Wait, our homeworld thinks you're dead? What exactly happened?<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='displayBattle()'>Skip</button></div>";
} else if (dialoguecount == 16) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Station AI<img src='images/Ship_AI.jpeg' width='60' alt='icon of Station AI' style='margin-right: 20px; margin-left: 20px;'/>ALERT! ALERT! WORMHOLE DETECTED! VOIDS ATTACKING! CALLING ALL ABLE-FIGHTERS!<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='displayBattle()'>Skip</button></div>";
} else if (dialoguecount == 17) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>No way! Well Keith, if you're going to help deal with these buggers, it better be now!<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='displayBattle()'>Skip</button></div>";
} else if (dialoguecount == 18) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Keith T. Maxwell<img src='images/Keith_T_Maxwell.png' width='50' alt='Keith T Maxwell icon' style='margin-right: 20px; margin-left: 20px;'/>Leave it to me.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='displayBattle()'>Skip</button></div>";
} else if (dialoguecount == 19) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>The Narrator<img src='images/Narrator.png' width='60' alt='The narrator' style='margin-right: 20px; margin-left: 20px;'/>Impending doom approaches... Click \"continue\" and click \"Battle\"<button id='continuebutton' onclick='displayBattle()'>Continue</button><button id='continuebutton' onclick='displayBattle()'>Skip</button></div>";
}
return false;
}
function displayBattle() {
document.getElementById("displaybattle").innerHTML = "<button onclick='battle()' class='centrebutton'>Battle</button>";
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>BATTLE UNLOCKED</div>";
return false;
}
function randomInt(pmin, pmax) {
randomnumber = Math.floor(Math.random() * (pmax - pmin + 1) + pmin);
return(randomnumber);
}
function autowin() {
victory = true;
victorycheck();
return false;
}
function getship() {
if (sessionStorage.getItem("ship") == "bloodstar") {
shipname = "Bloodstar";
shipimg = "Bloodstar.jpeg";
shipalt = "The Bloodstar ship";
} else if (sessionStorage.getItem("ship") == "blue fyre") {
shipname = "Blue Fyre";
shipimg = "Blue_Fyre.png";
shipalt = "The Blue Fyre ship";
} else if (sessionStorage.getItem("ship") == "gator custom") {
shipname = "Gator Custom";
shipimg = "Gator_Custom.png";
shipalt = "The Gator Custom ship";
} else if (sessionStorage.getItem("ship") == "amboss") {
shipname = "Amboss";
shipimg = "Amboss.png";
shipalt = "The Amboss ship";
} else if (sessionStorage.getItem("ship") == "dark angel") {
shipname = "Dark Angel";
shipimg = "Dark_Angel.jpeg";
shipalt = "The Dark Angel ship";
}
return false;
}
function createbattlefield() {
shields();
document.getElementById("dialoguebox").innerHTML = "";
document.getElementById("displaybattle").innerHTML = "<button onclick='battle()' class='centrebutton'>Battle</button><br><button onclick='autowin()' class='centrebutton'>Auto-Win</button>";
document.getElementById("shipicon").innerHTML = "<img src='images/'" + shipimg + " width='150' alt='" + shipalt + "' /><p style='font-size: 15px;'>Ship: " + shipname + "</p><p style='font-size: 15px;'>HP: " + hp + "</p><p style='font-size: 15px;'>Bonus: Extra HP</p>";
document.getElementById("battlefield").innerHTML = "<h2>Battlefield</h2><table id='battlefieldbox'><tr><td><img src='images/Void_Enemy.jpeg' width='150' alt='Enemy Void spaceship' style='" + enemyshieldup + "'/><p>Void</p><p>HP: " + enemyhp + "</p></td></tr><tr><td><img src='images/" + shipimg + "' width='150' alt='" + shipalt + "' style='" + shieldup + "'><p>" + shipname + "</p><p>HP: " + hp + "</td></tr></table>";
document.getElementById("turnmenu").innerHTML = "<table><tr><td><p>Attack Menu</p><form id='attackmenu' name='Attack Menu' method='post'><p><input checked type='radio' id='Lasers' name='attack' value='lasers' />Lasers</p><p><input type='radio' id='Missiles' name='attack' value='missiles' />Missiles</p><p><input type='radio' id='Repair' name='attack' value='repair' />Repair</p></form></td><td><p>Defend Menu</p><form id='defend menu' name='Defend Menu' method='post'><p><input checked type='radio' id='Shield' name='defend' value='shield' />Shield</p><p><input type='radio' id='Hull' name='defend' value='hull' />Hull</p><p><input type='radio' id='Charge' name='defend' value='charge' />Charge</p></form></td></tr></table><br><p><button onclick='endturn()' class='centrebutton'>End Turn</button></p>";
stats();
return false;
}
function shields() {
if (charge == true) {
shieldup = "border: solid; border-color: red; border-width: 5px;";
} else if (shield == true) {
shieldup = "border: solid; border-color: blue; border-width: 5px;";
} else if (shield == false) {
shieldup = "";
}
if (enemycharge == true) {
enemyshieldup = "border: solid; border-color: red; border-width: 5px;";
} else if (enemyshield == true) {
enemyshieldup = "border: solid; border-color: blue; border-width: 5px;";
} else if (enemyshield == false) {
enemyshieldup = "";
}
return false;
}
function bloodstar() {
if (sessionStorage.getItem("ship") == "bloodstar") {
hp = 100;
maxhp = 100;
}
return false;
}
function bluefyre() {
if (sessionStorage.getItem("ship") == "blue fyre") {
if (randomInt(1, 2) == 1) {
enemyhp -= dmg;
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>The Blue Fyre struck twice! You dealt " + dmg + " damage again!<button id='continuebutton' onclick='enemyturn()'>Continue</button></div>";
victorycheck();
} else {
enemyturn();
}
} else {
enemyturn();
}
return false;
}
function darkangel() {
if (sessionStorage.getItem("ship") == "dark angel") {
if (hp < (maxhp * 0.5)) {
dmg *= 4;
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>The Dark Angel has powered up!<button id='continuebutton' onclick='enemyturn()'>Continue</button></div>";
}
}
return false;
}
function gatorcustom() {
if (sessionStorage.getItem("ship") == "gator custom") {
dmg *= 2;
}
return false;
}
function amboss() {
if (sessionStorage.getItem("ship") == "amboss") {
dodgechance = randomInt(1, 10);
if (dodgechance >= 1 && dodgechance <= 4) {
ambossdodge = true;
enemydmg = 0;
}
}
return false;
}
function raccoon() {
if (sessionStorage.getItem("devweapon") == "raccoon") {
dmg = enemyhp;
}
return false;
}
function enemyhplimit() {
if (enemyhp < 0) {
enemyhp = 0;
}
return false;
}
function hplimit() {
if (hp < 0) {
hp = 0;
}
return false;
}
function maxhplimit() {
if (hp > maxhp) {
hp = maxhp;
}
return false;
}
function lasers() {
if (charge == true || enemycharge == true) {
dmg = 10;
darkangel();
if (charge == true) {
if (randomInt(1, 4) == 1) {
dmg *= 5;
}
}
raccoon();
enemyhp -= dmg;
enemyhplimit();
if (charge == true) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>You used lasers while charged! You dealt " + dmg + " damage!<button id='continuebutton' onclick='bluefyre()'>Continue</button></div>";
} else if (enemycharge == true) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>You used lasers while the enemy was charged! You dealt " + dmg + " damage!<button id='continuebutton' onclick='bluefyre()'>Continue</button></div>";
}
victorycheck();
} else if (enemyshield == true) {
dmg = 10;
raccoon();
darkangel();
enemyhp -= dmg;
enemyhplimit();
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>You used lasers! You dealt " + dmg + " damage!<button id='continuebutton' onclick='bluefyre()'>Continue</button></div>";
victorycheck();
} else if (enemyshield == false) {
dmg = 5;
raccoon();
darkangel();
enemyhp -= dmg;
enemyhplimit();
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>You used lasers! You dealt " + dmg + " damage!<button id='continuebutton' onclick='bluefyre()'>Continue</button></div>";
victorycheck();
}
return false;
}
function missiles() {
if (charge == true || enemycharge == true) {
dmg = 10;
darkangel();
gatorcustom();
if (charge == true) {
if (randomInt(1, 4) == 1) {
dmg *= 5;
}
}
enemyhp -= dmg;
enemyhplimit();
if (charge == true) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>You used missiles while charged! You dealt " + dmg + " damage!<button id='continuebutton' onclick='bluefyre()'>Continue</button></div>";
} else if (enemycharge == true) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>You used missiles while the enemy was charged! You dealt " + dmg + " damage!<button id='continuebutton' onclick='bluefyre()'>Continue</button></div>";
}
victorycheck();
} else if (enemyshield == true) {
dmg = 5;
darkangel();
gatorcustom();
enemyhp -= dmg;
enemyhplimit();
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>You used missiles! You dealt " + dmg + " damage!<button id='continuebutton' onclick='bluefyre()'>Continue</button></div>";
victorycheck();
} else if (enemyshield == false) {
dmg = 10;
darkangel();
gatorcustom();
enemyhp -= dmg;
enemyhplimit();
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>You used missiles! You dealt " + dmg + " damage!<button id='continuebutton' onclick='bluefyre()'>Continue</button></div>";
victorycheck();
}
return false;
}
function repair() {
healchance = randomInt(1, 10);
if (healchance == 1) {
hp += 20;
maxhplimit();
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>You used repair and got lucky! You healed 20 HP!<button id='continuebutton' onclick='enemyturn()'>Continue</button></div>";
} else {
hp += 10;
maxhplimit();
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>You used repair! You healed 10 HP!<button id='continuebutton' onclick='enemyturn()'>Continue</button></div>";
}
return false;
}
function shieldZ() {
shield = true;
return false;
}
function hullZ() {
shield = false;
return false;
}
function chargeZ() {
charge = true;
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>You are charging up!<button id='continuebutton' onclick='enemyturn()'>Continue</button></div>";
return false;
}
function enemylasers() {
if (enemycharge == true || charge == true) {
enemydmg = 10;
if (enemycharge == true) {
if (randomInt(1, 1) == 1) {
enemydmg *= 4;
}
}
amboss();
hp -= enemydmg;
hplimit();
defeatcheck();
if (enemycharge == true) {
if (ambossdodge == true) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>The enemy used lasers while charged! You dodged the attack!<button id='continuebutton' onclick='battle()'>Continue</button></div>";
} else {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>The enemy used lasers while charged! The enemy dealt " + enemydmg + " damage!<button id='continuebutton' onclick='battle()'>Continue</button></div>";
}
} else if (charge == true) {
if (ambossdodge == true) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>The enemy used lasers while you were charged! You dodged the attack!<button id='continuebutton' onclick='battle()'>Continue</button></div>";
} else {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>The enemy used lasers while you were charged! The enemy dealt " + enemydmg + " damage!<button id='continuebutton' onclick='battle()'>Continue</button></div>";
}
}
} else if (shield == true) {
enemydmg = 10;
amboss();
hp -= enemydmg;
hplimit();
defeatcheck();
if (ambossdodge == true) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>The enemy used lasers! You dodged the attack!<button id='continuebutton' onclick='battle()'>Continue</button></div>";
} else {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>The enemy used lasers! The enemy dealt " + enemydmg + " damage!<button id='continuebutton' onclick='battle()'>Continue</button></div>";
}
defeatcheck();
} else if (shield == false) {
enemydmg = 5;
amboss();
hp -= enemydmg;
hplimit();
defeatcheck();
if (ambossdodge == true) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>The enemy used lasers! You dodged the attack!<button id='continuebutton' onclick='battle()'>Continue</button></div>";
} else {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>The enemy used lasers! The enemy dealt " + enemydmg + " damage!<button id='continuebutton' onclick='battle()'>Continue</button></div>";
}
}
ambossdodge = false;
return false;
}
function enemymissiles() {
if (enemycharge == true || charge == true) {
enemydmg = 10;
if (enemycharge == true) {
if (randomInt(1, 1) == 1) {
enemydmg *= 4;
}
}
amboss();
hp -= enemydmg;
hplimit();
defeatcheck();
if (enemycharge == true) {
if (ambossdodge == true) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>The enemy used lasers while charged! You dodged the attack!<button id='continuebutton' onclick='battle()'>Continue</button></div>";
} else {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>The enemy used lasers while charged! The enemy dealt " + enemydmg + " damage!<button id='continuebutton' onclick='battle()'>Continue</button></div>";
}
} else if (charge == true) {
if (ambossdodge == true) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>The enemy used lasers while you were charged! You dodged the attack!<button id='continuebutton' onclick='battle()'>Continue</button></div>";
} else {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>The enemy used lasers while you were charged! The enemy dealt " + enemydmg + " damage!<button id='continuebutton' onclick='battle()'>Continue</button></div>";
}
}
} else if (shield == true) {
enemydmg = 5;
amboss();
hp -= enemydmg;
hplimit();
defeatcheck();
if (ambossdodge == true) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>The enemy used missiles! You dodged the attack!<button id='continuebutton' onclick='battle()'>Continue</button></div>";
} else {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>The enemy used missiles! The enemy dealt " + enemydmg + " damage!<button id='continuebutton' onclick='battle()'>Continue</button></div>";
}
} else if (shield == false) {
enemydmg = 10;
amboss();
hp -= enemydmg;
hplimit();
defeatcheck();
if (ambossdodge == true) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>The enemy used missiles! You dodged the attack!<button id='continuebutton' onclick='battle()'>Continue</button></div>";
} else {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>The enemy used missiles! The enemy dealt " + enemydmg + " damage!<button id='continuebutton' onclick='battle()'>Continue</button></div>";
}
}
ambossdodge = false;
return false;
}
function enemyshieldZ() {
enemyshield = true;
enemycharge = false;
return false;
}
function enemyhullZ() {
enemyshield = false;
enemycharge = false;
return false;
}
function enemychargeZ() {
enemycharge = true;
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>The enemy is charging up!<button id='continuebutton' onclick='battle()'>Continue</button></div>";
return false;
}
function endturn() {
if (document.getElementById("Charge").checked) {
chargeZ();
} else if (document.getElementById("Lasers").checked) {
lasers();
} else if (document.getElementById("Missiles").checked) {
missiles();
} else if (document.getElementById("Repair").checked) {
repair();
}
if (document.getElementById("Shield").checked) {
charge = false;
shieldZ();
} else if (document.getElementById("Hull").checked) {
charge = false;
hullZ();
}
return false;
}
function enemyturn() {
createbattlefield();
defendchance = randomInt(1, 100);
if (defendchance >= 1 && defendchance <= 85) {
enemyshieldZ();
} else if (defendchance < 1) {
enemyhullZ();
} else if (defendchance >= 86 && defendchance <= 100 && enemycharge == false) {
enemychargeZ();
}
if (enemycharge == false) {
attackchance = randomInt(1, 2);
if (attackchance == 1) {
enemylasers();
} else if (attackchance == 2) {
enemymissiles();
}
}
return false;
}
function victorycheck() {
enemyhplimit();
if (enemyhp == 0) {
enemycount -= 1;
enemyhp = 50;
justkilledenemy = true;
document.getElementById("battlefield").innerHTML = "<h2>Battlefield</h2><table id='battlefieldbox'><tr><td><img src='images/explosion.png' width='150' alt='explosion, a very dead enemy'</p></td></tr><tr><td><img src='images/" + shipimg + "' width='150' alt='" + shipalt + "' style='" + shieldup + "'><p>" + shipname + "</p><p>HP: " + hp + "</td></tr></table>";
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>You defeated an enemy!<button id='continuebutton' onclick='battle()'>Continue</button></div>";
if (enemycount == 0) {
victory = true;
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>VICTORY.<button id='continuebutton' onclick='afterbattle()'>Continue</button></div>";
afterbattle();
}
}
if (victory == true) {
dialoguecount = 0;
document.getElementById("battlefield").innerHTML = "<h2>Battlefield</h2><table id='battlefieldbox'><tr><td><img src='images/explosion.png' width='150' alt='explosion, a very dead enemy'</p></td></tr><tr><td><img src='images/" + shipimg + "' width='150' alt='" + shipalt + "' style='" + shieldup + "'><p>" + shipname + "</p><p>HP: " + hp + "</td></tr></table>";
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>VICTORY.<button id='continuebutton' onclick='afterbattle()'>Continue</button></div>";
}
return false;
}
function defeatcheck() {
if (hp == 0) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>GAME OVER.<button id='continuebutton' onclick='battle()'>Restart</button></div>";
document.getElementById("shipicon").innerHTML = "<img src='images/" + shipimg + "' width='150' alt='" + shipalt + "' /><p style='font-size: 15px;'>Ship: " + shipname + "</p><p style='font-size: 15px;'>HP: " + hp + "</p><p style='font-size: 15px;'>Bonus: Extra HP</p>";
document.getElementById("battlefield").innerHTML = "<h2>Battlefield</h2><table id='battlefieldbox'><tr><td><img src='images/Void_Enemy.jpeg' width='150' alt='Enemy Void spaceship' style='" + enemyshieldup + "'/><p>Void</p><p>HP: " + enemyhp + "</p></td></tr><tr><td><img src='images/explosion.png' width='150' alt='explosion, you are dead'><p>" + shipname + "</p><p>HP: " + hp + "</td></tr></table>";
document.getElementById("turnmenu").innerHTML = "";
victory = false;
justkilledenemy = false;
hp = 50;
maxhp = 50;
bloodstar();
dmg;
shield = true;
shieldup;
charge = false;
ambossdodge = false;
enemycount = 3;
enemyhp = 60;
enemydmg;
enemyshield = true;
enemyshieldup;
enemycharge = false;
}
return false;
}
function battle() {
music.play();
if (justkilledenemy == true) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>NEW ENEMY!<button id='continuebutton' onclick='createbattlefield()'>Continue</button></div></div>";
justkilledenemy = false;
enemyshield = true;
enemycharge = false;
} else {
createbattlefield();
}
return false;
}
function afterbattle() {
music.pause();
sessionStorage.setItem("victoryalioth", "beaten");
sessionStorage.setItem("thynomestation", "thynomestation");
if (dialoguecount == 0) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Keith T. Maxwell<img src='images/Keith_T_Maxwell.png' width='50' alt='Keith T Maxwell icon' style='margin-right: 20px; margin-left: 20px;'/>Quick, the ones we didn't get are escaping!<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 1) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Void<img src='images/Void.jpeg' width='70' alt='a Void icon' style='margin-right: 20px; margin-left: 20px;'/>⏃⍜⌇☌⊑⍜⏃⌇⎍⊑☌⟟⎍⏃⌇⊑☌⎍⏃⌇⊑⎍!<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 2) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>You're right! Capturing an intact ship or at least one of them alive can open so many possibilities for finding their home system!<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 3) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>All units, don't let the Voids reach the wormhole!<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 4) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Void<img src='images/Void.jpeg' width='70' alt='a Void icon' style='margin-right: 20px; margin-left: 20px;'/>⏃⌇⊑☌⎍⌇☌⏃⍜⟟⎍⊑⍜⏃⌇⎍⏃⍜⟟⎍⊑☌⏃⌇⊑⎍⍜⏃⌇!<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 5) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Keith T. Maxwell<img src='images/Keith_T_Maxwell.png' width='50' alt='Keith T Maxwell icon' style='margin-right: 20px; margin-left: 20px;'/>Damn! They're quick, that's for sure. They got away.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 6) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>And the wormhole closed. It's okay, they're gone.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 7) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>Now Keith, I think you owe me an explanation. Why were you in Alioth's prison?<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 8) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Keith T. Maxwell<img src='images/Keith_T_Maxwell.png' width='50' alt='Keith T Maxwell icon' style='margin-right: 20px; margin-left: 20px;'/>I suppose you're right. Let's meet back at the station, then I'll tell you all about it.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 9) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>The Narrator<img src='images/Narrator.png' width='60' alt='The narrator' style='margin-right: 20px; margin-left: 20px;'/>After a long talk, our hero updates Brent Snocom on his entire story thus far...<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 10) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>Still can't believe it... 35 years you've been gone...<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 11) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>As for Gunant's convoy, don't worry about it. I've already notifed him that they're fine.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 12) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>They were attacked by pirates and their radio communicator got damaged. They're safely on their way to Deuter V now, though.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 13) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Keith T. Maxwell<img src='images/Keith_T_Maxwell.png' width='50' alt='Keith T Maxwell icon' style='margin-right: 20px; margin-left: 20px;'/>Glad to hear. Anyway, these so-called Voids... if their attacks have been going on for years, what have we done to stop them?<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 14) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>I'm glad you asked. For the longest time, we had no way of ever finding their home system.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 15) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>However, Deep Science is really close to a revolutionary invention.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
}else if (dialoguecount == 16) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>Deep Science is a leading weapons and technology company of the Terran Federation. They're headquartered at Thynome.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 17) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>Over the years we've scavenged these strange \"Void crystals\" from destroyed Void ships. Deep Science has studied them for years.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 18) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>Quite recently, they've figured out how to use them to locate the home system of the Voids.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 19) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>But it's still experimental, that's why I didn't mention this before.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
}else if (dialoguecount == 20) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Keith T. Maxwell<img src='images/Keith_T_Maxwell.png' width='50' alt='Keith T Maxwell icon' style='margin-right: 20px; margin-left: 20px;'/>That's great! Is this the revolutionary invention you're talking about?<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 21) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>Precisely. It's called the Khador Drive, named after the Grey scientist who's leading its creation.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 22) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>In fact, something's been hindering their progress for a while now.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 23) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>They've been needing a strong fighter pilot for something to help them complete it.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 24) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>But all the best ones are busy fighting other wars, or the Voids.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
}else if (dialoguecount == 25) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Keith T. Maxwell<img src='images/Keith_T_Maxwell.png' width='50' alt='Keith T Maxwell icon' style='margin-right: 20px; margin-left: 20px;'/>I'll do it. Send me the coordinates of Thynome and I can pay Deep Science a visit. I'll talk with this Khador fellow, see if I can help.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 26) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>Really? It could be a dangerous mission for all I know. But to be fair, you're not busy. And you're one of the Federation's top fighters.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 27) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>Alright. I'll send you the coordinates of the station. Your new mission is to talk to Khador there, see what he needs you for.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 28) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>I'll make sure to notify him about your arrival.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
}else if (dialoguecount == 29) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Keith T. Maxwell<img src='images/Keith_T_Maxwell.png' width='50' alt='Keith T Maxwell icon' style='margin-right: 20px; margin-left: 20px;'/>Sounds great. I'll head there whenever I'm ready.<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 30) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>Brent Snocom<img src='images/Brent_Snocom.png' width='50' alt='Brent Snocom icon' style='margin-right: 20px; margin-left: 20px;'/>Well, preferably as soon as possible. The galaxy's fate is hanging on your shoulders...<button id='continuebutton' onclick='continuebutton()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
} else if (dialoguecount == 31) {
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>The Narrator<img src='images/Narrator.png' width='60' alt='The narrator' style='margin-right: 20px; margin-left: 20px;'/>And so our hero heads to Thynome Station...<button id='continuebutton' onclick='nextroom()'>Continue</button><button id='continuebutton' onclick='nextroom()'>Skip</button></div>";
}
return false;
}
function nextroom() {
sessionStorage.setItem("alioth", "alioth");
document.getElementById("mapbox").innerHTML = "<img src='images/Thynome_Station.jpeg' width='60' alt='Thynome Station icon' style='margin-right: 20px; margin-left: 20px; '/><a href='thynomestation.html'>Thynome Station</a>";
document.getElementById("dialoguebox").innerHTML = "<div class='dialogue'>NEW MAP LOCATION UNLOCKED: Thynome Station</div>";
return false;
}
var shipname;
var shipimg;
var shipalt;
getship();
var victory = false;
var justkilledenemy = false;
var hp = 50;
var maxhp = 50;
bloodstar();
var dmg;
var shield = true;
var shieldup;
var charge = false;
var ambossdodge = false;
var enemycount = 3;
var enemyhp = 60;
var enemydmg;
var enemyshield = true;
var enemyshieldup;
var enemycharge = false;
</script>
</head>
<body>
<div class="box">
<h1>Alioth</h1>
<p>A Nivelian planet and station known for their high tech. Danger Level: Medium</p>
</div>
<div class="box">
<h2>Map</h2>
<p><img src='images/background.jpg' width='60' alt='Home page icon' style='margin-right: 20px; margin-left: 20px; '/><a href='index.html'>Home</a></p>
<p><img src='images/Deuter_V.jpeg' width='60' alt='Deuter V icon' style='margin-right: 20px; margin-left: 20px; '/><a href='deuterv.html'>Deuter V</a></p>
<p><img src='images/Yrdal_Gedal.jpeg' width='50' alt='Yrdal Gedal icon' style='margin-right: 20px; margin-left: 20px; '/><a href='yrdalgedal.html'>Yrdal Gedal</a></p>
<p><img src='images/Alioth.jpeg' width='60' alt='Alioth icon' style='margin-right: 20px; margin-left: 20px; '/><a href='alioth.html'>Alioth</a></p>
<div id="mapbox"></div>
</div>
<div class="box">
<h2>Battle</h2>
<div id="displaybattle"></div>
<div id="battlefield"></div>
<div id="turnmenu"></div>
</div>
<div id="dialoguebox"></div>
<div id="shipicon"></div>
<div id="charactericon"></div>
<audio id="music" controls loop>
<source src="sound/The_Ambush.mp3" type="audio/mpeg">
</audio>
</body>
</html>
<script>
if (sessionStorage.getItem("thynomestation") != null) {
document.getElementById("mapbox").innerHTML = "<img src='images/Thynome_Station.jpeg' width='60' alt='Thynome Station icon' style='margin-right: 20px; margin-left: 20px; '/><a href='thynomestation.html'>Thynome Station</a>";
}
document.getElementById("charactericon").innerHTML = "<img src='images/Keith_T_Maxwell.png' width='75' alt='Character icon of Keith T. Maxwell' /><p style='font-size: 10px;'>Name: Keith T. Maxwell</p><p style='font-size: 10px;'>Sex: Male</p><p style='font-size: 10px;'>Race: Terran</p>";
stats();
gamestart();
</script>