SOFTPORN.PAS 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. program softporn_adventure;
  2. const bottom_line = 25; { 24 for CP/M, 25 for IBM PC }
  3. label quit_game;
  4. {$C+}
  5. {$R+}
  6. {$U+}
  7. const recsize = 450;
  8. type rectype = array[1..recsize] of char;
  9. var messg_rec : rectype;
  10. messg_file : file of rectype;
  11. ioerr : integer;
  12. {$I SOFTP1.INC }
  13. {$I SOFTP2.INC }
  14. {$I SOFTP3.INC }
  15. begin { main program }
  16. lowvideo;
  17. {$I-}
  18. assign(messg_file,'SOFTPORN.MSG');
  19. reset(messg_file);
  20. {$I+}
  21. ioerr := IOresult;
  22. if ioerr<>0 then
  23. begin
  24. writeln('Cannot open SOFTPORN.MSG, file missing?');
  25. halt;
  26. end;
  27. with game_position do
  28. begin
  29. repeat
  30. init_new_game;
  31. game_ended := false;
  32. repeat { until game_ended }
  33. if your_place in bar_area then
  34. begin
  35. object_place[_sign] := b_street;
  36. object_place[_button] := b_bar;
  37. end
  38. else if your_place in casino_area then
  39. begin
  40. object_place[_sign] := c_street;
  41. object_place[_button] := c_htdesk;
  42. object_place[_elevator] := c_htdesk;
  43. end
  44. else if your_place in disco_area then
  45. begin
  46. object_place[_sign] := d_street;
  47. object_place[_telephone] := d_telbth;
  48. end
  49. else if your_place in penthouse_area then
  50. begin
  51. object_place[_button] := p_pntfoy;
  52. object_place[_elevator] := p_pntfoy;
  53. object_place[_telephone] := p_pntpch;
  54. end;
  55. if your_place<>b_bar then
  56. path[b_bar,east] := nowhere;
  57. if your_place<>d_entrnc then
  58. begin
  59. path[d_entrnc,west] := nowhere;
  60. door_W_open := false;
  61. end;
  62. if not is_here(_stool) then
  63. stool_climbed := false;
  64. if rubber_worn and (your_place in public_places) then
  65. if random(8)=5 then
  66. begin
  67. write_message('A passerby kills me ' +
  68. 'for wearing my kinky rubber in public!');
  69. purgatory;
  70. if game_ended then
  71. goto quit_game;
  72. end;
  73. read_and_parse_command( verbnam, objnam, full_verb, full_noun );
  74. verb_only := objnam[1]=' ';
  75. verb := first_verb;
  76. while ( verbnam <> verb_name[verb] ) and ( verb < last_verb ) do
  77. verb := succ(verb);
  78. no_verb := verb = _no_verb;
  79. noun := first_object;
  80. while ( objnam <> obj_name[noun] ) and ( noun < last_object ) do
  81. noun := succ(noun);
  82. no_object := noun = _no_object;
  83. direction := first_direction;
  84. while ( objnam<>dir_name[direction] ) and
  85. ( direction<=last_direction ) do
  86. direction := succ(direction);
  87. no_direction := direction = _no_direction;
  88. if noun=_sign then
  89. begin
  90. if your_place=d_entrnc then {sign on door to west}
  91. noun := _door_west;
  92. if your_place=p_kitchn then {sign on sink}
  93. noun := _sink;
  94. end;
  95. if no_verb then
  96. write_message('I don''t know how to ' + full_verb + ' something!')
  97. else if verb_only and (not (verb in stand_alone_verbs)) then
  98. write_message('Gimme a noun!!')
  99. else if (not verb_only) and ( no_object and no_direction and
  100. (not (verb in special_verbs)) ) then
  101. begin
  102. add_definite_article_to( full_noun );
  103. write_message
  104. ('I don''t know how to ' + full_verb + full_noun + '!');
  105. end
  106. else
  107. begin
  108. case verb of
  109. {$I SOFTP4.INC }
  110. {$I SOFTP5.INC }
  111. {$I SOFTP6.INC }
  112. end;
  113. end; { If }
  114. until game_ended;
  115. quit_game:
  116. writeln;
  117. writeln('You scored ''',score,''' out of a possible ''3''');
  118. newlines(2);
  119. write( 'Thanks for playing. Would you like to play again? ');
  120. read_key( yesno, ['Y','N'] );
  121. until yesno='N';
  122. write_message( 'Good-Bye!!' ); writeln;
  123. end; { with }
  124. close(messg_file);
  125. end.
  126.