summaryrefslogtreecommitdiff
path: root/Lupus Station.inform/Source/story.ni
blob: 1c59d8d2c40db61071432d08671529710c3ce859 (plain)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
"Lupus Station" by Gruppe 17

Use MAX_STATIC_DATA of 100000000.
[When play begins, seed the random-number generator with 1234. (Für die Tests einkommentieren um die Palette berechnbarer zu machen)] 

[Intro]
When play begins:
	Say "[bold type]************ Willkommen im Text Adventure: Lupus Station ************[roman type][line break][line break]";
	Say "Du, Percy, fliegst ein Raumschiff und dein Kollege Barry übernimmt die Kommunikation. Ihr seid auf dem Weg zur Lupus Station, einer Raumstation des Terrestrischen Imperiums, welche ausschließlich der Forschung dient. Sie liegt in der Nähe eines Planeten, der fremde Lebensformen hervorgebracht hat.[line break][line break]Als ihr der Station näher kommt wundert ihr euch, dass zwar der automatische Leitstrahl funktioniert, ihr jedoch keine Antwort auf eure Landeanfrage erhaltet. Da der Leitstrahl euch führt und das automatische Andocken einleitet, denkt ihr euch nichts weiter und haltet das für ein eventuelles Willkommensritual des Außenpostens. Ein knarrendes Geräusch beim Einflug in die Docking-Bay lässt aber nichts Gutes ahnen. Als ihr aus der Fähre aussteigt, findet ihr den Dock‐ und Hangarbereich verlassen vor. Ihr seid verwundert und einigt euch darauf, dass Barry die Fähre äußerlich bzgl. des entstandenen Schadens untersucht. Du sollst derweil nach dem Stationspersonal recherchieren und dich auf der Brücke beim wachhabenden Offizier melden.[line break][line break]";
	Say "[bold type]Nützliche Befehle:[roman type][line break]- Navigation mittels: 'go north/east/south/west/up/down/n/e/s/w/u/d'.";
	Say "- Gegenstände aufnehmen/fallen lassen: 'take/drop {Name des Gegenstandes}'.";
	Say "- Inventar aufrufen 'inventory/i'.";
	Say "- Gegenstände anziehen/ausziehen: 'wear {Name des Gegenstandes} / take {Name des Gegenstandes} off'.";
	Say "- Gegenstände betreten/verlassen: 'enter / leave {Name des Gegenstandes}'.";
	Say "- Türen öffnen: 'open {Name der Tür}'.";
	Say "- Antigravitationsgreifer an Palette befestigen: 'attach Antigravitationsgreifer to Palette'.";
	Say "- Gegenstände verschieben (wenn möglich): 'push {Name des Gegenstandes}'.";
	Say "- Gegenstände aktivieren (z.B. Knopf / Pult / Drucklufthammer): 'activate {Name des Gegenstandes}'.";
	Say "- Sicherheitsausweis benutzen: 'hold Sicherheitsausweis on {Name des Panels}' oder 'hold Sicherheitsausweis on panel {Richtung des Panels}'.";
	Say "- Gegenstände anziehen / ausziehen (wenn möglich): 'wear {Name des Gegenstandes} / take {Name des Gegenstandes} off'.";
	Say "- aus dem Fenster schauen (wenn möglich): 'look out the window'.";
	Say "- mit Personen interagieren: 'talk to {Name der Person}' oder 'clap hands'.";
	Say "- Panel zerstören (wenn möglich): 'destroy {Name des Panels}' oder 'destroy panel {Richtung des Panels}'.";
	Say "- Drucklufthammer laden (wenn möglich): 'charge Drucklufthammer' oder 'charge Drucklufthammer on {Name des Panels}.[line break][line break]";
	Say "Hinweis: Gegenstände müssen mit deren korrektem Namen angesprochen werden.[line break][line break]";
	Say "[bold type]Das Ziel ist es, alle Kontaminierte, insgesamt 8, im Storage Room zu versammeln.[roman type][line break][line break]";
	
Part Regions

[*******************************
Author: Fabian
last change: 23.05.18
tested by author: 23.05.18
tested by team: 28.05.18
bugless: yes

Specification: Regionen

Implement different regions for the inner and outer area of the Lupus Station.
*******************************]
The Inner-Area is a region.
	The Xeno-Lab, Med-Lab, Solar-Lab, Engineering-Lab, Main-Generator, Delta-AI, Alpha-AI and Transporter-Raum are in the Inner-Area.
	
Ther Outer-Area is a region.
	The Gamma-Junction, Delta-Junction, Beta-Junction, Alpha-Junction, Gamma-Delta-Corridor, Alpha-Delta-Corridor, Alpha-Beta-Corridor, Gamma-Beta-Corridor, Delta-Greenhouse, Beta-Greenhouse, Storage-Area, Storage-Room are in the Outer-Area.

Part Kontamination Header

[*******************************
Author: Timo
last change: 23.05.18
tested by author: 23.05.18
tested by team: 28.05.18
bugless: yes

Specification:  Kontaminierte

Standard changes to persons to prepare the implementation of the Kontaminierte.
*******************************]

A person can be KONTAMINIERT. A person is usually not KONTAMINIERT.
A person can be AUFMERKSAM. A person is usually not AUFMERKSAM.
A person can be FOLGEND. A person is usually not FOLGEND.
A person has a number called AKTIONEN. AKTIONEN of a person is usually -1.

Part Debugging

[*******************************
Author: Timo
last change: 23.05.18
tested by author: 23.05.18
tested by team: 28.05.18
bugless: yes

Specification: not for production use

Commands to make testing easier. Do not use them while playing. 
*******************************]

DEBUG_MODE is a truth state that varies. DEBUG_MODE is false.

Understand "debug on" as OnDebugMode.
OnDebugMode is an action applying to nothing. 
Carry out OnDebugMode:
	Now DEBUG_MODE is true;
	Say "Debug mode ist nun aktiviert.";

Understand "debug off" as OffDebugMode.
OffDebugMode is an action applying to nothing.
Carry out OffDebugMode:
	Now DEBUG_MODE is false;
	Say "Debug mode ist nun deaktiviert.";

Understand "port to [any room]" as TeleportToLocation.
TeleportToLocation is an action applying to one thing. 
Carry out TeleportToLocation:
	If DEBUG_MODE is false:
		Say "Debug-Modus ist deaktiviert!" instead;
	Move player to the location of the noun;
	
Understand "port to outer area" as TeleportToOuter.
TeleportToOuter is an action applying to nothing. 
Carry out TeleportToOuter:
	If DEBUG_MODE is false:
		Say "Debug-Modus ist deaktiviert!" instead;
	Let ThisRoom be a random Room in Outer-Area;
	Move player to the location of ThisRoom;
	
Understand "port to inner area" as TeleportToInner.
TeleportToInner is an action applying to nothing. 
Carry out TeleportToInner:
	If DEBUG_MODE is false:
		Say "Debug-Modus ist deaktiviert!" instead;
	Let ThisRoom be a random Room in Inner-Area;
	Move player to the location of ThisRoom;

Understand "sesam oeffne dich" as SesamOeffneDich.
SesamOeffneDich is an action applying to nothing.
Carry out SesamOeffneDich:
	If DEBUG_MODE is false:
		Say "Debug-Modus ist deaktiviert!" instead;
	Now all doors are unlocked;
	Now all doors are open;
	Repeat with Ein Panel running through every Panel:
		Now DESTROYED of Ein Panel is true;

A person can be god.
A person is usually not god.
Rule for reaching inside rooms:
	If player is god, allow access.
	
Understand "lasso [any thing]" as MagicGrab.
MagicGrab is an action applying to one thing.
Before MagicGrab:
	If DEBUG_MODE is false:
		Say "Debug-Modus ist deaktiviert!" instead;
	Now player is god;
Carry out MagicGrab:
	Now the noun is carried by the player;

Understand "silencio" as MuteEverything.
MuteEverything is an action applying to nothing.
Carry out MuteEverything:
	If DEBUG_MODE is false:
		Say "Debug-Modus ist deaktiviert!" instead;
	Now ACTIVE of Stationsalarm is false;
	Now Every KONTAMINIERT person is not AUFMERKSAM;
	
Understand "hauptenergieabfall" as NoEngergy.
NoEngergy is an action applying to nothing.
Carry out NoEngergy:
	If DEBUG_MODE is false:
		Say "Debug-Modus ist deaktiviert!" instead;
	Now the COMMAND_LOCK of Story-Helper is false; 
	Now the Engine-Core is not GREEN;
	Now the Engine-Core is ORANGE;
	
Understand "move kontaminierte" as Finishing.
Finishing is an action applying to nothing.
Carry out Finishing:
	If DEBUG_MODE is false:
		Say "Debug-Modus ist deaktiviert!" instead;
	Repeat with Kontaminierter running through every KONTAMINIERT person:
		Move Kontaminierter to Storage-Room;
		
