-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1316 lines (1166 loc) · 85.7 KB
/
Copy pathindex.html
File metadata and controls
1316 lines (1166 loc) · 85.7 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
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
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<html>
<head>
<title>Volor Savanna</title>
<script>
function fetch_name()
{
let cookies = document.cookie.split(";");
for (let cookie of cookies)
{
cookie = cookie.trim();
if (cookie.startsWith("name="))
{
return cookie.split("=")[1];
}
}
return "Player";
}
function reset_js()
{
document.cookie = "name=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "character=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
clear_choices_js();
}
function clear_choices_js()
{
document.cookie = "hunter_list_0=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "hunter_list_1=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "hunter_list_2=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "hunter_list_3=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "hunter_list_4=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "hunter_list_5=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "hunter_list_6=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "hunter_list_7=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "hunter_list_8=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "hunter_list_9=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "hunter_list_10=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "the_mighty_lion_list_0=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "the_mighty_lion_list_1=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "the_mighty_lion_list_2=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "the_mighty_lion_list_3=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "the_mighty_lion_list_4=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "the_mighty_lion_list_5=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "the_mighty_lion_list_6=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "terrain_list_0=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "terrain_list_1=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "terrain_list_2=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "terrain_list_3=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "terrain_list_4=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "warrior_list_0=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "warrior_list_1=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "warrior_list_2=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "warrior_list_3=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "warrior_list_4=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "warrior_list_5=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "crafter_list_0=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "crafter_list_1=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "crafter_list_2=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "crafter_list_3=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "crafter_list_4=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "crafter_list_5=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "crafter_list_6=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "farmer_list_0=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "farmer_list_1=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "farmer_list_2=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "farmer_list_3=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "farmer_list_4=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "farmer_list_5=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "farmer_list_6=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "medicine_person_list_0=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "medicine_person_list_1=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "medicine_person_list_2=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "medicine_person_list_3=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "medicine_person_list_4=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "medicine_person_list_5=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "medicine_person_list_6=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "medicine_person_list_8=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "medicine_person_list_9=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "medicine_person_list_10=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "medicine_person_list_11=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
document.cookie = "medicine_person_list_12=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
}
function user_name()
{
document.getElementById("my_text").innerHTML = "What is your name?";
name = document.forms["choiceForm"]["choice_field"].value;
if (name != "")
{
document.cookie = "name=" + name + "; Path=/;";
}
}
function volor_savanna_original()
{
if (document.cookie.includes("character=hunter"))
{
hunter();
}
else if (document.cookie.includes("character=warrior"))
{
warrior();
}
else if (document.cookie.includes("character=the_mighty_lion"))
{
the_mighty_lion();
}
else if (document.cookie.includes("character=terrain"))
{
terrain();
}
else if (document.cookie.includes("character=crafter"))
{
crafter();
}
else if (document.cookie.includes("character=farmer"))
{
farmer();
}
else if (document.cookie.includes("character=medicine_person"))
{
medicine_person();
}
else if (document.cookie.includes("name="))
{
document.getElementById("my_text").innerHTML = "Welcome to Volor Savanna!<br>You are a member of an African Tribe!<br>Who do you want to be?<br><br>1- Hunter<br>2- Warrior<br>3- Crafter<br>4- Farmer<br>5- Medicine Person";
let character = document.forms["choiceForm"]["choice_field"].value;
if (character == "1")
{
document.cookie = "character=hunter; Path=/;";
document.cookie = "hunter_list_0=" + 0 + "; Path=/;";
location.reload();
}
if (character == "2")
{
document.cookie = "character=warrior; Path=/;";
document.cookie = "warrior_list_0=" + 0 + "; Path=/;";
location.reload();
}
if (character == "3")
{
document.cookie = "character=crafter; Path=/;";
document.cookie = "crafter_list_0=" + 0 + "; Path=/;";
location.reload();
}
if (character == "4")
{
document.cookie = "character=farmer; Path=/;";
document.cookie = "farmer_list_0=" + 0 + "; Path=/;";
location.reload();
}
if (character == "5")
{
document.cookie = "character=medicine_person; Path=/;";
document.cookie = "medicine_person_list_0=" + 0 + "; Path=/;";
location.reload();
}
}
else
{
user_name();
}
}
function hunter()
{
let name = fetch_name()
let death_level = name + ", YOU LOSE!<br>THE END!";
let victory_level = name + ", YOU WIN!<br>THE END!";
rand = Math.floor(Math.random() * 2) + 1;
document.cookie = "random_cookie=" + rand.toString() + "; Path=/;";
if (document.cookie.includes("hunter_list_0=0"))
{
document.getElementById("my_text").innerHTML = "You have chosen to be a hunter!<br>Do you want to go hunt or stay put?<br><br>1- Hunt; 2- Stay put<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "hunter_list_1=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("hunter_list_1=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to go hunt!<br>You have gone hunting.<br>You didn't find any food.<br>You return to your village.<br>Luckily, the farmer has enough crops to last your tribe a week.<br>Do you want to go hunt right away to make up lost time or do you choose to go eat?<br><br>1- Hunt; 2- Eat<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "hunter_list_2=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("hunter_list_1=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen to stay put.<br>Unfortunately, your whole village parishes from hunger.<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("hunter_list_2=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to go hunt!<br>You go on a successful hunt that should last your tribe a month.<br>However, you are very tired and because you didn't eat, you have become very sick with malnutrition.<br>Unluckily for you, the tribe's medicine woman is very busy and has a lot of patients to take care of first.<br>Do you wish to wait for her or tough it out?<br><br>1- Wait for her; 2- Tough it out<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "hunter_list_3=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("hunter_list_2=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen to eat.<br>You are fully fueled with energy.<br>Do you want to go hunting or play a game with the rest of your tribe?<br><br>1- Hunt; 2- Play a game with the rest of my tribe<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "hunter_list_4=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("hunter_list_3=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to wait for her.<br>Because you have chosen to wait for her patiently, she attends to you in a matter of a couple days.<br>You are better in a week.<br>Some white men have come to your tribe.<br>They're asking to trade you guns for some of your tribe's animal pelts.<br>Do you trade them pelts for guns?<br><br>1- Trade; 2- Not trade<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "hunter_list_5=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("hunter_list_3=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen to tough it out.<br>Unfortunately, because of this, you die from malnutrition.<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("hunter_list_4=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to hunt.<br>You have found a bunch of zebras to eat.<br>Some white men are willing to trade your tribe rifles for some of your zebras.<br>Recently, there have been some highly wanted criminals that trade weapons and drugs on the black market.<br>The problem is, you don't know if that's them.<br>Do you trade?<br>What about decline the offer?<br>Or do you report them to the authorities?<br><br>1- Trade; 2- Decline the trade; 3- Report them to the authorities<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "hunter_list_6=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("hunter_list_4=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen to play a game with the rest of your tribe.<br>Everyone has a good time and you guys have an awesome feast.<br>There is a hunting challenge that your tribe is having.<br>The challenge is to go hunt The Mighty Lion!<br>Do you want to go hunt The Mighty Lion with your tribe to win the challenge?<br><br>1- Yes; 2- No<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "hunter_list_7=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("hunter_list_5=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to trade.<br>They trade you guns.<br>Do you want to go hunt The Mighty Lion?<br><br>1- Yes; 2- No<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "hunter_list_8=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("hunter_list_5=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen not to trade.<br>Because of this they want to kill you.<br>Do you escape?<br><br>1- Find out!<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "hunter_list_9=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("hunter_list_6=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to trade.<br>Luckily, these aren't the criminals that are wanted.<br>A couple months later the white men settle here.<br>People keep on flooding into the white men's settlement.<br>Because of this your village becomes rich.<br>" + victory_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("hunter_list_6=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen to decline the trade.<br>Unfortunately, these people have smallpox.<br>They transmit it to your tribe.<br>Because your tribe doesn't have any immunity against smallpox your whole tribe dies!<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("hunter_list_6=3"))
{
document.getElementById("my_text").innerHTML = "You have chosen to report them to the authorities.<br>These guys turn out to be the wanted criminals after all.<br>Your tribe gains importance in the African community because you turned these criminals into the authorities.<br>Do you want to go hunt The Mighty Lion?<br><br>1- Yes; 2- No<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "hunter_list_10=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("hunter_list_7=1"))
{
clear_choices_js();
document.cookie = "character=the_mighty_lion; Path=/;";
document.cookie = "the_mighty_lion_list_0=0; Path=/;";
location.reload();
}
if (document.cookie.includes("hunter_list_7=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen not to hunt The Mighty Lion.<br>Unfortunately, you die from malaria.<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("hunter_list_8=1"))
{
clear_choices_js();
document.cookie = "character=the_mighty_lion; Path=/;";
document.cookie = "the_mighty_lion_list_0=0; Path=/;";
location.reload();
}
if (document.cookie.includes("hunter_list_8=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen not to hunt The Mighty Lion.<br>Unfortunately, a random lightning bolt from out of nowhere, probably from Zeus, kills you.<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("hunter_list_9=1") && document.cookie.includes("random_cookie=1"))
{
document.getElementById("my_text").innerHTML = "Unfortunately, you don't escape.<br>They kill you on the spot with a feather.<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("hunter_list_9=1") && document.cookie.includes("random_cookie=2"))
{
document.getElementById("my_text").innerHTML = "You manage to escape.<br>You live a long and prosperous life!<br>" + victory_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("hunter_list_10=1"))
{
clear_choices_js();
document.cookie = "character=the_mighty_lion; Path=/;";
document.cookie = "the_mighty_lion_list_0=0; Path=/;";
location.reload();
}
if (document.cookie.includes("hunter_list_10=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen not to hunt The Mighty Lion.<br>Unfortunately, a Chandra Planeswalker burns you to death!<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
}
function the_mighty_lion()
{
let name = fetch_name()
let death_level = name + ", YOU LOSE!<br>THE END!";
let victory_level = name + ", YOU WIN!<br>THE END!";
rand = Math.floor(Math.random() * 2) + 1;
document.cookie = "random_cookie=" + rand.toString() + "; Path=/;";
if (document.cookie.includes("the_mighty_lion_list_0=0"))
{
document.getElementById("my_text").innerHTML = "You have chosen to hunt The Mighty Lion.<br>You have been on your journey for about a week now.<br>The trail splits off into three sections.<br>Do you choose to go through the canyon?<br>How about the prairie?<br>Or what about continuing on through the forest?<br><br>1- Canyon; 2- Prairie; 3- Forest<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "the_mighty_lion_list_1=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("the_mighty_lion_list_1=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to go through the canyon!<br>The canyon is the quickest route to The Mighty Lion.<br>Unfortunately, you're almost out of the canyon when a flash flood occurs.<br>You get wiped away instantly and you drown to death.<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("the_mighty_lion_list_1=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen to go through the prairie!<br>Which way do you travel?<br><br>1- Left; 2- Right<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "the_mighty_lion_list_2=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("the_mighty_lion_list_1=3"))
{
document.getElementById("my_text").innerHTML = "You have chosen to go through the forest!<br>You see a river.<br>Do you drink from it?<br><br>1- Yes; 2- No<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "the_mighty_lion_list_3=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("the_mighty_lion_list_2=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to go left.<br>Unfortunately, there are hyenas in front of you after only about an hour of walking.<br>They see you and kill you.<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("the_mighty_lion_list_2=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen to go right.<br>There are zebras in front of you after only about an hour of walking.<br>Do you kill them for food?<br><br>1- Yes; 2- No<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "the_mighty_lion_list_4=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("the_mighty_lion_list_3=1"))
{
clear_choices_js();
document.cookie = "character=terrain; Path=/;";
document.cookie = "terrain_list_0=0; Path=/;";
location.reload();
}
if (document.cookie.includes("the_mighty_lion_list_3=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen not to drink from the river.<br>Your fellow warriors have.<br>The river doesn't make them sick because the river comes from a far off glacier.<br>Unfortunately, you cross the river and find no more water sources.<br>You die from dehydration.<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("the_mighty_lion_list_4=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to kill the zebras.<br>Because you have chosen to do this you don't go hungry.<br>Night falls.<br>Do you sleep on the ground or in a tree?<br><br>1- Ground; 2- Tree<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "the_mighty_lion_list_5=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("the_mighty_lion_list_4=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen not to kill the zebras.<br>Unfortunately, because of this, you starve.<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("the_mighty_lion_list_5=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to sleep on the ground.<br>Unfortunately, a dingo comes up and gobbles you up.<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("the_mighty_lion_list_5=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen to sleep in a tree.<br>No animals eat you.<br>You see a river.<br>Do you drink from it?<br><br>1- Yes; 2- No<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "the_mighty_lion_list_6=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("the_mighty_lion_list_6=1"))
{
clear_choices_js();
document.cookie = "character=terrain; Path=/;";
document.cookie = "terrain_list_0=0; Path=/;";
location.reload();
}
if (document.cookie.includes("the_mighty_lion_list_6=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen not to drink from the river.<br>Your fellow warriors have.<br>The river doesn't make them sick because the river comes from a far off glacier.<br>Unfortunately, you cross the river and find no more water sources.<br>You die from dehydration.<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
}
function terrain()
{
let name = fetch_name()
let death_level = name + ", YOU LOSE!<br>THE END!";
let victory_level = name + ", YOU WIN!<br>THE END!";
rand = Math.floor(Math.random() * 2) + 1;
document.cookie = "random_cookie=" + rand.toString() + "; Path=/;";
if (document.cookie.includes("terrain_list_0=0"))
{
document.getElementById("my_text").innerHTML = "You have chosen to drink from the river.<br>Luckily, the water doesn't have any diseases or viruses.<br>You are full.<br>You need to cross the river.<br>However, the river is very deep.<br>You could make a temporary bridge but that would kill vital time to hunt The Mighty Lion.<br>The fastest way to cross the river is to make a raft.<br>What do you do?<br><br>1- Make a bridge; 2- Build a raft<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "terrain_list_1=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("terrain_list_1=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to make a bridge.<br>Your patience pays off and you get across the river in no time!<br>The path splits in two.<br>Do you travel through the hills or the extreme hills?<br><br>1- Hills; 2- Extreme hills<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "terrain_list_2=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("terrain_list_1=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen to build a raft.<br>Unfortunately, the river brings you to the rapids before you are able to reach the other side.<br>The rapids are heading towards a waterfall, so you panic.<br>You throw your paddle into the river.<br>You fall down the waterfall and hit the rocks at the bottom.<br>Your head splits open and you die!<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("terrain_list_2=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to go through the hills.<br>You travel through the hills and see The Mighty Lion!<br>What weapon do you want to use?<br><br>1- Knife; 2- Bow and arrows; 3- Spear; 4- Gun<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "terrain_list_3=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("terrain_list_2=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen to go through the extreme hills.<br>You freeze to death.<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("terrain_list_3=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to use your trusty knife to kill The Mighty Lion!<br>So, " + name + " do you kill The Mighty Lion?<br><br>1- Find out!<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "terrain_list_4=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("terrain_list_3=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen to use your mighty bow and arrows to kill The Mighty Lion!<br>So, " + name + " do you kill The Mighty Lion?<br><br>1- Find out!<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "terrain_list_4=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("terrain_list_3=3"))
{
document.getElementById("my_text").innerHTML = "You have chosen to use your powerful spear to kill The Mighty Lion.<br>So, " + name + " do you kill The Mighty Lion?<br><br>1- Find out!<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "terrain_list_4=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("terrain_list_3=4"))
{
document.getElementById("my_text").innerHTML = "You have chosen to use your overpowered gun to kill The Mighty Lion.<br>Unfortunately, your gun explodes in your face.<br>You die.<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("terrain_list_4=1") && document.cookie.includes("random_cookie=1"))
{
document.getElementById("my_text").innerHTML = "You do not kill The Mighty Lion.<br>Unfortunately, The Mighty Lion eats you!<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("terrain_list_4=1") && document.cookie.includes("random_cookie=2"))
{
document.getElementById("my_text").innerHTML = "You kill The Mighty Lion!<br>Your tribe celebrates!<br>" + victory_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
}
function warrior()
{
let name = fetch_name()
let death_level = name + ", YOU LOSE!<br>THE END!";
let victory_level = name + ", YOU WIN!<br>THE END!";
floor(Math.random() * 2) + 1;
document.cookie = "random_cookie=" + rand.toString() + "; Path=/;";
if (document.cookie.includes("warrior_list_0=0"))
{
document.getElementById("my_text").innerHTML = "You have chosen to be a warrior!<br>Do you want to go hunt The Mighty Lion or stay put?<br><br>1- Hunt The Mighty Lion; 2- Stay put<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "warrior_list_1=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("warrior_list_1=1"))
{
clear_choices_js();
document.cookie = "character=the_mighty_lion; Path=/;";
document.cookie = "the_mighty_lion_list_0=0; Path=/;";
location.reload();
}
if (document.cookie.includes("warrior_list_1=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen to stay put.<br>Without warning a neighboring tribe attacks.<br>Do you choose to get your bow and arrows in your hut, or do you choose to fight them off with your knife on hand?<br><br>1- Go get my bow and arrows; 2- Use my knife<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "warrior_list_2=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("warrior_list_2=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to go get your bow and arrows.<br>Unfortunately, the enemy beats you to it and shoots you on the spot.<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("warrior_list_2=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen to use your knife.<br>You are very skilled with a knife.<br>Eventually the enemy tribe retreats.<br>The chief has told you to go take a weekend off at the Big Pond.<br>You go to the Big Pond and enjoy it very much.<br>You see a crying baby by the side of the Big Pond.<br>Do you pick up the baby and bring him home or just ignore him?<br><br>1- Pick him up and bring him home; 2- Just ignore him<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "warrior_list_3=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("warrior_list_3=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to pick up the baby and bring him home.<br>The baby turns out to be an orphan.<br>His mother was killed by the enemy tribe and the baby was left by the Big Pond.<br>You raise him as your own.<br>He becomes a great warrior and you name him Bobert.<br>You need to go hunt down the enemy that attacked your tribe years ago.<br>Do you take your son with you?<br><br>1- Yes; 2- No<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "warrior_list_4=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("warrior_list_3=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen to just ignore him.<br>Do you choose to go after the enemy tribe with the few warriors you have left?<br><br>1- Yes; 2- No<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "warrior_list_5=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("warrior_list_4=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to take your son with you.<br>Your hunting party would have died if you didn't have your son.<br>Since your son is a great warrior the enemy tribe which you now know as Yosemite plans on never attacking your tribe again!<br>You return home and find out your son has a brand-new kid.<br>Bobert, your son, names him Mighty " + name + " Jr.<br>You finally have a grandson.<br>You die at a good old age.<br>You pass away happily in your sleep.<br>" + victory_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("warrior_list_4=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen not to take your son with you.<br>Because you didn't take your son, the enemy tribe, Yosemite, kills your whole hunting party.<br>You guys are no match for them!<br>Unfortunately, while running away from Yosemite you trip over a rock and die!<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("warrior_list_5=1"))
{
document.getElementById("my_text").innerHTML = "You go after the enemy tribe with the few warriors you have left.<br>Unfortunately, while on your way The Mighty Pac-Man gobbles you up.<br>You guys are no match for The Mighty Pac-Man!<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("warrior_list_5=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen not to go after the enemy tribe.<br>Unfortunately, your village gets swept away by a flash flood!<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
}
function crafter()
{
let name = fetch_name()
let death_level = name + ", YOU LOSE!<br>THE END!";
let victory_level = name + ", YOU WIN!<br>THE END!";
rand = Math.floor(Math.random() * 2) + 1;
document.cookie = "random_cookie=" + rand.toString() + "; Path=/;";
if (document.cookie.includes("crafter_list_0=0"))
{
document.getElementById("my_text").innerHTML = "You have chosen to be a crafter!<br>You need to craft some arrows.<br>How do you want to craft them?<br>1- Put red dye on the feathers; 2- Just make them<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "crafter_list_1=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("crafter_list_1=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to put red dye on the feathers!<br>Because you put red dye on the feathers none were lost so the crafters were able to bring home more food!<br>Because of this you have one month's worth of food for the winter!<br>You have been asked to craft some spearheads.<br>How do you want to craft them?<br>1- Put poison on the spearheads; 2- Just make them<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "crafter_list_2=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("crafter_list_1=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen to just make the arrows.<br>Unfortunately, because of this the crafters lost some arrows and didn't bring home much food.<br>Even worse than that, Master Chief comes into your tribe and pwns all of you!<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("crafter_list_2=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to put poison on the spear heads.<br>The animals die easier and your tribe gets more food for the winter.<br>To be exact, one more month of food.<br>Some white men come to your tribe.<br>They're paying a fortune for you to craft them some of your best acacia furniture.<br>Do you want to craft some expensive acacia furniture for them, or do you not want to craft them the furniture their asking for?<br>1- Craft them furniture; 2- Not craft them furniture<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "crafter_list_3=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("crafter_list_2=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen to just make the spear heads.<br>Because you didn't put poison on the spear heads the crafters only brought back three gazelles.<br>Unfortunately, the gazelles get mold on them.<br>Even worse, you eat the moldy gazelles and die from food poisoning.<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("crafter_list_3=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to craft them furniture.<br>The people you give the furniture to like your work.<br>They pay you in gold.<br>You can use this to buy a milling machine from a city nearby.<br>Do you buy a milling machine?<br>1- Yes; 2- No<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "crafter_list_4=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("crafter_list_3=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen not to craft them furniture.<br>Because of this they want to kill you.<br>Do you escape?<br>1- Find out!<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "crafter_list_5=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("crafter_list_4=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to buy a milling machine.<br>Some business men have come to your tribe and are asking you to build them some wooden toys with your milling machine.<br>Do you want to build them wooden toys with your milling machine?<br>1- Yes; 2- No<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "crafter_list_6=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("crafter_list_4=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen not to buy a milling machine.<br>Unfortunately, your tribe dies from a famine.<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("crafter_list_5=1") && document.cookie.includes("random_cookie=1"))
{
document.getElementById("my_text").innerHTML = "You escape.<br>Unfortunately, an asteroid hits the earth and destroys the whole planet.<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("crafter_list_5=1") && document.cookie.includes("random_cookie=2"))
{
document.getElementById("my_text").innerHTML = "You don't escape.<br>They kill you on the spot.<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("crafter_list_6=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to use your milling machine to make them wooden toys.<br>You have had a successful life!<br>" + victory_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("crafter_list_6=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen not to make them wooden toys with your milling machine.<br>Unfortunately, your milling machine catches on fire and burns down your whole house.<br>What's even more unfortunate is that you get caught on fire and burn to death.<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
}
function farmer()
{
let name = fetch_name()
let death_level = name + ", YOU LOSE!<br>THE END!";
let victory_level = name + ", YOU WIN!<br>THE END!";
rand = Math.floor(Math.random() * 2) + 1;
document.cookie = "random_cookie=" + rand.toString() + "; Path=/;";
if (document.cookie.includes("farmer_list_0=0"))
{
document.getElementById("my_text").innerHTML = "You have chosen to be a farmer!<br>Do you want to go farm or sleep in?<br>1- Farm; 2- Sleep in<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "farmer_list_1=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("farmer_list_1=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to farm!<br>You have had a successful season!<br>Your village has a feast.<br>Do you want to store the rest of the food for winter or distribute the food to the whole village?<br>1- Store the food for winter; 2- Distribute the food to the whole village<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "farmer_list_2=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("farmer_list_1=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen to sleep in.<br>Unfortunately, a prairie fire destroys your crops and your whole village.<br>Everyone has escaped and survived.<br>Everyone except for one person.<br>You.<br>You have died in the fire.<br>You were burnt into ashes in your sleep.<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("farmer_list_2=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to store the food for winter.<br>Because you have chosen to store the food for winter your tribe doesn't go hungry.<br>Last year you grew wheat.<br>Do you want to grow wheat again this year or farm corn for the first time in your life?<br>1- Grow wheat again; 2- Farm corn<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "farmer_list_3=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("farmer_list_2=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen to distribute the food to the whole village.<br>Everyone has enough food for the whole winter.<br>Unfortunately, the food rots in a winter storm.<br>Your village dies of starvation.<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("farmer_list_3=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to grow wheat again for the second year in a row.<br>Unfortunately, there are no nutrients in the soil so all your wheat dies.<br>Your village starves.<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("farmer_list_3=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen to farm corn for the first time in your life.<br>Luckily for you, someone else in your village knows how to grow corn.<br>Because of this you grow a lot of corn and your village has a feast.<br>Do you want to store the rest of the food for the winter or distribute the rest of the food to your whole village?<br>1- Store the food for winter; 2- Distribute the food to your whole village<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "farmer_list_4=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("farmer_list_4=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to store the food for winter.<br>The corn lasts your tribe the whole winter.<br>Your tribe is thriving!<br>You find out that you have extra corn.<br>It would be nice to get some oxen to help you plow the field.<br>Do you sell your extra corn for oxen?<br>1- Yes; 2- No<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
if (document.forms["choiceForm"]["choice_field"].value.trim() != "")
{
clear_choices_js();
document.cookie = "farmer_list_5=" + new_choice + "; Path=/;";
document.getElementById("choice_field").value = "";
location.reload();
}
}
if (document.cookie.includes("farmer_list_4=2"))
{
document.getElementById("my_text").innerHTML = "You have chosen to distribute the food to your whole village.<br>Unfortunately, because you have chosen to do this, your food rots.<br>Your whole village starves.<br>" + death_level;
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);
}
if (document.cookie.includes("farmer_list_5=1"))
{
document.getElementById("my_text").innerHTML = "You have chosen to sell your extra corn for oxen.<br>You choose to grow cotton.<br>At the end of the season you have surplus cotton.<br>Do you want to sell your surplus cotton?<br>1- Yes; 2- No<br>Make your choice " + name + ":<br>";
var new_choice = parseInt(document.forms["choiceForm"]["choice_field"].value);