-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsamurai-and-kappa.inf
5455 lines (5192 loc) · 197 KB
/
samurai-and-kappa.inf
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
!% -~S
!% $OMIT_UNUSED_ROUTINES=1
!% $ZCODE_LESS_DICT_DATA=1
!% $MAX_ABBREVS=96
!========================================
! The Samurai and the Kappa
! Copyright © 2024 Garry Francis
!========================================
!Constant DEBUG;
Abbreviate " extra 'service'"; ! 7x, saved 94
Abbreviate "Try talking to"; ! 19x, saved 232
Abbreviate "Shinto shrine"; ! 13x, saved 141
Abbreviate "paper screen"; ! 12x, saved 108
Abbreviate "asked_about"; ! 10x, saved 88
Abbreviate " anything"; ! 29x, saved 194
Abbreviate "courtyard"; ! 15x, saved 96
Abbreviate "flagstone"; ! 23x, saved 152
Abbreviate " yourself"; ! 27x, saved 180
Abbreviate "something"; ! 29x, saved 194
Abbreviate "innkeeper"; ! 16x, saved 103
Abbreviate " to the "; ! 167x, saved 993
Abbreviate "already "; ! 26x, saved 147
Abbreviate " in the "; ! 84x, saved 495
Abbreviate " through"; ! 22x, saved 123
Abbreviate "need to "; ! 32x, saved 183
Abbreviate " at the "; ! 42x, saved 243
Abbreviate " of the "; ! 124x, saved 735
Abbreviate "cucumber"; ! 41x, saved 237
Abbreviate "village"; ! 96x, saved 471
Abbreviate " before"; ! 26x, saved 121
Abbreviate "samurai"; ! 42x, saved 201
Abbreviate ". You "; ! 70x, saved 411
Abbreviate " about"; ! 82x, saved 322
Abbreviate "priest"; ! 36x, saved 138
Abbreviate "can't "; ! 48x, saved 231
Abbreviate " your "; ! 139x, saved 550
Abbreviate "river"; ! 51x, saved 147
Abbreviate " and "; ! 235x, saved 699
Abbreviate ", but"; ! 99x, saved 390
Abbreviate " you "; ! 283x, saved 843
Abbreviate "kappa"; ! 87x, saved 255
Abbreviate "have "; ! 75x, saved 219
Abbreviate "south"; ! 61x, saved 177
Abbreviate "It's "; ! 87x, saved 426
Abbreviate " that"; ! 179x, saved 531
Abbreviate " from"; ! 68x, saved 198
Abbreviate " with"; ! 92x, saved 270
Abbreviate " the "; ! 585x, saved 1749
Abbreviate ". The"; ! 104x, saved 511
Abbreviate " you'"; ! 75x, saved 294
Abbreviate " has "; ! 46x, saved 132
Abbreviate "north"; ! 47x, saved 135
Abbreviate "round"; ! 44x, saved 126
Abbreviate " look"; ! 55x, saved 159
Abbreviate "ould "; ! 47x, saved 135
Abbreviate " are "; ! 76x, saved 222
Abbreviate "child"; ! 37x, saved 105
Abbreviate " like"; ! 48x, saved 138
Abbreviate "very "; ! 39x, saved 111
Abbreviate "can "; ! 148x, saved 290
Abbreviate " of "; ! 159x, saved 312
Abbreviate "You'"; ! 82x, saved 322
Abbreviate " is "; ! 172x, saved 338
Abbreviate "here"; ! 158x, saved 310
Abbreviate " or "; ! 55x, saved 104
Abbreviate " to "; ! 292x, saved 578
Abbreviate "n't "; ! 99x, saved 291
Abbreviate "ight"; ! 51x, saved 96
Abbreviate "The "; ! 153x, saved 453
Abbreviate "ing "; ! 238x, saved 470
Abbreviate "You "; ! 171x, saved 507
Abbreviate "find"; ! 50x, saved 94
Abbreviate " you"; ! 118x, saved 230
Abbreviate "east"; ! 55x, saved 104
Abbreviate "side"; ! 46x, saved 86
Abbreviate "not "; ! 63x, saved 120
Abbreviate " for"; ! 126x, saved 246
Abbreviate "tion"; ! 88x, saved 170
Abbreviate "his "; ! 95x, saved 184
Abbreviate "know"; ! 56x, saved 106
Abbreviate "ter"; ! 136x, saved 133
Abbreviate "ll "; ! 160x, saved 157
Abbreviate " it"; ! 210x, saved 207
Abbreviate "'s "; ! 181x, saved 356
Abbreviate " I "; ! 71x, saved 136
Abbreviate "ear"; ! 98x, saved 95
Abbreviate "ing"; ! 222x, saved 219
Abbreviate " in"; ! 179x, saved 176
Abbreviate " on"; ! 128x, saved 125
Abbreviate "er "; ! 199x, saved 196
Abbreviate "est"; ! 166x, saved 163
Abbreviate "ent"; ! 100x, saved 97
Abbreviate "and"; ! 127x, saved 124
Abbreviate ". I"; ! 118x, saved 348
Abbreviate "re "; ! 118x, saved 115
Abbreviate "She"; ! 52x, saved 98
Abbreviate "lea"; ! 78x, saved 75
Abbreviate " a "; ! 257x, saved 254
Abbreviate "ed "; ! 139x, saved 136
Abbreviate "the"; ! 206x, saved 203
Abbreviate ".]"; ! 28x, saved 106
Abbreviate ", "; ! 325x, saved 322
Abbreviate ".~"; ! 275x, saved 544
Abbreviate ". "; ! 310x, saved 307
Abbreviate "~I"; ! 75x, saved 144
Constant Story "The Samurai and the Kappa";
#Ifv5;
Zcharacter table + '@{A9}'; !Add copyright symbol
Constant Headline "^Copyright @{A9} 2024 Garry Francis^https://warrigal.itch.io^Type ABOUT for further info and credits.^^";
#Ifnot;
Constant Headline "^Copyright (c) 2024 Garry Francis^https://warrigal.itch.io^Type ABOUT for further info and credits.^^";
#Endif;
Array UUID_ARRAY string "UUID://d4b9e81b-04c3-40ad-8ff1-c436f18980e6//";
#Ifdef UUID_ARRAY;
#Endif;
Release 1;
Serial "240628";
!Inform 6 constants
Constant DEATH_MENTION_UNDO;
Constant MAX_CARRIED = 10;
Constant NO_SCORE;
!PunyInform constants
Constant CUSTOM_ABBREVIATIONS;
Constant CUSTOM_PLAYER_OBJECT = samurai;
Constant OPTIONAL_EXTENDED_METAVERBS;
Constant OPTIONAL_EXTENDED_VERBSET;
Constant OPTIONAL_FULL_DIRECTIONS;
#Ifv5;
Constant OPTIONAL_PROVIDE_UNDO;
#Endif;
Constant RUNTIME_ERRORS 0;!0 for release, 2 for debug
!PunyInform static messages
Constant MSG_CLIMB_DEFAULT "You're a samurai, not a monkey.";
Constant MSG_DIG_NO_USE "You're a samurai, not a farmer. Leave the digging to those that know what they're doing.";
Constant MSG_KISS_DEFAULT "You shouldn't go around kissing strangers.";
Constant MSG_PARSER_NO_INPUT "You need to enter a command.";
Constant MSG_PARSER_UNKNOWN_VERB "That's not a verb I recognise.";
Constant MSG_PRAY_DEFAULT "You mumble a few words of prayer to your deceased ancestors.";
Constant MSG_SORRY_DEFAULT "Oh, don't apologise.";
Constant MSG_WAIT_DEFAULT "Time passes...";
!PunyInform dynamic messages
Constant MSG_CLOSE_NOT_OPEN 1000;
Constant MSG_LOCK_ALREADY_LOCKED 1001;
Constant MSG_LOCK_CLOSE_FIRST 1002;
Constant MSG_LOCK_KEY_DOESNT_FIT 1003;
Constant MSG_UNLOCK_ALREADY_UNLOCKED 1004;
Constant MSG_UNLOCK_KEY_DOESNT_FIT 1005;
Constant MSG_INVENTORY_DEFAULT 1006;
!Game-specific constants
Constant AN "an";
Constant SOME "some";
Constant THE "the";
Constant YOUR "your";
Constant ASK_FOR_HINT_NORTH_OF_HONDEN "Ask for a HINT north of the honden.";
Constant ASK_VILLAGERS_ABOUT_HUTS "If you want to know who lives in each hut, you could ask the villagers.";
Constant BAMBOO_FENCE_PREVENTS_YOU "A bamboo fence prevents you going any further ";
Constant DESCRIBE_POST_TOWN "~A post-town is a bigger town that has lodging for high-ranking travellers, like yourself. Post-towns must have at least one honjin or chief inn for those people to rest.~";
Constant DESCRIBE_HONJIN "~A honjin is a chief inn that you'll find in a post-town.~";
Constant DOES_NOT_DROP_SWORDS "A samurai does not drop his swords, except when he bathes.";
Constant FIRST_OPENING_SCREEN "(first opening the sliding paper screen)^^";
Constant FOLLOW_PATH "You follow the path around the outside of the honden.";
Constant GET_SOME_WITH_YOUR_MEAL "~I'll get you some with your meal.~";
Constant HOLD_SWORDS_ABOVE_HEAD "You hold your swords above your head and wade across the river.^^";
Constant HOPE_YOU_ENJOYED_IT "~I hope you enjoyed it.~";
Constant ITS_A_PAPER_SCREEN "It's a paper screen in a light wooden frame. It's currently ";
Constant KEEP_GOING " says, ~Keep going. The village is to the ";
Constant LOST_IN_SWAMP "If you're lost in the swamp, use your other senses to distinguish the different locations.";
Constant MOKUKO_FOLLOWS_YOU "Mokuko follows you.^^";
Constant NONE_LEFT "There's none left.";
Constant REMEMBER_RITUAL "Remember the ritual.";
Constant REMOVE_POUCH_FIRST "You'll have to remove your pouch first.";
Constant SWAMP_DESCRIPTION "You're in a dank, foul-smelling swamp and your feet sink in the sticky mud. You can go in all directions, but the dense vegetation prevents you seeing where they lead.";
Constant TRY_ASKING_HIDEMOCHI_ABOUT "Try asking Hidemochi about the ";
Constant TRY_ASKING_NAGATANE_ABOUT "Try asking Nagatane about the ";
Constant TRY_ASKING_NAKAARI_ABOUT "Try asking Nakaari about the ";
Constant TRY_ASKING_PRIEST_ABOUT "Try asking the priest about the ";
Constant TRY_ASKING_SUMINI_ABOUT "Try asking Sumini about the ";
Constant TRY_ASKING_YONO_ABOUT "Try asking Yono about the ";
Constant TRY_ASKING_YOSHIMORO_ABOUT "Try asking Yoshimoro about the ";
Constant TRY_ASKING_YUKIMOTO_ABOUT "Try asking Yukimoto about the ";
Constant TRY_TALKING_TO_ELDER "Try talking to the village elder before talking to the villagers.";
Constant TRY_TALKING_TO_MOKUKO "Try talking to Mokuko.";
Constant TRY_TALKING_TO_NAGATANE "Try talking to Nagatane and follow his directions.";
Constant TRY_TALKING_TO_YOUNG_MAN "Try talking to the young man.";
Constant TRY_TALKING_TO_VILLAGE_ELDER "Try talking to the village elder.";
Constant WE_HAVE_FINEST_SAKE "~We have some of the finest sake in Japan, but I can't just give it away. It costs a silver coin.~";
Constant YOU_HEAR_RUNNING_WATER_TO_WEST "You can hear the sound of running water to the west.";
Constant NAGATANE_CROP = 1;
Constant NAGATANE_DRINK = 2;
Constant NAGATANE_HUT = 4;
Constant SUMINI_CROP = 8;
Constant SUMINI_DRINK = 16;
Constant SUMINI_HUT = 32;
Constant YOSHIMORO_CROP = 64;
Constant YOSHIMORO_DRINK = 128;
Constant YOSHIMORO_HUT = 256;
Constant YONO_CROP = 512;
Constant YONO_DRINK = 1024;
Constant YONO_HUT = 2048;
Constant MAX_TUTORIAL 22;
Constant TUT_LOOK 0;
Constant TUT_EXAMINE_ME 1;
Constant TUT_INVENTORY 2;
Constant TUT_EXAMINE_ALL 3;
Constant TUT_MOVEMENT 4;
Constant TUT_EXAMINE_KAMISHIMO 5;
Constant TUT_EXAMINE_KATAGINU 6;
Constant TUT_OPEN_POUCH 7;
Constant TUT_TAKE_COIN 8;
Constant TUT_PUT_COIN 9;
Constant TUT_REMOVE_WARAJI 10;
Constant TUT_DROP_WARAJI 11;
Constant TUT_TALK 12;
Constant TUT_ASK_INNKEEPER 13;
Constant TUT_ASK_MAID 14;
Constant TUT_ASK_ABOUT_SERVICE 15;
Constant TUT_SLEEP 16;
Constant TUT_ASK_ABOUT_KAPPA 17;
Constant TUT_HELP_HINT 18;
Constant TUT_CLUES_USED 19;
Constant TUT_DROP_ITEMS_IN_MAZE 20;
Constant TUT_LISTEN_IN_MAZE 21;
!Replaced actions
Replace GoSub;
Replace LockSub;
Replace UnlockSub;
Include "globals.h";
!Game-specific variables
Array tutorial_used -> MAX_TUTORIAL;
Array yard_start -> 0 4 0 0 3
0 0 2 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 5;
Array yard_now -> 0 4 0 0 3
0 0 2 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 5;
Array yard_end -> 0 4 6 6 3
0 6 2 6 0
0 6 0 6 0
6 6 6 6 6
0 0 0 0 5;
Global tutorial = true;
Global tutorial_shown = false;
Global clues_used = 0;
!========================================
! Entry point routines
!========================================
[ ChooseObjects obj code;
if (code == 2)
{
! Stage 1: Disambiguation
if (action_to_be == ##Take && obj notin player)
return 1; !Appropriate
if (action_to_be == ##Drop && obj in player && obj hasnt worn)
return 1; !Appropriate
return 0; !Inappropriate
}
! Stage 2: Processing an "all"
if (action_to_be == ##Wear && obj hasnt clothing)
return 2; !Force exclusion
if (action_to_be == ##Wear && obj hasnt worn)
return 1; !Force inclusion
if (action_to_be == ##Disrobe && obj has worn)
return 1; !Force inclusion
if (action_to_be == ##Disrobe)
return 2; !Force exclusion
return 0; !Accept parser's decision
];
[ DisallowTakeAnimate obj;
if (obj == girl)
rfalse;
];
[ LibraryMessages p_msg p_arg_1 p_arg_2;
switch (p_msg)
{
MSG_CLOSE_NOT_OPEN:
print_ret (CTheyreOrIts)noun, " already closed.";
MSG_LOCK_ALREADY_LOCKED:
print_ret (CTheyreOrIts)noun, " already locked.";
MSG_LOCK_CLOSE_FIRST:
"You'll have to close ", (ItOrThem)noun, " first.";
MSG_LOCK_KEY_DOESNT_FIT:
print_ret (The)second, " ", (DoesntOrDont)second, " fit the lock.";
MSG_UNLOCK_ALREADY_UNLOCKED:
print_ret (CTheyreOrIts)noun, " already unlocked.";
MSG_UNLOCK_KEY_DOESNT_FIT:
print_ret (The)second, " ", (DoesntOrDont)second, " fit the lock.";
MSG_INVENTORY_DEFAULT:
p_arg_1 = "You're carrying ";
if (inventory_style == 0)
{
p_arg_1 = "You're carrying:";
p_arg_2 = NEWLINE_BIT;
}
if (PrintContents(p_arg_1, player, p_arg_2))
{
if (inventory_style)
print ".^";
if (kamishimo has worn)
ShowTutorial(TUT_EXAMINE_KAMISHIMO);
rtrue;
}
rfalse;
}
p_arg_1 = p_arg_2;
];
[ LookRoutine;
if (~~tutorial)
return;
if (location has visited)
return;
if (location == room01)
ShowTutorial(TUT_LOOK);
if (location == room02)
ShowTutorial(TUT_TALK);
return;
];
Include "puny.h";
!========================================
! Initialisation
!========================================
[ Initialise;
location = room01;
lookmode = 2;
move tachi to player;
move katana to player;
move kamishimo to player;
move pouch to player;
move waraji to player;
no_implicit_actions = true;
StartDaemon(room01);
print "Ever since the Battle of Sekigahara and the rise of the Tokugawa shogunate, the samurai have gradually lost their military function to become courtiers, bureaucrats and administrators. This life was not for you, so you find yourself wandering from town to town looking for work where your sword skills are valued. There's always plenty of work escorting dignitaries, or seeking out weapon smugglers and bandits.^^Late one evening you wander into a small town. As it's not a post-town, it doesn't have a honjin for high-ranking travellers, so you enter the lobby of a hatagoya that faces the street. You're greeted by the innkeeper, who bows deeply and invites you inside. You don't need much coaxing, as you're looking forward to a bath, a meal and a good night's sleep.^^The innkeeper enters the inn to make arrangements, leaving you to remove your waraji.^^";
print_ret (italic)"[You're about to embark on an adventure. You can move around, examine things and manipulate things by typing simple text commands of one or more words, usually starting with a verb. The tutorial will offer suggestions to get you started. Commands in the tutorial are shown in upper case, but you can enter them in lower case, if you prefer. You can turn the tutorial off by typing TUTORIAL OFF and turn it back on by typing TUTORIAL ON. Good luck.]^^[WARNING: This game contains nudity, mild sexual references and adult content. Do not play if you're likely to be offended by this.]^";
];
!========================================
! Classes
!========================================
Class OpenableContainer
with
invent
[;
if (inventory_stage == 2 && (self hasnt open || child(self) == 0))
{
if (self has worn)
print " (worn)";
rtrue;
}
],
has container openable;
Class OpenContainer
with
invent
[;
if (inventory_stage == 2 && child(self) == 0)
rtrue;
],
has container open;
!========================================
! Inventory
!========================================
!----------------------------------------
! Samurai
!----------------------------------------
Object samurai "samurai"
with
parse_name
[ i;
while (NextWord() == 'me' or 'myself' or 'self' or 'samurai' or 'haruko' or 'tadamori')
i++;
return i;
],
description
[;
print "Your name is Haruko Tadamori, the last in a long line of proud and honourable samurai in the Haruko family.^";
ShowTutorial(TUT_INVENTORY);
rtrue;
],
before
[;
Rub:
if (location == room04 && bath has general)
"Mokuko has already bathed you.";
if (location == room04)
"That's Mokuko's job. Get in the bath and she'll bathe you.";
if (location == room24 or room34)
"The river water is dirty.";
if (location ~= room15)
"This is not an appropriate location to be washing yourself.";
if (temizuya has general)
"You've already cleansed yourself of any bad spirits. There's no need to overdo it.";
give temizuya general;
"You wash your left hand, then your right hand, then rinse your mouth, as is the custom. You're now cleansed of any bad spirits and can enter the haiden.";
],
capacity MAX_CARRIED,
add_to_scope bum,
has animate concealed transparent;
!----------------------------------------
! Bum
!----------------------------------------
Object bum "bum"
with
article YOUR,
parse_name
[ i;
while (NextWord() == 'anus' or 'arse' or 'ass' or 'backside' or 'bottom' or 'bum' or 'butt' or 'butthole' or 'buttocks' or 'rear')
i++;
return i;
],
description
[;
if (kamishimo has worn)
"You can't see it under your kamishimo.";
else
"Your lily white bottom is exposed for the whole world to see, but you can't see it yourself.";
],
before
[;
Expose:
if (location ~= room24)
"A samurai does not go around exposing his private parts to all and sundry.";
if (kappa in location)
"Once is enough. If you expose your bottom a second time, the kappa is close enough that it can remove your entrails.";
move kappa to location;
"You turn your back to the river, lower your hakama and expose your backside to the river. After a short wait, you hear something emerge from the water. You quickly raise your hakama and spin around to see the ugliest creature you've ever set your eyes on. It's the kappa!";
],
has scenery;
!----------------------------------------
! Kamishimo
!----------------------------------------
Object kamishimo "kamishimo"
with
article YOUR,
parse_name
[ i;
while (NextWord() == 'kamishimo' or 'three-part' or 'outfit' or 'clothing' or 'clothes')
i++;
return i;
],
description
[;
print "It's a three-part outfit, consisting of a kataginu, a kimono and a hakama.^";
ShowTutorial(TUT_EXAMINE_KATAGINU);
rtrue;
],
before
[;
Disrobe:
if (location ~= room04)
"A samurai does not walk around naked.";
if (pouch has worn)
print_ret (string)REMOVE_POUCH_FIRST;
Wear:
if (self hasnt worn && pouch has worn)
print_ret (string)REMOVE_POUCH_FIRST;
],
add_to_scope kataginu kimono hakama,
has clothing worn;
!----------------------------------------
! Kataginu
!----------------------------------------
Object kataginu "kataginu"
with
article YOUR,
parse_name
[ i;
while (NextWord() == 'kataginu' or 'outer' or 'coat' or 'vest' or 'wide' or 'shoulders' or 'purplish-grey' or 'hemp')
i++;
return i;
],
description
[;
tutorial_shown = 1;!Prevent next tutorial clue
"The kataginu is the outer coat or vest of your clothing. It's open under the arms with wide shoulders, making it the more obvious sign of your rank as a samurai. It's made from a purplish-grey hemp, which is a very hardy material.";
],
before
[;
Disrobe:
<<Disrobe kamishimo>>;
Wear:
<<Wear kamishimo>>;
],
has scenery;
!----------------------------------------
! Kimono
!----------------------------------------
Object kimono "kimono"
with
article YOUR,
parse_name
[ i;
while (NextWord() == 'kimono' or 'inner' or 'shirt' or 'shirt-like' or 'garment' or 'white' or 'silk')
i++;
return i;
],
description
[;
tutorial_shown = 1;!Prevent next tutorial clue
"The kimono is the inner, shirt-like garment that covers your torso. It's made of white silk, which is cool in the summer.";
],
before
[;
Disrobe:
<<Disrobe kamishimo>>;
Wear:
<<Wear kamishimo>>;
],
has scenery;
!----------------------------------------
! Hakama
!----------------------------------------
Object hakama "hakama"
with
article YOUR,
parse_name
[ i;
while (NextWord() == 'hakama' or 'baggy' or 'pair' or 'of' or 'trousers' or 'pants')
i++;
return i;
],
description
[;
tutorial_shown = 1;!Prevent next tutorial clue
"The hakama is like a baggy pair of trousers, made from the same material as the kataginu.";
],
before
[;
Disrobe:
<<Disrobe kamishimo>>;
Wear:
<<Wear kamishimo>>;
],
has pluralname scenery;
!----------------------------------------
! Waraji
!----------------------------------------
Object waraji "waraji"
with
article "a pair of",
parse_name
[ i;
while (NextWord() == 'waraji' or 'sandals' or 'footwear' or 'rice' or 'straw' or 'rope')
i++;
return i;
],
description
[;
tutorial_shown = 1;!Prevent next tutorial clue
"The waraji are sandals made from rice straw rope. They're very comfortable, but they wear out quickly if you do a lot of walking. If it was winter, you'd be wearing tabi socks or the more expensive kegutsu horse mane shoes, to keep your feet warm.";
],
before
[;
Disrobe:
if (location ~= room01)
"You need to keep your sandals on to protect your feet.";
],
after
[;
Disrobe:
PrintMsg(MSG_DISROBE_DEFAULT);
ShowTutorial(TUT_DROP_WARAJI);
rtrue;
],
has clothing pluralname worn;
!----------------------------------------
! Pouch
!----------------------------------------
Object pouch "money pouch"
class OpenableContainer
with
article YOUR,
parse_name
[ i;
while (NextWord() == 'money' or 'pouch' or 'animal' or 'skin' or 'draw' or 'cord')
i++;
return i;
],
description
[;
print "It's a small animal skin pouch with a draw cord. ";
<Search self>;
if (self hasnt open)
ShowTutorial(TUT_OPEN_POUCH);
rtrue;
],
before
[;
Disrobe:
if (location ~= room04)
"It's safer to wear your pouch so that you don't lose it.";
Receive:
if (noun ~= coin)
"You can only put coins in the money pouch.";
remove coin;
coins.number++;
"You put the coin back in the pouch.";
],
after
[;
Open:
PrintMsg(MSG_OPEN_DEFAULT);
if (coin in nothing)
ShowTutorial(TUT_TAKE_COIN);
rtrue;
],
has clothing container openable worn;
!----------------------------------------
! Silver coins
!----------------------------------------
Object coins "silver coins" pouch
with
article
[;
print self.number;
],
name 'silver' 'coins',
parse_name
[ nw i flag;
nw = NextWord();
while (nw == 'silver' or 'coin' or 'coins')
{
i++;
if (nw == 'silver' or 'coin' && TestScope(coin))
flag++;
nw = NextWord();
}
if (i == flag)
return 0;
return i;
],
description
[;
print_ret "These are the silver coins that you've earned in the past few weeks. There are ", self.number, " left.";
],
before
[;
Take:
if (coin notin nothing)
"You've already taken one.";
move coin to player;
self.number--;
PronounNotice(coin);
print "You take a coin out of the pouch.^";
ShowTutorial(TUT_PUT_COIN);
rtrue;
],
number 10,
has pluralname static;
!----------------------------------------
! Silver coin
!----------------------------------------
Object coin "silver coin"
with
parse_name
[ i;
while (NextWord() == 'silver' or 'coin' or 'four' or 'characters' or 'square' or 'hole' or 'centre' or 'center')
i++;
return i;
],
description "It's a silver coin with four characters around a square hole in the centre.",
before
[;
Drop:
"You worked hard to earn that money. You shouldn't just throw it away. When you need it, you can either GIVE it to someone or BUY something with it.";
],
has;
!----------------------------------------
! Tachi
!----------------------------------------
Object tachi "tachi"
with
article YOUR,
parse_name
[ i;
while (NextWord() == 'tachi' or 'long' or 'sword' or 'swords//p' or 'curved' or 'blade')
i++;
return i;
],
description
[;
tutorial_shown = 1;!Prevent next tutorial clue
"The tachi is the longer of your two swords. It has a curved blade that was crafted by a master swordsmith and handed down to you by your father. It's worn with the edge down.";
],
before
[;
Drop:
if (location ~= room04)
print_ret (string)DOES_NOT_DROP_SWORDS;
],
has;
!----------------------------------------
! Katana
!----------------------------------------
Object katana "katana"
with
article YOUR,
parse_name
[ i;
while (NextWord() == 'katana' or 'short' or 'sword' or 'swords//p' or 'curved' or 'blade')
i++;
return i;
],
description
[;
tutorial_shown = 1;!Prevent next tutorial clue
"The katana is the shorter of your two swords. It has a curved blade that was crafted by a master swordsmith and handed down to you by your father. It's worn with the edge up.";
],
before
[;
Drop:
if (location ~= room04)
print_ret (string)DOES_NOT_DROP_SWORDS;
],
has;
!========================================
! Room 1: Lobby
!========================================
Object room01 "Lobby"
with
description "The covered lobby has an earthen floor where guests can take off their footwear while protected during inclement weather. Swallows and house martins have also sought shelter here by building their nests in the rafters and under the eaves. The honjin (or chief inn) would have an entrance courtyard closed to outside view by a wall and a substantial gate, whereas this hatagoya (or small inn) has just an opening directly onto the street to the west. The entry to the inn is up a step to the north.",
n_to
[;
if (waraji has worn)
{
print "It's customary to remove your footwear before going indoors.^";
ShowTutorial(TUT_REMOVE_WARAJI);
rtrue;
}
if (waraji in player)
"It's customary to leave your footwear outside.";
return room02;
],
w_to
[;
if (room02 hasnt visited)
"You've only just arrived. You need a bath, a meal and a good night's sleep. The inn is the place to do that.";
if (bath hasnt general)
"You're hot and dirty. You need a bath before you can leave.";
if (table notin nothing)
"You're hungry. You need a good meal before you can leave.";
if (futon hasnt general)
"You're very tired. You need a good sleep before you can leave.";
if (waraji hasnt worn)
"You'll need to put your footwear back on before venturing out onto the street.";
return room07;
],
before
[;
Go:
if (selected_direction == in_to)
<<Go FAKE_N_OBJ>>;
if (selected_direction == out_to)
<<Go FAKE_W_OBJ>>;
Hint:
if (room02 hasnt visited)
"Try entering the hatagoya to the north.";
if (room07 hasnt visited)
"Try leaving the lobby to the west.";
],
daemon
[;
if (action == ##Help or ##Hint)
return;
if (tutorial)
{
if (tutorial_shown == 0)
ShowTutorial(TUT_EXAMINE_ME);
if (tutorial_shown == 0)
ShowTutorial(TUT_INVENTORY);
if (tutorial_shown == 0)
ShowTutorial(TUT_EXAMINE_ALL);
if (tutorial_shown == 0)
ShowTutorial(TUT_MOVEMENT);
if (tutorial_shown == 0)
StopDaemon(self);
tutorial_shown = 0;
}
],
has light;
!----------------------------------------
! Hatagoya (floating object)
!----------------------------------------
Object "hatagoya"
with
name 'hatagoya' 'small' 'inn',
description "It's only a small inn. From what you can see, there's no sign of any other guests. If there are any, they may be in their rooms.",
found_in
[;
if (location == room01 or room02 or room03 or room04 or room05 or room06)
rtrue;
],
has scenery;
!----------------------------------------
! Lobby
!----------------------------------------
Object "lobby" room01
with
name 'covered' 'lobby',
description "The lobby has an earthen floor and straw ceiling, which is indicative of its status.",
has scenery;
!----------------------------------------
! Earthen floor
!----------------------------------------
Object "floor" room01
with
name 'earth' 'earthen' 'floor',
description "The earthen floor has been packed hard by hundreds of feet over the years.",
has scenery;
!----------------------------------------
! Opening
!----------------------------------------
Object "opening" room01
with
article AN,
name 'opening',
description "It leads west onto the street.",
has scenery;
!----------------------------------------
! Straw ceiling
!----------------------------------------
Object "ceiling" room01
with
name 'straw' 'ceiling',
description "The ceiling is made of straw held up by wooden rafters.",
has scenery;
!----------------------------------------
! Wooden rafters
!----------------------------------------
Object "rafters" room01
with
parse_name
[ i;
while (NextWord() == 'wood' or 'wooden' or 'rafter' or 'rafters' or 'eave' or 'eaves')
i++;
return i;
],
description "The eaves and rafters have mud nests of swallows and house martins.",
has pluralname scenery;
!----------------------------------------
! Mud nests
!----------------------------------------
Object "nests" room01
with
name 'mud' 'nest' 'nests',
description "They're the nests of swallows and house martins. The innkeepers encourage this, and even build shelves for nest building, as the birds control the mosquito population.",
has pluralname scenery;
!----------------------------------------
! Birds
!----------------------------------------
Object "birds" room01
with
parse_name
[ i;
while (NextWord() == 'swallow' or 'swallows' or 'house' or 'martin' or 'martins' or 'bird' or 'birds')
i++;
return i;
],
description "There's no sign of any birds at the moment. They're probably foraging for food.",
has pluralname scenery;
!----------------------------------------
! Step
!----------------------------------------
Object "step" room01
with
name 'step',
description "It's customary to have a step from the outside to the inside, as this shows the boundary between where footwear can be worn and can't be worn respectively.",
has scenery;
!----------------------------------------
! Honjin
!----------------------------------------
Object "honjin" room01
with
parse_name
[ nw i flag;
nw = NextWord();
while (nw == 'honjin' or 'chief' or 'inn')
{
i++;
if (nw == 'inn')
flag++;
nw = NextWord();
}
if (i == flag)
return 0;
return i;
],
description "There's no honjin here, as this is not a post-town.",
has scenery;
!========================================
! Room 2: Hatagoya
!========================================
Object room02 "Hatagoya"
with
description "This hatagoya (or small inn) is typical of many that you've seen in other small towns. It's comprised of a raised timber platform covered with tatami matting. There's a small ash pit sunk into the floor with a kettle of hot water suspended over the coals for preparing tea. A sliding paper screen to the east conceals the guest rooms beyond. The exit from the hatagoya is to the south.",
s_to
[;
if (futon has general && innkeeper hasnt general)
"You can't leave until you've paid your bill.";
else
return room01;
],
e_to
[;
if (innkeeper hasnt proper)
"You should talk to the innkeeper before you go wandering around in his inn.";
if (maid hasnt proper)
"You should talk to the maid to get directions.";
if (inn_screen hasnt open)
{
print (string)FIRST_OPENING_SCREEN;
give inn_screen open;
}
if (room03 hasnt visited)
{
print (string)MOKUKO_FOLLOWS_YOU;
move maid to room03;
}
return inn_screen;
],
before
[;
Go:
if (selected_direction == out_to)
<<Go FAKE_S_OBJ>>;
Hint:
if (innkeeper hasnt proper)
"Try talking to the innkeeper.";
if (maid hasnt proper)
"Try talking to the maid.";
if (room03 hasnt visited)
"Try talking to Mokuko, then follow her directions.";
if (bath hasnt general)
"You're hot and dirty. You need a bath.";
if (table notin nothing)
"You're hungry. You need a good meal.";
if (futon hasnt general)
"You're very tired. You need to sleep.";
if (innkeeper hasnt general)
"Try talking to Nakaari or asking him about the bill.";
if (innkeeper.asked_about_kappa == 0)
print_ret (string)TRY_ASKING_NAKAARI_ABOUT, "kappa.";
if (innkeeper.asked_about_priest == 0)
print_ret (string)TRY_ASKING_NAKAARI_ABOUT, "priest.";
if (innkeeper.asked_about_elder == 0)
print_ret (string)TRY_ASKING_NAKAARI_ABOUT, "elder.";
if (clues_used == 4095 && bottle has scenery)
print_ret (string)TRY_ASKING_NAKAARI_ABOUT, "sake.";
],
has light;
!----------------------------------------