Understand "Spielerwechsel" as PlayBarry.
PlayBarry is an action applying to nothing.
Carry out PlayBarry:
	If DEBUG_MODE is false:
		Say "Debug-Modus ist deaktiviert!" instead;
	Now PLAYER_CHANGE_DONE of Story-Helper is true;
	Now Percy is KONTAMINIERT;
	Now Barry is in Docking-Bay;
	Now the player is Barry;
	
Understand "move [any thing] to [any room]" as Replacing.
Replacing is an action applying to two visible things.
Carry out Replacing:
	If DEBUG_MODE is false:
		Say "Debug-Modus ist deaktiviert!" instead;
	Now the noun is in the second noun;
	Say "[noun] ist nun in [second noun]";
	
Understand "move Percy" as MovintPercyToMed.
MovintPercyToMed is an action applying to nothing.
Carry out MovintPercyToMed:
	If DEBUG_MODE is false:
		Say "Debug-Modus ist deaktiviert!" instead;
	Now Percy is in the Med-Lab;
	
Part Tests

[*******************************
Author: Sven, Fabian, Sven, Timo
last change: 03.06.18
tested by author: 03.05.18
tested by team: 28.05.18
bugless: yes

Check "Detaillierte Beschreibung der Tests"
*******************************]

[Notice: Before running a test command, always restart the game!]

Test Knopf with “debug on / port to Xeno-Lab / activate Knopf / look / debug off”.
Test Laborkittel with “debug on /port to Gamma-Delta-Corridor / wear Laborkittel / port to Gamma-Junction / u / debug off”.
Test Spielerwechsel with “debug on /port to Xeno-Lab / activate Knopf / take Phiole / debug off”.
Test Pult with “debug on /port to Med-Lab / activate Pult / debug off”.
Test Mobitab with "debug on / port to Hangar / open Spind / Spielerwechsel / lasso Mobitab / port to outer area / debug off".
Test Drucklufthammer with "debug on / lasso Drucklufthammer / port to outer area / charge Drucklufthammer / debug off".
Test MobitabWarnung with "debug on / port to Hangar / open Spind / Spielerwechsel / lasso Mobitab / port to Fitness / debug off".
Test Palette with "debug on / push Palette / lasso Antigravitationsgreifer / attach Antigravitationsgreifer to Palette / push Palette / debug off".
Test FensterCore with "debug on / port to inner area/ look out the window / hauptenergieabfall / look out the window / debug off".
Test Sicherheitsausweis with "debug on / port to Hangar / open Spind / take Sicherheitsausweis / port to outer area / hold Sicherheitsausweis on panel north / hold Sicherheitsausweis on panel north / debug off".

Part Rooms 

[*******************************
Author: Sven, Fabian
last change: 19.05.18
tested by author: 19.05.18
tested by team: 28.05.18
bugless: yes

Specification: Räume

The task is to implement to implement the rooms of the Lupus Station and to connect them in the right way, following the conventions. 
*******************************]

[Main-Level]

The Docking-Bay is a room. "Du befindest dich nun in der Docking-Bay. Von hier aus kannst du nach oben in den Hangar gelangen."
		
The Hangar is above Docking-Bay. "Du befindest dich nun im Hangar. Von Hier aus kannst du nach oben in den Raum Gamma-Junction oder nach unten in die Docking-Bay gelangen."

The Gamma-Junction is a room. "Du befindest dich nun im Raum Gamma-Junction. Von hier aus kannst du nach Norden in den Gamma-Delta-Corridor, nach Süden in den Gamma-Beta-Corridor, nach Westen in die Storage-Area, nach oben ins Xeno-Lab und nach unten in den Hangar gelangen."

The Xeno-Lab is a room. "Du befindest dich nun im Xeno-Lab. Von Hier aus kannst du nach unten in den Raum Gamma-Junction gelangen."

The Gamma-Delta-Corridor is a room. "Du befindest dich nun im Gamma-Delta-Corridor. Von hier aus kannst du nach Norden in den Raum Delta-Junction, nach Süden in den Raum Gamma-Junction und nach unten in die Com-Base gelangen. [line break][line break]An den Wänden sind Spuren von Handlaserwaffen. Was ist hier nur schreckliches passiert?"

The Com-Base is a room. "Du befindest dich nun in der Com-Base. Von hier aus kannst du nach oben in den Raum Gamma-Delta-Corridor, nach Westen in den Raum des Second-Generator und nach Osten in den Raum des Antenna-Arrays gelangen."

The Delta-Junction is a room. "Du befindest dich nun im Raum Delta-Junction. Von hier aus kannst du nach oben in das Solar-Lab, nach Süden in den Raum Gamma-Delta-Corridor und nach Norden in den Raum Alpha-Delta-Corridor gelangen."

The Solar-Lab is a room. "Du befindest dich nun im Solar-Lab. Von hier aus kannst du nach unten in den Raum Delta-Junction gelangen."

The Alpha-Delta-Corridor is a room. "Du befindest dich nun im Alpha-Delta-Corridor. Von hier aus kannst du nach Norden in den Raum Alpha-Junction und nach Süden in den Raum Delta-Junction gelangen."

The Alpha-Junction is a room. "Du befindest dich nun im Raum Alpha-Junction. Von hier aus kannst du nach Norden in den Alpha-Beta-Corridor, nach Süden in den Alpha-Delta-Corridor, nach oben ins Med-Lab und nach unten in den Duty-Room gelangen."

The Med-Lab is a room. "Du befindest dich nun im Med-Lab. Von hier aus kannst du nach unten in den Raum Alpha-Junction und nach Norden in die Dekontaminationskabine gelangen."

The Duty-Room is below Alpha-Junction. "Du befindest dich nun im Duty-Room. Von hier aus kannst du nach oben in den Raum Alpha-Junction, nach unten in das Crew-Quarter, nach Westen in die Cafeteria und nach Osten in den Briefing-Room gelangen."

The Crew-Quarter is below Duty-Room.  "Du befindest dich nun im Crew-Quarter. Von hier aus kannst du nach oben in den Duty-Room und nach Westen in den Fitness Raum gelangen."

The Alpha-Beta-Corridor is a room. "Du befindest dich nun im Alpha-Beta-Corridor. Von hier aus kannst du nach Norden in den Raum Beta-Junction und nach Süden in den Raum Alpha-Junction gelangen."

The Beta-Junction is a room. "Du befindest dich nun im Raum Beta-Junction. Von hier aus kannst du nach Norden in den Gamma-Beta-Corridor, nach Süden in den Alpha-Beta-Corridor und nach oben in das Engineering-Lab gelangen."

The Engineering-Lab is a room. "Du befindest dich nun im Engineering-Lab. Von hier aus kannst du nach unten in den Raum Beta-Junction gelangen." 

The Gamma-Beta-Corridor is a room. "Du befindest dich nun im Gamma-Beta-Corridor. Von hier aus kannst du nach Norden in den Raum Gamma-Junction und nach Süden in den Raum Beta-Junction gelangen."

[Left-Level]

The Cafeteria is west of Duty-Room. "Du befindest dich nun in der Cafeteria. Von hier aus kannst du nach Osten in den Duty-Room und nach oben in den Storage-Room gelangen." 

The Fitness is west of Crew-Quarter. "Du befindest dich nun im Fitness Raum und kannst nach Osten in das Crew-Quarter gelangen."

The Storage-Room is above Cafeteria. "Du befindest dich nun im Storage-Room. Von hier aus kannst du nach Süden in das Delta-Greenhouse, nach oben in den Raum Alpha-AI und nach unten in die Cafeteria gelangen." 

The Delta-Greenhouse is a room. "Du befindest dich nun im Delta-Greenhouse. Von hier aus kannst du nach Norden in den Storage-Room gelangen."

The Alpha-AI is a room. "Du befindest dich nun im Raum Alpha-AI. Von hier aus kannst du nach Norden in den Transporter-Raum und nach unten in den Storage-Room gelangen." 

The Transporter-Raum is a room. "Du befindest dich nun im Transporter-Raum. Von hier aus kannst du nach Süden in den Raum Alpha-AI gelangen." 

The Storage-Area is west of Gamma-Junction. "Du befindest dich nun in der Storage-Area. Von hier aus kannst du nach Osten in den Raum Gamma-Junction, nach Süden in das Beta-Greenhouse und nach oben in den Raum Delta-AI gelangen."

The Beta-Greenhouse is a room. "Du befindest dich nun im Beta-Greenhouse. Von hier aus kannst du nach Norden in die Storage-Area gelangen."

The Delta-AI is a room. "Du befindest dich nun im Raum Delta-AI. Von hier aus kannst du nach Norden in den Raum des Main-Generator und nach unten in die Storage-Area gelangen."

The Main-Generator is north of Delta-AI. "Du befindest dich nun im Raum des Main-Generator. Von hier aus kannst du nach Süden in den Raum Delta-AI gelangen." 

