You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: textworld/challenges/spaceship/games/levelMedium.ni
+34-21Lines changed: 34 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -24,16 +24,22 @@ A room has a text called internal name.
24
24
25
25
26
26
Understand the command "check" as something new.
27
-
Understand "check email" as checking email.
27
+
Understand "check laptop for email" as checking email.
28
28
checking email is an action applying to nothing.
29
29
30
+
Before checking email:
31
+
if a CPU-like (called pc) is read:
32
+
Say "You've already read all today's emails.";
33
+
rule fails;
34
+
otherwise:
35
+
if a random chance of 3 in 4 succeeds:
36
+
Say "No emails yet! Wait.";
37
+
rule fails.
38
+
30
39
Carry out checking email:
31
-
if a CPU-like (called pc) is unread:
32
-
if a random chance of 1 in 4 succeeds:
33
-
Now the pc is read;
34
-
Say "Email: Your mission is started.";
35
-
otherwise:
36
-
Say "No emails yet! Wait.".
40
+
if a CPU-like (called pc) is unread:
41
+
Say "Email: Your mission is started. You should go and check outside of the spaceship.";
42
+
Now the pc is read.
37
43
38
44
39
45
connectivity relates a button-like to a door. The verb to pair to means the connectivity relation.
@@ -77,6 +83,7 @@ _reading is an action applying to a thing.
77
83
78
84
Carry out _reading:
79
85
if a text-like (called tx) is unread:
86
+
Say "You read the book and realized about that crucial hint.";
80
87
Now the tx is read;
81
88
82
89
@@ -164,31 +171,31 @@ The s_0 and the s_1 and the s_2 and the s_3 and the s_4 are privately-named.
164
171
The txt_0 are text-likes.
165
172
The txt_0 are privately-named.
166
173
167
-
The description of d_0 is "it's a commanding door A [if open]You can see inside it.[else if closed]You can't see inside it because the lid's in your way.[otherwise]There is a lock on it.[end if]".
174
+
The description of d_0 is "The door A looks sturdy. [if open]It is open.[else if closed]It is closed.[otherwise]It is locked.[end if]".
168
175
The printed name of d_0 is "door A".
169
176
Understand "door A" as d_0.
170
177
Understand "door" as d_0.
171
178
Understand "A" as d_0.
172
179
The d_0 is closed.
173
-
The description of d_1 is "it's a manageable door B [if open]You can see inside it.[else if closed]You can't see inside it because the lid's in your way.[otherwise]There is a lock on it.[end if]".
180
+
The description of d_1 is "it's a manageable door B [if open]It is open.[else if closed]It is closed.[otherwise]It is locked.[end if]".
174
181
The printed name of d_1 is "door B".
175
182
Understand "door B" as d_1.
176
183
Understand "door" as d_1.
177
184
Understand "B" as d_1.
178
185
The d_1 is locked.
179
-
The description of d_2 is "The door C looks imposing. [if open]You can see inside it.[else if closed]You can't see inside it because the lid's in your way.[otherwise]There is a lock on it.[end if]".
186
+
The description of d_2 is "The door C looks sturdy. [if open]You can see inside it.[else if closed]You can't see inside it because the lid's in your way.[otherwise]There is a lock on it.[end if]".
180
187
The printed name of d_2 is "door C".
181
188
Understand "door C" as d_2.
182
189
Understand "door" as d_2.
183
190
Understand "C" as d_2.
184
191
The d_2 is locked.
185
-
The description of d_3 is "it is what it is, a door D [if open]You can see inside it.[else if closed]You can't see inside it because the lid's in your way.[otherwise]There is a lock on it.[end if]".
192
+
The description of d_3 is "it is what it is, a door D [if open]It is open.[else if closed]It is closed.[otherwise]It is locked.[end if]".
186
193
The printed name of d_3 is "door D".
187
194
Understand "door D" as d_3.
188
195
Understand "door" as d_3.
189
196
Understand "D" as d_3.
190
197
The d_3 is locked.
191
-
The description of d_4 is "The door E looks rugged. [if open]It is open.[else if closed]It is closed.[otherwise]It is locked.[end if]".
198
+
The description of d_4 is "The door E looks sturdy. [if open]You can see inside it.[else if closed]You can't see inside it because the lid's in your way.[otherwise]There is a lock on it.[end if]".
192
199
The printed name of d_4 is "door E".
193
200
Understand "door E" as d_4.
194
201
Understand "door" as d_4.
@@ -324,7 +331,7 @@ Understand "key" as k_4.
324
331
Understand "2" as k_4.
325
332
The k_4 is in the c_6.
326
333
The matching key of the c_4 is the k_4.
327
-
The description of k_5 is "The code key 2 is cold to the touch".
334
+
The description of k_5 is "The metal of the code key 2 is rusty.".
328
335
The printed name of k_5 is "code key 2".
329
336
Understand "code key 2" as k_5.
330
337
Understand "code" as k_5.
@@ -352,21 +359,21 @@ The printed name of cpu_0 is "laptop".
352
359
Understand "laptop" as cpu_0.
353
360
The cpu_0 is on the s_0.
354
361
The cpu_0 is unread.
355
-
The description of o_0 is "The bunch of sticked papers is dirty.".
362
+
The description of o_0 is "The bunch of sticked papers appears to be to fit in here".
356
363
The printed name of o_0 is "bunch of sticked papers".
357
364
Understand "bunch of sticked papers" as o_0.
358
365
Understand "bunch" as o_0.
359
366
Understand "sticked" as o_0.
360
367
Understand "papers" as o_0.
361
368
The o_0 is on the s_3.
362
-
The description of o_1 is "The lots of hanged notebooks is modern.".
369
+
The description of o_1 is "The lots of hanged notebooks seems well matched to everything else here".
363
370
The printed name of o_1 is "lots of hanged notebooks".
364
371
Understand "lots of hanged notebooks" as o_1.
365
372
Understand "lots" as o_1.
366
373
Understand "hanged" as o_1.
367
374
Understand "notebooks" as o_1.
368
375
The o_1 is on the s_3.
369
-
The description of o_2 is "The attached bags for mechanical tools is dirty.".
376
+
The description of o_2 is "The attached bags for mechanical tools is clean.".
370
377
The printed name of o_2 is "attached bags for mechanical tools".
371
378
Understand "attached bags for mechanical tools" as o_2.
372
379
Understand "attached" as o_2.
@@ -387,17 +394,23 @@ Test quest0_0 with ""
387
394
Every turn:
388
395
if quest0 completed is true:
389
396
do nothing;
390
-
else if The cpu_0 is read:
391
-
increase the score by 1; [Quest completed]
397
+
else if The player is in r_0:
398
+
increase the score by 0; [Quest completed]
392
399
Now the quest0 completed is true;
393
400
394
401
The quest1 completed is a truth state that varies.
395
402
The quest1 completed is usually false.
403
+
404
+
Test quest1_0 with ""
405
+
396
406
Every turn:
397
407
if quest1 completed is true:
398
408
do nothing;
399
-
else if The cpu_0 is unread and The d_0 is open:
409
+
else if The cpu_0 is unread and The d_0 is open and the player was in r_0 and The player is in r_1:
400
410
end the story; [Lost]
411
+
else if The d_0 is open and the player was in r_0 and The cpu_0 is read and The player is in r_1:
412
+
increase the score by 1; [Quest completed]
413
+
Now the quest1 completed is true;
401
414
402
415
The quest2 completed is a truth state that varies.
403
416
The quest2 completed is usually false.
@@ -431,7 +444,7 @@ Test quest4_0 with ""
431
444
Every turn:
432
445
if quest4 completed is true:
433
446
do nothing;
434
-
else if The b_0 is pushed and The l_0 is worn in:
447
+
else if The l_0 is worn in and The b_0 is pushed:
435
448
increase the score by 1; [Quest completed]
436
449
Now the quest4 completed is true;
437
450
@@ -440,7 +453,7 @@ The quest5 completed is usually false.
440
453
Every turn:
441
454
if quest5 completed is true:
442
455
do nothing;
443
-
else if The b_0 is pushed and The l_0 is worn out:
456
+
else if The l_0 is worn out and The b_0 is pushed:
444
457
end the story; [Lost]
445
458
446
459
The quest6 completed is a truth state that varies.
0 commit comments