scottkit 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. data/.gitignore +4 -0
  2. data/GPL-2 +339 -0
  3. data/Makefile +5 -0
  4. data/README +75 -0
  5. data/Rakefile +58 -0
  6. data/VERSION +1 -0
  7. data/bin/scottkit +96 -0
  8. data/bin/scottkit.rb +96 -0
  9. data/data/.gitignore +1 -0
  10. data/data/adams/.gitignore +2 -0
  11. data/data/adams/AdamsGames.zip +0 -0
  12. data/data/adams/Makefile +18 -0
  13. data/data/crystal/crystal.map +112 -0
  14. data/data/crystal/crystal.sck +598 -0
  15. data/data/crystal/crystal.solution +82 -0
  16. data/data/dan-and-matt.sck +180 -0
  17. data/data/dan-and-matt.solution +32 -0
  18. data/data/howarth/.gitignore +2 -0
  19. data/data/howarth/Makefile +14 -0
  20. data/data/howarth/mysterious.tar.gz +0 -0
  21. data/data/test/Makefile +18 -0
  22. data/data/test/adams/Makefile +13 -0
  23. data/data/test/adams/adv01.solution +186 -0
  24. data/data/test/adams/adv01.transcript +869 -0
  25. data/data/test/adams/adv01.transcript.md5 +1 -0
  26. data/data/test/adams/adv02.solution +225 -0
  27. data/data/test/adams/adv02.transcript +970 -0
  28. data/data/test/adams/adv02.transcript.md5 +1 -0
  29. data/data/test/adams/adv04.solution +187 -0
  30. data/data/test/adams/adv04.transcript +876 -0
  31. data/data/test/adams/adv04.transcript.md5 +1 -0
  32. data/data/test/crystal.decompile +628 -0
  33. data/data/test/crystal.sao +373 -0
  34. data/data/test/crystal.save-file +62 -0
  35. data/data/test/crystal.save-script +41 -0
  36. data/data/test/crystal.sck +598 -0
  37. data/data/test/crystal.solution +82 -0
  38. data/data/test/crystal.transcript +413 -0
  39. data/data/test/t6.pretty-print +225 -0
  40. data/data/test/t7.sao +110 -0
  41. data/data/test/t7.solution +28 -0
  42. data/data/test/t7.transcript +147 -0
  43. data/data/tutorial/t1.sck +5 -0
  44. data/data/tutorial/t2.sck +14 -0
  45. data/data/tutorial/t3.sck +38 -0
  46. data/data/tutorial/t4.sck +62 -0
  47. data/data/tutorial/t5.sck +87 -0
  48. data/data/tutorial/t6.sck +119 -0
  49. data/data/tutorial/t7.sck +135 -0
  50. data/lib/scottkit/compile.rb +661 -0
  51. data/lib/scottkit/decompile.rb +175 -0
  52. data/lib/scottkit/game.rb +409 -0
  53. data/lib/scottkit/play.rb +474 -0
  54. data/notes/Definition +147 -0
  55. data/notes/Definition.saved-game +9 -0
  56. data/notes/Definition.scottfree-1.14 +142 -0
  57. data/notes/adventureland-maze +20 -0
  58. data/notes/continue-action +51 -0
  59. data/test/test_canonicalise.rb +94 -0
  60. data/test/test_compile.rb +54 -0
  61. data/test/test_decompile.rb +13 -0
  62. data/test/test_play.rb +20 -0
  63. data/test/test_playadams.rb +36 -0
  64. data/test/test_save.rb +31 -0
  65. data/test/withio.rb +15 -0
  66. data/test/withio_test.rb +31 -0
  67. metadata +118 -0