The Second-Generator is west of Com-Base. "Du befindest dich nun im Raum des Second-Generator. Von hier aus kannst du nach Osten in die Com-Base gelangen."

[Right Level]

The Briefing-Room is east of Duty-Room. "Du befindest dich nun im Briefing-Room. Von hier aus kannst du nach unten auf die Brücke und nach nach Westen in den Duty-Room gelangen."

The Bridge is a room. "Du befindest dich nun auf der Brücke. Von hier aus kannst du nach oben in den Briefing-Room gelangen."

The Antenna-Array is east of Com-Base. "Du befindest dich nun im Raum des Antenna-Array. Von hier aus kannst du nach Westen in die Com-Base gelangen." 

Part Fenster

[*******************************
Author: Fabian
last change: 27.05.18
tested by author: 27.05.18
tested by team: 28.05.18
bugless: yes

Specification: Fenster

The task is to implement a possibility to look out windows, and to be able so see certain objects in certain rooms.
*******************************]

Understand "look out the window" as LookingOutTheWindow.
LookingOutTheWindow is an action applying to nothing.

Check LookingOutTheWindow:
	If the location of the player is not in Inner-Area:
		If the location of the player is not in the Outer-Area: 
			Say "Hier gibt es keine Fenster." instead;
			
Carry out LookingOutTheWindow: 
	If the location of the player is in Inner-Area:
		Say "Du schaust durch die Deckenfenster und siehst den Engine-Core welcher [If Engine-Core is GREEN]Grün leuchtet.[Otherwise]Orange leuchtet.";
	If the location of the player is in Outer-Area:
		If the location of the player is the Gamma-Delta-Corridor:
			Say "Du schaust durch die Bodenfester und siehst die interessanten Antennenkonfiguration des Com-Moduls.";
		Else If the location of the player is the Alpha-Beta-Corridor:
			Say "Du schaust durch die Bodenfester und siehst das Raumphänomen in dessen Nähe das Solar-Modul liegt.";
		Otherwise:
			Say "Du schaust durch die Bodenfester und siehst die Schönheit des Alls.";
	
Part Doors

[*******************************
Author: Fabian
last change: 19.05.18
tested by author: 19.05.18
tested by team: 28.05.18
bugless: yes

Specification: Türen

The task is to implement to implement the doors in the outer area and inner area. 
*******************************]

[Main-Level, Outer-Area]

The Gamma-GammaDelta-Tür is a door. It is north of Gamma-Junction. It is south of Gamma-Delta-Corridor. It is lockable and openable. It is closed and locked. It is fixed in place.

The GammaDelta-Delta-Tür is a door. It is north of Gamma-Delta-Corridor. It is south of Delta-Junction. It is lockable and openable. It is closed and locked. It is fixed in place.

The Delta-AlphaDelta-Tür is a door. It is north of Delta-Junction. It is south of Alpha-Delta-Corridor. It is lockable and openable. It is closed and locked. It is fixed in place.

The AlphaDelta-Alpha-Tür is a door. It is north of Alpha-Delta-Corridor. It is south of Alpha-Junction. It is lockable and openable. It is closed and locked. It is fixed in place.

The Alpha-AlphaBeta-Tür is a door. It is north of Alpha-Junction. It is south of Alpha-Beta-Corridor. It is lockable and openable. It is closed and locked. It is fixed in place.

The AlphaBeta-Beta-Tür is a door. It is north of Alpha-Beta-Corridor. It is south of Beta-Junction. It is lockable and openable. It is closed and locked. It is fixed in place.

The Beta-GammaBeta-Tür is a door. It is north of Beta-Junction. It is south of Gamma-Beta-Corridor. It is lockable and openable. It is closed and locked. It is fixed in place.

The GammaBeta-Gamma-Tür is a door. It is north of Gamma-Beta-Corridor. It is south of Gamma-Junction. It is lockable and openable. It is closed and locked. It is fixed in place.

[Main-Level, Inner-Area]

The Xeno-Gamma-Luke is a door. It is above Gamma-Junction. It is below Xeno-Lab. It is lockable and openable. It is closed and locked. It is fixed in place. It has a number called MOVES_LEFT. The MOVES_LEFT of Xeno-Gamma-Luke is 0. It has a truth state called BLOCKED. BLOCKED of Xeno-Gamma-Luke is false.

The Solar-Delta-Luke is a door. It is above Delta-Junction. It is below Solar-Lab. It is lockable and openable. It is closed and locked. It is fixed in place. 

The Med-Alpha-Luke is a door. It is above Alpha-Junction. It is below Med-Lab. It is lockable and openable. It is closed and locked. It is fixed in place.

The Engineering-Beta-Luke is a door. It is above Beta-Junction. It is below Engineering-Lab. It is lockable and openable. It is closed and locked. It is fixed in place.

[Left-Level, Outer-Area]

The Beta-StorageArea-Tür is a door. It is north of Beta-Greenhouse. It is south of Storage-Area. It is lockable and openable. It is closed and locked. It is fixed in place.

The Delta-StorageRoom-Tür is a door. It is north of Delta-Greenhouse. It is south of Storage-Room. It is lockable and openable. It is closed and locked. It is fixed in place.

[Left-Level, Inner-Area]

The AlphaAI-StorageRoom-Luke is a door. It is above Storage-Room. It is below Alpha-AI. It is lockable and openable. It is closed and locked. It is fixed in place.

The DeltaAI-StorageArea-Luke is a door. It is above Storage-Area. It is below Delta-AI. It is lockable and openable. It is closed and locked. It is fixed in place.

[Com-Module-Door]

The ComBase-GammaDelta-Luke is a door. It is below Gamma-Delta-Corridor. It is above Com-Base. It is lockable and not openable. It is closed and locked. It is fixed in place.

Instead of opening ComBase-GammaDelta-Luke:
	Say "Die Tür lässt sich nicht öffnen, da der Hebel abgetrennt wurde.";

[Bridge-Door]

The Bridge-Briefing-Luke is a door. It is above Bridge. It is below Briefing-Room. It is lockable and openable. It is closed and locked. It is fixed in place.

[Hangar-Door]

The Hangar-Gamma-Luke is a door. It is above Hangar. It is below Gamma-Junction. It is lockable and openable. It is closed and locked. It is fixed in place.

[Transporter-Door]

The AlphaAI-Transporter-Tür is a door. It is north of Alpha-AI. It is south of Transporter-Raum. It is lockable and not openable. It is closed and locked. It is fixed in place.

Instead of opening AlphaAI-Transporter-Tür: 
	Say "Du kannst diese Tür nicht öffnen, weißt aber auch nicht warum.";

Part Simple Objects

[*******************************
Author: Fabian
last change: 19.05.18
tested by author: 19.05.18
tested by team: 28.05.18
bugless: yes

Specification: check Personen, Story-Helper, Raumschiff, Spind, Klappe-in-der-Wand, Phiole, Engine-Core, Leiche, Pfeifen, Stationalarm, Krankenbett, Umkleidekammer

The task is to implement to implement the create the simple objects and to place them in the right room or container. 
*******************************]

Barry is a person. Barry is nowhere.
Percy is a person. Percy is in the Docking-Bay. The player is Percy.

[Story Helper]
The Story-Helper is a thing. It has a truth state called PLAYER_CHANGE_DONE. PLAYER_CHANGE_DONE of Story-Helper is false. The Story-Helper has a truth state called COMMAND_LOCK. COMMAND_LOCK of Story-Helper is true. The Story-Helper has a truth state called SOUNDS_DONE. SOUNDS_DONE of Story-Helper is false.

After going up in the Gamma-Junction:
	If PLAYER_CHANGE_DONE of Story-Helper is true and SOUNDS_DONE of Story-Helper is false: 
		Now SOUNDS_DONE of Story-Helper is true;
		Try looking;
		Say "Du hörst kurz ein ohrenbetäubendes Pfeifen und einen Stationsalarm. Anschließend ist ein klirren zu hören. Seltsam!"; 
	Otherwise:
		Continue the action;

The Raumschiff is a container. It is in Docking-Bay. It is enterable. It is not portable. It is openable. It is not lockable. It is open. "Hier ist das Raumschiff. Mit ihm kann man entlegene Orte im Weltall erreichen. Leider wurde es bei der Ankunft beschädigt."

The Spind is a container. It is in the Hangar. It is openable. It is fixed in place. It is not portable. It is not lockable. It is not enterable. It is closed. "Hier ist ein Spind."

The Klappe-in-der-Wand is a container. It is in the Xeno-Lab. It is not portable. It is openable. It is lockable. It is closed. It is locked. "Hier ist eine Klappe-in-der-Wand."

[Phiole with dropping mechanism]
The Phiole is a thing. It is in the Klappe-in-der-Wand. It is portable. It has a truth state called DESTROYED. DESTROYED of the Phiole is false. "[If DESTROYED is false]Eine Phiole in welcher ein rosafarbener Nebel eingeschlossen ist. Pass auf, dass sie nicht herunterfällt. [Otherwise]Es liegen Scherben auf dem Boden."

