Skip to content

Commit 6168512

Browse files
committed
the spaceship game: the latest version of the game, Framework updates and refactoring, game files(json, ni, ulx), updated logic files, ...
1 parent db7fda3 commit 6168512

File tree

13 files changed

+292
-1078
lines changed

13 files changed

+292
-1078
lines changed

textworld/challenges/spaceship/games/levelMedium.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

textworld/challenges/spaceship/games/levelMedium.ni

Lines changed: 34 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,22 @@ A room has a text called internal name.
2424

2525

2626
Understand the command "check" as something new.
27-
Understand "check email" as checking email.
27+
Understand "check laptop for email" as checking email.
2828
checking email is an action applying to nothing.
2929

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+
3039
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.
3743

3844

3945
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.
7783

7884
Carry out _reading:
7985
if a text-like (called tx) is unread:
86+
Say "You read the book and realized about that crucial hint.";
8087
Now the tx is read;
8188

8289

@@ -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.
164171
The txt_0 are text-likes.
165172
The txt_0 are privately-named.
166173

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]".
168175
The printed name of d_0 is "door A".
169176
Understand "door A" as d_0.
170177
Understand "door" as d_0.
171178
Understand "A" as d_0.
172179
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]".
174181
The printed name of d_1 is "door B".
175182
Understand "door B" as d_1.
176183
Understand "door" as d_1.
177184
Understand "B" as d_1.
178185
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]".
180187
The printed name of d_2 is "door C".
181188
Understand "door C" as d_2.
182189
Understand "door" as d_2.
183190
Understand "C" as d_2.
184191
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]".
186193
The printed name of d_3 is "door D".
187194
Understand "door D" as d_3.
188195
Understand "door" as d_3.
189196
Understand "D" as d_3.
190197
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]".
192199
The printed name of d_4 is "door E".
193200
Understand "door E" as d_4.
194201
Understand "door" as d_4.
@@ -324,7 +331,7 @@ Understand "key" as k_4.
324331
Understand "2" as k_4.
325332
The k_4 is in the c_6.
326333
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.".
328335
The printed name of k_5 is "code key 2".
329336
Understand "code key 2" as k_5.
330337
Understand "code" as k_5.
@@ -352,21 +359,21 @@ The printed name of cpu_0 is "laptop".
352359
Understand "laptop" as cpu_0.
353360
The cpu_0 is on the s_0.
354361
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".
356363
The printed name of o_0 is "bunch of sticked papers".
357364
Understand "bunch of sticked papers" as o_0.
358365
Understand "bunch" as o_0.
359366
Understand "sticked" as o_0.
360367
Understand "papers" as o_0.
361368
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".
363370
The printed name of o_1 is "lots of hanged notebooks".
364371
Understand "lots of hanged notebooks" as o_1.
365372
Understand "lots" as o_1.
366373
Understand "hanged" as o_1.
367374
Understand "notebooks" as o_1.
368375
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.".
370377
The printed name of o_2 is "attached bags for mechanical tools".
371378
Understand "attached bags for mechanical tools" as o_2.
372379
Understand "attached" as o_2.
@@ -387,17 +394,23 @@ Test quest0_0 with ""
387394
Every turn:
388395
if quest0 completed is true:
389396
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]
392399
Now the quest0 completed is true;
393400

394401
The quest1 completed is a truth state that varies.
395402
The quest1 completed is usually false.
403+
404+
Test quest1_0 with ""
405+
396406
Every turn:
397407
if quest1 completed is true:
398408
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:
400410
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;
401414

402415
The quest2 completed is a truth state that varies.
403416
The quest2 completed is usually false.
@@ -431,7 +444,7 @@ Test quest4_0 with ""
431444
Every turn:
432445
if quest4 completed is true:
433446
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:
435448
increase the score by 1; [Quest completed]
436449
Now the quest4 completed is true;
437450

@@ -440,7 +453,7 @@ The quest5 completed is usually false.
440453
Every turn:
441454
if quest5 completed is true:
442455
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:
444457
end the story; [Lost]
445458

446459
The quest6 completed is a truth state that varies.
512 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)