@@ -0,0 +1 @@
1
+ cdb1df7ddf1f194a743cfbe770d1b896
@@ -0,0 +1,628 @@
1
+ # 28 rooms, 45 items, 88 actions
2
+ # 54 messages, 6 treasures, 43 verbs/nouns
3
+ ident 18400
4
+ version 1
5
+ wordlen 3
6
+ maxload 5
7
+ lighttime 100
8
+ unknown1 0
9
+ unknown2 0
10
+ start hut
11
+ treasury hut
12
+
13
+ verbgroup GO ENT FOL RUN WAL
14
+ verbgroup TAK GET
15
+ verbgroup BAT RAM
16
+ verbgroup LEA DRO
17
+ verbgroup KIC SMA BRE
18
+
19
+ noungroup AXE AX
20
+
21
+ room hut "small wooden hut."
22
+ exit east "west"
23
+
24
+ room "west" "clearing. There's a small hut to the west."
25
+ exit north swamp
26
+ exit south forest
27
+ exit east glade
28
+ exit west hut
29
+
30
+ room glade "glade"
31
+ exit north outcrop
32
+ exit south forest1
33
+ exit west "west"
34
+
35
+ room tree "the top of a beech tree"
36
+ exit down glade
37
+
38
+ room swamp "dismal swamp"
39
+ exit south "west"
40
+ exit east outcrop
41
+
42
+ room outcrop "rocky area by an outcrop"
43
+ exit south glade
44
+ exit west swamp
45
+
46
+ room tunnel "dingy north-south tunnel"
47
+ exit south outcrop
48
+
49
+ room passage "gloomy north-south passage"
50
+ exit south tunnel
51
+
52
+ room "room" "empty room"
53
+ exit south passage
54
+
55
+ room forest "forest"
56
+ exit north "west"
57
+ exit east forest1
58
+
59
+ room forest2 "overgrown path in a dark forest"
60
+ exit north forest
61
+
62
+ room vase "*I'm INSIDE a huge vase!"
63
+
64
+ room forest1 "forest"
65
+ exit north glade
66
+ exit west forest
67
+
68
+ room level "bubbling pool, just below the water level"
69
+ exit up forest1
70
+
71
+ room "north" "*I'm swimming in an underground river.
72
+ Light pours from the north."
73
+ exit north level
74
+ exit south north1
75
+
76
+ room north1 "*I'm swimming in an underground river.
77
+ There's a faint glimmer of light to the north."
78
+ exit north "north"
79
+ exit south "south"
80
+
81
+ room "south" "*I'm swimming in an underground river.
82
+ There's a faint glimmer of light to the south."
83
+ exit north north1
84
+ exit south south1
85
+
86
+ room south1 "*I'm swimming in an underground river.
87
+ Light pours from the south."
88
+ exit north "south"
89
+ exit south wall
90
+
91
+ room wall "brightly lit underground chamber.
92
+ An underground river disappears into the north wall."
93
+ exit north south1
94
+
95
+ room directions "central underground chamber. Passages leave in all directions."
96
+ exit north wall
97
+ exit east south2
98
+ exit west cells
99
+
100
+ room cells "prison in an undergound complex. Doors lead to prison cells"
101
+ exit east directions
102
+
103
+ room ground "dirty prison cell with muddy straw on the ground"
104
+ exit north hut
105
+ exit east cells
106
+
107
+ room south2 "junction between an east-west passage and one that leads south"
108
+ exit south floor
109
+ exit east machinery
110
+ exit west directions
111
+
112
+ room machinery "control room filled with humming, crackling machinery"
113
+ exit west south2
114
+
115
+ room floor "square room with a steel floor"
116
+ exit north south2
117
+ exit south west1
118
+
119
+ room west1 "vast hall which is split by a deep chasm running from east to west"
120
+ exit north floor
121
+
122
+ room again "*I'm dead. Great. Try again."
123
+ exit east hut
124
+
125
+ item Sign "Sign"
126
+ at hut
127
+
128
+ item Axe "Axe"
129
+ called AXE
130
+ at hut
131
+
132
+ item match "Single match"
133
+ called MAT
134
+ at hut
135
+
136
+ item chain "*Platinum chain*"
137
+ called CHA
138
+ at "west"
139
+
140
+ item crown "*Gold crown*"
141
+ called CRO
142
+ at "west"
143
+
144
+ item medallion "*Silver medallion*"
145
+ called MED
146
+ at "west"
147
+
148
+ item sceptre "*Bronze sceptre*"
149
+ called SCE
150
+ at "west"
151
+
152
+ item goblet "*Zinc goblet*"
153
+ called GOB
154
+ at "west"
155
+
156
+ item tree "Beech tree"
157
+ at glade
158
+
159
+ item lamp "Old-fashioned brass lamp"
160
+ called LAM
161
+ at outcrop
162
+
163
+ item honey "Wild honey"
164
+ called HON
165
+ at tree
166
+
167
+ item bees "Killer bees"
168
+ at tree
169
+
170
+ item bees1 "Drowsy bees"
171
+ nowhere
172
+
173
+ item tree1 "Cypress tree"
174
+ at swamp
175
+
176
+ item stump "-SOLID- stump"
177
+ nowhere
178
+
179
+ item tree2 "Trunk of cypress tree"
180
+ called TRU
181
+ nowhere
182
+
183
+ item mud "Evil smelling mud"
184
+ called MUD
185
+ at swamp
186
+
187
+ item gas "Swamp gas"
188
+ at swamp
189
+
190
+ item slime "Patches of `OILY` slime"
191
+ called OIL
192
+ at swamp
193
+
194
+ item Chiggers "Chiggers"
195
+ called CHI
196
+ at swamp
197
+
198
+ item rock "Balsa-wood door set into the rock"
199
+ at outcrop
200
+
201
+ item nest "Bees' nest"
202
+ at tree
203
+
204
+ item wood "Balsa wood"
205
+ called BAL
206
+ nowhere
207
+
208
+ item rock1 "Tunnel disappears into the rock"
209
+ nowhere
210
+
211
+ item "north" "Plywood door blocks the way north"
212
+ at tunnel
213
+
214
+ item Plywood "Plywood"
215
+ called PLY
216
+ nowhere
217
+
218
+ item rock2 "Passage disappears into the rock"
219
+ nowhere
220
+
221
+ item north1 "Oak door blocks the way north"
222
+ at passage
223
+
224
+ item Oak "Oak"
225
+ called OAK
226
+ nowhere
227
+
228
+ item north2 "Entrance to the north"
229
+ nowhere
230
+
231
+ item fire "Blazing hot fire"
232
+ nowhere
233
+
234
+ item forest "Path leads south into the forest"
235
+ at forest
236
+
237
+ item bear "Very thin black bear"
238
+ at forest
239
+
240
+ item bear1 "Sleeping bear"
241
+ nowhere
242
+
243
+ item vase "Huge vase"
244
+ called VAS
245
+ at forest2
246
+
247
+ item key "Iron key"
248
+ called KEY
249
+ at vase
250
+
251
+ item pool "Bubbling pool"
252
+ at forest1
253
+
254
+ item "south" "inflow from the south"
255
+ at level
256
+
257
+ item stoat "*Tin stoat*"
258
+ called STO
259
+ at wall
260
+
261
+ item south1 "Iron door leads south"
262
+ at cells
263
+
264
+ item "west" "Bronze door leads west"
265
+ at cells
266
+
267
+ item goblin "small goblin"
268
+ at ground
269
+
270
+ item button "Red button"
271
+ at machinery
272
+
273
+ item button1 "Blue button"
274
+ at machinery
275
+
276
+ item Lever "Lever"
277
+ at machinery
278
+
279
+ action INV:
280
+ inventory
281
+
282
+ action TAK INV
283
+ inventory
284
+
285
+ action SCO:
286
+ score
287
+
288
+ action SAV GAM
289
+ save_game
290
+
291
+ action LOO:
292
+ look
293
+
294
+ occur when "at" forest2
295
+ set_dark
296
+
297
+ occur when !at forest2
298
+ clear_dark
299
+
300
+ occur when !flag 1
301
+ set_flag 1
302
+ print "Welcome to `CRYSTAL OF CHAOS`"
303
+ print "Written by Mike Taylor, starting Monday 10th April 2001"
304
+ continue
305
+
306
+ occur 0%
307
+ print "This is a demo for the `ScottKit` adventure system"
308
+ print ""
309
+ print "Your task is to find the six crown jewels of the"
310
+ continue
311
+ comment "cont"
312
+
313
+ occur 0%
314
+ print "kingdom and store them in this hut. They are:"
315
+ print "a platinum chain, a gold crown, a silver medallion"
316
+ print "a bronze sceptre, a zinc goblet and a tin stoat."
317
+ comment "cont"
318
+
319
+ occur when "at" "west" and !flag 6
320
+ set_flag 6
321
+ print "Oh, there they are. That wasn't as hard as I expected."
322
+
323
+ occur when "at" hut
324
+ set_flag 7
325
+
326
+ occur when !here chain
327
+ clear_flag 7
328
+
329
+ occur when !here crown
330
+ clear_flag 7
331
+
332
+ occur when !here medallion
333
+ clear_flag 7
334
+
335
+ occur when !here sceptre
336
+ clear_flag 7
337
+
338
+ occur when !here goblet
339
+ clear_flag 7
340
+
341
+ occur when flag 7 and !flag 8
342
+ set_flag 8
343
+ print "Ah, looks like I'm still missing the stoat."
344
+
345
+ occur when "at" level
346
+ set_flag 5
347
+
348
+ occur when "at" "north"
349
+ set_flag 5
350
+
351
+ occur when "at" north1
352
+ set_flag 5
353
+
354
+ occur when "at" "south"
355
+ set_flag 5
356
+
357
+ occur when "at" south1
358
+ set_flag 5
359
+
360
+ occur when "at" forest1
361
+ clear_flag 5
362
+
363
+ occur when "at" wall
364
+ clear_flag 5
365
+
366
+ occur when "at" vase
367
+ clear_flag 5
368
+
369
+ occur when "at" again
370
+ clear_flag 5
371
+
372
+ occur when counter_eq 1
373
+ print "I have to breathe NOW!"
374
+
375
+ occur when counter_gt 0
376
+ dec_counter
377
+
378
+ occur when counter_gt 0
379
+ print "I can only hold my breath for"
380
+ print_counter
381
+ print "more turns."
382
+
383
+ occur when counter_eq 0 and flag 5
384
+ print "I can't breathe ..."
385
+ pause
386
+ clear_flag 5
387
+ die
388
+ comment "Death due to lack of breath"
389
+
390
+ occur when flag 2 and here Plywood
391
+ print "The plywood also catches fire and burns quickly."
392
+ destroy Plywood
393
+ set_flag 3
394
+
395
+ occur when flag 3 and here Oak
396
+ print "The oak catches, and becomes a roaring fire."
397
+ print "Smoke pours upwards."
398
+ destroy Oak
399
+ continue
400
+
401
+ occur 0%
402
+ drop fire
403
+ set_flag 4
404
+ comment "cont"
405
+
406
+ occur when flag 4 and "at" glade
407
+ destroy bees
408
+ put bees1 tree
409
+
410
+ occur
411
+ clear_flag 2
412
+ clear_flag 3
413
+ clear_flag 4
414
+ comment "Fire-building must happen all in one go"
415
+
416
+ action CHO when !present Axe
417
+ print "I can't chop anything without an axe."
418
+
419
+ action BAT when !present tree2
420
+ print "I don't have a battering ram."
421
+
422
+ action LIG when !present match
423
+ print "I don't have anything to light it with."
424
+
425
+ action REA SIG when present Sign
426
+ print "It says - `Leave *TREASURES* here, then say: SCORE`"
427
+
428
+ action CLI TRE when here tree
429
+ goto tree
430
+ look2
431
+
432
+ action TAK HON when here bees
433
+ print "No! Bees would sting me!"
434
+
435
+ action HEL when here bees
436
+ print "Smoke 'em out!"
437
+
438
+ action CHO TRE when here tree1
439
+ print TIMBER!
440
+ swap tree1 tree2
441
+ drop stump
442
+ look2
443
+
444
+ action EXA STU when here stump
445
+ print "There's nothing there all right! Maybe I should forget it?"
446
+
447
+ action OPE DOO when here rock
448
+ print "It's locked."
449
+
450
+ action KIC DOO when here rock
451
+ swap rock rock1
452
+ drop wood
453
+ print "It splinters easily."
454
+ continue
455
+
456
+ occur 0%
457
+ print "There's a tunnel beyond."
458
+ look2
459
+ comment "cont"
460
+
461
+ action CHO DOO when here rock
462
+ swap rock rock1
463
+ print "CRUNCH! It's smashed to smithereens!"
464
+ print "There's a tunnel beyond."
465
+ look2
466
+ comment "no balsa wood"
467
+
468
+ action BAT DOO when here rock
469
+ destroy rock
470
+ drop rock1
471
+ print "DOOSH! It's absolutely annihilated!"
472
+ continue
473
+ comment "no balsa wood"
474
+
475
+ occur 0%
476
+ print "There's a tunnel beyond."
477
+ look2
478
+ comment "cont"
479
+
480
+ action GO TUN when here rock1
481
+ goto tunnel
482
+ look2
483
+
484
+ action OPE DOO when here "north"
485
+ print "It's also locked."
486
+
487
+ action KIC DOO when here "north"
488
+ print Ouch!
489
+
490
+ action CHO DOO when here "north"
491
+ swap "north" rock2
492
+ drop Plywood
493
+ print CRUNCH!
494
+ continue
495
+
496
+ occur 0%
497
+ print "There's a passage beyond."
498
+ look2
499
+ comment "cont"
500
+
501
+ action BAT DOO when here "north"
502
+ swap "north" rock2
503
+ print "DOOSH! It's absolutely annihilated!"
504
+ print "There's a passage beyond."
505
+ look2
506
+ comment "no plywood"
507
+
508
+ action GO PAS when here rock2
509
+ goto passage
510
+ look2
511
+
512
+ action OPE DOO when here north1
513
+ print "OF COURSE it's locked!"
514
+
515
+ action KIC DOO when here north1
516
+ print Ouch!
517
+
518
+ action CHO DOO when here north1
519
+ print "It's too solid for the axe to make much impression."
520
+
521
+ action BAT DOO when here north1
522
+ swap north1 north2
523
+ drop Oak
524
+ print DOOSH!
525
+ continue
526
+
527
+ occur 0%
528
+ print "There's an entrance beyond."
529
+ look2
530
+ comment "cont"
531
+
532
+ action GO ENT when here north2
533
+ goto "room"
534
+ look2
535
+
536
+ action LIG PLY when "carried" Plywood
537
+ print "Not while I'm carrying it!"
538
+
539
+ action LIG PLY when here Plywood
540
+ print "I can't get it to catch fire."
541
+ print "My match goes out."
542
+ destroy match
543
+
544
+ action LIG OAK when here Oak
545
+ print "There's no way it will catch fire."
546
+ print "My match goes out."
547
+ destroy match
548
+
549
+ action LIG OAK when "carried" Oak
550
+ print "Not while I'm carrying it!"
551
+
552
+ action LIG BAL when "carried" wood
553
+ print "Not while I'm carrying it!"
554
+
555
+ action LIG BAL when here wood
556
+ print "OK. It burns up very quickly."
557
+ print "My match goes out."
558
+ destroy match
559
+ continue
560
+
561
+ occur 0%
562
+ destroy wood
563
+ set_flag 2
564
+ comment "cont"
565
+
566
+ action GO PAT when here bear
567
+ print "Bear won't let me"
568
+
569
+ action GO PAT when "at" forest
570
+ goto forest2
571
+ look2
572
+
573
+ action GIV HON when here bear and present honey
574
+ destroy bear
575
+ destroy honey
576
+ drop bear1
577
+ print "Bear eats the honey and falls asleep."
578
+
579
+ action EXA VAS when present vase
580
+ print "It's bigger than I am."
581
+
582
+ action GO VAS when here vase
583
+ swap_specific_room 1
584
+ goto vase
585
+ look2
586
+
587
+ action LEA VAS when "at" vase
588
+ swap_specific_room 1
589
+ look2
590
+
591
+ action TAK OUT when "at" vase
592
+ swap_specific_room 1
593
+ look2
594
+
595
+ action GO POO when here pool
596
+ goto level
597
+ look2
598
+
599
+ action HOL BRE when counter_gt 0
600
+ print "I'm already holding my breath!"
601
+
602
+ action HOL BRE
603
+ set_counter 6
604
+ print OK
605
+
606
+ action GO INF when here "south"
607
+ goto "north"
608
+ look2
609
+
610
+ action KNO DOO when "at" cells
611
+ print "Which door? Use `knock iron` or `knock bronze`."
612
+
613
+ action KNO IRO when here south1
614
+ print "Nothing happens."
615
+
616
+ action KNO BRO when here "west"
617
+ print "Nothing seems to happen."
618
+
619
+ action HEL:
620
+ print "You'll have to figure it out for yourself."
621
+
622
+ action EXA:
623
+ print "It looks like a pretty average"
624
+ println_noun
625
+
626
+ action WAI:
627
+ print OK
628
+