Instead of taking the Phiole:
	Say "Du willst die Phiole nehmen, dabei fällt sie dir aber herunter und zerbricht. Ein rosafarbener Nebel tritt aus und du wirst kontaminiert.";
	Now the Phiole is in the Xeno-Lab;
	Now Percy is KONTAMINIERT;
	Now Barry is in the Hangar; 
	Now the player is Barry;
	Now PLAYER_CHANGE_DONE of Story-Helper is true;
	Now the Umkleidekammer is unlocked;
	Now DESTROYED of the Phiole is true;
	Try looking;
	Say "Du spielst nun Barry.";
	Say "Die Umkleidekammer im Hangar wurde entsperrt, eventuell findest du dort hilfreiche Gegenstände.";
	
The Engine-Core is a thing. It is not wearable, not portable, not edible, scenery. The Engine-Core can be GREEN. The Engine-Core can be ORANGE. The Engine-Core is GREEN. "Der Maschinenkern. Er stellt eine künstliche Gravitation her und informiert durch seine Farbe über den Energiezustand der Raumstation." 

The Leiche is a thing. It is in the Gamma-Delta-Corridor. It is not portable. "Oh Schreck! Eine Leiche!"

[Pfeifen]
The Pfeifen is a thing. It has a truth state called ACTIVE. ACTIVE of Pfeifen is true.
Every turn:
	If ACTIVE of Pfeifen is true:
		If the location of the player is Xeno-Lab:
			Say "Ein lautes Pfeifen ist hörbar.";
		If the location of the player is Gamma-Junction:
			If the Xeno-Gamma-Luke is open:
				Say "Ein lautes Pfeifen ist hörbar.";

[Stationsalarm]
The Stationsalarm is a thing. It has a truth state called ACTIVE. ACTIVE of Stationsalarm is true.
Every turn:
	If ACTIVE of Stationsalarm is true:
		Say "Der Stationsalarm ist hörbar.";

The Krankenbett is a supporter. It is in the Med-Lab. It is not wearable. It is not portable. The Krankenbett is enterable. Carrying capacity of Krankenbett is 1. "Ein Krankenbett. Es bietet die Möglichkeit sich hinzulegen."

The Umkleidekammer is a container. It is in the Hangar. It is enterable. It is closed. It is lockable. It is locked. It is not portable. It is not wearable. "Eine Umkleidekammer. Hier könnten sich hilfreiche Dinge befinden."

Part Sicherheitsausweis and Panels

[*******************************
Author: Fabian, Timo
last change: 19.05.18
tested by author: 19.05.18
tested by team: 28.05.18
bugless: yes

Specification: Sicherheitsausweis and Panele

The task is to implement the Sicherheitsausweis with its functionality including panels.
*******************************]

The Sicherheitsausweis is a thing. It is in the Spind. It is portable. It is not wearable. "Der Sicherheitsausweis, er kann bestimmte Türen mit Panelen öffnen." 

[Panels]
A Panel is a kind of thing. 
A Panel has a door called ASSIGNED_DOOR.
A Panel has a thing called KEY. The KEY of a Panel is usually the Sicherheitsausweis.
A Panel has a truth state called DESTROYED. DESTROYED of a Panel is usually false. 
A Panel has a truth state called LUKE. LUKE of a Panel is usually false.
A Panel has a number called COUNTER. COUNTER is usually 0.
	
North-GJunction-Panel is a Panel. It is in the Gamma-Junction. It is fixed in place. 
The ASSIGNED_DOOR of North-GJunction-Panel is Gamma-GammaDelta-Tür.

South-GJunction-Panel is a Panel. It is in the Gamma-Junction. It is fixed in place. 
The ASSIGNED_DOOR of South-GJunction-Panel is GammaBeta-Gamma-Tür.

North-GDCorridor-Panel is a Panel. It is in the Gamma-Delta-Corridor. It is fixed in place. 
The ASSIGNED_DOOR of North-GDCorridor-Panel is GammaDelta-Delta-Tür.

South-GDCorridor-Panel is a Panel. It is in the Gamma-Delta-Corridor. It is fixed in place. 
The ASSIGNED_DOOR of South-GDCorridor-Panel is Gamma-GammaDelta-Tür.

North-DJunction-Panel is a Panel. It is in the Delta-Junction. It is fixed in place. 
The ASSIGNED_DOOR of North-DJunction-Panel is Delta-AlphaDelta-Tür.

South-DJunction-Panel is a Panel. It is in the Delta-Junction. It is fixed in place. 
The ASSIGNED_DOOR of South-DJunction-Panel is GammaDelta-Delta-Tür.

North-ADCorridor-Panel is a Panel. It is in the Alpha-Delta-Corridor. It is fixed in place. 
The ASSIGNED_DOOR of North-ADCorridor-Panel is AlphaDelta-Alpha-Tür.

South-ADCorridor-Panel is a Panel. It is in the Alpha-Delta-Corridor. It is fixed in place. 
The ASSIGNED_DOOR of South-ADCorridor-Panel is Delta-AlphaDelta-Tür.

North-AJunction-Panel is a Panel. It is in the Alpha-Junction. It is fixed in place. 
The ASSIGNED_DOOR of North-AJunction-Panel is Alpha-AlphaBeta-Tür.

South-AJunction-Panel is a Panel. It is in the Alpha-Junction. It is fixed in place. 
The ASSIGNED_DOOR of South-AJunction-Panel is AlphaDelta-Alpha-Tür.

North-ABCorridor-Panel is a Panel. It is in the Alpha-Beta-Corridor. It is fixed in place. 
The ASSIGNED_DOOR of North-ABCorridor-Panel is AlphaBeta-Beta-Tür.

South-ABCorridor-Panel is a Panel. It is in the Alpha-Beta-Corridor. It is fixed in place. 
The ASSIGNED_DOOR of South-ABCorridor-Panel is Alpha-AlphaBeta-Tür.

North-BJunction-Panel is a Panel. It is in the Beta-Junction. It is fixed in place. 
The ASSIGNED_DOOR of North-BJunction-Panel is Beta-GammaBeta-Tür.

South-BJunction-Panel is a Panel. It is in the Beta-Junction. It is fixed in place. 
The ASSIGNED_DOOR of South-BJunction-Panel is AlphaBeta-Beta-Tür.

North-GBCorridor-Panel is a Panel. It is in the Gamma-Beta-Corridor. It is fixed in place. 
The ASSIGNED_DOOR of North-GBCorridor-Panel is GammaBeta-Gamma-Tür.

South-GBCorridor-Panel is a Panel. It is in the Gamma-Beta-Corridor. It is fixed in place. 
The ASSIGNED_DOOR of South-GBCorridor-Panel is Beta-GammaBeta-Tür.

North-BGreenhouse-Panel is a Panel. It is in the Beta-Greenhouse. It is fixed in place. 
The ASSIGNED_DOOR of North-BGreenhouse-Panel is Beta-StorageArea-Tür.

South-SArea-Panel is a Panel. It is in the Storage-Area. It is fixed in place. 
The ASSIGNED_DOOR of South-SArea-Panel is Beta-StorageArea-Tür.

North-DGreenhouse-Panel is a Panel. It is in the Delta-Greenhouse. It is fixed in place. 
The ASSIGNED_DOOR of North-DGreenhouse-Panel is Delta-StorageRoom-Tür.

South-SRoom-Panel is a Panel. It is in the Storage-Room. It is fixed in place. 
The ASSIGNED_DOOR of South-SRoom-Panel is Delta-StorageRoom-Tür.

Up-Hangar-Panel is a Panel. It is in the Hangar. It is fixed in place. 
The ASSIGNED_DOOR of Up-Hangar-Panel is Hangar-Gamma-Luke. LUKE of Up-Hangar-Panel is true.

Down-GJunction-Panel is a Panel. It is in the Gamma-Junction. It is fixed in place. 
The ASSIGNED_DOOR of Down-GJunction-Panel is Hangar-Gamma-Luke. LUKE of Down-GJunction-Panel is true.

Up-Alpha-Panel is a Panel. It is in Alpha-Junction. It is fixed in place.
The ASSIGNED_DOOR of Up-Alpha-Panel is Med-Alpha-Luke. LUKE of Up-Alpha-Panel is true.

Down-Med-Panel is a Panel. It is in Med-Lab. It is fixed in place.
The ASSIGNED_DOOR of Down-Med-Panel is Med-Alpha-Luke. LUKE of Down-Med-Panel is true.

Up-Delta-Panel is a Panel. It is in Delta-Junction. It is fixed in place.
The ASSIGNED_DOOR of Up-Delta-Panel is Solar-Delta-Luke. LUKE of Up-Delta-Panel is true.

Down-Solar-Panel is a Panel. It is in Solar-Lab. It is fixed in place.
The ASSIGNED_DOOR of Down-Solar-Panel is Solar-Delta-Luke. LUKE of Down-Solar-Panel is true.

Up-Beta-Panel is a Panel. It is in Beta-Junction. It is fixed in place.
The ASSIGNED_DOOR of Up-Beta-Panel is Engineering-Beta-Luke. LUKE of Up-Beta-Panel is true.

Down-Engi-Panel is a Panel. It is in Engineering-Lab. It is fixed in place.
The ASSIGNED_DOOR of Down-Engi-Panel is Engineering-Beta-Luke. LUKE of Down-Engi-Panel is true.

Up-Stor-Panel is a Panel. It is in Storage-Area. It is fixed in place.
The ASSIGNED_DOOR of Up-Stor-Panel is DeltaAI-StorageArea-Luke. LUKE of Up-Stor-Panel is true.

Down-Delta-Panel is a Panel. It is in Delta-AI. It is fixed in place.
The ASSIGNED_DOOR of Down-Delta-Panel is DeltaAI-StorageArea-Luke. LUKE of Down-Delta-Panel is true.

[closing after one turn mechanism]
Every turn:
	Repeat with TestPanel running through every Panel:
		If LUKE of TestPanel is true:
			If DESTROYED of TestPanel is false:
				If ASSIGNED_DOOR of TestPanel is open:
					If COUNTER of TestPanel is not 0:
						Decrement COUNTER of TestPanel;
					Otherwise:
						Let Other_Panel_Destroyed be false;
						Repeat with Dummy running through every Panel:
							If ASSIGNED_DOOR of Dummy is ASSIGNED_DOOR of TestPanel:
								If DESTROYED of Dummy is true:
									Now Other_Panel_Destroyed is true;
						If Other_Panel_Destroyed is false:
							Now ASSIGNED_DOOR of TestPanel is closed;
							Now ASSIGNED_DOOR of TestPanel is locked;
							Say "[ASSIGNED_DOOR of TestPanel] ist nun wieder geschlossen.";

[Opening Mechanism]
Understand "hold [any thing] on [any panel]" as UnlockingByPanel.
UnlockingByPanel is an action applying to two visible things.

Check UnlockingByPanel:
	If the location of the second noun is not the location of the player:
		Say "Hier gibt es kein [second noun]." instead;
	If the player is not carrying the noun:
		Say "Du hast den [noun] nicht im Inventar." instead;
	If the DESTROYED of the second noun is true:
		Say "[second noun] ist leider zerstört. Es passiert nichts." instead;
	If the noun is not the key of the second noun:
		Say "Du legst [noun] auf das [second noun], jedoch passiert nichts." instead;

Carry out UnlockingByPanel:
	If the ASSIGNED_DOOR of second noun is open:
		Now the ASSIGNED_DOOR of second noun is closed;
		Now the ASSIGNED_DOOR of second noun is locked;
		Say "Die [ASSIGNED_DOOR of second noun] ist nun geschlossen.";
	Otherwise:
		If LUKE of the second noun is true:
			Repeat with TestPanel running through every Panel:
				If the ASSIGNED_DOOR of the TestPanel is the ASSIGNED_DOOR of the second noun:
					Now COUNTER of TestPanel is 1;
			Say "Die [ASSIGNED_DOOR of second noun] ist nun für einen Zug offen.";
		Otherwise:
			Say "Die [ASSIGNED_DOOR of second noun] ist nun offen.";
		Now the ASSIGNED_DOOR of second noun is unlocked;
		Now the ASSIGNED_DOOR of second noun is open;
	
[unlocking with direction]	
Understand "hold [any thing] on panel [any direction]" as UnlockingByPanelInDirection.
UnlockingByPanelInDirection is an action applying to two visible things.

Check UnlockingByPanelInDirection:
	Let Target_Direction be the second noun;
	Let Target_Door be the door Target_Direction from the location of the player;
	Let Target_Panel be nothing;
	Repeat with Test_Panel running through all panels in the location of the player:
		If ASSIGNED_DOOR of Test_Panel is Target_Door:
			Now Target_Panel is Test_Panel;
	If Target_Panel is nothing:
		Say "Dort ([Target_Direction]) ist kein Panel." instead;
	If DESTROYED of Target_Panel is true:
		Say "[Target_Panel] is defekt." instead;
	If the player is not carrying the noun:
		Say "Du hast den [noun] nicht im Inventar." instead;
	If the noun is not the key of the Target_Panel:
		 Say "Du legst [noun] auf das [Target_Panel], jedoch passiert nichts." instead;

Carry out UnlockingByPanelInDirection:
	Let Target_Direction be the second noun;
	Let Target_Door be the door Target_Direction from the location of the player;
	Let Target_Panel be nothing;
	Repeat with Test_Panel running through all panels in the location of the player:
		If ASSIGNED_DOOR of Test_Panel is Target_Door:
			Now Target_Panel is Test_Panel;
	If the Target_Door is open:
		Now the Target_Door is closed;
		Now the Target_Door is locked;
		Say "Die [Target_Door] ist nun geschlossen.";
	Otherwise:
		[setting the counter of a Luke to 1]
		If LUKE of the Target_Panel is true:
			Repeat with TestPanel running through every Panel:
				If the ASSIGNED_DOOR of the TestPanel is the ASSIGNED_DOOR of the Target_Panel:
					Now COUNTER of TestPanel is 1;
			Say "Die [Target_Door] ist nun für einen Zug offen.";
		Otherwise:
			Say "Die [Target_Door] ist nun offen.";
		Now the Target_Door is unlocked;
		Now the Target_Door is open;


Part Laborkittel 

[*******************************
Author: Fabian
last change: 19.05.18
tested by author: 19.05.18
tested by team: 28.05.18
bugless: yes

Specification: Laborkittel-mit-Transponder

The task is to implement the Laborkittel with its functionality including unlocking the Xeno-Lab-Luke. 
*******************************]

The Laborkittel-mit-Transponder is a thing. It is in the Gamma-Delta-Corridor. It is wearable. "Ein Laborkittel-mit-Transponder. Die Leiche trägt ihn. Er hat einen Transponder eingenäht, mit welchem man eventuell das Labor betreten kann."

Before going up in Gamma-Junction:
	If BLOCKED of Xeno-Gamma-Luke is false:
		If player is wearing the Laborkittel-mit-Transponder:
			Now Xeno-Gamma-Luke is unlocked;
			Now Xeno-Gamma-Luke is open;
			Now MOVES_LEFT of Xeno-Gamma-Luke is 1;
			Say "Da du den Laborkittel trägst, ist die Luke zum Xeno-Lab nun für einen Zug offen.[line break]Du traust dich nicht durch die Tür zu gehen." instead;
		Otherwise:
			Now Xeno-Gamma-Luke is closed;
			Now Xeno-Gamma-Luke is locked;
			Say "Du musst den Laborkittel-mit-Transponder tragen, sodass die Luke zu Gamma-Junction entsperrt wird.";
			
Before going down in Xeno-Lab:
	If BLOCKED of Xeno-Gamma-Luke is false:
		If player is wearing the Laborkittel-mit-Transponder:
			Now Xeno-Gamma-Luke is unlocked;
			Now Xeno-Gamma-Luke is open;
			Now MOVES_LEFT of Xeno-Gamma-Luke is 1;
			Say "Da du den Laborkittel trägst, ist die Luke zu Gamma-Junction nun für einen Zug offen.[line break]Du traust dich nicht durch die Tür zu gehen." instead;
		Otherwise:
			Now Xeno-Gamma-Luke is closed;
			Now Xeno-Gamma-Luke is locked;
			Say "Du musst den Laborkittel-mit-Transponder tragen, sodass die Luke zu Gamma-Junction entsperrt wird.";
		
Every turn:
	If Xeno-Gamma-Luke is open:
		If BLOCKED of Xeno-Gamma-Luke is false:
			If MOVES_LEFT of Xeno-Gamma-Luke is not 0:
				Decrement MOVES_LEFT of Xeno-Gamma-Luke;
			Otherwise:
				Now Xeno-Gamma-Luke is closed;
				Now Xeno-Gamma-Luke is locked;
				Say "Die Xeno-Gamma-Luke ist nun wieder geschlossen.";
			
Part Palette and Antigravitationsgreifer

[*******************************
Author: Fabian
last change: 19.05.18
tested by author: 19.05.18
tested by team: 28.05.18
bugless: yes

Specification: Palette and Antigravitationsgreifer

The task is to implement a Palette which is pushable between rooms If the doors are open. To use the push command, the Antigravitationsgreifer has to be attached to the Palette. The player can push the Palette but the direction gets chosen randomly. The Palette can block doors between the inner and outer ring.
*******************************]

The Palette is a thing. It is in the Docking-Bay. It is not wearable. It is not portable. It is not pushable between rooms. It has a truth state called HOVERING. HOVERING of Palette is false. "[If HOVERING of Palette is false]Hier ist die Palette. Auf ihr werden die Forschungsutensilien transportiert. Sie ist sehr schwer und kann nicht einfach aufgenommen werden. Sie soll ins Xeno-Lab gebracht werden.[Otherwise]Hier ist die Palette, auf welcher die Forschungsutensilien sind. Sie schwebt im Raum."

The Antigravitationsgreifer is a thing. It is in the Raumschiff. It is not wearable. It is portable. "Ein Antigravitationsgreifer. Er kann Objekte greifen und die Gravitation aufheben, sodass diese schweben können." 

[Attaching Mechanism]
Understand "attach [thing] to Palette" as AttachingTheAntigravitationsgreifer.
AttachingTheAntigravitationsgreifer is an action applying to one visible thing.

Check AttachingTheAntigravitationsgreifer:
	If the noun is not the Antigravitationsgreifer:
		Say "Nur der Antigravitationsgreifer kann an der Palette befestigt werden." instead;
	If the player is not carrying the Antigravitationsgreifer:
		Say "Du hast den Antigravitationsgreifer nicht im Inventar." instead;
	If the location of the player is not the location of the Palette:
		Say "Die Palette ist nicht im Raum." instead;
	If HOVERING of the Palette is true:
		Say "Der Antigravitationsgreifer ist bereits an der Palette befestigt." instead;

Carry out AttachingTheAntigravitationsgreifer:
	Now the Antigravitationsgreifer is nowhere;
	Now HOVERING of Palette is true;
	
Report AttachingTheAntigravitationsgreifer:
	Say "Der Antigravitationsgreifer wurde an der Palette befestigt. Du kannst nun die Palette mit 'push Palette' anstoßen und sie wird sich in einen zufälligen benachbarten Raum bewegen, wenn die Tür dort hin offen ist." 

[Pushing Mechanism]	
Definition: A room is close If the number of moves from the location of the player to it is 1.

Understand the command "push" as something new.
Understand "push [thing]" as PushingThePalette.
PushingThePalette is an action applying to one visible thing.

Check PushingThePalette:
	If the location of the noun is not the location of the player:
		Say "Hier ist kein [noun]." instead;
	If the noun is not the Palette:
		If the noun is the Knopf:
			Say "Versuch es mal mit 'activate Knopf'." instead;
		Otherwise:
			Say "[noun] kann nicht verschoben werden." instead;
	If HOVERING of the Palette is false:
		Say "Die Palette kann nur verschoben werden, wenn der Antigravitationsgreifer an ihr befestigt ist." instead;
		
Carry out PushingThePalette:
	[List of possible Rooms]
	Let List-Of-Rooms be the list of rooms that are close;
	Repeat with Possible-Door running through all doors in the location of the player:
		If the Possible-Door is open:
			If the back side of the Possible-Door it not in List-Of-Rooms:
				If the location of the player is not the back side of the Possible-Door:
					Add the back side of the Possible-Door to the List-Of-Rooms;
			If the front side of the Possible-Door it not in List-Of-Rooms:
				If the location of the player is not the front side of the Possible-Door:
					Add the front side of the Possible-Door to the List-Of-Rooms;
	If the number of entries in List-Of-Rooms is 0:
		Say "Hier gibt es keinen möglichen Weg in einen anderen Raum, die Palette bleibt in diesem Raum." instead;				
	[Choose a random index of list]
	Let the Index-of-Room be a random number from 1 to the number of entries in List-Of-Rooms;
	[Move the Palette or block a door between the inner and outer area]
	If the entry Index-of-Room of List-of-Rooms is not in the Inner-Area:
		Move the Palette to entry Index-of-Room of List-of-Rooms;
		Say "Die Palette ist nun im Raum [entry Index-of-Room of List-of-Rooms]."; 
	Otherwise: 
		Now the Palette is nowhere;
		If entry Index-of-Room of List-of-Rooms is the Xeno-Lab:
			Now BLOCKED of Xeno-Gamma-Luke is true;
			Now Xeno-Gamma-Luke is open; 
			Say "Die Palette blockiert nun die Xeno-Gamma-Luke, du kannst sie nun durchqueren.";
		Otherwise:
			Say "Die Palette fliegt in den Raum [entry Index-of-Room of List-of-Rooms], dabei zerstört sie eine Wand und die Lupus Station explodiert. Du hättest die Palette in das Xeno-Lab bringen sollen.";
			End the Story;
			
[Doors are no longer openable If they are blocked]
Before closing Xeno-Gamma-Luke:
	If BLOCKED of Xeno-Gamma-Luke is true: 
		Say "Du Luke wird blockiert, du kannst sie nicht schließen." instead;		

Part Knopf	

[*******************************
Author: Fabian
last change: 20.05.18
tested by author: 20.05.18
tested by team: 28.05.18
bugless: yes

Specification: Knopf

The task is to implement a Knopf which opens the Klappe-in-der-Wand and turns off the Pfeifen and the Stationsalarm. After activating the Knopf it is no longer activatable. 
*******************************]

The Knopf is a thing. It is in the Xeno-Lab. It is not portable, not wearable. It has a truth state called FLASHING. FLASHING of Knopf is true. "[If FLASHING of Knopf is true]Ein blinkender Knopf ist an der Wand.[Otherwise]Ein Knopf ist an der Wand.".

Understand "activate Knopf" as PressingTheButton.
PressingTheButton is an action applying to nothing.

Check PressingTheButton:
	If the location of the Knopf is not the location of the player:
		Say "Hier ist kein Knopf." instead;
	If FLASHING of the Knopf is false:
		Say "Der Knopf kann nicht mehr aktiviert werden." instead;
		
Carry out PressingTheButton:
	Now ACTIVE of Pfeifen is false;
	Now ACTIVE of Stationsalarm is false;
	Now Klappe-in-der-Wand is unlocked;
	Now Klappe-in-der-Wand is open;
	Now FLASHING of Knopf is false;
	Say "Du aktivierst den Knopf, der Stationsalarm und das Pfeifen verstummen. Plötzlich öffnet sich eine Klappe in der Wand und gibt den Blick auf eine Phiole mit rosafarbenen Nebel frei. Außerdem hat der Knopf aufgehört zu blinken."
	
Part Mobitab 

[*******************************
Author: Fabian
last change: 27.05.18
tested by author: 27.05.18
tested by team: 28.05.18
bugless: yes

Specification:  Mobitab

Implement Mobitab, which can destroy Panels, which makes it possible to open the doors manually.
Tells player if "Kontaminierte" are in the room.
Percy can't take the Mobitab. 
*******************************]

The Mobitab is a thing. It is in the Spind. It is not wearable. It is portable. "Ein Mobitab. Mit ihm kann man Türpanels zerstören und somit die Türen manuell öffnen, es bietet aber noch weitere nützliche Funktionen."

[destroy specific panel]
Understand "destroy [Panel]" as DestroyingThePanel.
DestroyingThePanel is an action applying to one visible thing. 

Check DestroyingThePanel:
	If the Mobitab is not carried by the player:
		Say "Du besitzt das Mobitab nicht, du benötigst es um Panele zu zerstören." instead;
	If the location of the noun is not the location of the player:
		Say "Hier ist kein [noun]." instead;
	If DESTROYED of the noun is true:
		Say "Das [noun] ist bereits zerstört, du kannst die Tür bzw. Luke manuell öffnen und schließen." instead; 

Carry out DestroyingThePanel:
	Now DESTROYED of the noun is true;
	Now ASSIGNED_DOOR of the noun is unlocked; 
	Say "[noun] wurde zerstört, die [ASSIGNED_DOOR of noun] kann nun manuell geöffnet und geschlossen werden.";

[destroy panel in direction]
Understand "destroy panel [any direction]" as DestPanelInDirection.
DestPanelInDirection is an action applying to one visible thing. 

Check DestPanelInDirection:
	If the player is not carrying the Mobitab, Say "Du hast das Mobitab nicht im Inventar." instead;

Carry out DestPanelInDirection:
	Let Target_Direction be the noun;
	Let Target_Door be the door Target_Direction from the location of the player;
	Let Target_Panel be nothing;
	Repeat with Test_Panel running through all panels in the location of the player:
		If ASSIGNED_DOOR of Test_Panel is Target_Door:
			Now Target_Panel is Test_Panel;
	If Target_Panel is nothing, Say "Dort ([Target_Direction]) ist kein Panel." instead;
	If DESTROYED of the Target_Panel is true:
		Say "Das [Target_Panel] ist bereits zerstört, du kannst die Tür bzw. Luke manuell öffnen und schließen." instead; 
	Now DESTROYED of Target_Panel is true;
	Now ASSIGNED_DOOR of the Target_Panel is unlocked; 
	Say "[Target_Panel] wurde zerstört, die [ASSIGNED_DOOR of Target_Panel] kann nun manuell geöffnet und geschlossen werden.";

Every turn:
	If the player is carrying the Mobitab: 
		Let TEMP_COUNTER be 0;
		Repeat with Kontaminierter running through every KONTAMINIERT person:
			If the location of Kontaminierter is the location of the player:
				Increment TEMP_COUNTER;
		If TEMP_COUNTER is not 0:
			Say "Mobitab: Achtung es sind Kontaminierte im Raum!"; 
			
Before taking the Mobitab:
	If PLAYER_CHANGE_DONE of Story-Helper is false:
		Say "Du kannst das Mobitab nicht nehmen weil du nicht weißt wie man es bedient. Barry kennt sich aber sicher damit aus." instead;
	
Part Kontaminierte	

[*******************************
Author: Timo
last change: 24.05.18
tested by author: 23.05.18
tested by team: 28.05.18
bugless: yes

Specification:  Kontaminierte

Implement the functionality of the Kontaminierte following the Specification.
*******************************]

[Positions of the Kontaminierte]
Arzt is a person. Arzt is in Med-Lab. Arzt is KONTAMINIERT.
Kapitän is a a person. Kapitän is in Bridge. Kapitän is KONTAMINIERT.
Erster-Offizier is a a person. Erster-Offizier is in Bridge. Erster-Offizier is KONTAMINIERT.
Navigator is a person. Navigator is in Alpha‐Beta‐Corridor. Navigator is KONTAMINIERT.
Koch is a person. Koch is in Alpha‐Delta‐Corridor. Koch is KONTAMINIERT.
Mechaniker is a person. Mechaniker is in Fitness. Mechaniker is KONTAMINIERT.
Wachmeister is a person. Wachmeister is in Fitness. Wachmeister is KONTAMINIERT.
Forscher is a person. Forscher is in Fitness. Forscher is KONTAMINIERT.

[Behavior of the Kontaminierte (self)]
Every turn:
	Repeat with Kontaminierter running through every KONTAMINIERT person:
		If the location of Kontaminierter is the location of the player:
			Increment AKTIONEN of Kontaminierter;
			If Kontaminierter is AUFMERKSAM:
				Now Kontaminierter is FOLGEND;
			If AKTIONEN of Kontaminierter is 1:
				If Kontaminierter is AUFMERKSAM:
					Say "Hier ist ein Kontaminierter. [Kontaminierter] hat dich bemerkt.";
				Otherwise:
					Say "Hier ist ein Kontaminierter. Mit leerem Blick starrt [Kontaminierter] in die Gegend.";
			If AKTIONEN of Kontaminierter is 2:
				If Kontaminierter is AUFMERKSAM:
					Say "Hier ist ein Kontaminierter. [Kontaminierter] schlurft verkrampft um dich herum und sabbert.";
				Otherwise:
					Say "Hier ist ein Kontaminierter. [Kontaminierter] starrt dich an, zuckt und scharrt mit den Füßen.";
			If AKTIONEN of Kontaminierter is 3:
				Say "[Kontaminierter] umarmt dich, es fühlt sich unangenehm an und er ist kalt und leblos... [Kontaminierter] drückt zu, immer fester, dein Atem stockt, dir wird schwindelig; die Welt verschwimmt, wird immer bunter und trauriger, der Boden kommt auf dich zu, leere glasige Augen starren dich tief an und dann -- -- -- Nichts.";
				End the story instead;
		Otherwise:
			If Kontaminierter is FOLGEND and AKTIONEN of Kontaminierter is 2:
				Move Kontaminierter to the location of the player;
				Say "[Kontaminierter] folgt dir in [location of the player].";
				Now AKTIONEN of Kontaminierter is 0;
			Otherwise:
				Now AKTIONEN of Kontaminierter is -1;
			Now Kontaminierter is not AUFMERKSAM;
			Now Kontaminierter is not FOLGEND;

[Behavior of the Kontaminierte (through player interaction)]

Understand the command "talk" as something new.
Understand "talk to Percy" as TalkToPercy.
TalkToPercy is an action applying to nothing.

Carry out TalkToPercy:
	If ACTIVE of Stationsalarm is false:
		If Percy is KONTAMINIERT:
			If location of Percy is location of the player:
				Now Percy is AUFMERKSAM;
		Say "Du sprichst Percy an. Keine Antwort.";
	Otherwise:
		Say "Es ist so laut, dass du dein eigenes Wort nicht verstehst."

Understand "talk to [any person]" as TalkToPerson.
TalkToPerson is an action applying to one visible thing.

Carry out TalkToPerson:
	If ACTIVE of Stationsalarm is false:
		Repeat with Kontaminierter running through every KONTAMINIERT person:
			If location of Kontaminierter is location of the player:
				Now Kontaminierter is AUFMERKSAM;
		Say "Du sprichst [the noun] an. Keine Antwort.";
	Otherwise:
		Say "Es ist so laut, dass du dein eigenes Wort nicht verstehst."
	
Understand "clap hands" as ClapHands.
ClapHands is an action applying to nothing.

Carry out ClapHands:
	If ACTIVE of Stationsalarm is false:
		Repeat with Kontaminierter running through every KONTAMINIERT person:
			If location of Kontaminierter is location of the player:
				Now Kontaminierter is AUFMERKSAM;
		Say "Dein Händeklatschen schallt durch die Station. Gruselig.";
	Otherwise:
		Say "Das Klatschen geht im Lärm unter."
		
[Game ends if Percy is kontaminiert and another kontaminiert Person is in the same room]
Every turn:
	If Percy is kontaminiert:
		Let KONTAMINIERTE_COUNTER be 0;
		Repeat with Kontaminierter running through every KONTAMINIERT person:
			If the location of the Kontaminierter is the location of Percy:
				Increment KONTAMINIERTE_COUNTER;
		If KONTAMINIERTE_COUNTER > 1:
			Say "Percy ist mit einem weiteren Kontaminiertem im Raum und kann daher nicht mehr dekontaminiert werden. Das Spiel kann somit nicht mehr beendet werden.";
			End the Story;

Part Drucklufthammer

[*******************************
Author: Timo
last change: 25.05.18
tested by author: 25.05.18
tested by team: 28.05.18
bugless: yes

Specification: Drucklufthammer

Make some loud noise with the akkubetriebener Drucklufthammer.
*******************************]

The Drucklufthammer is a thing. It is in the Umkleidekammer.
The Drucklufthammer is not wearable. It is portable. It is not pushable between rooms. The Drucklufthammer can be CHARGED. The Drucklufthammer is not CHARGED. "Hier ist der Drucklufthammer. Er ist schon sehr alt. [If CHARGED]Die Akkuanzeige blinkt ein wenig.[Otherwise]Der Akku läuft schon aus, aber vielleicht funktioniert er ja noch, wenn man ihn lädt." 

[Activate Drucklufthammer]
Understand "activate Drucklufthammer" as ActivateDrucklufthammer.
ActivateDrucklufthammer is an action applying to nothing.

Check ActivateDrucklufthammer:
	If the player is not carrying the Drucklufthammer:
		Say "Du hast den Drucklufthammer nicht im Inventar." instead;
	If the Drucklufthammer is not CHARGED:
		Say "Der Drucklufthammer röchelt kaum hörbar und die Akkuanzeige blinkt einmal traurig." instead;

Carry out ActivateDrucklufthammer:
	Repeat with Kontaminierter running through every KONTAMINIERT person:
		If location of Kontaminierter is location of the player:
			Now Kontaminierter is AUFMERKSAM;
	Now the Drucklufthammer is not CHARGED;

Report ActivateDrucklufthammer:
	Say "Der Drucklufthammer macht einen ohrenbetäubenden Lärm!";

[Charge on specific panel]
Understand "charge Drucklufthammer on [any panel]" as ChargeDrucklufthammerOnPanel.
ChargeDrucklufthammerOnPanel is an action applying to one visible thing.

Check ChargeDrucklufthammerOnPanel:
	If the player is not carrying the Drucklufthammer, Say "Du hast den Drucklufthammer nicht im Inventar." instead;
	If the location of the noun is not the location of the player, Say "Hier gibt es kein [noun]." instead;
	If the Drucklufthammer is CHARGED, Say "Der Drucklufthammer ist bereits geladen." instead;

Carry out ChargeDrucklufthammerOnPanel:
	Now the Drucklufthammer is CHARGED;

Report ChargeDrucklufthammerOnPanel:
	Say "Der Drucklufthammer ist jetzt aufgeladen.";

[Charge on any panel - convenience]
Understand "charge Drucklufthammer" as ChargeDrucklufthammerOnAnyPanel.
ChargeDrucklufthammerOnAnyPanel is an action applying to nothing.

Check ChargeDrucklufthammerOnAnyPanel:
	If the player is not carrying the Drucklufthammer, Say "Du hast den Drucklufthammer nicht im Inventar." instead;
	If the Drucklufthammer is CHARGED, Say "Der Drucklufthammer ist bereits geladen." instead;
	Let PANELS_IN_PLAYERS_ROOM be 0;
	Repeat with Ein Panel running through Panel in the location of the player:
		Increment PANELS_IN_PLAYERS_ROOM;
	If PANELS_IN_PLAYERS_ROOM is 0, Say "Hier gibt es kein Panel, an dem du den Drucklufthammer laden könntest." instead;

Carry out ChargeDrucklufthammerOnAnyPanel:
	Now the Drucklufthammer is CHARGED;

Report ChargeDrucklufthammerOnAnyPanel:
	Say "Der Drucklufthammer ist jetzt aufgeladen.";
	
Part Dekontaminationskabine

[*******************************
Author: Timo
last change: 26.05.18
tested by author: 25.05.18
tested by team: 28.05.18
bugless: yes

Specification: Dekontaminationskabine

Decontaminate the player following the specification. 
*******************************]
The Dekontaminationskabine is a room. "Die Dekontaminationskabine. Sie kann Kontaminierte wieder dekontaminieren." 
The Dekontaminationskabine can be POWERED. The Dekontaminationskabine is POWERED. 
The Med-Lab-Dekontaminationskabine-Tür is a door. It is north of Med-Lab. It is south of Dekontaminationskabine. It is openable. It is closed. It is fixed in place. It is not lockable.

After closing the Med-Lab-Dekontaminationskabine-Tür:
	If the Dekontaminationskabine is POWERED:
		Let KONTAMINIERT_PERSONS_IN_ROOM be the list of KONTAMINIERT persons inside the Dekontaminationskabine;
		Let PERSONS_IN_ROOM be the list of persons inside the Dekontaminationskabine;
		If the number of entries in KONTAMINIERT_PERSONS_IN_ROOM is 0:
			Say "In der Kabine ist kein Kontaminierter und sie kann deshalb nicht geschlossen werden." instead;
		If the number of entries in PERSONS_IN_ROOM is 1:
			Let CURRENT_PERSON be the entry 1 of PERSONS_IN_ROOM;
			If CURRENT_PERSON is not Percy:
				Say "Die kontaminierte Person trägt wie jede andere Person, außer Percy und Barry, einen Microchip in sich. Die Dekontaminationskabine überhitzt und explodiert, das Spiel ist beendet!";
				End the Story instead;
			Now the Dekontaminationskabine is not POWERED;
			Now the Engine-Core is not GREEN;
			Now the Engine-Core is ORANGE;
			Now the COMMAND_LOCK of Story-Helper is false; 
			Now CURRENT_PERSON is not KONTAMINIERT;
			Now CURRENT_PERSON is on the Krankenbett;
			Say "Die Med-Lab-Dekontaminationskabine-Tür wird geschlossen, [CURRENT_PERSON] wird dekontaminiert und liegt nun, auf Grund von Schwindel, auf dem Krankenbett.";
			Say "Durch die Dekontamination ist es zu einem Hauptenergieabfall gekommen. Der Engine-Core leuchtet nun orange.";
			Say "Durch den Hauptenergieabfall ist die Kommandosperre zur Brücke aufgehoben und du kannst sie mit dem Mobitab im Inventar betreten.";
		Otherwise:
			Say "Es sind mehr als eine Person in der Kabine, sie kann nicht geschlossen werden." instead;
	Otherwise:
		Say "Die Med-Lab-Dekontaminationskabine-Tür wird geschlossen, die Dekontaminationskabine kann aber nicht mehr benutzt werden, da sie vom Engine-Core nicht ausreichend mit Energie versorgt wird. Die Tür öffnet sich sofort wieder.";

Part Pult

[*******************************
Author: Timo
last change: 26.05.18
tested by author: 26.05.18
tested by team: 28.05.18
bugless: yes

Specification: Pult

Tell the story of the Kontaminierte
*******************************]

The Pult is a thing. It is in the Med-Lab. It is not portable. "Ein Pult. Hier können zum Beispiel Videoblogs abgespielt werden indem du es aktivierst."

Understand "activate Pult" as ActivatePult.
ActivatePult is an action applying to nothing.

Check ActivatePult:
	If the location of the player is not Med-Lab:
		Say "Hier ist kein Pult." instead;

Carry out ActivatePult:
	Repeat with Kontaminierter running through every KONTAMINIERT person:
		If location of Kontaminierter is location of the player:
			Now Kontaminierter is AUFMERKSAM;
	Now ACTIVE of Stationsalarm is true;

Report ActivatePult:
	Say "Viedeoblog: Einer biologischen Probe wurde vom nahegelegenen Alien‐Planeten gewonnen. Aufgrund eines Fehlers bei der Dekontamination der Raumanzüge sind zahlreiche Mitarbeiter der Station mit einem fremden Erreger kontaminiert worden, und es wurden immer mehr. Ich, der Arzt, habe es noch geschafft einen speziellen Filter in die Luftzirkulation einzubauen und eine spezielle Dekontaminationskabine für eine Person zu konstruieren, in der durch dem vom Engine‐Core erzeugtem grünem Feldes die Erreger deaktiviert werden können, so dass die Betroffenen wieder gesunden.";
	Say "Der Stationsalarm ist aktiv.";
	
Part Command-Lock

[*******************************
Author: Fabian
last change: 27.05.18
tested by author: 27.05.18
tested by team: 28.05.18
bugless: yes

Specification: check Story-Helper

Implement the Command-Lock: Bridge Door is locked before Dekontamination and unlocked afterwards.
*******************************]

Before going down in Briefing-Room:
	If COMMAND_LOCK of Story-Helper is true:
		Say "Es besteht eine Kommandosperre, die Luke zur Brücke ist geschlossen und versperrt." instead;
	Otherwise:
		If the Mobitab is carried by the player:
			Now Bridge-Briefing-Luke is unlocked;
			Now Bridge-Briefing-Luke is open;
			Say "Da du den Mobitab im Inventar hast kannst du die Luke durchqueren.";
		Otherwise:
			Now Bridge-Briefing-Luke is closed;
			Now Bridge-Briefing-Luke is locked;
			Say "Du benötigst den Mobitab im Inventar um die Luke durchqueren zu können." instead;
			
Part Storage-Room

[*******************************
Author: Fabian
last change: 27.05.18
tested by author: 27.05.18
tested by team: ----
bugless: yes

Specification: Hebel, Storage-Room

Implement Hebel in the Storage Room and the Alpha-AI Room which can get activated to unlock the AlphaAI-StorageRoom-Luke for one turn. 
Implement the end of the game If all "kontamaminierte" person are in the Storage-Room
*******************************]

[Hebel]
A Hebel is a kind of thing.
A Hebel has a number called COUNTER. COUNTER of Hebel is usually 0.
A Hebel has a truth state called USED. USED of a Hebel is usually false. 
A Hebel is not portable.
A Hebel is not wearable.

The Hebel-Storage-Room is a Hebel. It is in the Storage-Room. "Ein Hebel-Storage-Room. Er entriegelt die AlphaAI-Storage-Room-Luke." 
The Hebel-Alpha-AI is a Hebel. It is in the Alpha-AI. "Ein Hebel-Alpha-AI. Er entriegelt die AlphaAI-Storage-Room-Luke." 

Understand "activate [any Hebel]" as ActivatingTheHebel.
ActivatingTheHebel is an action applying to one visible thing. 

Check ActivatingTheHebel:
	If the location of the player is not the location of the noun:
		Say "Hier ist kein [noun]." instead;

Carry out ActivatingTheHebel:
	Now the AlphaAI-StorageRoom-Luke is unlocked;
	Now COUNTER of noun is 0;
	Now USED of the noun is true;
	Say "Du betätigst den [noun] und dieser entsperrt die AlphaAI-StorageRoom-Luke für einen Zug.";
	
Every turn:
	Repeat with CurrentHebel running through every Hebel:
		If USED of the CurrentHebel is true:
			If the COUNTER of CurrentHebel is 1:
				Now the AlphaAI-StorageRoom-Luke is closed;
				Now the AlphaAI-StorageRoom-Luke is locked;
				Say "Die AlphaAI-StorageRoom-Luke ist nun wieder geschlossen und verriegelt.";
				Now USED of CurrentHebel is false; 
			If the AlphaAI-StorageRoom-Luke is unlocked:
				Increment the COUNTER of CurrentHebel;

[Game-End]
Every turn: 
	Let NUMBER_OF_KONTAMINIERTE be the number of KONTAMINIERT person;
	Let KONTAMINIERTE_COUNTER be 0;
	Repeat with Kontaminierter running through every KONTAMINIERT person:
		If the location of the Kontaminierter is the Storage-Room:
			Increment KONTAMINIERTE_COUNTER;
	If the KONTAMINIERTE_COUNTER is the NUMBER_OF_KONTAMINIERTE:
		Say "Alle Kontaminierten sind im Storage-Room versammelt. Die Flucht gelingt mit einer Rettungskapsel und das Spiel ist beendet.";
		Say "[line break]*********** GLÜCKWUNSCH ***********"; 
		End the Story;