Skip to content

Instantly share code, notes, and snippets.

@curiousdannii
Created March 11, 2022 05:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save curiousdannii/7d6b7f5c6a3f4cdb780b718d175366e8 to your computer and use it in GitHub Desktop.
Save curiousdannii/7d6b7f5c6a3f4cdb780b718d175366e8 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
!% -s
!% $ALLOC_CHUNK_SIZE=32000
!% $MAX_ARRAYS=10000
!% $MAX_CLASSES=200
!% $MAX_VERBS=255
!% $MAX_LABELS=200000
!% $MAX_ZCODE_SIZE=500000
!% $MAX_STATIC_DATA=180000
!% $MAX_PROP_TABLE_SIZE=200000
!% $MAX_INDIV_PROP_TABLE_SIZE=20000
!% $MAX_STACK_SIZE=65536
!% $MAX_SYMBOLS=20000
!% $MAX_EXPRESSION_NODES=256
!% $MAX_LOCAL_VARIABLES=256
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Output.i6t: Other Configuration
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant Grammar__Version 2;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Output.i6t: Identification
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! This file was compiled by Inform 7: the build number and version of the
! I6 template layer used are as follows.
Constant NI_BUILD_COUNT "6M62";
Constant LibSerial = "080126";
Constant LibRelease = "6/12N";
Constant LIBRARY_VERSION = 612;
Constant PLUGIN_FILES;
Array UUID_ARRAY string "UUID://45D30891-388F-4B48-9C05-7B4748F9F092//";
Global Story = BC_0;
Constant Headline BC_1;
Release 1;
Serial "220311";
Default Story 0;
Default Headline 0;
[ ShowExtensionVersions ;
print "Standard Rules version 3/120430 by Graham Nelson^";
print "Custom Block Value Kinds version 1/220311 by Dannii Willis^";
];
[ ShowFullExtensionVersions ;
print "Standard Rules version 3/120430 by Graham Nelson^";
print "English Language version 1 by Graham Nelson^";
print "Custom Block Value Kinds version 1/220311 by Dannii Willis^";
];
[ ShowOneExtension
id ! Implied call parameter
;
if (id == 1) print "Standard Rules version 3/120430 by Graham Nelson";
if (id == 2) print "English Language version 1 by Graham Nelson";
if (id == 3) print "Custom Block Value Kinds version 1/220311 by Dannii Willis";
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Output.i6t: Use options
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Use option:
Constant DynamicMemoryAllocation = 8192;
! Use option:
Constant TEXT_TY_BufferSize = 1024+3;
! Use option:
Constant MAX_FIGURE_THUMBNAILS_IN_INDEX = 50;
! Use option:
Constant MATCH_LIST_WORDS = 100;
#Ifndef USE_SCORING;
Constant USE_SCORING = 0;
#Endif;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Output.i6t: Constants
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: VM Target Constants
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
#Ifndef WORDSIZE; ! compiling with Z-code only compiler
Constant TARGET_ZCODE;
Constant WORDSIZE 2;
#Endif;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Wordsize-Dependent Definitions
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
#Iftrue (WORDSIZE == 2);
Constant NULL = $ffff;
Constant WORD_HIGHBIT = $8000;
Constant WORD_NEXTTOHIGHBIT = $4000;
Constant IMPROBABLE_VALUE = $7fe3;
Constant MAX_POSITIVE_NUMBER 32767;
Constant MIN_NEGATIVE_NUMBER -32768;
Constant REPARSE_CODE = 10000;
#Endif;
#Iftrue (WORDSIZE == 4);
Constant NULL = $ffffffff;
Constant WORD_HIGHBIT = $80000000;
Constant WORD_NEXTTOHIGHBIT = $40000000;
Constant IMPROBABLE_VALUE = $deadce11;
Constant MAX_POSITIVE_NUMBER 2147483647;
Constant MIN_NEGATIVE_NUMBER -2147483648;
Constant REPARSE_CODE = $40000000;
#Endif;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Z-Machine Definitions
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
#Ifdef TARGET_ZCODE;
Global max_z_object;
Constant INDIV_PROP_START 64;
! Offsets into Z-machine header:
Constant HDR_ZCODEVERSION = $00; ! byte
Constant HDR_TERPFLAGS = $01; ! byte
Constant HDR_GAMERELEASE = $02; ! word
Constant HDR_HIGHMEMORY = $04; ! word
Constant HDR_INITIALPC = $06; ! word
Constant HDR_DICTIONARY = $08; ! word
Constant HDR_OBJECTS = $0A; ! word
Constant HDR_GLOBALS = $0C; ! word
Constant HDR_STATICMEMORY = $0E; ! word
Constant HDR_GAMEFLAGS = $10; ! word
Constant HDR_GAMESERIAL = $12; ! six ASCII characters
Constant HDR_ABBREVIATIONS = $18; ! word
Constant HDR_FILELENGTH = $1A; ! word
Constant HDR_CHECKSUM = $1C; ! word
Constant HDR_TERPNUMBER = $1E; ! byte
Constant HDR_TERPVERSION = $1F; ! byte
Constant HDR_SCREENHLINES = $20; ! byte
Constant HDR_SCREENWCHARS = $21; ! byte
Constant HDR_SCREENWUNITS = $22; ! word
Constant HDR_SCREENHUNITS = $24; ! word
Constant HDR_FONTWUNITS = $26; ! byte
Constant HDR_FONTHUNITS = $27; ! byte
Constant HDR_ROUTINEOFFSET = $28; ! word
Constant HDR_STRINGOFFSET = $2A; ! word
Constant HDR_BGCOLOUR = $2C; ! byte
Constant HDR_FGCOLOUR = $2D; ! byte
Constant HDR_TERMCHARS = $2E; ! word
Constant HDR_PIXELSTO3 = $30; ! word
Constant HDR_TERPSTANDARD = $32; ! two bytes
Constant HDR_ALPHABET = $34; ! word
Constant HDR_EXTENSION = $36; ! word
Constant HDR_UNUSED = $38; ! two words
Constant HDR_INFORMVERSION = $3C; ! four ASCII characters
#Endif;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Glulx Definitions
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
#IFDEF TARGET_GLULX;
Global unicode_gestalt_ok; ! Set if interpreter supports Unicode
! Offsets into Glulx header and start of ROM:
Constant HDR_MAGICNUMBER = $00; ! long word
Constant HDR_GLULXVERSION = $04; ! long word
Constant HDR_RAMSTART = $08; ! long word
Constant HDR_EXTSTART = $0C; ! long word
Constant HDR_ENDMEM = $10; ! long word
Constant HDR_STACKSIZE = $14; ! long word
Constant HDR_STARTFUNC = $18; ! long word
Constant HDR_DECODINGTBL = $1C; ! long word
Constant HDR_CHECKSUM = $20; ! long word
Constant ROM_INFO = $24; ! four ASCII characters
Constant ROM_MEMORYLAYOUT = $28; ! long word
Constant ROM_INFORMVERSION = $2C; ! four ASCII characters
Constant ROM_COMPVERSION = $30; ! four ASCII characters
Constant ROM_GAMERELEASE = $34; ! short word
Constant ROM_GAMESERIAL = $36; ! six ASCII characters
#Endif;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Powers of Two
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Array PowersOfTwo_TB
--> $$100000000000
$$010000000000
$$001000000000
$$000100000000
$$000010000000
$$000001000000
$$000000100000
$$000000010000
$$000000001000
$$000000000100
$$000000000010
$$000000000001;
Array IncreasingPowersOfTwo_TB
--> $$0000000000000001
$$0000000000000010
$$0000000000000100
$$0000000000001000
$$0000000000010000
$$0000000000100000
$$0000000001000000
$$0000000010000000
$$0000000100000000
$$0000001000000000
$$0000010000000000
$$0000100000000000
$$0001000000000000
$$0010000000000000
$$0100000000000000
$$1000000000000000;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Text Styles
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant NORMAL_VMSTY = 0;
Constant HEADER_VMSTY = 3;
Constant SUBHEADER_VMSTY = 4;
Constant ALERT_VMSTY = 5;
Constant NOTE_VMSTY = 6;
Constant BLOCKQUOTE_VMSTY = 7;
Constant INPUT_VMSTY = 8;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Colour Numbers
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant CLR_DEFAULT = 1;
Constant CLR_BLACK = 2;
Constant CLR_RED = 3;
Constant CLR_GREEN = 4;
Constant CLR_YELLOW = 5;
Constant CLR_BLUE = 6;
Constant CLR_MAGENTA = 7; Constant CLR_PURPLE = 7;
Constant CLR_CYAN = 8; Constant CLR_AZURE = 8;
Constant CLR_WHITE = 9;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Window Numbers
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant WIN_ALL = 0; ! Both windows at once
Constant WIN_STATUS = 1;
Constant WIN_MAIN = 2;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Paragraphing Flags
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant PARA_COMPLETED = 1;
Constant PARA_PROMPTSKIP = 2;
Constant PARA_SUPPRESSPROMPTSKIP = 4;
Constant PARA_NORULEBOOKBREAKS = 8;
Constant PARA_CONTENTEXPECTED = 16;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Descriptors in the Language of Play
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant POSSESS_PK = $100;
Constant DEFART_PK = $101;
Constant INDEFART_PK = $102;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Run-Time Problem Numbers
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant RTP_BACKDROP = 1;
Constant RTP_EXITDOOR = 2;
Constant RTP_NOEXIT = 3;
Constant RTP_CANTCHANGE = 4;
Constant RTP_IMPREL = 5;
Constant RTP_RULESTACK = 6; ! Now out of use
Constant RTP_TOOMANYRULEBOOKS = 7;
Constant RTP_TOOMANYEVENTS = 8;
Constant RTP_BADPROPERTY = 9;
Constant RTP_UNPROVIDED = 10;
Constant RTP_UNSET = 11;
Constant RTP_TOOMANYACTS = 12;
Constant RTP_CANTABANDON = 13;
Constant RTP_CANTEND = 14;
Constant RTP_CANTMOVENOTHING = 15;
Constant RTP_CANTREMOVENOTHING = 16;
Constant RTP_DIVZERO = 17;
Constant RTP_BADVALUEPROPERTY = 18;
Constant RTP_NOTBACKDROP = 19;
Constant RTP_TABLE_NOCOL = 20;
Constant RTP_TABLE_NOCORR = 21;
Constant RTP_TABLE_NOROW = 22;
Constant RTP_TABLE_NOENTRY = 23;
Constant RTP_TABLE_NOTABLE = 24;
Constant RTP_TABLE_NOMOREBLANKS = 25;
Constant RTP_TABLE_NOROWS = 26;
Constant RTP_TABLE_CANTSORT = 27;
Constant RTP_NOTINAROOM = 28;
Constant RTP_BADTOPIC = 29;
Constant RTP_ROUTELESS = 30;
Constant RTP_PROPOFNOTHING = 31;
Constant RTP_DECIDEONWRONGKIND = 32;
Constant RTP_DECIDEONNOTHING = 33;
Constant RTP_TABLE_CANTSAVE = 34;
Constant RTP_TABLE_WONTFIT = 35;
Constant RTP_TABLE_BADFILE = 36;
Constant RTP_LOWLEVELERROR = 37;
Constant RTP_DONTIGNORETURNSEQUENCE = 38;
Constant RTP_SAYINVALIDSNIPPET = 39;
Constant RTP_SPLICEINVALIDSNIPPET = 40;
Constant RTP_INCLUDEINVALIDSNIPPET = 41;
Constant RTP_LISTWRITERMEMORY = 42;
Constant RTP_CANTREMOVEPLAYER = 43;
Constant RTP_CANTREMOVEDOORS = 44;
Constant RTP_CANTCHANGEOFFSTAGE = 45;
Constant RTP_MSTACKMEMORY = 46;
Constant RTP_TYPECHECK = 47;
Constant RTP_FILEIOERROR = 48;
Constant RTP_HEAPERROR = 49;
Constant RTP_LISTRANGEERROR = 50;
Constant RTP_REGEXPSYNTAXERROR = 51;
Constant RTP_NOGLULXUNICODE = 52;
Constant RTP_BACKDROPONLY = 53;
Constant RTP_NOTTHING = 54;
Constant RTP_SCENEHASNTSTARTED = 55;
Constant RTP_SCENEHASNTENDED = 56;
Constant RTP_NEGATIVEROOT = 57;
Constant RTP_TABLE_CANTRUNTHROUGH = 58;
Constant RTP_CANTITERATE = 59;
Constant RTP_WRONGASSIGNEDKIND = 60;
Constant RTP_CANTBEOFFSTAGE = 61;
Constant RTP_RELKINDVIOLATION = 62;
Constant RTP_CANTMAKEPART = 63;
Constant RTP_TEXTTOKENTOOHARD = 64;
Constant RTP_TABLE_NOTABLE2 = 65;
Constant RTP_RELATIONCHANGEIMPOSSIBLE = 66;
Constant RTP_RELMINIMAL = 67;
Constant RTP_LISTSIZENEGATIVE = 68;
Constant RTP_REGIONSNOTADJACENT = 69;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Template Activities
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant PRINTING_THE_NAME_ACT = 0;
Constant PRINTING_THE_PLURAL_NAME_ACT = 1;
Constant PRINTING_A_NUMBER_OF_ACT = 2;
Constant PRINTING_ROOM_DESC_DETAILS_ACT = 3;
Constant PRINTING_INVENTORY_DETAILS_ACT = 4;
Constant LISTING_CONTENTS_ACT = 5;
Constant GROUPING_TOGETHER_ACT = 6;
Constant WRITING_A_PARAGRAPH_ABOUT_ACT = 7;
Constant LISTING_NONDESCRIPT_ITEMS_ACT = 8;
Constant PRINTING_NAME_OF_DARK_ROOM_ACT = 9;
Constant PRINTING_DESC_OF_DARK_ROOM_ACT = 10;
Constant PRINTING_NEWS_OF_DARKNESS_ACT = 11;
Constant PRINTING_NEWS_OF_LIGHT_ACT = 12;
Constant REFUSAL_TO_ACT_IN_DARK_ACT = 13;
Constant CONSTRUCTING_STATUS_LINE_ACT = 14;
Constant PRINTING_BANNER_TEXT_ACT = 15;
Constant READING_A_COMMAND_ACT = 16;
Constant DECIDING_SCOPE_ACT = 17;
Constant DECIDING_CONCEALED_POSSESS_ACT = 18;
Constant DECIDING_WHETHER_ALL_INC_ACT = 19;
Constant CLARIFYING_PARSERS_CHOICE_ACT = 20;
Constant ASKING_WHICH_DO_YOU_MEAN_ACT = 21;
Constant PRINTING_A_PARSER_ERROR_ACT = 22;
Constant SUPPLYING_A_MISSING_NOUN_ACT = 23;
Constant SUPPLYING_A_MISSING_SECOND_ACT = 24;
Constant IMPLICITLY_TAKING_ACT = 25;
Constant STARTING_VIRTUAL_MACHINE_ACT = 26;
Constant AMUSING_A_VICTORIOUS_PLAYER_ACT = 27;
Constant PRINTING_PLAYERS_OBITUARY_ACT = 28;
Constant DEALING_WITH_FINAL_QUESTION_ACT = 29;
Constant PRINTING_LOCALE_DESCRIPTION_ACT = 30;
Constant CHOOSING_NOTABLE_LOCALE_OBJ_ACT = 31;
Constant PRINTING_LOCALE_PARAGRAPH_ACT = 32;
Constant PRINTING_RESPONSE_ACT = 33;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Template Rulebooks
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant STARTUP_RB = 0;
Constant TURN_SEQUENCE_RB = 1;
Constant SHUTDOWN_RB = 2;
Constant WHEN_PLAY_BEGINS_RB = 4;
Constant WHEN_PLAY_ENDS_RB = 5;
Constant WHEN_SCENE_BEGINS_RB = 6;
Constant WHEN_SCENE_ENDS_RB = 7;
Constant ACTION_PROCESSING_RB = 9;
Constant SETTING_ACTION_VARIABLES_RB = 10;
Constant SPECIFIC_ACTION_PROCESSING_RB = 11;
Constant ACCESSIBILITY_RB = 13;
Constant REACHING_INSIDE_RB = 14;
Constant REACHING_OUTSIDE_RB = 15;
Constant VISIBLE_RB = 16;
Constant PERSUADE_RB = 17;
Constant UNSUCCESSFUL_ATTEMPT_RB = 18;
Constant AFTER_RB = 23;
Constant REPORT_RB = 24;
Constant MULTIPLE_ACTION_PROCESSING_RB = 26;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Kind IDs
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant UNKNOWN_TY = -2147483602;
Constant VALUE_TY = 2;
Constant POINTER_VALUE_TY = 3;
Constant WORD_VALUE_TY = 4;
Constant ARITHMETIC_VALUE_TY = 5;
Constant REAL_ARITHMETIC_VALUE_TY = 6;
Constant ENUMERATED_VALUE_TY = 7;
Constant SAYABLE_VALUE_TY = 8;
Constant COMBINED_VALUE_TY = 9;
Constant OBJECT_TY = 10;
Constant NUMBER_TY = 11;
Constant REAL_NUMBER_TY = 12;
Constant TRUTH_STATE_TY = 13;
Constant TEXT_TY = 14;
Constant UNICODE_CHARACTER_TY = 15;
Constant USE_OPTION_TY = 16;
Constant RESPONSE_TY = 17;
Constant VERB_TY = 18;
Constant SNIPPET_TY = 19;
Constant TABLE_TY = 20;
Constant EQUATION_TY = 21;
Constant RULEBOOK_OUTCOME_TY = 22;
Constant UNDERSTANDING_TY = 23;
Constant INTERMEDIATE_TY = 24;
Constant NIL_TY = 25;
Constant KIND_VARIABLE_TY = 26;
Constant PHRASE_TY = 27;
Constant TUPLE_ENTRY_TY = 28;
Constant VARIABLE_TY = 29;
Constant RELATION_TY = 30;
Constant RULE_TY = 31;
Constant RULEBOOK_TY = 32;
Constant ACTIVITY_TY = 33;
Constant LIST_OF_TY = 34;
Constant DESCRIPTION_OF_TY = 35;
Constant PROPERTY_TY = 36;
Constant TABLE_COLUMN_TY = 37;
Constant COMBINATION_TY = 38;
Constant DESCRIPTION_OF_ACTION_TY = 39;
Constant STORED_ACTION_TY = 40;
Constant ACTION_NAME_TY = 41;
Constant TIME_TY = 42;
Constant SCENE_TY = 43;
Constant FIGURE_NAME_TY = 44;
Constant COUPLE_TY = 45;
Constant CRATE_TY = 46;
Constant OPTION_TY = 47;
Constant RESULT_TY = 48;
Constant SOUND_NAME_TY = 49;
Constant EXTERNAL_FILE_TY = 50;
Constant BASE_KIND_HWM = 57; ! Base kind high-water-mark
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Parser Error Numbers
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant STUCK_PE = 1;
Constant UPTO_PE = 2;
Constant NUMBER_PE = 3;
Constant ANIMA_PE = 4;
Constant CANTSEE_PE = 5;
Constant TOOLIT_PE = 6;
Constant NOTHELD_PE = 7;
Constant MULTI_PE = 8;
Constant MMULTI_PE = 9;
Constant VAGUE_PE = 10;
Constant EXCEPT_PE = 11;
Constant VERB_PE = 12;
Constant SCENERY_PE = 13;
Constant ITGONE_PE = 14;
Constant JUNKAFTER_PE = 15;
Constant TOOFEW_PE = 16;
Constant NOTHING_PE = 17;
Constant ASKSCOPE_PE = 18;
Constant NOTINCONTEXT_PE = 19;
Constant BLANKLINE_PE = 20; ! Not formally a parser error, but used by I7 as if
Constant ANIMAAGAIN_PE = 21;
Constant COMMABEGIN_PE = 22;
Constant MISSINGPERSON_PE = 23;
Constant ANIMALISTEN_PE = 24;
Constant TOTALK_PE = 25;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Scope Searching Reasons
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant PARSING_REASON = 0;
Constant TALKING_REASON = 1;
Constant EACH_TURN_REASON = 2;
Constant LOOPOVERSCOPE_REASON = 5;
Constant TESTSCOPE_REASON = 6;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Token Types
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant ILLEGAL_TT = 0; ! Types of grammar token: illegal
Constant ELEMENTARY_TT = 1; ! (one of those below)
Constant PREPOSITION_TT = 2; ! e.g. 'into'
Constant ROUTINE_FILTER_TT = 3; ! e.g. noun=CagedCreature
Constant ATTR_FILTER_TT = 4; ! e.g. edible
Constant SCOPE_TT = 5; ! e.g. scope=Spells
Constant GPR_TT = 6; ! a general parsing routine
Constant NOUN_TOKEN = 0; ! The elementary grammar tokens, and
Constant HELD_TOKEN = 1; ! the numbers compiled by I6 to
Constant MULTI_TOKEN = 2; ! encode them
Constant MULTIHELD_TOKEN = 3;
Constant MULTIEXCEPT_TOKEN = 4;
Constant MULTIINSIDE_TOKEN = 5;
Constant CREATURE_TOKEN = 6;
Constant SPECIAL_TOKEN = 7;
Constant NUMBER_TOKEN = 8;
Constant TOPIC_TOKEN = 9;
Constant ENDIT_TOKEN = 15; ! Value used to mean "end of grammar line"
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: GPR Return Values
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant GPR_FAIL = -1; ! Return values from General Parsing
Constant GPR_PREPOSITION = 0; ! Routines
Constant GPR_NUMBER = 1;
Constant GPR_MULTIPLE = 2;
Constant GPR_REPARSE = REPARSE_CODE;
Constant GPR_NOUN = -256; ! Reparse, but as |NOUN_TOKEN| this time
Constant GPR_HELD = GPR_NOUN + 1; ! And so on
Constant GPR_MULTI = GPR_NOUN + 2;
Constant GPR_MULTIHELD = GPR_NOUN + 3;
Constant GPR_MULTIEXCEPT = GPR_NOUN + 4;
Constant GPR_MULTIINSIDE = GPR_NOUN + 5;
Constant GPR_CREATURE = GPR_NOUN + 6;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: List Styles
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant NEWLINE_BIT = $$0000000000000001; ! New-line after each entry
Constant INDENT_BIT = $$0000000000000010; ! Indent each entry by depth
Constant FULLINV_BIT = $$0000000000000100; ! Full inventory information after entry
Constant ENGLISH_BIT = $$0000000000001000; ! English sentence style, with commas and and
Constant RECURSE_BIT = $$0000000000010000; ! Recurse downwards with usual rules
Constant ALWAYS_BIT = $$0000000000100000; ! Always recurse downwards
Constant TERSE_BIT = $$0000000001000000; ! More terse English style
Constant PARTINV_BIT = $$0000000010000000; ! Only brief inventory information after entry
Constant DEFART_BIT = $$0000000100000000; ! Use the definite article in list
Constant WORKFLAG_BIT = $$0000001000000000; ! At top level (only), only list objects
! which have the "workflag" attribute
Constant ISARE_BIT = $$0000010000000000; ! Print " is" or " are" before list
Constant CONCEAL_BIT = $$0000100000000000; ! Omit objects with "concealed" or "scenery":
! if WORKFLAG_BIT also set, then does not
! apply at top level, but does lower down
Constant NOARTICLE_BIT = $$0001000000000000; ! Print no articles, definite or not
Constant EXTRAINDENT_BIT = $$0010000000000000; ! New in I7: extra indentation of 1 level
Constant CFIRSTART_BIT = $$0100000000000000; ! Capitalise first article in list
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Lengths Of Time
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant QUARTER_HOUR = 15;
Constant HALF_HOUR = 30;
Constant ONE_HOUR = 60;
Constant TWELVE_HOURS = 720;
Constant TWENTY_FOUR_HOURS = 1440;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Empty Text
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant EMPTY_TEXT_PACKED "";
Array EMPTY_TEXT_VALUE --> CONSTANT_PACKED_TEXT_STORAGE EMPTY_TEXT_PACKED;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Empty Table
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Array TheEmptyTable --> 0 0;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Empty Set
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ Prop_Falsity reason obj; return 0; ];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Score and Rankings Table
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
#Ifndef MAX_SCORE;
Global MAX_SCORE = 0;
#Endif;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Template Attributes
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Attribute absent; ! Used to mark objects removed from play
Attribute animate; ! I6-level marker for I7 kind "person"
Attribute clothing; ! = I7 "wearable"
Attribute concealed; ! = I7 "undescribed"
Attribute container; ! I6-level marker for I7 kind "container"
Attribute door; ! I6-level marker for I7 kind "door"
Attribute edible; ! = I7 "edible" vs "inedible"
Attribute enterable; ! = I7 "enterable"
Attribute light; ! = I7 "lighted" vs "dark"
Attribute lockable; ! = I7 "lockable"
Attribute locked; ! = I7 "locked"
Attribute moved; ! = I7 "handled"
Attribute on; ! = I7 "switched on" vs "switched off"
Attribute open; ! = I7 "open" vs "closed"
Attribute openable; ! = I7 "openable"
Attribute scenery; ! = I7 "scenery"
Attribute static; ! = I7 "fixed in place" vs "portable"
Attribute supporter; ! I6-level marker for I7 kind "supporter"
Attribute switchable; ! I6-level marker for I7 kind "device"
Attribute talkable; ! Not currently used by I7, but retained for possible future use
Attribute transparent; ! = I7 "transparent" vs "opaque"
Attribute visited; ! = I7 "visited"
Attribute worn; ! marks that an object tree edge represents wearing
Attribute male; ! not directly used by I7, but available for languages with genders
Attribute female; ! = I7 "female" vs "male"
Attribute neuter; ! = I7 "neuter"
Attribute pluralname; ! = I7 "plural-named"
Attribute ambigpluralname; ! = I7 "ambiguously plural"
Attribute proper; ! = I7 "proper-named"
Attribute remove_proper; ! remember to remove proper again when using ChangePlayer next
Attribute privately_named; ! New in I7
Attribute mentioned; ! New in I7
Attribute pushable; ! New in I7
Attribute mark_as_room; ! Used in I7 to speed up testing "ofclass K1_room"
Attribute mark_as_thing; ! Used in I7 to speed up testing "ofclass K2_thing"
Attribute workflag; ! = I7 "marked for listing", but basically temporary workspace
Attribute workflag2; ! new in I7 and also temporary workspace
Constant list_filter_permits = privately_named; ! another I7 listwriter convenience
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Template Properties
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Property add_to_scope; ! used as in I6 to place component parts in scope
Property article "a"; ! used as in I6 to implement articles
Property capacity 100; ! = I7 "carrying capacity"
Property component_child; ! new in I7: forest structure holding "part of" relation
Property component_parent; ! new in I7
Property component_sibling; ! new in I7
Property description; ! = I7 "description"
Property door_dir; ! used to implement two-sided doors, but holds direction object, not a property
Property door_to; ! used as in I6 to implement two-sided doors
Property found_in; ! used as in I6 to implement two-sided doors and backdrops
Property initial; ! = I7 "initial description"
Property list_together; ! used as in I6 to implement "grouping together" activity
Property map_region; ! new in I7
Property parse_name 0; ! used as in I6 to implement "Understand... as..." grammars
Property plural; ! used as in I6 to implement plural names for duplicate objects
Property regional_found_in; ! new in I7
Property room_index; ! new in I7: storage for route-finding
Property short_name 0; ! = I7 "printed name"
Property vector; ! new in I7: storage for route-finding
Property with_key; ! = I7 "matching key"
Property KD_Count; ! Instance count of the kind of the current object
Property IK1_Count; ! These are instance counts within kinds K1, K2, ...
Property IK2_Count; ! and it is efficient to declare the common ones with Property
Property IK4_Count; ! since this results in a slightly smaller story file
Property IK5_Count;
Property IK6_Count;
Property IK8_Count;
Property IK1_link; ! These are for linked lists used to make searches faster
Property IK2_link; ! and again it's memory-efficient to declare the common ones
Property IK5_link; !
Property IK6_link; !
Property IK8_link; !
Property articles; ! not used by I7, but an interesting hook in the parser
Property grammar; ! not used by I7, but an interesting hook in the parser
Property inside_description; ! not used by I7, but an interesting hook in the locale code
Property short_name_indef 0; ! not used by I7, but an interesting hook in the listmaker
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Loss of Life
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant life = NULL;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Action Count
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant ActionCount = 77;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Fake Actions
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Fake_Action ListMiscellany;
Fake_Action Miscellany;
Fake_Action PluralFound;
Fake_Action TheSame;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions.i6t: Formal Parameters
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Global formal_rv;
Global formal_par0;
Global formal_par1;
Global formal_par2;
Global formal_par3;
Global formal_par4;
Global formal_par5;
Global formal_par6;
Global formal_par7;
Global unicode_temp;
Constant RUCKSACK_CLASS = K15_player_s_holdall;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Output.i6t: Global Variables
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! [1]
Global location = InformLibrary; ! does not = I7 "location": see below
Global sline1; Global sline2;
! [2]
Global say__p = 1; Global say__pc = 0; Global say__pc_save = 0;
Global say__n; Global say__comp;
Global los_rv = false;
Global parameter_object; ! = I7 "parameter-object" = I7 "container in question"
Global parameter_value; ! not typesafe in I7
Array deferred_calling_list --> 27;
Global property_to_be_totalled; ! used to implement "total P of..."
Global property_loop_sign; ! $+1$ for increasing order, $-1$ for decreasing
Global suppress_scope_loops;
Global temporary_value; ! can be used anywhere side-effects can't occur
#ifdef TARGET_ZCODE;
Constant BLOCKV_STACK_SIZE = 224;
#ifnot;
Constant BLOCKV_STACK_SIZE = DynamicMemoryAllocation/4;
#endif;
Array blockv_stack --> BLOCKV_STACK_SIZE;
Global I7SFRAME;
Global TEXT_TY_RE_Err = 0;
Array LocalParking --> 64;
! [3]
Global standard_interpreter = 0;
Global undo_flag;
! [4]
Global deadflag = 0;
Global story_complete = 0;
Global resurrect_please = false;
! [5]
Global not_yet_in_play = true; ! set false when first command received
Global turns = 1; ! = I7 "turn count"
Global the_time = NULL; ! = I7 "time of day"
Global time_rate = 1;
Constant NUMBER_SCENES_CREATED = 1;
Constant SCENE_ARRAY_SIZE = (NUMBER_SCENES_CREATED+2);
Array scene_started --> SCENE_ARRAY_SIZE;
Array scene_ended --> SCENE_ARRAY_SIZE;
Array scene_status --> SCENE_ARRAY_SIZE;
Array scene_endings --> SCENE_ARRAY_SIZE;
Array scene_latest_ending --> SCENE_ARRAY_SIZE;
! [6]
Global score; ! = I7 "score"
Global last_score; ! = I7 "last notified score"
Global notify_mode = 1; ! score notification on or off
Global left_hand_status_line = T_SL_Location; ! = I7 "left hand status line"
Global right_hand_status_line = T_SL_Score_Moves; ! = I7 "right hand status line"
! [7]
Global player; ! = I7 "player"
Global real_location; ! = I7 "location"
Global visibility_ceiling; ! highest object in tree visible to player
Global visibility_levels; ! distance in tree to that
Global SACK_OBJECT; ! current player's holdall item in use
! [8]
Global act_requester;
Global actor; ! = I7 "person asked" = I7 "person reaching"
Global actors_location; ! like real_location, but for the actor
Global actor_location; ! = I7 "actor-location"
Global action;
Global meta; ! action is out of world
Global inp1;
Global inp2;
Array multiple_object --> MATCH_LIST_WORDS; ! multiple-object list (I6 table array)
Global toomany_flag; ! multiple-object list overflowed
Global multiflag; ! multiple-object being processed
Global multiple_object_item; ! item currently being processed in multiple-object list
Global noun; ! = I7 "noun"
Global second; ! = I7 "second noun"
Global keep_silent; ! true if current action is being tried silently
Global etype; ! parser error number if command not recognised
Global trace_actions = 0;
Global untouchable_object;
Global untouchable_silence;
Global touch_persona;
Global special_word; ! dictionary address of first word in "[text]" token
Global consult_from; ! word number of start of "[text]" token
Global consult_words; ! number of words in "[text]" token
Global parsed_number; ! value from any token not an object
Global special_number1; ! first value, if token not an object
Global special_number2; ! second value, if token not an object
Array parser_results --> 16; ! for parser to write its results in
Global parser_trace = 0; ! normally 0, but 1 to 5 traces parser workings
Global pronoun_word; ! records which pronoun ("it", "them", ...) caused an error
Global pronoun_obj; ! and what object it was thought to refer to
Global players_command = 100; ! = I7 "player's command"
Global matched_text; ! = I7 "matched text"
Global reason_the_action_failed; ! = I7 "reason the action failed"
Global understand_as_mistake_number; ! which form of "Understand... as a mistake"
Global particular_possession; ! = I7 "particular possession"
! [9]
Global parser_action; ! written by the parser for the benefit of GPRs
Global parser_one;
Global parser_two;
Global parameters; ! number of I7 tokens parsed on the current line
Global action_to_be; ! (if the current line were accepted)
Global action_reversed; ! (parameters would be reversed in order)
Global wn; ! word number within "parse" buffer (from 1)
Global num_words; ! number of words in buffer
Global verb_word; ! dictionary address of command verb
Global verb_wordnum; ! word number of command verb
! [10]
Global scope_reason = PARSING_REASON; ! current reason for searching scope
Global scope_token; ! for "scope=Routine" grammar tokens
Global scope_error;
Global scope_stage; ! 1, 2 then 3
Global advance_warning; ! what a later-named thing will be
Global reason_code = NULL; ! for the I6 veneer
Global ats_flag = 0; ! for AddToScope routines
Global ats_hls;
! [11]
Global move_pushing;
Global move_from;
Global move_to;
Global move_by;
Global move_through;
! [12]
#Ifdef DEFAULT_BRIEF_DESCRIPTIONS;
Global lookmode = 1; ! 1 = BRIEF, 2 = VERBOSE, 3 = SUPERBRIEF
#Endif;
#Ifdef DEFAULT_VERBOSE_DESCRIPTIONS;
Global lookmode = 2; ! 1 = BRIEF, 2 = VERBOSE, 3 = SUPERBRIEF
#Endif;
#Ifdef DEFAULT_SUPERBRIEF_DESCRIPTIONS;
Global lookmode = 3; ! 1 = BRIEF, 2 = VERBOSE, 3 = SUPERBRIEF
#Endif;
#Ifndef lookmode;
Global lookmode = 2; ! 1 = BRIEF, 2 = VERBOSE, 3 = SUPERBRIEF
#Endif;
Global c_style; ! current list-writer style
Global c_depth; ! current recursion depth
Global c_iterator; ! current iteration function
Global lt_value = EMPTY_TEXT_VALUE; ! common value of list_together
Global listing_together; ! object number of one member of a group being listed together
Global listing_size; ! size of such a group
Global c_margin; ! current level of indentation printed by WriteListFrom()
Global inventory_stage = 1; ! 1 or 2 according to the context in which list_together uses
Global prior_named_noun; ! for adaptive text generation
Global prior_named_list; ! ditto: length of list of items
Global prior_named_list_gender; ! ditto: common gender of list of items, or -1
Global story_tense = 1; ! ditto: present tense
Global story_viewpoint = 2; ! ditto: second person singular
! [13]
Global clr_fg = 1; ! foreground colour
Global clr_bg = 1; ! background colour
Global clr_fgstatus = 1; ! foreground colour of statusline
Global clr_bgstatus = 1; ! background colour of statusline
Global clr_on; ! has colour been enabled by the player?
Global statuswin_current; ! if writing to top window
! [14]
Global statuswin_cursize = 0;
Global statuswin_size = 1;
! [16]
Global debug_flag = 0;
Global debug_rules = 0;
Global debug_scenes = 0;
Global debug_rule_nesting;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Output.i6t: VM-Specific Code
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
#Ifdef TARGET_GLULX;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Summary
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Variables and Arrays
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Array gg_event --> 4;
Array gg_arguments buffer 28;
Global gg_mainwin = 0;
Global gg_statuswin = 0;
Global gg_quotewin = 0;
Global gg_scriptfref = 0;
Global gg_scriptstr = 0;
Global gg_savestr = 0;
Global gg_commandstr = 0;
Global gg_command_reading = 0; ! true if gg_commandstr is being replayed
Global gg_foregroundchan = 0;
Global gg_backgroundchan = 0;
Constant GLK_NULL 0;
Constant INPUT_BUFFER_LEN = 260; ! No extra byte necessary
Constant MAX_BUFFER_WORDS = 20;
Constant PARSE_BUFFER_LEN = 61;
Array buffer buffer INPUT_BUFFER_LEN;
Array buffer2 buffer INPUT_BUFFER_LEN;
Array buffer3 buffer INPUT_BUFFER_LEN;
Array parse --> PARSE_BUFFER_LEN;
Array parse2 --> PARSE_BUFFER_LEN;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Infglk
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! infglk.h -- auto-generated by parse_dispatch.py.
! Generated for Glk API version 0.7.4
Constant evtype_Arrange = 5;
Constant evtype_CharInput = 2;
Constant evtype_Hyperlink = 8;
Constant evtype_LineInput = 3;
Constant evtype_MouseInput = 4;
Constant evtype_None = 0;
Constant evtype_Redraw = 6;
Constant evtype_SoundNotify = 7;
Constant evtype_Timer = 1;
Constant evtype_VolumeNotify = 9;
Constant filemode_Read = 2;
Constant filemode_ReadWrite = 3;
Constant filemode_Write = 1;
Constant filemode_WriteAppend = 5;
Constant fileusage_BinaryMode = 0;
Constant fileusage_Data = 0;
Constant fileusage_InputRecord = 3;
Constant fileusage_SavedGame = 1;
Constant fileusage_TextMode = 256;
Constant fileusage_Transcript = 2;
Constant fileusage_TypeMask = 15;
Constant gestalt_CharInput = 1;
Constant gestalt_CharOutput = 3;
Constant gestalt_CharOutput_ApproxPrint = 1;
Constant gestalt_CharOutput_CannotPrint = 0;
Constant gestalt_CharOutput_ExactPrint = 2;
Constant gestalt_DateTime = 20;
Constant gestalt_DrawImage = 7;
Constant gestalt_Graphics = 6;
Constant gestalt_GraphicsCharInput = 23;
Constant gestalt_GraphicsTransparency = 14;
Constant gestalt_HyperlinkInput = 12;
Constant gestalt_Hyperlinks = 11;
Constant gestalt_LineInput = 2;
Constant gestalt_LineInputEcho = 17;
Constant gestalt_LineTerminatorKey = 19;
Constant gestalt_LineTerminators = 18;
Constant gestalt_MouseInput = 4;
Constant gestalt_ResourceStream = 22;
Constant gestalt_Sound = 8;
Constant gestalt_Sound2 = 21;
Constant gestalt_SoundMusic = 13;
Constant gestalt_SoundNotify = 10;
Constant gestalt_SoundVolume = 9;
Constant gestalt_Timer = 5;
Constant gestalt_Unicode = 15;
Constant gestalt_UnicodeNorm = 16;
Constant gestalt_Version = 0;
Constant imagealign_InlineCenter = 3;
Constant imagealign_InlineDown = 2;
Constant imagealign_MarginLeft = 4;
Constant imagealign_MarginRight = 5;
Constant imagealign_InlineUp = 1;
Constant keycode_Delete = 4294967289;
Constant keycode_Down = 4294967291;
Constant keycode_End = 4294967283;
Constant keycode_Escape = 4294967288;
Constant keycode_Func1 = 4294967279;
Constant keycode_Func10 = 4294967270;
Constant keycode_Func11 = 4294967269;
Constant keycode_Func12 = 4294967268;
Constant keycode_Func2 = 4294967278;
Constant keycode_Func3 = 4294967277;
Constant keycode_Func4 = 4294967276;
Constant keycode_Func5 = 4294967275;
Constant keycode_Func6 = 4294967274;
Constant keycode_Func7 = 4294967273;
Constant keycode_Func8 = 4294967272;
Constant keycode_Func9 = 4294967271;
Constant keycode_Home = 4294967284;
Constant keycode_Left = 4294967294;
Constant keycode_MAXVAL = 28;
Constant keycode_PageDown = 4294967285;
Constant keycode_PageUp = 4294967286;
Constant keycode_Return = 4294967290;
Constant keycode_Right = 4294967293;
Constant keycode_Tab = 4294967287;
Constant keycode_Unknown = 4294967295;
Constant keycode_Up = 4294967292;
Constant seekmode_Current = 1;
Constant seekmode_End = 2;
Constant seekmode_Start = 0;
Constant style_Alert = 5;
Constant style_BlockQuote = 7;
Constant style_Emphasized = 1;
Constant style_Header = 3;
Constant style_Input = 8;
Constant style_NUMSTYLES = 11;
Constant style_Normal = 0;
Constant style_Note = 6;
Constant style_Preformatted = 2;
Constant style_Subheader = 4;
Constant style_User1 = 9;
Constant style_User2 = 10;
Constant stylehint_BackColor = 8;
Constant stylehint_Indentation = 0;
Constant stylehint_Justification = 2;
Constant stylehint_NUMHINTS = 10;
Constant stylehint_Oblique = 5;
Constant stylehint_ParaIndentation = 1;
Constant stylehint_Proportional = 6;
Constant stylehint_ReverseColor = 9;
Constant stylehint_Size = 3;
Constant stylehint_TextColor = 7;
Constant stylehint_Weight = 4;
Constant stylehint_just_Centered = 2;
Constant stylehint_just_LeftFlush = 0;
Constant stylehint_just_LeftRight = 1;
Constant stylehint_just_RightFlush = 3;
Constant winmethod_Above = 2;
Constant winmethod_Below = 3;
Constant winmethod_Border = 0;
Constant winmethod_BorderMask = 256;
Constant winmethod_DirMask = 15;
Constant winmethod_DivisionMask = 240;
Constant winmethod_Fixed = 16;
Constant winmethod_Left = 0;
Constant winmethod_NoBorder = 256;
Constant winmethod_Proportional = 32;
Constant winmethod_Right = 1;
Constant wintype_AllTypes = 0;
Constant wintype_Blank = 2;
Constant wintype_Graphics = 5;
Constant wintype_Pair = 1;
Constant wintype_TextBuffer = 3;
Constant wintype_TextGrid = 4;
[ glk_exit _vararg_count;
! glk_exit()
@glk 1 _vararg_count 0;
return 0;
];
[ glk_tick _vararg_count;
! glk_tick()
@glk 3 _vararg_count 0;
return 0;
];
[ glk_gestalt _vararg_count ret;
! glk_gestalt(uint, uint) => uint
@glk 4 _vararg_count ret;
return ret;
];
[ glk_gestalt_ext _vararg_count ret;
! glk_gestalt_ext(uint, uint, uintarray, arraylen) => uint
@glk 5 _vararg_count ret;
return ret;
];
[ glk_window_iterate _vararg_count ret;
! glk_window_iterate(window, &uint) => window
@glk 32 _vararg_count ret;
return ret;
];
[ glk_window_get_rock _vararg_count ret;
! glk_window_get_rock(window) => uint
@glk 33 _vararg_count ret;
return ret;
];
[ glk_window_get_root _vararg_count ret;
! glk_window_get_root() => window
@glk 34 _vararg_count ret;
return ret;
];
[ glk_window_open _vararg_count ret;
! glk_window_open(window, uint, uint, uint, uint) => window
@glk 35 _vararg_count ret;
return ret;
];
[ glk_window_close _vararg_count;
! glk_window_close(window, &{uint, uint})
@glk 36 _vararg_count 0;
return 0;
];
[ glk_window_get_size _vararg_count;
! glk_window_get_size(window, &uint, &uint)
@glk 37 _vararg_count 0;
return 0;
];
[ glk_window_set_arrangement _vararg_count;
! glk_window_set_arrangement(window, uint, uint, window)
@glk 38 _vararg_count 0;
return 0;
];
[ glk_window_get_arrangement _vararg_count;
! glk_window_get_arrangement(window, &uint, &uint, &window)
@glk 39 _vararg_count 0;
return 0;
];
[ glk_window_get_type _vararg_count ret;
! glk_window_get_type(window) => uint
@glk 40 _vararg_count ret;
return ret;
];
[ glk_window_get_parent _vararg_count ret;
! glk_window_get_parent(window) => window
@glk 41 _vararg_count ret;
return ret;
];
[ glk_window_clear _vararg_count;
! glk_window_clear(window)
@glk 42 _vararg_count 0;
return 0;
];
[ glk_window_move_cursor _vararg_count;
! glk_window_move_cursor(window, uint, uint)
@glk 43 _vararg_count 0;
return 0;
];
[ glk_window_get_stream _vararg_count ret;
! glk_window_get_stream(window) => stream
@glk 44 _vararg_count ret;
return ret;
];
[ glk_window_set_echo_stream _vararg_count;
! glk_window_set_echo_stream(window, stream)
@glk 45 _vararg_count 0;
return 0;
];
[ glk_window_get_echo_stream _vararg_count ret;
! glk_window_get_echo_stream(window) => stream
@glk 46 _vararg_count ret;
return ret;
];
[ glk_set_window _vararg_count;
! glk_set_window(window)
@glk 47 _vararg_count 0;
return 0;
];
[ glk_window_get_sibling _vararg_count ret;
! glk_window_get_sibling(window) => window
@glk 48 _vararg_count ret;
return ret;
];
[ glk_stream_iterate _vararg_count ret;
! glk_stream_iterate(stream, &uint) => stream
@glk 64 _vararg_count ret;
return ret;
];
[ glk_stream_get_rock _vararg_count ret;
! glk_stream_get_rock(stream) => uint
@glk 65 _vararg_count ret;
return ret;
];
[ glk_stream_open_file _vararg_count ret;
! glk_stream_open_file(fileref, uint, uint) => stream
@glk 66 _vararg_count ret;
return ret;
];
[ glk_stream_open_memory _vararg_count ret;
! glk_stream_open_memory(nativechararray, arraylen, uint, uint) => stream
@glk 67 _vararg_count ret;
return ret;
];
[ glk_stream_close _vararg_count;
! glk_stream_close(stream, &{uint, uint})
@glk 68 _vararg_count 0;
return 0;
];
[ glk_stream_set_position _vararg_count;
! glk_stream_set_position(stream, int, uint)
@glk 69 _vararg_count 0;
return 0;
];
[ glk_stream_get_position _vararg_count ret;
! glk_stream_get_position(stream) => uint
@glk 70 _vararg_count ret;
return ret;
];
[ glk_stream_set_current _vararg_count;
! glk_stream_set_current(stream)
@glk 71 _vararg_count 0;
return 0;
];
[ glk_stream_get_current _vararg_count ret;
! glk_stream_get_current() => stream
@glk 72 _vararg_count ret;
return ret;
];
[ glk_stream_open_resource _vararg_count ret;
! glk_stream_open_resource(uint, uint) => stream
@glk 73 _vararg_count ret;
return ret;
];
[ glk_fileref_create_temp _vararg_count ret;
! glk_fileref_create_temp(uint, uint) => fileref
@glk 96 _vararg_count ret;
return ret;
];
[ glk_fileref_create_by_name _vararg_count ret;
! glk_fileref_create_by_name(uint, string, uint) => fileref
@glk 97 _vararg_count ret;
return ret;
];
[ glk_fileref_create_by_prompt _vararg_count ret;
! glk_fileref_create_by_prompt(uint, uint, uint) => fileref
@glk 98 _vararg_count ret;
return ret;
];
[ glk_fileref_destroy _vararg_count;
! glk_fileref_destroy(fileref)
@glk 99 _vararg_count 0;
return 0;
];
[ glk_fileref_iterate _vararg_count ret;
! glk_fileref_iterate(fileref, &uint) => fileref
@glk 100 _vararg_count ret;
return ret;
];
[ glk_fileref_get_rock _vararg_count ret;
! glk_fileref_get_rock(fileref) => uint
@glk 101 _vararg_count ret;
return ret;
];
[ glk_fileref_delete_file _vararg_count;
! glk_fileref_delete_file(fileref)
@glk 102 _vararg_count 0;
return 0;
];
[ glk_fileref_does_file_exist _vararg_count ret;
! glk_fileref_does_file_exist(fileref) => uint
@glk 103 _vararg_count ret;
return ret;
];
[ glk_fileref_create_from_fileref _vararg_count ret;
! glk_fileref_create_from_fileref(uint, fileref, uint) => fileref
@glk 104 _vararg_count ret;
return ret;
];
[ glk_put_char _vararg_count;
! glk_put_char(uchar)
@glk 128 _vararg_count 0;
return 0;
];
[ glk_put_char_stream _vararg_count;
! glk_put_char_stream(stream, uchar)
@glk 129 _vararg_count 0;
return 0;
];
[ glk_put_string _vararg_count;
! glk_put_string(string)
@glk 130 _vararg_count 0;
return 0;
];
[ glk_put_string_stream _vararg_count;
! glk_put_string_stream(stream, string)
@glk 131 _vararg_count 0;
return 0;
];
[ glk_put_buffer _vararg_count;
! glk_put_buffer(nativechararray, arraylen)
@glk 132 _vararg_count 0;
return 0;
];
[ glk_put_buffer_stream _vararg_count;
! glk_put_buffer_stream(stream, nativechararray, arraylen)
@glk 133 _vararg_count 0;
return 0;
];
[ glk_set_style _vararg_count;
! glk_set_style(uint)
@glk 134 _vararg_count 0;
return 0;
];
[ glk_set_style_stream _vararg_count;
! glk_set_style_stream(stream, uint)
@glk 135 _vararg_count 0;
return 0;
];
[ glk_get_char_stream _vararg_count ret;
! glk_get_char_stream(stream) => int
@glk 144 _vararg_count ret;
return ret;
];
[ glk_get_line_stream _vararg_count ret;
! glk_get_line_stream(stream, nativechararray, arraylen) => uint
@glk 145 _vararg_count ret;
return ret;
];
[ glk_get_buffer_stream _vararg_count ret;
! glk_get_buffer_stream(stream, nativechararray, arraylen) => uint
@glk 146 _vararg_count ret;
return ret;
];
[ glk_char_to_lower _vararg_count ret;
! glk_char_to_lower(uchar) => uchar
@glk 160 _vararg_count ret;
return ret;
];
[ glk_char_to_upper _vararg_count ret;
! glk_char_to_upper(uchar) => uchar
@glk 161 _vararg_count ret;
return ret;
];
[ glk_stylehint_set _vararg_count;
! glk_stylehint_set(uint, uint, uint, int)
@glk 176 _vararg_count 0;
return 0;
];
[ glk_stylehint_clear _vararg_count;
! glk_stylehint_clear(uint, uint, uint)
@glk 177 _vararg_count 0;
return 0;
];
[ glk_style_distinguish _vararg_count ret;
! glk_style_distinguish(window, uint, uint) => uint
@glk 178 _vararg_count ret;
return ret;
];
[ glk_style_measure _vararg_count ret;
! glk_style_measure(window, uint, uint, &uint) => uint
@glk 179 _vararg_count ret;
return ret;
];
[ glk_select _vararg_count;
! glk_select(&{uint, window, uint, uint})
@glk 192 _vararg_count 0;
return 0;
];
[ glk_select_poll _vararg_count;
! glk_select_poll(&{uint, window, uint, uint})
@glk 193 _vararg_count 0;
return 0;
];
[ glk_request_line_event _vararg_count;
! glk_request_line_event(window, nativechararray, arraylen, uint)
@glk 208 _vararg_count 0;
return 0;
];
[ glk_cancel_line_event _vararg_count;
! glk_cancel_line_event(window, &{uint, window, uint, uint})
@glk 209 _vararg_count 0;
return 0;
];
[ glk_request_char_event _vararg_count;
! glk_request_char_event(window)
@glk 210 _vararg_count 0;
return 0;
];
[ glk_cancel_char_event _vararg_count;
! glk_cancel_char_event(window)
@glk 211 _vararg_count 0;
return 0;
];
[ glk_request_mouse_event _vararg_count;
! glk_request_mouse_event(window)
@glk 212 _vararg_count 0;
return 0;
];
[ glk_cancel_mouse_event _vararg_count;
! glk_cancel_mouse_event(window)
@glk 213 _vararg_count 0;
return 0;
];
[ glk_request_timer_events _vararg_count;
! glk_request_timer_events(uint)
@glk 214 _vararg_count 0;
return 0;
];
[ glk_image_get_info _vararg_count ret;
! glk_image_get_info(uint, &uint, &uint) => uint
@glk 224 _vararg_count ret;
return ret;
];
[ glk_image_draw _vararg_count ret;
! glk_image_draw(window, uint, int, int) => uint
@glk 225 _vararg_count ret;
return ret;
];
[ glk_image_draw_scaled _vararg_count ret;
! glk_image_draw_scaled(window, uint, int, int, uint, uint) => uint
@glk 226 _vararg_count ret;
return ret;
];
[ glk_window_flow_break _vararg_count;
! glk_window_flow_break(window)
@glk 232 _vararg_count 0;
return 0;
];
[ glk_window_erase_rect _vararg_count;
! glk_window_erase_rect(window, int, int, uint, uint)
@glk 233 _vararg_count 0;
return 0;
];
[ glk_window_fill_rect _vararg_count;
! glk_window_fill_rect(window, uint, int, int, uint, uint)
@glk 234 _vararg_count 0;
return 0;
];
[ glk_window_set_background_color _vararg_count;
! glk_window_set_background_color(window, uint)
@glk 235 _vararg_count 0;
return 0;
];
[ glk_schannel_iterate _vararg_count ret;
! glk_schannel_iterate(schannel, &uint) => schannel
@glk 240 _vararg_count ret;
return ret;
];
[ glk_schannel_get_rock _vararg_count ret;
! glk_schannel_get_rock(schannel) => uint
@glk 241 _vararg_count ret;
return ret;
];
[ glk_schannel_create _vararg_count ret;
! glk_schannel_create(uint) => schannel
@glk 242 _vararg_count ret;
return ret;
];
[ glk_schannel_destroy _vararg_count;
! glk_schannel_destroy(schannel)
@glk 243 _vararg_count 0;
return 0;
];
[ glk_schannel_create_ext _vararg_count ret;
! glk_schannel_create_ext(uint, uint) => schannel
@glk 244 _vararg_count ret;
return ret;
];
[ glk_schannel_play_multi _vararg_count ret;
! glk_schannel_play_multi(schannelarray, arraylen, uintarray, arraylen, uint) => uint
@glk 247 _vararg_count ret;
return ret;
];
[ glk_schannel_play _vararg_count ret;
! glk_schannel_play(schannel, uint) => uint
@glk 248 _vararg_count ret;
return ret;
];
[ glk_schannel_play_ext _vararg_count ret;
! glk_schannel_play_ext(schannel, uint, uint, uint) => uint
@glk 249 _vararg_count ret;
return ret;
];
[ glk_schannel_stop _vararg_count;
! glk_schannel_stop(schannel)
@glk 250 _vararg_count 0;
return 0;
];
[ glk_schannel_set_volume _vararg_count;
! glk_schannel_set_volume(schannel, uint)
@glk 251 _vararg_count 0;
return 0;
];
[ glk_sound_load_hint _vararg_count;
! glk_sound_load_hint(uint, uint)
@glk 252 _vararg_count 0;
return 0;
];
[ glk_schannel_set_volume_ext _vararg_count;
! glk_schannel_set_volume_ext(schannel, uint, uint, uint)
@glk 253 _vararg_count 0;
return 0;
];
[ glk_schannel_pause _vararg_count;
! glk_schannel_pause(schannel)
@glk 254 _vararg_count 0;
return 0;
];
[ glk_schannel_unpause _vararg_count;
! glk_schannel_unpause(schannel)
@glk 255 _vararg_count 0;
return 0;
];
[ glk_set_hyperlink _vararg_count;
! glk_set_hyperlink(uint)
@glk 256 _vararg_count 0;
return 0;
];
[ glk_set_hyperlink_stream _vararg_count;
! glk_set_hyperlink_stream(stream, uint)
@glk 257 _vararg_count 0;
return 0;
];
[ glk_request_hyperlink_event _vararg_count;
! glk_request_hyperlink_event(window)
@glk 258 _vararg_count 0;
return 0;
];
[ glk_cancel_hyperlink_event _vararg_count;
! glk_cancel_hyperlink_event(window)
@glk 259 _vararg_count 0;
return 0;
];
[ glk_buffer_to_lower_case_uni _vararg_count ret;
! glk_buffer_to_lower_case_uni(uintarray, arraylen, uint) => uint
@glk 288 _vararg_count ret;
return ret;
];
[ glk_buffer_to_upper_case_uni _vararg_count ret;
! glk_buffer_to_upper_case_uni(uintarray, arraylen, uint) => uint
@glk 289 _vararg_count ret;
return ret;
];
[ glk_buffer_to_title_case_uni _vararg_count ret;
! glk_buffer_to_title_case_uni(uintarray, arraylen, uint, uint) => uint
@glk 290 _vararg_count ret;
return ret;
];
[ glk_buffer_canon_decompose_uni _vararg_count ret;
! glk_buffer_canon_decompose_uni(uintarray, arraylen, uint) => uint
@glk 291 _vararg_count ret;
return ret;
];
[ glk_buffer_canon_normalize_uni _vararg_count ret;
! glk_buffer_canon_normalize_uni(uintarray, arraylen, uint) => uint
@glk 292 _vararg_count ret;
return ret;
];
[ glk_put_char_uni _vararg_count;
! glk_put_char_uni(uint)
@glk 296 _vararg_count 0;
return 0;
];
[ glk_put_string_uni _vararg_count;
! glk_put_string_uni(unicode)
@glk 297 _vararg_count 0;
return 0;
];
[ glk_put_buffer_uni _vararg_count;
! glk_put_buffer_uni(uintarray, arraylen)
@glk 298 _vararg_count 0;
return 0;
];
[ glk_put_char_stream_uni _vararg_count;
! glk_put_char_stream_uni(stream, uint)
@glk 299 _vararg_count 0;
return 0;
];
[ glk_put_string_stream_uni _vararg_count;
! glk_put_string_stream_uni(stream, unicode)
@glk 300 _vararg_count 0;
return 0;
];
[ glk_put_buffer_stream_uni _vararg_count;
! glk_put_buffer_stream_uni(stream, uintarray, arraylen)
@glk 301 _vararg_count 0;
return 0;
];
[ glk_get_char_stream_uni _vararg_count ret;
! glk_get_char_stream_uni(stream) => int
@glk 304 _vararg_count ret;
return ret;
];
[ glk_get_buffer_stream_uni _vararg_count ret;
! glk_get_buffer_stream_uni(stream, uintarray, arraylen) => uint
@glk 305 _vararg_count ret;
return ret;
];
[ glk_get_line_stream_uni _vararg_count ret;
! glk_get_line_stream_uni(stream, uintarray, arraylen) => uint
@glk 306 _vararg_count ret;
return ret;
];
[ glk_stream_open_file_uni _vararg_count ret;
! glk_stream_open_file_uni(fileref, uint, uint) => stream
@glk 312 _vararg_count ret;
return ret;
];
[ glk_stream_open_memory_uni _vararg_count ret;
! glk_stream_open_memory_uni(uintarray, arraylen, uint, uint) => stream
@glk 313 _vararg_count ret;
return ret;
];
[ glk_stream_open_resource_uni _vararg_count ret;
! glk_stream_open_resource_uni(uint, uint) => stream
@glk 314 _vararg_count ret;
return ret;
];
[ glk_request_char_event_uni _vararg_count;
! glk_request_char_event_uni(window)
@glk 320 _vararg_count 0;
return 0;
];
[ glk_request_line_event_uni _vararg_count;
! glk_request_line_event_uni(window, uintarray, arraylen, uint)
@glk 321 _vararg_count 0;
return 0;
];
[ glk_set_echo_line_event _vararg_count;
! glk_set_echo_line_event(window, uint)
@glk 336 _vararg_count 0;
return 0;
];
[ glk_set_terminators_line_event _vararg_count;
! glk_set_terminators_line_event(window, uintarray, arraylen)
@glk 337 _vararg_count 0;
return 0;
];
[ glk_current_time _vararg_count;
! glk_current_time(&{int, uint, int})
@glk 352 _vararg_count 0;
return 0;
];
[ glk_current_simple_time _vararg_count ret;
! glk_current_simple_time(uint) => int
@glk 353 _vararg_count ret;
return ret;
];
[ glk_time_to_date_utc _vararg_count;
! glk_time_to_date_utc(&{int, uint, int}, &{int, int, int, int, int, int, int, int})
@glk 360 _vararg_count 0;
return 0;
];
[ glk_time_to_date_local _vararg_count;
! glk_time_to_date_local(&{int, uint, int}, &{int, int, int, int, int, int, int, int})
@glk 361 _vararg_count 0;
return 0;
];
[ glk_simple_time_to_date_utc _vararg_count;
! glk_simple_time_to_date_utc(int, uint, &{int, int, int, int, int, int, int, int})
@glk 362 _vararg_count 0;
return 0;
];
[ glk_simple_time_to_date_local _vararg_count;
! glk_simple_time_to_date_local(int, uint, &{int, int, int, int, int, int, int, int})
@glk 363 _vararg_count 0;
return 0;
];
[ glk_date_to_time_utc _vararg_count;
! glk_date_to_time_utc(&{int, int, int, int, int, int, int, int}, &{int, uint, int})
@glk 364 _vararg_count 0;
return 0;
];
[ glk_date_to_time_local _vararg_count;
! glk_date_to_time_local(&{int, int, int, int, int, int, int, int}, &{int, uint, int})
@glk 365 _vararg_count 0;
return 0;
];
[ glk_date_to_simple_time_utc _vararg_count ret;
! glk_date_to_simple_time_utc(&{int, int, int, int, int, int, int, int}, uint) => int
@glk 366 _vararg_count ret;
return ret;
];
[ glk_date_to_simple_time_local _vararg_count ret;
! glk_date_to_simple_time_local(&{int, int, int, int, int, int, int, int}, uint) => int
@glk 367 _vararg_count ret;
return ret;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Rocks
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant GG_MAINWIN_ROCK 201;
Constant GG_STATUSWIN_ROCK 202;
Constant GG_QUOTEWIN_ROCK 203;
Constant GG_SAVESTR_ROCK 301;
Constant GG_SCRIPTSTR_ROCK 302;
Constant GG_COMMANDWSTR_ROCK 303;
Constant GG_COMMANDRSTR_ROCK 304;
Constant GG_SCRIPTFREF_ROCK 401;
Constant GG_FOREGROUNDCHAN_ROCK 410;
Constant GG_BACKGROUNDCHAN_ROCK 411;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Stubs
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
#Stub HandleGlkEvent 2;
#Stub IdentifyGlkObject 4;
#Stub InitGlkWindow 1;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Starting Up
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_PreInitialise res;
@gestalt 4 2 res; ! Test if this interpreter has Glk...
if (res == 0) quit; ! ...without which there would be nothing we could do
unicode_gestalt_ok = false;
if (glk_gestalt(gestalt_Unicode, 0))
unicode_gestalt_ok = true;
! Set the VM's I/O system to be Glk.
@setiosys 2 0;
];
[ VM_Initialise res sty i;
@gestalt 4 2 res; ! Test if this interpreter has Glk...
if (res == 0) quit; ! ...without which there would be nothing we could do
! First, we must go through all the Glk objects that exist, and see
! if we created any of them. One might think this strange, since the
! program has just started running, but remember that the player might
! have just typed "restart".
GGRecoverObjects();
! Sound channel initialisation, and RNG fixing, must be done now rather
! than later in case InitGlkWindow() returns a non-zero value.
if (glk_gestalt(gestalt_Sound, 0)) {
if (gg_foregroundchan == 0)
gg_foregroundchan = glk_schannel_create(GG_FOREGROUNDCHAN_ROCK);
if (gg_backgroundchan == 0)
gg_backgroundchan = glk_schannel_create(GG_BACKGROUNDCHAN_ROCK);
}
#ifdef FIX_RNG;
@random 10000 i;
i = -i-2000;
print "[Random number generator seed is ", i, "]^";
@setrandom i;
#endif; ! FIX_RNG
res = InitGlkWindow(0);
if (res ~= 0) return;
! Now, gg_mainwin and gg_storywin might already be set. If not, set them.
if (gg_mainwin == 0) {
! Open the story window.
res = InitGlkWindow(GG_MAINWIN_ROCK);
if (res == 0) {
! Left-justify the header style
glk_stylehint_set(wintype_TextBuffer, style_Header, stylehint_Justification, 0);
! Try to make emphasized type in italics and not boldface
glk_stylehint_set(wintype_TextBuffer, style_Emphasized, stylehint_Weight, 0);
glk_stylehint_set(wintype_TextBuffer, style_Emphasized, stylehint_Oblique, 1);
gg_mainwin = glk_window_open(0, 0, 0, wintype_TextBuffer, GG_MAINWIN_ROCK);
}
if (gg_mainwin == 0) quit; ! If we can't even open one window, give in
} else {
! There was already a story window. We should erase it.
glk_window_clear(gg_mainwin);
}
if (gg_statuswin == 0) {
res = InitGlkWindow(GG_STATUSWIN_ROCK);
if (res == 0) {
statuswin_cursize = statuswin_size;
for (sty=0: sty<style_NUMSTYLES: sty++)
glk_stylehint_set(wintype_TextGrid, sty, stylehint_ReverseColor, 1);
gg_statuswin =
glk_window_open(gg_mainwin, winmethod_Fixed + winmethod_Above,
statuswin_cursize, wintype_TextGrid, GG_STATUSWIN_ROCK);
}
}
! It's possible that the status window couldn't be opened, in which case
! gg_statuswin is now zero. We must allow for that later on.
glk_set_window(gg_mainwin);
InitGlkWindow(1);
! Empty the parse buffer (see bug 0001451)
buffer3-->0 = 0;
];
[ GGRecoverObjects id;
! If GGRecoverObjects() has been called, all these stored IDs are
! invalid, so we start by clearing them all out.
! (In fact, after a restoreundo, some of them may still be good.
! For simplicity, though, we assume the general case.)
gg_mainwin = 0;
gg_statuswin = 0;
gg_quotewin = 0;
gg_scriptfref = 0;
gg_scriptstr = 0;
gg_savestr = 0;
statuswin_cursize = 0;
gg_foregroundchan = 0;
gg_backgroundchan = 0;
#Ifdef DEBUG;
gg_commandstr = 0;
gg_command_reading = false;
#Endif; ! DEBUG
! Also tell the game to clear its object references.
IdentifyGlkObject(0);
id = glk_stream_iterate(0, gg_arguments);
while (id) {
switch (gg_arguments-->0) {
GG_SAVESTR_ROCK: gg_savestr = id;
GG_SCRIPTSTR_ROCK: gg_scriptstr = id;
#Ifdef DEBUG;
GG_COMMANDWSTR_ROCK: gg_commandstr = id;
gg_command_reading = false;
GG_COMMANDRSTR_ROCK: gg_commandstr = id;
gg_command_reading = true;
#Endif; ! DEBUG
default: IdentifyGlkObject(1, 1, id, gg_arguments-->0);
}
id = glk_stream_iterate(id, gg_arguments);
}
id = glk_window_iterate(0, gg_arguments);
while (id) {
switch (gg_arguments-->0) {
GG_MAINWIN_ROCK: gg_mainwin = id;
GG_STATUSWIN_ROCK: gg_statuswin = id;
GG_QUOTEWIN_ROCK: gg_quotewin = id;
default: IdentifyGlkObject(1, 0, id, gg_arguments-->0);
}
id = glk_window_iterate(id, gg_arguments);
}
id = glk_fileref_iterate(0, gg_arguments);
while (id) {
switch (gg_arguments-->0) {
GG_SCRIPTFREF_ROCK: gg_scriptfref = id;
default: IdentifyGlkObject(1, 2, id, gg_arguments-->0);
}
id = glk_fileref_iterate(id, gg_arguments);
}
if (glk_gestalt(gestalt_Sound, 0)) {
id = glk_schannel_iterate(0, gg_arguments);
while (id) {
switch (gg_arguments-->0) {
GG_FOREGROUNDCHAN_ROCK: gg_foregroundchan = id;
GG_BACKGROUNDCHAN_ROCK: gg_backgroundchan = id;
default: IdentifyGlkObject(1, 3, id, gg_arguments-->0);
}
id = glk_schannel_iterate(id, gg_arguments);
}
if (gg_foregroundchan ~= 0) { glk_schannel_stop(gg_foregroundchan); }
if (gg_backgroundchan ~= 0) { glk_schannel_stop(gg_backgroundchan); }
}
! Tell the game to tie up any loose ends.
IdentifyGlkObject(2);
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Enable Acceleration
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ENABLE_GLULX_ACCEL_R addr res;
@gestalt 9 0 res;
if (res == 0) return;
addr = #classes_table;
@accelparam 0 addr;
@accelparam 1 INDIV_PROP_START;
@accelparam 2 Class;
@accelparam 3 Object;
@accelparam 4 Routine;
@accelparam 5 String;
addr = #globals_array + WORDSIZE * #g$self;
@accelparam 6 addr;
@accelparam 7 NUM_ATTR_BYTES;
addr = #cpv__start;
@accelparam 8 addr;
@accelfunc 1 Z__Region;
@accelfunc 2 CP__Tab;
@accelfunc 3 RA__Pr;
@accelfunc 4 RL__Pr;
@accelfunc 5 OC__Cl;
@accelfunc 6 RV__Pr;
@accelfunc 7 OP__Pr;
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Release Number
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_Describe_Release i;
print "Release ";
@aloads ROM_GAMERELEASE 0 i;
print i;
print " / Serial number ";
for (i=0 : i<6 : i++) print (char) ROM_GAMESERIAL->i;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Keyboard Input
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_KeyChar win nostat done res ix jx ch;
jx = ch; ! squash compiler warnings
if (win == 0) win = gg_mainwin;
if (gg_commandstr ~= 0 && gg_command_reading ~= false) {
done = glk_get_line_stream(gg_commandstr, gg_arguments, 31);
if (done == 0) {
glk_stream_close(gg_commandstr, 0);
gg_commandstr = 0;
gg_command_reading = false;
! fall through to normal user input.
} else {
! Trim the trailing newline
if (gg_arguments->(done-1) == 10) done = done-1;
res = gg_arguments->0;
if (res == '\') {
res = 0;
for (ix=1 : ix<done : ix++) {
ch = gg_arguments->ix;
if (ch >= '0' && ch <= '9') {
@shiftl res 4 res;
res = res + (ch-'0');
} else if (ch >= 'a' && ch <= 'f') {
@shiftl res 4 res;
res = res + (ch+10-'a');
} else if (ch >= 'A' && ch <= 'F') {
@shiftl res 4 res;
res = res + (ch+10-'A');
}
}
}
jump KCPContinue;
}
}
done = false;
glk_request_char_event(win);
while (~~done) {
glk_select(gg_event);
switch (gg_event-->0) {
5: ! evtype_Arrange
if (nostat) {
glk_cancel_char_event(win);
res = $80000000;
done = true;
break;
}
DrawStatusLine();
2: ! evtype_CharInput
if (gg_event-->1 == win) {
res = gg_event-->2;
done = true;
}
}
ix = HandleGlkEvent(gg_event, 1, gg_arguments);
if (ix == 2) {
res = gg_arguments-->0;
done = true;
} else if (ix == -1) done = false;
}
if (gg_commandstr ~= 0 && gg_command_reading == false) {
if (res < 32 || res >= 256 || (res == '\' or ' ')) {
glk_put_char_stream(gg_commandstr, '\');
done = 0;
jx = res;
for (ix=0 : ix<8 : ix++) {
@ushiftr jx 28 ch;
@shiftl jx 4 jx;
ch = ch & $0F;
if (ch ~= 0 || ix == 7) done = 1;
if (done) {
if (ch >= 0 && ch <= 9) ch = ch + '0';
else ch = (ch - 10) + 'A';
glk_put_char_stream(gg_commandstr, ch);
}
}
} else {
glk_put_char_stream(gg_commandstr, res);
}
glk_put_char_stream(gg_commandstr, 10); ! newline
}
.KCPContinue;
return res;
];
[ VM_KeyDelay tenths key done ix;
glk_request_char_event(gg_mainwin);
glk_request_timer_events(tenths*100);
while (~~done) {
glk_select(gg_event);
ix = HandleGlkEvent(gg_event, 1, gg_arguments);
if (ix == 2) {
key = gg_arguments-->0;
done = true;
}
else if (ix >= 0 && gg_event-->0 == 1 or 2) {
key = gg_event-->2;
done = true;
}
}
glk_cancel_char_event(gg_mainwin);
glk_request_timer_events(0);
return key;
];
[ VM_ReadKeyboard a_buffer a_table done ix;
if (gg_commandstr ~= 0 && gg_command_reading ~= false) {
done = glk_get_line_stream(gg_commandstr, a_buffer+WORDSIZE,
(INPUT_BUFFER_LEN-WORDSIZE)-1);
if (done == 0) {
glk_stream_close(gg_commandstr, 0);
gg_commandstr = 0;
gg_command_reading = false;
}
else {
! Trim the trailing newline
if ((a_buffer+WORDSIZE)->(done-1) == 10) done = done-1;
a_buffer-->0 = done;
VM_Style(INPUT_VMSTY);
glk_put_buffer(a_buffer+WORDSIZE, done);
VM_Style(NORMAL_VMSTY);
print "^";
jump KPContinue;
}
}
done = false;
glk_request_line_event(gg_mainwin, a_buffer+WORDSIZE, INPUT_BUFFER_LEN-WORDSIZE, 0);
while (~~done) {
glk_select(gg_event);
switch (gg_event-->0) {
5: ! evtype_Arrange
DrawStatusLine();
3: ! evtype_LineInput
if (gg_event-->1 == gg_mainwin) {
a_buffer-->0 = gg_event-->2;
done = true;
}
}
ix = HandleGlkEvent(gg_event, 0, a_buffer);
if (ix == 2) done = true;
else if (ix == -1) done = false;
}
if (gg_commandstr ~= 0 && gg_command_reading == false) {
glk_put_buffer_stream(gg_commandstr, a_buffer+WORDSIZE, a_buffer-->0);
glk_put_char_stream(gg_commandstr, 10); ! newline
}
.KPContinue;
VM_Tokenise(a_buffer,a_table);
! It's time to close any quote window we've got going.
if (gg_quotewin) {
glk_window_close(gg_quotewin, 0);
gg_quotewin = 0;
}
#ifdef ECHO_COMMANDS;
print "** ";
for (ix=WORDSIZE: ix<(a_buffer-->0)+WORDSIZE: ix++) print (char) a_buffer->ix;
print "^";
#endif; ! ECHO_COMMANDS
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Buffer Functions
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_CopyBuffer bto bfrom i;
for (i=0: i<INPUT_BUFFER_LEN: i++) bto->i = bfrom->i;
];
[ VM_PrintToBuffer buf len a b c;
if (b) {
if (metaclass(a) == Object && a.#b == WORDSIZE
&& metaclass(a.b) == String)
buf-->0 = Glulx_PrintAnyToArray(buf+WORDSIZE, len, a.b);
else if (metaclass(a) == Routine)
buf-->0 = Glulx_PrintAnyToArray(buf+WORDSIZE, len, a, b, c);
else
buf-->0 = Glulx_PrintAnyToArray(buf+WORDSIZE, len, a, b);
}
else if (metaclass(a) == Routine)
buf-->0 = Glulx_PrintAnyToArray(buf+WORDSIZE, len, a, b, c);
else
buf-->0 = Glulx_PrintAnyToArray(buf+WORDSIZE, len, a);
if (buf-->0 > len) buf-->0 = len;
return buf-->0;
];
[ VM_Tokenise buf tab
cx numwords len bx ix wx wpos wlen val res dictlen entrylen;
len = buf-->0;
buf = buf+WORDSIZE;
! First, split the buffer up into words. We use the standard Infocom
! list of word separators (comma, period, double-quote).
cx = 0;
numwords = 0;
while (cx < len) {
while (cx < len && buf->cx == ' ') cx++;
if (cx >= len) break;
bx = cx;
if (buf->cx == '.' or ',' or '"') cx++;
else {
while (cx < len && buf->cx ~= ' ' or '.' or ',' or '"') cx++;
}
tab-->(numwords*3+2) = (cx-bx);
tab-->(numwords*3+3) = WORDSIZE+bx;
numwords++;
if (numwords >= MAX_BUFFER_WORDS) break;
}
tab-->0 = numwords;
! Now we look each word up in the dictionary.
dictlen = #dictionary_table-->0;
entrylen = DICT_WORD_SIZE + 7;
for (wx=0 : wx<numwords : wx++) {
wlen = tab-->(wx*3+2);
wpos = tab-->(wx*3+3);
! Copy the word into the gg_tokenbuf array, clipping to DICT_WORD_SIZE
! characters and lower case.
if (wlen > DICT_WORD_SIZE) wlen = DICT_WORD_SIZE;
cx = wpos - WORDSIZE;
for (ix=0 : ix<wlen : ix++) gg_tokenbuf->ix = VM_UpperToLowerCase(buf->(cx+ix));
for (: ix<DICT_WORD_SIZE : ix++) gg_tokenbuf->ix = 0;
val = #dictionary_table + WORDSIZE;
@binarysearch gg_tokenbuf DICT_WORD_SIZE val entrylen dictlen 1 1 res;
tab-->(wx*3+1) = res;
}
];
[ LTI_Insert i ch b y;
! Protect us from strict mode, as this isn't an array in quite the
! sense it expects
b = buffer;
! Insert character ch into buffer at point i.
! Being careful not to let the buffer possibly overflow:
y = b-->0;
if (y > INPUT_BUFFER_LEN) y = INPUT_BUFFER_LEN;
! Move the subsequent text along one character:
for (y=y+WORDSIZE : y>i : y--) b->y = b->(y-1);
b->i = ch;
! And the text is now one character longer:
if (b-->0 < INPUT_BUFFER_LEN) (b-->0)++;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Dictionary Functions
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_InvalidDictionaryAddress addr;
if (addr < 0) rtrue;
rfalse;
];
[ VM_DictionaryAddressToNumber w; return w; ];
[ VM_NumberToDictionaryAddress n; return n; ];
Array gg_tokenbuf -> DICT_WORD_SIZE;
[ GGWordCompare str1 str2 ix jx;
for (ix=0 : ix<DICT_WORD_SIZE : ix++) {
jx = (str1->ix) - (str2->ix);
if (jx ~= 0) return jx;
}
return 0;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: SHOWVERB support
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
#Ifdef DEBUG;
[ DebugAction a str;
if (a >= 4096) { print "<fake action ", a-4096, ">"; return; }
if (a < 0 || a >= #identifiers_table-->7) print "<invalid action ", a, ">";
else {
str = #identifiers_table-->6;
str = str-->a;
if (str) print (string) str; else print "<unnamed action ", a, ">";
}
];
[ DebugAttribute a str;
if (a < 0 || a >= NUM_ATTR_BYTES*8) print "<invalid attribute ", a, ">";
else {
str = #identifiers_table-->4;
str = str-->a;
if (str) print (string) str; else print "<unnamed attribute ", a, ">";
}
];
#Endif;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Command Tables
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_CommandTableAddress i;
return (#grammar_table)-->(i+1);
];
[ VM_PrintCommandWords i wd j dictlen entrylen;
dictlen = #dictionary_table-->0;
entrylen = DICT_WORD_SIZE + 7;
for (j=0 : j<dictlen : j++) {
wd = #dictionary_table + WORDSIZE + entrylen*j;
if (DictionaryWordToVerbNum(wd) == i)
print "'", (address) wd, "' ";
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Random Number Generator
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_Seed_RNG n;
@setrandom n;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Memory Allocation
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_AllocateMemory amount i;
@gestalt 7 0 i;
if (i == 0) return i;
@malloc amount i;
return i;
];
[ VM_FreeMemory address i;
@gestalt 7 0 i;
if (i == 0) return;
@mfree address;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Audiovisual Resources
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_Picture resource_ID;
if (glk_gestalt(gestalt_Graphics, 0)) {
glk_image_draw(gg_mainwin, resource_ID, imagealign_InlineCenter, 0);
} else {
print "[Picture number ", resource_ID, " here.]^";
}
];
[ VM_SoundEffect resource_ID;
if (glk_gestalt(gestalt_Sound, 0)) {
glk_schannel_play(gg_foregroundchan, resource_ID);
} else {
print "[Sound effect number ", resource_ID, " here.]^";
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Typography
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_Style sty;
switch (sty) {
NORMAL_VMSTY: glk_set_style(style_Normal);
HEADER_VMSTY: glk_set_style(style_Header);
SUBHEADER_VMSTY: glk_set_style(style_Subheader);
NOTE_VMSTY: glk_set_style(style_Note);
ALERT_VMSTY: glk_set_style(style_Alert);
BLOCKQUOTE_VMSTY: glk_set_style(style_BlockQuote);
INPUT_VMSTY: glk_set_style(style_Input);
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Character Casing
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_UpperToLowerCase c; return glk_char_to_lower(c); ];
[ VM_LowerToUpperCase c; return glk_char_to_upper(c); ];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Glulx-Only Printing Routines
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx_PrintAnything() <nothing printed>
! Glulx_PrintAnything(0) <nothing printed>
! Glulx_PrintAnything("string"); print (string) "string";
! Glulx_PrintAnything('word') print (address) 'word';
! Glulx_PrintAnything(obj) print (name) obj;
! Glulx_PrintAnything(obj, prop) obj.prop();
! Glulx_PrintAnything(obj, prop, args...) obj.prop(args...);
! Glulx_PrintAnything(func) func();
! Glulx_PrintAnything(func, args...) func(args...);
[ Glulx_PrintAnything _vararg_count obj mclass;
if (_vararg_count == 0) return;
@copy sp obj;
_vararg_count--;
if (obj == 0) return;
if (obj->0 == $60) {
! Dictionary word. Metaclass() can't catch this case, so we do it manually
print (address) obj;
return;
}
mclass = metaclass(obj);
switch (mclass) {
nothing:
return;
String:
print (string) obj;
return;
Routine:
! Call the function with all the arguments which are already
! on the stack.
@call obj _vararg_count 0;
return;
Object:
if (_vararg_count == 0) {
print (name) obj;
}
else {
! Push the object back onto the stack, and call the
! veneer routine that handles obj.prop() calls.
@copy obj sp;
_vararg_count++;
@call CA__Pr _vararg_count 0;
}
return;
}
];
[ Glulx_PrintAnyToArray _vararg_count arr arrlen str oldstr len;
@copy sp arr;
@copy sp arrlen;
_vararg_count = _vararg_count - 2;
oldstr = glk_stream_get_current();
str = glk_stream_open_memory(arr, arrlen, 1, 0);
if (str == 0) return 0;
glk_stream_set_current(str);
@call Glulx_PrintAnything _vararg_count 0;
glk_stream_set_current(oldstr);
@copy $ffffffff sp;
@copy str sp;
@glk $0044 2 0; ! stream_close
@copy sp len;
@copy sp 0;
return len;
];
Constant GG_ANYTOSTRING_LEN 66;
Array AnyToStrArr -> GG_ANYTOSTRING_LEN+1;
[ Glulx_ChangeAnyToCString _vararg_count ix len;
ix = GG_ANYTOSTRING_LEN-2;
@copy ix sp;
ix = AnyToStrArr+1;
@copy ix sp;
ix = _vararg_count+2;
@call Glulx_PrintAnyToArray ix len;
AnyToStrArr->0 = $E0;
if (len >= GG_ANYTOSTRING_LEN)
len = GG_ANYTOSTRING_LEN-1;
AnyToStrArr->(len+1) = 0;
return AnyToStrArr;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: The Screen
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_ClearScreen window;
if (window == WIN_ALL or WIN_MAIN) {
glk_window_clear(gg_mainwin);
if (gg_quotewin) {
glk_window_close(gg_quotewin, 0);
gg_quotewin = 0;
}
}
if (gg_statuswin && window == WIN_ALL or WIN_STATUS) glk_window_clear(gg_statuswin);
];
[ VM_ScreenWidth id;
id=gg_mainwin;
if (gg_statuswin && statuswin_current) id = gg_statuswin;
glk_window_get_size(id, gg_arguments, 0);
return gg_arguments-->0;
];
[ VM_ScreenHeight;
glk_window_get_size(gg_mainwin, 0, gg_arguments);
return gg_arguments-->0;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Window Colours
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_SetWindowColours f b window doclear i fwd bwd swin;
if (clr_on && f && b) {
if (window) swin = 5-window; ! 4 for TextGrid, 3 for TextBuffer
fwd = MakeColourWord(f);
bwd = MakeColourWord(b);
for (i=0 : i<style_NUMSTYLES: i++) {
if (f == CLR_DEFAULT || b == CLR_DEFAULT) { ! remove style hints
glk_stylehint_clear(swin, i, stylehint_TextColor);
glk_stylehint_clear(swin, i, stylehint_BackColor);
} else {
glk_stylehint_set(swin, i, stylehint_TextColor, fwd);
glk_stylehint_set(swin, i, stylehint_BackColor, bwd);
}
}
! Now re-open the windows to apply the hints
if (gg_statuswin) glk_window_close(gg_statuswin, 0);
gg_statuswin = 0;
if (doclear || ( window ~= 1 && (clr_fg ~= f || clr_bg ~= b) ) ) {
glk_window_close(gg_mainwin, 0);
gg_mainwin = glk_window_open(0, 0, 0, wintype_TextBuffer, GG_MAINWIN_ROCK);
if (gg_scriptstr ~= 0)
glk_window_set_echo_stream(gg_mainwin, gg_scriptstr);
}
gg_statuswin =
glk_window_open(gg_mainwin, winmethod_Fixed + winmethod_Above,
statuswin_cursize, wintype_TextGrid, GG_STATUSWIN_ROCK);
if (statuswin_current && gg_statuswin) VM_MoveCursorInStatusLine(); else VM_MainWindow();
if (window ~= 2) {
clr_fgstatus = f;
clr_bgstatus = b;
}
if (window ~= 1) {
clr_fg = f;
clr_bg = b;
}
}
];
[ VM_RestoreWindowColours; ! used after UNDO: compare I6 patch L61007
if (clr_on) { ! check colour has been used
VM_SetWindowColours(clr_fg, clr_bg, 2); ! make sure both sets of variables are restored
VM_SetWindowColours(clr_fgstatus, clr_bgstatus, 1, true);
VM_ClearScreen();
}
];
[ MakeColourWord c;
if (c > 9) return c;
c = c-2;
return $ff0000*(c&1) + $ff00*(c&2 ~= 0) + $ff*(c&4 ~= 0);
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Main Window
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_MainWindow;
glk_set_window(gg_mainwin); ! set_window
statuswin_current=0;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Status Line
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_StatusLineHeight hgt;
if (gg_statuswin == 0) return;
if (hgt == statuswin_cursize) return;
glk_window_set_arrangement(glk_window_get_parent(gg_statuswin), $12, hgt, 0);
statuswin_cursize = hgt;
];
[ VM_MoveCursorInStatusLine line column;
if (gg_statuswin == 0) return;
glk_set_window(gg_statuswin);
if (line == 0) { line = 1; column = 1; }
glk_window_move_cursor(gg_statuswin, column-1, line-1);
statuswin_current=1;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Quotation Boxes
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ Box__Routine maxwid arr ix lines lastnl parwin;
maxwid = 0; ! squash compiler warning
lines = arr-->0;
if (gg_quotewin == 0) {
gg_arguments-->0 = lines;
ix = InitGlkWindow(GG_QUOTEWIN_ROCK);
if (ix == 0)
gg_quotewin =
glk_window_open(gg_mainwin, winmethod_Fixed + winmethod_Above,
lines, wintype_TextBuffer, GG_QUOTEWIN_ROCK);
} else {
parwin = glk_window_get_parent(gg_quotewin);
glk_window_set_arrangement(parwin, $12, lines, 0);
}
lastnl = true;
if (gg_quotewin) {
glk_window_clear(gg_quotewin);
glk_set_window(gg_quotewin);
lastnl = false;
}
VM_Style(BLOCKQUOTE_VMSTY);
for (ix=0 : ix<lines : ix++) {
print (string) arr-->(ix+1);
if (ix < lines-1 || lastnl) new_line;
}
VM_Style(NORMAL_VMSTY);
if (gg_quotewin) glk_set_window(gg_mainwin);
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: GlkList Command
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
#Ifdef DEBUG;
[ GlkListSub id val;
id = glk_window_iterate(0, gg_arguments);
while (id) {
print "Window ", id, " (", gg_arguments-->0, "): ";
val = glk_window_get_type(id);
switch (val) {
1: print "pair";
2: print "blank";
3: print "textbuffer";
4: print "textgrid";
5: print "graphics";
default: print "unknown";
}
val = glk_window_get_parent(id);
if (val) print ", parent is window ", val;
else print ", no parent (root)";
val = glk_window_get_stream(id);
print ", stream ", val;
val = glk_window_get_echo_stream(id);
if (val) print ", echo stream ", val;
print "^";
id = glk_window_iterate(id, gg_arguments);
}
id = glk_stream_iterate(0, gg_arguments);
while (id) {
print "Stream ", id, " (", gg_arguments-->0, ")^";
id = glk_stream_iterate(id, gg_arguments);
}
id = glk_fileref_iterate(0, gg_arguments);
while (id) {
print "Fileref ", id, " (", gg_arguments-->0, ")^";
id = glk_fileref_iterate(id, gg_arguments);
}
if (glk_gestalt(gestalt_Sound, 0)) {
id = glk_schannel_iterate(0, gg_arguments);
while (id) {
print "Soundchannel ", id, " (", gg_arguments-->0, ")^";
id = glk_schannel_iterate(id, gg_arguments);
}
}
];
Verb meta 'glklist'
* -> Glklist;
#Endif;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Undo
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_Undo result_code;
@restoreundo result_code;
return (~~result_code);
];
[ VM_Save_Undo result_code;
@saveundo result_code;
if (result_code == -1) { GGRecoverObjects(); return 2; }
return (~~result_code);
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Quit The Game Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ QUIT_THE_GAME_R;
if (actor ~= player) rfalse;
if ((actor == player) && (untouchable_silence == false))
QUIT_THE_GAME_RM('A');
if (YesOrNo()~=0) quit;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Restart The Game Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ RESTART_THE_GAME_R;
if (actor ~= player) rfalse;
RESTART_THE_GAME_RM('A');
if (YesOrNo()~=0) {
@restart;
RESTART_THE_GAME_RM('B'); new_line;
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Restore The Game Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ RESTORE_THE_GAME_R res fref;
if (actor ~= player) rfalse;
fref = glk_fileref_create_by_prompt($01, $02, 0);
if (fref == 0) jump RFailed;
gg_savestr = glk_stream_open_file(fref, $02, GG_SAVESTR_ROCK);
glk_fileref_destroy(fref);
if (gg_savestr == 0) jump RFailed;
@restore gg_savestr res;
glk_stream_close(gg_savestr, 0);
gg_savestr = 0;
.RFailed;
RESTORE_THE_GAME_RM('A'); new_line;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Save The Game Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ SAVE_THE_GAME_R res fref;
if (actor ~= player) rfalse;
fref = glk_fileref_create_by_prompt($01, $01, 0);
if (fref == 0) jump SFailed;
gg_savestr = glk_stream_open_file(fref, $01, GG_SAVESTR_ROCK);
glk_fileref_destroy(fref);
if (gg_savestr == 0) jump SFailed;
@save gg_savestr res;
if (res == -1) {
! The player actually just typed "restore". We first have to recover
! all the Glk objects; the values in our global variables are all wrong.
GGRecoverObjects();
glk_stream_close(gg_savestr, 0); ! stream_close
gg_savestr = 0;
RESTORE_THE_GAME_RM('B'); new_line;
rtrue;
}
glk_stream_close(gg_savestr, 0); ! stream_close
gg_savestr = 0;
if (res == 0) { SAVE_THE_GAME_RM('B'); new_line; rtrue; }
.SFailed;
SAVE_THE_GAME_RM('A'); new_line;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Verify The Story File Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VERIFY_THE_STORY_FILE_R res;
if (actor ~= player) rfalse;
@verify res;
if (res == 0) { VERIFY_THE_STORY_FILE_RM('A'); new_line; rtrue; }
VERIFY_THE_STORY_FILE_RM('B'); new_line;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Switch Transcript On Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ SWITCH_TRANSCRIPT_ON_R;
if (actor ~= player) rfalse;
if (gg_scriptstr ~= 0) { SWITCH_TRANSCRIPT_ON_RM('A'); new_line; rtrue; }
if (gg_scriptfref == 0) {
gg_scriptfref = glk_fileref_create_by_prompt($102, $05, GG_SCRIPTFREF_ROCK);
if (gg_scriptfref == 0) jump S1Failed;
}
! stream_open_file
gg_scriptstr = glk_stream_open_file(gg_scriptfref, $05, GG_SCRIPTSTR_ROCK);
if (gg_scriptstr == 0) jump S1Failed;
glk_window_set_echo_stream(gg_mainwin, gg_scriptstr);
SWITCH_TRANSCRIPT_ON_RM('B'); new_line;
VersionSub();
return;
.S1Failed;
SWITCH_TRANSCRIPT_ON_RM('C'); new_line;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Switch Transcript Off Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ SWITCH_TRANSCRIPT_OFF_R;
if (actor ~= player) rfalse;
if (gg_scriptstr == 0) { SWITCH_TRANSCRIPT_OFF_RM('A'); new_line; rtrue; }
SWITCH_TRANSCRIPT_OFF_RM('B'); new_line;
glk_stream_close(gg_scriptstr, 0); ! stream_close
gg_scriptstr = 0;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Announce Story File Version Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ANNOUNCE_STORY_FILE_VERSION_R ix;
if (actor ~= player) rfalse;
Banner();
print "Identification number: ";
for (ix=6: ix <= UUID_ARRAY->0: ix++) print (char) UUID_ARRAY->ix;
print "^";
@gestalt 1 0 ix;
print "Interpreter version ", ix / $10000, ".", (ix & $FF00) / $100,
".", ix & $FF, " / ";
@gestalt 0 0 ix;
print "VM ", ix / $10000, ".", (ix & $FF00) / $100, ".", ix & $FF, " / ";
print "Library serial number ", (string) LibSerial, "^";
#Ifdef LanguageVersion;
print (string) LanguageVersion, "^";
#Endif; ! LanguageVersion
ShowExtensionVersions();
say__p = 1;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Descend To Specific Action Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ DESCEND_TO_SPECIFIC_ACTION_R;
indirect(#actions_table-->(action+1));
rtrue;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Glulx.i6t: Veneer
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ Unsigned__Compare x y;
@jleu x y ?lesseq;
return 1;
.lesseq;
@jeq x y ?equal;
return -1;
.equal;
return 0;
];
[ RT__ChLDW x y;
@aload x y sp;
@return sp;
];
[ RT__ChLDB x y;
@aloadb x y sp;
@return sp;
];
#Endif;
#Ifdef TARGET_ZCODE;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Summary
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Variables and Arrays
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Global top_object; ! largest valid number of any tree object
Global xcommsdir; ! true if command recording is on
Global transcript_mode; ! true if game scripting is on
Constant INPUT_BUFFER_LEN = 120; ! Length of buffer array
Array buffer -> 123; ! Buffer for parsing main line of input
Array buffer2 -> 123; ! Buffers for supplementary questions
Array buffer3 -> 123; ! Buffer retaining input for "again"
Array parse buffer 63; ! Parse table mirroring it
Array parse2 buffer 63; !
Global dict_start;
Global dict_entry_size;
Global dict_end;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Starting Up
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_Initialise i;
standard_interpreter = HDR_TERPSTANDARD-->0;
transcript_mode = ((HDR_GAMEFLAGS-->0) & 1);
dict_start = HDR_DICTIONARY-->0;
dict_entry_size = dict_start->(dict_start->0 + 1);
dict_start = dict_start + dict_start->0 + 4;
dict_end = dict_start + ((dict_start - 2)-->0) * dict_entry_size;
buffer->0 = INPUT_BUFFER_LEN;
buffer2->0 = INPUT_BUFFER_LEN;
buffer3->0 = INPUT_BUFFER_LEN;
parse->0 = 15;
parse2->0 = 15;
top_object = #largest_object-255;
#ifdef FIX_RNG;
@random 10000 -> i;
i = -i-2000;
print "[Random number generator seed is ", i, "]^";
@random i -> i;
#endif; ! FIX_RNG
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Enable Acceleration
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ENABLE_GLULX_ACCEL_R;
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Release Number
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_Describe_Release i;
print "Release ", (HDR_GAMERELEASE-->0) & $03ff, " / Serial number ";
for (i=0 : i<6 : i++) print (char) HDR_GAMESERIAL->i;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Keyboard Input
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_KeyChar win key;
if (win) @set_window win;
@read_char 1 -> key;
return key;
];
[ VM_KeyDelay tenths key;
@read_char 1 tenths VM_KeyDelay_Interrupt -> key;
return key;
];
[ VM_KeyDelay_Interrupt; rtrue; ];
[ VM_ReadKeyboard a_buffer a_table i;
read a_buffer a_table;
#ifdef ECHO_COMMANDS;
print "** ";
for (i=2: i<=(a_buffer->1)+1: i++) print (char) a_buffer->i;
print "^";
#ifnot;
i=0; ! suppress compiler warning
#endif;
#Iftrue (#version_number == 6);
@output_stream -1;
@loadb a_buffer 1 -> sp;
@add a_buffer 2 -> sp;
@print_table sp sp;
new_line;
@output_stream 1;
#Endif;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Buffer Functions
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_CopyBuffer bto bfrom i;
for (i=0: i<INPUT_BUFFER_LEN: i++) bto->i = bfrom->i;
];
[ VM_PrintToBuffer buf len a b c;
@output_stream 3 buf;
switch (metaclass(a)) {
String: print (string) a;
Routine: a(b, c);
Object, Class: if (b) PrintOrRun(a, b, true); else print (name) a;
}
@output_stream -3;
if (buf-->0 > len) print "Error: Overflow in VM_PrintToBuffer.^";
return buf-->0;
];
[ VM_Tokenise b p; b->(2 + b->1) = 0; @tokenise b p; ];
[ LTI_Insert i ch b y;
! Protect us from strict mode, as this isn't an array in quite the
! sense it expects
b = buffer;
! Insert character ch into buffer at point i.
! Being careful not to let the buffer possibly overflow:
y = b->1;
if (y > b->0) y = b->0;
! Move the subsequent text along one character:
for (y=y+2 : y>i : y--) b->y = b->(y-1);
b->i = ch;
! And the text is now one character longer:
if (b->1 < b->0) (b->1)++;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Dictionary Functions
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_InvalidDictionaryAddress addr;
if ((UnsignedCompare(addr, dict_start) < 0) ||
(UnsignedCompare(addr, dict_end) >= 0) ||
((addr - dict_start) % dict_entry_size ~= 0)) rtrue;
rfalse;
];
[ VM_DictionaryAddressToNumber w; return (w-(HDR_DICTIONARY-->0 + 7))/9; ];
[ VM_NumberToDictionaryAddress n; return HDR_DICTIONARY-->0 + 7 + 9*n; ];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Command Tables
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_CommandTableAddress i;
return (HDR_STATICMEMORY-->0)-->i;
];
[ VM_PrintCommandWords i da j;
da = HDR_DICTIONARY-->0;
for (j=0 : j<(da+5)-->0 : j++)
if (da->(j*9 + 14) == $ff-i)
print "'", (address) VM_NumberToDictionaryAddress(j), "' ";
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: SHOWVERB support
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
#Ifdef DEBUG;
[ DebugAction a anames;
if (a >= 4096) { print "<fake action ", a-4096, ">"; return; }
anames = #identifiers_table;
anames = anames + 2*(anames-->0) + 2*48;
print (string) anames-->a;
];
[ DebugAttribute a anames;
if (a < 0 || a >= 48) print "<invalid attribute ", a, ">";
else {
anames = #identifiers_table; anames = anames + 2*(anames-->0);
print (string) anames-->a;
}
];
#Endif;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: RNG
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_Seed_RNG n;
if (n > 0) n = -n;
@random n -> n;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Memory Allocation
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_AllocateMemory amount;
return 0;
];
[ VM_FreeMemory address;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Audiovisual Resources
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_Picture resource_ID;
#IFTRUE #version_number == 6; ! Z-machine version 6
@draw_picture resource_ID;
#ENDIF;
];
[ VM_SoundEffect resource_ID;
#IFTRUE #version_number == 6; ! Z-machine version 6
@sound_effect resource_ID;
#ENDIF;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Typography
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_Style sty;
switch (sty) {
NORMAL_VMSTY, NOTE_VMSTY: style roman;
HEADER_VMSTY, SUBHEADER_VMSTY, ALERT_VMSTY: style bold;
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Character Casing
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_UpperToLowerCase c;
switch (c) {
'A' to 'Z': c = c + 32;
202, 204, 212, 214, 221: c--;
217, 218: c = c - 2;
158 to 160, 167 to 168, 208 to 210: c = c - 3;
186 to 190, 196 to 200: c = c - 5 ;
175 to 180: c = c - 6;
}
return c;
];
[ VM_LowerToUpperCase c;
switch (c) {
'a' to 'z': c = c - 32;
201, 203, 211, 213, 220: c++;
215, 216: c = c + 2;
155 to 157, 164 to 165, 205 to 207: c = c + 3;
181 to 185, 191 to 195: c = c + 5 ;
169 to 174: c = c + 6;
}
return c;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: The Screen
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_ClearScreen window;
switch (window) {
WIN_ALL: @erase_window -1; statuswin_cursize = 0;
WIN_STATUS: @erase_window 1;
WIN_MAIN: @erase_window 0;
}
];
#Iftrue (#version_number == 6);
[ VM_ScreenWidth width charw;
@get_wind_prop 1 3 -> width;
@get_wind_prop 1 13 -> charw;
charw = charw & $FF;
return (width+charw-1) / charw;
];
#Ifnot;
[ VM_ScreenWidth; return (HDR_SCREENWCHARS->0); ];
#Endif;
[ VM_ScreenHeight; return (HDR_SCREENHLINES->0); ];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Window Colours
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_SetWindowColours f b window;
if (clr_on && f && b) {
if (window == 0) { ! if setting both together, set reverse
clr_fgstatus = b;
clr_bgstatus = f;
}
if (window == 1) {
clr_fgstatus = f;
clr_bgstatus = b;
}
if (window == 0 or 2) {
clr_fg = f;
clr_bg = b;
}
if (statuswin_current)
@set_colour clr_fgstatus clr_bgstatus;
else
@set_colour clr_fg clr_bg;
}
];
[ VM_RestoreWindowColours; ! compare I6 library patch L61007
if (clr_on) { ! check colour has been used
VM_SetWindowColours(clr_fg, clr_bg, 2); ! make sure both sets of variables are restored
VM_SetWindowColours(clr_fgstatus, clr_bgstatus, 1, true);
VM_ClearScreen();
}
#Iftrue (#version_number == 6); ! request screen update
(0-->8) = (0-->8) | $$00000100;
#Endif;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Main Window
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_MainWindow;
if (statuswin_current) {
if (clr_on && clr_bgstatus > 1) @set_colour clr_fg clr_bg;
else style roman;
@set_window 0;
}
statuswin_current = false;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Status Line
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_MoveCursorInStatusLine line column; ! 1-based position on text grid
if (~~statuswin_current) {
@set_window 1;
if (clr_on && clr_bgstatus > 1) @set_colour clr_fgstatus clr_bgstatus;
else style reverse;
}
if (line == 0) {
line = 1;
column = 1;
}
#Iftrue (#version_number == 6);
Z6_MoveCursor(line, column);
#Ifnot;
@set_cursor line column;
#Endif;
statuswin_current = true;
];
#Iftrue (#version_number == 6);
[ Z6_MoveCursor line column charw charh; ! 1-based position on text grid
@get_wind_prop 1 13 -> charw; ! font size
@log_shift charw $FFF8 -> charh;
charw = charw / $100;
line = 1 + charh*(line-1);
column = 1 + charw*(column-1);
@set_cursor line column;
];
#Endif;
#Iftrue (#version_number == 6);
[ VM_StatusLineHeight height wx wy x y charh;
! Split the window. Standard 1.0 interpreters should keep the window 0
! cursor in the same absolute position, but older interpreters,
! including Infocom's don't - they keep the window 0 cursor in the
! same position relative to its origin. We therefore compensate
! manually.
@get_wind_prop 0 0 -> wy; @get_wind_prop 0 1 -> wx;
@get_wind_prop 0 13 -> charh; @log_shift charh $FFF8 -> charh;
@get_wind_prop 0 4 -> y; @get_wind_prop 0 5 -> x;
height = height * charh;
@split_window height;
y = y - height + wy - 1;
if (y < 1) y = 1;
x = x + wx - 1;
@set_cursor y x 0;
statuswin_cursize = height;
];
#Ifnot;
[ VM_StatusLineHeight height;
if (statuswin_cursize ~= height)
@split_window height;
statuswin_cursize = height;
];
#Endif;
#Iftrue (#version_number == 6);
[ Z6_DrawStatusLine width x charw scw;
(0-->8) = (0-->8) &~ $$00000100;
@push say__p; @push say__pc;
BeginActivity(CONSTRUCTING_STATUS_LINE_ACT);
VM_StatusLineHeight(statuswin_size);
! Now clear the window. This isn't totally trivial. Our approach is to select the
! fixed space font, measure its width, and print an appropriate
! number of spaces. We round up if the screen isn't a whole number
! of characters wide, and rely on window 1 being set to clip by default.
VM_MoveCursorInStatusLine(1, 1);
@set_font 4 -> x;
width = VM_ScreenWidth();
spaces width;
ClearParagraphing(8);
if (ForActivity(CONSTRUCTING_STATUS_LINE_ACT) == false) {
! Back to standard font for the display. We use output_stream 3 to
! measure the space required, the aim being to get 50 characters
! worth of space for the location name.
VM_MoveCursorInStatusLine(1, 2);
@set_font 1 -> x;
TEXT_TY_Say(left_hand_status_line);
@get_wind_prop 1 3 -> width;
@get_wind_prop 1 13 -> charw;
charw = charw & $FF;
@output_stream 3 StorageForShortName;
TEXT_TY_Say(right_hand_status_line);
@output_stream -3; scw = HDR_PIXELSTO3-->0 + charw;
x = 1+width-scw;
@set_cursor 1 x; TEXT_TY_Say(right_hand_status_line);
}
! Reselect roman, as Infocom's interpreters go funny if reverse is selected twice.
VM_MainWindow();
ClearParagraphing(8);
EndActivity(CONSTRUCTING_STATUS_LINE_ACT);
@pull say__pc; @pull say__p;
];
#Endif;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Quotation Boxes
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Undo
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VM_Undo result_code;
@restore_undo result_code;
return result_code;
];
[ VM_Save_Undo result_code;
@save_undo result_code;
return result_code;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Quit The Game Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ QUIT_THE_GAME_R;
if (actor ~= player) rfalse;
QUIT_THE_GAME_RM('A');
if (YesOrNo()~=0) quit;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Restart The Game Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ RESTART_THE_GAME_R;
if (actor ~= player) rfalse;
RESTART_THE_GAME_RM('A');
if (YesOrNo()~=0) {
@restart;
RESTART_THE_GAME_RM('B'); new_line;
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Restore The Game Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ RESTORE_THE_GAME_R;
if (actor ~= player) rfalse;
restore Rmaybe;
RESTORE_THE_GAME_RM('A'); new_line;
rtrue;
.RMaybe; RESTORE_THE_GAME_RM('B'); new_line;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Save The Game Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ SAVE_THE_GAME_R flag;
if (actor ~= player) rfalse;
#IFV5;
@save -> flag;
switch (flag) {
0: SAVE_THE_GAME_RM('A'); new_line;
1: SAVE_THE_GAME_RM('B'); new_line;
2: RESTORE_THE_GAME_RM('B'); new_line;
}
#IFNOT;
save Smaybe;
SAVE_THE_GAME_RM('A'); new_line; rtrue;
.SMaybe; SAVE_THE_GAME_RM('B'); new_line;
#ENDIF;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Verify The Story File Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VERIFY_THE_STORY_FILE_R;
if (actor ~= player) rfalse;
@verify ?Vmaybe;
jump Vwrong;
.Vmaybe; VERIFY_THE_STORY_FILE_RM('A'); new_line; rtrue;
.Vwrong;
VERIFY_THE_STORY_FILE_RM('B'); new_line;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Switch Transcript On Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ SWITCH_TRANSCRIPT_ON_R;
if (actor ~= player) rfalse;
transcript_mode = ((0-->8) & 1);
if (transcript_mode) { SWITCH_TRANSCRIPT_ON_RM('A'); new_line; rtrue; }
@output_stream 2;
if (((0-->8) & 1) == 0) { SWITCH_TRANSCRIPT_ON_RM('C'); new_line; rtrue; }
SWITCH_TRANSCRIPT_ON_RM('B'); new_line; VersionSub();
transcript_mode = true;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Switch Transcript Off Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ SWITCH_TRANSCRIPT_OFF_R;
if (actor ~= player) rfalse;
transcript_mode = ((0-->8) & 1);
if (transcript_mode == false) { SWITCH_TRANSCRIPT_OFF_RM('A'); new_line; rtrue; }
SWITCH_TRANSCRIPT_OFF_RM('B'); new_line;
@output_stream -2;
if ((0-->8) & 1) { SWITCH_TRANSCRIPT_ON_RM('C'); new_line; rtrue; }
transcript_mode = false;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Announce Story File Version Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ANNOUNCE_STORY_FILE_VERSION_R ix;
if (actor ~= player) rfalse;
Banner();
print "Identification number: ";
for (ix=6: ix <= UUID_ARRAY->0: ix++) print (char) UUID_ARRAY->ix;
print "^";
ix = 0; ! shut up compiler warning
if (standard_interpreter > 0) {
print "Standard interpreter ",
standard_interpreter/256, ".", standard_interpreter%256,
" (", HDR_TERPNUMBER->0;
#Iftrue (#version_number == 6);
print (char) '.', HDR_TERPVERSION->0;
#Ifnot;
print (char) HDR_TERPVERSION->0;
#Endif;
print ") / ";
} else {
print "Interpreter ", HDR_TERPNUMBER->0, " Version ";
#Iftrue (#version_number == 6);
print HDR_TERPVERSION->0;
#Ifnot;
print (char) HDR_TERPVERSION->0;
#Endif;
print " / ";
}
print "Library serial number ", (string) LibSerial, "^";
#Ifdef LanguageVersion;
print (string) LanguageVersion, "^";
#Endif; ! LanguageVersion
#ifdef ShowExtensionVersions;
ShowExtensionVersions();
#endif;
say__p = 1;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Descend To Specific Action Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ DESCEND_TO_SPECIFIC_ACTION_R;
indirect(#actions_table-->action);
rtrue;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ZMachine.i6t: Veneer
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ OC__Cl obj cla j a n objflag;
@jl obj 1 ?NotObj;
@jg obj max_z_object ?NotObj;
@inc objflag;
@je cla K1_room ?~NotRoom;
@test_attr obj mark_as_room ?rtrue;
@rfalse;
.NotRoom;
@je cla K2_thing ?~NotObj;
@test_attr obj mark_as_thing ?rtrue;
@rfalse;
.NotObj;
@je cla Object Class ?ObjOrClass;
@je cla Routine String ?RoutOrStr;
@jin cla 1 ?~Mistake;
@jz objflag ?rfalse;
@get_prop_addr obj 2 -> a;
@jz a ?rfalse;
@get_prop_len a -> n;
@div n 2 -> n;
.Loop;
@loadw a j -> sp;
@je sp cla ?rtrue;
@inc j;
@jl j n ?Loop;
@rfalse;
.ObjOrClass;
@jz objflag ?rfalse;
@je cla Object ?JustObj;
! So now cla is Class
@jg obj String ?~rtrue;
@jin obj Class ?rtrue;
@rfalse;
.JustObj;
! So now cla is Object
@jg obj String ?~rfalse;
@jin obj Class ?rfalse;
@rtrue;
.RoutOrStr;
@jz objflag ?~rfalse;
@call_2s Z__Region obj -> sp;
@inc sp;
@je sp cla ?rtrue;
@rfalse;
.Mistake;
RT__Err("apply 'ofclass' for", cla, -1);
rfalse;
];
[ Unsigned__Compare x y u v;
@je x y ?rfalse; ! i.e., return 0
@jl x 0 ?XNegative;
! So here x >= 0 and x ~= y
@jl y 0 ?XPosYNeg;
! Here x >=0, y >= 0, x ~= y
@jg x y ?rtrue; ! i.e., return 1
@ret -1;
.XPosYNeg;
! Here x >= 0, y < 0, x ~= y
@ret -1;
.XNegative;
@jl y 0 ?~rtrue; ! if x < 0, y >= 0, return 1
! Here x < 0, y < 0, x ~= y
@jg x y ?rtrue;
@ret -1;
];
[ RT__ChLDW base offset;
@loadw base offset -> sp;
@ret sp;
];
#Endif;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Output.i6t: Compass
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Object Compass "compass" has concealed;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Output.i6t: Language of Play
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Language.i6t: Vocabulary
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant AGAIN1__WD = 'again';
Constant AGAIN2__WD = 'g//';
Constant AGAIN3__WD = 'again';
Constant OOPS1__WD = 'oops';
Constant OOPS2__WD = 'o//';
Constant OOPS3__WD = 'oops';
Constant UNDO1__WD = 'undo';
Constant UNDO2__WD = 'undo';
Constant UNDO3__WD = 'undo';
Constant ALL1__WD = 'all';
Constant ALL2__WD = 'each';
Constant ALL3__WD = 'every';
Constant ALL4__WD = 'everything';
Constant ALL5__WD = 'both';
Constant AND1__WD = 'and';
Constant AND2__WD = 'and';
Constant AND3__WD = 'and';
Constant BUT1__WD = 'but';
Constant BUT2__WD = 'except';
Constant BUT3__WD = 'but';
Constant ME1__WD = 'me';
Constant ME2__WD = 'myself';
Constant ME3__WD = 'self';
Constant OF1__WD = 'of';
Constant OF2__WD = 'of';
Constant OF3__WD = 'of';
Constant OF4__WD = 'of';
Constant OTHER1__WD = 'another';
Constant OTHER2__WD = 'other';
Constant OTHER3__WD = 'other';
Constant THEN1__WD = 'then';
Constant THEN2__WD = 'then';
Constant THEN3__WD = 'then';
Constant NO1__WD = 'n//';
Constant NO2__WD = 'no';
Constant NO3__WD = 'no';
Constant YES1__WD = 'y//';
Constant YES2__WD = 'yes';
Constant YES3__WD = 'yes';
Constant AMUSING__WD = 'amusing';
Constant FULLSCORE1__WD = 'fullscore';
Constant FULLSCORE2__WD = 'full';
Constant QUIT1__WD = 'q//';
Constant QUIT2__WD = 'quit';
Constant RESTART__WD = 'restart';
Constant RESTORE__WD = 'restore';
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Language.i6t: Pronouns
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Array LanguagePronouns table
! word possible GNAs connected
! to follow: to:
! a i
! s p s p
! mfnmfnmfnmfn
'it' $$001000111000 NULL
'him' $$100000000000 NULL
'her' $$010000000000 NULL
'them' $$000111000111 NULL;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Language.i6t: Descriptors
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Array LanguageDescriptors table
! word possible GNAs descriptor connected
! to follow: type: to:
! a i
! s p s p
! mfnmfnmfnmfn
'my' $$111111111111 POSSESS_PK 0
'this' $$111111111111 POSSESS_PK 0
'these' $$000111000111 POSSESS_PK 0
'that' $$111111111111 POSSESS_PK 1
'those' $$000111000111 POSSESS_PK 1
'his' $$111111111111 POSSESS_PK 'him'
'her' $$111111111111 POSSESS_PK 'her'
'their' $$111111111111 POSSESS_PK 'them'
'its' $$111111111111 POSSESS_PK 'it'
'the' $$111111111111 DEFART_PK NULL
'a//' $$111000111000 INDEFART_PK NULL
'an' $$111000111000 INDEFART_PK NULL
'some' $$000111000111 INDEFART_PK NULL
'lit' $$111111111111 light NULL
'lighted' $$111111111111 light NULL
'unlit' $$111111111111 (-light) NULL;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Language.i6t: Numbers
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Array LanguageNumbers table
'one' 1 'two' 2 'three' 3 'four' 4 'five' 5
'six' 6 'seven' 7 'eight' 8 'nine' 9 'ten' 10
'eleven' 11 'twelve' 12 'thirteen' 13 'fourteen' 14 'fifteen' 15
'sixteen' 16 'seventeen' 17 'eighteen' 18 'nineteen' 19 'twenty' 20
'twenty-one' 21 'twenty-two' 22 'twenty-three' 23 'twenty-four' 24
'twenty-five' 25 'twenty-six' 26 'twenty-seven' 27 'twenty-eight' 28
'twenty-nine' 29 'thirty' 30
;
[ LanguageNumber n f;
if (n == 0) { print "zero"; rfalse; }
if (n < 0) { print "minus "; n = -n; }
#Iftrue (WORDSIZE == 4);
if (n >= 1000000000) {
if (f == 1) print ", ";
print (LanguageNumber) n/1000000000, " billion"; n = n%1000000000; f = 1;
}
if (n >= 1000000) {
if (f == 1) print ", ";
print (LanguageNumber) n/1000000, " million"; n = n%1000000; f = 1;
}
#Endif;
if (n >= 1000) {
if (f == 1) print ", ";
print (LanguageNumber) n/1000, " thousand"; n = n%1000; f = 1;
}
if (n >= 100) {
if (f == 1) print ", ";
print (LanguageNumber) n/100, " hundred"; n = n%100; f = 1;
}
if (n == 0) rfalse;
#Ifdef DIALECT_US;
if (f == 1) print " ";
#Ifnot;
if (f == 1) print " and ";
#Endif;
switch (n) {
1: print "one";
2: print "two";
3: print "three";
4: print "four";
5: print "five";
6: print "six";
7: print "seven";
8: print "eight";
9: print "nine";
10: print "ten";
11: print "eleven";
12: print "twelve";
13: print "thirteen";
14: print "fourteen";
15: print "fifteen";
16: print "sixteen";
17: print "seventeen";
18: print "eighteen";
19: print "nineteen";
20 to 99: switch (n/10) {
2: print "twenty";
3: print "thirty";
4: print "forty";
5: print "fifty";
6: print "sixty";
7: print "seventy";
8: print "eighty";
9: print "ninety";
}
if (n%10 ~= 0) print "-", (LanguageNumber) n%10;
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Language.i6t: Time
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ LanguageTimeOfDay hours mins i;
i = hours%12;
if (i == 0) i = 12;
if (i < 10) print " ";
print i, ":", mins/10, mins%10;
if ((hours/12) > 0) print " pm"; else print " am";
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Language.i6t: Directions
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ LanguageDirection d;
print (name) d;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Language.i6t: Translation
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ LanguageToInformese; ];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Language.i6t: Articles
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant LanguageAnimateGender = male;
Constant LanguageInanimateGender = neuter;
Constant LanguageContractionForms = 2; ! English has two:
! 0 = starting with a consonant
! 1 = starting with a vowel
[ LanguageContraction text;
if (text->0 == 'a' or 'e' or 'i' or 'o' or 'u'
or 'A' or 'E' or 'I' or 'O' or 'U') return 1;
return 0;
];
Array LanguageArticles -->
! Contraction form 0: Contraction form 1:
! Cdef Def Indef Cdef Def Indef
"The " "the " "a " "The " "the " "an " ! Articles 0
"The " "the " "some " "The " "the " "some "; ! Articles 1
! a i
! s p s p
! m f n m f n m f n m f n
Array LanguageGNAsToArticles --> 0 0 0 1 1 1 0 0 0 1 1 1;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Language.i6t: Commands
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ LanguageVerb i;
switch (i) {
'i//','inv','inventory':
print "take inventory";
'l//': print "look";
'x//': print "examine";
'z//': print "wait";
default: rfalse;
}
rtrue;
];
[ LanguageVerbLikesAdverb w;
if (w == 'look' or 'go' or 'push' or 'walk')
rtrue;
rfalse;
];
[ LanguageVerbMayBeName w;
if (w == 'long' or 'short' or 'normal' or 'brief' or 'full' or 'verbose')
rtrue;
rfalse;
];
Default LanguageCases 1;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Output.i6t: The Old Library
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Light.i6t: Darkness
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Object thedark "(darkness object)";
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Light.i6t: Light Measurement
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ OffersLight obj j;
while (obj) {
if (obj has light) rtrue;
objectloop (j in obj) if (HasLightSource(j)) rtrue;
if ((obj has container) && (obj hasnt open) && (obj hasnt transparent)) rfalse;
if ((obj provides component_parent) && (obj.component_parent))
obj = obj.component_parent;
else
obj = parent(obj);
}
rfalse;
];
[ HasLightSource i j ad sr po;
if (i == 0) rfalse;
if (i has light) rtrue;
if ((IsSeeThrough(i)) && (~~(HidesLightSource(i))))
objectloop (j in i)
if (HasLightSource(j)) rtrue;
ad = i.&add_to_scope;
if (parent(i) ~= 0 && ad ~= 0) {
if (metaclass(ad-->0) == Routine) {
ats_hls = 0; ats_flag = 1;
sr = scope_reason; po = parser_one;
scope_reason = LOOPOVERSCOPE_REASON; parser_one = 0;
RunRoutines(i, add_to_scope);
scope_reason = sr; parser_one = po;
ats_flag = 0; if (ats_hls == 1) rtrue;
}
else {
for (j=0 : (WORDSIZE*j)<i.#add_to_scope : j++)
if ((ad-->j) && (HasLightSource(ad-->j) == 1)) rtrue;
}
}
if (ComponentHasLight(i)) rtrue;
rfalse;
];
[ ComponentHasLight o obj next_obj;
if (o provides component_child) {
obj = o.component_child;
while (obj) {
next_obj = obj.component_sibling;
if (obj has light) rtrue;
if (HasLightSource(obj)) rtrue;
if ((obj provides component_child) && (ComponentHasLight(obj))) rtrue;
obj = next_obj;
}
}
rfalse;
];
[ HidesLightSource obj;
if (obj == player) rfalse;
if (obj has transparent or supporter) rfalse;
if (obj has animate) rfalse;
if (obj has container) return (obj hasnt open);
return (obj hasnt enterable);
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Light.i6t: Invariant
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Global lightflag = false;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Light.i6t: Adjust Light Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ADJUST_LIGHT_R previous_light_condition;
previous_light_condition = lightflag;
lightflag = OffersLight(parent(player));
if ((previous_light_condition == false) && (lightflag == false)) {
location = thedark;
rfalse;
}
if ((previous_light_condition == false) && (lightflag == true)) {
location = real_location;
CarryOutActivity(PRINTING_NEWS_OF_LIGHT_ACT);
rfalse;
}
if ((previous_light_condition == true) && (lightflag == false)) {
location = thedark;
DivideParagraphPoint();
BeginActivity(PRINTING_NEWS_OF_DARKNESS_ACT);
if (ForActivity(PRINTING_NEWS_OF_DARKNESS_ACT) == false) {
ADJUST_LIGHT_RM('A'); new_line;
}
EndActivity(PRINTING_NEWS_OF_DARKNESS_ACT);
rfalse;
}
if ((previous_light_condition == true) && (lightflag == true)) {
location = real_location;
rfalse;
}
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Light.i6t: Silent Light Consideration
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ SilentlyConsiderLight;
lightflag = OffersLight(parent(player));
if (lightflag) location = real_location; else location = thedark;
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Light.i6t: Translucency
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ IsSeeThrough obj;
if ((obj has supporter)
|| (obj has transparent)
|| (obj has animate)
|| ((obj has container) && (obj has open)))
rtrue;
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Light.i6t: Visibility Parent
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VisibilityParent o;
if (o && (o has container) && (o hasnt open) && (o hasnt transparent)) return nothing;
if (o) o = CoreOfParentOfCoreOf(o);
return o;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Light.i6t: Find Visibility Levels
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ FindVisibilityLevels lc up;
if (location == thedark) {
visibility_ceiling = thedark;
visibility_levels = 0;
} else {
visibility_ceiling = player;
while (true) {
up = VisibilityParent(visibility_ceiling);
if (up == 0) break;
visibility_ceiling = up;
lc++;
}
visibility_levels = lc;
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Light.i6t: Touchability Ceiling
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ TouchabilityCeiling original o p;
o = original;
while (o) {
p = CoreOfParentOfCoreOf(o);
if (p ofclass K1_room) return p;
if (p == nothing) return o;
if ((FollowRulebook(REACHING_OUTSIDE_RB, p)) && (RulebookFailed()))
return p;
o = p;
}
return o;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Light.i6t: Scope Ceiling
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ScopeCeiling pos c;
if (pos == player && location == thedark) return thedark;
c = parent(pos);
if (c == 0) return pos;
while (VisibilityParent(c)) c = VisibilityParent(c);
return c;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Light.i6t: Object Is Untouchable
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ObjectIsUntouchable item silent_flag p save_sp decision moving x;
if (LocationOf(p) ~= real_location) {
for (x = CoreOf(item): x: x = CoreOfParentOfCoreOf(x)) {
if (x ofclass K4_door or K7_backdrop) {
moving = true;
MoveFloatingObjects(LocationOf(p));
break;
}
}
}
untouchable_object = item; untouchable_silence = silent_flag;
touch_persona = p; if (p == actor) touch_persona = 0;
save_sp = say__p; say__p = 0;
@push actor; actor = p;
if (FollowRulebook(ACCESSIBILITY_RB, 0, true)) {
if (RulebookSucceeded()) decision = false;
else decision = true;
} else decision = false;
@pull actor;
if (say__p == false) say__p = save_sp;
if (moving) MoveFloatingObjects();
untouchable_silence = 0;
return decision;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Light.i6t: Access Through Barriers Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ACCESS_THROUGH_BARRIERS_R ancestor i j external p;
p = touch_persona; if (p == 0) p = actor;
ancestor = CommonAncestor(p, untouchable_object);
if ((ancestor == 0) && (LocationOf(untouchable_object) == nothing)
&& ((untouchable_object ofclass K4_door or K7_backdrop) == false)) {
if (touch_persona == 0) {
if ((actor == player) && (untouchable_silence == false)) {
ACCESS_THROUGH_BARRIERS_RM('A', untouchable_object);
new_line;
}
}
RulebookFails();
rtrue;
}
! First, a barrier between the player and the ancestor.
if (CoreOf(p) ~= ancestor) {
i = parent(CoreOf(p)); j = CoreOf(i); external = false;
if (j ~= i) { i = j; external = true; }
while (i~=ancestor && i) {
if ((external == false)
&& (FollowRulebook(REACHING_OUTSIDE_RB, i))
&& (RulebookFailed())) rtrue; ! Barrier
i = parent(CoreOf(i)); external = false;
if (~~(i ofclass K5_container)) {
j = CoreOf(i);
if (j ~= i) { i = j; external = true; }
}
}
}
! Second, a barrier between the item and the ancestor.
if (CoreOf(untouchable_object) ~= ancestor) {
! We can always get to the core of the item.
i = CoreOf(untouchable_object);
! This will be on the inside of its parent, if its parent is a
! container, so there should be no exemption.
i = parent(i); external = false;
while (i~=ancestor && i) {
if ((external == false) &&
(FollowRulebook(REACHING_INSIDE_RB, i)) &&
(RulebookFailed())) rtrue; ! Barrier
i = CoreOf(i);
if (i == ancestor) break;
i = parent(i); external = false;
if (~~(i ofclass K5_container)) {
j = CoreOf(i);
if (j ~= i) { i = j; external = true; }
}
}
}
RulebookSucceeds(); ! No barrier
rtrue;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Light.i6t: Can't Reach Inside Closed Containers Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ CANT_REACH_INSIDE_CLOSED_R;
if (parameter_value has container && parameter_value hasnt open) {
if (touch_persona == 0) {
if ((actor == player) && (untouchable_silence == false)) {
CANT_REACH_INSIDE_CLOSED_RM('A', parameter_value);
new_line;
}
}
RulebookFails(); rtrue;
}
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Light.i6t: Can't Reach Outside Closed Containers Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ CANT_REACH_OUTSIDE_CLOSED_R;
if (parameter_value has container && parameter_value hasnt open) {
if (touch_persona == 0) {
if ((actor == player) && (untouchable_silence == false)) {
CANT_REACH_OUTSIDE_CLOSED_RM('A', parameter_value);
new_line;
}
}
RulebookFails(); rtrue;
}
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Light.i6t: Can't Reach Inside Rooms Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ CANT_REACH_INSIDE_ROOMS_R;
if (parameter_value && parameter_value ofclass K1_room) {
if (touch_persona == 0) {
if ((actor == player) && (untouchable_silence == false)) {
CANT_REACH_INSIDE_ROOMS_RM('A', parameter_value);
new_line;
}
}
RulebookFails(); rtrue;
}
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ListWriter.i6t: Specification
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ListWriter.i6t: Memory
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant REQUISITION_STACK_SIZE = 3*14;
Array requisition_stack --> REQUISITION_STACK_SIZE;
Global requisition_stack_pointer = 0;
[ RequisitionStack len top addr;
top = requisition_stack_pointer + len;
if (top > REQUISITION_STACK_SIZE) return false;
addr = requisition_stack + requisition_stack_pointer*WORDSIZE;
! print "Allocating ", addr, " at pointer ", requisition_stack_pointer, "^";
requisition_stack_pointer = top;
return addr;
];
[ FreeStack addr;
if (addr == 0) return;
requisition_stack_pointer = (addr - requisition_stack)/WORDSIZE;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ListWriter.i6t: WriteListOfMarkedObjects
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Global MarkedObjectArray = 0;
Global MarkedObjectLength = 0;
[ WriteListOfMarkedObjects style
obj common_parent first mixed_parentage length g gc;
gc = -2;
objectloop (obj ofclass Object && obj has workflag2) {
length++;
if (first == nothing) { first = obj; common_parent = parent(obj); }
else { if (parent(obj) ~= common_parent) mixed_parentage = true; }
g = GetGNAOfObject(obj); g = g%3;
if (gc == -2) gc = g;
else if (gc ~= g) gc = -1;
}
if (mixed_parentage) common_parent = nothing;
if (length == 0) {
if (style & ISARE_BIT ~= 0) LIST_WRITER_INTERNAL_RM('W');
else if (style & CFIRSTART_BIT ~= 0) LIST_WRITER_INTERNAL_RM('X');
else LIST_WRITER_INTERNAL_RM('Y');
} else {
@push MarkedObjectArray; @push MarkedObjectLength;
MarkedObjectArray = RequisitionStack(length);
MarkedObjectLength = length;
if (MarkedObjectArray == 0) return RunTimeProblem(RTP_LISTWRITERMEMORY);
if (common_parent) {
ObjectTreeCoalesce(child(common_parent));
length = 0;
objectloop (obj in common_parent) ! object tree order
if (obj has workflag2) MarkedObjectArray-->length++ = obj;
} else {
length = 0;
objectloop (obj ofclass Object) ! object number order
if (obj has workflag2) MarkedObjectArray-->length++ = obj;
}
WriteListFrom(first, style, 0, false, MarkedListIterator);
FreeStack(MarkedObjectArray);
@pull MarkedObjectLength; @pull MarkedObjectArray;
}
prior_named_list = length;
prior_named_list_gender = gc;
return;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ListWriter.i6t: List Number and Gender
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ RegardingMarkedObjects
obj length g gc;
gc = -2;
objectloop (obj ofclass Object && obj has workflag2) {
length++;
g = GetGNAOfObject(obj); g = g%3;
if (gc == -2) {
gc = g;
prior_named_noun = obj;
} else if (gc ~= g) gc = -1;
}
prior_named_list = length;
prior_named_list_gender = gc;
if (length == 0) { prior_named_noun = nothing; prior_named_list_gender = -1; }
return;
];
[ RegardingSingleObject obj;
prior_named_list = 1;
prior_named_list_gender = -1;
prior_named_noun = obj;
];
[ RegardingNumber n;
prior_named_list = n;
prior_named_list_gender = -1;
prior_named_noun = nothing;
];
[ PNToVP gna;
if (prior_named_noun == player) return story_viewpoint;
if (prior_named_noun) gna = GetGNAOfObject(prior_named_noun);
if (((gna%6)/3 == 1) || (prior_named_list >= 2)) return 6;
return 3;
];
[ PrintVerbAsValue vb;
if (vb == 0) print "(no verb)";
else { print "verb "; vb(1); }
];
[ VerbIsMeaningful vb;
if ((vb) && (BlkValueCompare(vb(CV_MEANING), Rel_Record_0) ~= 0)) rtrue;
rfalse;
];
[ VerbIsModal vb;
if ((vb) && (vb(CV_MODAL))) rtrue;
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ListWriter.i6t: List Writer Regard Storage
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Array LWI_Storage --> 1 (-1) nothing;
[ SetLWI a b c;
LWI_Storage-->0 = a;
LWI_Storage-->1 = b;
LWI_Storage-->2 = c;
];
[ RegardingLWI;
prior_named_list = LWI_Storage-->0;
prior_named_list_gender = LWI_Storage-->1;
prior_named_noun = LWI_Storage-->2;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ListWriter.i6t: Response Printing
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ResponseViaActivity R;
@push prior_named_noun; @push prior_named_list; @push prior_named_list_gender;
RegardingSingleObject(nothing);
CarryOutActivity(PRINTING_RESPONSE_ACT, R);
@pull prior_named_list_gender; @pull prior_named_list; @pull prior_named_noun;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ListWriter.i6t: About Iterator Functions
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant SEEK_ITF = 0;
Constant ADVANCE_ITF = 1;
Constant COALESCE_ITF = 2;
Constant START_ITF = 3;
! Constant DBLW; ! Uncomment this to provide debugging information at run-time
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ListWriter.i6t: Marked List Iterator
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ MarkedListIterator obj depth required_lt function i;
if (obj == nothing) return nothing;
if (required_lt == 0) required_lt = EMPTY_TEXT_VALUE;
switch(function) {
START_ITF: return MarkedObjectArray-->0;
COALESCE_ITF: return MarkedListCoalesce();
SEEK_ITF, ADVANCE_ITF:
for (i=0: i<MarkedObjectLength: i++)
if (MarkedObjectArray-->i == obj) {
if (function == ADVANCE_ITF) i++;
for (:i<MarkedObjectLength: i++) {
obj = MarkedObjectArray-->i;
if ((LT_Compare(required_lt, EMPTY_TEXT_VALUE) ~= 0) &&
(LT_Compare(obj.list_together, required_lt) ~= 0)) continue;
if ((c_style & WORKFLAG_BIT) && (depth==0) && (obj hasnt workflag))
continue;
if ((c_style & CONCEAL_BIT) && (ConcealedFromLists(obj))) continue;
return obj;
}
return nothing;
}
}
return nothing;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ListWriter.i6t: Concealment
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ConcealedFromLists obj c;
if ((obj has concealed) || (obj has scenery)) rtrue;
c = parent(obj);
if ((c) && (c ofclass K5_container or K6_supporter) && (TestConcealment(c, obj))) rtrue;
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ListWriter.i6t: Coalesce Marked List
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ MarkedListCoalesce o i lt l swap m;
for (i=0: i<MarkedObjectLength: i++) {
lt = (MarkedObjectArray-->i).list_together;
if (LT_Compare(lt, EMPTY_TEXT_VALUE) ~= 0) {
! Find first object in list after contiguous run with this list_together value:
for (i++: (i<MarkedObjectLength) &&
(LT_Compare((MarkedObjectArray-->i).list_together, lt) == 0): i++) ;
! If the contiguous run extends to end of list, the list is now perfect:
if (i == MarkedObjectLength) return MarkedObjectArray-->0;
! And otherwise we look to see if any future entries belong in the earlier run:
for (l=i+1: l<MarkedObjectLength: l++)
if (LT_Compare((MarkedObjectArray-->l).list_together, lt) == 0) {
! Yes, they do: so we perform a rotation to insert it before element i:
swap = MarkedObjectArray-->l;
for (m=l: m>i: m--) MarkedObjectArray-->m = MarkedObjectArray-->(m-1);
MarkedObjectArray-->i = swap;
! And now the run is longer:
i++;
if (i == MarkedObjectLength) return MarkedObjectArray-->0;
}
i--;
}
}
return MarkedObjectArray-->0;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ListWriter.i6t: Object Tree Iterator
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Global list_filter_routine;
[ ObjectTreeIterator obj depth required_lt function;
if ((obj == nothing) || (parent(obj) == nothing)) return nothing;
if (function == START_ITF) obj = child(parent(obj));
if (function == COALESCE_ITF) return ObjectTreeCoalesce(obj);
if (function == ADVANCE_ITF) obj = sibling(obj);
if (required_lt == 0) required_lt = EMPTY_TEXT_VALUE;
for (:: obj = sibling(obj)) {
if (obj == nothing) return nothing;
!if (function == ADVANCE_ITF) print "Considering ", (the) obj, ": ", (TEXT_TY_Say) obj.list_together, ": ", (TEXT_TY_Say) required_lt, ": ", ": ", (TEXT_TY_Say) lt_value, ": ", LT_Compare(obj.list_together, required_lt), "^";
if ((LT_Compare(required_lt, EMPTY_TEXT_VALUE) ~= 0) &&
(LT_Compare(obj.list_together, required_lt) ~= 0)) continue;
if ((c_style & WORKFLAG_BIT) && (depth==0) && (obj hasnt workflag)) continue;
if (obj hasnt list_filter_permits) continue;
if ((c_style & CONCEAL_BIT) && (ConcealedFromLists(obj))) continue;
return obj;
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ListWriter.i6t: Coalesce Object Tree
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ObjectTreeCoalesce obj memb lt later;
#Ifdef DBLW; print "^^Sorting out: "; DiagnoseSortList(obj); #Endif;
.StartAgain;
for (memb=obj: memb~=nothing: memb=sibling(memb)) {
lt = memb.list_together;
if (LT_Compare(lt, EMPTY_TEXT_VALUE) ~= 0) {
! Find first object in list after contiguous run with this list_together value:
for (memb=sibling(memb):
(memb) && (LT_Compare(memb.list_together, lt) == 0): memb = sibling(memb)) ;
! If the contiguous run extends to end of list, the list is now perfect:
if (memb == 0) return obj;
! And otherwise we look to see if any future entries belong in the earlier run:
for (later=sibling(memb): later: later=sibling(later))
if (LT_Compare(later.list_together, lt) == 0) {
! Yes, they do: so we perform a regrouping of the list and start again:
obj = GroupChildren(parent(obj), lt);
#Ifdef DBLW; print "^^Sorted to: "; DiagnoseSortList(obj); #Endif;
jump StartAgain;
}
}
}
return obj;
];
#Ifdef DBLW;
[ DiagnoseSortList obj memb;
for (memb=child(obj): memb~=nothing: memb=sibling(memb)) print memb, " --> "; new_line;
];
#Endif;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ListWriter.i6t: WriteListFrom
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ WriteListFrom first style depth noactivity iter a ol;
@push c_iterator; @push c_style; @push c_depth; @push c_margin;
if (iter) c_iterator = iter; else c_iterator = ObjectTreeIterator;
c_style = style; c_depth = depth;
c_margin = 0; if (style & EXTRAINDENT_BIT) c_margin = 1;
objectloop (a ofclass Object) {
give a list_filter_permits;
if ((list_filter_routine) && (list_filter_routine(a) == false))
give a ~list_filter_permits;
}
first = c_iterator(first, depth, 0, START_ITF);
if (first == nothing) {
if (style & ISARE_BIT ~= 0) LIST_WRITER_INTERNAL_RM('W');
else LIST_WRITER_INTERNAL_RM('Y');
if (style & NEWLINE_BIT ~= 0) new_line;
} else {
if ((noactivity) || (iter)) {
WriteListR(first, c_depth, true);
say__p = 1;
} else {
objectloop (ol provides list_together)
BlkValueCopy(ol.list_together, EMPTY_TEXT_VALUE);
CarryOutActivity(LISTING_CONTENTS_ACT, parent(first));
}
}
@pull c_margin; @pull c_depth; @pull c_style; @pull c_iterator;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ListWriter.i6t: Standard Contents Listing Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ STANDARD_CONTENTS_LISTING_R;
WriteListFrom(child(parameter_value), c_style, c_depth, true);
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ListWriter.i6t: Partitioning
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
#Ifdef DBLW;
Global DBLW_no_classes; Global DBLW_no_objs;
[ DebugPartition partition_class_sizes partition_classes first depth i k o;
print "[Length of list is ", DBLW_no_objs, " with ", k, " plural.]^";
print "[Partitioned into ", DBLW_no_classes, " equivalence classes.]^";
for (i=1: i<=DBLW_no_classes : i++) {
print "Class ", i, " has size ", partition_class_sizes->i, "^";
}
for (k=0, o=first: k<DBLW_no_objs : k++, o = c_iterator(o, depth, lt_value, ADVANCE_ITF)) {
print "Entry ", k, " has class ", partition_classes->k,
" represented by ", o, " with L=", o.list_together, "^";
}
];
#Endif;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ListWriter.i6t: Partition List
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ PartitionList first no_objs depth partition_classes partition_class_sizes
i k l n m;
for (i=0: i<no_objs: i++) partition_classes->i = 0;
n = 1;
for (i=first, k=0: k<no_objs: i=c_iterator(i, depth, lt_value, ADVANCE_ITF), k++)
if (partition_classes->k == 0) {
partition_classes->k = n; partition_class_sizes->n = 1;
for (l=c_iterator(i, depth, lt_value, ADVANCE_ITF), m=k+1:
(l~=0) && (m<no_objs):
l=c_iterator(l, depth, lt_value, ADVANCE_ITF), m++) {
if ((partition_classes->m == 0) && (ListEqual(i, l))) {
if (partition_class_sizes->n < 255) (partition_class_sizes->n)++;
partition_classes->m = n;
}
}
if (n < 255) n++;
}
n--;
#Ifdef DBLW;
DBLW_no_classes = n; DBLW_no_objs = no_objs;
DebugPartition(partition_class_sizes, partition_classes, first, depth);
#Endif;
return n;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ListWriter.i6t: Equivalence Relation
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ListEqual o1 o2;
if ((o1.plural == 0) || (o2.plural == 0)) rfalse;
if (child(o1) ~= 0 && WillRecurs(o1) ~= 0) rfalse;
if (child(o2) ~= 0 && WillRecurs(o2) ~= 0) rfalse;
if (c_style & (FULLINV_BIT + PARTINV_BIT) ~= 0) {
if ((o1 hasnt worn && o2 has worn) || (o2 hasnt worn && o1 has worn)) rfalse;
if ((o1 hasnt light && o2 has light) || (o2 hasnt light && o1 has light)) rfalse;
if (o1 has container) {
if (o2 hasnt container) rfalse;
if ((o1 has open && o2 hasnt open) || (o2 has open && o1 hasnt open))
rfalse;
}
else if (o2 has container)
rfalse;
}
return Identical(o1, o2);
];
[ WillRecurs o;
if (c_style & ALWAYS_BIT ~= 0) rtrue;
if (c_style & RECURSE_BIT == 0) rfalse;
if ((o has supporter) || ((o has container) && (o has open or transparent))) rtrue;
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ListWriter.i6t: Grouping
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ NumberOfGroupsInList o no_classes depth partition_classes partition_class_sizes
no_groups cl memb k current_lt lt;
current_lt = EMPTY_TEXT_VALUE;
lt = EMPTY_TEXT_VALUE;
no_groups = no_classes;
for (cl=1, memb=o, k=0: cl<=no_classes: cl++) {
! Advance to first member of class number cl
while (partition_classes->k ~= cl) {
k++; memb = c_iterator(memb, depth, lt_value, ADVANCE_ITF);
}
if (memb) { ! In case of accidents, but should always happen
lt = memb.list_together;
if ((LT_Compare(lt, lt_value) ~= 0) &&
(LT_Compare(lt, EMPTY_TEXT_VALUE) ~= 0) &&
(LT_Compare(lt, current_lt) == 0)) {
no_groups--;
}
current_lt = lt;
}
}
#Ifdef DBLW; print "[There are ", no_groups, " groups.]^"; #Endif;
return no_groups;
];
[ LT_Compare lt1 lt2;
if (lt1 == lt2) return 0;
if (lt1 == 0) lt1 = EMPTY_TEXT_VALUE;
if (lt2 == 0) lt2 = EMPTY_TEXT_VALUE;
if (TEXT_TY_IsSubstituted(lt1) == false) {
if (TEXT_TY_IsSubstituted(lt2) == false) return (lt1-->1)-(lt2-->1);
return -1;
}
if (TEXT_TY_IsSubstituted(lt2) == false) {
return -1;
}
return BlkValueCompare(lt1, lt2);
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ListWriter.i6t: Write List Recursively
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ WriteListR o depth from_start
partition_classes partition_class_sizes
cl memb index k2 l m no_classes q groups_to_do current_lt;
if (o == nothing) return; ! An empty list: no output
if (from_start) {
o = c_iterator(o, depth, 0, COALESCE_ITF); ! Coalesce list and choose new start
}
o = c_iterator(o, depth, 0, SEEK_ITF); ! Find first entry in list from o
if (o == nothing) return;
! Count index = length of list
for (memb=o, index=0: memb: memb=c_iterator(memb, depth, lt_value, ADVANCE_ITF)) index++;
if (c_style & ISARE_BIT ~= 0) {
SetLWI(index, -1, o);
LIST_WRITER_INTERNAL_RM('V', o);
if (c_style & NEWLINE_BIT ~= 0) print ":^";
else print (char) ' ';
c_style = c_style - ISARE_BIT;
}
partition_classes = RequisitionStack(index/WORDSIZE + 2);
partition_class_sizes = RequisitionStack(index/WORDSIZE + 2);
if ((partition_classes == 0) || (partition_class_sizes == 0))
return RunTimeProblem(RTP_LISTWRITERMEMORY);
no_classes =
PartitionList(o, index, depth, partition_classes, partition_class_sizes);
groups_to_do =
NumberOfGroupsInList(o, no_classes, depth, partition_classes, partition_class_sizes);
for (cl=1, memb=o, index=0, current_lt=EMPTY_TEXT_VALUE: groups_to_do>0: cl++) {
! Set memb to first object of partition class cl
while (partition_classes->index ~= cl) {
index++; memb=c_iterator(memb, depth, lt_value, ADVANCE_ITF);
if (memb==0) { print "*** Error in list-writer ***^"; return; }
}
#Ifdef DBLW;
! DebugPartition(partition_class_sizes, partition_classes, o, depth);
print "^[Class ", cl, " of ", no_classes, ": first object ", memb,
" (", memb.list_together, "); groups_to_do ", groups_to_do, ",
current_lt=", current_lt, " listing_size=", listing_size,
" lt_value=", lt_value, " memb.list_together=", memb.list_together, "]^";
#Endif;
if ((LT_Compare(memb.list_together, lt_value) == 0) ||
(LT_Compare(memb.list_together, EMPTY_TEXT_VALUE) == 0)) current_lt = EMPTY_TEXT_VALUE;
else {
if (LT_Compare(memb.list_together, current_lt) == 0) continue;
! Otherwise this class begins a new group
@push listing_size;
q = memb; listing_size = 1; l = index; m = cl;
while (m < no_classes &&
(LT_Compare(q.list_together, memb.list_together) == 0)) {
m++;
while (partition_classes->l ~= m) {
l++; q = c_iterator(q, depth, lt_value, ADVANCE_ITF);
}
if (LT_Compare(q.list_together, memb.list_together) == 0)
listing_size++;
}
if (listing_size > 1) {
! The new group contains more than one partition class
WriteMultiClassGroup(cl, memb, depth, partition_class_sizes);
current_lt = memb.list_together;
jump GroupComplete;
}
current_lt = EMPTY_TEXT_VALUE;
@pull listing_size;
}
WriteSingleClassGroup(cl, memb, depth, partition_class_sizes->cl);
.GroupComplete;
groups_to_do--;
if (c_style & ENGLISH_BIT ~= 0) {
if (groups_to_do == 1) {
#ifdef SERIAL_COMMA; if (cl > 1) print ","; #endif;
LIST_WRITER_INTERNAL_RM('C');
}
if (groups_to_do > 1) print ", ";
}
}
FreeStack(partition_class_sizes);
FreeStack(partition_classes);
]; ! end of WriteListR
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ListWriter.i6t: Write Multiple Class Group
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ WriteMultiClassGroup cl memb depth partition_class_sizes pv q k2 l;
! Save the style, because the activity below is allowed to change it
q = c_style;
if (c_style & INDENT_BIT ~= 0) PrintSpaces(2*(depth+c_margin));
BeginActivity(GROUPING_TOGETHER_ACT, memb);
if (ForActivity(GROUPING_TOGETHER_ACT, memb)) {
c_style = c_style &~ NEWLINE_BIT;
} else {
pv = memb.list_together;
if (TEXT_TY_IsSubstituted(pv) == false) {
inventory_stage = 1;
parser_one = memb; parser_two = depth + c_margin;
if ((pv-->1)() == 1) jump Omit__Sublist2;
} else if (pv) {
! Set k2 to the number of objects covered by the group
k2 = 0;
for (l=0 : l<listing_size : l++) k2 = k2 + partition_class_sizes->(l+cl);
EnglishNumber(k2); print " ";
print (TEXT_TY_Say) pv;
if (c_style & ENGLISH_BIT ~= 0) print " (";
if (c_style & INDENT_BIT ~= 0) print ":^";
}
c_margin++;
@push lt_value; @push listing_together; @push listing_size;
lt_value = memb.list_together; listing_together = memb;
#Ifdef DBLW; print "^^DOWN lt_value = ", lt_value, " listing_together = ", memb, "^^";
@push DBLW_no_classes; @push DBLW_no_objs; #Endif;
WriteListR(memb, depth, false);
#Ifdef DBLW; print "^^UP^^"; @pull DBLW_no_objs; @pull DBLW_no_classes; #Endif;
@pull listing_size; @pull listing_together; @pull lt_value;
c_margin--;
pv = memb.list_together;
if (TEXT_TY_IsSubstituted(pv) == false) {
inventory_stage = 2;
parser_one = memb; parser_two = depth+c_margin;
(pv-->1)();
} else if (LT_Compare(pv, EMPTY_TEXT_VALUE) ~= 0) {
if (q & ENGLISH_BIT ~= 0) print ")";
}
.Omit__Sublist2;
}
EndActivity(GROUPING_TOGETHER_ACT, memb);
! If the NEWLINE_BIT has been forced by the activity, act now
! before it vanishes...
if (q & NEWLINE_BIT ~= 0 && c_style & NEWLINE_BIT == 0) new_line;
! ...when the original style is restored again:
c_style = q;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ListWriter.i6t: Write Single Class Group
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ WriteSingleClassGroup cl memb depth size q;
q = c_style;
if (c_style & INDENT_BIT) PrintSpaces(2*(depth+c_margin));
if (size == 1) {
if (c_style & NOARTICLE_BIT ~= 0) print (name) memb;
else {
if (c_style & DEFART_BIT) {
if ((cl == 1) && (c_style & CFIRSTART_BIT)) print (The) memb;
else print (the) memb;
} else {
if ((cl == 1) && (c_style & CFIRSTART_BIT)) print (CIndefArt) memb;
else print (a) memb;
}
}
} else {
if (c_style & DEFART_BIT) {
if ((cl == 1) && (c_style & CFIRSTART_BIT)) PrefaceByArticle(memb, 0, size);
else PrefaceByArticle(memb, 1, size);
}
@push listing_size; listing_size = size;
CarryOutActivity(PRINTING_A_NUMBER_OF_ACT, memb);
@pull listing_size;
}
if ((size > 1) && (memb hasnt pluralname)) {
give memb pluralname;
WriteAfterEntry(memb, depth);
give memb ~pluralname;
} else WriteAfterEntry(memb, depth);
c_style = q;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ListWriter.i6t: Write After Entry
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ WriteAfterEntry o depth
p recurse_flag parenth_flag eldest_child child_count combo;
inventory_stage = 2;
if (c_style & PARTINV_BIT) {
BeginActivity(PRINTING_ROOM_DESC_DETAILS_ACT, o);
if (ForActivity(PRINTING_ROOM_DESC_DETAILS_ACT, o) == false) {
combo = 0;
if (o has light && location hasnt light) combo=combo+1;
if (o has container && o hasnt open) combo=combo+2;
if ((o has container && (o has open || o has transparent))
&& (child(o)==0)) combo=combo+4;
if (combo) LIST_WRITER_INTERNAL_RM('A'); ! space and open bracket
switch (combo) {
1: LIST_WRITER_INTERNAL_RM('D', o);
2: LIST_WRITER_INTERNAL_RM('E', o);
3: LIST_WRITER_INTERNAL_RM('H', o);
4: LIST_WRITER_INTERNAL_RM('F', o);
5: LIST_WRITER_INTERNAL_RM('I', o);
6: LIST_WRITER_INTERNAL_RM('G', o);
7: LIST_WRITER_INTERNAL_RM('J', o);
}
if (combo) LIST_WRITER_INTERNAL_RM('B'); ! close bracket
}
EndActivity(PRINTING_ROOM_DESC_DETAILS_ACT, o);
} ! end of PARTINV_BIT processing
if (c_style & FULLINV_BIT) {
BeginActivity(PRINTING_INVENTORY_DETAILS_ACT, o);
if (ForActivity(PRINTING_INVENTORY_DETAILS_ACT, o) == false) {
if (o has light && o has worn) { LIST_WRITER_INTERNAL_RM('A'); LIST_WRITER_INTERNAL_RM('K', o); parenth_flag = true; }
else {
if (o has light) { LIST_WRITER_INTERNAL_RM('A'); LIST_WRITER_INTERNAL_RM('D', o); parenth_flag = true; }
if (o has worn) { LIST_WRITER_INTERNAL_RM('A'); LIST_WRITER_INTERNAL_RM('L', o); parenth_flag = true; }
}
if (o has container)
if (o has openable) {
if (parenth_flag) {
#Ifdef SERIAL_COMMA; print ","; #Endif;
LIST_WRITER_INTERNAL_RM('C');
} else LIST_WRITER_INTERNAL_RM('A', o);
if (o has open)
if (child(o)) LIST_WRITER_INTERNAL_RM('M', o);
else LIST_WRITER_INTERNAL_RM('N', o);
else
if (o has lockable && o has locked) LIST_WRITER_INTERNAL_RM('P', o);
else LIST_WRITER_INTERNAL_RM('O', o);
parenth_flag = true;
}
else
if (child(o)==0 && o has transparent)
if (parenth_flag) { LIST_WRITER_INTERNAL_RM('C'); LIST_WRITER_INTERNAL_RM('F'); }
else { LIST_WRITER_INTERNAL_RM('A'); LIST_WRITER_INTERNAL_RM('F'); LIST_WRITER_INTERNAL_RM('B'); }
if (parenth_flag) LIST_WRITER_INTERNAL_RM('B');
}
EndActivity(PRINTING_INVENTORY_DETAILS_ACT, o);
} ! end of FULLINV_BIT processing
child_count = 0;
eldest_child = nothing;
objectloop (p in o)
if ((c_style & CONCEAL_BIT == 0) || (ConcealedFromLists(p) == false))
if (p has list_filter_permits) {
child_count++;
if (eldest_child == nothing) eldest_child = p;
}
if (child_count && (c_style & ALWAYS_BIT)) {
if (c_style & ENGLISH_BIT) { print " "; LIST_WRITER_INTERNAL_RM('Q', o); print " "; }
recurse_flag = true;
}
if (child_count && (c_style & RECURSE_BIT)) {
if (o has supporter) {
if (c_style & ENGLISH_BIT) {
if (c_style & TERSE_BIT) {
LIST_WRITER_INTERNAL_RM('A', o);
LIST_WRITER_INTERNAL_RM('R', o);
} else LIST_WRITER_INTERNAL_RM('S', o);
}
recurse_flag = true;
}
if (o has container && (o has open || o has transparent)) {
if (c_style & ENGLISH_BIT) {
if (c_style & TERSE_BIT) {
LIST_WRITER_INTERNAL_RM('A', o);
LIST_WRITER_INTERNAL_RM('T', o);
} else LIST_WRITER_INTERNAL_RM('U', o);
}
recurse_flag = true;
}
}
if (recurse_flag && (c_style & ENGLISH_BIT)) {
SetLWI(child_count, -1, eldest_child);
LIST_WRITER_INTERNAL_RM('V', o); print " ";
}
if (c_style & NEWLINE_BIT) new_line;
if (recurse_flag) {
o = child(o);
@push lt_value; @push listing_together; @push listing_size;
@push c_iterator;
c_iterator = ObjectTreeIterator;
lt_value = EMPTY_TEXT_VALUE; listing_together = 0; listing_size = 0;
WriteListR(o, depth+1, true);
@pull c_iterator;
@pull listing_size; @pull listing_together; @pull lt_value;
if (c_style & TERSE_BIT) LIST_WRITER_INTERNAL_RM('B');
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ListWriter.i6t: Internal Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ LIST_WRITER_INTERNAL_R;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Utilities.i6t: Saying Phrases
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ SayPhraseName closure;
if (closure == 0) print "nothing";
else print (string) closure-->2;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Utilities.i6t: Kinds
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ KindAtomic kind;
if ((kind >= 0) && (kind < BASE_KIND_HWM)) return kind;
return kind-->0;
];
[ KindBaseArity kind;
if ((kind >= 0) && (kind < BASE_KIND_HWM)) return 0;
return kind-->1;
];
[ KindBaseTerm kind n;
if ((kind >= 0) && (kind < BASE_KIND_HWM)) return UNKNOWN_TY;
return kind-->(2+n);
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Utilities.i6t: DigitToValue
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ DigitToValue c n;
n = c-'0';
if ((n<0) || (n>9)) return -1;
return n;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Utilities.i6t: GenerateRandomNumber
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ GenerateRandomNumber n m s;
if (n==m) return n;
if (n>m) { s = n; n = m; m = s; }
n--;
return random(m-n) + n;
];
Constant R_DecimalNumber = GenerateRandomNumber;
Constant R_PrintTimeOfDay = GenerateRandomNumber;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Utilities.i6t: GroupChildren
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ GroupChildren par value;
while (child(par) ~= 0) {
if (LT_Compare(child(par).list_together, value) ~= 0)
move child(par) to out_obj;
else
move child(par) to in_obj;
}
while (child(in_obj) ~= 0) move child(in_obj) to par;
while (child(out_obj) ~= 0) move child(out_obj) to par;
return child(par);
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Utilities.i6t: PrintSpaces
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ PrintSpaces n;
while (n > 0) {
print " ";
n = n - 1;
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Utilities.i6t: RunRoutines
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ RunRoutines obj prop;
if (obj == thedark) obj = real_location;
if ((obj.&prop == 0) && (prop >= INDIV_PROP_START)) rfalse;
return obj.prop();
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Utilities.i6t: SwapWorkflags
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ SwapWorkflags obj lst;
objectloop (obj ofclass Object) {
lst = false;
if (obj has workflag2) lst = true;
give obj ~workflag2;
if (obj has workflag) give obj workflag2;
give obj ~workflag;
if (lst) give obj workflag;
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Utilities.i6t: TestUseOption
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant NO_USE_OPTIONS = 28;
[ TestUseOption
UO ! Implied call parameter
;
if (UO == 1) rtrue;
if (UO == 2) rtrue;
if (UO == 3) rtrue;
if (UO == 4) rtrue;
rfalse;
];
[ PrintUseOption
UO ! Implied call parameter
;
switch(UO) {
0: print "ineffectual option";
1: print "dynamic memory allocation option [8192]";
2: print "maximum text length option [1024]";
3: print "index figure thumbnails option [50]";
4: print "maximum things understood at once option [100]";
5: print "American dialect option";
6: print "serial comma option";
7: print "full-length room descriptions option";
8: print "abbreviated room descriptions option";
9: print "memory economy option";
10: print "authorial modesty option";
11: print "scoring option";
12: print "no scoring option";
13: print "engineering notation option";
14: print "unabbreviated object names option";
15: print "command line echoing option";
16: print "manual pronouns option";
17: print "undo prevention option";
18: print "predictable randomisation option";
19: print "fast route-finding option";
20: print "slow route-finding option";
21: print "numbered rules option";
22: print "telemetry recordings option";
23: print "no deprecated features option";
24: print "gn testing version option";
25: print "VERBOSE room descriptions option";
26: print "BRIEF room descriptions option";
27: print "SUPERBRIEF room descriptions option";
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Utilities.i6t: IntegerDivide
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ IntegerDivide A B;
if (B == 0) { RunTimeProblem(RTP_DIVZERO); rfalse; }
return A/B;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Utilities.i6t: IntegerRemainder
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ IntegerRemainder A B;
if (B == 0) { RunTimeProblem(RTP_DIVZERO); rfalse; }
return A%B;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Utilities.i6t: UnsignedCompare
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ UnsignedCompare x y u v;
#Ifdef TARGET_GLULX;
@jleu x y ?lesseq;
return 1;
.lesseq;
@jeq x y ?equal;
return -1;
.equal;
return 0;
#Ifnot;
if (x == y) return 0;
if (x < 0 && y >= 0) return 1;
if (x >= 0 && y < 0) return -1;
u = x&~WORD_HIGHBIT; v= y&~WORD_HIGHBIT;
if (u > v) return 1;
return -1;
#Endif;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Utilities.i6t: SignedCompare
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ SignedCompare x y;
if (x > y) return 1;
if (x == y) return 0;
return -1;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Utilities.i6t: ZRegion
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ZRegion addr;
switch (metaclass(addr)) {
nothing: return 0;
Object, Class: return 1;
Routine: return 2;
String: return 3;
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Utilities.i6t: Memcpy
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ Memcpy to_addr from_addr size n;
#Ifdef TARGET_ZCODE;
for (n = size/WORDSIZE: (n--) > 0: ) to_addr-->n = from_addr-->n;
for (n = size: ((n--) % WORDSIZE ~= 0): ) to_addr->n = from_addr->n;
#Ifnot; ! TARGET_GLULX
@mcopy size from_addr to_addr;
#Endif; ! TARGET_
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Utilities.i6t: Arrcpy
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ Arrcpy to_array to_entry_size from_array from_entry_size no_entries n val;
if (to_entry_size == from_entry_size)
Memcpy(to_array, from_array, to_entry_size*no_entries);
else if ((to_entry_size == 2) && (from_entry_size == 4)) {
for (n = 0: n<no_entries: n++) {
val = from_array-->n;
to_array->0 = (val/256)%256; to_array->1 = val%256;
to_array = to_array + 2;
}
} else "*** Arrcpy doesn't support this ***";
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Output.i6t: Parser
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Object InformParser "(Inform Parser)" has proper;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Grammar Line Variables
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Global best_etype; ! Preferred error number so far
Global nextbest_etype; ! Preferred one, if ASKSCOPE_PE disallowed
Global parser_inflection; ! A property (usually "name") to find object names in
Array pattern --> 32; ! For the current pattern match
Global pcount; ! and a marker within it
Array pattern2 --> 32; ! And another, which stores the best match
Global pcount2; ! so far
Array line_ttype-->32; ! For storing an analysed grammar line
Array line_tdata-->32;
Array line_token-->32;
Global nsns; ! Number of special_numbers entered so far
Global params_wanted; ! Number of parameters needed (which may change in parsing)
Global inferfrom; ! The point from which the rest of the command must be inferred
Global inferword; ! And the preposition inferred
Global dont_infer; ! Another dull flag
Global cobj_flag = 0;
Global oops_from; ! The "first mistake" word number
Global saved_oops; ! Used in working this out
Array oops_workspace -> 64; ! Used temporarily by "oops" routine
Global held_back_mode; ! Flag: is there some input from last time
Global hb_wn; ! left over? (And a save value for wn.)
! (Used for full stops and "then".)
Global usual_grammar_after; ! Point from which usual grammar is parsed (it may vary from
! the above if user's routines match multi-word verbs)
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Grammar Token Variables
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant PATTERN_NULL = $ffff; ! Entry for a token producing no text
Global found_ttype; ! Used to break up tokens into type
Global found_tdata; ! and data (by AnalyseToken)
Global token_filter; ! For noun filtering by user routines
Global length_of_noun; ! Set by NounDomain to no of words in noun
Global lookahead; ! The token after the one now being matched
Global multi_mode; ! Multiple mode
Global multi_wanted; ! Number of things needed in multitude
Global multi_had; ! Number of things actually found
Global multi_context; ! What token the multi-obj was accepted for
Global indef_mode; ! "Indefinite" mode - ie, "take a brick"
! is in this mode
Global indef_type; ! Bit-map holding types of specification
Global indef_wanted; ! Number of items wanted (INDEF_ALL_WANTED for all)
Constant INDEF_ALL_WANTED = 32767;
Global indef_guess_p; ! Plural-guessing flag
Global indef_owner; ! Object which must hold these items
Global indef_cases; ! Possible gender and numbers of them
Global indef_possambig; ! Has a possibly dangerous assumption
! been made about meaning of a descriptor?
Global indef_nspec_at; ! Word at which a number like "two" was parsed
! (for backtracking)
Global allow_plurals; ! Whether plurals presently allowed or not
Global take_all_rule; ! Slightly different rules apply to "take all" than other uses
! of multiple objects, to make adjudication produce more
! pragmatically useful results
! (Not a flag: possible values 0, 1, 2)
Global dict_flags_of_noun; ! Of the noun currently being parsed
! (a bitmap in #dict_par1 format)
Global pronoun__word; ! Saved value
Global pronoun__obj; ! Saved value
Constant comma_word = 'comma,'; ! An "untypeable word" used to substitute
! for commas in parse buffers
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Match List Variables
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Array match_list --> MATCH_LIST_WORDS; ! An array of matched objects so far
Array match_classes --> MATCH_LIST_WORDS; ! An array of equivalence classes for them
Array match_scores --> MATCH_LIST_WORDS; ! An array of match scores for them
Global number_matched; ! How many items in it? (0 means none)
Global number_of_classes; ! How many equivalence classes?
Global match_length; ! How many words long are these matches?
Global match_from; ! At what word of the input do they begin?
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Words
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
#Ifdef TARGET_ZCODE;
[ WordCount; return parse->1; ];
[ WordAddress wordnum; return buffer + parse->(wordnum*4+1); ];
[ WordLength wordnum; return parse->(wordnum*4); ];
#Ifnot;
[ WordCount; return parse-->0; ];
[ WordAddress wordnum; return buffer + parse-->(wordnum*3); ];
[ WordLength wordnum; return parse-->(wordnum*3-1); ];
#Endif;
[ WordFrom w p i j wc;
#Ifdef TARGET_ZCODE; wc = p->1; i = w*2-1;
#Ifnot; wc = p-->0; i = w*3-2; #Endif;
if ((w < 1) || (w > wc)) return 0;
j = p-->i;
if (j == ',//') j = comma_word;
if (j == './/') j = THEN1__WD;
return j;
];
[ NextWord i j wc;
#Ifdef TARGET_ZCODE; wc = parse->1; i = wn*2-1;
#Ifnot; wc = parse-->0; i = wn*3-2; #Endif;
wn++;
if ((wn < 2) || (wn > wc+1)) return 0;
j = parse-->i;
if (j == ',//') j = comma_word;
if (j == './/') j = THEN1__WD;
return j;
];
[ NextWordStopped wc;
#Ifdef TARGET_ZCODE; wc = parse->1; #Ifnot; wc = parse-->0; #Endif;
if ((wn < 1) || (wn > wc)) { wn++; return -1; }
return NextWord();
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Snippets
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ PrintSnippet snip from to i w1 w2;
w1 = snip/100; w2 = w1 + (snip%100) - 1;
if ((w2<w1) || (w1<1) || (w2>WordCount())) {
if ((w1 == 1) && (w2 == 0)) rfalse;
return RunTimeProblem(RTP_SAYINVALIDSNIPPET, w1, w2);
}
from = WordAddress(w1); to = WordAddress(w2) + WordLength(w2) - 1;
for (i=from: i<=to: i++) print (char) i->0;
];
[ SpliceSnippet snip t i w1 w2 nextw at endsnippet newlen;
w1 = snip/100; w2 = w1 + (snip%100) - 1;
if ((w2<w1) || (w1<1)) {
if ((w1 == 1) && (w2 == 0)) return;
return RunTimeProblem(RTP_SPLICEINVALIDSNIPPET, w1, w2);
}
@push say__p; @push say__pc;
nextw = w2 + 1;
at = WordAddress(w1) - buffer;
if (nextw <= WordCount()) endsnippet = 100*nextw + (WordCount() - nextw + 1);
buffer2-->0 = 120;
newlen = VM_PrintToBuffer(buffer2, 120, SpliceSnippet__TextPrinter, t, endsnippet);
for (i=0: (i<newlen) && (at+i<120): i++) buffer->(at+i) = buffer2->(WORDSIZE+i);
#Ifdef TARGET_ZCODE; buffer->1 = at+i; #ifnot; buffer-->0 = at+i; #endif;
for (:at+i<120:i++) buffer->(at+i) = ' ';
VM_Tokenise(buffer, parse);
players_command = 100 + WordCount();
@pull say__pc; @pull say__p;
];
[ SpliceSnippet__TextPrinter t endsnippet;
TEXT_TY_Say(t);
if (endsnippet) { print " "; PrintSnippet(endsnippet); }
];
[ SnippetIncludes test snippet w1 w2 wlen i j;
w1 = snippet/100; w2 = w1 + (snippet%100) - 1;
if ((w2<w1) || (w1<1)) {
if ((w1 == 1) && (w2 == 0)) rfalse;
return RunTimeProblem(RTP_INCLUDEINVALIDSNIPPET, w1, w2);
}
if (metaclass(test) == Routine) {
wlen = snippet%100;
for (i=w1, j=wlen: j>0: i++, j--) {
if (((test)(i, 0)) ~= GPR_FAIL) return i*100+wn-i;
}
}
rfalse;
];
[ SnippetMatches snippet topic_gpr rv;
wn=1;
if (topic_gpr == 0) rfalse;
if (metaclass(topic_gpr) == Routine) {
rv = (topic_gpr)(snippet/100, snippet%100);
if (rv ~= GPR_FAIL) rtrue;
rfalse;
}
RunTimeProblem(RTP_BADTOPIC);
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Unpacking Grammar Lines
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ UnpackGrammarLine line_address i size;
for (i=0 : i<32 : i++) {
line_token-->i = ENDIT_TOKEN;
line_ttype-->i = ELEMENTARY_TT;
line_tdata-->i = ENDIT_TOKEN;
}
#Ifdef TARGET_ZCODE;
action_to_be = 256*(line_address->0) + line_address->1;
action_reversed = ((action_to_be & $400) ~= 0);
action_to_be = action_to_be & $3ff;
line_address--;
size = 3;
#Ifnot; ! GLULX
@aloads line_address 0 action_to_be;
action_reversed = (((line_address->2) & 1) ~= 0);
line_address = line_address - 2;
size = 5;
#Endif;
params_wanted = 0;
for (i=0 : : i++) {
line_address = line_address + size;
if (line_address->0 == ENDIT_TOKEN) break;
line_token-->i = line_address;
AnalyseToken(line_address);
if (found_ttype ~= PREPOSITION_TT) params_wanted++;
line_ttype-->i = found_ttype;
line_tdata-->i = found_tdata;
}
return line_address + 1;
];
[ AnalyseToken token;
if (token == ENDIT_TOKEN) {
found_ttype = ELEMENTARY_TT;
found_tdata = ENDIT_TOKEN;
return;
}
found_ttype = (token->0) & $$1111;
found_tdata = (token+1)-->0;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Extracting Verb Numbers
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ DictionaryWordToVerbNum dword verbnum;
#Ifdef TARGET_ZCODE;
verbnum = $ff-(dword->#dict_par2);
#Ifnot; ! GLULX
dword = dword + #dict_par2 - 1;
@aloads dword 0 verbnum;
verbnum = $ffff-verbnum;
#Endif;
return verbnum;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Keyboard Primitive
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ KeyboardPrimitive a_buffer a_table;
#Ifdef DEBUG; #Iftrue (0 > 0);
return TestKeyboardPrimitive(a_buffer, a_table);
#Endif; #Endif;
return VM_ReadKeyboard(a_buffer, a_table);
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Reading the Command
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ Keyboard a_buffer a_table nw i w w2 x1 x2;
sline1 = score; sline2 = turns;
while (true) {
! Save the start of the buffer, in case "oops" needs to restore it
for (i=0 : i<64 : i++) oops_workspace->i = a_buffer->i;
! In case of an array entry corruption that shouldn't happen, but would be
! disastrous if it did:
#Ifdef TARGET_ZCODE;
a_buffer->0 = INPUT_BUFFER_LEN;
a_table->0 = 15; ! Allow to split input into this many words
#Endif; ! TARGET_
! Print the prompt, and read in the words and dictionary addresses
PrintPrompt();
DrawStatusLine();
KeyboardPrimitive(a_buffer, a_table);
! Set nw to the number of words
#Ifdef TARGET_ZCODE; nw = a_table->1; #Ifnot; nw = a_table-->0; #Endif;
! If the line was blank, get a fresh line
if (nw == 0) {
@push etype; etype = BLANKLINE_PE;
players_command = 100;
BeginActivity(PRINTING_A_PARSER_ERROR_ACT);
if (ForActivity(PRINTING_A_PARSER_ERROR_ACT) == false) {
PARSER_ERROR_INTERNAL_RM('X', noun); new_line;
}
EndActivity(PRINTING_A_PARSER_ERROR_ACT);
@pull etype;
continue;
}
! Unless the opening word was OOPS, return
! Conveniently, a_table-->1 is the first word on both the Z-machine and Glulx
w = a_table-->1;
if (w == OOPS1__WD or OOPS2__WD or OOPS3__WD) {
if (oops_from == 0) { PARSER_COMMAND_INTERNAL_RM('A'); new_line; continue; }
if (nw == 1) { PARSER_COMMAND_INTERNAL_RM('B'); new_line; continue; }
if (nw > 2) { PARSER_COMMAND_INTERNAL_RM('C'); new_line; continue; }
! So now we know: there was a previous mistake, and the player has
! attempted to correct a single word of it.
for (i=0 : i<INPUT_BUFFER_LEN : i++) buffer2->i = a_buffer->i;
#Ifdef TARGET_ZCODE;
x1 = a_table->9; ! Start of word following "oops"
x2 = a_table->8; ! Length of word following "oops"
#Ifnot; ! TARGET_GLULX
x1 = a_table-->6; ! Start of word following "oops"
x2 = a_table-->5; ! Length of word following "oops"
#Endif; ! TARGET_
! Repair the buffer to the text that was in it before the "oops"
! was typed:
for (i=0 : i<64 : i++) a_buffer->i = oops_workspace->i;
VM_Tokenise(a_buffer,a_table);
! Work out the position in the buffer of the word to be corrected:
#Ifdef TARGET_ZCODE;
w = a_table->(4*oops_from + 1); ! Start of word to go
w2 = a_table->(4*oops_from); ! Length of word to go
#Ifnot; ! TARGET_GLULX
w = a_table-->(3*oops_from); ! Start of word to go
w2 = a_table-->(3*oops_from - 1); ! Length of word to go
#Endif; ! TARGET_
! Write spaces over the word to be corrected:
for (i=0 : i<w2 : i++) a_buffer->(i+w) = ' ';
if (w2 < x2) {
! If the replacement is longer than the original, move up...
for (i=INPUT_BUFFER_LEN-1 : i>=w+x2 : i--)
a_buffer->i = a_buffer->(i-x2+w2);
! ...increasing buffer size accordingly.
#Ifdef TARGET_ZCODE;
a_buffer->1 = (a_buffer->1) + (x2-w2);
#Ifnot; ! TARGET_GLULX
a_buffer-->0 = (a_buffer-->0) + (x2-w2);
#Endif; ! TARGET_
}
! Write the correction in:
for (i=0 : i<x2 : i++) a_buffer->(i+w) = buffer2->(i+x1);
VM_Tokenise(a_buffer, a_table);
#Ifdef TARGET_ZCODE; nw = a_table->1; #Ifnot; nw = a_table-->0; #Endif;
return nw;
}
! Undo handling
if ((w == UNDO1__WD or UNDO2__WD or UNDO3__WD) && (nw==1)) {
Perform_Undo();
continue;
}
i = VM_Save_Undo();
#ifdef PREVENT_UNDO; undo_flag = 0; #endif;
#ifndef PREVENT_UNDO; undo_flag = 2; #endif;
if (i == -1) undo_flag = 0;
if (i == 0) undo_flag = 1;
if (i == 2) {
VM_RestoreWindowColours();
VM_Style(SUBHEADER_VMSTY);
SL_Location(); print "^";
! print (name) location, "^";
VM_Style(NORMAL_VMSTY);
IMMEDIATELY_UNDO_RM('E'); new_line;
continue;
}
return nw;
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Parser Proper
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ Parser__parse
syntax line num_lines line_address i j k token l m inferred_go;
cobj_flag = 0;
parser_results-->ACTION_PRES = 0;
parser_results-->NO_INPS_PRES = 0;
parser_results-->INP1_PRES = 0;
parser_results-->INP2_PRES = 0;
meta = false;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Parser Letter A
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
if (held_back_mode) {
held_back_mode = false; wn = hb_wn;
if (verb_wordnum > 0) i = WordAddress(verb_wordnum); else i = WordAddress(1);
j = WordAddress(wn);
if (i<=j) for (: i<j : i++) i->0 = ' ';
i = NextWord();
if (i == AGAIN1__WD or AGAIN2__WD or AGAIN3__WD) {
! Delete the words "then again" from the again buffer,
! in which we have just realised that it must occur:
! prevents an infinite loop on "i. again"
i = WordAddress(wn-2)-buffer;
if (wn > num_words) j = INPUT_BUFFER_LEN-1;
else j = WordAddress(wn)-buffer;
for (: i<j : i++) buffer3->i = ' ';
}
VM_Tokenise(buffer, parse);
jump ReParse;
}
.ReType;
cobj_flag = 0;
actors_location = ScopeCeiling(player);
BeginActivity(READING_A_COMMAND_ACT); if (ForActivity(READING_A_COMMAND_ACT)==false) {
Keyboard(buffer,parse);
num_words = WordCount(); players_command = 100 + num_words;
} if (EndActivity(READING_A_COMMAND_ACT)) jump ReType;
.ReParse;
parser_inflection = name;
! Initially assume the command is aimed at the player, and the verb
! is the first word
num_words = WordCount(); players_command = 100 + num_words;
wn = 1; inferred_go = false;
#Ifdef LanguageToInformese;
LanguageToInformese();
! Re-tokenise:
VM_Tokenise(buffer,parse);
#Endif; ! LanguageToInformese
num_words = WordCount(); players_command = 100 + num_words;
k=0;
#Ifdef DEBUG;
if (parser_trace >= 2) {
print "[ ";
for (i=0 : i<num_words : i++) {
#Ifdef TARGET_ZCODE;
j = parse-->(i*2 + 1);
#Ifnot; ! TARGET_GLULX
j = parse-->(i*3 + 1);
#Endif; ! TARGET_
k = WordAddress(i+1);
l = WordLength(i+1);
print "~"; for (m=0 : m<l : m++) print (char) k->m; print "~ ";
if (j == 0) print "?";
else {
#Ifdef TARGET_ZCODE;
if (UnsignedCompare(j, HDR_DICTIONARY-->0) >= 0 &&
UnsignedCompare(j, HDR_HIGHMEMORY-->0) < 0)
print (address) j;
else print j;
#Ifnot; ! TARGET_GLULX
if (j->0 == $60) print (address) j;
else print j;
#Endif; ! TARGET_
}
if (i ~= num_words-1) print " / ";
}
print " ]^";
}
#Endif; ! DEBUG
verb_wordnum = 1;
actor = player;
actors_location = ScopeCeiling(player);
usual_grammar_after = 0;
.AlmostReParse;
scope_token = 0;
action_to_be = NULL;
! Begin from what we currently think is the verb word
.BeginCommand;
wn = verb_wordnum;
verb_word = NextWordStopped();
! If there's no input here, we must have something like "person,".
if (verb_word == -1) {
best_etype = STUCK_PE; jump GiveError;
}
if (verb_word == comma_word) {
best_etype = COMMABEGIN_PE; jump GiveError;
}
! Now try for "again" or "g", which are special cases: don't allow "again" if nothing
! has previously been typed; simply copy the previous text across
if (verb_word == AGAIN2__WD or AGAIN3__WD) verb_word = AGAIN1__WD;
if (verb_word == AGAIN1__WD) {
if (actor ~= player) {
best_etype = ANIMAAGAIN_PE;
jump GiveError;
}
#Ifdef TARGET_ZCODE;
if (buffer3->1 == 0) {
PARSER_COMMAND_INTERNAL_RM('D'); new_line;
jump ReType;
}
#Ifnot; ! TARGET_GLULX
if (buffer3-->0 == 0) {
PARSER_COMMAND_INTERNAL_RM('D'); new_line;
jump ReType;
}
#Endif; ! TARGET_
for (i=0 : i<INPUT_BUFFER_LEN : i++) buffer->i = buffer3->i;
VM_Tokenise(buffer,parse);
num_words = WordCount(); players_command = 100 + num_words;
jump ReParse;
}
! Save the present input in case of an "again" next time
if (verb_word ~= AGAIN1__WD)
for (i=0 : i<INPUT_BUFFER_LEN : i++) buffer3->i = buffer->i;
if (usual_grammar_after == 0) {
j = verb_wordnum;
i = RunRoutines(actor, grammar);
#Ifdef DEBUG;
if (parser_trace >= 2 && actor.grammar ~= 0 or NULL)
print " [Grammar property returned ", i, "]^";
#Endif; ! DEBUG
if ((i ~= 0 or 1) && (VM_InvalidDictionaryAddress(i))) {
usual_grammar_after = verb_wordnum; i=-i;
}
if (i == 1) {
parser_results-->ACTION_PRES = action;
parser_results-->NO_INPS_PRES = 0;
parser_results-->INP1_PRES = noun;
parser_results-->INP2_PRES = second;
if (noun) parser_results-->NO_INPS_PRES = 1;
if (second) parser_results-->NO_INPS_PRES = 2;
rtrue;
}
if (i ~= 0) { verb_word = i; wn--; verb_wordnum--; }
else { wn = verb_wordnum; verb_word = NextWord(); }
}
else usual_grammar_after = 0;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Parser Letter B
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
#Ifdef LanguageIsVerb;
if (verb_word == 0) {
i = wn; verb_word = LanguageIsVerb(buffer, parse, verb_wordnum);
wn = i;
}
#Endif; ! LanguageIsVerb
! If the first word is not listed as a verb, it must be a direction
! or the name of someone to talk to
if (verb_word == 0 || ((verb_word->#dict_par1) & 1) == 0) {
! So is the first word an object contained in the special object "compass"
! (i.e., a direction)? This needs use of NounDomain, a routine which
! does the object matching, returning the object number, or 0 if none found,
! or REPARSE_CODE if it has restructured the parse table so the whole parse
! must be begun again...
wn = verb_wordnum; indef_mode = false; token_filter = 0; parameters = 0;
@push actor; @push action; @push action_to_be;
actor = player; meta = false; action = ##Go; action_to_be = ##Go;
l = NounDomain(compass, 0, 0);
@pull action_to_be; @pull action; @pull actor;
if (l == REPARSE_CODE) jump ReParse;
! If it is a direction, send back the results:
! action=GoSub, no of arguments=1, argument 1=the direction.
if ((l~=0) && (l ofclass K3_direction)) {
parser_results-->ACTION_PRES = ##Go;
parser_results-->NO_INPS_PRES = 1;
parser_results-->INP1_PRES = l;
inferred_go = true;
jump LookForMore;
}
} ! end of first-word-not-a-verb
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Parser Letter C
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Only check for a comma (a "someone, do something" command) if we are
! not already in the middle of one. (This simplification stops us from
! worrying about "robot, wizard, you are an idiot", telling the robot to
! tell the wizard that she is an idiot.)
if (actor == player) {
for (j=2 : j<=num_words : j++) {
i=NextWord();
if (i == comma_word) jump Conversation;
}
}
jump NotConversation;
! NextWord nudges the word number wn on by one each time, so we've now
! advanced past a comma. (A comma is a word all on its own in the table.)
.Conversation;
j = wn - 1;
! Use NounDomain (in the context of "animate creature") to see if the
! words make sense as the name of someone held or nearby
wn = 1; lookahead = HELD_TOKEN;
scope_reason = TALKING_REASON;
l = NounDomain(player,actors_location,6);
scope_reason = PARSING_REASON;
if (l == REPARSE_CODE) jump ReParse;
if (l == 0) {
if (verb_word && ((verb_word->#dict_par1) & 1)) jump NotConversation;
best_etype = MISSINGPERSON_PE; jump GiveError;
}
.Conversation2;
! The object addressed must at least be "talkable" if not actually "animate"
! (the distinction allows, for instance, a microphone to be spoken to,
! without the parser thinking that the microphone is human).
if (l hasnt animate && l hasnt talkable) {
best_etype = ANIMALISTEN_PE; noun = l; jump GiveError;
}
! Check that there aren't any mystery words between the end of the person's
! name and the comma (eg, throw out "dwarf sdfgsdgs, go north").
if (wn ~= j) {
if (verb_word && ((verb_word->#dict_par1) & 1)) jump NotConversation;
best_etype = TOTALK_PE; jump GiveError;
}
! The player has now successfully named someone. Adjust "him", "her", "it":
PronounNotice(l);
! Set the global variable "actor", adjust the number of the first word,
! and begin parsing again from there.
verb_wordnum = j + 1;
! Stop things like "me, again":
if (l == player) {
wn = verb_wordnum;
if (NextWordStopped() == AGAIN1__WD or AGAIN2__WD or AGAIN3__WD) {
best_etype = ANIMAAGAIN_PE;
jump GiveError;
}
}
actor = l;
actors_location = ScopeCeiling(l);
#Ifdef DEBUG;
if (parser_trace >= 1)
print "[Actor is ", (the) actor, " in ", (name) actors_location, "]^";
#Endif; ! DEBUG
jump BeginCommand;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Parser Letter D
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
.NotConversation;
if (verb_word == 0 || ((verb_word->#dict_par1) & 1) == 0) {
verb_word = UnknownVerb(verb_word);
if (verb_word ~= 0) jump VerbAccepted;
best_etype = VERB_PE;
jump GiveError;
}
.VerbAccepted;
! We now definitely have a verb, not a direction, whether we got here by the
! "take ..." or "person, take ..." method. Get the meta flag for this verb:
meta = ((verb_word->#dict_par1) & 2)/2;
! You can't order other people to "full score" for you, and so on...
if (meta == 1 && actor ~= player) {
best_etype = VERB_PE;
meta = 0;
jump GiveError;
}
! Now let i be the corresponding verb number...
i = DictionaryWordToVerbNum(verb_word);
! ...then look up the i-th entry in the verb table, whose address is at word
! 7 in the Z-machine (in the header), so as to get the address of the syntax
! table for the given verb...
#Ifdef TARGET_ZCODE;
syntax = (HDR_STATICMEMORY-->0)-->i;
#Ifnot; ! TARGET_GLULX
syntax = (#grammar_table)-->(i+1);
#Endif; ! TARGET_
! ...and then see how many lines (ie, different patterns corresponding to the
! same verb) are stored in the parse table...
num_lines = (syntax->0) - 1;
! ...and now go through them all, one by one.
! To prevent pronoun_word 0 being misunderstood,
pronoun_word = NULL; pronoun_obj = NULL;
#Ifdef DEBUG;
if (parser_trace >= 1)
print "[Parsing for the verb '", (address) verb_word, "' (", num_lines+1, " lines)]^";
#Endif; ! DEBUG
best_etype = STUCK_PE; nextbest_etype = STUCK_PE;
multiflag = false;
! "best_etype" is the current failure-to-match error - it is by default
! the least informative one, "don't understand that sentence".
! "nextbest_etype" remembers the best alternative to having to ask a
! scope token for an error message (i.e., the best not counting ASKSCOPE_PE).
! multiflag is used here to prevent inappropriate MULTI_PE errors
! in addition to its unrelated duties passing information to action routines
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Parser Letter E
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
line_address = syntax + 1;
for (line=0 : line<=num_lines : line++) {
! Unpack the syntax line from Inform format into three arrays; ensure that
! the sequence of tokens ends in an ENDIT_TOKEN.
line_address = UnpackGrammarLine(line_address);
#Ifdef DEBUG;
if (parser_trace >= 1) {
if (parser_trace >= 2) new_line;
print "[line ", line; DebugGrammarLine();
print "]^";
}
#Endif; ! DEBUG
! We aren't in "not holding" or inferring modes, and haven't entered
! any parameters on the line yet, or any special numbers; the multiple
! object is still empty.
inferfrom = 0;
parameters = 0;
nsns = 0; special_word = 0;
multiple_object-->0 = 0;
multi_context = 0;
etype = STUCK_PE;
! Put the word marker back to just after the verb
wn = verb_wordnum+1;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Parser Letter F
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
advance_warning = -1; indef_mode = false;
for (i=0,m=false,pcount=0 : line_token-->pcount ~= ENDIT_TOKEN : pcount++) {
scope_token = 0;
if (line_ttype-->pcount ~= PREPOSITION_TT) i++;
if (line_ttype-->pcount == ELEMENTARY_TT) {
if (line_tdata-->pcount == MULTI_TOKEN) m = true;
if (line_tdata-->pcount == MULTIEXCEPT_TOKEN or MULTIINSIDE_TOKEN && i == 1) {
! First non-preposition is "multiexcept" or
! "multiinside", so look ahead.
#Ifdef DEBUG;
if (parser_trace >= 2) print " [Trying look-ahead]^";
#Endif; ! DEBUG
! We need this to be followed by 1 or more prepositions.
pcount++;
if (line_ttype-->pcount == PREPOSITION_TT) {
! skip ahead to a preposition word in the input
do {
l = NextWord();
} until ((wn > num_words) ||
(l && (l->#dict_par1) & 8 ~= 0));
if (wn > num_words) {
#Ifdef DEBUG;
if (parser_trace >= 2)
print " [Look-ahead aborted: prepositions missing]^";
#Endif;
jump EmptyLine;
}
do {
if (PrepositionChain(l, pcount) ~= -1) {
! advance past the chain
if ((line_token-->pcount)->0 & $20 ~= 0) {
pcount++;
while ((line_token-->pcount ~= ENDIT_TOKEN) &&
((line_token-->pcount)->0 & $10 ~= 0))
pcount++;
} else {
pcount++;
}
} else {
! try to find another preposition word
do {
l = NextWord();
} until ((wn >= num_words) ||
(l && (l->#dict_par1) & 8 ~= 0));
if (l && (l->#dict_par1) & 8) continue;
! lookahead failed
#Ifdef DEBUG;
if (parser_trace >= 2)
print " [Look-ahead aborted: prepositions don't match]^";
#endif;
jump LineFailed;
}
if (wn <= num_words) l = NextWord();
} until (line_ttype-->pcount ~= PREPOSITION_TT);
.EmptyLine;
! put back the non-preposition we just read
wn--;
if ((line_ttype-->pcount == ELEMENTARY_TT) &&
(line_tdata-->pcount == NOUN_TOKEN)) {
l = Descriptors(); ! skip past THE etc
if (l~=0) etype=l; ! don't allow multiple objects
k = parser_results-->INP1_PRES; @push k; @push parameters;
parameters = 1; parser_results-->INP1_PRES = 0;
l = NounDomain(actors_location, actor, NOUN_TOKEN, true);
@pull parameters; @pull k; parser_results-->INP1_PRES = k;
#Ifdef DEBUG;
if (parser_trace >= 2) {
print " [Advanced to ~noun~ token: ";
if (l == REPARSE_CODE) print "re-parse request]^";
else {
if (l == 1) print "but multiple found]^";
if (l == 0) print "error ", etype, "]^";
if (l >= 2) print (the) l, "]^";
}
}
#Endif; ! DEBUG
if (l == REPARSE_CODE) jump ReParse;
if (l >= 2) advance_warning = l;
}
}
break;
}
}
}
! Slightly different line-parsing rules will apply to "take multi", to
! prevent "take all" behaving correctly but misleadingly when there's
! nothing to take.
take_all_rule = 0;
if (m && params_wanted == 1 && action_to_be == ##Take)
take_all_rule = 1;
! And now start again, properly, forearmed or not as the case may be.
! As a precaution, we clear all the variables again (they may have been
! disturbed by the call to NounDomain, which may have called outside
! code, which may have done anything!).
inferfrom = 0;
parameters = 0;
nsns = 0; special_word = 0;
multiple_object-->0 = 0;
etype = STUCK_PE;
wn = verb_wordnum+1;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Parser Letter G
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
m = true;
for (pcount=1 : : pcount++)
if (line_token-->(pcount-1) == ENDIT_TOKEN) {
if (pcount >= 2) {
while ((((line_token-->(pcount-2))->0) & $10) ~= 0) pcount--;
AnalyseToken(line_token-->(pcount-2));
if (found_ttype == PREPOSITION_TT) {
l = -1;
while (true) {
m = NextWordStopped();
if (m == -1) break;
l = m;
}
if (PrepositionChain(l, pcount-2) == -1) {
m = false;
#Ifdef DEBUG;
if (parser_trace >= 2)
print "[line rejected for not ending with correct preposition]^";
#Endif; ! DEBUG
} else m = true;
}
}
break;
}
wn = verb_wordnum+1;
if (m) for (pcount=1 : : pcount++) {
pattern-->pcount = PATTERN_NULL; scope_token = 0;
token = line_token-->(pcount-1);
lookahead = line_token-->pcount;
#Ifdef DEBUG;
if (parser_trace >= 2)
print " [line ", line, " token ", pcount, " word ", wn, " : ", (DebugToken) token,
"]^";
#Endif; ! DEBUG
if (token ~= ENDIT_TOKEN) {
scope_reason = PARSING_REASON;
AnalyseToken(token);
l = ParseToken(found_ttype, found_tdata, pcount-1, token);
while ((l >= GPR_NOUN) && (l < -1)) l = ParseToken(ELEMENTARY_TT, l + 256);
scope_reason = PARSING_REASON;
if (l == GPR_PREPOSITION) {
if (found_ttype~=PREPOSITION_TT && (found_ttype~=ELEMENTARY_TT ||
found_tdata~=TOPIC_TOKEN)) params_wanted--;
l = true;
}
else
if (l < 0) l = false;
else
if (l ~= GPR_REPARSE) {
if (l == GPR_NUMBER) {
if (nsns == 0) special_number1 = parsed_number;
else special_number2 = parsed_number;
nsns++; l = 1;
}
if (l == GPR_MULTIPLE) l = 0;
parser_results-->(parameters+INP1_PRES) = l;
parameters++;
pattern-->pcount = l;
l = true;
}
#Ifdef DEBUG;
if (parser_trace >= 3) {
print " [token resulted in ";
if (l == REPARSE_CODE) print "re-parse request]^";
if (l == 0) print "failure with error type ", etype, "]^";
if (l == 1) print "success]^";
}
#Endif; ! DEBUG
if (l == REPARSE_CODE) jump ReParse;
if (l == false) break;
}
else {
! If the player has entered enough already but there's still
! text to wade through: store the pattern away so as to be able to produce
! a decent error message if this turns out to be the best we ever manage,
! and in the mean time give up on this line
! However, if the superfluous text begins with a comma or "then" then
! take that to be the start of another instruction
if (wn <= num_words) {
l = NextWord();
if (l == THEN1__WD or THEN2__WD or THEN3__WD or comma_word) {
held_back_mode = true; hb_wn = wn-1;
} else {
for (m=0 : m<32 : m++) pattern2-->m = pattern-->m;
pcount2 = pcount;
etype = UPTO_PE;
break;
}
}
! Now, we may need to revise the multiple object because of the single one
! we now know (but didn't when the list was drawn up).
if (parameters >= 1) {
if (parser_results-->INP1_PRES == 0) {
l = ReviseMulti(parser_results-->INP2_PRES);
if (l ~= 0) { etype = l; parser_results-->ACTION_PRES = action_to_be; break; }
}
}
if (parameters >= 2) {
if (parser_results-->INP2_PRES == 0) {
l = ReviseMulti(parser_results-->INP1_PRES);
if (l ~= 0) { etype = l; break; }
} else {
k = parser_results-->INP1_PRES; l = parser_results-->INP2_PRES;
if (k && l) {
if ((multi_context==MULTIEXCEPT_TOKEN && k == l) ||
((multi_context==MULTIINSIDE_TOKEN && k notin l && l notin k))) {
best_etype = NOTHING_PE;
parser_results-->ACTION_PRES = action_to_be; jump GiveError;
}
}
}
}
! To trap the case of "take all" inferring only "yourself" when absolutely
! nothing else is in the vicinity...
if (take_all_rule == 2 && parser_results-->INP1_PRES == actor) {
best_etype = NOTHING_PE;
jump GiveError;
}
#Ifdef DEBUG;
if (parser_trace >= 1) print "[Line successfully parsed]^";
#Endif; ! DEBUG
! The line has successfully matched the text. Declare the input error-free...
oops_from = 0;
! ...explain any inferences made (using the pattern)...
if (inferfrom ~= 0) {
PrintInferredCommand(inferfrom);
ClearParagraphing(20);
}
! ...copy the action number, and the number of parameters...
parser_results-->ACTION_PRES = action_to_be;
parser_results-->NO_INPS_PRES = parameters;
! ...reverse first and second parameters if need be...
if (action_reversed && parameters == 2) {
i = parser_results-->INP1_PRES;
parser_results-->INP1_PRES = parser_results-->INP2_PRES;
parser_results-->INP2_PRES = i;
if (nsns == 2) {
i = special_number1; special_number1 = special_number2;
special_number2 = i;
}
}
! ...and to reset "it"-style objects to the first of these parameters, if
! there is one (and it really is an object)...
if (parameters > 0 && parser_results-->INP1_PRES >= 2)
PronounNotice(parser_results-->INP1_PRES);
! ...and return from the parser altogether, having successfully matched
! a line.
if (held_back_mode) {
wn=hb_wn;
jump LookForMore;
}
rtrue;
} ! end of if(token ~= ENDIT_TOKEN) else
} ! end of for(pcount++)
.LineFailed;
! The line has failed to match.
! We continue the outer "for" loop, trying the next line in the grammar.
if (etype > best_etype) best_etype = etype;
if (etype ~= ASKSCOPE_PE && etype > nextbest_etype) nextbest_etype = etype;
! ...unless the line was something like "take all" which failed because
! nothing matched the "all", in which case we stop and give an error now.
if (take_all_rule == 2 && etype==NOTHING_PE) break;
} ! end of for(line++)
! The grammar is exhausted: every line has failed to match.
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Parser Letter H
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
.GiveError;
etype = best_etype;
if (actor ~= player) {
if (usual_grammar_after ~= 0) {
verb_wordnum = usual_grammar_after;
jump AlmostReParse;
}
wn = verb_wordnum;
special_word = NextWord();
if (special_word == comma_word) {
special_word = NextWord();
verb_wordnum++;
}
parser_results-->ACTION_PRES = ##Answer;
parser_results-->NO_INPS_PRES = 2;
parser_results-->INP1_PRES = actor;
parser_results-->INP2_PRES = 1; special_number1 = special_word;
actor = player;
consult_from = verb_wordnum; consult_words = num_words-consult_from+1;
rtrue;
}
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Parser Letter I
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! If the player was the actor (eg, in "take dfghh") the error must be printed,
! and fresh input called for. In three cases the oops word must be jiggled.
if ((etype ofclass Routine) || (etype ofclass String)) {
if (ParserError(etype) ~= 0) jump ReType;
} else {
if (verb_wordnum == 0 && etype == CANTSEE_PE) etype = VERB_PE;
players_command = 100 + WordCount(); ! The snippet variable "player's command"
BeginActivity(PRINTING_A_PARSER_ERROR_ACT);
if (ForActivity(PRINTING_A_PARSER_ERROR_ACT)) jump SkipParserError;
}
pronoun_word = pronoun__word; pronoun_obj = pronoun__obj;
if (etype == STUCK_PE) { PARSER_ERROR_INTERNAL_RM('A'); new_line; oops_from = 1; }
if (etype == UPTO_PE) {
if (inferred_go) PARSER_ERROR_INTERNAL_RM('C');
else PARSER_ERROR_INTERNAL_RM('B');
for (m=0 : m<32 : m++) pattern-->m = pattern2-->m;
pcount = pcount2; PrintCommand(0);
print ".^";
}
if (etype == NUMBER_PE) { PARSER_ERROR_INTERNAL_RM('D'); new_line; }
if (etype == CANTSEE_PE) { PARSER_ERROR_INTERNAL_RM('E'); new_line; oops_from=saved_oops; }
if (etype == TOOLIT_PE) { PARSER_ERROR_INTERNAL_RM('F'); new_line; }
if (etype == NOTHELD_PE) { PARSER_ERROR_INTERNAL_RM('G'); new_line; oops_from=saved_oops; }
if (etype == MULTI_PE) { PARSER_ERROR_INTERNAL_RM('H'); new_line; }
if (etype == MMULTI_PE) { PARSER_ERROR_INTERNAL_RM('I'); new_line; }
if (etype == VAGUE_PE) { PARSER_ERROR_INTERNAL_RM('J'); new_line; }
if (etype == ITGONE_PE) {
if (pronoun_obj == NULL) { PARSER_ERROR_INTERNAL_RM('J'); new_line; }
else { PARSER_ERROR_INTERNAL_RM('K', noun); new_line; }
}
if (etype == EXCEPT_PE) { PARSER_ERROR_INTERNAL_RM('L'); new_line; }
if (etype == ANIMA_PE) { PARSER_ERROR_INTERNAL_RM('M'); new_line; }
if (etype == VERB_PE) { PARSER_ERROR_INTERNAL_RM('N'); new_line; }
if (etype == SCENERY_PE) { PARSER_ERROR_INTERNAL_RM('O'); new_line; }
if (etype == JUNKAFTER_PE) { PARSER_ERROR_INTERNAL_RM('P'); new_line; }
if (etype == TOOFEW_PE) { PARSER_ERROR_INTERNAL_RM('Q', multi_had); new_line; }
if (etype == NOTHING_PE) {
if (parser_results-->ACTION_PRES == ##Remove &&
parser_results-->INP2_PRES ofclass Object) {
noun = parser_results-->INP2_PRES; ! ensure valid for messages
if (noun has animate) { PARSER_N_ERROR_INTERNAL_RM('C', noun); new_line; }
else if (noun hasnt container or supporter) { PARSER_N_ERROR_INTERNAL_RM('D', noun); new_line; }
else if (noun has container && noun hasnt open) { PARSER_N_ERROR_INTERNAL_RM('E', noun); new_line; }
else if (children(noun)==0) { PARSER_N_ERROR_INTERNAL_RM('F', noun); new_line; }
else parser_results-->ACTION_PRES = 0;
}
if (parser_results-->ACTION_PRES ~= ##Remove) {
if (multi_wanted==100) { PARSER_N_ERROR_INTERNAL_RM('A'); new_line; }
else { PARSER_N_ERROR_INTERNAL_RM('B'); new_line; }
}
}
if (etype == NOTINCONTEXT_PE) { PARSER_ERROR_INTERNAL_RM('R'); new_line; }
if (etype == ANIMAAGAIN_PE) { PARSER_ERROR_INTERNAL_RM('S'); new_line; }
if (etype == COMMABEGIN_PE) { PARSER_ERROR_INTERNAL_RM('T'); new_line; }
if (etype == MISSINGPERSON_PE) { PARSER_ERROR_INTERNAL_RM('U'); new_line; }
if (etype == ANIMALISTEN_PE) { PARSER_ERROR_INTERNAL_RM('V', noun); new_line; }
if (etype == TOTALK_PE) { PARSER_ERROR_INTERNAL_RM('W'); new_line; }
if (etype == ASKSCOPE_PE) {
scope_stage = 3;
if (indirect(scope_error) == -1) {
best_etype = nextbest_etype;
if (~~((etype ofclass Routine) || (etype ofclass String)))
EndActivity(PRINTING_A_PARSER_ERROR_ACT);
jump GiveError;
}
}
.SkipParserError;
if ((etype ofclass Routine) || (etype ofclass String)) jump ReType;
say__p = 1;
EndActivity(PRINTING_A_PARSER_ERROR_ACT);
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Parser Letter J
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! And go (almost) right back to square one...
jump ReType;
! ...being careful not to go all the way back, to avoid infinite repetition
! of a deferred command causing an error.
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Parser Letter K
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! At this point, the return value is all prepared, and we are only looking
! to see if there is a "then" followed by subsequent instruction(s).
.LookForMore;
if (wn > num_words) rtrue;
i = NextWord();
if (i == THEN1__WD or THEN2__WD or THEN3__WD or comma_word) {
if (wn > num_words) {
held_back_mode = false;
return;
}
hb_wn = wn;
held_back_mode = true;
return;
}
best_etype = UPTO_PE;
jump GiveError;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: End of Parser Proper
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
]; ! end of Parser__parse
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Internal Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ PARSER_ERROR_INTERNAL_R; ];
[ PARSER_N_ERROR_INTERNAL_R; ];
[ PARSER_COMMAND_INTERNAL_R; ];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Parse Token
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ParseTokenStopped x y;
if (wn>WordCount()) return GPR_FAIL;
return ParseToken(x,y);
];
Global parsetoken_nesting = 0;
[ ParseToken given_ttype given_tdata token_n token i t rv;
if (parsetoken_nesting > 0) {
! save match globals
@push match_from; @push token_filter; @push match_length;
@push number_of_classes; @push oops_from;
for (i=0: i<number_matched: i++) {
t = match_list-->i; @push t;
t = match_classes-->i; @push t;
t = match_scores-->i; @push t;
}
@push number_matched;
}
parsetoken_nesting++;
rv = ParseToken__(given_ttype, given_tdata, token_n, token);
parsetoken_nesting--;
if (parsetoken_nesting > 0) {
! restore match globals
@pull number_matched;
for (i=number_matched-1: i>=0: i--) {
@pull t; match_scores-->i = t;
@pull t; match_classes-->i = t;
@pull t; match_list-->i = t;
}
@pull oops_from; @pull number_of_classes;
@pull match_length; @pull token_filter; @pull match_from;
}
return rv;
];
[ ParseToken__ given_ttype given_tdata token_n token
l o i j k and_parity single_object desc_wn many_flag
token_allows_multiple prev_indef_wanted;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Parse Token Letter A
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
token_filter = 0;
parser_inflection = name;
switch (given_ttype) {
ELEMENTARY_TT:
switch (given_tdata) {
SPECIAL_TOKEN:
l = TryNumber(wn);
special_word = NextWord();
#Ifdef DEBUG;
if (l ~= -1000)
if (parser_trace >= 3) print " [Read special as the number ", l, "]^";
#Endif; ! DEBUG
if (l == -1000) {
#Ifdef DEBUG;
if (parser_trace >= 3) print " [Read special word at word number ", wn, "]^";
#Endif; ! DEBUG
l = special_word;
}
parsed_number = l;
return GPR_NUMBER;
NUMBER_TOKEN:
l=TryNumber(wn++);
if (l == -1000) {
etype = NUMBER_PE;
return GPR_FAIL;
}
#Ifdef DEBUG;
if (parser_trace>=3) print " [Read number as ", l, "]^";
#Endif; ! DEBUG
parsed_number = l;
return GPR_NUMBER;
CREATURE_TOKEN:
if (action_to_be == ##Answer or ##Ask or ##AskFor or ##Tell)
scope_reason = TALKING_REASON;
TOPIC_TOKEN:
consult_from = wn;
if ((line_ttype-->(token_n+1) ~= PREPOSITION_TT) &&
(line_token-->(token_n+1) ~= ENDIT_TOKEN)) {
RunTimeProblem(RTP_TEXTTOKENTOOHARD);
return GPR_PREPOSITION;
}
do o = NextWordStopped();
until (o == -1 || PrepositionChain(o, token_n+1) ~= -1);
wn--;
consult_words = wn-consult_from;
if (consult_words == 0) return GPR_FAIL;
if (action_to_be == ##Ask or ##Answer or ##Tell) {
o = wn; wn = consult_from; parsed_number = NextWord();
wn = o; return 1;
}
if (o==-1 && (line_ttype-->(token_n+1) == PREPOSITION_TT))
return GPR_FAIL; ! don't infer if required preposition is absent
return GPR_PREPOSITION;
}
PREPOSITION_TT:
! Is it an unnecessary alternative preposition, when a previous choice
! has already been matched?
if ((token->0) & $10) return GPR_PREPOSITION;
! If we've run out of the player's input, but still have parameters to
! specify, we go into "infer" mode, remembering where we are and the
! preposition we are inferring...
if (wn > num_words) {
if (inferfrom==0 && parameters<params_wanted) {
inferfrom = pcount; inferword = token;
pattern-->pcount = REPARSE_CODE + VM_DictionaryAddressToNumber(given_tdata);
}
! If we are not inferring, then the line is wrong...
if (inferfrom == 0) return -1;
! If not, then the line is right but we mark in the preposition...
pattern-->pcount = REPARSE_CODE + VM_DictionaryAddressToNumber(given_tdata);
return GPR_PREPOSITION;
}
o = NextWord();
pattern-->pcount = REPARSE_CODE + VM_DictionaryAddressToNumber(o);
! Whereas, if the player has typed something here, see if it is the
! required preposition... if it's wrong, the line must be wrong,
! but if it's right, the token is passed (jump to finish this token).
if (o == given_tdata) return GPR_PREPOSITION;
if (PrepositionChain(o, token_n) ~= -1) return GPR_PREPOSITION;
return -1;
GPR_TT:
l = indirect(given_tdata);
#Ifdef DEBUG;
if (parser_trace >= 3) print " [Outside parsing routine returned ", l, "]^";
#Endif; ! DEBUG
return l;
SCOPE_TT:
scope_token = given_tdata;
scope_stage = 1;
#Ifdef DEBUG;
if (parser_trace >= 3) print " [Scope routine called at stage 1]^";
#Endif; ! DEBUG
l = indirect(scope_token);
#Ifdef DEBUG;
if (parser_trace >= 3) print " [Scope routine returned multiple-flag of ", l, "]^";
#Endif; ! DEBUG
if (l == 1) given_tdata = MULTI_TOKEN; else given_tdata = NOUN_TOKEN;
ATTR_FILTER_TT:
token_filter = 1 + given_tdata;
given_tdata = NOUN_TOKEN;
ROUTINE_FILTER_TT:
token_filter = given_tdata;
given_tdata = NOUN_TOKEN;
} ! end of switch(given_ttype)
token = given_tdata;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Parse Token Letter B
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! There are now three possible ways we can be here:
! parsing an elementary token other than "special" or "number";
! parsing a scope token;
! parsing a noun-filter token (either by routine or attribute).
!
! In each case, token holds the type of elementary parse to
! perform in matching one or more objects, and
! token_filter is 0 (default), an attribute + 1 for an attribute filter
! or a routine address for a routine filter.
token_allows_multiple = false;
if (token == MULTI_TOKEN or MULTIHELD_TOKEN or MULTIEXCEPT_TOKEN or MULTIINSIDE_TOKEN)
token_allows_multiple = true;
many_flag = false; and_parity = true; dont_infer = false;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Parse Token Letter C
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! We expect to find a list of objects next in what the player's typed.
.ObjectList;
#Ifdef DEBUG;
if (parser_trace >= 3) print " [Object list from word ", wn, "]^";
#Endif; ! DEBUG
! Take an advance look at the next word: if it's "it" or "them", and these
! are unset, set the appropriate error number and give up on the line
! (if not, these are still parsed in the usual way - it is not assumed
! that they still refer to something in scope)
o = NextWord(); wn--;
pronoun_word = NULL; pronoun_obj = NULL;
l = PronounValue(o);
if (l ~= 0) {
pronoun_word = o; pronoun_obj = l;
if (l == NULL) {
! Don't assume this is a use of an unset pronoun until the
! descriptors have been checked, because it might be an
! article (or some such) instead
for (l=1 : l<=LanguageDescriptors-->0 : l=l+4)
if (o == LanguageDescriptors-->l) jump AssumeDescriptor;
pronoun__word = pronoun_word; pronoun__obj = pronoun_obj;
etype = VAGUE_PE;
if (parser_trace >= 3) print " [Stop: unset pronoun]^";
return GPR_FAIL;
}
}
.AssumeDescriptor;
if (o == ME1__WD or ME2__WD or ME3__WD) { pronoun_word = o; pronoun_obj = player; }
allow_plurals = true; desc_wn = wn;
.TryAgain;
! First, we parse any descriptive words (like "the", "five" or "every"):
l = Descriptors(token_allows_multiple);
if (l ~= 0) { etype = l; return 0; }
.TryAgain2;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Parse Token Letter D
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! This is an actual specified object, and is therefore where a typing error
! is most likely to occur, so we set:
oops_from = wn;
! So, two cases. Case 1: token not equal to "held" (so, no implicit takes)
! but we may well be dealing with multiple objects
! In either case below we use NounDomain, giving it the token number as
! context, and two places to look: among the actor's possessions, and in the
! present location. (Note that the order depends on which is likeliest.)
if (token ~= HELD_TOKEN) {
i = multiple_object-->0;
#Ifdef DEBUG;
if (parser_trace >= 3) print " [Calling NounDomain on location and actor]^";
#Endif; ! DEBUG
l = NounDomain(actors_location, actor, token);
if (l == REPARSE_CODE) return l; ! Reparse after Q&A
if (indef_wanted == INDEF_ALL_WANTED && l == 0 && number_matched == 0)
l = 1; ! ReviseMulti if TAKE ALL FROM empty container
if (token_allows_multiple && ~~multiflag) {
if (best_etype==MULTI_PE) best_etype=STUCK_PE;
multiflag = true;
}
if (l == 0) {
if (indef_possambig) {
ResetDescriptors();
wn = desc_wn;
jump TryAgain2;
}
if (etype == MULTI_PE && multiflag) etype = STUCK_PE;
etype=CantSee();
jump FailToken;
} ! Choose best error
#Ifdef DEBUG;
if (parser_trace >= 3) {
if (l > 1) print " [ND returned ", (the) l, "]^";
else {
print " [ND appended to the multiple object list:^";
k = multiple_object-->0;
for (j=i+1 : j<=k : j++)
print " Entry ", j, ": ", (The) multiple_object-->j,
" (", multiple_object-->j, ")^";
print " List now has size ", k, "]^";
}
}
#Endif; ! DEBUG
if (l == 1) {
if (~~many_flag) many_flag = true;
else { ! Merge with earlier ones
k = multiple_object-->0; ! (with either parity)
multiple_object-->0 = i;
for (j=i+1 : j<=k : j++) {
if (and_parity) MultiAdd(multiple_object-->j);
else MultiSub(multiple_object-->j);
}
#Ifdef DEBUG;
if (parser_trace >= 3)
print " [Merging ", k-i, " new objects to the ", i, " old ones]^";
#Endif; ! DEBUG
}
}
else {
! A single object was indeed found
if (match_length == 0 && indef_possambig) {
! So the answer had to be inferred from no textual data,
! and we know that there was an ambiguity in the descriptor
! stage (such as a word which could be a pronoun being
! parsed as an article or possessive). It's worth having
! another go.
ResetDescriptors();
wn = desc_wn;
jump TryAgain2;
}
if ((token == CREATURE_TOKEN) && (CreatureTest(l) == 0)) {
etype = ANIMA_PE;
jump FailToken;
} ! Animation is required
if (~~many_flag) single_object = l;
else {
if (and_parity) MultiAdd(l); else MultiSub(l);
#Ifdef DEBUG;
if (parser_trace >= 3) print " [Combining ", (the) l, " with list]^";
#Endif; ! DEBUG
}
}
}
else {
! Case 2: token is "held" (which fortunately can't take multiple objects)
! and may generate an implicit take
l = NounDomain(actor,actors_location,token); ! Same as above...
if (l == REPARSE_CODE) return l;
if (l == 0) {
if (indef_possambig) {
ResetDescriptors();
wn = desc_wn;
jump TryAgain2;
}
etype = CantSee(); jump FailToken; ! Choose best error
}
! ...until it produces something not held by the actor. Then an implicit
! take must be tried. If this is already happening anyway, things are too
! confused and we have to give up (but saving the oops marker so as to get
! it on the right word afterwards).
! The point of this last rule is that a sequence like
!
! > read newspaper
! (taking the newspaper first)
! The dwarf unexpectedly prevents you from taking the newspaper!
!
! should not be allowed to go into an infinite repeat - read becomes
! take then read, but take has no effect, so read becomes take then read...
! Anyway for now all we do is record the number of the object to take.
o = parent(l);
if (o ~= actor) {
#Ifdef DEBUG;
if (parser_trace >= 3) print " [Allowing object ", (the) l, " for now]^";
#Endif; ! DEBUG
}
single_object = l;
} ! end of if (token ~= HELD_TOKEN) else
! The following moves the word marker to just past the named object...
! if (match_from ~= oops_from) print match_from, " vs ", oops_from, "^";
! wn = oops_from + match_length;
wn = match_from + match_length;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Parse Token Letter E
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Object(s) specified now: is that the end of the list, or have we reached
! "and", "but" and so on? If so, create a multiple-object list if we
! haven't already (and are allowed to).
.NextInList;
o = NextWord();
if (o == AND1__WD or AND2__WD or AND3__WD or BUT1__WD or BUT2__WD or BUT3__WD or comma_word) {
#Ifdef DEBUG;
if (parser_trace >= 3) print " [Read connective '", (address) o, "']^";
#Endif; ! DEBUG
if (~~token_allows_multiple) {
if (multiflag) jump PassToken; ! give UPTO_PE error
etype=MULTI_PE;
jump FailToken;
}
if (o == BUT1__WD or BUT2__WD or BUT3__WD) and_parity = 1-and_parity;
if (~~many_flag) {
multiple_object-->0 = 1;
multiple_object-->1 = single_object;
many_flag = true;
#Ifdef DEBUG;
if (parser_trace >= 3) print " [Making new list from ", (the) single_object, "]^";
#Endif; ! DEBUG
}
dont_infer = true; inferfrom=0; ! Don't print (inferences)
jump ObjectList; ! And back around
}
wn--; ! Word marker back to first not-understood word
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Parse Token Letter F
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Happy or unhappy endings:
.PassToken;
if (many_flag) {
single_object = GPR_MULTIPLE;
multi_context = token;
}
else {
if (indef_mode == 1 && indef_type & PLURAL_BIT ~= 0) {
if (token == MULTIEXCEPT_TOKEN or MULTIINSIDE_TOKEN) multi_context = token;
if (indef_wanted < INDEF_ALL_WANTED && indef_wanted > 1) {
multi_had = 1; multi_wanted = indef_wanted;
etype = TOOFEW_PE;
jump FailToken;
}
}
}
return single_object;
.FailToken;
! If we were only guessing about it being a plural, try again but only
! allowing singulars (so that words like "six" are not swallowed up as
! Descriptors)
if (allow_plurals && indef_guess_p == 1) {
#Ifdef DEBUG;
if (parser_trace >= 4) print " [Retrying singulars after failure ", etype, "]^";
#Endif;
prev_indef_wanted = indef_wanted;
allow_plurals = false;
wn = desc_wn;
jump TryAgain;
}
if ((indef_wanted > 0 || prev_indef_wanted > 0) && (~~multiflag)) etype = MULTI_PE;
return GPR_FAIL;
]; ! end of ParseToken__
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Descriptors
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant OTHER_BIT = 1; ! These will be used in Adjudicate()
Constant MY_BIT = 2; ! to disambiguate choices
Constant THAT_BIT = 4;
Constant PLURAL_BIT = 8;
Constant LIT_BIT = 16;
Constant UNLIT_BIT = 32;
[ ResetDescriptors;
indef_mode = 0; indef_type = 0; indef_wanted = 0; indef_guess_p = 0;
indef_possambig = false;
indef_owner = nothing;
indef_cases = $$111111111111;
indef_nspec_at = 0;
];
[ ArticleDescriptors o x flag cto type n;
if (wn > num_words) return 0;
for (flag=true : flag :) {
o = NextWordStopped(); flag = false;
for (x=1 : x<=LanguageDescriptors-->0 : x=x+4)
if (o == LanguageDescriptors-->x) {
type = LanguageDescriptors-->(x+2);
if (type == DEFART_PK or INDEFART_PK) flag = true;
}
}
wn--;
return 0;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Parsing Descriptors
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ Descriptors o x flag cto type n;
ResetDescriptors();
if (wn > num_words) return 0;
for (flag=true : flag :) {
o = NextWordStopped(); flag = false;
for (x=1 : x<=LanguageDescriptors-->0 : x=x+4)
if (o == LanguageDescriptors-->x) {
flag = true;
type = LanguageDescriptors-->(x+2);
if (type ~= DEFART_PK) indef_mode = true;
indef_possambig = true;
indef_cases = indef_cases & (LanguageDescriptors-->(x+1));
if (type == POSSESS_PK) {
cto = LanguageDescriptors-->(x+3);
switch (cto) {
0: indef_type = indef_type | MY_BIT;
1: indef_type = indef_type | THAT_BIT;
default:
indef_owner = PronounValue(cto);
if (indef_owner == NULL) indef_owner = InformParser;
}
}
if (type == light) indef_type = indef_type | LIT_BIT;
if (type == -light) indef_type = indef_type | UNLIT_BIT;
}
if (o == OTHER1__WD or OTHER2__WD or OTHER3__WD) {
indef_mode = 1; flag = 1;
indef_type = indef_type | OTHER_BIT;
}
if (o == ALL1__WD or ALL2__WD or ALL3__WD or ALL4__WD or ALL5__WD) {
indef_mode = 1; flag = 1; indef_wanted = INDEF_ALL_WANTED;
if (take_all_rule == 1) take_all_rule = 2;
indef_type = indef_type | PLURAL_BIT;
}
if (allow_plurals) {
if (NextWordStopped() ~= -1 or THEN1__WD) { wn--; n = TryNumber(wn-1); } else { n=0; wn--; }
if (n == 1) { indef_mode = 1; flag = 1; }
if (n > 1) {
indef_guess_p = 1;
indef_mode = 1; flag = 1; indef_wanted = n;
indef_nspec_at = wn-1;
indef_type = indef_type | PLURAL_BIT;
}
}
if (flag == 1 && NextWordStopped() ~= OF1__WD or OF2__WD or OF3__WD or OF4__WD)
wn--; ! Skip 'of' after these
}
wn--;
return 0;
];
[ SafeSkipDescriptors;
@push indef_mode; @push indef_type; @push indef_wanted;
@push indef_guess_p; @push indef_possambig; @push indef_owner;
@push indef_cases; @push indef_nspec_at;
Descriptors();
@pull indef_nspec_at; @pull indef_cases;
@pull indef_owner; @pull indef_possambig; @pull indef_guess_p;
@pull indef_wanted; @pull indef_type; @pull indef_mode;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Preposition Chain
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ PrepositionChain wd index;
if (line_tdata-->index == wd) return wd;
if ((line_token-->index)->0 & $20 == 0) return -1;
do {
if (line_tdata-->index == wd) return wd;
index++;
} until ((line_token-->index == ENDIT_TOKEN) || (((line_token-->index)->0 & $10) == 0));
return -1;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Creature
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ CreatureTest obj;
if (obj has animate) rtrue;
if (obj hasnt talkable) rfalse;
if (action_to_be == ##Ask or ##Answer or ##Tell or ##AskFor) rtrue;
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Noun Domain
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ NounDomain domain1 domain2 context dont_ask
first_word i j k l answer_words marker;
#Ifdef DEBUG;
if (parser_trace >= 4) {
print " [NounDomain called at word ", wn, "^";
print " ";
if (indef_mode) {
print "seeking indefinite object: ";
if (indef_type & OTHER_BIT) print "other ";
if (indef_type & MY_BIT) print "my ";
if (indef_type & THAT_BIT) print "that ";
if (indef_type & PLURAL_BIT) print "plural ";
if (indef_type & LIT_BIT) print "lit ";
if (indef_type & UNLIT_BIT) print "unlit ";
if (indef_owner ~= 0) print "owner:", (name) indef_owner;
new_line;
print " number wanted: ";
if (indef_wanted == INDEF_ALL_WANTED) print "all"; else print indef_wanted;
new_line;
print " most likely GNAs of names: ", indef_cases, "^";
}
else print "seeking definite object^";
}
#Endif; ! DEBUG
match_length = 0; number_matched = 0; match_from = wn;
SearchScope(domain1, domain2, context);
#Ifdef DEBUG;
if (parser_trace >= 4) print " [ND made ", number_matched, " matches]^";
#Endif; ! DEBUG
wn = match_from+match_length;
! If nothing worked at all, leave with the word marker skipped past the
! first unmatched word...
if (number_matched == 0) { wn++; rfalse; }
! Suppose that there really were some words being parsed (i.e., we did
! not just infer). If so, and if there was only one match, it must be
! right and we return it...
if (match_from <= num_words) {
if (number_matched == 1) {
i=match_list-->0;
return i;
}
! ...now suppose that there was more typing to come, i.e. suppose that
! the user entered something beyond this noun. If nothing ought to follow,
! then there must be a mistake, (unless what does follow is just a full
! stop, and or comma)
if (wn <= num_words) {
i = NextWord(); wn--;
if (i ~= AND1__WD or AND2__WD or AND3__WD or comma_word
or THEN1__WD or THEN2__WD or THEN3__WD
or BUT1__WD or BUT2__WD or BUT3__WD) {
if (lookahead == ENDIT_TOKEN) rfalse;
}
}
}
! Now look for a good choice, if there's more than one choice...
number_of_classes = 0;
if (number_matched == 1) {
i = match_list-->0;
if (indef_mode == 1 && indef_type & PLURAL_BIT ~= 0) {
if (context == MULTI_TOKEN or MULTIHELD_TOKEN or
MULTIEXCEPT_TOKEN or MULTIINSIDE_TOKEN or
NOUN_TOKEN or HELD_TOKEN or CREATURE_TOKEN) {
BeginActivity(DECIDING_WHETHER_ALL_INC_ACT, i);
if ((ForActivity(DECIDING_WHETHER_ALL_INC_ACT, i)) &&
(RulebookFailed())) rfalse;
EndActivity(DECIDING_WHETHER_ALL_INC_ACT, i);
}
}
}
if (number_matched > 1) {
i = true;
if (number_matched > 1)
for (j=0 : j<number_matched-1 : j++)
if (Identical(match_list-->j, match_list-->(j+1)) == false)
i = false;
if (i) dont_infer = true;
i = Adjudicate(context);
if (i == -1) rfalse;
if (i == 1) rtrue; ! Adjudicate has made a multiple
! object, and we pass it on
}
! If i is non-zero here, one of two things is happening: either
! (a) an inference has been successfully made that object i is
! the intended one from the user's specification, or
! (b) the user finished typing some time ago, but we've decided
! on i because it's the only possible choice.
! In either case we have to keep the pattern up to date,
! note that an inference has been made and return.
! (Except, we don't note which of a pile of identical objects.)
if (i ~= 0) {
if (dont_infer) return i;
if (inferfrom == 0) inferfrom=pcount;
pattern-->pcount = i;
return i;
}
if (dont_ask) return match_list-->0;
! If we get here, there was no obvious choice of object to make. If in
! fact we've already gone past the end of the player's typing (which
! means the match list must contain every object in scope, regardless
! of its name), then it's foolish to give an enormous list to choose
! from - instead we go and ask a more suitable question...
if (match_from > num_words) jump Incomplete;
! Now we print up the question, using the equivalence classes as worked
! out by Adjudicate() so as not to repeat ourselves on plural objects...
BeginActivity(ASKING_WHICH_DO_YOU_MEAN_ACT);
if (ForActivity(ASKING_WHICH_DO_YOU_MEAN_ACT)) jump SkipWhichQuestion;
j = 1; marker = 0;
for (i=1 : i<=number_of_classes : i++) {
while (((match_classes-->marker) ~= i) && ((match_classes-->marker) ~= -i))
marker++;
if (match_list-->marker hasnt animate) j = 0;
}
if (j) PARSER_CLARIF_INTERNAL_RM('A');
else PARSER_CLARIF_INTERNAL_RM('B');
j = number_of_classes; marker = 0;
for (i=1 : i<=number_of_classes : i++) {
while (((match_classes-->marker) ~= i) && ((match_classes-->marker) ~= -i)) marker++;
k = match_list-->marker;
if (match_classes-->marker > 0) print (the) k; else print (a) k;
if (i < j-1) print ", ";
if (i == j-1) {
#Ifdef SERIAL_COMMA;
if (j ~= 2) print ",";
#Endif; ! SERIAL_COMMA
PARSER_CLARIF_INTERNAL_RM('H');
}
}
print "?^";
.SkipWhichQuestion; EndActivity(ASKING_WHICH_DO_YOU_MEAN_ACT);
! ...and get an answer:
.WhichOne;
#Ifdef TARGET_ZCODE;
for (i=2 : i<INPUT_BUFFER_LEN : i++) buffer2->i = ' ';
#Endif; ! TARGET_ZCODE
answer_words=Keyboard(buffer2, parse2);
! Conveniently, parse2-->1 is the first word in both ZCODE and GLULX.
first_word = (parse2-->1);
! Take care of "all", because that does something too clever here to do
! later on:
if (first_word == ALL1__WD or ALL2__WD or ALL3__WD or ALL4__WD or ALL5__WD) {
if (context == MULTI_TOKEN or MULTIHELD_TOKEN or MULTIEXCEPT_TOKEN or MULTIINSIDE_TOKEN) {
l = multiple_object-->0;
for (i=0 : i<number_matched && l+i<MATCH_LIST_WORDS : i++) {
k = match_list-->i;
multiple_object-->(i+1+l) = k;
}
multiple_object-->0 = i+l;
rtrue;
}
PARSER_CLARIF_INTERNAL_RM('C');
jump WhichOne;
}
! Look for a comma, and interpret this as a fresh conversation command
! if so:
for (i=1 : i<=answer_words : i++)
if (WordFrom(i, parse2) == comma_word) {
VM_CopyBuffer(buffer, buffer2);
jump RECONSTRUCT_INPUT;
}
! If the first word of the reply can be interpreted as a verb, then
! assume that the player has ignored the question and given a new
! command altogether.
! (This is one time when it's convenient that the directions are
! not themselves verbs - thus, "north" as a reply to "Which, the north
! or south door" is not treated as a fresh command but as an answer.)
#Ifdef LanguageIsVerb;
if (first_word == 0) {
j = wn; first_word = LanguageIsVerb(buffer2, parse2, 1); wn = j;
}
#Endif; ! LanguageIsVerb
if (first_word ~= 0) {
j = first_word->#dict_par1;
if ((0 ~= j&1) && ~~LanguageVerbMayBeName(first_word)) {
VM_CopyBuffer(buffer, buffer2);
jump RECONSTRUCT_INPUT;
}
}
! Now we insert the answer into the original typed command, as
! words additionally describing the same object
! (eg, > take red button
! Which one, ...
! > music
! becomes "take music red button". The parser will thus have three
! words to work from next time, not two.)
#Ifdef TARGET_ZCODE;
k = WordAddress(match_from) - buffer; l=buffer2->1+1;
for (j=buffer + buffer->0 - 1 : j>=buffer+k+l : j--) j->0 = 0->(j-l);
for (i=0 : i<l : i++) buffer->(k+i) = buffer2->(2+i);
buffer->(k+l-1) = ' ';
buffer->1 = buffer->1 + l;
if (buffer->1 >= (buffer->0 - 1)) buffer->1 = buffer->0;
#Ifnot; ! TARGET_GLULX
k = WordAddress(match_from) - buffer;
l = (buffer2-->0) + 1;
for (j=buffer+INPUT_BUFFER_LEN-1 : j>=buffer+k+l : j--) j->0 = j->(-l);
for (i=0 : i<l : i++) buffer->(k+i) = buffer2->(WORDSIZE+i);
buffer->(k+l-1) = ' ';
buffer-->0 = buffer-->0 + l;
if (buffer-->0 > (INPUT_BUFFER_LEN-WORDSIZE)) buffer-->0 = (INPUT_BUFFER_LEN-WORDSIZE);
#Endif; ! TARGET_
! Having reconstructed the input, we warn the parser accordingly
! and get out.
.RECONSTRUCT_INPUT;
num_words = WordCount(); players_command = 100 + num_words;
wn = 1;
#Ifdef LanguageToInformese;
LanguageToInformese();
! Re-tokenise:
VM_Tokenise(buffer,parse);
#Endif; ! LanguageToInformese
num_words = WordCount(); players_command = 100 + num_words;
actors_location = ScopeCeiling(player);
FollowRulebook(Activity_after_rulebooks-->READING_A_COMMAND_ACT);
return REPARSE_CODE;
! Now we come to the question asked when the input has run out
! and can't easily be guessed (eg, the player typed "take" and there
! were plenty of things which might have been meant).
.Incomplete;
if (context == CREATURE_TOKEN) PARSER_CLARIF_INTERNAL_RM('D', actor);
else PARSER_CLARIF_INTERNAL_RM('E', actor);
new_line;
#Ifdef TARGET_ZCODE;
for (i=2 : i<INPUT_BUFFER_LEN : i++) buffer2->i=' ';
#Endif; ! TARGET_ZCODE
answer_words = Keyboard(buffer2, parse2);
! Look for a comma, and interpret this as a fresh conversation command
! if so:
for (i=1 : i<=answer_words : i++)
if (WordFrom(i, parse2) == comma_word) {
VM_CopyBuffer(buffer, buffer2);
jump RECONSTRUCT_INPUT;
}
first_word=(parse2-->1);
#Ifdef LanguageIsVerb;
if (first_word==0) {
j = wn; first_word=LanguageIsVerb(buffer2, parse2, 1); wn = j;
}
#Endif; ! LanguageIsVerb
! Once again, if the reply looks like a command, give it to the
! parser to get on with and forget about the question...
if (first_word ~= 0) {
j = first_word->#dict_par1;
if ((0 ~= j&1) && ~~LanguageVerbMayBeName(first_word)) {
VM_CopyBuffer(buffer, buffer2);
jump RECONSTRUCT_INPUT;
}
}
! ...but if we have a genuine answer, then:
!
! (1) we must glue in text suitable for anything that's been inferred.
if (inferfrom ~= 0) {
for (j=inferfrom : j<pcount : j++) {
if (pattern-->j == PATTERN_NULL) continue;
#Ifdef TARGET_ZCODE;
i = 2+buffer->1; (buffer->1)++; buffer->(i++) = ' ';
#Ifnot; ! TARGET_GLULX
i = WORDSIZE + buffer-->0;
(buffer-->0)++; buffer->(i++) = ' ';
#Endif; ! TARGET_
#Ifdef DEBUG;
if (parser_trace >= 5)
print "[Gluing in inference with pattern code ", pattern-->j, "]^";
#Endif; ! DEBUG
! Conveniently, parse2-->1 is the first word in both ZCODE and GLULX.
parse2-->1 = 0;
! An inferred object. Best we can do is glue in a pronoun.
! (This is imperfect, but it's very seldom needed anyway.)
if (pattern-->j >= 2 && pattern-->j < REPARSE_CODE) {
PronounNotice(pattern-->j);
for (k=1 : k<=LanguagePronouns-->0 : k=k+3)
if (pattern-->j == LanguagePronouns-->(k+2)) {
parse2-->1 = LanguagePronouns-->k;
#Ifdef DEBUG;
if (parser_trace >= 5)
print "[Using pronoun '", (address) parse2-->1, "']^";
#Endif; ! DEBUG
break;
}
}
else {
! An inferred preposition.
parse2-->1 = VM_NumberToDictionaryAddress(pattern-->j - REPARSE_CODE);
#Ifdef DEBUG;
if (parser_trace >= 5)
print "[Using preposition '", (address) parse2-->1, "']^";
#Endif; ! DEBUG
}
! parse2-->1 now holds the dictionary address of the word to glue in.
if (parse2-->1 ~= 0) {
k = buffer + i;
#Ifdef TARGET_ZCODE;
@output_stream 3 k;
print (address) parse2-->1;
@output_stream -3;
k = k-->0;
for (l=i : l<i+k : l++) buffer->l = buffer->(l+2);
i = i + k; buffer->1 = i-2;
#Ifnot; ! TARGET_GLULX
k = Glulx_PrintAnyToArray(buffer+i, INPUT_BUFFER_LEN-i, parse2-->1);
i = i + k; buffer-->0 = i - WORDSIZE;
#Endif; ! TARGET_
}
}
}
! (2) we must glue the newly-typed text onto the end.
#Ifdef TARGET_ZCODE;
i = 2+buffer->1; (buffer->1)++; buffer->(i++) = ' ';
for (j=0 : j<buffer2->1 : i++,j++) {
buffer->i = buffer2->(j+2);
(buffer->1)++;
if (buffer->1 == INPUT_BUFFER_LEN) break;
}
#Ifnot; ! TARGET_GLULX
i = WORDSIZE + buffer-->0;
(buffer-->0)++; buffer->(i++) = ' ';
for (j=0 : j<buffer2-->0 : i++,j++) {
buffer->i = buffer2->(j+WORDSIZE);
(buffer-->0)++;
if (buffer-->0 == INPUT_BUFFER_LEN) break;
}
#Endif; ! TARGET_
! (3) we fill up the buffer with spaces, which is unnecessary, but may
! help incorrectly-written interpreters to cope.
#Ifdef TARGET_ZCODE;
for (: i<INPUT_BUFFER_LEN : i++) buffer->i = ' ';
#Endif; ! TARGET_ZCODE
jump RECONSTRUCT_INPUT;
]; ! end of NounDomain
[ PARSER_CLARIF_INTERNAL_R; ];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Adjudicate
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ Adjudicate context i j k good_ones last n ultimate flag offset;
#Ifdef DEBUG;
if (parser_trace >= 4) {
print " [Adjudicating match list of size ", number_matched,
" in context ", context, "^";
print " ";
if (indef_mode) {
print "indefinite type: ";
if (indef_type & OTHER_BIT) print "other ";
if (indef_type & MY_BIT) print "my ";
if (indef_type & THAT_BIT) print "that ";
if (indef_type & PLURAL_BIT) print "plural ";
if (indef_type & LIT_BIT) print "lit ";
if (indef_type & UNLIT_BIT) print "unlit ";
if (indef_owner ~= 0) print "owner:", (name) indef_owner;
new_line;
print " number wanted: ";
if (indef_wanted == INDEF_ALL_WANTED) print "all"; else print indef_wanted;
new_line;
print " most likely GNAs of names: ", indef_cases, "^";
}
else print "definite object^";
}
#Endif; ! DEBUG
j = number_matched-1; good_ones = 0; last = match_list-->0;
for (i=0 : i<=j : i++) {
n = match_list-->i;
match_scores-->i = good_ones;
ultimate = ScopeCeiling(n);
if (context==HELD_TOKEN && parent(n)==actor)
{ good_ones++; last=n; }
if (context==MULTI_TOKEN && ultimate==ScopeCeiling(actor)
&& n~=actor && n hasnt concealed && n hasnt scenery)
{ good_ones++; last=n; }
if (context==MULTIHELD_TOKEN && parent(n)==actor)
{ good_ones++; last=n; }
if (context==MULTIEXCEPT_TOKEN or MULTIINSIDE_TOKEN)
{ if (advance_warning==-1)
{ if (context==MULTIEXCEPT_TOKEN)
{ good_ones++; last=n;
}
if (context==MULTIINSIDE_TOKEN)
{ if (parent(n)~=actor) { good_ones++; last=n; }
}
}
else
{ if (context==MULTIEXCEPT_TOKEN && n~=advance_warning)
{ good_ones++; last=n; }
if (context==MULTIINSIDE_TOKEN && n in advance_warning)
{ good_ones++; last=n; }
}
}
if (context==CREATURE_TOKEN && CreatureTest(n)==1)
{ good_ones++; last=n; }
match_scores-->i = 1000*(good_ones - match_scores-->i);
}
if (good_ones == 1) {
if (indef_mode == 1 && indef_type & PLURAL_BIT ~= 0 &&
context == MULTI_TOKEN or MULTIHELD_TOKEN or
MULTIEXCEPT_TOKEN or MULTIINSIDE_TOKEN) {
BeginActivity(DECIDING_WHETHER_ALL_INC_ACT, last);
if ((ForActivity(DECIDING_WHETHER_ALL_INC_ACT, last)) &&
(RulebookFailed())) good_ones = 0;
EndActivity(DECIDING_WHETHER_ALL_INC_ACT, last);
if (good_ones == 1) return last;
} else {
return last;
}
}
! If there is ambiguity about what was typed, but it definitely wasn't
! animate as required, then return anything; higher up in the parser
! a suitable error will be given. (This prevents a question being asked.)
if (context == CREATURE_TOKEN && good_ones == 0) return match_list-->0;
if (indef_mode == 0) indef_type=0;
ScoreMatchL(context);
if (number_matched == 0) return -1;
if (indef_mode == 0) {
! Is there now a single highest-scoring object?
i = SingleBestGuess();
if (i >= 0) {
#Ifdef DEBUG;
if (parser_trace >= 4) print " Single best-scoring object returned.]^";
#Endif; ! DEBUG
return i;
}
}
if (indef_mode == 1 && indef_type & PLURAL_BIT ~= 0) {
if (context ~= MULTI_TOKEN or MULTIHELD_TOKEN or MULTIEXCEPT_TOKEN
or MULTIINSIDE_TOKEN) {
etype = MULTI_PE;
return -1;
}
i = 0; offset = multiple_object-->0;
for (j=BestGuess(): j~=-1 && i<indef_wanted && i+offset<MATCH_LIST_WORDS-1:
j=BestGuess()) {
flag = 0;
BeginActivity(DECIDING_WHETHER_ALL_INC_ACT, j);
if ((ForActivity(DECIDING_WHETHER_ALL_INC_ACT, j)) == 0) {
if (j hasnt concealed && j hasnt worn) flag = 1;
if (context == MULTIHELD_TOKEN or MULTIEXCEPT_TOKEN && parent(j) ~= actor)
flag = 0;
if (action_to_be == ##Take or ##Remove && parent(j) == actor)
flag = 0;
k = ChooseObjects(j, flag);
if (k == 1)
flag = 1;
else {
if (k == 2) flag = 0;
}
} else {
flag = 0; if (RulebookSucceeded()) flag = 1;
}
EndActivity(DECIDING_WHETHER_ALL_INC_ACT, j);
if (flag == 1) {
i++; multiple_object-->(i+offset) = j;
#Ifdef DEBUG;
if (parser_trace >= 4) print " Accepting it^";
#Endif; ! DEBUG
}
else {
i = i;
#Ifdef DEBUG;
if (parser_trace >= 4) print " Rejecting it^";
#Endif; ! DEBUG
}
}
if (i < indef_wanted && indef_wanted < INDEF_ALL_WANTED) {
etype = TOOFEW_PE; multi_wanted = indef_wanted;
if (parser_trace >= 4) print "Too few found^";
multi_had=i;
return -1;
}
multiple_object-->0 = i+offset;
multi_context = context;
#Ifdef DEBUG;
if (parser_trace >= 4)
print " Made multiple object of size ", i, "]^";
#Endif; ! DEBUG
return 1;
}
for (i=0 : i<number_matched : i++) match_classes-->i = 0;
n = 1;
for (i=0 : i<number_matched : i++)
if (match_classes-->i == 0) {
match_classes-->i = n++; flag = 0;
for (j=i+1 : j<number_matched : j++)
if (match_classes-->j == 0 && Identical(match_list-->i, match_list-->j) == 1) {
flag=1;
match_classes-->j = match_classes-->i;
}
if (flag == 1) match_classes-->i = 1-n;
}
n--; number_of_classes = n;
#Ifdef DEBUG;
if (parser_trace >= 4) {
print " Grouped into ", n, " possibilities by name:^";
for (i=0 : i<number_matched : i++)
if (match_classes-->i > 0)
print " ", (The) match_list-->i, " (", match_list-->i, ") --- group ",
match_classes-->i, "^";
}
#Endif; ! DEBUG
if (indef_mode == 0) {
if (n > 1) {
k = -1;
for (i=0 : i<number_matched : i++) {
if (match_scores-->i > k) {
k = match_scores-->i;
j = match_classes-->i; j = j*j;
flag = 0;
}
else
if (match_scores-->i == k) {
if ((match_classes-->i) * (match_classes-->i) ~= j)
flag = 1;
}
}
if (flag) {
#Ifdef DEBUG;
if (parser_trace >= 4) print " Unable to choose best group, so ask player.]^";
#Endif; ! DEBUG
return 0;
}
#Ifdef DEBUG;
if (parser_trace >= 4) print " Best choices are all from the same group.^";
#Endif; ! DEBUG
}
}
! When the player is really vague, or there's a single collection of
! indistinguishable objects to choose from, choose the one the player
! most recently acquired, or if the player has none of them, then
! the one most recently put where it is.
if (n == 1) dont_infer = true;
return BestGuess();
]; ! Adjudicate
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: ReviseMulti
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ReviseMulti second_p i low;
#Ifdef DEBUG;
if (parser_trace >= 4)
print " Revising multiple object list of size ", multiple_object-->0,
" with 2nd ", (name) second_p, "^";
#Endif; ! DEBUG
if (multi_context == MULTIEXCEPT_TOKEN or MULTIINSIDE_TOKEN) {
for (i=1,low=0 : i<=multiple_object-->0 : i++) {
if ( (multi_context==MULTIEXCEPT_TOKEN && multiple_object-->i ~= second_p) ||
(multi_context==MULTIINSIDE_TOKEN && multiple_object-->i in second_p)) {
low++;
multiple_object-->low = multiple_object-->i;
}
}
multiple_object-->0 = low;
}
if (multi_context == MULTI_TOKEN && action_to_be == ##Take) {
#Ifdef DEBUG;
if (parser_trace >= 4) print " Token 2 plural case: number with actor ", low, "^";
#Endif; ! DEBUG
if (take_all_rule == 2) {
for (i=1,low=0 : i<=multiple_object-->0 : i++) {
if (ScopeCeiling(multiple_object-->i) == ScopeCeiling(actor)) {
low++;
multiple_object-->low = multiple_object-->i;
}
}
multiple_object-->0 = low;
}
}
i = multiple_object-->0;
#Ifdef DEBUG;
if (parser_trace >= 4) print " Done: new size ", i, "^";
#Endif; ! DEBUG
if (i == 0) return NOTHING_PE;
return 0;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Match List
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ MakeMatch obj quality i;
#Ifdef DEBUG;
if (parser_trace >= 6) print " Match with quality ",quality,"^";
#Endif; ! DEBUG
if (token_filter ~= 0 && ConsultNounFilterToken(obj) == 0) {
#Ifdef DEBUG;
if (parser_trace >= 6) print " Match filtered out: token filter ", token_filter, "^";
#Endif; ! DEBUG
rtrue;
}
if (quality < match_length) rtrue;
if (quality > match_length) { match_length = quality; number_matched = 0; }
else {
if (number_matched >= MATCH_LIST_WORDS) rtrue;
for (i=0 : i<number_matched : i++)
if (match_list-->i == obj) rtrue;
}
match_list-->number_matched++ = obj;
#Ifdef DEBUG;
if (parser_trace >= 6) print " Match added to list^";
#Endif; ! DEBUG
];
[ ConsultNounFilterToken obj sn rv;
if (token_filter ofclass Routine) {
sn = noun;
noun = obj;
rv = indirect(token_filter);
noun = sn;
return rv;
}
if (obj has (token_filter-1)) rtrue;
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: ScoreMatchL
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant SCORE__CHOOSEOBJ = 1000;
Constant SCORE__IFGOOD = 500;
Constant SCORE__UNCONCEALED = 100;
Constant SCORE__BESTLOC = 60;
Constant SCORE__NEXTBESTLOC = 40;
Constant SCORE__NOTCOMPASS = 20;
Constant SCORE__NOTSCENERY = 10;
Constant SCORE__NOTACTOR = 5;
Constant SCORE__GNA = 1;
Constant SCORE__DIVISOR = 20;
Constant PREFER_HELD;
[ ScoreMatchL context its_owner its_score obj i j threshold met a_s l_s;
! if (indef_type & OTHER_BIT ~= 0) threshold++;
if (indef_type & MY_BIT ~= 0) threshold++;
if (indef_type & THAT_BIT ~= 0) threshold++;
if (indef_type & LIT_BIT ~= 0) threshold++;
if (indef_type & UNLIT_BIT ~= 0) threshold++;
if (indef_owner ~= nothing) threshold++;
#Ifdef DEBUG;
if (parser_trace >= 4) print " Scoring match list: indef mode ", indef_mode, " type ",
indef_type, ", satisfying ", threshold, " requirements:^";
#Endif; ! DEBUG
#ifdef PREFER_HELD;
a_s = SCORE__BESTLOC; l_s = SCORE__NEXTBESTLOC;
if (action_to_be == ##Take or ##Remove) {
a_s = SCORE__NEXTBESTLOC; l_s = SCORE__BESTLOC;
}
context = context; ! silence warning
#ifnot;
a_s = SCORE__NEXTBESTLOC; l_s = SCORE__BESTLOC;
if (context == HELD_TOKEN or MULTIHELD_TOKEN or MULTIEXCEPT_TOKEN) {
a_s = SCORE__BESTLOC; l_s = SCORE__NEXTBESTLOC;
}
#endif; ! PREFER_HELD
for (i=0 : i<number_matched : i++) {
obj = match_list-->i; its_owner = parent(obj); its_score=0; met=0;
! if (indef_type & OTHER_BIT ~= 0
! && obj ~= itobj or himobj or herobj) met++;
if (indef_type & MY_BIT ~= 0 && its_owner == actor) met++;
if (indef_type & THAT_BIT ~= 0 && its_owner == actors_location) met++;
if (indef_type & LIT_BIT ~= 0 && obj has light) met++;
if (indef_type & UNLIT_BIT ~= 0 && obj hasnt light) met++;
if (indef_owner ~= 0 && its_owner == indef_owner) met++;
if (met < threshold) {
#Ifdef DEBUG;
if (parser_trace >= 4)
print " ", (The) match_list-->i, " (", match_list-->i, ") in ",
(the) its_owner, " is rejected (doesn't match descriptors)^";
#Endif; ! DEBUG
match_list-->i = -1;
}
else {
its_score = 0;
if (obj hasnt concealed) its_score = SCORE__UNCONCEALED;
if (its_owner == actor) its_score = its_score + a_s;
else
if (its_owner == actors_location) its_score = its_score + l_s;
else
if (its_owner ~= compass) its_score = its_score + SCORE__NOTCOMPASS;
its_score = its_score + SCORE__CHOOSEOBJ * ChooseObjects(obj, 2);
if (obj hasnt scenery) its_score = its_score + SCORE__NOTSCENERY;
if (obj ~= actor) its_score = its_score + SCORE__NOTACTOR;
! A small bonus for having the correct GNA,
! for sorting out ambiguous articles and the like.
if (indef_cases & (PowersOfTwo_TB-->(GetGNAOfObject(obj))))
its_score = its_score + SCORE__GNA;
match_scores-->i = match_scores-->i + its_score;
#Ifdef DEBUG;
if (parser_trace >= 4) print " ", (The) match_list-->i, " (", match_list-->i,
") in ", (the) its_owner, " : ", match_scores-->i, " points^";
#Endif; ! DEBUG
}
}
for (i=0 : i<number_matched : i++) {
while (match_list-->i == -1) {
if (i == number_matched-1) { number_matched--; break; }
for (j=i : j<number_matched-1 : j++) {
match_list-->j = match_list-->(j+1);
match_scores-->j = match_scores-->(j+1);
}
number_matched--;
}
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: BestGuess
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ BestGuess earliest its_score best i;
earliest = 0; best = -1;
for (i=0 : i<number_matched : i++) {
if (match_list-->i >= 0) {
its_score = match_scores-->i;
if (its_score > best) { best = its_score; earliest = i; }
}
}
#Ifdef DEBUG;
if (parser_trace >= 4)
if (best < 0) print " Best guess ran out of choices^";
else print " Best guess ", (the) match_list-->earliest,
" (", match_list-->earliest, ")^";
#Endif; ! DEBUG
if (best < 0) return -1;
i = match_list-->earliest;
match_list-->earliest = -1;
return i;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: SingleBestGuess
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ SingleBestGuess earliest its_score best i;
earliest = -1; best = -1000;
for (i=0 : i<number_matched : i++) {
its_score = match_scores-->i;
if (its_score == best) earliest = -1;
if (its_score > best) { best = its_score; earliest = match_list-->i; }
}
return earliest;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Identical
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ Identical o1 o2 p1 p2 n1 n2 i j flag;
if (o1 == o2) rtrue; ! This should never happen, but to be on the safe side
if (o1 == 0 || o2 == 0) rfalse; ! Similarly
if (o1 ofclass K3_direction || o2 ofclass K3_direction) rfalse; ! Saves time
! What complicates things is that o1 or o2 might have a parsing routine,
! so the parser can't know from here whether they are or aren't the same.
! If they have different parsing routines, we simply assume they're
! different. If they have the same routine (which they probably got from
! a class definition) then the decision process is as follows:
!
! the routine is called (with self being o1, not that it matters)
! with noun and second being set to o1 and o2, and action being set
! to the fake action TheSame. If it returns -1, they are found
! identical; if -2, different; and if >=0, then the usual method
! is used instead.
if (o1.parse_name ~= 0 || o2.parse_name ~= 0) {
if (o1.parse_name ~= o2.parse_name) rfalse;
parser_action = ##TheSame; parser_one = o1; parser_two = o2;
j = wn; i = RunRoutines(o1,parse_name); wn = j;
if (i == -1) rtrue;
if (i == -2) rfalse;
}
! This is the default algorithm: do they have the same words in their
! "name" (i.e. property no. 1) properties. (Note that the following allows
! for repeated words and words in different orders.)
p1 = o1.&1; n1 = (o1.#1)/WORDSIZE;
p2 = o2.&1; n2 = (o2.#1)/WORDSIZE;
! for (i=0 : i<n1 : i++) { print (address) p1-->i, " "; } new_line;
! for (i=0 : i<n2 : i++) { print (address) p2-->i, " "; } new_line;
for (i=0 : i<n1 : i++) {
flag = 0;
for (j=0 : j<n2 : j++)
if (p1-->i == p2-->j) flag = 1;
if (flag == 0) rfalse;
}
for (j=0 : j<n2 : j++) {
flag = 0;
for (i=0 : i<n1 : i++)
if (p1-->i == p2-->j) flag = 1;
if (flag == 0) rfalse;
}
! print "Which are identical!^";
rtrue;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Print Command
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ PrintInferredCommand from singleton_noun;
singleton_noun = FALSE;
if ((from ~= 0) && (from == pcount-1) &&
(pattern-->from > 1) && (pattern-->from < REPARSE_CODE))
singleton_noun = TRUE;
if (singleton_noun) {
BeginActivity(CLARIFYING_PARSERS_CHOICE_ACT, pattern-->from);
if (ForActivity(CLARIFYING_PARSERS_CHOICE_ACT, pattern-->from) == 0) {
print "("; PrintCommand(from); print ")^";
}
EndActivity(CLARIFYING_PARSERS_CHOICE_ACT, pattern-->from);
} else {
print "("; PrintCommand(from); print ")^";
}
];
[ PrintCommand from i k spacing_flag;
if (from == 0) {
i = verb_word;
if (LanguageVerb(i) == 0)
if (PrintVerb(i) == 0) print (address) i;
from++; spacing_flag = true;
}
for (k=from : k<pcount : k++) {
i = pattern-->k;
if (i == PATTERN_NULL) continue;
if (spacing_flag) print (char) ' ';
if (i == 0) { PARSER_CLARIF_INTERNAL_RM('F'); jump TokenPrinted; }
if (i == 1) { PARSER_CLARIF_INTERNAL_RM('G'); jump TokenPrinted; }
if (i >= REPARSE_CODE)
print (address) VM_NumberToDictionaryAddress(i-REPARSE_CODE);
else
if (i ofclass K3_direction)
print (LanguageDirection) i; ! the direction name as adverb
else
print (the) i;
.TokenPrinted;
spacing_flag = true;
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: CantSee
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ CantSee i w e;
saved_oops=oops_from;
if (scope_token ~= 0) {
scope_error = scope_token; return ASKSCOPE_PE;
}
wn--; w = NextWord();
e = CANTSEE_PE;
if (w == pronoun_word) {
w = NextWordStopped(); wn--;
if ((w == -1) || (line_token-->(pcount) ~= ENDIT_TOKEN)) {
if (pcount > 0) AnalyseToken(line_token-->(pcount-1));
if ((pcount > 0) && (found_ttype == ROUTINE_FILTER_TT or ATTR_FILTER_TT))
e = NOTINCONTEXT_PE;
else {
pronoun__word = pronoun_word; pronoun__obj = pronoun_obj;
e = ITGONE_PE;
}
}
}
if (etype > e) return etype;
return e;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Multiple Object List
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ MultiAdd o i j;
i = multiple_object-->0;
if (i == MATCH_LIST_WORDS-1) { toomany_flag = 1; rtrue; }
for (j=1 : j<=i : j++)
if (o == multiple_object-->j) rtrue;
i++;
multiple_object-->i = o;
multiple_object-->0 = i;
];
[ MultiSub o i j k;
i = multiple_object-->0;
for (j=1 : j<=i : j++)
if (o == multiple_object-->j) {
for (k=j : k<=i : k++) multiple_object-->k = multiple_object-->(k+1);
multiple_object-->0 = --i;
return 0;
}
return VAGUE_PE;
];
[ MultiFilter attr i j o;
.MFiltl;
i = multiple_object-->0;
for (j=1 : j<=i : j++) {
o = multiple_object-->j;
if (o hasnt attr) { MultiSub(o); jump Mfiltl; }
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Scope
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ PlaceInScope O opts ws; ! If opts is set, do not place contents in scope
ws = wn; wn = match_from;
if (opts == false) DoScopeActionAndRecurse(O);
else DoScopeAction(O);
wn = ws; return;
];
[ AddToScope obj;
if (ats_flag >= 2) DoScopeActionAndRecurse(obj, 0, ats_flag-2);
if (ats_flag == 1) { if (HasLightSource(obj)==1) ats_hls = 1; }
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Scope Level 0
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ TestScope obj act a al sr x y;
x = parser_one; y = parser_two;
parser_one = obj; parser_two = 0; a = actor; al = actors_location;
sr = scope_reason; scope_reason = TESTSCOPE_REASON;
if (act == 0) actor = player; else actor = act;
actors_location = ScopeCeiling(actor);
SearchScope(actors_location, actor, 0); scope_reason = sr; actor = a;
actors_location = al; parser_one = x; x = parser_two; parser_two = y;
return x;
];
[ LoopOverScope routine act x y a al;
x = parser_one; y = scope_reason; a = actor; al = actors_location;
parser_one = routine;
if (act == 0) actor = player; else actor = act;
actors_location = ScopeCeiling(actor);
scope_reason = LOOPOVERSCOPE_REASON;
SearchScope(actors_location, actor, 0);
parser_one = x; scope_reason = y; actor = a; actors_location = al;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: SearchScope
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ SearchScope domain1 domain2 context i;
if (domain1 == 0) return;
! (a)
if (scope_token) {
scope_stage = 2;
#Ifdef DEBUG;
if (parser_trace >= 3) print " [Scope routine called at stage 2]^";
#Endif;
if (indirect(scope_token) ~= 0) rtrue;
}
! (b)
BeginActivity(DECIDING_SCOPE_ACT, actor);
if (ForActivity(DECIDING_SCOPE_ACT, actor) == false) {
! (c.1)
if ((scope_reason == PARSING_REASON) && (context == MULTIINSIDE_TOKEN) &&
(advance_warning ~= -1)) {
if (IsSeeThrough(advance_warning) == 1)
ScopeWithin(advance_warning, 0, context);
} else {
! (c.2)
if ((scope_reason == PARSING_REASON) && (context ~= CREATURE_TOKEN) &&
(indef_mode == 0) && (domain1 == actors_location))
ScopeWithin(compass);
! (c.3)
if (domain1 has supporter or container) DoScopeAction(domain1);
ScopeWithin(domain1, domain2, context);
! (c.4)
if (domain2) {
if (domain2 has supporter or container) DoScopeAction(domain2);
ScopeWithin(domain2, 0, context);
}
}
! (c.5)
if (thedark == domain1 or domain2) {
DoScopeActionAndRecurse(actor, actor, context);
if (parent(actor) has supporter or container)
DoScopeActionAndRecurse(parent(actor), parent(actor), context);
}
}
EndActivity(DECIDING_SCOPE_ACT, actor);
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: ScopeWithin
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ScopeWithin domain nosearch context obj next_obj;
if (domain == 0) rtrue;
! Look through the objects in the domain, avoiding "objectloop" in case
! movements occur.
obj = child(domain);
while (obj) {
next_obj = sibling(obj);
if ((domain == actor) || (TestConcealment(domain, obj) == false))
DoScopeActionAndRecurse(obj, nosearch, context);
obj = next_obj;
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: DoScopeActionAndRecurse
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ DoScopeActionAndRecurse domain nosearch context i ad n obj next_obj;
DoScopeAction(domain);
! (a)
if ((domain ~= nosearch) &&
((domain ofclass K1_room or K8_person) || (IsSeeThrough(domain) == 1))) {
obj = child(domain);
while (obj) {
next_obj = sibling(obj);
if ((domain == actor) || (TestConcealment(domain, obj) == false))
DoScopeActionAndRecurse(obj, nosearch, context);
obj = next_obj;
}
}
! (b)
if (domain provides component_child) {
obj = domain.component_child;
while (obj) {
next_obj = obj.component_sibling;
if ((domain == actor) || (TestConcealment(domain, obj) == false))
DoScopeActionAndRecurse(obj, 0, context);
obj = next_obj;
}
}
! (c)
ad = domain.&add_to_scope;
if (ad ~= 0) {
! Test if the property value is not an object.
#Ifdef TARGET_ZCODE;
i = (UnsignedCompare(ad-->0, top_object) > 0);
#Ifnot; ! TARGET_GLULX
i = (((ad-->0)->0) ~= $70);
#Endif; ! TARGET_
if (i) {
ats_flag = 2+context;
RunRoutines(domain, add_to_scope);
ats_flag = 0;
}
else {
n = domain.#add_to_scope;
for (i=0 : (WORDSIZE*i)<n : i++)
if (ad-->i)
DoScopeActionAndRecurse(ad-->i, 0, context);
}
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: DoScopeAction
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ DoScopeAction item;
#Ifdef DEBUG;
if (parser_trace >= 6)
print "[DSA on ", (the) item, " with reason = ", scope_reason,
" p1 = ", parser_one, " p2 = ", parser_two, "]^";
#Endif; ! DEBUG
@push parser_one; @push scope_reason;
switch(scope_reason) {
TESTSCOPE_REASON: if (item == parser_one) parser_two = 1;
LOOPOVERSCOPE_REASON: if (parser_one ofclass Routine) indirect(parser_one, item);
PARSING_REASON, TALKING_REASON: MatchTextAgainstObject(item);
}
@pull scope_reason; @pull parser_one;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Parsing Object Names
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ MatchTextAgainstObject item i;
if (token_filter ~= 0 && ConsultNounFilterToken(item) == 0) return;
if (match_from <= num_words) { ! If there's any text to match, that is
wn = match_from;
i = NounWord();
if ((i == 1) && (player == item)) MakeMatch(item, 1); ! "me"
if ((i >= 2) && (i < 128) && (LanguagePronouns-->i == item)) MakeMatch(item, 1);
}
! Construing the current word as the start of a noun, can it refer to the
! object?
wn = match_from;
if (TryGivenObject(item) > 0)
if (indef_nspec_at > 0 && match_from ~= indef_nspec_at) {
! This case arises if the player has typed a number in
! which is hypothetically an indefinite descriptor:
! e.g. "take two clubs". We have just checked the object
! against the word "clubs", in the hope of eventually finding
! two such objects. But we also backtrack and check it
! against the words "two clubs", in case it turns out to
! be the 2 of Clubs from a pack of cards, say. If it does
! match against "two clubs", we tear up our original
! assumption about the meaning of "two" and lapse back into
! definite mode.
wn = indef_nspec_at;
if (TryGivenObject(item) > 0) {
match_from = indef_nspec_at;
ResetDescriptors();
}
wn = match_from;
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: TryGivenObject
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ TryGivenObject obj nomatch threshold k w j;
#Ifdef DEBUG;
if (parser_trace >= 5) print " Trying ", (the) obj, " (", obj, ") at word ", wn, "^";
#Endif; ! DEBUG
if (nomatch && obj == 0) return 0;
! if (nomatch) print "*** TryGivenObject *** on ", (the) obj, " at wn = ", wn, "^";
dict_flags_of_noun = 0;
! If input has run out then always match, with only quality 0 (this saves
! time).
if (wn > num_words) {
if (nomatch) return 0;
if (indef_mode ~= 0)
dict_flags_of_noun = $$01110000; ! Reject "plural" bit
MakeMatch(obj,0);
#Ifdef DEBUG;
if (parser_trace >= 5) print " Matched (0)^";
#Endif; ! DEBUG
return 1;
}
! Ask the object to parse itself if necessary, sitting up and taking notice
! if it says the plural was used:
if (obj.parse_name~=0) {
parser_action = NULL; j=wn;
k = RunRoutines(obj,parse_name);
if (k > 0) {
wn=j+k;
.MMbyPN;
if (parser_action == ##PluralFound)
dict_flags_of_noun = dict_flags_of_noun | 4;
if (dict_flags_of_noun & 4) {
if (~~allow_plurals) k = 0;
else {
if (indef_mode == 0) {
indef_mode = 1; indef_type = 0; indef_wanted = 0;
}
indef_type = indef_type | PLURAL_BIT;
if (indef_wanted == 0) indef_wanted = INDEF_ALL_WANTED;
}
}
#Ifdef DEBUG;
if (parser_trace >= 5) print " Matched (", k, ")^";
#Endif; ! DEBUG
if (nomatch == false) MakeMatch(obj,k);
return k;
}
if (k == 0) jump NoWordsMatch;
}
! The default algorithm is simply to count up how many words pass the
! Refers test:
parser_action = NULL;
w = NounWord();
if (w == 1 && player == obj) { k=1; jump MMbyPN; }
if (w >= 2 && w < 128 && (LanguagePronouns-->w == obj)) { k = 1; jump MMbyPN; }
if (Refers(obj, wn-1) == 0) {
.NoWordsMatch;
if (indef_mode ~= 0) { k = 0; parser_action = NULL; jump MMbyPN; }
rfalse;
}
threshold = 1;
dict_flags_of_noun = (w->#dict_par1) & $$01110100;
w = NextWord();
while (Refers(obj, wn-1)) {
threshold++;
if (w)
dict_flags_of_noun = dict_flags_of_noun | ((w->#dict_par1) & $$01110100);
w = NextWord();
}
k = threshold;
jump MMbyPN;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Refers
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ Refers obj wnum wd k l m;
if (obj == 0) rfalse;
#Ifdef LanguageRefers;
k = LanguageRefers(obj,wnum); if (k >= 0) return k;
#Endif; ! LanguageRefers
k = wn; wn = wnum; wd = NextWordStopped(); wn = k;
if (parser_inflection >= 256) {
k = indirect(parser_inflection, obj, wd);
if (k >= 0) return k;
m = -k;
}
else
m = parser_inflection;
k = obj.&m; l = (obj.#m)/WORDSIZE-1;
for (m=0 : m<=l : m++)
if (wd == k-->m) rtrue;
rfalse;
];
[ WordInProperty wd obj prop k l m;
k = obj.&prop; l = (obj.#prop)/WORDSIZE-1;
for (m=0 : m<=l : m++)
if (wd == k-->m) rtrue;
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: NounWord
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ NounWord i j s;
i = NextWord();
if (i == 0) rfalse;
if (i == ME1__WD or ME2__WD or ME3__WD) return 1;
s = LanguagePronouns-->0;
for (j=1 : j<=s : j=j+3)
if (i == LanguagePronouns-->j)
return j+2;
if ((i->#dict_par1)&128 == 0) rfalse;
return i;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: TryNumber
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ TryNumber wordnum i j c num len mul tot d digit;
i = wn; wn = wordnum; j = NextWord(); wn = i;
j = NumberWord(j); ! Test for verbal forms ONE to THIRTY
if (j >= 1) return j;
#Ifdef TARGET_ZCODE;
i = wordnum*4+1; j = parse->i; num = j+buffer; len = parse->(i-1);
#Ifnot; ! TARGET_GLULX
i = wordnum*3; j = parse-->i; num = j+buffer; len = parse-->(i-1);
#Endif; ! TARGET_
if (len >= 4) mul=1000;
if (len == 3) mul=100;
if (len == 2) mul=10;
if (len == 1) mul=1;
tot = 0; c = 0; len = len-1;
for (c=0 : c<=len : c++) {
digit=num->c;
if (digit == '0') { d = 0; jump digok; }
if (digit == '1') { d = 1; jump digok; }
if (digit == '2') { d = 2; jump digok; }
if (digit == '3') { d = 3; jump digok; }
if (digit == '4') { d = 4; jump digok; }
if (digit == '5') { d = 5; jump digok; }
if (digit == '6') { d = 6; jump digok; }
if (digit == '7') { d = 7; jump digok; }
if (digit == '8') { d = 8; jump digok; }
if (digit == '9') { d = 9; jump digok; }
return -1000;
.digok;
tot = tot+mul*d; mul = mul/10;
}
if (len > 3) tot=10000;
return tot;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Gender
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ GetGender person;
if (person hasnt female) rtrue;
rfalse;
];
[ GetGNAOfObject obj case gender;
if (obj hasnt animate) case = 6;
if (obj has male) gender = male;
if (obj has female) gender = female;
if (obj has neuter) gender = neuter;
if (gender == 0) {
if (case == 0) gender = LanguageAnimateGender;
else gender = LanguageInanimateGender;
}
if (gender == female) case = case + 1;
if (gender == neuter) case = case + 2;
if (obj has pluralname) case = case + 3;
return case;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Noticing Plurals
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ DetectPluralWord at n i w swn outcome;
swn = wn; wn = at;
for (i=0:i<n:i++) {
w = NextWordStopped();
if (w == 0 or THEN1__WD or COMMA_WORD or -1) break;
if ((w->#dict_par1) & $$00000100) {
parser_action = ##PluralFound;
outcome = true;
}
}
wn = swn;
return outcome;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Pronoun Handling
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ SetPronoun dword value x;
for (x=1 : x<=LanguagePronouns-->0 : x=x+3)
if (LanguagePronouns-->x == dword) {
LanguagePronouns-->(x+2) = value; return;
}
RunTimeError(14);
];
[ PronounValue dword x;
for (x=1 : x<=LanguagePronouns-->0 : x=x+3)
if (LanguagePronouns-->x == dword)
return LanguagePronouns-->(x+2);
return 0;
];
[ ResetVagueWords obj; PronounNotice(obj); ];
[ PronounNotice obj x bm g;
if (obj == player) return;
g = (GetGNAOfObject(obj));
bm = PowersOfTwo_TB-->g;
for (x=1 : x<=LanguagePronouns-->0 : x=x+3)
if (bm & (LanguagePronouns-->(x+1)) ~= 0)
LanguagePronouns-->(x+2) = obj;
if (((g % 6) < 3) && (obj has ambigpluralname)) {
g = g + 3;
bm = PowersOfTwo_TB-->g;
for (x=1 : x<=LanguagePronouns-->0 : x=x+3)
if (bm & (LanguagePronouns-->(x+1)) ~= 0)
LanguagePronouns-->(x+2) = obj;
}
];
[ PronounNoticeHeldObjects x;
#IFNDEF MANUAL_PRONOUNS;
objectloop(x in player) PronounNotice(x);
#ENDIF;
x = 0; ! To prevent a "not used" error
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Yes/No Questions
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ YesOrNo i j;
for (::) {
#Ifdef TARGET_ZCODE;
if (location == nothing || parent(player) == nothing) read buffer2 parse2;
else read buffer2 parse2 DrawStatusLine;
j = parse2->1;
#Ifnot; ! TARGET_GLULX;
if (location ~= nothing && parent(player) ~= nothing) DrawStatusLine();
KeyboardPrimitive(buffer2, parse2);
j = parse2-->0;
#Endif; ! TARGET_
if (j) { ! at least one word entered
i = parse2-->1;
if (i == YES1__WD or YES2__WD or YES3__WD) rtrue;
if (i == NO1__WD or NO2__WD or NO3__WD) rfalse;
}
YES_OR_NO_QUESTION_INTERNAL_RM('A'); print "> ";
}
];
[ YES_OR_NO_QUESTION_INTERNAL_R; ];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Number Words
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ NumberWord o i n;
n = LanguageNumbers-->0;
for (i=1 : i<=n : i=i+2)
if (o == LanguageNumbers-->i) return LanguageNumbers-->(i+1);
return 0;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Choose Objects
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
!Constant COBJ_DEBUG;
! the highest value returned by CheckDPMR (see the Standard Rules)
Constant HIGHEST_DPMR_SCORE = 4;
Array alt_match_list --> (MATCH_LIST_WORDS+1);
#ifdef TARGET_GLULX;
[ COBJ__Copy words from to i;
for (i=0: i<words: i++)
to-->i = from-->i;
];
#ifnot;
[ COBJ__Copy words from to bytes;
bytes = words * 2;
@copy_table from to bytes;
];
#endif;
! swap alt_match_list with match_list/number_matched
[ COBJ__SwapMatches i x;
! swap the counts
x = number_matched;
number_matched = alt_match_list-->0;
alt_match_list-->0 = x;
! swap the values
if (x < number_matched) x = number_matched;
for (i=x: i>0: i--) {
x = match_list-->(i-1);
match_list-->(i-1) = alt_match_list-->i;
alt_match_list-->i = x;
}
];
[ ChooseObjects obj code l i swn spcount;
if (code<2) rfalse;
if (cobj_flag == 1) {
.CodeOne;
if (parameters > 0) {
#ifdef COBJ_DEBUG;
print "[scoring ", (the) obj, " (second)]^";
#endif;
return ScoreDabCombo(parser_results-->INP1_PRES, obj);
} else {
#ifdef COBJ_DEBUG;
print "[scoring ", (the) obj, " (first) in ",
alt_match_list-->0, " combinations]^";
#endif;
l = 0;
for (i=1: i<=alt_match_list-->0: i++) {
spcount = ScoreDabCombo(obj, alt_match_list-->i);
if (spcount == HIGHEST_DPMR_SCORE) {
#ifdef COBJ_DEBUG;
print "[scored ", spcount, " - best possible]^";
#endif;
return spcount;
}
if (spcount>l) l = spcount;
}
return l;
}
}
if (cobj_flag == 2) {
.CodeTwo;
#ifdef COBJ_DEBUG;
print "[scoring ", (the) obj, " (simple); parameters = ", parameters,
" aw = ", advance_warning, "]^";
#endif;
@push action_to_be;
if (parameters==0) {
if (advance_warning > 0)
l = ScoreDabCombo(obj, advance_warning);
else
l = ScoreDabCombo(obj, 0);
} else {
l = ScoreDabCombo(parser_results-->INP1_PRES, obj);
}
@pull action_to_be;
return l;
}
#ifdef COBJ_DEBUG;
print "[choosing a cobj strategy: ";
#endif;
swn = wn;
spcount = pcount;
while (line_ttype-->pcount == PREPOSITION_TT) pcount++;
if (line_ttype-->pcount == ELEMENTARY_TT) {
if (line_tdata-->pcount == TOPIC_TOKEN) {
pcount = spcount;
jump CodeTwo;
}
while (wn <= num_words) {
l = NextWordStopped(); wn--;
if (l == THEN1__WD) break;
if ( (l ~= -1 or 0) && (l->#dict_par1) &8 ) { wn++; continue; } ! if preposition
if (l == ALL1__WD or ALL2__WD or ALL3__WD or ALL4__WD or ALL5__WD) { wn++; continue; }
SafeSkipDescriptors();
! save the current match state
@push match_length; @push token_filter; @push match_from;
alt_match_list-->0 = number_matched;
COBJ__Copy(number_matched, match_list, alt_match_list+WORDSIZE);
! now get all the matches for the second noun
match_length = 0; number_matched = 0; match_from = wn;
token_filter = 0;
SearchScope(actor, actors_location, line_tdata-->pcount);
#ifdef COBJ_DEBUG;
print number_matched, " possible second nouns]^";
#endif;
wn = swn;
cobj_flag = 1;
! restore match variables
COBJ__SwapMatches();
@pull match_from; @pull token_filter; @pull match_length;
pcount = spcount;
jump CodeOne;
}
}
pcount = spcount;
wn = swn;
#ifdef COBJ_DEBUG;
print "nothing interesting]^";
#endif;
cobj_flag = 2;
jump CodeTwo;
];
[ ScoreDabCombo a b result;
@push action; @push act_requester; @push noun; @push second;
action = action_to_be;
act_requester = player;
if (action_reversed) { noun = b; second = a; }
else { noun = a; second = b; }
result = CheckDPMR();
@pull second; @pull noun; @pull act_requester; @pull action;
#ifdef COBJ_DEBUG;
print "[", (the) a, " / ", (the) b, " => ", result, "]^";
#endif;
return result;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Parser.i6t: Default Topic
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ DefaultTopic; return GPR_FAIL; ];
[ ParserError error_type;
if (error_type) PrintSingleParagraph(error_type);
rfalse;
];
Object InformLibrary "(Inform Library)" has proper;
Array Protect_I7_Arrays --> 16339 12345;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Output.i6t: Order of Play
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Main
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Global EarlyInTurnSequence;
Global IterationsOfTurnSequence;
[ Main;
#ifdef TARGET_ZCODE; max_z_object = #largest_object - 255; #endif;
ClearRTP();
FollowRulebook(STARTUP_RB);
#ifdef DEBUG; InternalTestCases(); #endif;
while (true) {
while (deadflag == false) {
EarlyInTurnSequence = true;
action = ##Wait; meta = false; noun = nothing; second = nothing;
actor = player;
FollowRulebook(TURN_SEQUENCE_RB);
IterationsOfTurnSequence++;
}
if (FollowRulebook(SHUTDOWN_RB) == false) return;
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Virtual Machine Startup Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ VIRTUAL_MACHINE_STARTUP_R;
CarryOutActivity(STARTING_VIRTUAL_MACHINE_ACT);
VM_Initialise();
print "^^^";
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Initial Situation
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant PLAYER_OBJECT_INIS = 0;
Constant START_OBJECT_INIS = 1;
Constant START_ROOM_INIS = 2;
Constant START_TIME_INIS = 3;
Constant DONE_INIS = 4;
Array InitialSituation --> selfobj nothing I129_lab 540 0;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Initialise Memory Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ INITIALISE_MEMORY_R;
#ifdef TARGET_GLULX; VM_PreInitialise(); #Endif;
#Ifdef LanguageInitialise; LanguageInitialise(); #Endif;
not_yet_in_play = true;
#ifdef I7_LOOKMODE; lookmode = I7_LOOKMODE; #endif;
player = InitialSituation-->PLAYER_OBJECT_INIS;
the_time = InitialSituation-->START_TIME_INIS;
real_location = nothing;
location = nothing;
CreatePropertyOffsets();
HeapInitialise(); ! Create a completely unused memory allocation heap
StackFramingInitialise(); ! Create an empty stack
CreateDynamicRelations(); ! Create relation structures on the heap
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Seed Random Number Generator Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ SEED_RANDOM_NUMBER_GENERATOR_R i;
if (0) VM_Seed_RNG(0);
for (i=1: i<=100: i++) random(i);
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Position Player In Model World Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ POSITION_PLAYER_IN_MODEL_R player_to_be;
player = selfobj;
player_to_be = InitialSituation-->PLAYER_OBJECT_INIS;
location = LocationOf(player_to_be);
if (location == 0) {
location = InitialSituation-->START_ROOM_INIS;
if (InitialSituation-->START_OBJECT_INIS)
move player_to_be to InitialSituation-->START_OBJECT_INIS;
else move player_to_be to location;
}
if (player_to_be ~= player) { remove selfobj; ChangePlayer(player_to_be); }
else { real_location = location; SilentlyConsiderLight(); }
NOTE_OBJECT_ACQUISITIONS_R(); MoveFloatingObjects();
actor = player; act_requester = nothing; actors_location = real_location; action = ##Wait;
InitialSituation-->DONE_INIS = true;
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Parse Command Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant ACTION_PRES = 0;
Constant NO_INPS_PRES = 1;
Constant INP1_PRES = 2;
Constant INP2_PRES = 3; ! Parser.i6t code assumes this is INP1_PRES + 1
[ PARSE_COMMAND_R;
if (EarlyInTurnSequence == false) rfalse; ! Prevent use outside top level
not_yet_in_play = false;
Parser__parse();
TreatParserResults();
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Treat Parser Results
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ TreatParserResults;
if (parser_results-->ACTION_PRES == ##MistakeAction) meta = true;
if (parser_results-->ACTION_PRES == ##Tell &&
parser_results-->INP1_PRES == player && actor ~= player) {
parser_results-->ACTION_PRES = ##Ask;
parser_results-->INP1_PRES = actor; actor = player;
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Generate Action Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ GENERATE_ACTION_R i;
if (EarlyInTurnSequence == false) rfalse; ! Prevent use outside top level
EarlyInTurnSequence = false;
action = parser_results-->ACTION_PRES;
act_requester = nothing; if (actor ~= player) act_requester = player;
inp1 = 0; inp2 = 0; multiflag = false;
if (parser_results-->NO_INPS_PRES >= 1) {
inp1 = parser_results-->INP1_PRES; if (inp1 == 0) multiflag = true;
}
if (parser_results-->NO_INPS_PRES >= 2) {
inp2 = parser_results-->INP2_PRES; if (inp2 == 0) multiflag = true;
}
if (inp1 == 1) noun = nothing; else noun = inp1;
if (inp2 == 1) second = nothing; else second = inp2;
if (multiflag) {
if (multiple_object-->0 == 0) {
if (actor == player) { GENERATE_ACTION_RM('B'); new_line; }
return;
}
if (toomany_flag) {
toomany_flag = false;
if (actor == player) { GENERATE_ACTION_RM('A'); }
}
i = multiple_object-->0;
FollowRulebook(MULTIPLE_ACTION_PROCESSING_RB);
if ((multiple_object-->0 == 1) && (i > 1)) {
multiflag = false;
if (inp1 == 0) noun = multiple_object-->1;
if ((inp2 == 0) && (parser_results-->NO_INPS_PRES >= 2))
second = multiple_object-->1;
}
if (multiple_object-->0 == 0) rfalse;
}
if (multiflag) {
GenerateMultipleActions();
multiflag = false;
} else BeginAction(action, noun, second);
if ((actor ~= player) || (act_requester)) action = ##Wait;
actor = player; act_requester = 0;
if (meta) { RulebookSucceeds(); rtrue; }
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Generate Multiple Actions
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ GenerateMultipleActions initial_location k item;
initial_location = location;
for (k=1: k<=multiple_object-->0: k++) {
item = multiple_object-->k;
RunParagraphOn();
if (inp1 == 0) { inp1 = item; BeginAction(action, item, second, item); inp1 = 0; }
else { inp2 = item; BeginAction(action, noun, item, item); inp2 = 0; }
if (deadflag) return;
if (location ~= initial_location) {
if (player == actor) { ACTION_PROCESSING_INTERNAL_RM('J'); new_line; }
return;
}
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Timed Events Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ TIMED_EVENTS_R i d event_timer fire rule;
for (i=1: i<=(TimedEventsTable-->0): i++)
if ((rule=TimedEventsTable-->i) ~= 0) {
event_timer = TimedEventTimesTable-->i; fire = false;
if (event_timer<0) {
(TimedEventTimesTable-->i)++;
if (TimedEventTimesTable-->i == 0) fire = true;
} else {
d = (the_time - event_timer + TWENTY_FOUR_HOURS) % TWENTY_FOUR_HOURS;
if ((d >= 0) && (d < 30)) fire = true;
}
if (fire) {
TimedEventsTable-->i = 0;
FollowRulebook(rule);
}
}
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Setting Timed Events
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ SetTimedEvent rule event_time absolute_time i b;
for (i=1: i<=(TimedEventsTable-->0): i++) {
if (rule == TimedEventsTable-->i) { b=i; break; }
if ((b==0) && (TimedEventsTable-->i == 0)) b=i;
}
if (b==0) return RunTimeProblem(RTP_TOOMANYEVENTS);
TimedEventsTable-->b = rule;
if (absolute_time) TimedEventTimesTable-->b = event_time;
else TimedEventTimesTable-->b = -event_time;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Setting Time Of Day
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Global time_step;
[ SetTime t s;
the_time = t; time_rate = s; time_step = 0;
if (s < 0) time_step = 0-s;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Advance Time Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ADVANCE_TIME_R;
turns++;
if (the_time ~= NULL) {
if (time_rate >= 0) the_time = the_time+time_rate;
else {
time_step--;
if (time_step == 0) {
the_time++;
time_step = -time_rate;
}
}
the_time = the_time % TWENTY_FOUR_HOURS;
}
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Note Object Acquisitions Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ NOTE_OBJECT_ACQUISITIONS_R obj;
objectloop (obj in player) give obj moved;
objectloop (obj has concealed)
if (IndirectlyContains(player, obj)) give obj ~concealed;
#Ifdef RUCKSACK_CLASS;
objectloop (obj in player)
if (obj ofclass RUCKSACK_CLASS)
SACK_OBJECT = obj;
objectloop (obj ofclass RUCKSACK_CLASS && obj provides component_parent
&& obj.component_parent == player)
SACK_OBJECT = obj;
#Endif;
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Resurrect Player If Asked Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ RESURRECT_PLAYER_IF_ASKED_R;
if (resurrect_please) {
RulebookSucceeds(); resurrect_please = false;
deadflag = 0; story_complete = false; rtrue;
}
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Ask The Final Question Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ASK_FINAL_QUESTION_R;
print "^";
while (true) {
CarryOutActivity(DEALING_WITH_FINAL_QUESTION_ACT);
DivideParagraphPoint();
if (resurrect_please) rtrue;
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Read The Final Answer Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ READ_FINAL_ANSWER_R;
DrawStatusLine();
KeyboardPrimitive(buffer, parse);
players_command = 100 + WordCount();
num_words = WordCount();
wn = 1;
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Immediately Restart VM Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ IMMEDIATELY_RESTART_VM_R; @restart; ];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Immediately Restore Saved Game Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ IMMEDIATELY_RESTORE_SAVED_R; actor = player; RESTORE_THE_GAME_R(); ];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Immediately Quit Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ IMMEDIATELY_QUIT_R; @quit; ];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Immediately Undo Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ IMMEDIATELY_UNDO_R; Perform_Undo(); ];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Print Obituary Headline Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ PRINT_OBITUARY_HEADLINE_R;
print "^^ ";
VM_Style(ALERT_VMSTY);
print "***";
if (deadflag == 1) PRINT_OBITUARY_HEADLINE_RM('A');
if (deadflag == 2) PRINT_OBITUARY_HEADLINE_RM('B');
if (deadflag == 3) PRINT_OBITUARY_HEADLINE_RM('C');
if (deadflag ~= 0 or 1 or 2 or 3) {
print " ";
TEXT_TY_Say(deadflag);
print " ";
}
print "***";
VM_Style(NORMAL_VMSTY);
print "^^"; #Ifndef NO_SCORING; print "^"; #Endif;
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Print Final Score Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ PRINT_FINAL_SCORE_R;
#Iftrue USE_SCORING ~= 0; ANNOUNCE_SCORE_R(); #Endif;
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! OrderOfPlay.i6t: Display Final Status Line Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ DISPLAY_FINAL_STATUS_LINE_R;
sline1 = score; sline2 = turns;
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Output.i6t: Properties
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant p3_list_grouping_key = list_together;
Constant p4_printed_name = short_name;
Constant p5_printed_plural_name = plural;
Constant p6_indefinite_article = article;
Constant p7_description = description;
Constant p8_map_region = map_region;
Constant p9_initial_appearance = initial;
Constant p11_other_side = door_to;
Constant p12_carrying_capacity = capacity;
Constant p13_matching_key = with_key;
Constant p15_plural_named = pluralname;
Constant p17_proper_named = proper;
Constant p19_ambiguously_plural = ambigpluralname;
Constant p20_privately_named = privately_named;
Constant p22_lighted = light;
Constant p24_visited = visited;
Constant p26_lit = light;
Constant p28_edible = edible;
Constant p30_fixed_in_place = static;
Constant p32_scenery = scenery;
Constant p33_wearable = clothing;
Constant p34_pushable_between_rooms = pushable;
Constant p35_handled = moved;
Constant p37_undescribed = concealed;
Constant p38_marked_for_listing = workflag;
Constant p40_mentioned = mentioned;
Constant p42_enterable = enterable;
Constant p44_transparent = transparent;
Constant p45_open = open;
Constant p47_openable = openable;
Constant p49_lockable = lockable;
Constant p50_locked = locked;
Constant p52_female = female;
Constant p54_neuter = neuter;
Constant p55_switched_on = on;
Constant p59 = vector;
Constant p60 = room_index;
Constant p61 = door_dir;
Constant p62 = door_to;
Constant p63 = absent;
Constant p64 = cap_short_name;
Constant p65 = mark_as_room;
Constant p66 = mark_as_thing;
Constant p67 = component_parent;
Constant p68 = component_child;
Constant p69 = component_sibling;
Constant p70 = regional_found_in;
Constant p71 = IK1_Count;
Constant p72 = IK1_Link;
Constant p73 = IK2_Count;
Constant p74 = IK2_Link;
Constant p75 = IK3_Count;
Constant p76 = IK3_Link;
Constant p77 = IK4_Count;
Constant p78 = IK4_Link;
Constant p79 = IK5_Count;
Constant p80 = IK5_Link;
Constant p81 = IK6_Count;
Constant p82 = IK6_Link;
Constant p83 = IK7_Count;
Constant p84 = IK7_Link;
Constant p85 = IK8_Count;
Constant p86 = IK8_Link;
Constant p87 = IK9_Count;
Constant p88 = IK9_Link;
Constant p89 = IK10_Count;
Constant p90 = IK10_Link;
Constant p91 = IK11_Count;
Constant p92 = IK11_Link;
Constant p93 = IK12_Count;
Constant p94 = IK12_Link;
Constant p95 = IK13_Count;
Constant p96 = IK13_Link;
Constant p97 = IK14_Count;
Constant p98 = IK14_Link;
Constant p99 = IK15_Count;
Constant p100 = IK15_Link;
Constant p101 = KD_Count;
Constant p102 = name;
Constant p103 = parse_name;
Constant p104 = action_bitmap;
Constant FBNA_PROP_NUMBER = p57_recurring;
Object property_numberspace_forcer
with p57_recurring false
;
Array property_metadata -->
! offset 0: property p0_specification
"specification" NULL
! offset 2: property p1_indefinite_appearance_tex
"indefinite appearance text" NULL
! offset 4: property p2_variable_initial_value
"variable initial value" K1_room K2_thing K3_direction K9_region NULL
! offset 10: property list_together
"list grouping key" K1_room K2_thing K3_direction K9_region NULL
! offset 16: property short_name
"printed name" K1_room K2_thing K3_direction K9_region NULL
! offset 22: property plural
"printed plural name" K1_room K2_thing K3_direction K9_region NULL
! offset 28: property article
"indefinite article" K1_room K2_thing K3_direction K9_region NULL
! offset 34: property description
"description" K1_room K2_thing NULL
! offset 38: property map_region
"map region" K1_room NULL
! offset 41: property initial
"initial appearance" K2_thing NULL
! offset 44: property p10_opposite
"opposite" K3_direction NULL
! offset 47: property door_to
"other side" K4_door NULL
! offset 50: property capacity
"carrying capacity" K5_container K6_supporter K8_person NULL
! offset 55: property with_key
"matching key" K2_thing K4_door K5_container NULL
! offset 60: property p14_adaptive_text_viewpoint
"adaptive text viewpoint" NULL
! offset 62: property pluralname
"plural-named" K1_room K2_thing K3_direction K9_region NULL
! offset 68: property proper
"proper-named" K1_room K2_thing K3_direction K9_region NULL
! offset 74: property ambigpluralname
"ambiguously plural" K1_room K2_thing K3_direction K9_region NULL
! offset 80: property privately_named
"privately-named" K1_room K2_thing K3_direction K9_region NULL
! offset 86: property light
"lighted" K1_room K2_thing NULL
! offset 90: property visited
"visited" K1_room NULL
! offset 93: property light
"lit" K1_room K2_thing NULL
! offset 97: property edible
"edible" K2_thing NULL
! offset 100: property static
"fixed in place" K2_thing NULL
! offset 103: property scenery
"scenery" K2_thing NULL
! offset 106: property clothing
"wearable" K2_thing NULL
! offset 109: property pushable
"pushable between rooms" K2_thing NULL
! offset 112: property moved
"handled" K2_thing NULL
! offset 115: property concealed
"undescribed" K2_thing NULL
! offset 118: property workflag
"marked for listing" K2_thing K3_direction NULL
! offset 122: property mentioned
"mentioned" K2_thing NULL
! offset 125: property enterable
"enterable" K5_container K6_supporter NULL
! offset 129: property transparent
"transparent" K5_container NULL
! offset 132: property open
"open" K4_door K5_container NULL
! offset 136: property openable
"openable" K4_door K5_container NULL
! offset 140: property lockable
"lockable" K4_door K5_container NULL
! offset 144: property locked
"locked" K4_door K5_container NULL
! offset 148: property female
"female" K8_person NULL
! offset 151: property neuter
"neuter" K8_person NULL
! offset 154: property on
"switched on" K13_device NULL
! offset 157: property p57_recurring
"recurring" NULL
! offset 159: property vector
"<nameless>" NULL
! offset 161: property room_index
"<nameless>" NULL
! offset 163: property door_dir
"<nameless>" NULL
! offset 165: property door_to
"<nameless>" K4_door NULL
! offset 168: property absent
"<nameless>" NULL
! offset 170: property cap_short_name
"<nameless>" NULL
! offset 172: property mark_as_room
"<nameless>" NULL
! offset 174: property mark_as_thing
"<nameless>" NULL
! offset 176: property component_parent
"<nameless>" NULL
! offset 178: property component_child
"<nameless>" NULL
! offset 180: property component_sibling
"<nameless>" NULL
! offset 182: property regional_found_in
"<nameless>" NULL
! offset 184: property IK1_Count
"<nameless>" NULL
! offset 186: property IK1_Link
"<nameless>" NULL
! offset 188: property IK2_Count
"<nameless>" NULL
! offset 190: property IK2_Link
"<nameless>" NULL
! offset 192: property IK3_Count
"<nameless>" NULL
! offset 194: property IK3_Link
"<nameless>" NULL
! offset 196: property IK4_Count
"<nameless>" NULL
! offset 198: property IK4_Link
"<nameless>" NULL
! offset 200: property IK5_Count
"<nameless>" NULL
! offset 202: property IK5_Link
"<nameless>" NULL
! offset 204: property IK6_Count
"<nameless>" NULL
! offset 206: property IK6_Link
"<nameless>" NULL
! offset 208: property IK7_Count
"<nameless>" NULL
! offset 210: property IK7_Link
"<nameless>" NULL
! offset 212: property IK8_Count
"<nameless>" NULL
! offset 214: property IK8_Link
"<nameless>" NULL
! offset 216: property IK9_Count
"<nameless>" NULL
! offset 218: property IK9_Link
"<nameless>" NULL
! offset 220: property IK10_Count
"<nameless>" NULL
! offset 222: property IK10_Link
"<nameless>" NULL
! offset 224: property IK11_Count
"<nameless>" NULL
! offset 226: property IK11_Link
"<nameless>" NULL
! offset 228: property IK12_Count
"<nameless>" NULL
! offset 230: property IK12_Link
"<nameless>" NULL
! offset 232: property IK13_Count
"<nameless>" NULL
! offset 234: property IK13_Link
"<nameless>" NULL
! offset 236: property IK14_Count
"<nameless>" NULL
! offset 238: property IK14_Link
"<nameless>" NULL
! offset 240: property IK15_Count
"<nameless>" NULL
! offset 242: property IK15_Link
"<nameless>" NULL
! offset 244: property KD_Count
"<nameless>" NULL
! offset 246: property name
"<nameless>" NULL
! offset 248: property parse_name
"<nameless>" NULL
! offset 250: property action_bitmap
"<nameless>" NULL
;
Constant attributed_property_offsets_SIZE 48;
Array attributed_property_offsets --> attributed_property_offsets_SIZE;
Constant valued_property_offsets_SIZE (100 + 105 + INDIV_PROP_START-48);
Array valued_property_offsets --> valued_property_offsets_SIZE;
[ CreatePropertyOffsets
i ! loop counter
;
for (i=0: i<attributed_property_offsets_SIZE: i++)attributed_property_offsets-->i = -1;
for (i=0: i<valued_property_offsets_SIZE: i++)valued_property_offsets-->i = -1;
valued_property_offsets-->p0_specification = 0;
valued_property_offsets-->p1_indefinite_appearance_tex = 2;
valued_property_offsets-->p2_variable_initial_value = 4;
valued_property_offsets-->list_together = 10;
valued_property_offsets-->short_name = 16;
valued_property_offsets-->plural = 22;
valued_property_offsets-->article = 28;
valued_property_offsets-->description = 34;
valued_property_offsets-->map_region = 38;
valued_property_offsets-->initial = 41;
valued_property_offsets-->p10_opposite = 44;
valued_property_offsets-->door_to = 47;
valued_property_offsets-->capacity = 50;
valued_property_offsets-->with_key = 55;
valued_property_offsets-->p14_adaptive_text_viewpoint = 60;
attributed_property_offsets-->pluralname = 62;
attributed_property_offsets-->proper = 68;
attributed_property_offsets-->ambigpluralname = 74;
attributed_property_offsets-->privately_named = 80;
attributed_property_offsets-->light = 86;
attributed_property_offsets-->visited = 90;
attributed_property_offsets-->light = 93;
attributed_property_offsets-->edible = 97;
attributed_property_offsets-->static = 100;
attributed_property_offsets-->scenery = 103;
attributed_property_offsets-->clothing = 106;
attributed_property_offsets-->pushable = 109;
attributed_property_offsets-->moved = 112;
attributed_property_offsets-->concealed = 115;
attributed_property_offsets-->workflag = 118;
attributed_property_offsets-->mentioned = 122;
attributed_property_offsets-->enterable = 125;
attributed_property_offsets-->transparent = 129;
attributed_property_offsets-->open = 132;
attributed_property_offsets-->openable = 136;
attributed_property_offsets-->lockable = 140;
attributed_property_offsets-->locked = 144;
attributed_property_offsets-->female = 148;
attributed_property_offsets-->neuter = 151;
attributed_property_offsets-->on = 154;
valued_property_offsets-->p57_recurring = 157;
valued_property_offsets-->vector = 159;
valued_property_offsets-->room_index = 161;
valued_property_offsets-->door_dir = 163;
valued_property_offsets-->door_to = 165;
attributed_property_offsets-->absent = 168;
valued_property_offsets-->cap_short_name = 170;
attributed_property_offsets-->mark_as_room = 172;
attributed_property_offsets-->mark_as_thing = 174;
valued_property_offsets-->component_parent = 176;
valued_property_offsets-->component_child = 178;
valued_property_offsets-->component_sibling = 180;
valued_property_offsets-->regional_found_in = 182;
valued_property_offsets-->IK1_Count = 184;
valued_property_offsets-->IK1_Link = 186;
valued_property_offsets-->IK2_Count = 188;
valued_property_offsets-->IK2_Link = 190;
valued_property_offsets-->IK3_Count = 192;
valued_property_offsets-->IK3_Link = 194;
valued_property_offsets-->IK4_Count = 196;
valued_property_offsets-->IK4_Link = 198;
valued_property_offsets-->IK5_Count = 200;
valued_property_offsets-->IK5_Link = 202;
valued_property_offsets-->IK6_Count = 204;
valued_property_offsets-->IK6_Link = 206;
valued_property_offsets-->IK7_Count = 208;
valued_property_offsets-->IK7_Link = 210;
valued_property_offsets-->IK8_Count = 212;
valued_property_offsets-->IK8_Link = 214;
valued_property_offsets-->IK9_Count = 216;
valued_property_offsets-->IK9_Link = 218;
valued_property_offsets-->IK10_Count = 220;
valued_property_offsets-->IK10_Link = 222;
valued_property_offsets-->IK11_Count = 224;
valued_property_offsets-->IK11_Link = 226;
valued_property_offsets-->IK12_Count = 228;
valued_property_offsets-->IK12_Link = 230;
valued_property_offsets-->IK13_Count = 232;
valued_property_offsets-->IK13_Link = 234;
valued_property_offsets-->IK14_Count = 236;
valued_property_offsets-->IK14_Link = 238;
valued_property_offsets-->IK15_Count = 240;
valued_property_offsets-->IK15_Link = 242;
valued_property_offsets-->KD_Count = 244;
valued_property_offsets-->name = 246;
valued_property_offsets-->parse_name = 248;
valued_property_offsets-->action_bitmap = 250;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Output.i6t: Activities
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant NUMBER_RULEBOOKS_CREATED = 362;
Constant V0_printing_the_name = 0;
Constant V1_printing_the_plural_name = 1;
Constant V2_printing_a_number = 2;
Constant V3_printing_room_description = 3;
Constant V4_printing_inventory_detail = 4;
Constant V5_listing_contents = 5;
Constant V6_grouping_together = 6;
Constant V7_writing_a_paragraph_about = 7;
Constant V8_listing_nondescript_items = 8;
Constant V9_printing_the_name_of_a_da = 9;
Constant V10_printing_the_description = 10;
Constant V11_printing_the_announcemen = 11;
Constant V12_printing_the_announcemen = 12;
Constant V13_printing_a_refusal_to_ac = 13;
Constant V14_constructing_the_status_ = 14;
Constant V15_printing_the_banner_text = 15;
Constant V16_reading_a_command = 16;
Constant V17_deciding_the_scope = 17;
Constant V18_deciding_the_concealed_p = 18;
Constant V19_deciding_whether_all_inc = 19;
Constant V20_clarifying_the_parser_s_ = 20;
Constant V21_asking_which_do_you_mean = 21;
Constant V22_printing_a_parser_error = 22;
Constant V23_supplying_a_missing_noun = 23;
Constant V24_supplying_a_missing_seco = 24;
Constant V25_implicitly_taking = 25;
Constant V26_starting_the_virtual_mac = 26;
Constant V27_amusing_a_victorious_pla = 27;
Constant V28_printing_the_player_s_ob = 28;
Constant V29_handling_the_final_quest = 29;
Constant V30_printing_the_locale_desc = 30;
Constant V31_choosing_notable_locale_ = 31;
Constant V32_printing_a_locale_paragr = 32;
Constant V33_issuing_the_response_tex = 33;
Array Activity_before_rulebooks --> 29 32 35 38 41 44 47 50 53 56 59 62 65 68 71 74 77 80 83 86 89 92 95 98 101 104 107 110 113 116 119 122 125 128 NULL;
Array Activity_for_rulebooks --> 30 33 36 39 42 45 48 51 54 57 60 63 66 69 72 75 78 81 84 87 90 93 96 99 102 105 108 111 114 117 120 123 126 129 NULL;
Array Activity_after_rulebooks --> 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88 91 94 97 100 103 106 109 112 115 118 121 124 127 130 NULL;
Array Activity_atb_rulebooks -> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 $ff;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Output.i6t: Relations
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant RELS_SYMMETRIC $8000;
Constant RELS_EQUIVALENCE $4000;
Constant RELS_X_UNIQUE $2000;
Constant RELS_Y_UNIQUE $1000;
Constant RELS_TEST $0800;
Constant RELS_ASSERT_TRUE $0400;
Constant RELS_ASSERT_FALSE $0200;
Constant RELS_SHOW $0100;
Constant RELS_ROUTE_FIND $0080;
Constant RELS_ROUTE_FIND_COUNT $0040;
Constant RELS_LOOKUP_ANY $0008;
Constant RELS_LOOKUP_ALL_X $0004;
Constant RELS_LOOKUP_ALL_Y $0002;
Constant RELS_LIST $0001;
#Iftrue (WORDSIZE == 2);
Constant REL_BLOCK_HEADER ($100*5 + $$1101);
#Ifnot;
Constant REL_BLOCK_HEADER ($100*6 + $$1101)*$10000;
#Endif;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Output.i6t: Printing Routines
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ PrintSceneName
value ! Implied call parameter
;
switch(value) {
I82_entire_game: print "Entire Game";
default: print "<illegal scene>";
}
];
[ A_PrintSceneName
value ! Implied call parameter
;
return (value % 1)+1;
];
[ B_PrintSceneName
value ! Implied call parameter
;
return ((value+-1) % 1)+1;
];
[ R_PrintSceneName
a ! Implied call parameter
b ! Implied call parameter
;
if (a == 0 && b == 0) return (random(1));
if (a == b) return b;
if (a > b) return b+(random(MAX_POSITIVE_NUMBER) % (a-b+1));
return a+(random(MAX_POSITIVE_NUMBER) % (b-a+1));
];
[ PrintFigureName
value ! Implied call parameter
;
switch(value) {
I81_figure_of_cover: print "Figure of cover";
default: print "<illegal figure name>";
}
];
[ A_PrintFigureName
value ! Implied call parameter
;
return (value % 1)+1;
];
[ B_PrintFigureName
value ! Implied call parameter
;
return ((value+-1) % 1)+1;
];
[ R_PrintFigureName
a ! Implied call parameter
b ! Implied call parameter
;
if (a == 0 && b == 0) return (random(1));
if (a == b) return b;
if (a > b) return b+(random(MAX_POSITIVE_NUMBER) % (a-b+1));
return a+(random(MAX_POSITIVE_NUMBER) % (b-a+1));
];
[ PrintSoundName
value ! Implied call parameter
;
switch(value) {
default: print "<illegal sound name>";
}
];
[ A_PrintSoundName
value ! Implied call parameter
;
return (value % 0)+1;
];
[ B_PrintSoundName
value ! Implied call parameter
;
return ((value+-2) % 0)+1;
];
[ R_PrintSoundName
a ! Implied call parameter
b ! Implied call parameter
;
if (a == 0 && b == 0) return (random(0));
if (a == b) return b;
if (a > b) return b+(random(MAX_POSITIVE_NUMBER) % (a-b+1));
return a+(random(MAX_POSITIVE_NUMBER) % (b-a+1));
];
[ PrintExternalFileName
value ! Implied call parameter
;
switch(value) {
default: print "<illegal external file>";
}
];
[ A_PrintExternalFileName
value ! Implied call parameter
;
return (value % 0)+1;
];
[ B_PrintExternalFileName
value ! Implied call parameter
;
return ((value+-2) % 0)+1;
];
[ R_PrintExternalFileName
a ! Implied call parameter
b ! Implied call parameter
;
if (a == 0 && b == 0) return (random(0));
if (a == b) return b;
if (a > b) return b+(random(MAX_POSITIVE_NUMBER) % (a-b+1));
return a+(random(MAX_POSITIVE_NUMBER) % (b-a+1));
];
[ E65
value ! Implied call parameter
;
switch(value) {
I75_english_language: print "English language";
I76_french_language: print "French language";
I77_german_language: print "German language";
I78_italian_language: print "Italian language";
I79_spanish_language: print "Spanish language";
I80_swedish_language: print "Swedish language";
default: print "<illegal natural language>";
}
];
[ A_E65
value ! Implied call parameter
;
return (value % 6)+1;
];
[ B_E65
value ! Implied call parameter
;
return ((value+4) % 6)+1;
];
[ R_E65
a ! Implied call parameter
b ! Implied call parameter
;
if (a == 0 && b == 0) return (random(6));
if (a == b) return b;
if (a > b) return b+(random(MAX_POSITIVE_NUMBER) % (a-b+1));
return a+(random(MAX_POSITIVE_NUMBER) % (b-a+1));
];
[ E66
value ! Implied call parameter
;
switch(value) {
I84_didn_t_understand_error: print "didn't understand error";
I85_only_understood_as_far_a: print "only understood as far as error";
I86_didn_t_understand_that_n: print "didn't understand that number error";
I87_can_only_do_that_to_some: print "can only do that to something animate error";
I88_can_t_see_any_such_thing: print "can't see any such thing error";
I89_said_too_little_error: print "said too little error";
I90_aren_t_holding_that_erro: print "aren't holding that error";
I91_can_t_use_multiple_objec: print "can't use multiple objects error";
I92_can_only_use_multiple_ob: print "can only use multiple objects error";
I93_not_sure_what_it_refers_: print "not sure what it refers to error";
I94_excepted_something_not_i: print "excepted something not included error";
I95_not_a_verb_i_recognise_e: print "not a verb I recognise error";
I96_not_something_you_need_t: print "not something you need to refer to error";
I97_can_t_see_it_at_the_mome: print "can't see it at the moment error";
I98_didn_t_understand_the_wa: print "didn't understand the way that finished error";
I99_not_enough_of_those_avai: print "not enough of those available error";
I100_nothing_to_do_error: print "nothing to do error";
I101_noun_did_not_make_sense: print "noun did not make sense in that context error";
I102_referred_to_a_determina: print "referred to a determination of scope error";
I103_i_beg_your_pardon_error: print "I beg your pardon error";
I104_can_t_again_the_address: print "can't again the addressee error";
I105_comma_can_t_begin_error: print "comma can't begin error";
I106_can_t_see_whom_to_talk_: print "can't see whom to talk to error";
I107_can_t_talk_to_inanimate: print "can't talk to inanimate things error";
I108_didn_t_understand_addre: print "didn't understand addressee's last name error";
default: print "<illegal command parser error>";
}
];
[ A_E66
value ! Implied call parameter
;
return (value % 25)+1;
];
[ B_E66
value ! Implied call parameter
;
return ((value+23) % 25)+1;
];
[ R_E66
a ! Implied call parameter
b ! Implied call parameter
;
if (a == 0 && b == 0) return (random(25));
if (a == b) return b;
if (a > b) return b+(random(MAX_POSITIVE_NUMBER) % (a-b+1));
return a+(random(MAX_POSITIVE_NUMBER) % (b-a+1));
];
[ E67
value ! Implied call parameter
;
switch(value) {
I110_present_tense: print "present tense";
I111_past_tense: print "past tense";
I112_perfect_tense: print "perfect tense";
I113_past_perfect_tense: print "past perfect tense";
I114_future_tense: print "future tense";
default: print "<illegal grammatical tense>";
}
];
[ A_E67
value ! Implied call parameter
;
return (value % 5)+1;
];
[ B_E67
value ! Implied call parameter
;
return ((value+3) % 5)+1;
];
[ R_E67
a ! Implied call parameter
b ! Implied call parameter
;
if (a == 0 && b == 0) return (random(5));
if (a == b) return b;
if (a > b) return b+(random(MAX_POSITIVE_NUMBER) % (a-b+1));
return a+(random(MAX_POSITIVE_NUMBER) % (b-a+1));
];
[ E68
value ! Implied call parameter
;
switch(value) {
I116_first_person_singular: print "first person singular";
I117_second_person_singular: print "second person singular";
I118_third_person_singular: print "third person singular";
I119_first_person_plural: print "first person plural";
I120_second_person_plural: print "second person plural";
I121_third_person_plural: print "third person plural";
default: print "<illegal narrative viewpoint>";
}
];
[ A_E68
value ! Implied call parameter
;
return (value % 6)+1;
];
[ B_E68
value ! Implied call parameter
;
return ((value+4) % 6)+1;
];
[ R_E68
a ! Implied call parameter
b ! Implied call parameter
;
if (a == 0 && b == 0) return (random(6));
if (a == b) return b;
if (a > b) return b+(random(MAX_POSITIVE_NUMBER) % (a-b+1));
return a+(random(MAX_POSITIVE_NUMBER) % (b-a+1));
];
[ E69
value ! Implied call parameter
;
switch(value) {
I123_nominative: print "nominative";
I124_accusative: print "accusative";
default: print "<illegal grammatical case>";
}
];
[ A_E69
value ! Implied call parameter
;
return (value % 2)+1;
];
[ B_E69
value ! Implied call parameter
;
return ((value+0) % 2)+1;
];
[ R_E69
a ! Implied call parameter
b ! Implied call parameter
;
if (a == 0 && b == 0) return (random(2));
if (a == b) return b;
if (a > b) return b+(random(MAX_POSITIVE_NUMBER) % (a-b+1));
return a+(random(MAX_POSITIVE_NUMBER) % (b-a+1));
];
[ E70
value ! Implied call parameter
;
switch(value) {
I126_neuter_gender: print "neuter gender";
I127_masculine_gender: print "masculine gender";
I128_feminine_gender: print "feminine gender";
default: print "<illegal grammatical gender>";
}
];
[ A_E70
value ! Implied call parameter
;
return (value % 3)+1;
];
[ B_E70
value ! Implied call parameter
;
return ((value+1) % 3)+1;
];
[ R_E70
a ! Implied call parameter
b ! Implied call parameter
;
if (a == 0 && b == 0) return (random(3));
if (a == b) return b;
if (a > b) return b+(random(MAX_POSITIVE_NUMBER) % (a-b+1));
return a+(random(MAX_POSITIVE_NUMBER) % (b-a+1));
];
[ PrintKindValuePair
k ! Implied call parameter
v ! Implied call parameter
;
k = KindAtomic(k);
switch(k) {
2: print (DA_Number) v;
3: print (DA_Number) v;
4: print (DA_Number) v;
5: print (DA_Number) v;
6: print (DA_Number) v;
7: print (DA_Number) v;
8: print (DA_Number) v;
9: print (DA_Number) v;
10: print (PrintShortName) v;
11: print (DecimalNumber) v;
12: print (REAL_NUMBER_TY_Say) v;
13: print (DA_TruthState) v;
14: print (TEXT_TY_Say) v;
15: print (DecimalNumber) v;
16: print (PrintUseOption) v;
17: print (PrintResponse) v;
18: print (PrintVerbAsValue) v;
19: print (PrintSnippet) v;
20: print (PrintTableName) v;
21: print (DA_Number) v;
22: print (RulebookOutcomePrintingRule) v;
23: print (DecimalNumber) v;
25: print (DecimalNumber) v;
27: print (SayPhraseName) v;
28: print (DecimalNumber) v;
29: print (DecimalNumber) v;
30: print (RELATION_TY_Say) v;
31: print (RulePrintingRule) v;
32: print (RulePrintingRule) v;
33: print (DecimalNumber) v;
34: print (LIST_OF_TY_Say) v;
35: print (DecimalNumber) v;
36: print (PROPERTY_TY_Say) v;
37: print (DecimalNumber) v;
38: print (COMBINATION_TY_Say) v;
39: print (DecimalNumber) v;
40: print (STORED_ACTION_TY_Say) v;
41: print (SayActionName) v;
42: print (PrintTimeOfDay) v;
43: print (PrintSceneName) v;
44: print (PrintFigureName) v;
45: print (COUPLE_TY_Say) v;
46: print (CRATE_TY_Say) v;
47: print (OPTION_TY_Say) v;
48: print (RESULT_TY_Say) v;
49: print (PrintSoundName) v;
50: print (PrintExternalFileName) v;
51: print (E65) v;
52: print (E66) v;
53: print (E67) v;
54: print (E68) v;
55: print (E69) v;
56: print (E70) v;
default: print v;
}
];
[ DefaultValueOfKOV
sk ! Implied call parameter
k ! weak kind ID
;
k = KindAtomic(sk);
switch(k) {
10: return nothing;
11: return 0;
12: return 0;
13: return false;
14: return BlkValueCreate(sk);
15: return 32;
16: return 0;
17: return 0;
18: return ConjugateVerb_0;
19: return 101;
20: return TheEmptyTable;
21: return 0;
22: return RBNO_0;
23: return DefaultTopic;
25: return ;
34: return BlkValueCreate(sk);
39: return ;
40: return BlkValueCreate(sk);
41: return ##Wait;
42: return 540;
43: return I82_entire_game;
44: return I81_figure_of_cover;
46: return BlkValueCreate(sk);
49: return ;
50: return ;
51: return I75_english_language;
52: return I84_didn_t_understand_error;
53: return I110_present_tense;
54: return I116_first_person_singular;
55: return I123_nominative;
56: return I126_neuter_gender;
default: return 0;
}
];
[ KOVComparisonFunction
k ! Implied call parameter
;
k = KindAtomic(k);
switch(k) {
10: return UnsignedCompare;
12: return REAL_NUMBER_TY_Compare;
13: return UnsignedCompare;
14: return BlkValueCompare;
15: return UnsignedCompare;
16: return UnsignedCompare;
17: return UnsignedCompare;
18: return UnsignedCompare;
19: return UnsignedCompare;
20: return UnsignedCompare;
21: return UnsignedCompare;
22: return UnsignedCompare;
23: return UnsignedCompare;
25: return UnsignedCompare;
34: return BlkValueCompare;
39: return UnsignedCompare;
40: return BlkValueCompare;
41: return UnsignedCompare;
43: return UnsignedCompare;
44: return UnsignedCompare;
46: return BlkValueCompare;
49: return UnsignedCompare;
50: return UnsignedCompare;
default: return 0;
}
];
[ KOVDomainSize
k ! Implied call parameter
;
k = KindAtomic(k);
switch(k) {
43: return 1;
44: return 1;
49: return 0;
50: return 0;
51: return 6;
52: return 25;
53: return 5;
54: return 6;
55: return 2;
56: return 3;
default: return 0;
}
];
[ KOVIsBlockValue
k ! Implied call parameter
;
k = KindAtomic(k);
if (k == 14 or 30 or 34 or 38 or 40 or 45 or 46 or 47 or 48) rtrue;
rfalse;
];
[ KOVSupportFunction
k ! Implied call parameter
fail ! Implied call parameter
;
k = KindAtomic(k);
switch(k) {
14: return TEXT_TY_Support;
30: return RELATION_TY_Support;
34: return LIST_OF_TY_Support;
38: return COMBINATION_TY_Support;
40: return STORED_ACTION_TY_Support;
45: return COUPLE_TY_Support;
46: return CRATE_TY_Support;
47: return OPTION_TY_Support;
48: return RESULT_TY_Support;
}
if (fail) BlkValueError(fail);
rfalse;
];
[ I7_Kind_Name
k ! Implied call parameter
;
if (k == K1_room) print "room";
if (k == K2_thing) print "thing";
if (k == K3_direction) print "direction";
if (k == K4_door) print "door";
if (k == K5_container) print "container";
if (k == K6_supporter) print "supporter";
if (k == K7_backdrop) print "backdrop";
if (k == K8_person) print "person";
if (k == K9_region) print "region";
if (k == K10_man) print "man";
if (k == K11_woman) print "woman";
if (k == K12_animal) print "animal";
if (k == K13_device) print "device";
if (k == K14_vehicle) print "vehicle";
if (k == K15_player_s_holdall) print "player's holdall";
];
Constant RBNO_0 = "allow access";
Constant RBNO_1 = "deny access";
Constant RBNO_2 = "there is sufficient light";
Constant RBNO_3 = "there is insufficient light";
Constant RBNO_4 = "persuasion succeeds";
Constant RBNO_5 = "persuasion fails";
Constant RBNO_6 = "it is very likely";
Constant RBNO_7 = "it is likely";
Constant RBNO_8 = "it is possible";
Constant RBNO_9 = "it is unlikely";
Constant RBNO_10 = "it is very unlikely";
Constant RBNO_11 = "it does not";
Constant RBNO_12 = "it does";
[ RulebookOutcomePrintingRule
rbno ! Implied call parameter
;
if (rbno == 0) print "(no outcome)";
else print (string) rbno; rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Output.i6t: Object Tree
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Array KindHierarchy --> K0_kind (0) K1_room (0) K2_thing (0) K3_direction (0) K4_door (2) K5_container (2) K6_supporter (2) K7_backdrop (2) K8_person (2) K9_region (0) K10_man (8) K11_woman (8) K12_animal (8) K13_device (2) K14_vehicle (5) K15_player_s_holdall (5) ;
Constant IK1_First = I129_lab;
Constant IK2_First = selfobj;
Constant IK3_First = I55_north;
Constant IK4_First = nothing;
Constant IK5_First = nothing;
Constant IK6_First = nothing;
Constant IK7_First = nothing;
Constant IK8_First = selfobj;
Constant IK9_First = nothing;
Constant IK10_First = nothing;
Constant IK11_First = nothing;
Constant IK12_First = nothing;
Constant IK13_First = nothing;
Constant IK14_First = nothing;
Constant IK15_First = nothing;
Constant No_Directions = 12;
! Table of direction object alias constants:
Constant DirectionObject_0 = I55_north;
Constant DirectionObject_1 = I56_northeast;
Constant DirectionObject_2 = I57_northwest;
Constant DirectionObject_3 = I58_south;
Constant DirectionObject_4 = I59_southeast;
Constant DirectionObject_5 = I60_southwest;
Constant DirectionObject_6 = I61_east;
Constant DirectionObject_7 = I62_west;
Constant DirectionObject_8 = I63_up;
Constant DirectionObject_9 = I64_down;
Constant DirectionObject_10 = in_obj;
Constant DirectionObject_11 = out_obj;
Array Map_Storage -->
0 0 0 0 0 0 0 0 0 0 0 0 ! Exits from: I129_lab
;
Class VPH_Class;
Array KOV_representatives --> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ValuePropertyHolder_43 0 0 0 0 0 0 0 ValuePropertyHolder_51 0 0 0 0 0 ;
VPH_Class ValuePropertyHolder_43
with value_range 1
with p57_recurring KOVP_43_P57
with description KOVP_43_P7
;
! Storage for property p57_recurring of kind SCENE_TY
Array KOVP_43_P57 table 0 0 (true) ;
! Storage for property description of kind SCENE_TY
Array KOVP_43_P7 table 0 0 (BC_2) ;
VPH_Class ValuePropertyHolder_51
with value_range 6
with p14_adaptive_text_viewpoint KOVP_51_P14
;
! Storage for property p14_adaptive_text_viewpoint of kind
Array KOVP_51_P14 table 0 0 (I119_first_person_plural) (I116_first_person_singular) (I116_first_person_singular) (I116_first_person_singular) (I116_first_person_singular) (I116_first_person_singular) ;
Class K0_kind
has ~pluralname
has ~proper
with list_together BC_3
with short_name BC_4
with plural BC_5
with article BC_6
has ~ambigpluralname
;
Class K1_room
class K0_kind
with description BC_7
with map_region nothing
has ~privately_named
has light
has ~visited
with list_together BC_8
with short_name BC_9
with plural BC_10
with article BC_11
;
Class K2_thing
class K0_kind
has ~privately_named
has ~light
has ~edible
has ~static
has ~concealed
has ~workflag
has mentioned
with component_parent nothing
with component_child nothing
with component_sibling nothing
with action_bitmap 0 0 0 0 0
has ~scenery
has ~clothing
has ~pushable
has ~moved
with description BC_12
with initial BC_13
with with_key nothing
with list_together BC_14
with short_name BC_15
with plural BC_16
with article BC_17
;
Class K6_supporter
class K2_thing
has transparent supporter
with plural BC_18
with capacity 100
has static
has ~enterable
with description BC_19
with initial BC_20
with list_together BC_21
with short_name BC_22
with article BC_23
;
Class K8_person
class K2_thing
has transparent animate
with before NULL,
with plural BC_24
with capacity 100
has ~female
has ~neuter
with description BC_25
with initial BC_26
with list_together BC_27
with short_name BC_28
with article BC_29
;
Class K10_man
class K8_person
with plural BC_30
has ~female
has ~neuter
with description BC_31
with initial BC_32
with list_together BC_33
with short_name BC_34
with article BC_35
;
Class K11_woman
class K8_person
with plural BC_36
has female
has ~neuter
with description BC_37
with initial BC_38
with list_together BC_39
with short_name BC_40
with article BC_41
;
Class K12_animal
class K8_person
with plural BC_42
with description BC_43
with initial BC_44
with list_together BC_45
with short_name BC_46
with article BC_47
;
Class K4_door
class K2_thing
has door,
with plural BC_48
has static
has ~pushable
has ~open
has openable
has ~lockable
has ~locked
with door_to nothing
with with_key nothing
with description BC_49
with initial BC_50
with list_together BC_51
with short_name BC_52
with article BC_53
;
Class K5_container
class K2_thing
has container,
with plural BC_54
with capacity 100
has ~transparent
has open
has ~openable
has ~lockable
has ~locked
has ~enterable
with with_key nothing
with description BC_55
with initial BC_56
with list_together BC_57
with short_name BC_58
with article BC_59
;
Class K14_vehicle
class K5_container
with plural BC_60
has static
has enterable
with description BC_61
with initial BC_62
with list_together BC_63
with short_name BC_64
with article BC_65
;
Class K15_player_s_holdall
class K5_container
with plural BC_66
has ~static
has openable
with description BC_67
with initial BC_68
with list_together BC_69
with short_name BC_70
with article BC_71
;
Class K7_backdrop
class K2_thing
with plural BC_72
has static
has scenery
has ~pushable
with description BC_73
with initial BC_74
with list_together BC_75
with short_name BC_76
with article BC_77
;
Class K13_device
class K2_thing
has switchable,
with plural BC_78
has ~on
with description BC_79
with initial BC_80
with list_together BC_81
with short_name BC_82
with article BC_83
;
Class K9_region
class K0_kind
with plural BC_84
has ~privately_named
with list_together BC_85
with short_name BC_86
with article BC_87
;
Class K3_direction
class K0_kind
has scenery, ! class CompassDirection,
with plural BC_88
has ~privately_named
has ~workflag
with p10_opposite I55_north
with list_together BC_89
with short_name BC_90
with article BC_91
;
Object I55_north "" Compass
class K3_direction
with short_name BC_92
with article BC_93
with p10_opposite I58_south
with vector 0
with IK3_Count 0
with IK3_Link I56_northeast
with KD_Count 3
with name 'north' 'directions//p' 'n//'
with parse_name Parse_Name_GV1
with action_bitmap 0 0 0 0 0
with list_together BC_94
with plural BC_95
;
Object I56_northeast "" Compass
class K3_direction
with short_name BC_96
with article BC_97
with p10_opposite I60_southwest
with vector 0
with IK3_Count 1
with IK3_Link I57_northwest
with KD_Count 3
with name 'northeast' 'directions//p' 'ne'
with parse_name Parse_Name_GV2
with action_bitmap 0 0 0 0 0
with list_together BC_98
with plural BC_99
;
Object I57_northwest "" Compass
class K3_direction
with short_name BC_100
with article BC_101
with p10_opposite I59_southeast
with vector 0
with IK3_Count 2
with IK3_Link I58_south
with KD_Count 3
with name 'northwest' 'directions//p' 'nw'
with parse_name Parse_Name_GV3
with action_bitmap 0 0 0 0 0
with list_together BC_102
with plural BC_103
;
Object I58_south "" Compass
class K3_direction
with short_name BC_104
with article BC_105
with p10_opposite I55_north
with vector 0
with IK3_Count 3
with IK3_Link I59_southeast
with KD_Count 3
with name 'south' 'directions//p' 's//'
with parse_name Parse_Name_GV4
with action_bitmap 0 0 0 0 0
with list_together BC_106
with plural BC_107
;
Object I59_southeast "" Compass
class K3_direction
with short_name BC_108
with article BC_109
with p10_opposite I57_northwest
with vector 0
with IK3_Count 4
with IK3_Link I60_southwest
with KD_Count 3
with name 'southeast' 'directions//p' 'se'
with parse_name Parse_Name_GV5
with action_bitmap 0 0 0 0 0
with list_together BC_110
with plural BC_111
;
Object I60_southwest "" Compass
class K3_direction
with short_name BC_112
with article BC_113
with p10_opposite I56_northeast
with vector 0
with IK3_Count 5
with IK3_Link I61_east
with KD_Count 3
with name 'southwest' 'directions//p' 'sw'
with parse_name Parse_Name_GV6
with action_bitmap 0 0 0 0 0
with list_together BC_114
with plural BC_115
;
Object I61_east "" Compass
class K3_direction
with short_name BC_116
with article BC_117
with p10_opposite I62_west
with vector 0
with IK3_Count 6
with IK3_Link I62_west
with KD_Count 3
with name 'east' 'directions//p' 'e//'
with parse_name Parse_Name_GV7
with action_bitmap 0 0 0 0 0
with list_together BC_118
with plural BC_119
;
Object I62_west "" Compass
class K3_direction
with short_name BC_120
with article BC_121
with p10_opposite I61_east
with vector 0
with IK3_Count 7
with IK3_Link I63_up
with KD_Count 3
with name 'west' 'directions//p' 'w//'
with parse_name Parse_Name_GV8
with action_bitmap 0 0 0 0 0
with list_together BC_122
with plural BC_123
;
Object I63_up "" Compass
class K3_direction
with short_name BC_124
with article BC_125
with p10_opposite I64_down
with vector 0
with IK3_Count 8
with IK3_Link I64_down
with KD_Count 3
with name 'up' 'directions//p' 'u//'
with parse_name Parse_Name_GV9
with action_bitmap 0 0 0 0 0
with list_together BC_126
with plural BC_127
;
Object I64_down "" Compass
class K3_direction
with short_name BC_128
with article BC_129
with p10_opposite I63_up
with vector 0
with IK3_Count 9
with IK3_Link in_obj
with KD_Count 3
with name 'down' 'directions//p' 'd//'
with parse_name Parse_Name_GV10
with action_bitmap 0 0 0 0 0
with list_together BC_130
with plural BC_131
;
Object in_obj "" Compass
class K3_direction
with short_name BC_132
with article BC_133
with p10_opposite out_obj
with vector 0
with IK3_Count 10
with IK3_Link out_obj
with KD_Count 3
with name 'inside' 'directions//p' 'in'
with parse_name Parse_Name_GV11
with action_bitmap 0 0 0 0 0
with list_together BC_134
with plural BC_135
;
Object out_obj "" Compass
class K3_direction
with short_name BC_136
with article BC_137
with p10_opposite in_obj
with vector 0
with IK3_Count 11
with IK3_Link nothing
with KD_Count 3
with name 'outside' 'directions//p' 'out'
with parse_name Parse_Name_GV12
with action_bitmap 0 0 0 0 0
with list_together BC_138
with plural BC_139
;
Object selfobj ""
class K8_person
with saved_short_name TX_L_30,
with short_name BC_140
with description BC_141
has proper
has privately_named
has concealed
with vector 0
with cap_short_name BC_142
has mark_as_thing
with IK2_Count 0
with IK2_Link nothing
with IK8_Count 0
with IK8_Link nothing
with KD_Count 8
with parse_name Parse_Name_GV13
with action_bitmap 0 0 0 0 0
with initial BC_143
with list_together BC_144
with plural BC_145
with article BC_146
;
Object I129_lab ""
class K1_room
with short_name BC_147
with vector 0
with room_index -1
has mark_as_room
with IK1_Count 0
with IK1_Link nothing
with KD_Count 1
with name 'lab' 'rooms//p'
with description BC_148
with list_together BC_149
with plural BC_150
with article BC_151
;
Constant I75_english_language = 1;
Constant I76_french_language = 2;
Constant I77_german_language = 3;
Constant I78_italian_language = 4;
Constant I79_spanish_language = 5;
Constant I80_swedish_language = 6;
Constant I81_figure_of_cover = 1;
Constant I82_entire_game = 1;
Constant I84_didn_t_understand_error = 1;
Constant I85_only_understood_as_far_a = 2;
Constant I86_didn_t_understand_that_n = 3;
Constant I87_can_only_do_that_to_some = 4;
Constant I88_can_t_see_any_such_thing = 5;
Constant I89_said_too_little_error = 6;
Constant I90_aren_t_holding_that_erro = 7;
Constant I91_can_t_use_multiple_objec = 8;
Constant I92_can_only_use_multiple_ob = 9;
Constant I93_not_sure_what_it_refers_ = 10;
Constant I94_excepted_something_not_i = 11;
Constant I95_not_a_verb_i_recognise_e = 12;
Constant I96_not_something_you_need_t = 13;
Constant I97_can_t_see_it_at_the_mome = 14;
Constant I98_didn_t_understand_the_wa = 15;
Constant I99_not_enough_of_those_avai = 16;
Constant I100_nothing_to_do_error = 17;
Constant I101_noun_did_not_make_sense = 18;
Constant I102_referred_to_a_determina = 19;
Constant I103_i_beg_your_pardon_error = 20;
Constant I104_can_t_again_the_address = 21;
Constant I105_comma_can_t_begin_error = 22;
Constant I106_can_t_see_whom_to_talk_ = 23;
Constant I107_can_t_talk_to_inanimate = 24;
Constant I108_didn_t_understand_addre = 25;
Constant I110_present_tense = 1;
Constant I111_past_tense = 2;
Constant I112_perfect_tense = 3;
Constant I113_past_perfect_tense = 4;
Constant I114_future_tense = 5;
Constant I116_first_person_singular = 1;
Constant I117_second_person_singular = 2;
Constant I118_third_person_singular = 3;
Constant I119_first_person_plural = 4;
Constant I120_second_person_plural = 5;
Constant I121_third_person_plural = 6;
Constant I123_nominative = 1;
Constant I124_accusative = 2;
Constant I126_neuter_gender = 1;
Constant I127_masculine_gender = 2;
Constant I128_feminine_gender = 3;
Array Global_Vars -->
(false) ! 7 darkness witnessed
(BC_152) ! 25 command prompt
(I75_english_language) ! 29 language of play
(BC_153) ! 32 story author
(BC_154) ! 33 story headline
(BC_155) ! 34 story genre
(BC_156) ! 35 story description
(1) ! 36 release number
(0) ! 37 story creation year
(0) ! 45 locale paragraph count
(0) ! 60 permanent o
;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Output.i6t: Tables
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Array T0_final_question_options table tab_0_0 tab_0_1 tab_0_2 tab_0_3 tab_0_4;
Array tab_0_0 table $0664 0 (BC_157) (BC_158) (BC_159) (BC_160) (BC_161) ;
Array tab_0_1 table $0465 1 (0) (0) (1) (0) (0) ;
Array tab_0_2 table $2066 2 (Consult_Grammar_93) (Consult_Grammar_94) (Consult_Grammar_95) (Consult_Grammar_96) (Consult_Grammar_97) ;
Array tab_0_3 table $0067 3 (IMMEDIATELY_RESTART_VM_R) (IMMEDIATELY_RESTORE_SAVED_R) ( TABLE_NOVALUE) (IMMEDIATELY_QUIT_R) (IMMEDIATELY_UNDO_R) ;
Array tab_0_4 table $0068 4 ( TABLE_NOVALUE) ( TABLE_NOVALUE) (V27_amusing_a_victorious_pla) ( TABLE_NOVALUE) ( TABLE_NOVALUE) ;
Array T1_locale_priorities table tab_1_0 tab_1_1;
Array tab_1_0 table $0869 NULL ( TABLE_NOVALUE) TABLE_NOVALUE;
Array tab_1_1 table $446a 5 ( TABLE_NOVALUE) TABLE_NOVALUE;
Array TB_Blanks ->
! For table T0_final_question_options
$00 ! Column 0
$00 ! Column 1
$00 ! Column 2
$04 ! Column 3
$1b ! Column 4
! For table T1_locale_priorities
$03 ! Column 1
! End of table
NULL NULL;
Array TableOfTables --> TheEmptyTable T0_final_question_options T1_locale_priorities 0 0;
[ TC_KOV
tc ! Implied call parameter
;
switch (tc) {
100: return TEXT_TY; ! final question wording: text
101: return TRUTH_STATE_TY; ! only if victorious: truth state
102: return UNDERSTANDING_TY; ! topic: topic
103: return KD0_rule; ! final response rule: rule
104: return KD1_activity; ! final response activity: activity
105: return OBJECT_TY; ! notable-object: object
106: return NUMBER_TY; ! locale description priority: number
}
return UNKNOWN_TY;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Output.i6t: Equations
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Output.i6t: Actions
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Array ActionData table
##Inv $$00000000 OBJECT_TY OBJECT_TY 0 20000
##Take $$00001001 OBJECT_TY OBJECT_TY 0 20001
##Remove $$00011011 OBJECT_TY OBJECT_TY 0 20002
##Drop $$00001001 OBJECT_TY OBJECT_TY 0 20003
##PutOn $$00011011 OBJECT_TY OBJECT_TY 0 20004
##Insert $$00011011 OBJECT_TY OBJECT_TY 0 20005
##Eat $$00001001 OBJECT_TY OBJECT_TY 0 20006
##Go $$00001000 OBJECT_TY OBJECT_TY ANSTVC_7 20007
##Enter $$00001001 OBJECT_TY OBJECT_TY 0 20008
##Exit $$00000000 OBJECT_TY OBJECT_TY ANSTVC_9 20009
##GetOff $$00001001 OBJECT_TY OBJECT_TY 0 20010
##Look $$00000000 OBJECT_TY OBJECT_TY ANSTVC_11 20011
##Examine $$00001100 OBJECT_TY OBJECT_TY ANSTVC_12 20012
##LookUnder $$00001100 OBJECT_TY OBJECT_TY 0 20013
##Search $$00001101 OBJECT_TY OBJECT_TY 0 20014
##Consult $$00011001 OBJECT_TY UNDERSTANDING_TY 0 20015
##Lock $$10011011 OBJECT_TY OBJECT_TY 0 20016
##Unlock $$10011011 OBJECT_TY OBJECT_TY 0 20017
##SwitchOn $$00001001 OBJECT_TY OBJECT_TY 0 20018
##SwitchOff $$00001001 OBJECT_TY OBJECT_TY 0 20019
##Open $$00001001 OBJECT_TY OBJECT_TY 0 20020
##Close $$00001001 OBJECT_TY OBJECT_TY 0 20021
##Wear $$01001001 OBJECT_TY OBJECT_TY 0 20022
##Disrobe $$00001001 OBJECT_TY OBJECT_TY 0 20023
##Give $$01011011 OBJECT_TY OBJECT_TY 0 20024
##Show $$01011001 OBJECT_TY OBJECT_TY 0 20025
##WakeOther $$00001001 OBJECT_TY OBJECT_TY 0 20026
##ThrowAt $$01011001 OBJECT_TY OBJECT_TY 0 20027
##Attack $$00001001 OBJECT_TY OBJECT_TY 0 20028
##Kiss $$00001001 OBJECT_TY OBJECT_TY 0 20029
##Answer $$00011001 OBJECT_TY UNDERSTANDING_TY 0 20030
##Tell $$00011001 OBJECT_TY UNDERSTANDING_TY 0 20031
##Ask $$00011001 OBJECT_TY UNDERSTANDING_TY 0 20032
##AskFor $$00011011 OBJECT_TY OBJECT_TY 0 20033
##Wait $$00000000 OBJECT_TY OBJECT_TY 0 20034
##Touch $$00001001 OBJECT_TY OBJECT_TY 0 20035
##Wave $$00001001 OBJECT_TY OBJECT_TY 0 20036
##Pull $$00001001 OBJECT_TY OBJECT_TY 0 20037
##Push $$00001001 OBJECT_TY OBJECT_TY 0 20038
##Turn $$00001001 OBJECT_TY OBJECT_TY 0 20039
##PushDir $$00011001 OBJECT_TY OBJECT_TY 0 20040
##Squeeze $$00001001 OBJECT_TY OBJECT_TY 0 20041
##Yes $$00000000 OBJECT_TY OBJECT_TY 0 20042
##No $$00000000 OBJECT_TY OBJECT_TY 0 20043
##Burn $$00001001 OBJECT_TY OBJECT_TY 0 20044
##Wake $$00000000 OBJECT_TY OBJECT_TY 0 20045
##Think $$00000000 OBJECT_TY OBJECT_TY 0 20046
##Smell $$00001001 OBJECT_TY OBJECT_TY 0 20047
##Listen $$00001001 OBJECT_TY OBJECT_TY 0 20048
##Taste $$00001001 OBJECT_TY OBJECT_TY 0 20049
##Cut $$00001001 OBJECT_TY OBJECT_TY 0 20050
##Jump $$00000000 OBJECT_TY OBJECT_TY 0 20051
##Tie $$00011011 OBJECT_TY OBJECT_TY 0 20052
##Drink $$00001001 OBJECT_TY OBJECT_TY 0 20053
##Sorry $$00000000 OBJECT_TY OBJECT_TY 0 20054
##Swing $$00001001 OBJECT_TY OBJECT_TY 0 20055
##Rub $$00001001 OBJECT_TY OBJECT_TY 0 20056
##SetTo $$00011001 OBJECT_TY UNDERSTANDING_TY 0 20057
##WaveHands $$00000000 OBJECT_TY OBJECT_TY 0 20058
##Buy $$00001001 OBJECT_TY OBJECT_TY 0 20059
##Climb $$00001001 OBJECT_TY OBJECT_TY 0 20060
##Sleep $$00000000 OBJECT_TY OBJECT_TY 0 20061
##Quit $$00100000 OBJECT_TY OBJECT_TY 0 20062
##Save $$00100000 OBJECT_TY OBJECT_TY 0 20063
##Restore $$00100000 OBJECT_TY OBJECT_TY 0 20064
##Restart $$00100000 OBJECT_TY OBJECT_TY 0 20065
##Verify $$00100000 OBJECT_TY OBJECT_TY 0 20066
##ScriptOn $$00100000 OBJECT_TY OBJECT_TY 0 20067
##ScriptOff $$00100000 OBJECT_TY OBJECT_TY 0 20068
##Version $$00100000 OBJECT_TY OBJECT_TY 0 20069
##Score $$00100000 OBJECT_TY OBJECT_TY 0 20070
##LMode3 $$00100000 OBJECT_TY OBJECT_TY 0 20071
##LMode2 $$00100000 OBJECT_TY OBJECT_TY 0 20072
##LMode1 $$00100000 OBJECT_TY OBJECT_TY 0 20073
##NotifyOn $$00100000 OBJECT_TY OBJECT_TY 0 20074
##NotifyOff $$00100000 OBJECT_TY OBJECT_TY 0 20075
##Pronouns $$00100000 OBJECT_TY OBJECT_TY 0 20076
;
Constant AD_RECORDS = 77;
[ ANSTVC_7
pos ! Implied call parameter
state ! Implied call parameter
;
if (state == 1) {
MStack-->pos = I129_lab; pos++;
MStack-->pos = nothing; pos++;
MStack-->pos = nothing; pos++;
MStack-->pos = nothing; pos++;
MStack-->pos = nothing; pos++;
} else {
pos++;
pos++;
pos++;
pos++;
pos++;
}
return 5;
];
[ ANSTVC_9
pos ! Implied call parameter
state ! Implied call parameter
;
if (state == 1) {
MStack-->pos = nothing; pos++;
} else {
pos++;
}
return 1;
];
[ ANSTVC_11
pos ! Implied call parameter
state ! Implied call parameter
;
if (state == 1) {
MStack-->pos = ##Wait; pos++;
MStack-->pos = false; pos++;
MStack-->pos = 0; pos++;
MStack-->pos = nothing; pos++;
} else {
pos++;
pos++;
pos++;
pos++;
}
return 4;
];
[ ANSTVC_12
pos ! Implied call parameter
state ! Implied call parameter
;
if (state == 1) {
MStack-->pos = false; pos++;
} else {
pos++;
}
return 1;
];
[ DB_Action_Details
act ! Implied call parameter
n ! Implied call parameter
s ! Implied call parameter
for_say ! Implied call parameter
;
switch (act) {
##Inv: print "taking inventory";
##Take: print "taking"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Remove: print "removing"; print " "; if (for_say == 2) print "it"; else DA_Name(n); print " "; print "from"; if (for_say ~= 2) { print " "; DA_Name(s); }
##Drop: print "dropping"; if (for_say ~= 2) { print " "; DA_Name(n); }
##PutOn: print "putting"; print " "; if (for_say == 2) print "it"; else DA_Name(n); print " "; print "on"; if (for_say ~= 2) { print " "; DA_Name(s); }
##Insert: print "inserting"; print " "; if (for_say == 2) print "it"; else DA_Name(n); print " "; print "into"; if (for_say ~= 2) { print " "; DA_Name(s); }
##Eat: print "eating"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Go: print "going"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Enter: print "entering"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Exit: print "exiting";
##GetOff: print "getting off"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Look: print "looking";
##Examine: print "examining"; if (for_say ~= 2) { print " "; DA_Name(n); }
##LookUnder: print "looking under"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Search: print "searching"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Consult: print "consulting"; print " "; if (for_say == 2) print "it"; else DA_Name(n); print " "; print "about"; if (for_say ~= 2) { print " "; DA_Topic(100*consult_from + consult_words); }
##Lock: print "locking"; print " "; if (for_say == 2) print "it"; else DA_Name(n); print " "; print "with"; if (for_say ~= 2) { print " "; DA_Name(s); }
##Unlock: print "unlocking"; print " "; if (for_say == 2) print "it"; else DA_Name(n); print " "; print "with"; if (for_say ~= 2) { print " "; DA_Name(s); }
##SwitchOn: print "switching on"; if (for_say ~= 2) { print " "; DA_Name(n); }
##SwitchOff: print "switching off"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Open: print "opening"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Close: print "closing"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Wear: print "wearing"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Disrobe: print "taking off"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Give: print "giving"; print " "; if (for_say == 2) print "it"; else DA_Name(n); print " "; print "to"; if (for_say ~= 2) { print " "; DA_Name(s); }
##Show: print "showing"; print " "; if (for_say == 2) print "it"; else DA_Name(n); print " "; print "to"; if (for_say ~= 2) { print " "; DA_Name(s); }
##WakeOther: print "waking"; if (for_say ~= 2) { print " "; DA_Name(n); }
##ThrowAt: print "throwing"; print " "; if (for_say == 2) print "it"; else DA_Name(n); print " "; print "at"; if (for_say ~= 2) { print " "; DA_Name(s); }
##Attack: print "attacking"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Kiss: print "kissing"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Answer: print "answering"; print " "; if (for_say == 2) print "it"; else DA_Name(n); print " "; print "that"; if (for_say ~= 2) { print " "; DA_Topic(100*consult_from + consult_words); }
##Tell: print "telling"; print " "; if (for_say == 2) print "it"; else DA_Name(n); print " "; print "about"; if (for_say ~= 2) { print " "; DA_Topic(100*consult_from + consult_words); }
##Ask: print "asking"; print " "; if (for_say == 2) print "it"; else DA_Name(n); print " "; print "about"; if (for_say ~= 2) { print " "; DA_Topic(100*consult_from + consult_words); }
##AskFor: print "asking"; print " "; if (for_say == 2) print "it"; else DA_Name(n); print " "; print "for"; if (for_say ~= 2) { print " "; DA_Name(s); }
##Wait: print "waiting";
##Touch: print "touching"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Wave: print "waving"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Pull: print "pulling"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Push: print "pushing"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Turn: print "turning"; if (for_say ~= 2) { print " "; DA_Name(n); }
##PushDir: print "pushing"; print " "; if (for_say == 2) print "it"; else DA_Name(n); print " "; print "to"; if (for_say ~= 2) { print " "; DA_Name(s); }
##Squeeze: print "squeezing"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Yes: print "saying yes";
##No: print "saying no";
##Burn: print "burning"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Wake: print "waking up";
##Think: print "thinking";
##Smell: print "smelling"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Listen: print "listening to"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Taste: print "tasting"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Cut: print "cutting"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Jump: print "jumping";
##Tie: print "tying"; print " "; if (for_say == 2) print "it"; else DA_Name(n); print " "; print "to"; if (for_say ~= 2) { print " "; DA_Name(s); }
##Drink: print "drinking"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Sorry: print "saying sorry";
##Swing: print "swinging"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Rub: print "rubbing"; if (for_say ~= 2) { print " "; DA_Name(n); }
##SetTo: print "setting"; print " "; if (for_say == 2) print "it"; else DA_Name(n); print " "; print "to"; if (for_say ~= 2) { print " "; DA_Topic(100*consult_from + consult_words); }
##WaveHands: print "waving hands";
##Buy: print "buying"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Climb: print "climbing"; if (for_say ~= 2) { print " "; DA_Name(n); }
##Sleep: print "sleeping";
##Quit: print "quitting the game";
##Save: print "saving the game";
##Restore: print "restoring the game";
##Restart: print "restarting the game";
##Verify: print "verifying the story file";
##ScriptOn: print "switching the story transcript on";
##ScriptOff: print "switching the story transcript off";
##Version: print "requesting the story file version";
##Score: print "requesting the score";
##LMode3: print "preferring abbreviated room descriptions";
##LMode2: print "preferring unabbreviated room descriptions";
##LMode1: print "preferring sometimes abbreviated room descriptions";
##NotifyOn: print "switching score notification on";
##NotifyOff: print "switching score notification off";
##Pronouns: print "requesting the pronoun meanings";
}
];
Array ActionCoding -->
##Inv ##Take ##Remove ##Drop ##PutOn ##Insert ##Eat ##Go
##Enter ##Exit ##GetOff ##Look ##Examine ##LookUnder ##Search ##Consult
##Lock ##Unlock ##SwitchOn ##SwitchOff ##Open ##Close ##Wear ##Disrobe
##Give ##Show ##WakeOther ##ThrowAt ##Attack ##Kiss ##Answer ##Tell
##Ask ##AskFor ##Wait ##Touch ##Wave ##Pull ##Push ##Turn
##PushDir ##Squeeze ##Yes ##No ##Burn ##Wake ##Think ##Smell
##Listen ##Taste ##Cut ##Jump ##Tie ##Drink ##Sorry ##Swing
##Rub ##SetTo ##WaveHands ##Buy ##Climb ##Sleep ##Quit ##Save
##Restore ##Restart ##Verify ##ScriptOn ##ScriptOff ##Version ##Score ##LMode3
##LMode2 ##LMode1 ##NotifyOn ##NotifyOff ##Pronouns;
Array ActionHappened --> 0 0 0 0 0;
[ InvSub ;
return GenericVerbSub(131,132,133);
];
[ TakeSub ;
return GenericVerbSub(134,135,136);
];
[ RemoveSub ;
return GenericVerbSub(137,138,139);
];
[ DropSub ;
return GenericVerbSub(140,141,142);
];
[ PutOnSub ;
return GenericVerbSub(143,144,145);
];
[ InsertSub ;
return GenericVerbSub(146,147,148);
];
[ EatSub ;
return GenericVerbSub(149,150,151);
];
[ GoSub ;
return GenericVerbSub(152,153,154);
];
[ EnterSub ;
return GenericVerbSub(155,156,157);
];
[ ExitSub ;
return GenericVerbSub(158,159,160);
];
[ GetOffSub ;
return GenericVerbSub(161,162,163);
];
[ LookSub ;
return GenericVerbSub(164,165,166);
];
[ ExamineSub ;
return GenericVerbSub(167,168,169);
];
[ LookUnderSub ;
return GenericVerbSub(170,171,172);
];
[ SearchSub ;
return GenericVerbSub(173,174,175);
];
[ ConsultSub ;
return GenericVerbSub(176,177,178);
];
[ LockSub ;
return GenericVerbSub(179,180,181);
];
[ UnlockSub ;
return GenericVerbSub(182,183,184);
];
[ SwitchOnSub ;
return GenericVerbSub(185,186,187);
];
[ SwitchOffSub ;
return GenericVerbSub(188,189,190);
];
[ OpenSub ;
return GenericVerbSub(191,192,193);
];
[ CloseSub ;
return GenericVerbSub(194,195,196);
];
[ WearSub ;
return GenericVerbSub(197,198,199);
];
[ DisrobeSub ;
return GenericVerbSub(200,201,202);
];
[ GiveSub ;
return GenericVerbSub(203,204,205);
];
[ ShowSub ;
return GenericVerbSub(206,207,208);
];
[ WakeOtherSub ;
return GenericVerbSub(209,210,211);
];
[ ThrowAtSub ;
return GenericVerbSub(212,213,214);
];
[ AttackSub ;
return GenericVerbSub(215,216,217);
];
[ KissSub ;
return GenericVerbSub(218,219,220);
];
[ AnswerSub ;
return GenericVerbSub(221,222,223);
];
[ TellSub ;
return GenericVerbSub(224,225,226);
];
[ AskSub ;
return GenericVerbSub(227,228,229);
];
[ AskForSub ;
return GenericVerbSub(230,231,232);
];
[ WaitSub ;
return GenericVerbSub(233,234,235);
];
[ TouchSub ;
return GenericVerbSub(236,237,238);
];
[ WaveSub ;
return GenericVerbSub(239,240,241);
];
[ PullSub ;
return GenericVerbSub(242,243,244);
];
[ PushSub ;
return GenericVerbSub(245,246,247);
];
[ TurnSub ;
return GenericVerbSub(248,249,250);
];
[ PushDirSub ;
return GenericVerbSub(251,252,253);
];
[ SqueezeSub ;
return GenericVerbSub(254,255,256);
];
[ YesSub ;
return GenericVerbSub(257,258,259);
];
[ NoSub ;
return GenericVerbSub(260,261,262);
];
[ BurnSub ;
return GenericVerbSub(263,264,265);
];
[ WakeSub ;
return GenericVerbSub(266,267,268);
];
[ ThinkSub ;
return GenericVerbSub(269,270,271);
];
[ SmellSub ;
return GenericVerbSub(272,273,274);
];
[ ListenSub ;
return GenericVerbSub(275,276,277);
];
[ TasteSub ;
return GenericVerbSub(278,279,280);
];
[ CutSub ;
return GenericVerbSub(281,282,283);
];
[ JumpSub ;
return GenericVerbSub(284,285,286);
];
[ TieSub ;
return GenericVerbSub(287,288,289);
];
[ DrinkSub ;
return GenericVerbSub(290,291,292);
];
[ SorrySub ;
return GenericVerbSub(293,294,295);
];
[ SwingSub ;
return GenericVerbSub(296,297,298);
];
[ RubSub ;
return GenericVerbSub(299,300,301);
];
[ SetToSub ;
return GenericVerbSub(302,303,304);
];
[ WaveHandsSub ;
return GenericVerbSub(305,306,307);
];
[ BuySub ;
return GenericVerbSub(308,309,310);
];
[ ClimbSub ;
return GenericVerbSub(311,312,313);
];
[ SleepSub ;
return GenericVerbSub(314,315,316);
];
[ QuitSub ;
return GenericVerbSub(317,318,319);
];
[ SaveSub ;
return GenericVerbSub(320,321,322);
];
[ RestoreSub ;
return GenericVerbSub(323,324,325);
];
[ RestartSub ;
return GenericVerbSub(326,327,328);
];
[ VerifySub ;
return GenericVerbSub(329,330,331);
];
[ ScriptOnSub ;
return GenericVerbSub(332,333,334);
];
[ ScriptOffSub ;
return GenericVerbSub(335,336,337);
];
[ VersionSub ;
return GenericVerbSub(338,339,340);
];
[ ScoreSub ;
return GenericVerbSub(341,342,343);
];
[ LMode3Sub ;
return GenericVerbSub(344,345,346);
];
[ LMode2Sub ;
return GenericVerbSub(347,348,349);
];
[ LMode1Sub ;
return GenericVerbSub(350,351,352);
];
[ NotifyOnSub ;
return GenericVerbSub(353,354,355);
];
[ NotifyOffSub ;
return GenericVerbSub(356,357,358);
];
[ PronounsSub ;
return GenericVerbSub(359,360,361);
];
[ MistakeActionSub ;
switch(understand_as_mistake_number) {
default: "I didn't understand that sentence.";
}
say__p = 1;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Output.i6t: Phrases
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Definitions of rules in rulebooks
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: Startup (B0_startup)
! ----------------------------------------------------------------------------------------------------
! Rule 1/11: INITIALISE_MEMORY_R
! === equally specific with ===
! Rule 2/11: VIRTUAL_MACHINE_STARTUP_R
! === equally specific with ===
! Rule 3/11: SEED_RANDOM_NUMBER_GENERATOR_R
! === equally specific with ===
! Rule 4/11: UPDATE_CHRONOLOGICAL_RECORDS_R
! === equally specific with ===
! Rule 5/11 ! This is the declare everything initially unmentioned rule:
! === equally specific with ===
! Rule 6/11: POSITION_PLAYER_IN_MODEL_R
! === equally specific with ===
! Rule 7/11 ! This is the start in the correct scenes rule:
! --- now the mid-placed rules ---
! Rule 8/11 ! This is the when play begins stage rule:
! === equally specific with ===
! Rule 9/11 ! This is the fix baseline scoring rule:
! === equally specific with ===
! Rule 10/11 ! This is the display banner rule:
! === equally specific with ===
! Rule 11/11 ! This is the initial room description rule:
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! This is the declare everything initially unmentioned rule:
[ R_9
tmp_0 ! Let/loop value (deallocated by end of phrase)
tmp_1 ! Let/loop value (deallocated by end of phrase)
;
if (debug_rules) DB_Rule(R_9, 9);
! [2: repeat with item running through things]
for (tmp_0=Prop_0(0), tmp_1=Prop_0(tmp_0): tmp_0: tmp_0=tmp_1, tmp_1=Prop_0(tmp_1))
{! [3: now the item is not mentioned]
(Adj_67_t3_v10(tmp_0));
}
rfalse;
];
! From the Standard Rules
! No specific request
! This is the start in the correct scenes rule:
[ R_10 ;
if (debug_rules) DB_Rule(R_10, 10);
! [2: follow the scene changing rules]
FollowRulebook(RULEBOOK_TY_to_RULE_TY(3));
rfalse;
];
! From the Standard Rules
! No specific request
! This is the when play begins stage rule:
[ R_11 ;
if (debug_rules) DB_Rule(R_11, 11);
! [2: follow the when play begins rulebook]
FollowRulebook(RULEBOOK_TY_to_RULE_TY(4));
rfalse;
];
! From the Standard Rules
! No specific request
! This is the fix baseline scoring rule:
[ R_12 ;
if (debug_rules) DB_Rule(R_12, 12);
! [2: now the last notified score is the score]
last_score = score;
rfalse;
];
! From the Standard Rules
! No specific request
! This is the display banner rule:
[ R_13 ;
if (debug_rules) DB_Rule(R_13, 13);
! [2: say ~[banner text]~]
say__p=1;! [3: banner text]
ParaContent(); Banner(); .L_Say0; .L_SayX0;rfalse;
];
! From the Standard Rules
! No specific request
! This is the initial room description rule:
[ R_14 ;
if (debug_rules) DB_Rule(R_14, 14);
! [2: try looking]
TryAction(0, player, ##Look, 0, 0);
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: Turn sequence (B1_turn_sequence)
! ----------------------------------------------------------------------------------------------------
! Rule 1/12: PARSE_COMMAND_R
! === equally specific with ===
! Rule 2/12 ! This is the declare everything initially unmentioned rule:
! === equally specific with ===
! Rule 3/12: GENERATE_ACTION_R
! === equally specific with ===
! Rule 4/12 ! A first turn sequence rule:
! === equally specific with ===
! Rule 5/12 ! A first turn sequence rule ( this is the every turn stage rule ):
! --- now the mid-placed rules ---
! Rule 6/12: TIMED_EVENTS_R
! === equally specific with ===
! Rule 7/12: ADVANCE_TIME_R
! === equally specific with ===
! Rule 8/12: UPDATE_CHRONOLOGICAL_RECORDS_R
! --- now the last-placed rules ---
! Rule 9/12 ! A last turn sequence rule:
! === equally specific with ===
! Rule 10/12: ADJUST_LIGHT_R
! === equally specific with ===
! Rule 11/12: NOTE_OBJECT_ACQUISITIONS_R
! === equally specific with ===
! Rule 12/12 ! This is the notify score changes rule:
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! A first turn sequence rule:
[ R_16 ;
if (debug_rules) DB_Rule(R_16, 16);
! [2: follow the scene changing rules]
FollowRulebook(RULEBOOK_TY_to_RULE_TY(3));
rfalse;
];
! From the Standard Rules
! No specific request
! A first turn sequence rule ( this is the every turn stage rule ):
[ R_15 ;
if (debug_rules) DB_Rule(R_15, 15);
! [2: follow the every turn rules]
FollowRulebook(RULEBOOK_TY_to_RULE_TY(8));
rfalse;
];
! From the Standard Rules
! No specific request
! A last turn sequence rule:
[ R_17 ;
if (debug_rules) DB_Rule(R_17, 17);
! [2: follow the scene changing rules]
FollowRulebook(RULEBOOK_TY_to_RULE_TY(3));
rfalse;
];
! From the Standard Rules
! No specific request
! This is the notify score changes rule:
[ R_18 ;
if (debug_rules) DB_Rule(R_18, 18);
! [2: if the score is not the last notified score]
if (((~~((score == last_score)))))
{! [3: issue score notification message]
NotifyTheScore();
! [4: now the last notified score is the score]
last_score = score;
}
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: Shutdown (B2_shutdown)
! ----------------------------------------------------------------------------------------------------
! Rule 1/4 ! This is the when play ends stage rule:
! --- now the last-placed rules ---
! Rule 2/4: RESURRECT_PLAYER_IF_ASKED_R
! === equally specific with ===
! Rule 3/4 ! This is the print player's obituary rule:
! === equally specific with ===
! Rule 4/4: ASK_FINAL_QUESTION_R
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! This is the when play ends stage rule:
[ R_19 ;
if (debug_rules) DB_Rule(R_19, 19);
! [2: follow the when play ends rulebook]
FollowRulebook(RULEBOOK_TY_to_RULE_TY(5));
rfalse;
];
! From the Standard Rules
! No specific request
! This is the print player's obituary rule:
[ R_20 ;
if (debug_rules) DB_Rule(R_20, 20);
! [2: carry out the printing the player's obituary activity]
CarryOutActivity(V28_printing_the_player_s_ob);
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: When play begins (B4_when_play_begins)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! When play begins:
! ----------------------------------------------------------------------------------------------------
! No specific request
! When play begins:
[ R_819 I7RBLK;
@push I7SFRAME;
StackFrameCreate(58);
BlkValueCreateOnStack(55, CRATE_TY);
BlkValueCreateOnStack(52, CRATE_TY);
BlkValueCreateOnStack(50, TEXT_TY);
BlkValueCreateOnStack(45, KD4_couple_of_numbers_and_text);
BlkValueCreateOnStack(40, KD4_couple_of_numbers_and_text);
BlkValueCreateOnStack(37, CRATE_TY);
BlkValueCreateOnStack(34, CRATE_TY);
BlkValueCreateOnStack(32, TEXT_TY);
BlkValueCreateOnStack(27, KD4_couple_of_numbers_and_text);
BlkValueCreateOnStack(22, KD4_couple_of_numbers_and_text);
BlkValueCreateOnStack(19, CRATE_TY);
BlkValueCreateOnStack(16, CRATE_TY);
BlkValueCreateOnStack(13, CRATE_TY);
BlkValueCreateOnStack(12, KD3_list_of_rooms);
BlkValueCreateOnStack(9, KD2_lists_of_rooms_option);
BlkValueCreateOnStack(6, KD2_lists_of_rooms_option);
BlkValueCreateOnStack(3, CRATE_TY);
BlkValueCreateOnStack(0, CRATE_TY);
I7RBLK = KERNEL_0();
BlkValueFreeOnStack(55);
BlkValueFreeOnStack(52);
BlkValueFreeOnStack(50);
BlkValueFreeOnStack(45);
BlkValueFreeOnStack(40);
BlkValueFreeOnStack(37);
BlkValueFreeOnStack(34);
BlkValueFreeOnStack(32);
BlkValueFreeOnStack(27);
BlkValueFreeOnStack(22);
BlkValueFreeOnStack(19);
BlkValueFreeOnStack(16);
BlkValueFreeOnStack(13);
BlkValueFreeOnStack(12);
BlkValueFreeOnStack(9);
BlkValueFreeOnStack(6);
BlkValueFreeOnStack(3);
BlkValueFreeOnStack(0);
@pull I7SFRAME;
return I7RBLK; ! nothing
];
[ KERNEL_0
tmp_0 ! Let/loop value, e.g., 'F': crate
tmp_1 ! Let/loop value, e.g., 'C4': crate
tmp_2 ! Let/loop value, e.g., 'C5': crate
;
if (debug_rules) DB_Rule(R_819, 819);
! [2: let f be { the lab } as an option as a crate]
tmp_0 = I7SFRAME;
BlkValueCopy(tmp_0, CRATE_TY_Set((I7SFRAME+WORDSIZE*3), OPTION_TY_Say, BlkValueCopy((I7SFRAME+WORDSIZE*6), OPTION_TY_Set((I7SFRAME+WORDSIZE*9), 1, BlkValueCopy((I7SFRAME+WORDSIZE*12), BC_162)))));
! [3: say ~[F] [type of F][line break]~]
say__p=1;! [4: f]
ParaContent(); CRATE_TY_Say(tmp_0);! [5: ~ ~]
ParaContent(); print " ";! [6: type of f]
ParaContent(); CBVK_Print_Name_Of_PrintingFunc(BlkValueCopy((I7SFRAME+WORDSIZE*13), tmp_0)-->1);! [7: line break]
ParaContent(); new_line; .L_Say1; .L_SayX1;! [8: let c4 be 3456 and ~Hello~ as a couple as a crate]
tmp_1 = (I7SFRAME+WORDSIZE*16);
BlkValueCopy(tmp_1, CRATE_TY_Set((I7SFRAME+WORDSIZE*19), COUPLE_TY_Say, BlkValueCopy((I7SFRAME+WORDSIZE*22), COUPLE_TY_Set((I7SFRAME+WORDSIZE*27), 3456, BlkValueCopy((I7SFRAME+WORDSIZE*32), TX_L_41)))));
! [9: let c5 be 1234 and ~Zoo~ as a couple as a crate]
tmp_2 = (I7SFRAME+WORDSIZE*34);
BlkValueCopy(tmp_2, CRATE_TY_Set((I7SFRAME+WORDSIZE*37), COUPLE_TY_Say, BlkValueCopy((I7SFRAME+WORDSIZE*40), COUPLE_TY_Set((I7SFRAME+WORDSIZE*45), 1234, BlkValueCopy((I7SFRAME+WORDSIZE*50), TX_L_42)))));
! [10: if c4 is c5]
if ((( BlkValueCompare(tmp_1, tmp_2) == 0)))
{! [11: say ~[C4] == [C5][line break]~]
say__p=1;! [12: c4]
ParaContent(); CRATE_TY_Say(tmp_1);! [13: ~ == ~]
ParaContent(); print " == ";! [14: c5]
ParaContent(); CRATE_TY_Say(tmp_2);! [15: line break]
ParaContent(); new_line; .L_Say2; .L_SayX2;} else {
! [16: if c4 < c5]
if (((BlkValueCompare(BlkValueCopy((I7SFRAME+WORDSIZE*52), tmp_1), BlkValueCopy((I7SFRAME+WORDSIZE*55), tmp_2)) < 0)))
{! [17: say ~[C4] < [C5][line break]~]
say__p=1;! [18: c4]
ParaContent(); CRATE_TY_Say(tmp_1);! [19: ~ < ~]
ParaContent(); print " < ";! [20: c5]
ParaContent(); CRATE_TY_Say(tmp_2);! [21: line break]
ParaContent(); new_line; .L_Say3; .L_SayX3;} else {
! [22: say ~[C4] > [C5][line break]~]
say__p=1;! [23: c4]
ParaContent(); CRATE_TY_Say(tmp_1);! [24: ~ > ~]
ParaContent(); print " > ";! [25: c5]
ParaContent(); CRATE_TY_Say(tmp_2);! [26: line break]
ParaContent(); new_line; .L_Say4; .L_SayX4;}
}
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: When scene begins (B6_when_scene_begins)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! When a scene ( called the event ) begins ( this is the scene description text rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! When a scene ( called the event ) begins ( this is the scene description text rule ):
[ R_65
tmp_0 ! Let/loop value, e.g., 'event': scene
;
if ((((tmp_0 = parameter_value, (((true) && (tmp_0=(parameter_value), true))))) || (tmp_0 = I82_entire_game,false))) { ! Runs only when pattern matches
if (debug_rules) DB_Rule(R_65, 65);
! [2: if the description of the event is not ~~]
if (((~~(( BlkValueCompare(GProperty(SCENE_TY, tmp_0,description), EMPTY_TEXT_VALUE) == 0)))))
{! [3: say ~[description of the event][paragraph break]~]
say__p=1;! [4: description of the event]
ParaContent(); @push self; print (TEXT_TY_Say) GProperty(SCENE_TY, self=tmp_0,description);@pull self; ! [5: paragraph break]
ParaContent(); DivideParagraphPoint(); new_line; .L_Say5; .L_SayX5;}
} else if (debug_rules > 1) DB_Rule(R_65, 65, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: Action-processing (B9_action_processing)
! ----------------------------------------------------------------------------------------------------
! Rule 1/11 ! This is the announce items from multiple object lists rule:
! === equally specific with ===
! Rule 2/11 ! This is the set pronouns from items from multiple object lists rule:
! === equally specific with ===
! Rule 3/11 ! This is the before stage rule:
! --- now the mid-placed rules ---
! Rule 4/11: BASIC_VISIBILITY_R
! === equally specific with ===
! Rule 5/11: BASIC_ACCESSIBILITY_R
! === equally specific with ===
! Rule 6/11: CARRYING_REQUIREMENTS_R
! --- now the last-placed rules ---
! Rule 7/11 ! This is the instead stage rule:
! === equally specific with ===
! Rule 8/11: REQUESTED_ACTIONS_REQUIRE_R
! === equally specific with ===
! Rule 9/11: CARRY_OUT_REQUESTED_ACTIONS_R
! === equally specific with ===
! Rule 10/11: DESCEND_TO_SPECIFIC_ACTION_R
! === equally specific with ===
! Rule 11/11 ! This is the end action-processing in success rule:
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! This is the announce items from multiple object lists rule:
[ R_22 ;
if (debug_rules) DB_Rule(R_22, 22);
! [2: if the current item from the multiple object list is not nothing]
if (((~~((multiple_object_item == nothing)))))
{! [3: say ~[current item from the multiple object list]: [run paragraph on]~ ( a )]
say__p=1;! [4: ~[current item from the multiple object list]: [run paragraph on]~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_134); .L_Say6; .L_SayX6;}
rfalse;
];
! From the Standard Rules
! No specific request
! This is the set pronouns from items from multiple object lists rule:
[ R_21 ;
if (debug_rules) DB_Rule(R_21, 21);
! [2: if the current item from the multiple object list is not nothing]
if (((~~((multiple_object_item == nothing)))))
{! [3: set pronouns from the current item from the multiple object list]
PronounNotice(multiple_object_item);
}
rfalse;
];
! From the Standard Rules
! No specific request
! This is the before stage rule:
[ R_23 ;
if (debug_rules) DB_Rule(R_23, 23);
! [2: abide by the before rules]
if (FollowRulebook(RULEBOOK_TY_to_RULE_TY(19))) rtrue;
rfalse;
];
! From the Standard Rules
! No specific request
! This is the instead stage rule:
[ R_24 ;
if (debug_rules) DB_Rule(R_24, 24);
! [2: abide by the instead rules]
if (FollowRulebook(RULEBOOK_TY_to_RULE_TY(20))) rtrue;
rfalse;
];
! From the Standard Rules
! No specific request
! This is the end action-processing in success rule:
[ R_25 ;
if (debug_rules) DB_Rule(R_25, 25);
! [2: rule succeeds]
RulebookSucceeds(); rtrue;
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: Setting action variables (B10_setting_action_variables)
! ----------------------------------------------------------------------------------------------------
! Rule 1/3 ! Rule for setting action variables for going ( this is the standard set going variables rule ):
! === equally specific with ===
! Rule 2/3 ! Setting action variables for exiting:
! === equally specific with ===
! Rule 3/3 ! Setting action variables for looking ( this is the determine visibility ceiling rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Rule for setting action variables for going ( this is the standard set going variables rule ):
[ R_151 I7RBLK;
@push I7SFRAME;
StackFrameCreate(0);
@push formal_par0;
@push formal_par1;
I7RBLK = KERNEL_1();
@pull formal_par1;
@pull formal_par0;
@pull I7SFRAME;
return I7RBLK; ! nothing
];
[ KERNEL_1
tmp_0 ! Let/loop value, e.g., 'carriage': vehicle
tmp_1 ! Let/loop value, e.g., 'target': object
tmp_2 ! Let/loop value (deallocated by end of phrase)
;
if ((((action ==##Go)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_151, 151);
! [2: now the thing gone with is the item-pushed-between-rooms]
(MStack-->MstVO(20007,4)) = move_pushing;
! [3: now the room gone from is the location of the actor]
(MStack-->MstVO(20007,0)) = LocationOf(actor);
! [4: if the actor is in an enterable vehicle ( called the carriage )]
if (((ContainerOf(actor) ofclass K14_vehicle) && ((Adj_69_t1_v10(ContainerOf(actor)))) && (tmp_0=(ContainerOf(actor)), true)))
{! [5: now the vehicle gone by is the carriage]
(MStack-->MstVO(20007,3)) = tmp_0;
}
! [6: let the target be nothing]
tmp_1 = nothing;
! [7: if the noun is a direction]
if (((noun ofclass K3_direction)))
{! [8: let direction d be the noun]
tmp_2 = noun;
! [9: let the target be the room-or-door direction d from the room gone from]
tmp_1 =
! Resolution of run-time phrase ambiguity (deciding a value):
(
! This value evaluates third (i.e., last)
formal_rv
+
0*(
! The following condition evaluates second
((
((((((formal_par0 ofclass K3_direction) && (formal_par0 ofclass K3_direction))))) && ((
formal_rv = RoomOrDoorFrom(formal_par1,formal_par0)) | 1)
)|| (ArgumentTypeFailed(2287, 1))
))
+
! The following assignments evaluate first
((formal_par1 = (MStack-->MstVO(20007,0))) +
(formal_par0 = tmp_2)
))
)
! Resolution complete
;
} else {
! [10: if the noun is a door]
if (((noun ofclass K4_door)))
{! [11: let the target be the noun]
tmp_1 = noun;
}
}
! [12: if the target is a door]
if (((tmp_1 ofclass K4_door)))
{! [13: now the door gone through is the target]
(MStack-->MstVO(20007,2)) = tmp_1;
! [14: now the target is the other side of the target from the room gone from]
tmp_1 =
! Resolution of run-time phrase ambiguity (deciding a value):
(
! This value evaluates third (i.e., last)
formal_rv
+
0*(
! The following condition evaluates second
((
((((((formal_par0 ofclass K4_door) && (formal_par0 ofclass K4_door))))) && ((
formal_rv = OtherSideOfDoor(formal_par0,formal_par1)) | 1)
)|| (ArgumentTypeFailed(2292, 1))
))
+
! The following assignments evaluate first
((formal_par1 = (MStack-->MstVO(20007,0))) +
(formal_par0 = tmp_1)
))
)
! Resolution complete
;
}
! [15: now the room gone to is the target]
(MStack-->MstVO(20007,1)) = tmp_1;
} else if (debug_rules > 1) DB_Rule(R_151, 151, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Setting action variables for exiting:
[ R_174 ;
if ((((action ==##Exit)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_174, 174);
! [2: now the container exited from is the holder of the actor]
(MStack-->MstVO(20009,0)) = (HolderOf(actor));
} else if (debug_rules > 1) DB_Rule(R_174, 174, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Setting action variables for looking ( this is the determine visibility ceiling rule ):
[ R_186 ;
if ((((action ==##Look)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_186, 186);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: calculate visibility ceiling at low level]
FindVisibilityLevels();
}
! [4: now the visibility level count is the visibility ceiling count calculated]
(MStack-->MstVO(20011,2)) = visibility_levels;
! [5: now the visibility ceiling is the visibility ceiling calculated]
(MStack-->MstVO(20011,3)) = visibility_ceiling;
! [6: now the room-describing action is the looking action]
(MStack-->MstVO(20011,0)) = ##Look;
} else if (debug_rules > 1) DB_Rule(R_186, 186, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: specific action-processing (B11_specific_action_processi)
! ----------------------------------------------------------------------------------------------------
! Rule 1/8: WORK_OUT_DETAILS_OF_SPECIFIC_R
! --- now the mid-placed rules ---
! Rule 2/8 ! A specific action-processing rule ( this is the investigate player's awareness before action rule ):
! === equally specific with ===
! Rule 3/8 ! A specific action-processing rule ( this is the check stage rule ):
! === equally specific with ===
! Rule 4/8 ! A specific action-processing rule ( this is the carry out stage rule ):
! === equally specific with ===
! Rule 5/8 ! A specific action-processing rule ( this is the after stage rule ):
! === equally specific with ===
! Rule 6/8 ! A specific action-processing rule ( this is the investigate player's awareness after action rule ):
! === equally specific with ===
! Rule 7/8 ! A specific action-processing rule ( this is the report stage rule ):
! --- now the last-placed rules ---
! Rule 8/8 ! The last specific action-processing rule:
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! A specific action-processing rule ( this is the investigate player's awareness before action rule ):
[ R_26 ;
if (debug_rules) DB_Rule(R_26, 26);
! [2: follow the player's action awareness rules]
FollowRulebook(RULEBOOK_TY_to_RULE_TY(12));
! [3: if rule succeeded]
if (((RulebookSucceeded())))
{! [4: now within the player's sight is true]
(MStack-->MstVO(11,5)) = 1;
} else {
! [5: now within the player's sight is false]
(MStack-->MstVO(11,5)) = 0;
}
rfalse;
];
! From the Standard Rules
! No specific request
! A specific action-processing rule ( this is the check stage rule ):
[ R_27 ;
if (debug_rules) DB_Rule(R_27, 27);
! [2: anonymously abide by the specific check rulebook]
if (temporary_value = FollowRulebook(RULEBOOK_TY_to_RULE_TY((MStack-->MstVO(11,2))))) {
if (RulebookSucceeded()) ActRulebookSucceeds(temporary_value);
else ActRulebookFails(temporary_value);
return 2;
}
rfalse;
];
! From the Standard Rules
! No specific request
! A specific action-processing rule ( this is the carry out stage rule ):
[ R_28 ;
if (debug_rules) DB_Rule(R_28, 28);
! [2: follow the specific carry out rulebook]
FollowRulebook(RULEBOOK_TY_to_RULE_TY((MStack-->MstVO(11,3))));
rfalse;
];
! From the Standard Rules
! No specific request
! A specific action-processing rule ( this is the after stage rule ):
[ R_29 ;
if (debug_rules) DB_Rule(R_29, 29);
! [2: if action in world is true]
if (((((MStack-->MstVO(11,0)) && true) == (1 && true))))
{! [3: abide by the after rules]
if (FollowRulebook(RULEBOOK_TY_to_RULE_TY(23))) rtrue;
}
rfalse;
];
! From the Standard Rules
! No specific request
! A specific action-processing rule ( this is the investigate player's awareness after action rule ):
[ R_30 ;
if (debug_rules) DB_Rule(R_30, 30);
! [2: if within the player's sight is false]
if (((((MStack-->MstVO(11,5)) && true) == (0 && true))))
{! [3: follow the player's action awareness rules]
FollowRulebook(RULEBOOK_TY_to_RULE_TY(12));
! [4: if rule succeeded]
if (((RulebookSucceeded())))
{! [5: now within the player's sight is true]
(MStack-->MstVO(11,5)) = 1;
}
}
rfalse;
];
! From the Standard Rules
! No specific request
! A specific action-processing rule ( this is the report stage rule ):
[ R_31 ;
if (debug_rules) DB_Rule(R_31, 31);
! [2: if within the player's sight is true and action keeping silent is false]
if ((((((MStack-->MstVO(11,5)) && true) == (1 && true)))) && (((((MStack-->MstVO(11,1)) && true) == (0 && true)))))
{! [3: follow the specific report rulebook]
FollowRulebook(RULEBOOK_TY_to_RULE_TY((MStack-->MstVO(11,4))));
}
rfalse;
];
! From the Standard Rules
! No specific request
! The last specific action-processing rule:
[ R_32 ;
if (debug_rules) DB_Rule(R_32, 32);
! [2: rule succeeds]
RulebookSucceeds(); rtrue;
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: player's action awareness (B12_player_s_action_awarenes)
! ----------------------------------------------------------------------------------------------------
! Rule 1/4 ! A player's action awareness rule ( this is the player aware of his own actions rule ):
! === equally specific with ===
! Rule 2/4 ! A player's action awareness rule ( this is the player aware of actions by visible actors rule ):
! === equally specific with ===
! Rule 3/4 ! A player's action awareness rule ( this is the player aware of actions on visible nouns rule ):
! === equally specific with ===
! Rule 4/4 ! A player's action awareness rule ( this is the player aware of actions on visible second nouns rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! A player's action awareness rule ( this is the player aware of his own actions rule ):
[ R_33 ;
if (debug_rules) DB_Rule(R_33, 33);
! [2: if the player is the actor]
if (((player == actor)))
{! [3: rule succeeds]
RulebookSucceeds(); rtrue;
}
rfalse;
];
! From the Standard Rules
! No specific request
! A player's action awareness rule ( this is the player aware of actions by visible actors rule ):
[ R_34 ;
if (debug_rules) DB_Rule(R_34, 34);
! [2: if the player is not the actor and the player can see the actor]
if ((((~~((player == actor))))) && (((TestVisibility(player,actor)))))
{! [3: rule succeeds]
RulebookSucceeds(); rtrue;
}
rfalse;
];
! From the Standard Rules
! No specific request
! A player's action awareness rule ( this is the player aware of actions on visible nouns rule ):
[ R_35 ;
if (debug_rules) DB_Rule(R_35, 35);
! [2: if the noun is a thing and the player can see the noun]
if ((((noun ofclass K2_thing))) && (((TestVisibility(player,noun)))))
{! [3: rule succeeds]
RulebookSucceeds(); rtrue;
}
rfalse;
];
! From the Standard Rules
! No specific request
! A player's action awareness rule ( this is the player aware of actions on visible second nouns rule ):
[ R_36 ;
if (debug_rules) DB_Rule(R_36, 36);
! [2: if the second noun is a thing and the player can see the second noun]
if ((((second ofclass K2_thing))) && (((TestVisibility(player,second)))))
{! [3: rule succeeds]
RulebookSucceeds(); rtrue;
}
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: Visibility (B16_visibility)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! The last visibility rule ( this is the can't act in the dark rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! The last visibility rule ( this is the can't act in the dark rule ):
[ R_37 ;
if (debug_rules) DB_Rule(R_37, 37);
! [2: if in darkness]
if (((location==thedark)))
{! [3: rule succeeds]
RulebookSucceeds(); rtrue;
}
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: does the player mean (B25_does_the_player_mean)
! ----------------------------------------------------------------------------------------------------
! Rule 1/2 ! Does the player mean taking something which is carried by the player ( this is the very unlikely to mean taking what's already carried rule ):
! >>> III.3.2 - Action/What/Thing Acted On >>>
! Rule 2/2 ! Does the player mean taking off something worn:
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Does the player mean taking something which is carried by the player ( this is the very unlikely to mean taking what's already carried rule ):
[ R_38 ;
if ((((action ==##Take) && (actor==player) && ((noun ofclass K2_thing) && (player == CarrierOf(noun)))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_38, 38);
! [2: it is very unlikely]
RulebookSucceeds(22, RBNO_10); rtrue;
} else if (debug_rules > 1) DB_Rule(R_38, 38, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Does the player mean taking off something worn:
[ R_242 ;
if ((((action ==##Disrobe) && (actor==player) && ((noun ofclass K2_thing) && ((Adj_0_t1_v10(noun))))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_242, 242);
! [2: it is very likely]
RulebookSucceeds(22, RBNO_6); rtrue;
} else if (debug_rules > 1) DB_Rule(R_242, 242, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: before Printing the name (B29_before_printing_the_name)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Before printing the name of a thing ( called the item being printed ) ( this is the make named things mentioned rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Before printing the name of a thing ( called the item being printed ) ( this is the make named things mentioned rule ):
[ R_66
tmp_0 ! Let/loop value, e.g., 'item being printed': thing
;
if ((((tmp_0 = parameter_value, (((parameter_value ofclass K2_thing) && (tmp_0=(parameter_value), true))))) || (tmp_0 = 0,false))) { ! Runs only when pattern matches
if (debug_rules) DB_Rule(R_66, 66);
! [2: if expanding text for comparison purposes]
if ((say__comp))
{! [3: continue the activity]
rfalse;
}
! [4: now the item being printed is mentioned]
(Adj_67_t2_v10(tmp_0));
} else if (debug_rules > 1) DB_Rule(R_66, 66, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: for Printing the plural name (B33_for_printing_the_plural_)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Rule for printing the plural name of something ( called the item ) ( this is the standard printing the plural name rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Rule for printing the plural name of something ( called the item ) ( this is the standard printing the plural name rule ):
[ R_67
tmp_0 ! Let/loop value, e.g., 'item': thing
;
if ((((tmp_0 = parameter_value, (((parameter_value ofclass K2_thing) && (tmp_0=(parameter_value), true))))) || (tmp_0 = 0,false))) { ! Runs only when pattern matches
if (debug_rules) DB_Rule(R_67, 67);
! [2: say the printed plural name of the item]
say__p=1;! [3: the printed plural name of the item]
ParaContent(); @push self; print (TEXT_TY_Say) GProperty(10, self=tmp_0,plural);@pull self; .L_Say7; .L_SayX7;RulebookSucceeds(); rtrue;
} else if (debug_rules > 1) DB_Rule(R_67, 67, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: for Printing a number (B36_for_printing_a_number)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Rule for printing a number of something ( called the item ) ( this is the standard printing a number of something rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Rule for printing a number of something ( called the item ) ( this is the standard printing a number of something rule ):
[ R_68
tmp_0 ! Let/loop value, e.g., 'item': thing
;
if ((((tmp_0 = parameter_value, (((parameter_value ofclass K2_thing) && (tmp_0=(parameter_value), true))))) || (tmp_0 = 0,false))) { ! Runs only when pattern matches
if (debug_rules) DB_Rule(R_68, 68);
! [2: say ~[listing group size in words] ~]
say__p=1;! [3: listing group size in words]
ParaContent(); print (number) say__n=(listing_size);! [4: ~ ~]
ParaContent(); print " "; .L_Say8; .L_SayX8;! [5: carry out the printing the plural name activity with the item]
CarryOutActivity(V1_printing_the_plural_name, tmp_0);
RulebookSucceeds(); rtrue;
} else if (debug_rules > 1) DB_Rule(R_68, 68, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: for Printing the announcement of light (B66_for_printing_the_announc)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! This is the look around once light available rule:
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! This is the look around once light available rule:
[ R_69 ;
if (debug_rules) DB_Rule(R_69, 69);
! [2: try looking]
TryAction(0, player, ##Look, 0, 0);
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: for Deciding whether all includes (B87_for_deciding_whether_all)
! ----------------------------------------------------------------------------------------------------
! Rule 1/5 ! Rule for deciding whether all includes a person while dropping or throwing or inserting or putting ( this is the exclude people from drop all rule ):
! >>> III - When/while requirement >>>
! Rule 2/5 ! Rule for deciding whether all includes scenery while taking or taking off or removing ( this is the exclude scenery from take all rule ):
! >>> III.1 - Object To Which Rule Applies >>>
! Rule 3/5 ! Rule for deciding whether all includes things enclosed by the person reaching while taking or taking off or removing ( this is the exclude indirect possessions from take all rule ):
! >>> III.1 - Object To Which Rule Applies >>>
! Rule 4/5 ! Rule for deciding whether all includes fixed in place things while taking or taking off or removing ( this is the exclude fixed in place things from take all rule ):
! >>> III.1 - Object To Which Rule Applies >>>
! Rule 5/5 ! Rule for deciding whether all includes people while taking or taking off or removing ( this is the exclude people from take all rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Rule for deciding whether all includes a person while dropping or throwing or inserting or putting ( this is the exclude people from drop all rule ):
[ R_74 ;
if (((((parameter_value ofclass K8_person))))) { ! Runs only when pattern matches
if (((((((action ==##Drop) && (actor==player))))) || (((((action ==##ThrowAt) && (actor==player))))) || (((((action ==##Insert) && (actor==player))))) || (((((action ==##PutOn) && (actor==player))))))) { ! Runs only while condition holds
if (debug_rules) DB_Rule(R_74, 74);
! [2: it does not]
RulebookFails(22, RBNO_11); rtrue;
RulebookSucceeds(); rtrue;
} else if (debug_rules > 1) DB_Rule(R_74, 74, 'context');
} else if (debug_rules > 1) DB_Rule(R_74, 74, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Rule for deciding whether all includes scenery while taking or taking off or removing ( this is the exclude scenery from take all rule ):
[ R_70 ;
if ((((((Adj_59_t1_v10(parameter_value))) && (true))))) { ! Runs only when pattern matches
if (((((((action ==##Take) && (actor==player))))) || (((((action ==##Disrobe) && (actor==player))))) || (((((action ==##Remove) && (actor==player))))))) { ! Runs only while condition holds
if (debug_rules) DB_Rule(R_70, 70);
! [2: it does not]
RulebookFails(22, RBNO_11); rtrue;
RulebookSucceeds(); rtrue;
} else if (debug_rules > 1) DB_Rule(R_70, 70, 'context');
} else if (debug_rules > 1) DB_Rule(R_70, 70, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Rule for deciding whether all includes things enclosed by the person reaching while taking or taking off or removing ( this is the exclude indirect possessions from take all rule ):
[ R_73 ;
if (((((parameter_value ofclass K2_thing) && (IndirectlyContains(actor,parameter_value)))))) { ! Runs only when pattern matches
if (((((((action ==##Take) && (actor==player))))) || (((((action ==##Disrobe) && (actor==player))))) || (((((action ==##Remove) && (actor==player))))))) { ! Runs only while condition holds
if (debug_rules) DB_Rule(R_73, 73);
! [2: it does not]
RulebookFails(22, RBNO_11); rtrue;
RulebookSucceeds(); rtrue;
} else if (debug_rules > 1) DB_Rule(R_73, 73, 'context');
} else if (debug_rules > 1) DB_Rule(R_73, 73, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Rule for deciding whether all includes fixed in place things while taking or taking off or removing ( this is the exclude fixed in place things from take all rule ):
[ R_72 ;
if (((((parameter_value ofclass K2_thing) && ((Adj_57_t1_v10(parameter_value))))))) { ! Runs only when pattern matches
if (((((((action ==##Take) && (actor==player))))) || (((((action ==##Disrobe) && (actor==player))))) || (((((action ==##Remove) && (actor==player))))))) { ! Runs only while condition holds
if (debug_rules) DB_Rule(R_72, 72);
! [2: it does not]
RulebookFails(22, RBNO_11); rtrue;
RulebookSucceeds(); rtrue;
} else if (debug_rules > 1) DB_Rule(R_72, 72, 'context');
} else if (debug_rules > 1) DB_Rule(R_72, 72, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Rule for deciding whether all includes people while taking or taking off or removing ( this is the exclude people from take all rule ):
[ R_71 ;
if (((((parameter_value ofclass K8_person))))) { ! Runs only when pattern matches
if (((((((action ==##Take) && (actor==player))))) || (((((action ==##Disrobe) && (actor==player))))) || (((((action ==##Remove) && (actor==player))))))) { ! Runs only while condition holds
if (debug_rules) DB_Rule(R_71, 71);
! [2: it does not]
RulebookFails(22, RBNO_11); rtrue;
RulebookSucceeds(); rtrue;
} else if (debug_rules > 1) DB_Rule(R_71, 71, 'context');
} else if (debug_rules > 1) DB_Rule(R_71, 71, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: for Supplying a missing noun (B99_for_supplying_a_missing_)
! ----------------------------------------------------------------------------------------------------
! Rule 1/4 ! Rule for supplying a missing noun while an actor smelling ( this is the ambient odour rule ):
! === equally specific with ===
! Rule 2/4 ! Rule for supplying a missing noun while an actor listening ( this is the ambient sound rule ):
! === equally specific with ===
! Rule 3/4 ! Rule for supplying a missing noun while an actor going ( this is the block vaguely going rule ):
! --- now the last-placed rules ---
! Rule 4/4 ! Rule for supplying a missing noun while entering ( this is the find what to enter rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Rule for supplying a missing noun while an actor smelling ( this is the ambient odour rule ):
[ R_75 ;
if (((((((action ==##Smell) && (act_requester==nothing))))))) { ! Runs only while condition holds
if (debug_rules) DB_Rule(R_75, 75);
! [2: now the noun is the touchability ceiling of the player]
noun = TouchabilityCeiling(player);
RulebookSucceeds(); rtrue;
} else if (debug_rules > 1) DB_Rule(R_75, 75, 'context');
rfalse;
];
! From the Standard Rules
! No specific request
! Rule for supplying a missing noun while an actor listening ( this is the ambient sound rule ):
[ R_76 ;
if (((((((action ==##Listen) && (act_requester==nothing))))))) { ! Runs only while condition holds
if (debug_rules) DB_Rule(R_76, 76);
! [2: now the noun is the touchability ceiling of the player]
noun = TouchabilityCeiling(player);
RulebookSucceeds(); rtrue;
} else if (debug_rules > 1) DB_Rule(R_76, 76, 'context');
rfalse;
];
! From the Standard Rules
! No specific request
! Rule for supplying a missing noun while an actor going ( this is the block vaguely going rule ):
[ R_77 ;
if (((((((action ==##Go) && (act_requester==nothing))))))) { ! Runs only while condition holds
if (debug_rules) DB_Rule(R_77, 77);
! [2: say ~You'll have to say which compass direction to go in.~ ( a )]
say__p=1;! [3: ~You'll have to say which compass direction to go in.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_135); new_line; .L_Say9; .L_SayX9;RulebookSucceeds(); rtrue;
} else if (debug_rules > 1) DB_Rule(R_77, 77, 'context');
rfalse;
];
! From the Standard Rules
! No specific request
! Rule for supplying a missing noun while entering ( this is the find what to enter rule ):
[ R_162
tmp_0 ! Let/loop value, e.g., 'box': thing
;
if (((((((action ==##Enter) && (actor==player))))))) { ! Runs only while condition holds
if (debug_rules) DB_Rule(R_162, 162);
! [2: if something enterable ( called the box ) is in the location]
if ((((Prop_1() && (tmp_0=deferred_calling_list-->0, true)) || (tmp_0 = 0,false))))
{! [3: now the noun is the box]
noun = tmp_0;
} else {
! [4: continue the activity]
rfalse;
}
RulebookSucceeds(); rtrue;
} else if (debug_rules > 1) DB_Rule(R_162, 162, 'context');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: before Handling the final question (B116_before_handling_the_fin)
! ----------------------------------------------------------------------------------------------------
! Rule 1/3 ! This is the print the final question rule:
! === equally specific with ===
! Rule 2/3 ! This is the print the final prompt rule:
! --- now the last-placed rules ---
! Rule 3/3: READ_FINAL_ANSWER_R
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! This is the print the final question rule:
[ R_79
tmp_0 ! Let/loop value, e.g., 'named options count': number
tmp_1 ! Let/loop value (deallocated by end of phrase)
tmp_2 ! Let/loop value (deallocated by end of phrase)
ct_0 ! currently selected table
ct_1 ! currently selected row
;
if (debug_rules) DB_Rule(R_79, 79);
! [2: let named options count be 0]
tmp_0 = 0;
! [3: repeat through the table of final question options]
@push ct_0; @push ct_1;
for (tmp_1=T0_final_question_options, tmp_2=1, ct_0=tmp_1, ct_1=tmp_2:
tmp_2<=TableRows(tmp_1):
tmp_2++, ct_0=tmp_1, ct_1=tmp_2)
if (TableRowIsBlank(ct_0, ct_1)==false)
{! [4: if the only if victorious entry is false or the story has ended finally]
if (((((TableLookUpEntry(ct_0,101,ct_1) && true) == (0 && true)))) || (((story_complete))))
{! [5: if there is a final response rule entry or the final response activity entry is not empty]
if ((((ExistsTableLookUpEntry(ct_0,103,ct_1)))) || (((~~(((Adj_17_t1_v33(TableLookUpEntry(ct_0,104,ct_1)))))))))
{! [6: if there is a final question wording entry]
if (((ExistsTableLookUpEntry(ct_0,100,ct_1))))
{! [7: increase named options count by 1]
tmp_0 = tmp_0 + 1;;
}
}
}
}
@pull ct_1; @pull ct_0;! [8: if the named options count is less than 1]
if (((tmp_0 < 1)))
{! [9: abide by the immediately quit rule]
if (FollowRulebook(IMMEDIATELY_QUIT_R)) rtrue;
}
! [10: say ~Would you like to ~ ( a )]
say__p=1;! [11: ~Would you like to ~ ( a )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=ct_0),(LocalParking-->2=ct_1),(LocalParking-->3=tmp_1),(LocalParking-->4=tmp_2),TX_R_136); .L_Say10; .L_SayX10;! [12: repeat through the table of final question options]
@push ct_0; @push ct_1;
for (tmp_1=T0_final_question_options, tmp_2=1, ct_0=tmp_1, ct_1=tmp_2:
tmp_2<=TableRows(tmp_1):
tmp_2++, ct_0=tmp_1, ct_1=tmp_2)
if (TableRowIsBlank(ct_0, ct_1)==false)
{! [13: if the only if victorious entry is false or the story has ended finally]
if (((((TableLookUpEntry(ct_0,101,ct_1) && true) == (0 && true)))) || (((story_complete))))
{! [14: if there is a final response rule entry or the final response activity entry is not empty]
if ((((ExistsTableLookUpEntry(ct_0,103,ct_1)))) || (((~~(((Adj_17_t1_v33(TableLookUpEntry(ct_0,104,ct_1)))))))))
{! [15: if there is a final question wording entry]
if (((ExistsTableLookUpEntry(ct_0,100,ct_1))))
{! [16: say final question wording entry]
say__p=1;! [17: final question wording entry]
ParaContent(); print (TEXT_TY_Say) TableLookUpEntry(ct_0,100,ct_1); .L_Say11; .L_SayX11;! [18: decrease named options count by 1]
tmp_0 = tmp_0 - 1;;
! [19: if the named options count is 1]
if (((tmp_0 == 1)))
{! [20: if the serial comma option is active]
if ((((Adj_25_t1_v16(6)))))
{! [21: say ~,~]
say__p=1;! [22: ~,~]
ParaContent(); print ","; .L_Say12; .L_SayX12;}
! [23: say ~ or ~ ( b )]
say__p=1;! [24: ~ or ~ ( b )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=ct_0),(LocalParking-->2=ct_1),(LocalParking-->3=tmp_1),(LocalParking-->4=tmp_2),TX_R_137); .L_Say13; .L_SayX13;} else {
! [25: if the named options count is 0]
if (((tmp_0 == 0)))
{! [26: say ~?[line break]~]
say__p=1;! [27: ~?~]
ParaContent(); print "?";! [28: line break]
ParaContent(); new_line; .L_Say14; .L_SayX14;} else {
! [29: say ~, ~]
say__p=1;! [30: ~, ~]
ParaContent(); print ", "; .L_Say15; .L_SayX15;}
}
}
}
}
}
@pull ct_1; @pull ct_0;rfalse;
];
! From the Standard Rules
! No specific request
! This is the print the final prompt rule:
[ R_78 ;
if (debug_rules) DB_Rule(R_78, 78);
! [2: say ~> [run paragraph on]~ ( a )]
say__p=1;! [3: ~> [run paragraph on]~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_138); .L_Say16; .L_SayX16;rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: for Handling the final question (B117_for_handling_the_final_)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! This is the standard respond to final question rule:
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! This is the standard respond to final question rule:
[ R_80
tmp_0 ! Let/loop value (deallocated by end of phrase)
tmp_1 ! Let/loop value (deallocated by end of phrase)
ct_0 ! currently selected table
ct_1 ! currently selected row
;
if (debug_rules) DB_Rule(R_80, 80);
! [2: repeat through the table of final question options]
@push ct_0; @push ct_1;
for (tmp_0=T0_final_question_options, tmp_1=1, ct_0=tmp_0, ct_1=tmp_1:
tmp_1<=TableRows(tmp_0):
tmp_1++, ct_0=tmp_0, ct_1=tmp_1)
if (TableRowIsBlank(ct_0, ct_1)==false)
{! [3: if the only if victorious entry is false or the story has ended finally]
if (((((TableLookUpEntry(ct_0,101,ct_1) && true) == (0 && true)))) || (((story_complete))))
{! [4: if there is a final response rule entry or the final response activity entry is not empty]
if ((((ExistsTableLookUpEntry(ct_0,103,ct_1)))) || (((~~(((Adj_17_t1_v33(TableLookUpEntry(ct_0,104,ct_1)))))))))
{! [5: if the player's command matches the topic entry]
if (((SnippetMatches(players_command, TableLookUpEntry(ct_0,102,ct_1)))))
{! [6: if there is a final response rule entry]
if (((ExistsTableLookUpEntry(ct_0,103,ct_1))))
{! [7: abide by final response rule entry]
if (FollowRulebook(TableLookUpEntry(ct_0,103,ct_1))) rtrue;
} else {
! [8: carry out the final response activity entry activity]
CarryOutActivity(TableLookUpEntry(ct_0,104,ct_1));
}
! [9: rule succeeds]
RulebookSucceeds(); rtrue;
}
}
}
}
@pull ct_1; @pull ct_0;! [10: say ~Please give one of the answers above.~ ( a )]
say__p=1;! [11: ~Please give one of the answers above.~ ( a )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=ct_0),(LocalParking-->1=ct_1),(LocalParking-->2=tmp_0),(LocalParking-->3=tmp_1),TX_R_139); new_line; .L_Say17; .L_SayX17;rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: before Printing the locale description (B119_before_printing_the_loc)
! ----------------------------------------------------------------------------------------------------
! Rule 1/2 ! Before printing the locale description ( this is the initialise locale description rule ):
! === equally specific with ===
! Rule 2/2 ! Before printing the locale description ( this is the find notable locale objects rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Before printing the locale description ( this is the initialise locale description rule ):
[ R_83
tmp_0 ! Let/loop value (deallocated by end of phrase)
tmp_1 ! Let/loop value (deallocated by end of phrase)
ct_0 ! internal use only
ct_1 ! internal use only
;
if (debug_rules) DB_Rule(R_83, 83);
! [2: now the locale paragraph count is 0]
(Global_Vars-->9) = 0;
! [3: repeat through the table of locale priorities]
@push ct_0; @push ct_1;
for (tmp_0=T1_locale_priorities, tmp_1=1, ct_0=tmp_0, ct_1=tmp_1:
tmp_1<=TableRows(tmp_0):
tmp_1++, ct_0=tmp_0, ct_1=tmp_1)
if (TableRowIsBlank(ct_0, ct_1)==false)
{! [4: blank out the whole row]
TableBlankOutRow(ct_0, ct_1);
}
@pull ct_1; @pull ct_0;rfalse;
];
! From the Standard Rules
! No specific request
! Before printing the locale description ( this is the find notable locale objects rule ):
[ R_84
tmp_0 ! Let/loop value, e.g., 'domain': object
;
if (debug_rules) DB_Rule(R_84, 84);
! [2: let the domain be the parameter-object]
tmp_0 = parameter_value;
! [3: carry out the choosing notable locale objects activity with the domain]
CarryOutActivity(V31_choosing_notable_locale_, tmp_0);
! [4: continue the activity]
rfalse;
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: for Printing the locale description (B120_for_printing_the_locale)
! ----------------------------------------------------------------------------------------------------
! Rule 1/2 ! For printing the locale description ( this is the interesting locale paragraphs rule ):
! === equally specific with ===
! Rule 2/2 ! For printing the locale description ( this is the you-can-also-see rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! For printing the locale description ( this is the interesting locale paragraphs rule ):
[ R_85
tmp_0 ! Let/loop value, e.g., 'domain': object
tmp_1 ! Let/loop value (deallocated by end of phrase)
tmp_2 ! Let/loop value (deallocated by end of phrase)
ct_0 ! currently selected table
ct_1 ! currently selected row
;
if (debug_rules) DB_Rule(R_85, 85);
! [2: let the domain be the parameter-object]
tmp_0 = parameter_value;
! [3: sort the table of locale priorities in locale description priority order]
TableSort(T1_locale_priorities, 106, 1);
! [4: repeat through the table of locale priorities]
@push ct_0; @push ct_1;
for (tmp_1=T1_locale_priorities, tmp_2=1, ct_0=tmp_1, ct_1=tmp_2:
tmp_2<=TableRows(tmp_1):
tmp_2++, ct_0=tmp_1, ct_1=tmp_2)
if (TableRowIsBlank(ct_0, ct_1)==false)
{! [5: carry out the printing a locale paragraph about activity with the notable-object entry]
CarryOutActivity(V32_printing_a_locale_paragr, TableLookUpEntry(ct_0,105,ct_1));
}
@pull ct_1; @pull ct_0;! [6: continue the activity]
rfalse;
RulebookSucceeds(); rtrue;
rfalse;
];
! From the Standard Rules
! No specific request
! For printing the locale description ( this is the you-can-also-see rule ):
[ R_86
tmp_0 ! Let/loop value, e.g., 'domain': object
tmp_1 ! Let/loop value, e.g., 'mentionable count': number
tmp_2 ! Let/loop value (deallocated by end of phrase)
tmp_3 ! Let/loop value (deallocated by end of phrase)
tmp_4 ! Let/loop value (deallocated by end of phrase)
tmp_5 ! Let/loop value (deallocated by end of phrase)
ct_0 ! currently selected table
ct_1 ! currently selected row
;
if (debug_rules) DB_Rule(R_86, 86);
! [2: let the domain be the parameter-object]
tmp_0 = parameter_value;
! [3: let the mentionable count be 0]
tmp_1 = 0;
! [4: repeat with item running through things]
for (tmp_2=Prop_2(0), tmp_3=Prop_2(tmp_2): tmp_2: tmp_2=tmp_3, tmp_3=Prop_2(tmp_3))
{! [5: now the item is not marked for listing]
(Adj_65_t3_v10(tmp_2));
}
! [6: repeat through the table of locale priorities]
@push ct_0; @push ct_1;
for (tmp_2=T1_locale_priorities, tmp_3=1, ct_0=tmp_2, ct_1=tmp_3:
tmp_3<=TableRows(tmp_2):
tmp_3++, ct_0=tmp_2, ct_1=tmp_3)
if (TableRowIsBlank(ct_0, ct_1)==false)
{! [7: if the locale description priority entry is greater than 0]
if (((TableLookUpEntry(ct_0,106,ct_1) > 0)))
{! [8: now the notable-object entry is marked for listing]
(Adj_65_t2_v10(TableLookUpEntry(ct_0,105,ct_1)));
}
! [9: increase the mentionable count by 1]
tmp_1 = tmp_1 + 1;;
}
@pull ct_1; @pull ct_0;! [10: if the mentionable count is greater than 0]
if (((tmp_1 > 0)))
{! [11: repeat with item running through things]
for (tmp_2=Prop_3(0), tmp_3=Prop_3(tmp_2): tmp_2: tmp_2=tmp_3, tmp_3=Prop_3(tmp_3))
{! [12: if the item is mentioned]
if ((((Adj_67_t1_v10(tmp_2)))))
{! [13: now the item is not marked for listing]
(Adj_65_t3_v10(tmp_2));
}
}
! [14: begin the listing nondescript items activity with the domain]
BeginActivity(V8_listing_nondescript_items, tmp_0);
! [15: if the number of marked for listing things is 0]
if ((((Prop_4()) == 0)))
{! [16: abandon the listing nondescript items activity with the domain]
AbandonActivity(V8_listing_nondescript_items, tmp_0);
} else {
! [17: if handling the listing nondescript items activity with the domain]
if (((~~(ForActivity(V8_listing_nondescript_items, tmp_0)))))
{! [18: if the domain is the location]
if (((tmp_0 == real_location)))
{! [19: say ~[We] ~ ( a )]
say__p=1;! [20: ~[We] ~ ( a )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),(LocalParking-->3=tmp_3),(LocalParking-->4=ct_0),(LocalParking-->5=ct_1),TX_R_140); .L_Say18; .L_SayX18;} else {
! [21: if the domain is a supporter or the domain is an animal]
if ((((tmp_0 ofclass K6_supporter))) || (((tmp_0 ofclass K12_animal))))
{! [22: say ~On [the domain] [we] ~ ( b )]
say__p=1;! [23: ~On [the domain] [we] ~ ( b )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),(LocalParking-->3=tmp_3),(LocalParking-->4=ct_0),(LocalParking-->5=ct_1),TX_R_141); .L_Say19; .L_SayX19;} else {
! [24: say ~In [the domain] [we] ~ ( c )]
say__p=1;! [25: ~In [the domain] [we] ~ ( c )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),(LocalParking-->3=tmp_3),(LocalParking-->4=ct_0),(LocalParking-->5=ct_1),TX_R_142); .L_Say20; .L_SayX20;}
}
! [26: if the locale paragraph count is greater than 0]
if ((((Global_Vars-->9) > 0)))
{! [27: say ~[regarding the player][can] also see ~ ( d )]
say__p=1;! [28: ~[regarding the player][can] also see ~ ( d )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),(LocalParking-->3=tmp_3),(LocalParking-->4=ct_0),(LocalParking-->5=ct_1),TX_R_143); .L_Say21; .L_SayX21;} else {
! [29: say ~[regarding the player][can] see ~ ( e )]
say__p=1;! [30: ~[regarding the player][can] see ~ ( e )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),(LocalParking-->3=tmp_3),(LocalParking-->4=ct_0),(LocalParking-->5=ct_1),TX_R_144); .L_Say22; .L_SayX22;}
! [31: let the common holder be nothing]
tmp_2 = nothing;
! [32: let contents form of list be true]
tmp_3 = 1;
! [33: repeat with list item running through marked for listing things]
for (tmp_4=Prop_5(0), tmp_5=Prop_5(tmp_4): tmp_4: tmp_4=tmp_5, tmp_5=Prop_5(tmp_5))
{! [34: if the holder of the list item is not the common holder]
if (((~~(((HolderOf(tmp_4)) == tmp_2)))))
{! [35: if the common holder is nothing]
if (((tmp_2 == nothing)))
{! [36: now the common holder is the holder of the list item]
tmp_2 = (HolderOf(tmp_4));
} else {
! [37: now contents form of list is false]
tmp_3 = 0;
}
}
! [38: if the list item is mentioned]
if ((((Adj_67_t1_v10(tmp_4)))))
{! [39: now the list item is not marked for listing]
(Adj_65_t3_v10(tmp_4));
}
}
! [40: filter list recursion to unmentioned things]
list_filter_routine = Prop_6;
! [41: if contents form of list is true and the common holder is not nothing]
if (((((tmp_3 && true) == (1 && true)))) && (((~~((tmp_2 == nothing))))))
{! [42: list the contents of the common holder , as a sentence , including contents , giving brief inventory information , tersely , not listing concealed items , listing marked items only]
WriteListFrom(child(tmp_2), 2776);
} else {
! [43: say ~[a list of marked for listing things including contents]~]
say__p=1;! [44: a list of marked for listing things including contents]
ParaContent(); objectloop(tmp_4 ofclass Object)
if (((tmp_4 ofclass K2_thing) && ((Adj_65_t1_v10(tmp_4)))))
give tmp_4 workflag2;
else
give tmp_4 ~workflag2;
WriteListOfMarkedObjects(ENGLISH_BIT+RECURSE_BIT+PARTINV_BIT+
TERSE_BIT+CONCEAL_BIT); .L_Say23; .L_SayX23;}
! [45: if the domain is the location]
if (((tmp_0 == real_location)))
{! [46: say ~ here~ ( f )]
say__p=1;! [47: ~ here~ ( f )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),(LocalParking-->3=tmp_3),(LocalParking-->4=ct_0),(LocalParking-->5=ct_1),(LocalParking-->6=tmp_4),(LocalParking-->7=tmp_5),TX_R_145); .L_Say24; .L_SayX24;}
! [48: say ~.[paragraph break]~]
say__p=1;! [49: ~.~]
ParaContent(); print ".";! [50: paragraph break]
ParaContent(); DivideParagraphPoint(); new_line; .L_Say25; .L_SayX25;! [51: unfilter list recursion]
list_filter_routine = 0;
}
! [52: end the listing nondescript items activity with the domain]
EndActivity(V8_listing_nondescript_items, tmp_0);
}
}
! [53: continue the activity]
rfalse;
RulebookSucceeds(); rtrue;
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: for Choosing notable locale objects (B123_for_choosing_notable_lo)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! For choosing notable locale objects ( this is the standard notable locale objects rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! For choosing notable locale objects ( this is the standard notable locale objects rule ):
[ R_87
tmp_0 ! Let/loop value, e.g., 'domain': object
tmp_1 ! Let/loop value, e.g., 'held item': object
;
if (debug_rules) DB_Rule(R_87, 87);
! [2: let the domain be the parameter-object]
tmp_0 = parameter_value;
! [3: let the held item be the first thing held by the domain]
tmp_1 = (child(tmp_0));
! [4: while the held item is a thing]
while (((tmp_1 ofclass K2_thing)))
{! [5: set the locale priority of the held item to 5]
(PHR_82_r0 (tmp_1,5));
! [6: now the held item is the next thing held after the held item]
tmp_1 = (sibling(tmp_1));
}
! [7: continue the activity]
rfalse;
RulebookSucceeds(); rtrue;
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: for Printing a locale paragraph about (B126_for_printing_a_locale_p)
! ----------------------------------------------------------------------------------------------------
! Rule 1/9 ! For printing a locale paragraph about a supporter ( called the tabletop ) ( this is the initial appearance on supporters rule ):
! >>> III.1 - Object To Which Rule Applies >>>
! Rule 2/9 ! For printing a locale paragraph about a thing ( called the item ) ( this is the don't mention player's supporter in room descriptions rule ):
! === equally specific with ===
! Rule 3/9 ! For printing a locale paragraph about a thing ( called the item ) ( this is the don't mention scenery in room descriptions rule ):
! === equally specific with ===
! Rule 4/9 ! For printing a locale paragraph about a thing ( called the item ) ( this is the don't mention undescribed items in room descriptions rule ):
! === equally specific with ===
! Rule 5/9 ! For printing a locale paragraph about a thing ( called the item ) ( this is the set pronouns from items in room descriptions rule ):
! === equally specific with ===
! Rule 6/9 ! For printing a locale paragraph about a thing ( called the item ) ( this is the offer items to writing a paragraph about rule ):
! === equally specific with ===
! Rule 7/9 ! For printing a locale paragraph about a thing ( called the item ) ( this is the use initial appearance in room descriptions rule ):
! === equally specific with ===
! Rule 8/9 ! For printing a locale paragraph about a thing ( called the item ) ( this is the describe what's on scenery supporters in room descriptions rule ):
! === equally specific with ===
! Rule 9/9 ! For printing a locale paragraph about a thing ( called the item ) ( this is the describe what's on mentioned supporters in room descriptions rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! For printing a locale paragraph about a supporter ( called the tabletop ) ( this is the initial appearance on supporters rule ):
[ R_94
tmp_0 ! Let/loop value, e.g., 'tabletop': supporter
tmp_1 ! Let/loop value (deallocated by end of phrase)
tmp_2 ! Let/loop value (deallocated by end of phrase)
;
if ((((tmp_0 = parameter_value, (((parameter_value ofclass K6_supporter) && (tmp_0=(parameter_value), true))))) || (tmp_0 = 0,false))) { ! Runs only when pattern matches
if (debug_rules) DB_Rule(R_94, 94);
! [2: repeat with item running through not handled things on the tabletop which provide the property initial appearance]
for (tmp_1=Prop_7(tmp_0,tmp_0,tmp_0,0), tmp_2=Prop_7(tmp_0,tmp_0,tmp_0,tmp_1): tmp_1: tmp_1=tmp_2, tmp_2=Prop_7(tmp_0,tmp_0,tmp_0,tmp_2))
{! [3: if the item is not a person and the initial appearance of the item is not ~~ and the item is not undescribed]
if ((((~~((tmp_1 ofclass K8_person))))) && ((((~~(( BlkValueCompare(GProperty(10, tmp_1,initial), EMPTY_TEXT_VALUE) == 0))))) && (((~~(((Adj_64_t1_v10(tmp_1)))))))))
{! [4: now the item is mentioned]
(Adj_67_t2_v10(tmp_1));
! [5: say initial appearance of the item]
say__p=1;! [6: initial appearance of the item]
ParaContent(); @push self; print (TEXT_TY_Say) GProperty(10, self=tmp_1,initial);@pull self; .L_Say26; .L_SayX26;! [7: say paragraph break]
say__p=1;! [8: paragraph break]
ParaContent(); DivideParagraphPoint(); new_line; .L_Say27; .L_SayX27;}
}
! [9: continue the activity]
rfalse;
RulebookSucceeds(); rtrue;
} else if (debug_rules > 1) DB_Rule(R_94, 94, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! For printing a locale paragraph about a thing ( called the item ) ( this is the don't mention player's supporter in room descriptions rule ):
[ R_88
tmp_0 ! Let/loop value, e.g., 'item': thing
;
if ((((tmp_0 = parameter_value, (((parameter_value ofclass K2_thing) && (tmp_0=(parameter_value), true))))) || (tmp_0 = 0,false))) { ! Runs only when pattern matches
if (debug_rules) DB_Rule(R_88, 88);
! [2: if the item encloses the player]
if (((IndirectlyContains(tmp_0,player))))
{! [3: set the locale priority of the item to 0]
(PHR_82_r0 (tmp_0,0));
}
! [4: continue the activity]
rfalse;
RulebookSucceeds(); rtrue;
} else if (debug_rules > 1) DB_Rule(R_88, 88, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! For printing a locale paragraph about a thing ( called the item ) ( this is the don't mention scenery in room descriptions rule ):
[ R_89
tmp_0 ! Let/loop value, e.g., 'item': thing
;
if ((((tmp_0 = parameter_value, (((parameter_value ofclass K2_thing) && (tmp_0=(parameter_value), true))))) || (tmp_0 = 0,false))) { ! Runs only when pattern matches
if (debug_rules) DB_Rule(R_89, 89);
! [2: if the item is scenery]
if ((((Adj_59_t1_v10(tmp_0)))))
{! [3: set the locale priority of the item to 0]
(PHR_82_r0 (tmp_0,0));
}
! [4: continue the activity]
rfalse;
RulebookSucceeds(); rtrue;
} else if (debug_rules > 1) DB_Rule(R_89, 89, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! For printing a locale paragraph about a thing ( called the item ) ( this is the don't mention undescribed items in room descriptions rule ):
[ R_90
tmp_0 ! Let/loop value, e.g., 'item': thing
;
if ((((tmp_0 = parameter_value, (((parameter_value ofclass K2_thing) && (tmp_0=(parameter_value), true))))) || (tmp_0 = 0,false))) { ! Runs only when pattern matches
if (debug_rules) DB_Rule(R_90, 90);
! [2: if the item is undescribed]
if ((((Adj_64_t1_v10(tmp_0)))))
{! [3: set the locale priority of the item to 0]
(PHR_82_r0 (tmp_0,0));
}
! [4: continue the activity]
rfalse;
RulebookSucceeds(); rtrue;
} else if (debug_rules > 1) DB_Rule(R_90, 90, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! For printing a locale paragraph about a thing ( called the item ) ( this is the set pronouns from items in room descriptions rule ):
[ R_91
tmp_0 ! Let/loop value, e.g., 'item': thing
;
if ((((tmp_0 = parameter_value, (((parameter_value ofclass K2_thing) && (tmp_0=(parameter_value), true))))) || (tmp_0 = 0,false))) { ! Runs only when pattern matches
if (debug_rules) DB_Rule(R_91, 91);
! [2: if the item is not mentioned]
if (((~~(((Adj_67_t1_v10(tmp_0)))))))
{! [3: set pronouns from the item]
PronounNotice(tmp_0);
}
! [4: continue the activity]
rfalse;
RulebookSucceeds(); rtrue;
} else if (debug_rules > 1) DB_Rule(R_91, 91, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! For printing a locale paragraph about a thing ( called the item ) ( this is the offer items to writing a paragraph about rule ):
[ R_92
tmp_0 ! Let/loop value, e.g., 'item': thing
;
if ((((tmp_0 = parameter_value, (((parameter_value ofclass K2_thing) && (tmp_0=(parameter_value), true))))) || (tmp_0 = 0,false))) { ! Runs only when pattern matches
if (debug_rules) DB_Rule(R_92, 92);
! [2: if the item is not mentioned]
if (((~~(((Adj_67_t1_v10(tmp_0)))))))
{! [3: if a paragraph break is pending]
if (((say__p)))
{! [4: say ~[conditional paragraph break]~]
say__p=1;! [5: conditional paragraph break]
ParaContent(); DivideParagraphPoint(); .L_Say28; .L_SayX28;}
! [6: carry out the writing a paragraph about activity with the item]
CarryOutActivity(V7_writing_a_paragraph_about, tmp_0);
! [7: if a paragraph break is pending]
if (((say__p)))
{! [8: increase the locale paragraph count by 1]
(Global_Vars-->9) = (Global_Vars-->9) + 1;;
! [9: now the item is mentioned]
(Adj_67_t2_v10(tmp_0));
! [10: say ~[conditional paragraph break]~]
say__p=1;! [11: conditional paragraph break]
ParaContent(); DivideParagraphPoint(); .L_Say29; .L_SayX29;}
}
! [12: continue the activity]
rfalse;
RulebookSucceeds(); rtrue;
} else if (debug_rules > 1) DB_Rule(R_92, 92, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! For printing a locale paragraph about a thing ( called the item ) ( this is the use initial appearance in room descriptions rule ):
[ R_93
tmp_0 ! Let/loop value, e.g., 'item': thing
tmp_1 ! Let/loop value (deallocated by end of phrase)
tmp_2 ! Let/loop value (deallocated by end of phrase)
;
if ((((tmp_0 = parameter_value, (((parameter_value ofclass K2_thing) && (tmp_0=(parameter_value), true))))) || (tmp_0 = 0,false))) { ! Runs only when pattern matches
if (debug_rules) DB_Rule(R_93, 93);
! [2: if the item is not mentioned]
if (((~~(((Adj_67_t1_v10(tmp_0)))))))
{! [3: if the item provides the property initial appearance and the item is not handled and the initial appearance of the item is not ~~]
if ((((WhetherProvides(tmp_0, false, initial)))) && ((((~~(((Adj_62_t1_v10(tmp_0))))))) && (((~~(( BlkValueCompare(GProperty(10, tmp_0,initial), EMPTY_TEXT_VALUE) == 0)))))))
{! [4: increase the locale paragraph count by 1]
(Global_Vars-->9) = (Global_Vars-->9) + 1;;
! [5: say ~[initial appearance of the item]~]
say__p=1;! [6: initial appearance of the item]
ParaContent(); @push self; print (TEXT_TY_Say) GProperty(10, self=tmp_0,initial);@pull self; .L_Say30; .L_SayX30;! [7: say ~[paragraph break]~]
say__p=1;! [8: paragraph break]
ParaContent(); DivideParagraphPoint(); new_line; .L_Say31; .L_SayX31;! [9: if a locale-supportable thing is on the item]
if ((((Prop_8(tmp_0)))))
{! [10: repeat with possibility running through things on the item]
for (tmp_1=Prop_9(tmp_0,0), tmp_2=Prop_9(tmp_0,tmp_1): tmp_1: tmp_1=tmp_2, tmp_2=Prop_9(tmp_0,tmp_2))
{! [11: now the possibility is marked for listing]
(Adj_65_t2_v10(tmp_1));
! [12: if the possibility is mentioned]
if ((((Adj_67_t1_v10(tmp_1)))))
{! [13: now the possibility is not marked for listing]
(Adj_65_t3_v10(tmp_1));
}
}
! [14: say ~On [the item] ~ ( a )]
say__p=1;! [15: ~On [the item] ~ ( a )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),TX_R_146); .L_Say32; .L_SayX32;! [16: list the contents of the item , as a sentence , including contents , giving brief inventory information , tersely , not listing concealed items , prefacing with is/are , listing marked items only]
WriteListFrom(child(tmp_0), 3800);
! [17: say ~.[paragraph break]~]
say__p=1;! [18: ~.~]
ParaContent(); print ".";! [19: paragraph break]
ParaContent(); DivideParagraphPoint(); new_line; .L_Say33; .L_SayX33;}
! [20: now the item is mentioned]
(Adj_67_t2_v10(tmp_0));
}
}
! [21: continue the activity]
rfalse;
RulebookSucceeds(); rtrue;
} else if (debug_rules > 1) DB_Rule(R_93, 93, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! For printing a locale paragraph about a thing ( called the item ) ( this is the describe what's on scenery supporters in room descriptions rule ):
[ R_96
tmp_0 ! Let/loop value, e.g., 'item': thing
tmp_1 ! Let/loop value (deallocated by end of phrase)
tmp_2 ! Let/loop value (deallocated by end of phrase)
;
if ((((tmp_0 = parameter_value, (((parameter_value ofclass K2_thing) && (tmp_0=(parameter_value), true))))) || (tmp_0 = 0,false))) { ! Runs only when pattern matches
if (debug_rules) DB_Rule(R_96, 96);
! [2: if the item is scenery and the item does not enclose the player]
if (((((Adj_59_t1_v10(tmp_0))))) && (((~~((IndirectlyContains(tmp_0,player)))))))
{! [3: if a locale-supportable thing is on the item]
if ((((Prop_10(tmp_0)))))
{! [4: set pronouns from the item]
PronounNotice(tmp_0);
! [5: repeat with possibility running through things on the item]
for (tmp_1=Prop_11(tmp_0,0), tmp_2=Prop_11(tmp_0,tmp_1): tmp_1: tmp_1=tmp_2, tmp_2=Prop_11(tmp_0,tmp_2))
{! [6: now the possibility is marked for listing]
(Adj_65_t2_v10(tmp_1));
! [7: if the possibility is mentioned]
if ((((Adj_67_t1_v10(tmp_1)))))
{! [8: now the possibility is not marked for listing]
(Adj_65_t3_v10(tmp_1));
}
}
! [9: increase the locale paragraph count by 1]
(Global_Vars-->9) = (Global_Vars-->9) + 1;;
! [10: say ~On [the item] ~ ( a )]
say__p=1;! [11: ~On [the item] ~ ( a )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),TX_R_147); .L_Say34; .L_SayX34;! [12: list the contents of the item , as a sentence , including contents , giving brief inventory information , tersely , not listing concealed items , prefacing with is/are , listing marked items only]
WriteListFrom(child(tmp_0), 3800);
! [13: say ~.[paragraph break]~]
say__p=1;! [14: ~.~]
ParaContent(); print ".";! [15: paragraph break]
ParaContent(); DivideParagraphPoint(); new_line; .L_Say35; .L_SayX35;}
}
! [16: continue the activity]
rfalse;
RulebookSucceeds(); rtrue;
} else if (debug_rules > 1) DB_Rule(R_96, 96, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! For printing a locale paragraph about a thing ( called the item ) ( this is the describe what's on mentioned supporters in room descriptions rule ):
[ R_97
tmp_0 ! Let/loop value, e.g., 'item': thing
tmp_1 ! Let/loop value (deallocated by end of phrase)
tmp_2 ! Let/loop value (deallocated by end of phrase)
;
if ((((tmp_0 = parameter_value, (((parameter_value ofclass K2_thing) && (tmp_0=(parameter_value), true))))) || (tmp_0 = 0,false))) { ! Runs only when pattern matches
if (debug_rules) DB_Rule(R_97, 97);
! [2: if the item is mentioned and the item is not undescribed and the item is not scenery and the item does not enclose the player]
if (((((Adj_67_t1_v10(tmp_0))))) && ((((~~(((Adj_64_t1_v10(tmp_0))))))) && ((((~~(((Adj_59_t1_v10(tmp_0))))))) && (((~~((IndirectlyContains(tmp_0,player)))))))))
{! [3: if a locale-supportable thing is on the item]
if ((((Prop_12(tmp_0)))))
{! [4: set pronouns from the item]
PronounNotice(tmp_0);
! [5: repeat with possibility running through things on the item]
for (tmp_1=Prop_13(tmp_0,0), tmp_2=Prop_13(tmp_0,tmp_1): tmp_1: tmp_1=tmp_2, tmp_2=Prop_13(tmp_0,tmp_2))
{! [6: now the possibility is marked for listing]
(Adj_65_t2_v10(tmp_1));
! [7: if the possibility is mentioned]
if ((((Adj_67_t1_v10(tmp_1)))))
{! [8: now the possibility is not marked for listing]
(Adj_65_t3_v10(tmp_1));
}
}
! [9: increase the locale paragraph count by 1]
(Global_Vars-->9) = (Global_Vars-->9) + 1;;
! [10: say ~On [the item] ~ ( a )]
say__p=1;! [11: ~On [the item] ~ ( a )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),TX_R_148); .L_Say36; .L_SayX36;! [12: list the contents of the item , as a sentence , including contents , giving brief inventory information , tersely , not listing concealed items , prefacing with is/are , listing marked items only]
WriteListFrom(child(tmp_0), 3800);
! [13: say ~.[paragraph break]~]
say__p=1;! [14: ~.~]
ParaContent(); print ".";! [15: paragraph break]
ParaContent(); DivideParagraphPoint(); new_line; .L_Say37; .L_SayX37;}
}
! [16: continue the activity]
rfalse;
RulebookSucceeds(); rtrue;
} else if (debug_rules > 1) DB_Rule(R_97, 97, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: carry out Taking inventory (B132_carry_out_taking_invent)
! ----------------------------------------------------------------------------------------------------
! Rule 1/2 ! Carry out taking inventory ( this is the print empty inventory rule ):
! === equally specific with ===
! Rule 2/2 ! Carry out taking inventory ( this is the print standard inventory rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Carry out taking inventory ( this is the print empty inventory rule ):
[ R_98 ;
if (actor == player) {
if (debug_rules) DB_Rule(R_98, 98);
! [2: if the first thing held by the player is nothing]
if ((((child(player)) == nothing)))
{! [3: say ~[We] [are] carrying nothing.~ ( a )]
say__p=1;! [4: ~[We] [are] carrying nothing.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_149); new_line; .L_Say38; .L_SayX38;rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_98, 98, 'actor');
rfalse;
];
! From the Standard Rules
! No specific request
! Carry out taking inventory ( this is the print standard inventory rule ):
[ R_99 ;
if (actor == player) {
if (debug_rules) DB_Rule(R_99, 99);
! [2: say ~[We] [are] carrying:[line break]~ ( a )]
say__p=1;! [3: ~[We] [are] carrying:[line break]~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_150); .L_Say39; .L_SayX39;! [4: list the contents of the player , with newlines , indented , including contents , giving inventory information , with extra indentation]
WriteListFrom(child(player), 8215);
} else if (debug_rules > 1) DB_Rule(R_99, 99, 'actor');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Taking inventory (B133_report_taking_inventory)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor taking inventory ( this is the report other people taking inventory rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor taking inventory ( this is the report other people taking inventory rule ):
[ R_100 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_100, 100);
! [2: if the actor is not the player and the action is not silent]
if ((((~~((actor == player))))) && (((keep_silent == false))))
{! [3: say ~[The actor] [look] through [their] possessions.~ ( a )]
say__p=1;! [4: ~[The actor] [look] through [their] possessions.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_151); new_line; .L_Say40; .L_SayX40;}
} else if (debug_rules > 1) DB_Rule(R_100, 100, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Taking (B134_check_taking)
! ----------------------------------------------------------------------------------------------------
! Rule 1/12 ! Check an actor taking ( this is the can't take yourself rule ):
! === equally specific with ===
! Rule 2/12 ! Check an actor taking ( this is the can't take other people rule ):
! === equally specific with ===
! Rule 3/12 ! Check an actor taking ( this is the can't take component parts rule ):
! === equally specific with ===
! Rule 4/12 ! Check an actor taking ( this is the can't take people's possessions rule ):
! === equally specific with ===
! Rule 5/12 ! Check an actor taking ( this is the can't take items out of play rule ):
! === equally specific with ===
! Rule 6/12 ! Check an actor taking ( this is the can't take what you're inside rule ):
! === equally specific with ===
! Rule 7/12 ! Check an actor taking ( this is the can't take what's already taken rule ):
! === equally specific with ===
! Rule 8/12 ! Check an actor taking ( this is the can't take scenery rule ):
! === equally specific with ===
! Rule 9/12 ! Check an actor taking ( this is the can only take things rule ):
! === equally specific with ===
! Rule 10/12 ! Check an actor taking ( this is the can't take what's fixed in place rule ):
! === equally specific with ===
! Rule 11/12 ! Check an actor taking ( this is the use player's holdall to avoid exceeding carrying capacity rule ):
! === equally specific with ===
! Rule 12/12 ! Check an actor taking ( this is the can't exceed carrying capacity rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor taking ( this is the can't take yourself rule ):
[ R_101 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_101, 101);
! [2: if the actor is the noun]
if (((actor == noun)))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[We] [are] always self-possessed.~ ( a )]
say__p=1;! [5: ~[We] [are] always self-possessed.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_152); new_line; .L_Say41; .L_SayX41;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_101, 101, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor taking ( this is the can't take other people rule ):
[ R_102 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_102, 102);
! [2: if the noun is a person]
if (((noun ofclass K8_person)))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~I don't suppose [the noun] [would care] for that.~ ( a )]
say__p=1;! [5: ~I don't suppose [the noun] [would care] for that.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_153); new_line; .L_Say42; .L_SayX42;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_102, 102, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor taking ( this is the can't take component parts rule ):
[ R_103
tmp_0 ! Let/loop value, e.g., 'whole': thing
;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_103, 103);
! [2: if the noun is part of something ( called the whole )]
if ((((noun.component_parent) ofclass K2_thing) && (tmp_0=((noun.component_parent)), true)))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[regarding the noun][Those] [seem] to be a part of [the whole].~ ( a )]
say__p=1;! [5: ~[regarding the noun][Those] [seem] to be a part of [the whole].~ ( a )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),TX_R_154); new_line; .L_Say43; .L_SayX43;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_103, 103, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor taking ( this is the can't take people's possessions rule ):
[ R_104
tmp_0 ! Let/loop value, e.g., 'local ceiling': object
tmp_1 ! Let/loop value, e.g., 'owner': object
;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_104, 104);
! [2: let the local ceiling be the common ancestor of the actor with the noun]
tmp_0 = (CommonAncestor(actor, noun));
! [3: let the owner be the not-counting-parts holder of the noun]
tmp_1 = (CoreOfParentOfCoreOf(noun));
! [4: while the owner is not nothing and the owner is not the local ceiling]
while ((((~~((tmp_1 == nothing))))) && (((~~((tmp_1 == tmp_0))))))
{! [5: if the owner is a person]
if (((tmp_1 ofclass K8_person)))
{! [6: if the actor is the player]
if (((actor == player)))
{! [7: say ~[regarding the noun][Those] [seem] to belong to [the owner].~ ( a )]
say__p=1;! [8: ~[regarding the noun][Those] [seem] to belong to [the owner].~ ( a )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),TX_R_155); new_line; .L_Say44; .L_SayX44;}
! [9: stop the action]
rtrue;
}
! [10: let the owner be the not-counting-parts holder of the owner]
tmp_1 = (CoreOfParentOfCoreOf(tmp_1));
}
} else if (debug_rules > 1) DB_Rule(R_104, 104, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor taking ( this is the can't take items out of play rule ):
[ R_105
tmp_0 ! Let/loop value, e.g., 'H': object
;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_105, 105);
! [2: let h be the noun]
tmp_0 = noun;
! [3: while h is not nothing and h is not a room]
while ((((~~((tmp_0 == nothing))))) && (((~~((tmp_0 ofclass K1_room))))))
{! [4: let h be the not-counting-parts holder of h]
tmp_0 = (CoreOfParentOfCoreOf(tmp_0));
}
! [5: if h is nothing]
if (((tmp_0 == nothing)))
{! [6: if the actor is the player]
if (((actor == player)))
{! [7: say ~[regarding the noun][Those] [aren't] available.~ ( a )]
say__p=1;! [8: ~[regarding the noun][Those] [aren't] available.~ ( a )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),TX_R_156); new_line; .L_Say45; .L_SayX45;}
! [9: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_105, 105, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor taking ( this is the can't take what you're inside rule ):
[ R_106
tmp_0 ! Let/loop value, e.g., 'local ceiling': object
;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_106, 106);
! [2: let the local ceiling be the common ancestor of the actor with the noun]
tmp_0 = (CommonAncestor(actor, noun));
! [3: if the local ceiling is the noun]
if (((tmp_0 == noun)))
{! [4: if the actor is the player]
if (((actor == player)))
{! [5: say ~[We] [would have] to get [if noun is a supporter]off[otherwise]out of[end if] [the noun] first.~ ( a )]
say__p=1;! [6: ~[We] [would have] to get [if noun is a supporter]off[otherwise]out of[end if] [the noun] first.~ ( a )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),TX_R_157); new_line; .L_Say46; .L_SayX46;}
! [7: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_106, 106, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor taking ( this is the can't take what's already taken rule ):
[ R_107 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_107, 107);
! [2: if the actor is carrying the noun or the actor is wearing the noun]
if ((((actor == CarrierOf(noun)))) || (((actor == WearerOf(noun)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[We] already [have] [regarding the noun][those].~ ( a )]
say__p=1;! [5: ~[We] already [have] [regarding the noun][those].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_158); new_line; .L_Say47; .L_SayX47;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_107, 107, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor taking ( this is the can't take scenery rule ):
[ R_108 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_108, 108);
! [2: if the noun is scenery]
if ((((Adj_59_t1_v10(noun)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[regarding the noun][They're] hardly portable.~ ( a )]
say__p=1;! [5: ~[regarding the noun][They're] hardly portable.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_159); new_line; .L_Say48; .L_SayX48;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_108, 108, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor taking ( this is the can only take things rule ):
[ R_109 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_109, 109);
! [2: if the noun is not a thing]
if (((~~((noun ofclass K2_thing)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[We] [cannot] carry [the noun].~ ( a )]
say__p=1;! [5: ~[We] [cannot] carry [the noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_160); new_line; .L_Say49; .L_SayX49;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_109, 109, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor taking ( this is the can't take what's fixed in place rule ):
[ R_110 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_110, 110);
! [2: if the noun is fixed in place]
if ((((Adj_57_t1_v10(noun)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[regarding the noun][They're] fixed in place.~ ( a )]
say__p=1;! [5: ~[regarding the noun][They're] fixed in place.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_161); new_line; .L_Say50; .L_SayX50;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_110, 110, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor taking ( this is the use player's holdall to avoid exceeding carrying capacity rule ):
[ R_111
tmp_0 ! Let/loop value, e.g., 'current working sack': player's holdall
tmp_1 ! Let/loop value (deallocated by end of phrase)
tmp_2 ! Let/loop value (deallocated by end of phrase)
tmp_3 ! Let/loop value (deallocated by end of phrase)
;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_111, 111);
! [2: if the number of things carried by the actor is at least the carrying capacity of the actor]
if ((((Prop_14()) >= GProperty(10, actor,capacity))))
{! [3: if the actor is holding a player's holdall ( called the current working sack )]
if ((((Prop_15() && (tmp_0=deferred_calling_list-->0, true)) || (tmp_0 = 0,false))))
{! [4: let the transferred item be nothing]
tmp_1 = nothing;
! [5: repeat with the possible item running through things carried by the actor]
for (tmp_2=Prop_16(0), tmp_3=Prop_16(tmp_2): tmp_2: tmp_2=tmp_3, tmp_3=Prop_16(tmp_3))
{! [6: if the possible item is not lit and the possible item is not the current working sack]
if ((((~~(((Adj_53_t1_v10(tmp_2))))))) && (((~~((tmp_2 == tmp_0))))))
{! [7: let the transferred item be the possible item]
tmp_1 = tmp_2;
}
}
! [8: if the transferred item is not nothing]
if (((~~((tmp_1 == nothing)))))
{! [9: if the actor is the player]
if (((actor == player)))
{! [10: say ~(putting [the transferred item] into [the current working sack] to make room)[command clarification break]~ ( a )]
say__p=1;! [11: ~(putting [the transferred item] into [the current working sack] to make room)[command clarification break]~ ( a )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),(LocalParking-->3=tmp_3),TX_R_162); .L_Say51; .L_SayX51;}
! [12: silently try the actor trying inserting the transferred item into the current working sack]
@push keep_silent; keep_silent=1; @push say__p; @push say__pc;
ClearParagraphing(1);
TryAction(0, actor, ##Insert, tmp_1, tmp_0);
DivideParagraphPoint();
@pull say__pc; @pull say__p; AdjustParagraphPoint(); @pull keep_silent;
! [13: if the transferred item is not in the current working sack]
if (((~~((tmp_0 == ContainerOf(tmp_1))))))
{! [14: stop the action]
rtrue;
}
}
}
}
} else if (debug_rules > 1) DB_Rule(R_111, 111, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor taking ( this is the can't exceed carrying capacity rule ):
[ R_112 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_112, 112);
! [2: if the number of things carried by the actor is at least the carrying capacity of the actor]
if ((((Prop_17()) >= GProperty(10, actor,capacity))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[We]['re] carrying too many things already.~ ( a )]
say__p=1;! [5: ~[We]['re] carrying too many things already.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_163); new_line; .L_Say52; .L_SayX52;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_112, 112, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: carry out Taking (B135_carry_out_taking)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Carry out an actor taking ( this is the standard taking rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Carry out an actor taking ( this is the standard taking rule ):
[ R_113 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_113, 113);
! [2: now the actor carries the noun]
MoveObject(noun,actor);
! [3: if the actor is the player]
if (((actor == player)))
{! [4: now the noun is handled]
(Adj_62_t2_v10(noun));
}
} else if (debug_rules > 1) DB_Rule(R_113, 113, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Taking (B136_report_taking)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor taking ( this is the standard report taking rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor taking ( this is the standard report taking rule ):
[ R_114 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_114, 114);
! [2: if the action is not silent]
if (((keep_silent == false)))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~Taken.~ ( a )]
say__p=1;! [5: ~Taken.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_164); new_line; .L_Say53; .L_SayX53;} else {
! [6: say ~[The actor] [pick] up [the noun].~ ( b )]
say__p=1;! [7: ~[The actor] [pick] up [the noun].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_165); new_line; .L_Say54; .L_SayX54;}
}
} else if (debug_rules > 1) DB_Rule(R_114, 114, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Removing it from (B137_check_removing_it_from)
! ----------------------------------------------------------------------------------------------------
! Rule 1/4 ! Check an actor taking ( this is the can't take component parts rule ):
! <<< I - Number of aspects constrained <<<
! Rule 2/4 ! Check an actor removing something from ( this is the can't remove what's not inside rule ):
! === equally specific with ===
! Rule 3/4 ! Check an actor removing something from ( this is the can't remove from people rule ):
! === equally specific with ===
! Rule 4/4 ! Check an actor removing something from ( this is the convert remove to take rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor removing something from ( this is the can't remove what's not inside rule ):
[ R_115 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_115, 115);
! [2: if the holder of the noun is not the second noun]
if (((~~(((HolderOf(noun)) == second)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~But [regarding the noun][they] [aren't] there now.~ ( a )]
say__p=1;! [5: ~But [regarding the noun][they] [aren't] there now.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_166); new_line; .L_Say55; .L_SayX55;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_115, 115, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor removing something from ( this is the can't remove from people rule ):
[ R_116
tmp_0 ! Let/loop value, e.g., 'owner': object
;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_116, 116);
! [2: let the owner be the holder of the noun]
tmp_0 = (HolderOf(noun));
! [3: if the owner is a person]
if (((tmp_0 ofclass K8_person)))
{! [4: if the owner is the actor]
if (((tmp_0 == actor)))
{! [5: convert to the taking off action on the noun]
return GVS_Convert(##Disrobe,noun,0);
}
! [6: if the actor is the player]
if (((actor == player)))
{! [7: say ~[regarding the noun][Those] [seem] to belong to [the owner].~ ( a )]
say__p=1;! [8: ~[regarding the noun][Those] [seem] to belong to [the owner].~ ( a )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),TX_R_167); new_line; .L_Say56; .L_SayX56;}
! [9: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_116, 116, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor removing something from ( this is the convert remove to take rule ):
[ R_117 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_117, 117);
! [2: convert to the taking action on the noun]
return GVS_Convert(##Take,noun,0);
} else if (debug_rules > 1) DB_Rule(R_117, 117, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Dropping (B140_check_dropping)
! ----------------------------------------------------------------------------------------------------
! Rule 1/6 ! Check an actor dropping something which is part of the actor ( this is the can't drop body parts rule ):
! >>> I - Number of aspects constrained >>>
! Rule 2/6 ! Check an actor dropping ( this is the can't drop yourself rule ):
! === equally specific with ===
! Rule 3/6 ! Check an actor dropping ( this is the can't drop what's already dropped rule ):
! === equally specific with ===
! Rule 4/6 ! Check an actor dropping ( this is the can't drop what's not held rule ):
! === equally specific with ===
! Rule 5/6 ! Check an actor dropping ( this is the can't drop clothes being worn rule ):
! === equally specific with ===
! Rule 6/6 ! Check an actor dropping ( this is the can't drop if this exceeds carrying capacity rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor dropping something which is part of the actor ( this is the can't drop body parts rule ):
[ R_119 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing) && (actor == (noun.component_parent)))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_119, 119);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: say ~[We] [can't drop] part of [ourselves].~ ( a )]
say__p=1;! [4: ~[We] [can't drop] part of [ourselves].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_168); new_line; .L_Say57; .L_SayX57;}
! [5: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_119, 119, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor dropping ( this is the can't drop yourself rule ):
[ R_118 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_118, 118);
! [2: if the noun is the actor]
if (((noun == actor)))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[We] [lack] the dexterity.~ ( a )]
say__p=1;! [5: ~[We] [lack] the dexterity.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_169); new_line; .L_Say58; .L_SayX58;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_118, 118, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor dropping ( this is the can't drop what's already dropped rule ):
[ R_120 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_120, 120);
! [2: if the noun is in the holder of the actor]
if ((((HolderOf(actor)) == ContainerOf(noun))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[The noun] [are] already here.~ ( a )]
say__p=1;! [5: ~[The noun] [are] already here.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_170); new_line; .L_Say59; .L_SayX59;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_120, 120, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor dropping ( this is the can't drop what's not held rule ):
[ R_121 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_121, 121);
! [2: if the actor is carrying the noun]
if (((actor == CarrierOf(noun))))
{! [3: continue the action]
rfalse;
}
! [4: if the actor is wearing the noun]
if (((actor == WearerOf(noun))))
{! [5: continue the action]
rfalse;
}
! [6: if the actor is the player]
if (((actor == player)))
{! [7: say ~[We] [haven't] got [regarding the noun][those].~ ( a )]
say__p=1;! [8: ~[We] [haven't] got [regarding the noun][those].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_171); new_line; .L_Say60; .L_SayX60;}
! [9: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_121, 121, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor dropping ( this is the can't drop clothes being worn rule ):
[ R_122 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_122, 122);
! [2: if the actor is wearing the noun]
if (((actor == WearerOf(noun))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~(first taking [the noun] off)[command clarification break]~ ( a )]
say__p=1;! [5: ~(first taking [the noun] off)[command clarification break]~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_172); .L_Say61; .L_SayX61;}
! [6: silently try the actor trying taking off the noun]
@push keep_silent; keep_silent=1; @push say__p; @push say__pc;
ClearParagraphing(1);
TryAction(0, actor, ##Disrobe, noun, 0);
DivideParagraphPoint();
@pull say__pc; @pull say__p; AdjustParagraphPoint(); @pull keep_silent;
! [7: if the actor is wearing the noun]
if (((actor == WearerOf(noun))))
{! [8: stop the action]
rtrue;
}
}
} else if (debug_rules > 1) DB_Rule(R_122, 122, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor dropping ( this is the can't drop if this exceeds carrying capacity rule ):
[ R_123
tmp_0 ! Let/loop value, e.g., 'receptacle': object
;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_123, 123);
! [2: let the receptacle be the holder of the actor]
tmp_0 = (HolderOf(actor));
! [3: if the receptacle is a room]
if (((tmp_0 ofclass K1_room)))
{! [4: continue the action]
rfalse;
}
! [5: if the receptacle provides the property carrying capacity]
if (((WhetherProvides(tmp_0, false, capacity))))
{! [6: if the receptacle is a supporter]
if (((tmp_0 ofclass K6_supporter)))
{! [7: if the number of things on the receptacle is at least the carrying capacity of the receptacle]
if ((((Prop_18(tmp_0)) >= GProperty(OBJECT_TY, tmp_0,capacity))))
{! [8: if the actor is the player]
if (((actor == player)))
{! [9: now the prior named object is nothing]
prior_named_noun = nothing;
! [10: say ~[There] [are] no more room on [the receptacle].~ ( a )]
say__p=1;! [11: ~[There] [are] no more room on [the receptacle].~ ( a )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),TX_R_173); new_line; .L_Say62; .L_SayX62;}
! [12: stop the action]
rtrue;
}
} else {
! [13: if the receptacle is a container]
if (((tmp_0 ofclass K5_container)))
{! [14: if the number of things in the receptacle is at least the carrying capacity of the receptacle]
if ((((Prop_19(tmp_0)) >= GProperty(OBJECT_TY, tmp_0,capacity))))
{! [15: if the actor is the player]
if (((actor == player)))
{! [16: now the prior named object is nothing]
prior_named_noun = nothing;
! [17: say ~[There] [are] no more room in [the receptacle].~ ( b )]
say__p=1;! [18: ~[There] [are] no more room in [the receptacle].~ ( b )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),TX_R_174); new_line; .L_Say63; .L_SayX63;}
! [19: stop the action]
rtrue;
}
}
}
}
} else if (debug_rules > 1) DB_Rule(R_123, 123, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: carry out Dropping (B141_carry_out_dropping)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Carry out an actor dropping ( this is the standard dropping rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Carry out an actor dropping ( this is the standard dropping rule ):
[ R_124 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_124, 124);
! [2: now the noun is in the holder of the actor]
MoveObject(noun,(HolderOf(actor)));
} else if (debug_rules > 1) DB_Rule(R_124, 124, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Dropping (B142_report_dropping)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor dropping ( this is the standard report dropping rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor dropping ( this is the standard report dropping rule ):
[ R_125 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_125, 125);
! [2: if the action is not silent]
if (((keep_silent == false)))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~Dropped.~ ( a )]
say__p=1;! [5: ~Dropped.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_175); new_line; .L_Say64; .L_SayX64;} else {
! [6: say ~[The actor] [put] down [the noun].~ ( b )]
say__p=1;! [7: ~[The actor] [put] down [the noun].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_176); new_line; .L_Say65; .L_SayX65;}
}
} else if (debug_rules > 1) DB_Rule(R_125, 125, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Putting it on (B143_check_putting_it_on)
! ----------------------------------------------------------------------------------------------------
! Rule 1/6 ! Check an actor putting something on ( this is the convert put to drop where possible rule ):
! === equally specific with ===
! Rule 2/6 ! Check an actor putting something on ( this is the can't put what's not held rule ):
! === equally specific with ===
! Rule 3/6 ! Check an actor putting something on ( this is the can't put something on itself rule ):
! === equally specific with ===
! Rule 4/6 ! Check an actor putting something on ( this is the can't put onto what's not a supporter rule ):
! === equally specific with ===
! Rule 5/6 ! Check an actor putting something on ( this is the can't put clothes being worn rule ):
! === equally specific with ===
! Rule 6/6 ! Check an actor putting something on ( this is the can't put if this exceeds carrying capacity rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor putting something on ( this is the convert put to drop where possible rule ):
[ R_126 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_126, 126);
! [2: if the second noun is down or the actor is on the second noun]
if ((((second == I64_down))) || (((second == SupporterOf(actor)))))
{! [3: convert to the dropping action on the noun]
return GVS_Convert(##Drop,noun,0);
}
} else if (debug_rules > 1) DB_Rule(R_126, 126, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor putting something on ( this is the can't put what's not held rule ):
[ R_127 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_127, 127);
! [2: if the actor is carrying the noun]
if (((actor == CarrierOf(noun))))
{! [3: continue the action]
rfalse;
}
! [4: if the actor is wearing the noun]
if (((actor == WearerOf(noun))))
{! [5: continue the action]
rfalse;
}
! [6: carry out the implicitly taking activity with the noun]
CarryOutActivity(V25_implicitly_taking, noun);
! [7: if the actor is carrying the noun]
if (((actor == CarrierOf(noun))))
{! [8: continue the action]
rfalse;
}
! [9: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_127, 127, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor putting something on ( this is the can't put something on itself rule ):
[ R_128
tmp_0 ! Let/loop value, e.g., 'noun-CPC': object
tmp_1 ! Let/loop value, e.g., 'second-CPC': object
tmp_2 ! Let/loop value, e.g., 'transfer ceiling': object
;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_128, 128);
! [2: let the noun-cpc be the component parts core of the noun]
tmp_0 = CoreOf(noun);
! [3: let the second-cpc be the component parts core of the second noun]
tmp_1 = CoreOf(second);
! [4: let the transfer ceiling be the common ancestor of the noun-cpc with the second-cpc]
tmp_2 = (CommonAncestor(tmp_0, tmp_1));
! [5: if the transfer ceiling is the noun-cpc]
if (((tmp_2 == tmp_0)))
{! [6: if the actor is the player]
if (((actor == player)))
{! [7: say ~[We] [can't put] something on top of itself.~ ( a )]
say__p=1;! [8: ~[We] [can't put] something on top of itself.~ ( a )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),TX_R_177); new_line; .L_Say66; .L_SayX66;}
! [9: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_128, 128, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor putting something on ( this is the can't put onto what's not a supporter rule ):
[ R_129 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_129, 129);
! [2: if the second noun is not a supporter]
if (((~~((second ofclass K6_supporter)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~Putting things on [the second noun] [would achieve] nothing.~ ( a )]
say__p=1;! [5: ~Putting things on [the second noun] [would achieve] nothing.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_178); new_line; .L_Say67; .L_SayX67;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_129, 129, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor putting something on ( this is the can't put clothes being worn rule ):
[ R_130 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_130, 130);
! [2: if the actor is wearing the noun]
if (((actor == WearerOf(noun))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~(first taking [regarding the noun][them] off)[command clarification break]~ ( a )]
say__p=1;! [5: ~(first taking [regarding the noun][them] off)[command clarification break]~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_179); .L_Say68; .L_SayX68;}
! [6: silently try the actor trying taking off the noun]
@push keep_silent; keep_silent=1; @push say__p; @push say__pc;
ClearParagraphing(1);
TryAction(0, actor, ##Disrobe, noun, 0);
DivideParagraphPoint();
@pull say__pc; @pull say__p; AdjustParagraphPoint(); @pull keep_silent;
! [7: if the actor is wearing the noun]
if (((actor == WearerOf(noun))))
{! [8: stop the action]
rtrue;
}
}
} else if (debug_rules > 1) DB_Rule(R_130, 130, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor putting something on ( this is the can't put if this exceeds carrying capacity rule ):
[ R_131 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_131, 131);
! [2: if the second noun provides the property carrying capacity]
if (((WhetherProvides(second, false, capacity))))
{! [3: if the number of things on the second noun is at least the carrying capacity of the second noun]
if ((((Prop_20()) >= GProperty(OBJECT_TY, second,capacity))))
{! [4: if the actor is the player]
if (((actor == player)))
{! [5: say ~[There] [are] no more room on [the second noun].~ ( a )]
say__p=1;! [6: ~[There] [are] no more room on [the second noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_180); new_line; .L_Say69; .L_SayX69;}
! [7: stop the action]
rtrue;
}
}
} else if (debug_rules > 1) DB_Rule(R_131, 131, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: carry out Putting it on (B144_carry_out_putting_it_on)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Carry out an actor putting something on ( this is the standard putting rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Carry out an actor putting something on ( this is the standard putting rule ):
[ R_132 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_132, 132);
! [2: now the noun is on the second noun]
MoveObject(noun,second);
} else if (debug_rules > 1) DB_Rule(R_132, 132, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Putting it on (B145_report_putting_it_on)
! ----------------------------------------------------------------------------------------------------
! Rule 1/2 ! Report an actor putting something on ( this is the concise report putting rule ):
! === equally specific with ===
! Rule 2/2 ! Report an actor putting something on ( this is the standard report putting rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor putting something on ( this is the concise report putting rule ):
[ R_133 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_133, 133);
! [2: if the action is not silent]
if (((keep_silent == false)))
{! [3: if the actor is the player and the i6 parser is running multiple actions]
if ((((actor == player))) && (((multiflag==1))))
{! [4: say ~Done.~ ( a )]
say__p=1;! [5: ~Done.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_181); new_line; .L_Say70; .L_SayX70;! [6: stop the action]
rtrue;
}
}
! [7: continue the action]
rfalse;
} else if (debug_rules > 1) DB_Rule(R_133, 133, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Report an actor putting something on ( this is the standard report putting rule ):
[ R_134 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_134, 134);
! [2: if the action is not silent]
if (((keep_silent == false)))
{! [3: say ~[The actor] [put] [the noun] on [the second noun].~ ( a )]
say__p=1;! [4: ~[The actor] [put] [the noun] on [the second noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_182); new_line; .L_Say71; .L_SayX71;}
} else if (debug_rules > 1) DB_Rule(R_134, 134, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Inserting it into (B146_check_inserting_it_into)
! ----------------------------------------------------------------------------------------------------
! Rule 1/7 ! Check an actor inserting something into ( this is the convert insert to drop where possible rule ):
! === equally specific with ===
! Rule 2/7 ! Check an actor inserting something into ( this is the can't insert what's not held rule ):
! === equally specific with ===
! Rule 3/7 ! Check an actor inserting something into ( this is the can't insert something into itself rule ):
! === equally specific with ===
! Rule 4/7 ! Check an actor inserting something into ( this is the can't insert into closed containers rule ):
! === equally specific with ===
! Rule 5/7 ! Check an actor inserting something into ( this is the can't insert into what's not a container rule ):
! === equally specific with ===
! Rule 6/7 ! Check an actor inserting something into ( this is the can't insert clothes being worn rule ):
! === equally specific with ===
! Rule 7/7 ! Check an actor inserting something into ( this is the can't insert if this exceeds carrying capacity rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor inserting something into ( this is the convert insert to drop where possible rule ):
[ R_135 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_135, 135);
! [2: if the second noun is down or the actor is in the second noun]
if ((((second == I64_down))) || (((second == ContainerOf(actor)))))
{! [3: convert to the dropping action on the noun]
return GVS_Convert(##Drop,noun,0);
}
} else if (debug_rules > 1) DB_Rule(R_135, 135, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor inserting something into ( this is the can't insert what's not held rule ):
[ R_136 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_136, 136);
! [2: if the actor is carrying the noun]
if (((actor == CarrierOf(noun))))
{! [3: continue the action]
rfalse;
}
! [4: if the actor is wearing the noun]
if (((actor == WearerOf(noun))))
{! [5: continue the action]
rfalse;
}
! [6: carry out the implicitly taking activity with the noun]
CarryOutActivity(V25_implicitly_taking, noun);
! [7: if the actor is carrying the noun]
if (((actor == CarrierOf(noun))))
{! [8: continue the action]
rfalse;
}
! [9: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_136, 136, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor inserting something into ( this is the can't insert something into itself rule ):
[ R_137
tmp_0 ! Let/loop value, e.g., 'noun-CPC': object
tmp_1 ! Let/loop value, e.g., 'second-CPC': object
tmp_2 ! Let/loop value, e.g., 'transfer ceiling': object
;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_137, 137);
! [2: let the noun-cpc be the component parts core of the noun]
tmp_0 = CoreOf(noun);
! [3: let the second-cpc be the component parts core of the second noun]
tmp_1 = CoreOf(second);
! [4: let the transfer ceiling be the common ancestor of the noun-cpc with the second-cpc]
tmp_2 = (CommonAncestor(tmp_0, tmp_1));
! [5: if the transfer ceiling is the noun-cpc]
if (((tmp_2 == tmp_0)))
{! [6: if the actor is the player]
if (((actor == player)))
{! [7: say ~[We] [can't put] something inside itself.~ ( a )]
say__p=1;! [8: ~[We] [can't put] something inside itself.~ ( a )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),TX_R_183); new_line; .L_Say72; .L_SayX72;}
! [9: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_137, 137, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor inserting something into ( this is the can't insert into closed containers rule ):
[ R_138 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_138, 138);
! [2: if the second noun is a closed container]
if (((second ofclass K5_container) && ((Adj_73_t1_v10(second)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[The second noun] [are] closed.~ ( a )]
say__p=1;! [5: ~[The second noun] [are] closed.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_184); new_line; .L_Say73; .L_SayX73;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_138, 138, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor inserting something into ( this is the can't insert into what's not a container rule ):
[ R_139 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_139, 139);
! [2: if the second noun is not a container]
if (((~~((second ofclass K5_container)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[regarding the second noun][Those] [can't contain] things.~ ( a )]
say__p=1;! [5: ~[regarding the second noun][Those] [can't contain] things.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_185); new_line; .L_Say74; .L_SayX74;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_139, 139, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor inserting something into ( this is the can't insert clothes being worn rule ):
[ R_140 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_140, 140);
! [2: if the actor is wearing the noun]
if (((actor == WearerOf(noun))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~(first taking [regarding the noun][them] off)[command clarification break]~ ( a )]
say__p=1;! [5: ~(first taking [regarding the noun][them] off)[command clarification break]~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_186); .L_Say75; .L_SayX75;}
! [6: silently try the actor trying taking off the noun]
@push keep_silent; keep_silent=1; @push say__p; @push say__pc;
ClearParagraphing(1);
TryAction(0, actor, ##Disrobe, noun, 0);
DivideParagraphPoint();
@pull say__pc; @pull say__p; AdjustParagraphPoint(); @pull keep_silent;
! [7: if the actor is wearing the noun]
if (((actor == WearerOf(noun))))
{! [8: stop the action]
rtrue;
}
}
} else if (debug_rules > 1) DB_Rule(R_140, 140, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor inserting something into ( this is the can't insert if this exceeds carrying capacity rule ):
[ R_141 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_141, 141);
! [2: if the second noun provides the property carrying capacity]
if (((WhetherProvides(second, false, capacity))))
{! [3: if the number of things in the second noun is at least the carrying capacity of the second noun]
if ((((Prop_21()) >= GProperty(OBJECT_TY, second,capacity))))
{! [4: if the actor is the player]
if (((actor == player)))
{! [5: now the prior named object is nothing]
prior_named_noun = nothing;
! [6: say ~[There] [are] no more room in [the second noun].~ ( a )]
say__p=1;! [7: ~[There] [are] no more room in [the second noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_187); new_line; .L_Say76; .L_SayX76;}
! [8: stop the action]
rtrue;
}
}
} else if (debug_rules > 1) DB_Rule(R_141, 141, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: carry out Inserting it into (B147_carry_out_inserting_it_)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Carry out an actor inserting something into ( this is the standard inserting rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Carry out an actor inserting something into ( this is the standard inserting rule ):
[ R_142 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_142, 142);
! [2: now the noun is in the second noun]
MoveObject(noun,second);
} else if (debug_rules > 1) DB_Rule(R_142, 142, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Inserting it into (B148_report_inserting_it_int)
! ----------------------------------------------------------------------------------------------------
! Rule 1/2 ! Report an actor inserting something into ( this is the concise report inserting rule ):
! === equally specific with ===
! Rule 2/2 ! Report an actor inserting something into ( this is the standard report inserting rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor inserting something into ( this is the concise report inserting rule ):
[ R_143 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_143, 143);
! [2: if the action is not silent]
if (((keep_silent == false)))
{! [3: if the actor is the player and the i6 parser is running multiple actions]
if ((((actor == player))) && (((multiflag==1))))
{! [4: say ~Done.~ ( a )]
say__p=1;! [5: ~Done.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_188); new_line; .L_Say77; .L_SayX77;! [6: stop the action]
rtrue;
}
}
! [7: continue the action]
rfalse;
} else if (debug_rules > 1) DB_Rule(R_143, 143, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Report an actor inserting something into ( this is the standard report inserting rule ):
[ R_144 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_144, 144);
! [2: if the action is not silent]
if (((keep_silent == false)))
{! [3: say ~[The actor] [put] [the noun] into [the second noun].~ ( a )]
say__p=1;! [4: ~[The actor] [put] [the noun] into [the second noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_189); new_line; .L_Say78; .L_SayX78;}
} else if (debug_rules > 1) DB_Rule(R_144, 144, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Eating (B149_check_eating)
! ----------------------------------------------------------------------------------------------------
! Rule 1/4 ! Check an actor eating ( this is the can't eat unless edible rule ):
! === equally specific with ===
! Rule 2/4 ! Check an actor eating ( this is the can't eat clothing without removing it first rule ):
! === equally specific with ===
! Rule 3/4 ! Check an actor eating ( this is the can't eat other people's food rule ):
! === equally specific with ===
! Rule 4/4 ! Check an actor eating ( this is the can't eat portable food without carrying it rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor eating ( this is the can't eat unless edible rule ):
[ R_145 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_145, 145);
! [2: if the noun is not a thing or the noun is not edible]
if ((((~~((noun ofclass K2_thing))))) || (((~~(((Adj_55_t1_v10(noun))))))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[regarding the noun][They're] plainly inedible.~ ( a )]
say__p=1;! [5: ~[regarding the noun][They're] plainly inedible.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_190); new_line; .L_Say79; .L_SayX79;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_145, 145, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor eating ( this is the can't eat clothing without removing it first rule ):
[ R_146 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_146, 146);
! [2: if the actor is wearing the noun]
if (((actor == WearerOf(noun))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~(first taking [the noun] off)[command clarification break]~ ( a )]
say__p=1;! [5: ~(first taking [the noun] off)[command clarification break]~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_191); .L_Say80; .L_SayX80;}
! [6: try the actor trying taking off the noun]
TryAction(0, actor, ##Disrobe, noun, 0);
! [7: if the actor is wearing the noun]
if (((actor == WearerOf(noun))))
{! [8: stop the action]
rtrue;
}
}
} else if (debug_rules > 1) DB_Rule(R_146, 146, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor eating ( this is the can't eat other people's food rule ):
[ R_147
tmp_0 ! Let/loop value, e.g., 'owner': person
;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_147, 147);
! [2: if the noun is enclosed by a person ( called the owner ) who is not the actor]
if ((((Prop_22() && (tmp_0=deferred_calling_list-->0, true)) || (tmp_0 = 0,false))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[The owner] [might not appreciate] that.~ ( a )]
say__p=1;! [5: ~[The owner] [might not appreciate] that.~ ( a )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),TX_R_192); new_line; .L_Say81; .L_SayX81;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_147, 147, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor eating ( this is the can't eat portable food without carrying it rule ):
[ R_148 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_148, 148);
! [2: if the noun is portable and the actor is not carrying the noun]
if (((((Adj_58_t1_v10(noun))))) && (((~~((actor == CarrierOf(noun)))))))
{! [3: carry out the implicitly taking activity with the noun]
CarryOutActivity(V25_implicitly_taking, noun);
! [4: if the actor is not carrying the noun]
if (((~~((actor == CarrierOf(noun))))))
{! [5: stop the action]
rtrue;
}
}
} else if (debug_rules > 1) DB_Rule(R_148, 148, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: carry out Eating (B150_carry_out_eating)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Carry out an actor eating ( this is the standard eating rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Carry out an actor eating ( this is the standard eating rule ):
[ R_149 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_149, 149);
! [2: now the noun is nowhere]
RemoveFromPlay(noun);;
} else if (debug_rules > 1) DB_Rule(R_149, 149, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Eating (B151_report_eating)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor eating ( this is the standard report eating rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor eating ( this is the standard report eating rule ):
[ R_150 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_150, 150);
! [2: if the action is not silent]
if (((keep_silent == false)))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[We] [eat] [the noun]. Not bad.~ ( a )]
say__p=1;! [5: ~[We] [eat] [the noun]. Not bad.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_193); new_line; .L_Say82; .L_SayX82;} else {
! [6: say ~[The actor] [eat] [the noun].~ ( b )]
say__p=1;! [7: ~[The actor] [eat] [the noun].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_194); new_line; .L_Say83; .L_SayX83;}
}
} else if (debug_rules > 1) DB_Rule(R_150, 150, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Going (B152_check_going)
! ----------------------------------------------------------------------------------------------------
! Rule 1/6 ! Check an actor going when the actor is on a supporter ( called the chaise ) ( this is the stand up before going rule ):
! >>> I - Number of aspects constrained >>>
! Rule 2/6 ! Check an actor going ( this is the can't travel in what's not a vehicle rule ):
! === equally specific with ===
! Rule 3/6 ! Check an actor going ( this is the can't go through undescribed doors rule ):
! === equally specific with ===
! Rule 4/6 ! Check an actor going ( this is the can't go through closed doors rule ):
! === equally specific with ===
! Rule 5/6 ! Check an actor going ( this is the determine map connection rule ):
! === equally specific with ===
! Rule 6/6 ! Check an actor going ( this is the can't go that way rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor going when the actor is on a supporter ( called the chaise ) ( this is the stand up before going rule ):
[ R_152
tmp_0 ! Let/loop value, e.g., 'chaise': supporter
;
if ((((act_requester==nothing) && (self=actor,true) && (((SupporterOf(actor) ofclass K6_supporter) && (tmp_0=(SupporterOf(actor)), true)))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_152, 152);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: say ~(first getting off [the chaise])[command clarification break]~ ( a )]
say__p=1;! [4: ~(first getting off [the chaise])[command clarification break]~ ( a )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),TX_R_195); .L_Say84; .L_SayX84;}
! [5: silently try the actor exiting]
@push keep_silent; keep_silent=1; @push say__p; @push say__pc;
ClearParagraphing(1);
TryAction(0, actor, ##Exit, 0, 0);
DivideParagraphPoint();
@pull say__pc; @pull say__p; AdjustParagraphPoint(); @pull keep_silent;
} else if (debug_rules > 1) DB_Rule(R_152, 152, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor going ( this is the can't travel in what's not a vehicle rule ):
[ R_153
tmp_0 ! Let/loop value, e.g., 'nonvehicle': object
;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_153, 153);
! [2: let nonvehicle be the holder of the actor]
tmp_0 = (HolderOf(actor));
! [3: if nonvehicle is the room gone from]
if (((tmp_0 == (MStack-->MstVO(20007,0)))))
{! [4: continue the action]
rfalse;
}
! [5: if nonvehicle is the vehicle gone by]
if (((tmp_0 == (MStack-->MstVO(20007,3)))))
{! [6: continue the action]
rfalse;
}
! [7: if the actor is the player]
if (((actor == player)))
{! [8: if nonvehicle is a supporter]
if (((tmp_0 ofclass K6_supporter)))
{! [9: say ~[We] [would have] to get off [the nonvehicle] first.~ ( a )]
say__p=1;! [10: ~[We] [would have] to get off [the nonvehicle] first.~ ( a )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),TX_R_196); new_line; .L_Say85; .L_SayX85;} else {
! [11: say ~[We] [would have] to get out of [the nonvehicle] first.~ ( b )]
say__p=1;! [12: ~[We] [would have] to get out of [the nonvehicle] first.~ ( b )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),TX_R_197); new_line; .L_Say86; .L_SayX86;}
}
! [13: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_153, 153, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor going ( this is the can't go through undescribed doors rule ):
[ R_154 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_154, 154);
! [2: if the door gone through is not nothing and the door gone through is undescribed]
if ((((~~(((MStack-->MstVO(20007,2)) == nothing))))) && ((((Adj_64_t1_v10((MStack-->MstVO(20007,2))))))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[We] [can't go] that way.~ ( a )]
say__p=1;! [5: ~[We] [can't go] that way.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_198); new_line; .L_Say87; .L_SayX87;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_154, 154, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor going ( this is the can't go through closed doors rule ):
[ R_155 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_155, 155);
! [2: if the door gone through is not nothing and the door gone through is closed]
if ((((~~(((MStack-->MstVO(20007,2)) == nothing))))) && ((((Adj_73_t1_v10((MStack-->MstVO(20007,2))))))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~(first opening [the door gone through])[command clarification break]~ ( a )]
say__p=1;! [5: ~(first opening [the door gone through])[command clarification break]~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_199); .L_Say88; .L_SayX88;}
! [6: silently try the actor opening the door gone through]
@push keep_silent; keep_silent=1; @push say__p; @push say__pc;
ClearParagraphing(1);
TryAction(0, actor, ##Open, (MStack-->MstVO(20007,2)), 0);
DivideParagraphPoint();
@pull say__pc; @pull say__p; AdjustParagraphPoint(); @pull keep_silent;
! [7: if the door gone through is open]
if ((((Adj_72_t1_v10((MStack-->MstVO(20007,2)))))))
{! [8: continue the action]
rfalse;
}
! [9: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_155, 155, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor going ( this is the determine map connection rule ):
[ R_156 I7RBLK;
@push I7SFRAME;
StackFrameCreate(0);
@push formal_par0;
@push formal_par1;
I7RBLK = KERNEL_2();
@pull formal_par1;
@pull formal_par0;
@pull I7SFRAME;
return I7RBLK; ! nothing
];
[ KERNEL_2
tmp_0 ! Let/loop value, e.g., 'target': object
tmp_1 ! Let/loop value (deallocated by end of phrase)
;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_156, 156);
! [2: let the target be nothing]
tmp_0 = nothing;
! [3: if the noun is a direction]
if (((noun ofclass K3_direction)))
{! [4: let direction d be the noun]
tmp_1 = noun;
! [5: let the target be the room-or-door direction d from the room gone from]
tmp_0 =
! Resolution of run-time phrase ambiguity (deciding a value):
(
! This value evaluates third (i.e., last)
formal_rv
+
0*(
! The following condition evaluates second
((
((((((formal_par0 ofclass K3_direction) && (formal_par0 ofclass K3_direction))))) && ((
formal_rv = RoomOrDoorFrom(formal_par1,formal_par0)) | 1)
)|| (ArgumentTypeFailed(2330, 1))
))
+
! The following assignments evaluate first
((formal_par1 = (MStack-->MstVO(20007,0))) +
(formal_par0 = tmp_1)
))
)
! Resolution complete
;
} else {
! [6: if the noun is a door]
if (((noun ofclass K4_door)))
{! [7: let the target be the noun]
tmp_0 = noun;
}
}
! [8: if the target is a door]
if (((tmp_0 ofclass K4_door)))
{! [9: now the target is the other side of the target from the room gone from]
tmp_0 =
! Resolution of run-time phrase ambiguity (deciding a value):
(
! This value evaluates third (i.e., last)
formal_rv
+
0*(
! The following condition evaluates second
((
((((((formal_par0 ofclass K4_door) && (formal_par0 ofclass K4_door))))) && ((
formal_rv = OtherSideOfDoor(formal_par0,formal_par1)) | 1)
)|| (ArgumentTypeFailed(2334, 1))
))
+
! The following assignments evaluate first
((formal_par1 = (MStack-->MstVO(20007,0))) +
(formal_par0 = tmp_0)
))
)
! Resolution complete
;
}
! [10: now the room gone to is the target]
(MStack-->MstVO(20007,1)) = tmp_0;
} else if (debug_rules > 1) DB_Rule(R_156, 156, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor going ( this is the can't go that way rule ):
[ R_157 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_157, 157);
! [2: if the room gone to is nothing]
if ((((MStack-->MstVO(20007,1)) == nothing)))
{! [3: if the door gone through is nothing]
if ((((MStack-->MstVO(20007,2)) == nothing)))
{! [4: if the actor is the player]
if (((actor == player)))
{! [5: say ~[We] [can't go] that way.~ ( a )]
say__p=1;! [6: ~[We] [can't go] that way.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_200); new_line; .L_Say89; .L_SayX89;}
! [7: stop the action]
rtrue;
}
! [8: if the actor is the player]
if (((actor == player)))
{! [9: say ~[We] [can't], since [the door gone through] [lead] nowhere.~ ( b )]
say__p=1;! [10: ~[We] [can't], since [the door gone through] [lead] nowhere.~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_201); new_line; .L_Say90; .L_SayX90;}
! [11: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_157, 157, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: carry out Going (B153_carry_out_going)
! ----------------------------------------------------------------------------------------------------
! Rule 1/3 ! Carry out an actor going ( this is the move player and vehicle rule ):
! === equally specific with ===
! Rule 2/3 ! Carry out an actor going ( this is the move floating objects rule ):
! === equally specific with ===
! Rule 3/3 ! Carry out an actor going ( this is the check light in new location rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Carry out an actor going ( this is the move player and vehicle rule ):
[ R_158 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_158, 158);
! [2: if the vehicle gone by is nothing]
if ((((MStack-->MstVO(20007,3)) == nothing)))
{! [3: surreptitiously move the actor to the room gone to during going]
MoveDuringGoing(actor, (MStack-->MstVO(20007,1)));
} else {
! [4: surreptitiously move the vehicle gone by to the room gone to during going]
MoveDuringGoing((MStack-->MstVO(20007,3)), (MStack-->MstVO(20007,1)));
}
! [5: if the location is not the location of the player]
if (((~~((real_location == LocationOf(player))))))
{! [6: now the location is the location of the player]
real_location = LocationOf(player);
}
} else if (debug_rules > 1) DB_Rule(R_158, 158, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Carry out an actor going ( this is the move floating objects rule ):
[ R_159 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_159, 159);
! [2: if the actor is the player or the player is within the vehicle gone by or the player is within the thing gone with]
if ((((actor == player))) || (((((MStack-->MstVO(20007,3)) == ContainerOf(player)))) || ((((MStack-->MstVO(20007,4)) == ContainerOf(player))))))
{! [3: update backdrop positions]
MoveFloatingObjects();
}
} else if (debug_rules > 1) DB_Rule(R_159, 159, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Carry out an actor going ( this is the check light in new location rule ):
[ R_160 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_160, 160);
! [2: if the actor is the player or the player is within the vehicle gone by or the player is within the thing gone with]
if ((((actor == player))) || (((((MStack-->MstVO(20007,3)) == ContainerOf(player)))) || ((((MStack-->MstVO(20007,4)) == ContainerOf(player))))))
{! [3: surreptitiously reckon darkness]
SilentlyConsiderLight();
}
} else if (debug_rules > 1) DB_Rule(R_160, 160, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Going (B154_report_going)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor going ( this is the describe room gone into rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor going ( this is the describe room gone into rule ):
[ R_161 I7RBLK;
@push I7SFRAME;
StackFrameCreate(0);
@push formal_par0;
@push formal_par1;
I7RBLK = KERNEL_3();
@pull formal_par1;
@pull formal_par0;
@pull I7SFRAME;
return I7RBLK; ! nothing
];
[ KERNEL_3
tmp_0 ! Let/loop value (deallocated by end of phrase)
tmp_1 ! Let/loop value (deallocated by end of phrase)
tmp_2 ! Let/loop value (deallocated by end of phrase)
;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_161, 161);
! [2: if the player is the actor]
if (((player == actor)))
{! [3: if the action is not silent]
if (((keep_silent == false)))
{! [4: produce a room description with going spacing conventions]
LookAfterGoing();
}
} else {
! [5: if the noun is a direction]
if (((noun ofclass K3_direction)))
{! [6: if the location is the room gone from or the player is within the vehicle gone by or the player is within the thing gone with]
if ((((real_location == (MStack-->MstVO(20007,0))))) || (((((MStack-->MstVO(20007,3)) == ContainerOf(player)))) || ((((MStack-->MstVO(20007,4)) == ContainerOf(player))))))
{! [7: if the room gone from is the room gone to]
if ((((MStack-->MstVO(20007,0)) == (MStack-->MstVO(20007,1)))))
{! [8: continue the action]
rfalse;
} else {
! [9: if the noun is up]
if (((noun == I63_up)))
{! [10: say ~[The actor] [go] up~ ( a )]
say__p=1;! [11: ~[The actor] [go] up~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_202); .L_Say91; .L_SayX91;} else {
! [12: if the noun is down]
if (((noun == I64_down)))
{! [13: say ~[The actor] [go] down~ ( b )]
say__p=1;! [14: ~[The actor] [go] down~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_203); .L_Say92; .L_SayX92;} else {
! [15: say ~[The actor] [go] [noun]~ ( c )]
say__p=1;! [16: ~[The actor] [go] [noun]~ ( c )]
ParaContent(); print (TEXT_TY_Say) (TX_R_204); .L_Say93; .L_SayX93;}
}
}
} else {
! [17: let the back way be the opposite of the noun]
tmp_0 = GProperty(OBJECT_TY, noun,p10_opposite);
! [18: if the location is the room gone to]
if (((real_location == (MStack-->MstVO(20007,1)))))
{! [19: let the room back the other way be the room back way from the location]
tmp_1 =
! Resolution of run-time phrase ambiguity (deciding a value):
(
! This value evaluates third (i.e., last)
formal_rv
+
0*(
! The following condition evaluates second
((
((((((formal_par1 ofclass K1_room) && (formal_par1 ofclass K1_room))))) && ((
formal_rv = MapConnection(formal_par1,formal_par0)) | 1)
)|| (ArgumentTypeFailed(2385, 1))
))
+
! The following assignments evaluate first
((formal_par1 = real_location) +
(formal_par0 = tmp_0)
))
)
! Resolution complete
;
! [20: let the room normally this way be the room noun from the room gone from]
tmp_2 =
! Resolution of run-time phrase ambiguity (deciding a value):
(
! This value evaluates third (i.e., last)
formal_rv
+
0*(
! The following condition evaluates second
((
((((((formal_par0 ofclass K3_direction) && (formal_par0 ofclass K3_direction))))) && ((
formal_rv = MapConnection(formal_par1,formal_par0)) | 1)
)|| (ArgumentTypeFailed(2387, 1))
))
+
! The following assignments evaluate first
((formal_par1 = (MStack-->MstVO(20007,0))) +
(formal_par0 = noun)
))
)
! Resolution complete
;
! [21: if the room back the other way is the room gone from or the room back the other way is the room normally this way]
if ((((tmp_1 == (MStack-->MstVO(20007,0))))) || (((tmp_1 == tmp_2))))
{! [22: if the back way is up]
if (((tmp_0 == I63_up)))
{! [23: say ~[The actor] [arrive] from above~ ( d )]
say__p=1;! [24: ~[The actor] [arrive] from above~ ( d )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),TX_R_205); .L_Say94; .L_SayX94;} else {
! [25: if the back way is down]
if (((tmp_0 == I64_down)))
{! [26: say ~[The actor] [arrive] from below~ ( e )]
say__p=1;! [27: ~[The actor] [arrive] from below~ ( e )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),TX_R_206); .L_Say95; .L_SayX95;} else {
! [28: say ~[The actor] [arrive] from [the back way]~ ( f )]
say__p=1;! [29: ~[The actor] [arrive] from [the back way]~ ( f )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),TX_R_207); .L_Say96; .L_SayX96;}
}
} else {
! [30: say ~[The actor] [arrive]~ ( g )]
say__p=1;! [31: ~[The actor] [arrive]~ ( g )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),TX_R_208); .L_Say97; .L_SayX97;}
} else {
! [32: if the back way is up]
if (((tmp_0 == I63_up)))
{! [33: say ~[The actor] [arrive] at [the room gone to] from above~ ( h )]
say__p=1;! [34: ~[The actor] [arrive] at [the room gone to] from above~ ( h )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),TX_R_209); .L_Say98; .L_SayX98;} else {
! [35: if the back way is down]
if (((tmp_0 == I64_down)))
{! [36: say ~[The actor] [arrive] at [the room gone to] from below~ ( i )]
say__p=1;! [37: ~[The actor] [arrive] at [the room gone to] from below~ ( i )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),TX_R_210); .L_Say99; .L_SayX99;} else {
! [38: say ~[The actor] [arrive] at [the room gone to] from [the back way]~ ( j )]
say__p=1;! [39: ~[The actor] [arrive] at [the room gone to] from [the back way]~ ( j )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),TX_R_211); .L_Say100; .L_SayX100;}
}
}
}
} else {
! [40: if the location is the room gone from]
if (((real_location == (MStack-->MstVO(20007,0)))))
{! [41: say ~[The actor] [go] through [the noun]~ ( k )]
say__p=1;! [42: ~[The actor] [go] through [the noun]~ ( k )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),TX_R_212); .L_Say101; .L_SayX101;} else {
! [43: say ~[The actor] [arrive] from [the noun]~ ( l )]
say__p=1;! [44: ~[The actor] [arrive] from [the noun]~ ( l )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),TX_R_213); .L_Say102; .L_SayX102;}
}
! [45: if the vehicle gone by is not nothing]
if (((~~(((MStack-->MstVO(20007,3)) == nothing)))))
{! [46: say ~ ~]
say__p=1;! [47: ~ ~]
ParaContent(); print " "; .L_Say103; .L_SayX103;! [48: if the vehicle gone by is a supporter]
if ((((MStack-->MstVO(20007,3)) ofclass K6_supporter)))
{! [49: say ~on [the vehicle gone by]~ ( m )]
say__p=1;! [50: ~on [the vehicle gone by]~ ( m )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),TX_R_214); .L_Say104; .L_SayX104;} else {
! [51: say ~in [the vehicle gone by]~ ( n )]
say__p=1;! [52: ~in [the vehicle gone by]~ ( n )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),TX_R_215); .L_Say105; .L_SayX105;}
}
! [53: if the thing gone with is not nothing]
if (((~~(((MStack-->MstVO(20007,4)) == nothing)))))
{! [54: if the player is within the thing gone with]
if ((((MStack-->MstVO(20007,4)) == ContainerOf(player))))
{! [55: say ~, pushing [the thing gone with] in front, and [us] along too~ ( o )]
say__p=1;! [56: ~, pushing [the thing gone with] in front, and [us] along too~ ( o )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),TX_R_216); .L_Say106; .L_SayX106;} else {
! [57: if the player is within the vehicle gone by]
if ((((MStack-->MstVO(20007,3)) == ContainerOf(player))))
{! [58: say ~, pushing [the thing gone with] in front~ ( p )]
say__p=1;! [59: ~, pushing [the thing gone with] in front~ ( p )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),TX_R_217); .L_Say107; .L_SayX107;} else {
! [60: if the location is the room gone from]
if (((real_location == (MStack-->MstVO(20007,0)))))
{! [61: say ~, pushing [the thing gone with] away~ ( q )]
say__p=1;! [62: ~, pushing [the thing gone with] away~ ( q )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),TX_R_218); .L_Say108; .L_SayX108;} else {
! [63: say ~, pushing [the thing gone with] in~ ( r )]
say__p=1;! [64: ~, pushing [the thing gone with] in~ ( r )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),TX_R_219); .L_Say109; .L_SayX109;}
}
}
}
! [65: if the player is within the vehicle gone by and the player is not within the thing gone with]
if (((((MStack-->MstVO(20007,3)) == ContainerOf(player)))) && (((~~(((MStack-->MstVO(20007,4)) == ContainerOf(player)))))))
{! [66: say ~, taking [us] along~ ( s )]
say__p=1;! [67: ~, taking [us] along~ ( s )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),(LocalParking-->2=tmp_2),TX_R_220); .L_Say110; .L_SayX110;! [68: say ~.~]
say__p=1;! [69: ~.~]
ParaContent(); print "."; new_line; .L_Say111; .L_SayX111;! [70: try looking]
TryAction(0, player, ##Look, 0, 0);
! [71: continue the action]
rfalse;
}
! [72: say ~.~]
say__p=1;! [73: ~.~]
ParaContent(); print "."; new_line; .L_Say112; .L_SayX112;}
} else if (debug_rules > 1) DB_Rule(R_161, 161, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Entering (B155_check_entering)
! ----------------------------------------------------------------------------------------------------
! Rule 1/8 ! Check an actor entering ( this is the convert enter door into go rule ):
! === equally specific with ===
! Rule 2/8 ! Check an actor entering ( this is the convert enter compass direction into go rule ):
! === equally specific with ===
! Rule 3/8 ! Check an actor entering ( this is the can't enter what's already entered rule ):
! === equally specific with ===
! Rule 4/8 ! Check an actor entering ( this is the can't enter what's not enterable rule ):
! === equally specific with ===
! Rule 5/8 ! Check an actor entering ( this is the can't enter closed containers rule ):
! === equally specific with ===
! Rule 6/8 ! Check an actor entering ( this is the can't enter if this exceeds carrying capacity rule ):
! === equally specific with ===
! Rule 7/8 ! Check an actor entering ( this is the can't enter something carried rule ):
! === equally specific with ===
! Rule 8/8 ! Check an actor entering ( this is the implicitly pass through other barriers rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor entering ( this is the convert enter door into go rule ):
[ R_163 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_163, 163);
! [2: if the noun is a door]
if (((noun ofclass K4_door)))
{! [3: convert to the going action on the noun]
return GVS_Convert(##Go,noun,0);
}
} else if (debug_rules > 1) DB_Rule(R_163, 163, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor entering ( this is the convert enter compass direction into go rule ):
[ R_164 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_164, 164);
! [2: if the noun is a direction]
if (((noun ofclass K3_direction)))
{! [3: convert to the going action on the noun]
return GVS_Convert(##Go,noun,0);
}
} else if (debug_rules > 1) DB_Rule(R_164, 164, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor entering ( this is the can't enter what's already entered rule ):
[ R_165
tmp_0 ! Let/loop value, e.g., 'local ceiling': object
;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_165, 165);
! [2: if the actor is the noun]
if (((actor == noun)))
{! [3: make no decision]
rfalse;
}
! [4: let the local ceiling be the common ancestor of the actor with the noun]
tmp_0 = (CommonAncestor(actor, noun));
! [5: if the local ceiling is the noun]
if (((tmp_0 == noun)))
{! [6: if the player is the actor]
if (((player == actor)))
{! [7: if the noun is a supporter]
if (((noun ofclass K6_supporter)))
{! [8: say ~But [we]['re] already on [the noun].~ ( a )]
say__p=1;! [9: ~But [we]['re] already on [the noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),TX_R_221); new_line; .L_Say113; .L_SayX113;} else {
! [10: say ~But [we]['re] already in [the noun].~ ( b )]
say__p=1;! [11: ~But [we]['re] already in [the noun].~ ( b )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),TX_R_222); new_line; .L_Say114; .L_SayX114;}
}
! [12: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_165, 165, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor entering ( this is the can't enter what's not enterable rule ):
[ R_166 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_166, 166);
! [2: if the noun is not enterable]
if (((~~(((Adj_69_t1_v10(noun)))))))
{! [3: if the player is the actor]
if (((player == actor)))
{! [4: if the player's command includes ~stand~]
if (((matched_text=SnippetIncludes(Consult_Grammar_98,players_command))))
{! [5: say ~[regarding the noun][They're] not something [we] [can] stand on.~ ( a )]
say__p=1;! [6: ~[regarding the noun][They're] not something [we] [can] stand on.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_223); new_line; .L_Say115; .L_SayX115;} else {
! [7: if the player's command includes ~sit~]
if (((matched_text=SnippetIncludes(Consult_Grammar_99,players_command))))
{! [8: say ~[regarding the noun][They're] not something [we] [can] sit down on.~ ( b )]
say__p=1;! [9: ~[regarding the noun][They're] not something [we] [can] sit down on.~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_224); new_line; .L_Say116; .L_SayX116;} else {
! [10: if the player's command includes ~lie~]
if (((matched_text=SnippetIncludes(Consult_Grammar_100,players_command))))
{! [11: say ~[regarding the noun][They're] not something [we] [can] lie down on.~ ( c )]
say__p=1;! [12: ~[regarding the noun][They're] not something [we] [can] lie down on.~ ( c )]
ParaContent(); print (TEXT_TY_Say) (TX_R_225); new_line; .L_Say117; .L_SayX117;} else {
! [13: say ~[regarding the noun][They're] not something [we] [can] enter.~ ( d )]
say__p=1;! [14: ~[regarding the noun][They're] not something [we] [can] enter.~ ( d )]
ParaContent(); print (TEXT_TY_Say) (TX_R_226); new_line; .L_Say118; .L_SayX118;}
}
}
}
! [15: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_166, 166, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor entering ( this is the can't enter closed containers rule ):
[ R_167 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_167, 167);
! [2: if the noun is a closed container]
if (((noun ofclass K5_container) && ((Adj_73_t1_v10(noun)))))
{! [3: if the player is the actor]
if (((player == actor)))
{! [4: say ~[We] [can't get] into the closed [noun].~ ( a )]
say__p=1;! [5: ~[We] [can't get] into the closed [noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_227); new_line; .L_Say119; .L_SayX119;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_167, 167, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor entering ( this is the can't enter if this exceeds carrying capacity rule ):
[ R_168 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_168, 168);
! [2: if the noun provides the property carrying capacity]
if (((WhetherProvides(noun, false, capacity))))
{! [3: if the noun is a supporter]
if (((noun ofclass K6_supporter)))
{! [4: if the number of things on the noun is at least the carrying capacity of the noun]
if ((((Prop_23()) >= GProperty(OBJECT_TY, noun,capacity))))
{! [5: if the actor is the player]
if (((actor == player)))
{! [6: now the prior named object is nothing]
prior_named_noun = nothing;
! [7: say ~[There] [are] no more room on [the noun].~ ( a )]
say__p=1;! [8: ~[There] [are] no more room on [the noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_228); new_line; .L_Say120; .L_SayX120;}
! [9: stop the action]
rtrue;
}
} else {
! [10: if the noun is a container]
if (((noun ofclass K5_container)))
{! [11: if the number of things in the noun is at least the carrying capacity of the noun]
if ((((Prop_24()) >= GProperty(OBJECT_TY, noun,capacity))))
{! [12: if the actor is the player]
if (((actor == player)))
{! [13: now the prior named object is nothing]
prior_named_noun = nothing;
! [14: say ~[There] [are] no more room in [the noun].~ ( b )]
say__p=1;! [15: ~[There] [are] no more room in [the noun].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_229); new_line; .L_Say121; .L_SayX121;}
! [16: stop the action]
rtrue;
}
}
}
}
} else if (debug_rules > 1) DB_Rule(R_168, 168, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor entering ( this is the can't enter something carried rule ):
[ R_169
tmp_0 ! Let/loop value, e.g., 'local ceiling': object
;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_169, 169);
! [2: let the local ceiling be the common ancestor of the actor with the noun]
tmp_0 = (CommonAncestor(actor, noun));
! [3: if the local ceiling is the actor]
if (((tmp_0 == actor)))
{! [4: if the player is the actor]
if (((player == actor)))
{! [5: say ~[We] [can] only get into something free-standing.~ ( a )]
say__p=1;! [6: ~[We] [can] only get into something free-standing.~ ( a )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),TX_R_230); new_line; .L_Say122; .L_SayX122;}
! [7: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_169, 169, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor entering ( this is the implicitly pass through other barriers rule ):
[ R_170
tmp_0 ! Let/loop value, e.g., 'local ceiling': object
tmp_1 ! Let/loop value, e.g., 'target': object
;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_170, 170);
! [2: if the holder of the actor is the holder of the noun]
if ((((HolderOf(actor)) == (HolderOf(noun)))))
{! [3: continue the action]
rfalse;
}
! [4: let the local ceiling be the common ancestor of the actor with the noun]
tmp_0 = (CommonAncestor(actor, noun));
! [5: while the holder of the actor is not the local ceiling]
while (((~~(((HolderOf(actor)) == tmp_0)))))
{! [6: let the current home be the holder of the actor]
tmp_1 = (HolderOf(actor));
! [7: if the player is the actor]
if (((player == actor)))
{! [8: if the current home is a supporter or the current home is an animal]
if ((((tmp_1 ofclass K6_supporter))) || (((tmp_1 ofclass K12_animal))))
{! [9: say ~(getting off [the current home])[command clarification break]~ ( a )]
say__p=1;! [10: ~(getting off [the current home])[command clarification break]~ ( a )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),TX_R_231); .L_Say123; .L_SayX123;} else {
! [11: say ~(getting out of [the current home])[command clarification break]~ ( b )]
say__p=1;! [12: ~(getting out of [the current home])[command clarification break]~ ( b )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),TX_R_232); .L_Say124; .L_SayX124;}
}
! [13: silently try the actor trying exiting]
@push keep_silent; keep_silent=1; @push say__p; @push say__pc;
ClearParagraphing(1);
TryAction(0, actor, ##Exit, 0, 0);
DivideParagraphPoint();
@pull say__pc; @pull say__p; AdjustParagraphPoint(); @pull keep_silent;
! [14: if the holder of the actor is the current home]
if ((((HolderOf(actor)) == tmp_1)))
{! [15: stop the action]
rtrue;
}
}
! [16: if the holder of the actor is the noun]
if ((((HolderOf(actor)) == noun)))
{! [17: stop the action]
rtrue;
}
! [18: if the holder of the actor is the holder of the noun]
if ((((HolderOf(actor)) == (HolderOf(noun)))))
{! [19: continue the action]
rfalse;
}
! [20: let the target be the holder of the noun]
tmp_1 = (HolderOf(noun));
! [21: if the noun is part of the target]
if (((tmp_1 == (noun.component_parent))))
{! [22: let the target be the holder of the target]
tmp_1 = (HolderOf(tmp_1));
}
! [23: while the target is a thing]
while (((tmp_1 ofclass K2_thing)))
{! [24: if the holder of the target is the local ceiling]
if ((((HolderOf(tmp_1)) == tmp_0)))
{! [25: if the player is the actor]
if (((player == actor)))
{! [26: if the target is a supporter]
if (((tmp_1 ofclass K6_supporter)))
{! [27: say ~(getting onto [the target])[command clarification break]~ ( c )]
say__p=1;! [28: ~(getting onto [the target])[command clarification break]~ ( c )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),TX_R_233); .L_Say125; .L_SayX125;} else {
! [29: if the target is a container]
if (((tmp_1 ofclass K5_container)))
{! [30: say ~(getting into [the target])[command clarification break]~ ( d )]
say__p=1;! [31: ~(getting into [the target])[command clarification break]~ ( d )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),TX_R_234); .L_Say126; .L_SayX126;} else {
! [32: say ~(entering [the target])[command clarification break]~ ( e )]
say__p=1;! [33: ~(entering [the target])[command clarification break]~ ( e )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),TX_R_235); .L_Say127; .L_SayX127;}
}
}
! [34: silently try the actor trying entering the target]
@push keep_silent; keep_silent=1; @push say__p; @push say__pc;
ClearParagraphing(1);
TryAction(0, actor, ##Enter, tmp_1, 0);
DivideParagraphPoint();
@pull say__pc; @pull say__p; AdjustParagraphPoint(); @pull keep_silent;
! [35: if the holder of the actor is not the target]
if (((~~(((HolderOf(actor)) == tmp_1)))))
{! [36: stop the action]
rtrue;
}
! [37: convert to the entering action on the noun]
return GVS_Convert(##Enter,noun,0);
! [38: continue the action]
rfalse;
}
! [39: let the target be the holder of the target]
tmp_1 = (HolderOf(tmp_1));
}
} else if (debug_rules > 1) DB_Rule(R_170, 170, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: carry out Entering (B156_carry_out_entering)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Carry out an actor entering ( this is the standard entering rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Carry out an actor entering ( this is the standard entering rule ):
[ R_171 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_171, 171);
! [2: surreptitiously move the actor to the noun]
move actor to noun;
} else if (debug_rules > 1) DB_Rule(R_171, 171, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Entering (B157_report_entering)
! ----------------------------------------------------------------------------------------------------
! Rule 1/2 ! Report an actor entering ( this is the standard report entering rule ):
! === equally specific with ===
! Rule 2/2 ! Report an actor entering ( this is the describe contents entered into rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor entering ( this is the standard report entering rule ):
[ R_172 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_172, 172);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: if the action is not silent]
if (((keep_silent == false)))
{! [4: if the noun is a supporter]
if (((noun ofclass K6_supporter)))
{! [5: say ~[We] [get] onto [the noun].~ ( a )]
say__p=1;! [6: ~[We] [get] onto [the noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_236); new_line; .L_Say128; .L_SayX128;} else {
! [7: say ~[We] [get] into [the noun].~ ( b )]
say__p=1;! [8: ~[We] [get] into [the noun].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_237); new_line; .L_Say129; .L_SayX129;}
}
} else {
! [9: if the noun is a container]
if (((noun ofclass K5_container)))
{! [10: say ~[The actor] [get] into [the noun].~ ( c )]
say__p=1;! [11: ~[The actor] [get] into [the noun].~ ( c )]
ParaContent(); print (TEXT_TY_Say) (TX_R_238); new_line; .L_Say130; .L_SayX130;} else {
! [12: say ~[The actor] [get] onto [the noun].~ ( d )]
say__p=1;! [13: ~[The actor] [get] onto [the noun].~ ( d )]
ParaContent(); print (TEXT_TY_Say) (TX_R_239); new_line; .L_Say131; .L_SayX131;}
}
! [14: continue the action]
rfalse;
} else if (debug_rules > 1) DB_Rule(R_172, 172, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Report an actor entering ( this is the describe contents entered into rule ):
[ R_173 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_173, 173);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: describe locale for the noun]
(PHR_81_r1 (noun));
}
} else if (debug_rules > 1) DB_Rule(R_173, 173, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Exiting (B158_check_exiting)
! ----------------------------------------------------------------------------------------------------
! Rule 1/4 ! Check an actor exiting ( this is the convert exit into go out rule ):
! === equally specific with ===
! Rule 2/4 ! Check an actor exiting ( this is the can't exit when not inside anything rule ):
! === equally specific with ===
! Rule 3/4 ! Check an actor exiting ( this is the can't exit closed containers rule ):
! === equally specific with ===
! Rule 4/4 ! Check an actor exiting ( this is the convert exit into get off rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor exiting ( this is the convert exit into go out rule ):
[ R_175
tmp_0 ! Let/loop value, e.g., 'local room': room
;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_175, 175);
! [2: let the local room be the location of the actor]
tmp_0 = LocationOf(actor);
! [3: if the container exited from is the local room]
if ((((MStack-->MstVO(20009,0)) == tmp_0)))
{! [4: if the room-or-door outside from the local room is not nothing]
if (((~~((RoomOrDoorFrom(tmp_0,out_obj) == nothing)))))
{! [5: convert to the going action on the outside]
return GVS_Convert(##Go,out_obj,0);
}
}
} else if (debug_rules > 1) DB_Rule(R_175, 175, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor exiting ( this is the can't exit when not inside anything rule ):
[ R_176
tmp_0 ! Let/loop value, e.g., 'local room': room
;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_176, 176);
! [2: let the local room be the location of the actor]
tmp_0 = LocationOf(actor);
! [3: if the container exited from is the local room]
if ((((MStack-->MstVO(20009,0)) == tmp_0)))
{! [4: if the player is the actor]
if (((player == actor)))
{! [5: say ~But [we] [aren't] in anything at the [if story tense is present tense]moment[otherwise]time[end if].~ ( a )]
say__p=1;! [6: ~But [we] [aren't] in anything at the [if story tense is present tense]moment[otherwise]time[end if].~ ( a )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),TX_R_240); new_line; .L_Say132; .L_SayX132;}
! [7: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_176, 176, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor exiting ( this is the can't exit closed containers rule ):
[ R_177
tmp_0 ! Let/loop value, e.g., 'cage': container
;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_177, 177);
! [2: if the actor is in a closed container ( called the cage )]
if (((ContainerOf(actor) ofclass K5_container) && ((Adj_73_t1_v10(ContainerOf(actor)))) && (tmp_0=(ContainerOf(actor)), true)))
{! [3: if the player is the actor]
if (((player == actor)))
{! [4: say ~You can't get out of the closed [cage].~ ( a )]
say__p=1;! [5: ~You can't get out of the closed [cage].~ ( a )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),TX_R_241); new_line; .L_Say133; .L_SayX133;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_177, 177, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor exiting ( this is the convert exit into get off rule ):
[ R_178
tmp_0 ! Let/loop value, e.g., 'platform': supporter
;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_178, 178);
! [2: if the actor is on a supporter ( called the platform )]
if (((SupporterOf(actor) ofclass K6_supporter) && (tmp_0=(SupporterOf(actor)), true)))
{! [3: convert to the getting off action on the platform]
return GVS_Convert(##GetOff,tmp_0,0);
}
} else if (debug_rules > 1) DB_Rule(R_178, 178, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: carry out Exiting (B159_carry_out_exiting)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Carry out an actor exiting ( this is the standard exiting rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Carry out an actor exiting ( this is the standard exiting rule ):
[ R_179
tmp_0 ! Let/loop value, e.g., 'former exterior': object
;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_179, 179);
! [2: let the former exterior be the not-counting-parts holder of the container exited from]
tmp_0 = (CoreOfParentOfCoreOf((MStack-->MstVO(20009,0))));
! [3: surreptitiously move the actor to the former exterior]
move actor to tmp_0;
} else if (debug_rules > 1) DB_Rule(R_179, 179, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Exiting (B160_report_exiting)
! ----------------------------------------------------------------------------------------------------
! Rule 1/2 ! Report an actor exiting ( this is the standard report exiting rule ):
! === equally specific with ===
! Rule 2/2 ! Report an actor exiting ( this is the describe room emerged into rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor exiting ( this is the standard report exiting rule ):
[ R_180 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_180, 180);
! [2: if the action is not silent]
if (((keep_silent == false)))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: if the container exited from is a supporter]
if ((((MStack-->MstVO(20009,0)) ofclass K6_supporter)))
{! [5: say ~[We] [get] off [the container exited from].~ ( a )]
say__p=1;! [6: ~[We] [get] off [the container exited from].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_242); new_line; .L_Say134; .L_SayX134;} else {
! [7: say ~[We] [get] out of [the container exited from].~ ( b )]
say__p=1;! [8: ~[We] [get] out of [the container exited from].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_243); new_line; .L_Say135; .L_SayX135;}
} else {
! [9: say ~[The actor] [get] out of [the container exited from].~ ( c )]
say__p=1;! [10: ~[The actor] [get] out of [the container exited from].~ ( c )]
ParaContent(); print (TEXT_TY_Say) (TX_R_244); new_line; .L_Say136; .L_SayX136;}
}
! [11: continue the action]
rfalse;
} else if (debug_rules > 1) DB_Rule(R_180, 180, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Report an actor exiting ( this is the describe room emerged into rule ):
[ R_181 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_181, 181);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: surreptitiously reckon darkness]
SilentlyConsiderLight();
! [4: produce a room description with going spacing conventions]
LookAfterGoing();
}
} else if (debug_rules > 1) DB_Rule(R_181, 181, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Getting off (B161_check_getting_off)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Check an actor getting off ( this is the can't get off things rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor getting off ( this is the can't get off things rule ):
[ R_182 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_182, 182);
! [2: if the actor is on the noun]
if (((noun == SupporterOf(actor))))
{! [3: continue the action]
rfalse;
}
! [4: if the actor is carried by the noun]
if (((noun == CarrierOf(actor))))
{! [5: continue the action]
rfalse;
}
! [6: if the actor is the player]
if (((actor == player)))
{! [7: say ~But [we] [aren't] on [the noun] at the [if story tense is present tense]moment[otherwise]time[end if].~ ( a )]
say__p=1;! [8: ~But [we] [aren't] on [the noun] at the [if story tense is present tense]moment[otherwise]time[end if].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_245); new_line; .L_Say137; .L_SayX137;}
! [9: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_182, 182, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: carry out Getting off (B162_carry_out_getting_off)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Carry out an actor getting off ( this is the standard getting off rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Carry out an actor getting off ( this is the standard getting off rule ):
[ R_183
tmp_0 ! Let/loop value, e.g., 'former exterior': object
;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_183, 183);
! [2: let the former exterior be the not-counting-parts holder of the noun]
tmp_0 = (CoreOfParentOfCoreOf(noun));
! [3: surreptitiously move the actor to the former exterior]
move actor to tmp_0;
} else if (debug_rules > 1) DB_Rule(R_183, 183, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Getting off (B163_report_getting_off)
! ----------------------------------------------------------------------------------------------------
! Rule 1/2 ! Report an actor getting off ( this is the standard report getting off rule ):
! === equally specific with ===
! Rule 2/2 ! Report an actor getting off ( this is the describe room stood up into rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor getting off ( this is the standard report getting off rule ):
[ R_184 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_184, 184);
! [2: if the action is not silent]
if (((keep_silent == false)))
{! [3: say ~[The actor] [get] off [the noun].~ ( a )]
say__p=1;! [4: ~[The actor] [get] off [the noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_246); new_line; .L_Say138; .L_SayX138;}
! [5: continue the action]
rfalse;
} else if (debug_rules > 1) DB_Rule(R_184, 184, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Report an actor getting off ( this is the describe room stood up into rule ):
[ R_185 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_185, 185);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: produce a room description with going spacing conventions]
LookAfterGoing();
}
} else if (debug_rules > 1) DB_Rule(R_185, 185, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: carry out Looking (B165_carry_out_looking)
! ----------------------------------------------------------------------------------------------------
! Rule 1/5 ! Carry out looking ( this is the declare everything unmentioned rule ):
! === equally specific with ===
! Rule 2/5 ! Carry out looking ( this is the room description heading rule ):
! === equally specific with ===
! Rule 3/5 ! Carry out looking ( this is the room description body text rule ):
! === equally specific with ===
! Rule 4/5 ! Carry out looking ( this is the room description paragraphs about objects rule ):
! === equally specific with ===
! Rule 5/5 ! Carry out looking ( this is the check new arrival rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Carry out looking ( this is the declare everything unmentioned rule ):
[ R_187
tmp_0 ! Let/loop value (deallocated by end of phrase)
tmp_1 ! Let/loop value (deallocated by end of phrase)
;
if (actor == player) {
if (debug_rules) DB_Rule(R_187, 187);
! [2: repeat with item running through things]
for (tmp_0=Prop_25(0), tmp_1=Prop_25(tmp_0): tmp_0: tmp_0=tmp_1, tmp_1=Prop_25(tmp_1))
{! [3: now the item is not mentioned]
(Adj_67_t3_v10(tmp_0));
}
} else if (debug_rules > 1) DB_Rule(R_187, 187, 'actor');
rfalse;
];
! From the Standard Rules
! No specific request
! Carry out looking ( this is the room description heading rule ):
[ R_188
tmp_0 ! Let/loop value, e.g., 'intermediate level': object
tmp_1 ! Let/loop value (deallocated by end of phrase)
;
if (actor == player) {
if (debug_rules) DB_Rule(R_188, 188);
! [2: say bold type]
say__p=1;! [3: bold type]
ParaContent(); style bold; .L_Say139; .L_SayX139;! [4: if the visibility level count is 0]
if ((((MStack-->MstVO(20011,2)) == 0)))
{! [5: begin the printing the name of a dark room activity]
BeginActivity(V9_printing_the_name_of_a_da);
! [6: if handling the printing the name of a dark room activity]
if (((~~(ForActivity(V9_printing_the_name_of_a_da)))))
{! [7: say ~Darkness~ ( a )]
say__p=1;! [8: ~Darkness~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_247); .L_Say140; .L_SayX140;}
! [9: end the printing the name of a dark room activity]
EndActivity(V9_printing_the_name_of_a_da);
} else {
! [10: if the visibility ceiling is the location]
if ((((MStack-->MstVO(20011,3)) == real_location)))
{! [11: say ~[visibility ceiling]~]
say__p=1;! [12: visibility ceiling]
ParaContent(); PrintShortName((MStack-->MstVO(20011,3))); .L_Say141; .L_SayX141;} else {
! [13: say ~[The visibility ceiling]~]
say__p=1;! [14: the visibility ceiling]
ParaContent(); print (The) (MStack-->MstVO(20011,3)); .L_Say142; .L_SayX142;}
}
! [15: say roman type]
say__p=1;! [16: roman type]
ParaContent(); style roman; .L_Say143; .L_SayX143;! [17: let intermediate level be the visibility-holder of the actor]
tmp_0 = VisibilityParent(actor);
! [18: repeat with intermediate level count running from 2 to the visibility level count]
for (tmp_1=2: tmp_1<=(MStack-->MstVO(20011,2)): tmp_1++)
{! [19: if the intermediate level is a supporter or the intermediate level is an animal]
if ((((tmp_0 ofclass K6_supporter))) || (((tmp_0 ofclass K12_animal))))
{! [20: say ~ (on [the intermediate level])~ ( b )]
say__p=1;! [21: ~ (on [the intermediate level])~ ( b )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),TX_R_248); .L_Say144; .L_SayX144;} else {
! [22: say ~ (in [the intermediate level])~ ( c )]
say__p=1;! [23: ~ (in [the intermediate level])~ ( c )]
ParaContent(); print (TEXT_TY_Say) ((LocalParking-->0=tmp_0),(LocalParking-->1=tmp_1),TX_R_249); .L_Say145; .L_SayX145;}
! [24: let the intermediate level be the visibility-holder of the intermediate level]
tmp_0 = VisibilityParent(tmp_0);
}
! [25: say line break]
say__p=1;! [26: line break]
ParaContent(); new_line; .L_Say146; .L_SayX146;! [27: say run paragraph on with special look spacing]
say__p=1;! [28: run paragraph on with special look spacing]
ParaContent(); SpecialLookSpacingBreak(); .L_Say147; .L_SayX147;} else if (debug_rules > 1) DB_Rule(R_188, 188, 'actor');
rfalse;
];
! From the Standard Rules
! No specific request
! Carry out looking ( this is the room description body text rule ):
[ R_189 ;
if (actor == player) {
if (debug_rules) DB_Rule(R_189, 189);
! [2: if the visibility level count is 0]
if ((((MStack-->MstVO(20011,2)) == 0)))
{! [3: if set to abbreviated room descriptions]
if (((lookmode == 3)))
{! [4: continue the action]
rfalse;
}
! [5: if set to sometimes abbreviated room descriptions and abbreviated form allowed is true and darkness witnessed is true]
if ((((lookmode == 1))) && ((((((MStack-->MstVO(20011,1)) && true) == (1 && true)))) && (((((Global_Vars-->0) && true) == (1 && true))))))
{! [6: continue the action]
rfalse;
}
! [7: begin the printing the description of a dark room activity]
BeginActivity(V10_printing_the_description);
! [8: if handling the printing the description of a dark room activity]
if (((~~(ForActivity(V10_printing_the_description)))))
{! [9: now the prior named object is nothing]
prior_named_noun = nothing;
! [10: say ~[It] [are] pitch dark, and [we] [can't see] a thing.~ ( a )]
say__p=1;! [11: ~[It] [are] pitch dark, and [we] [can't see] a thing.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_250); new_line; .L_Say148; .L_SayX148;}
! [12: end the printing the description of a dark room activity]
EndActivity(V10_printing_the_description);
} else {
! [13: if the visibility ceiling is the location]
if ((((MStack-->MstVO(20011,3)) == real_location)))
{! [14: if set to abbreviated room descriptions]
if (((lookmode == 3)))
{! [15: continue the action]
rfalse;
}
! [16: if set to sometimes abbreviated room descriptions and abbreviated form allowed is true and the location is visited]
if ((((lookmode == 1))) && ((((((MStack-->MstVO(20011,1)) && true) == (1 && true)))) && ((((Adj_51_t1_v10(real_location)))))))
{! [17: continue the action]
rfalse;
}
! [18: print the location's description]
PrintOrRun(location, description);
}
}
} else if (debug_rules > 1) DB_Rule(R_189, 189, 'actor');
rfalse;
];
! From the Standard Rules
! No specific request
! Carry out looking ( this is the room description paragraphs about objects rule ):
[ R_190
tmp_0 ! Let/loop value (deallocated by end of phrase)
tmp_1 ! Let/loop value (deallocated by end of phrase)
tmp_2 ! Let/loop value (deallocated by end of phrase)
;
if (actor == player) {
if (debug_rules) DB_Rule(R_190, 190);
! [2: if the visibility level count is greater than 0]
if ((((MStack-->MstVO(20011,2)) > 0)))
{! [3: let the intermediate position be the actor]
tmp_0 = actor;
! [4: let the ip count be the visibility level count]
tmp_1 = (MStack-->MstVO(20011,2));
! [5: while the ip count is greater than 0]
while (((tmp_1 > 0)))
{! [6: now the intermediate position is marked for listing]
(Adj_65_t2_v10(tmp_0));
! [7: let the intermediate position be the visibility-holder of the intermediate position]
tmp_0 = VisibilityParent(tmp_0);
! [8: decrease the ip count by 1]
tmp_1 = tmp_1 - 1;;
}
! [9: let the top-down ip count be the visibility level count]
tmp_2 = (MStack-->MstVO(20011,2));
! [10: while the top-down ip count is greater than 0]
while (((tmp_2 > 0)))
{! [11: let the intermediate position be the actor]
tmp_0 = actor;
! [12: let the ip count be 0]
tmp_1 = 0;
! [13: while the ip count is less than the top-down ip count]
while (((tmp_1 < tmp_2)))
{! [14: let the intermediate position be the visibility-holder of the intermediate position]
tmp_0 = VisibilityParent(tmp_0);
! [15: increase the ip count by 1]
tmp_1 = tmp_1 + 1;;
}
! [16: describe locale for the intermediate position]
(PHR_81_r1 (tmp_0));
! [17: decrease the top-down ip count by 1]
tmp_2 = tmp_2 - 1;;
}
}
! [18: continue the action]
rfalse;
} else if (debug_rules > 1) DB_Rule(R_190, 190, 'actor');
rfalse;
];
! From the Standard Rules
! No specific request
! Carry out looking ( this is the check new arrival rule ):
[ R_191 ;
if (actor == player) {
if (debug_rules) DB_Rule(R_191, 191);
! [2: if in darkness]
if (((location==thedark)))
{! [3: now the darkness witnessed is true]
(Global_Vars-->0) = 1;
} else {
! [4: if the location is a room]
if (((real_location ofclass K1_room)))
{! [5: now the location is visited]
(Adj_51_t2_v10(real_location));
}
}
} else if (debug_rules > 1) DB_Rule(R_191, 191, 'actor');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Looking (B166_report_looking)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor looking ( this is the other people looking rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor looking ( this is the other people looking rule ):
[ R_192 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_192, 192);
! [2: if the actor is not the player]
if (((~~((actor == player)))))
{! [3: say ~[The actor] [look] around.~ ( a )]
say__p=1;! [4: ~[The actor] [look] around.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_251); new_line; .L_Say149; .L_SayX149;}
} else if (debug_rules > 1) DB_Rule(R_192, 192, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: carry out Examining (B168_carry_out_examining)
! ----------------------------------------------------------------------------------------------------
! Rule 1/6 ! Carry out examining ( this is the standard examining rule ):
! === equally specific with ===
! Rule 2/6 ! Carry out examining ( this is the examine directions rule ):
! === equally specific with ===
! Rule 3/6 ! Carry out examining ( this is the examine containers rule ):
! === equally specific with ===
! Rule 4/6 ! Carry out examining ( this is the examine supporters rule ):
! === equally specific with ===
! Rule 5/6 ! Carry out examining ( this is the examine devices rule ):
! === equally specific with ===
! Rule 6/6 ! Carry out examining ( this is the examine undescribed things rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Carry out examining ( this is the standard examining rule ):
[ R_193 ;
if (actor == player) {
if (debug_rules) DB_Rule(R_193, 193);
! [2: if the noun provides the property description and the description of the noun is not ~~]
if ((((WhetherProvides(noun, false, description)))) && (((~~(( BlkValueCompare(GProperty(OBJECT_TY, noun,description), EMPTY_TEXT_VALUE) == 0))))))
{! [3: say ~[description of the noun][line break]~]
say__p=1;! [4: description of the noun]
ParaContent(); @push self; print (TEXT_TY_Say) GProperty(OBJECT_TY, self=noun,description);@pull self; ! [5: line break]
ParaContent(); new_line; .L_Say150; .L_SayX150;! [6: now examine text printed is true]
(MStack-->MstVO(20012,0)) = 1;
}
} else if (debug_rules > 1) DB_Rule(R_193, 193, 'actor');
rfalse;
];
! From the Standard Rules
! No specific request
! Carry out examining ( this is the examine directions rule ):
[ R_194 ;
if (actor == player) {
if (debug_rules) DB_Rule(R_194, 194);
! [2: if the noun is a direction]
if (((noun ofclass K3_direction)))
{! [3: say ~[We] [see] nothing unexpected in that direction.~ ( a )]
say__p=1;! [4: ~[We] [see] nothing unexpected in that direction.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_252); new_line; .L_Say151; .L_SayX151;! [5: now examine text printed is true]
(MStack-->MstVO(20012,0)) = 1;
}
} else if (debug_rules > 1) DB_Rule(R_194, 194, 'actor');
rfalse;
];
! From the Standard Rules
! No specific request
! Carry out examining ( this is the examine containers rule ):
[ R_195 ;
if (actor == player) {
if (debug_rules) DB_Rule(R_195, 195);
! [2: if the noun is a container]
if (((noun ofclass K5_container)))
{! [3: if the noun is open or the noun is transparent]
if (((((Adj_72_t1_v10(noun))))) || ((((Adj_71_t1_v10(noun))))))
{! [4: if something described which is not scenery is in the noun and something which is not the player is in the noun]
if (((((Prop_26())))) && ((((Prop_27())))))
{! [5: say ~In [the noun] ~ ( a )]
say__p=1;! [6: ~In [the noun] ~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_253); .L_Say152; .L_SayX152;! [7: list the contents of the noun , as a sentence , tersely , not listing concealed items , prefacing with is/are]
WriteListFrom(child(noun), 3144);
! [8: say ~.~]
say__p=1;! [9: ~.~]
ParaContent(); print "."; new_line; .L_Say153; .L_SayX153;! [10: now examine text printed is true]
(MStack-->MstVO(20012,0)) = 1;
} else {
! [11: if examine text printed is false]
if (((((MStack-->MstVO(20012,0)) && true) == (0 && true))))
{! [12: if the player is in the noun]
if (((noun == ContainerOf(player))))
{! [13: make no decision]
rfalse;
}
! [14: say ~[The noun] [are] empty.~ ( b )]
say__p=1;! [15: ~[The noun] [are] empty.~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_254); new_line; .L_Say154; .L_SayX154;! [16: now examine text printed is true]
(MStack-->MstVO(20012,0)) = 1;
}
}
}
}
} else if (debug_rules > 1) DB_Rule(R_195, 195, 'actor');
rfalse;
];
! From the Standard Rules
! No specific request
! Carry out examining ( this is the examine supporters rule ):
[ R_196 ;
if (actor == player) {
if (debug_rules) DB_Rule(R_196, 196);
! [2: if the noun is a supporter]
if (((noun ofclass K6_supporter)))
{! [3: if something described which is not scenery is on the noun and something which is not the player is on the noun]
if (((((Prop_28())))) && ((((Prop_29())))))
{! [4: say ~On [the noun] ~ ( a )]
say__p=1;! [5: ~On [the noun] ~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_255); .L_Say155; .L_SayX155;! [6: list the contents of the noun , as a sentence , tersely , not listing concealed items , prefacing with is/are , including contents , giving brief inventory information]
WriteListFrom(child(noun), 3288);
! [7: say ~.~]
say__p=1;! [8: ~.~]
ParaContent(); print "."; new_line; .L_Say156; .L_SayX156;! [9: now examine text printed is true]
(MStack-->MstVO(20012,0)) = 1;
}
}
} else if (debug_rules > 1) DB_Rule(R_196, 196, 'actor');
rfalse;
];
! From the Standard Rules
! No specific request
! Carry out examining ( this is the examine devices rule ):
[ R_197 ;
if (actor == player) {
if (debug_rules) DB_Rule(R_197, 197);
! [2: if the noun is a device]
if (((noun ofclass K13_device)))
{! [3: say ~[The noun] [are] [if story tense is present tense]currently [end if]switched [if the noun is switched on]on[otherwise]off[end if].~ ( a )]
say__p=1;! [4: ~[The noun] [are] [if story tense is present tense]currently [end if]switched [if the noun is switched on]on[otherwise]off[end if].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_256); new_line; .L_Say157; .L_SayX157;! [5: now examine text printed is true]
(MStack-->MstVO(20012,0)) = 1;
}
} else if (debug_rules > 1) DB_Rule(R_197, 197, 'actor');
rfalse;
];
! From the Standard Rules
! No specific request
! Carry out examining ( this is the examine undescribed things rule ):
[ R_198 ;
if (actor == player) {
if (debug_rules) DB_Rule(R_198, 198);
! [2: if examine text printed is false]
if (((((MStack-->MstVO(20012,0)) && true) == (0 && true))))
{! [3: say ~[We] [see] nothing special about [the noun].~ ( a )]
say__p=1;! [4: ~[We] [see] nothing special about [the noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_257); new_line; .L_Say158; .L_SayX158;}
} else if (debug_rules > 1) DB_Rule(R_198, 198, 'actor');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Examining (B169_report_examining)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor examining ( this is the report other people examining rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor examining ( this is the report other people examining rule ):
[ R_199 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_199, 199);
! [2: if the actor is not the player]
if (((~~((actor == player)))))
{! [3: say ~[The actor] [look] closely at [the noun].~ ( a )]
say__p=1;! [4: ~[The actor] [look] closely at [the noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_258); new_line; .L_Say159; .L_SayX159;}
} else if (debug_rules > 1) DB_Rule(R_199, 199, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: carry out Looking under (B171_carry_out_looking_under)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Carry out an actor looking under ( this is the standard looking under rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Carry out an actor looking under ( this is the standard looking under rule ):
[ R_200 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_200, 200);
! [2: if the player is the actor]
if (((player == actor)))
{! [3: say ~[We] [find] nothing of interest.~ ( a )]
say__p=1;! [4: ~[We] [find] nothing of interest.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_259); new_line; .L_Say160; .L_SayX160;}
! [5: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_200, 200, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Looking under (B172_report_looking_under)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor looking under ( this is the report other people looking under rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor looking under ( this is the report other people looking under rule ):
[ R_201 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_201, 201);
! [2: if the action is not silent]
if (((keep_silent == false)))
{! [3: if the actor is not the player]
if (((~~((actor == player)))))
{! [4: say ~[The actor] [look] under [the noun].~ ( a )]
say__p=1;! [5: ~[The actor] [look] under [the noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_260); new_line; .L_Say161; .L_SayX161;}
}
} else if (debug_rules > 1) DB_Rule(R_201, 201, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Searching (B173_check_searching)
! ----------------------------------------------------------------------------------------------------
! Rule 1/2 ! Check an actor searching ( this is the can't search unless container or supporter rule ):
! === equally specific with ===
! Rule 2/2 ! Check an actor searching ( this is the can't search closed opaque containers rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor searching ( this is the can't search unless container or supporter rule ):
[ R_202 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_202, 202);
! [2: if the noun is not a container and the noun is not a supporter]
if ((((~~((noun ofclass K5_container))))) && (((~~((noun ofclass K6_supporter))))))
{! [3: if the player is the actor]
if (((player == actor)))
{! [4: say ~[We] [find] nothing of interest.~ ( a )]
say__p=1;! [5: ~[We] [find] nothing of interest.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_261); new_line; .L_Say162; .L_SayX162;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_202, 202, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor searching ( this is the can't search closed opaque containers rule ):
[ R_203 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_203, 203);
! [2: if the noun is a closed opaque container]
if (((noun ofclass K5_container) && ((Adj_73_t1_v10(noun))) && ((Adj_70_t1_v10(noun)))))
{! [3: if the player is the actor]
if (((player == actor)))
{! [4: say ~[We] [can't see] inside, since [the noun] [are] closed.~ ( a )]
say__p=1;! [5: ~[We] [can't see] inside, since [the noun] [are] closed.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_262); new_line; .L_Say163; .L_SayX163;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_203, 203, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Searching (B175_report_searching)
! ----------------------------------------------------------------------------------------------------
! Rule 1/3 ! Report searching a container ( this is the standard search containers rule ):
! === equally specific with ===
! Rule 2/3 ! Report searching a supporter ( this is the standard search supporters rule ):
! >>> I - Number of aspects constrained >>>
! Rule 3/3 ! Report an actor searching ( this is the report other people searching rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report searching a container ( this is the standard search containers rule ):
[ R_204 ;
if ((( (actor==player) && ((noun ofclass K5_container))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_204, 204);
! [2: if the noun contains a described thing which is not scenery]
if ((((Prop_30()))))
{! [3: say ~In [the noun] ~ ( a )]
say__p=1;! [4: ~In [the noun] ~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_263); .L_Say164; .L_SayX164;! [5: list the contents of the noun , as a sentence , tersely , not listing concealed items , prefacing with is/are]
WriteListFrom(child(noun), 3144);
! [6: say ~.~]
say__p=1;! [7: ~.~]
ParaContent(); print "."; new_line; .L_Say165; .L_SayX165;} else {
! [8: say ~[The noun] [are] empty.~ ( b )]
say__p=1;! [9: ~[The noun] [are] empty.~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_264); new_line; .L_Say166; .L_SayX166;}
} else if (debug_rules > 1) DB_Rule(R_204, 204, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Report searching a supporter ( this is the standard search supporters rule ):
[ R_205 ;
if ((( (actor==player) && ((noun ofclass K6_supporter))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_205, 205);
! [2: if the noun supports a described thing which is not scenery]
if ((((Prop_31()))))
{! [3: say ~On [the noun] ~ ( a )]
say__p=1;! [4: ~On [the noun] ~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_265); .L_Say167; .L_SayX167;! [5: list the contents of the noun , as a sentence , tersely , not listing concealed items , prefacing with is/are]
WriteListFrom(child(noun), 3144);
! [6: say ~.~]
say__p=1;! [7: ~.~]
ParaContent(); print "."; new_line; .L_Say168; .L_SayX168;} else {
! [8: now the prior named object is nothing]
prior_named_noun = nothing;
! [9: say ~[There] [are] nothing on [the noun].~ ( b )]
say__p=1;! [10: ~[There] [are] nothing on [the noun].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_266); new_line; .L_Say169; .L_SayX169;}
} else if (debug_rules > 1) DB_Rule(R_205, 205, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Report an actor searching ( this is the report other people searching rule ):
[ R_206 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_206, 206);
! [2: if the actor is not the player]
if (((~~((actor == player)))))
{! [3: say ~[The actor] [search] [the noun].~ ( a )]
say__p=1;! [4: ~[The actor] [search] [the noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_267); new_line; .L_Say170; .L_SayX170;}
} else if (debug_rules > 1) DB_Rule(R_206, 206, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Consulting it about (B178_report_consulting_it_ab)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor consulting something about ( this is the block consulting rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor consulting something about ( this is the block consulting rule ):
[ R_207 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_207, 207);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: say ~[We] [discover] nothing of interest in [the noun].~ ( a )]
say__p=1;! [4: ~[We] [discover] nothing of interest in [the noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_268); new_line; .L_Say171; .L_SayX171;} else {
! [5: say ~[The actor] [look] at [the noun].~ ( b )]
say__p=1;! [6: ~[The actor] [look] at [the noun].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_269); new_line; .L_Say172; .L_SayX172;}
} else if (debug_rules > 1) DB_Rule(R_207, 207, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Locking it with (B179_check_locking_it_with)
! ----------------------------------------------------------------------------------------------------
! Rule 1/4 ! Check an actor locking something with ( this is the can't lock without a lock rule ):
! === equally specific with ===
! Rule 2/4 ! Check an actor locking something with ( this is the can't lock what's already locked rule ):
! === equally specific with ===
! Rule 3/4 ! Check an actor locking something with ( this is the can't lock what's open rule ):
! === equally specific with ===
! Rule 4/4 ! Check an actor locking something with ( this is the can't lock without the correct key rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor locking something with ( this is the can't lock without a lock rule ):
[ R_208 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_208, 208);
! [2: if the noun provides the property lockable and the noun is lockable]
if ((((WhetherProvides(noun, true, lockable)))) && ((((Adj_76_t1_v10(noun))))))
{! [3: continue the action]
rfalse;
}
! [4: if the actor is the player]
if (((actor == player)))
{! [5: say ~[regarding the noun][Those] [don't] seem to be something [we] [can] lock.~ ( a )]
say__p=1;! [6: ~[regarding the noun][Those] [don't] seem to be something [we] [can] lock.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_270); new_line; .L_Say173; .L_SayX173;}
! [7: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_208, 208, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor locking something with ( this is the can't lock what's already locked rule ):
[ R_209 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_209, 209);
! [2: if the noun is locked]
if ((((Adj_77_t1_v10(noun)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[regarding the noun][They're] locked at the [if story tense is present tense]moment[otherwise]time[end if].~ ( a )]
say__p=1;! [5: ~[regarding the noun][They're] locked at the [if story tense is present tense]moment[otherwise]time[end if].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_271); new_line; .L_Say174; .L_SayX174;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_209, 209, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor locking something with ( this is the can't lock what's open rule ):
[ R_210 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_210, 210);
! [2: if the noun is open]
if ((((Adj_72_t1_v10(noun)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~First [we] [would have] to close [the noun].~ ( a )]
say__p=1;! [5: ~First [we] [would have] to close [the noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_272); new_line; .L_Say175; .L_SayX175;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_210, 210, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor locking something with ( this is the can't lock without the correct key rule ):
[ R_211 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_211, 211);
! [2: if the holder of the second noun is not the actor or the noun does not provide the property matching key or the matching key of the noun is not the second noun]
if ((((~~(((HolderOf(second)) == actor))))) || ((((~~((WhetherProvides(noun, false, with_key)))))) || (((~~((GProperty(OBJECT_TY, noun,with_key) == second)))))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[regarding the second noun][Those] [don't] seem to fit the lock.~ ( a )]
say__p=1;! [5: ~[regarding the second noun][Those] [don't] seem to fit the lock.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_273); new_line; .L_Say176; .L_SayX176;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_211, 211, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: carry out Locking it with (B180_carry_out_locking_it_wi)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Carry out an actor locking something with ( this is the standard locking rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Carry out an actor locking something with ( this is the standard locking rule ):
[ R_212 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_212, 212);
! [2: now the noun is locked]
(Adj_77_t2_v10(noun));
} else if (debug_rules > 1) DB_Rule(R_212, 212, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Locking it with (B181_report_locking_it_with)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor locking something with ( this is the standard report locking rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor locking something with ( this is the standard report locking rule ):
[ R_213 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_213, 213);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: if the action is not silent]
if (((keep_silent == false)))
{! [4: say ~[We] [lock] [the noun].~ ( a )]
say__p=1;! [5: ~[We] [lock] [the noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_274); new_line; .L_Say177; .L_SayX177;}
} else {
! [6: if the actor is visible]
if ((((Adj_3_t1_v10(actor)))))
{! [7: say ~[The actor] [lock] [the noun].~ ( b )]
say__p=1;! [8: ~[The actor] [lock] [the noun].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_275); new_line; .L_Say178; .L_SayX178;}
}
} else if (debug_rules > 1) DB_Rule(R_213, 213, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Unlocking it with (B182_check_unlocking_it_with)
! ----------------------------------------------------------------------------------------------------
! Rule 1/3 ! Check an actor unlocking something with ( this is the can't unlock without a lock rule ):
! === equally specific with ===
! Rule 2/3 ! Check an actor unlocking something with ( this is the can't unlock what's already unlocked rule ):
! === equally specific with ===
! Rule 3/3 ! Check an actor unlocking something with ( this is the can't unlock without the correct key rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor unlocking something with ( this is the can't unlock without a lock rule ):
[ R_214 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_214, 214);
! [2: if the noun provides the property lockable and the noun is lockable]
if ((((WhetherProvides(noun, true, lockable)))) && ((((Adj_76_t1_v10(noun))))))
{! [3: continue the action]
rfalse;
}
! [4: if the actor is the player]
if (((actor == player)))
{! [5: say ~[regarding the noun][Those] [don't] seem to be something [we] [can] unlock.~ ( a )]
say__p=1;! [6: ~[regarding the noun][Those] [don't] seem to be something [we] [can] unlock.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_276); new_line; .L_Say179; .L_SayX179;}
! [7: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_214, 214, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor unlocking something with ( this is the can't unlock what's already unlocked rule ):
[ R_215 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_215, 215);
! [2: if the noun is not locked]
if (((~~(((Adj_77_t1_v10(noun)))))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[regarding the noun][They're] unlocked at the [if story tense is present tense]moment[otherwise]time[end if].~ ( a )]
say__p=1;! [5: ~[regarding the noun][They're] unlocked at the [if story tense is present tense]moment[otherwise]time[end if].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_277); new_line; .L_Say180; .L_SayX180;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_215, 215, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor unlocking something with ( this is the can't unlock without the correct key rule ):
[ R_216 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_216, 216);
! [2: if the holder of the second noun is not the actor or the noun does not provide the property matching key or the matching key of the noun is not the second noun]
if ((((~~(((HolderOf(second)) == actor))))) || ((((~~((WhetherProvides(noun, false, with_key)))))) || (((~~((GProperty(OBJECT_TY, noun,with_key) == second)))))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[regarding the second noun][Those] [don't] seem to fit the lock.~ ( a )]
say__p=1;! [5: ~[regarding the second noun][Those] [don't] seem to fit the lock.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_278); new_line; .L_Say181; .L_SayX181;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_216, 216, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: carry out Unlocking it with (B183_carry_out_unlocking_it_)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Carry out an actor unlocking something with ( this is the standard unlocking rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Carry out an actor unlocking something with ( this is the standard unlocking rule ):
[ R_217 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_217, 217);
! [2: now the noun is not locked]
(Adj_77_t3_v10(noun));
} else if (debug_rules > 1) DB_Rule(R_217, 217, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Unlocking it with (B184_report_unlocking_it_wit)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor unlocking something with ( this is the standard report unlocking rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor unlocking something with ( this is the standard report unlocking rule ):
[ R_218 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_218, 218);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: if the action is not silent]
if (((keep_silent == false)))
{! [4: say ~[We] [unlock] [the noun].~ ( a )]
say__p=1;! [5: ~[We] [unlock] [the noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_279); new_line; .L_Say182; .L_SayX182;}
} else {
! [6: if the actor is visible]
if ((((Adj_3_t1_v10(actor)))))
{! [7: say ~[The actor] [unlock] [the noun].~ ( b )]
say__p=1;! [8: ~[The actor] [unlock] [the noun].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_280); new_line; .L_Say183; .L_SayX183;}
}
} else if (debug_rules > 1) DB_Rule(R_218, 218, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Switching on (B185_check_switching_on)
! ----------------------------------------------------------------------------------------------------
! Rule 1/2 ! Check an actor switching on ( this is the can't switch on unless switchable rule ):
! === equally specific with ===
! Rule 2/2 ! Check an actor switching on ( this is the can't switch on what's already on rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor switching on ( this is the can't switch on unless switchable rule ):
[ R_219 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_219, 219);
! [2: if the noun provides the property switched on]
if (((WhetherProvides(noun, true, on))))
{! [3: continue the action]
rfalse;
}
! [4: if the actor is the player]
if (((actor == player)))
{! [5: say ~[regarding the noun][They] [aren't] something [we] [can] switch.~ ( a )]
say__p=1;! [6: ~[regarding the noun][They] [aren't] something [we] [can] switch.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_281); new_line; .L_Say184; .L_SayX184;}
! [7: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_219, 219, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor switching on ( this is the can't switch on what's already on rule ):
[ R_220 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_220, 220);
! [2: if the noun is switched on]
if ((((Adj_82_t1_v10(noun)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[regarding the noun][They're] already on.~ ( a )]
say__p=1;! [5: ~[regarding the noun][They're] already on.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_282); new_line; .L_Say185; .L_SayX185;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_220, 220, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: carry out Switching on (B186_carry_out_switching_on)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Carry out an actor switching on ( this is the standard switching on rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Carry out an actor switching on ( this is the standard switching on rule ):
[ R_221 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_221, 221);
! [2: now the noun is switched on]
(Adj_82_t2_v10(noun));
} else if (debug_rules > 1) DB_Rule(R_221, 221, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Switching on (B187_report_switching_on)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor switching on ( this is the standard report switching on rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor switching on ( this is the standard report switching on rule ):
[ R_222 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_222, 222);
! [2: if the action is not silent]
if (((keep_silent == false)))
{! [3: say ~[The actor] [switch] [the noun] on.~ ( a )]
say__p=1;! [4: ~[The actor] [switch] [the noun] on.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_283); new_line; .L_Say186; .L_SayX186;}
} else if (debug_rules > 1) DB_Rule(R_222, 222, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Switching off (B188_check_switching_off)
! ----------------------------------------------------------------------------------------------------
! Rule 1/2 ! Check an actor switching off ( this is the can't switch off unless switchable rule ):
! === equally specific with ===
! Rule 2/2 ! Check an actor switching off ( this is the can't switch off what's already off rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor switching off ( this is the can't switch off unless switchable rule ):
[ R_223 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_223, 223);
! [2: if the noun provides the property switched on]
if (((WhetherProvides(noun, true, on))))
{! [3: continue the action]
rfalse;
}
! [4: if the actor is the player]
if (((actor == player)))
{! [5: say ~[regarding the noun][They] [aren't] something [we] [can] switch.~ ( a )]
say__p=1;! [6: ~[regarding the noun][They] [aren't] something [we] [can] switch.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_284); new_line; .L_Say187; .L_SayX187;}
! [7: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_223, 223, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor switching off ( this is the can't switch off what's already off rule ):
[ R_224 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_224, 224);
! [2: if the noun is switched off]
if ((((Adj_83_t1_v10(noun)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[regarding the noun][They're] already off.~ ( a )]
say__p=1;! [5: ~[regarding the noun][They're] already off.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_285); new_line; .L_Say188; .L_SayX188;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_224, 224, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: carry out Switching off (B189_carry_out_switching_off)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Carry out an actor switching off ( this is the standard switching off rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Carry out an actor switching off ( this is the standard switching off rule ):
[ R_225 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_225, 225);
! [2: now the noun is switched off]
(Adj_83_t2_v10(noun));
} else if (debug_rules > 1) DB_Rule(R_225, 225, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Switching off (B190_report_switching_off)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor switching off ( this is the standard report switching off rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor switching off ( this is the standard report switching off rule ):
[ R_226 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_226, 226);
! [2: if the action is not silent]
if (((keep_silent == false)))
{! [3: say ~[The actor] [switch] [the noun] off.~ ( a )]
say__p=1;! [4: ~[The actor] [switch] [the noun] off.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_286); new_line; .L_Say189; .L_SayX189;}
} else if (debug_rules > 1) DB_Rule(R_226, 226, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Opening (B191_check_opening)
! ----------------------------------------------------------------------------------------------------
! Rule 1/3 ! Check an actor opening ( this is the can't open unless openable rule ):
! === equally specific with ===
! Rule 2/3 ! Check an actor opening ( this is the can't open what's locked rule ):
! === equally specific with ===
! Rule 3/3 ! Check an actor opening ( this is the can't open what's already open rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor opening ( this is the can't open unless openable rule ):
[ R_227 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_227, 227);
! [2: if the noun provides the property openable and the noun is openable]
if ((((WhetherProvides(noun, true, openable)))) && ((((Adj_74_t1_v10(noun))))))
{! [3: continue the action]
rfalse;
}
! [4: if the actor is the player]
if (((actor == player)))
{! [5: say ~[regarding the noun][They] [aren't] something [we] [can] open.~ ( a )]
say__p=1;! [6: ~[regarding the noun][They] [aren't] something [we] [can] open.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_287); new_line; .L_Say190; .L_SayX190;}
! [7: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_227, 227, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor opening ( this is the can't open what's locked rule ):
[ R_228 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_228, 228);
! [2: if the noun provides the property lockable and the noun is locked]
if ((((WhetherProvides(noun, true, lockable)))) && ((((Adj_77_t1_v10(noun))))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[regarding the noun][They] [seem] to be locked.~ ( a )]
say__p=1;! [5: ~[regarding the noun][They] [seem] to be locked.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_288); new_line; .L_Say191; .L_SayX191;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_228, 228, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor opening ( this is the can't open what's already open rule ):
[ R_229 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_229, 229);
! [2: if the noun is open]
if ((((Adj_72_t1_v10(noun)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[regarding the noun][They're] already open.~ ( a )]
say__p=1;! [5: ~[regarding the noun][They're] already open.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_289); new_line; .L_Say192; .L_SayX192;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_229, 229, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: carry out Opening (B192_carry_out_opening)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Carry out an actor opening ( this is the standard opening rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Carry out an actor opening ( this is the standard opening rule ):
[ R_230 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_230, 230);
! [2: now the noun is open]
(Adj_72_t2_v10(noun));
} else if (debug_rules > 1) DB_Rule(R_230, 230, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Opening (B193_report_opening)
! ----------------------------------------------------------------------------------------------------
! Rule 1/2 ! Report an actor opening ( this is the reveal any newly visible interior rule ):
! === equally specific with ===
! Rule 2/2 ! Report an actor opening ( this is the standard report opening rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor opening ( this is the reveal any newly visible interior rule ):
[ R_231 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_231, 231);
! [2: if the actor is the player and the noun is an opaque container and the first thing held by the noun is not nothing and the noun does not enclose the actor]
if ((((actor == player))) && ((((noun ofclass K5_container) && ((Adj_70_t1_v10(noun))))) && ((((~~(((child(noun)) == nothing))))) && (((~~((IndirectlyContains(noun,actor)))))))))
{! [3: if the action is not silent]
if (((keep_silent == false)))
{! [4: if the actor is the player]
if (((actor == player)))
{! [5: say ~[We] [open] [the noun], revealing ~ ( a )]
say__p=1;! [6: ~[We] [open] [the noun], revealing ~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_290); .L_Say193; .L_SayX193;! [7: list the contents of the noun , as a sentence , tersely , not listing concealed items]
WriteListFrom(child(noun), 2120);
! [8: say ~.~]
say__p=1;! [9: ~.~]
ParaContent(); print "."; new_line; .L_Say194; .L_SayX194;}
}
! [10: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_231, 231, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Report an actor opening ( this is the standard report opening rule ):
[ R_232 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_232, 232);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: if the action is not silent]
if (((keep_silent == false)))
{! [4: say ~[We] [open] [the noun].~ ( a )]
say__p=1;! [5: ~[We] [open] [the noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_291); new_line; .L_Say195; .L_SayX195;}
} else {
! [6: if the player can see the actor]
if (((TestVisibility(player,actor))))
{! [7: say ~[The actor] [open] [the noun].~ ( b )]
say__p=1;! [8: ~[The actor] [open] [the noun].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_292); new_line; .L_Say196; .L_SayX196;} else {
! [9: say ~[The noun] [open].~ ( c )]
say__p=1;! [10: ~[The noun] [open].~ ( c )]
ParaContent(); print (TEXT_TY_Say) (TX_R_293); new_line; .L_Say197; .L_SayX197;}
}
} else if (debug_rules > 1) DB_Rule(R_232, 232, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Closing (B194_check_closing)
! ----------------------------------------------------------------------------------------------------
! Rule 1/2 ! Check an actor closing ( this is the can't close unless openable rule ):
! === equally specific with ===
! Rule 2/2 ! Check an actor closing ( this is the can't close what's already closed rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor closing ( this is the can't close unless openable rule ):
[ R_233 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_233, 233);
! [2: if the noun provides the property openable and the noun is openable]
if ((((WhetherProvides(noun, true, openable)))) && ((((Adj_74_t1_v10(noun))))))
{! [3: continue the action]
rfalse;
}
! [4: if the actor is the player]
if (((actor == player)))
{! [5: say ~[regarding the noun][They] [aren't] something [we] [can] close.~ ( a )]
say__p=1;! [6: ~[regarding the noun][They] [aren't] something [we] [can] close.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_294); new_line; .L_Say198; .L_SayX198;}
! [7: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_233, 233, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor closing ( this is the can't close what's already closed rule ):
[ R_234 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_234, 234);
! [2: if the noun is closed]
if ((((Adj_73_t1_v10(noun)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[regarding the noun][They're] already closed.~ ( a )]
say__p=1;! [5: ~[regarding the noun][They're] already closed.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_295); new_line; .L_Say199; .L_SayX199;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_234, 234, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: carry out Closing (B195_carry_out_closing)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Carry out an actor closing ( this is the standard closing rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Carry out an actor closing ( this is the standard closing rule ):
[ R_235 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_235, 235);
! [2: now the noun is closed]
(Adj_73_t2_v10(noun));
} else if (debug_rules > 1) DB_Rule(R_235, 235, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Closing (B196_report_closing)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor closing ( this is the standard report closing rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor closing ( this is the standard report closing rule ):
[ R_236 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_236, 236);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: if the action is not silent]
if (((keep_silent == false)))
{! [4: say ~[We] [close] [the noun].~ ( a )]
say__p=1;! [5: ~[We] [close] [the noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_296); new_line; .L_Say200; .L_SayX200;}
} else {
! [6: if the player can see the actor]
if (((TestVisibility(player,actor))))
{! [7: say ~[The actor] [close] [the noun].~ ( b )]
say__p=1;! [8: ~[The actor] [close] [the noun].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_297); new_line; .L_Say201; .L_SayX201;} else {
! [9: say ~[The noun] [close].~ ( c )]
say__p=1;! [10: ~[The noun] [close].~ ( c )]
ParaContent(); print (TEXT_TY_Say) (TX_R_298); new_line; .L_Say202; .L_SayX202;}
}
} else if (debug_rules > 1) DB_Rule(R_236, 236, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Wearing (B197_check_wearing)
! ----------------------------------------------------------------------------------------------------
! Rule 1/3 ! Check an actor wearing ( this is the can't wear what's not clothing rule ):
! === equally specific with ===
! Rule 2/3 ! Check an actor wearing ( this is the can't wear what's not held rule ):
! === equally specific with ===
! Rule 3/3 ! Check an actor wearing ( this is the can't wear what's already worn rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor wearing ( this is the can't wear what's not clothing rule ):
[ R_237 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_237, 237);
! [2: if the noun is not a thing or the noun is not wearable]
if ((((~~((noun ofclass K2_thing))))) || (((~~(((Adj_60_t1_v10(noun))))))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[We] [can't wear] [regarding the noun][those]!~ ( a )]
say__p=1;! [5: ~[We] [can't wear] [regarding the noun][those]!~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_299); new_line; .L_Say203; .L_SayX203;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_237, 237, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor wearing ( this is the can't wear what's not held rule ):
[ R_238 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_238, 238);
! [2: if the holder of the noun is not the actor]
if (((~~(((HolderOf(noun)) == actor)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[We] [aren't] holding [regarding the noun][those]!~ ( a )]
say__p=1;! [5: ~[We] [aren't] holding [regarding the noun][those]!~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_300); new_line; .L_Say204; .L_SayX204;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_238, 238, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor wearing ( this is the can't wear what's already worn rule ):
[ R_239 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_239, 239);
! [2: if the actor is wearing the noun]
if (((actor == WearerOf(noun))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[We]['re] already wearing [regarding the noun][those]!~ ( a )]
say__p=1;! [5: ~[We]['re] already wearing [regarding the noun][those]!~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_301); new_line; .L_Say205; .L_SayX205;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_239, 239, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: carry out Wearing (B198_carry_out_wearing)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Carry out an actor wearing ( this is the standard wearing rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Carry out an actor wearing ( this is the standard wearing rule ):
[ R_240 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_240, 240);
! [2: now the actor wears the noun]
WearObject(noun,actor);
} else if (debug_rules > 1) DB_Rule(R_240, 240, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Wearing (B199_report_wearing)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor wearing ( this is the standard report wearing rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor wearing ( this is the standard report wearing rule ):
[ R_241 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_241, 241);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: if the action is not silent]
if (((keep_silent == false)))
{! [4: say ~[We] [put] on [the noun].~ ( a )]
say__p=1;! [5: ~[We] [put] on [the noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_302); new_line; .L_Say206; .L_SayX206;}
} else {
! [6: say ~[The actor] [put] on [the noun].~ ( b )]
say__p=1;! [7: ~[The actor] [put] on [the noun].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_303); new_line; .L_Say207; .L_SayX207;}
} else if (debug_rules > 1) DB_Rule(R_241, 241, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Taking off (B200_check_taking_off)
! ----------------------------------------------------------------------------------------------------
! Rule 1/2 ! Check an actor taking off ( this is the can't take off what's not worn rule ):
! === equally specific with ===
! Rule 2/2 ! Check an actor taking off ( this is the can't exceed carrying capacity when taking off rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor taking off ( this is the can't take off what's not worn rule ):
[ R_243 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_243, 243);
! [2: if the actor is not wearing the noun]
if (((~~((actor == WearerOf(noun))))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[We] [aren't] wearing [the noun].~ ( a )]
say__p=1;! [5: ~[We] [aren't] wearing [the noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_304); new_line; .L_Say208; .L_SayX208;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_243, 243, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor taking off ( this is the can't exceed carrying capacity when taking off rule ):
[ R_244 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_244, 244);
! [2: if the number of things carried by the actor is at least the carrying capacity of the actor]
if ((((Prop_32()) >= GProperty(10, actor,capacity))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[We]['re] carrying too many things already.~ ( a )]
say__p=1;! [5: ~[We]['re] carrying too many things already.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_305); new_line; .L_Say209; .L_SayX209;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_244, 244, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: carry out Taking off (B201_carry_out_taking_off)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Carry out an actor taking off ( this is the standard taking off rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Carry out an actor taking off ( this is the standard taking off rule ):
[ R_245 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_245, 245);
! [2: now the actor carries the noun]
MoveObject(noun,actor);
} else if (debug_rules > 1) DB_Rule(R_245, 245, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Taking off (B202_report_taking_off)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor taking off ( this is the standard report taking off rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor taking off ( this is the standard report taking off rule ):
[ R_246 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_246, 246);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: if the action is not silent]
if (((keep_silent == false)))
{! [4: say ~[We] [take] off [the noun].~ ( a )]
say__p=1;! [5: ~[We] [take] off [the noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_306); new_line; .L_Say210; .L_SayX210;}
} else {
! [6: say ~[The actor] [take] off [the noun].~ ( b )]
say__p=1;! [7: ~[The actor] [take] off [the noun].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_307); new_line; .L_Say211; .L_SayX211;}
} else if (debug_rules > 1) DB_Rule(R_246, 246, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Giving it to (B203_check_giving_it_to)
! ----------------------------------------------------------------------------------------------------
! Rule 1/6 ! Check an actor giving something to ( this is the can't give what you haven't got rule ):
! === equally specific with ===
! Rule 2/6 ! Check an actor giving something to ( this is the can't give to yourself rule ):
! === equally specific with ===
! Rule 3/6 ! Check an actor giving something to ( this is the can't give to a non-person rule ):
! === equally specific with ===
! Rule 4/6 ! Check an actor giving something to ( this is the can't give clothes being worn rule ):
! === equally specific with ===
! Rule 5/6 ! Check an actor giving something to ( this is the block giving rule ):
! === equally specific with ===
! Rule 6/6 ! Check an actor giving something to ( this is the can't exceed carrying capacity when giving rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor giving something to ( this is the can't give what you haven't got rule ):
[ R_247 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_247, 247);
! [2: if the actor is not the holder of the noun]
if (((~~((actor == (HolderOf(noun)))))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[We] [aren't] holding [the noun].~ ( a )]
say__p=1;! [5: ~[We] [aren't] holding [the noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_308); new_line; .L_Say212; .L_SayX212;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_247, 247, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor giving something to ( this is the can't give to yourself rule ):
[ R_248 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_248, 248);
! [2: if the actor is the second noun]
if (((actor == second)))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[We] [can't give] [the noun] to [ourselves].~ ( a )]
say__p=1;! [5: ~[We] [can't give] [the noun] to [ourselves].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_309); new_line; .L_Say213; .L_SayX213;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_248, 248, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor giving something to ( this is the can't give to a non-person rule ):
[ R_249 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_249, 249);
! [2: if the second noun is not a person]
if (((~~((second ofclass K8_person)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[The second noun] [aren't] able to receive things.~ ( a )]
say__p=1;! [5: ~[The second noun] [aren't] able to receive things.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_310); new_line; .L_Say214; .L_SayX214;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_249, 249, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor giving something to ( this is the can't give clothes being worn rule ):
[ R_250 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_250, 250);
! [2: if the actor is wearing the noun]
if (((actor == WearerOf(noun))))
{! [3: say ~(first taking [the noun] off)[command clarification break]~ ( a )]
say__p=1;! [4: ~(first taking [the noun] off)[command clarification break]~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_311); .L_Say215; .L_SayX215;! [5: silently try the actor trying taking off the noun]
@push keep_silent; keep_silent=1; @push say__p; @push say__pc;
ClearParagraphing(1);
TryAction(0, actor, ##Disrobe, noun, 0);
DivideParagraphPoint();
@pull say__pc; @pull say__p; AdjustParagraphPoint(); @pull keep_silent;
! [6: if the actor is wearing the noun]
if (((actor == WearerOf(noun))))
{! [7: stop the action]
rtrue;
}
}
} else if (debug_rules > 1) DB_Rule(R_250, 250, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor giving something to ( this is the block giving rule ):
[ R_251 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_251, 251);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: say ~[The second noun] [don't] seem interested.~ ( a )]
say__p=1;! [4: ~[The second noun] [don't] seem interested.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_312); new_line; .L_Say216; .L_SayX216;}
! [5: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_251, 251, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor giving something to ( this is the can't exceed carrying capacity when giving rule ):
[ R_252 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_252, 252);
! [2: if the number of things carried by the second noun is at least the carrying capacity of the second noun]
if ((((Prop_33()) >= GProperty(OBJECT_TY, second,capacity))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[The second noun] [are] carrying too many things already.~ ( a )]
say__p=1;! [5: ~[The second noun] [are] carrying too many things already.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_313); new_line; .L_Say217; .L_SayX217;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_252, 252, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: carry out Giving it to (B204_carry_out_giving_it_to)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Carry out an actor giving something to ( this is the standard giving rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Carry out an actor giving something to ( this is the standard giving rule ):
[ R_253 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_253, 253);
! [2: move the noun to the second noun]
MoveObject(noun, second, 0, false);
} else if (debug_rules > 1) DB_Rule(R_253, 253, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Giving it to (B205_report_giving_it_to)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor giving something to ( this is the standard report giving rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor giving something to ( this is the standard report giving rule ):
[ R_254 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_254, 254);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: say ~[We] [give] [the noun] to [the second noun].~ ( a )]
say__p=1;! [4: ~[We] [give] [the noun] to [the second noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_314); new_line; .L_Say218; .L_SayX218;} else {
! [5: if the second noun is the player]
if (((second == player)))
{! [6: say ~[The actor] [give] [the noun] to [us].~ ( b )]
say__p=1;! [7: ~[The actor] [give] [the noun] to [us].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_315); new_line; .L_Say219; .L_SayX219;} else {
! [8: say ~[The actor] [give] [the noun] to [the second noun].~ ( c )]
say__p=1;! [9: ~[The actor] [give] [the noun] to [the second noun].~ ( c )]
ParaContent(); print (TEXT_TY_Say) (TX_R_316); new_line; .L_Say220; .L_SayX220;}
}
} else if (debug_rules > 1) DB_Rule(R_254, 254, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Showing it to (B206_check_showing_it_to)
! ----------------------------------------------------------------------------------------------------
! Rule 1/3 ! Check an actor showing something to ( this is the can't show what you haven't got rule ):
! === equally specific with ===
! Rule 2/3 ! Check an actor showing something to ( this is the convert show to yourself to examine rule ):
! === equally specific with ===
! Rule 3/3 ! Check an actor showing something to ( this is the block showing rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor showing something to ( this is the can't show what you haven't got rule ):
[ R_255 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_255, 255);
! [2: if the actor is not the holder of the noun]
if (((~~((actor == (HolderOf(noun)))))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[We] [aren't] holding [the noun].~ ( a )]
say__p=1;! [5: ~[We] [aren't] holding [the noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_317); new_line; .L_Say221; .L_SayX221;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_255, 255, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor showing something to ( this is the convert show to yourself to examine rule ):
[ R_256 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_256, 256);
! [2: if the actor is the second noun]
if (((actor == second)))
{! [3: convert to the examining action on the noun]
return GVS_Convert(##Examine,noun,0);
}
} else if (debug_rules > 1) DB_Rule(R_256, 256, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor showing something to ( this is the block showing rule ):
[ R_257 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_257, 257);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: say ~[The second noun] [are] unimpressed.~ ( a )]
say__p=1;! [4: ~[The second noun] [are] unimpressed.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_318); new_line; .L_Say222; .L_SayX222;}
! [5: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_257, 257, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Waking (B209_check_waking)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Check an actor waking ( this is the block waking rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor waking ( this is the block waking rule ):
[ R_258 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_258, 258);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: now the prior named object is nothing]
prior_named_noun = nothing;
! [4: say ~That [seem] unnecessary.~ ( a )]
say__p=1;! [5: ~That [seem] unnecessary.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_319); new_line; .L_Say223; .L_SayX223;}
! [6: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_258, 258, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Throwing it at (B212_check_throwing_it_at)
! ----------------------------------------------------------------------------------------------------
! Rule 1/3 ! Check an actor throwing something at ( this is the implicitly remove thrown clothing rule ):
! === equally specific with ===
! Rule 2/3 ! Check an actor throwing something at ( this is the futile to throw things at inanimate objects rule ):
! === equally specific with ===
! Rule 3/3 ! Check an actor throwing something at ( this is the block throwing at rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor throwing something at ( this is the implicitly remove thrown clothing rule ):
[ R_259 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_259, 259);
! [2: if the actor is wearing the noun]
if (((actor == WearerOf(noun))))
{! [3: say ~(first taking [the noun] off)[command clarification break]~ ( a )]
say__p=1;! [4: ~(first taking [the noun] off)[command clarification break]~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_320); .L_Say224; .L_SayX224;! [5: silently try the actor trying taking off the noun]
@push keep_silent; keep_silent=1; @push say__p; @push say__pc;
ClearParagraphing(1);
TryAction(0, actor, ##Disrobe, noun, 0);
DivideParagraphPoint();
@pull say__pc; @pull say__p; AdjustParagraphPoint(); @pull keep_silent;
! [6: if the actor is wearing the noun]
if (((actor == WearerOf(noun))))
{! [7: stop the action]
rtrue;
}
}
} else if (debug_rules > 1) DB_Rule(R_259, 259, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor throwing something at ( this is the futile to throw things at inanimate objects rule ):
[ R_260 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_260, 260);
! [2: if the second noun is not a person]
if (((~~((second ofclass K8_person)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~Futile.~ ( a )]
say__p=1;! [5: ~Futile.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_321); new_line; .L_Say225; .L_SayX225;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_260, 260, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor throwing something at ( this is the block throwing at rule ):
[ R_261 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_261, 261);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: say ~[We] [lack] the nerve when it [if story tense is the past tense]came[otherwise]comes[end if] to the crucial moment.~ ( a )]
say__p=1;! [4: ~[We] [lack] the nerve when it [if story tense is the past tense]came[otherwise]comes[end if] to the crucial moment.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_322); new_line; .L_Say226; .L_SayX226;}
! [5: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_261, 261, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Attacking (B215_check_attacking)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Check an actor attacking ( this is the block attacking rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor attacking ( this is the block attacking rule ):
[ R_262 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_262, 262);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: now the prior named object is nothing]
prior_named_noun = nothing;
! [4: say ~Violence [aren't] the answer to this one.~ ( a )]
say__p=1;! [5: ~Violence [aren't] the answer to this one.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_323); new_line; .L_Say227; .L_SayX227;}
! [6: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_262, 262, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Kissing (B218_check_kissing)
! ----------------------------------------------------------------------------------------------------
! Rule 1/2 ! Check an actor kissing ( this is the kissing yourself rule ):
! === equally specific with ===
! Rule 2/2 ! Check an actor kissing ( this is the block kissing rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor kissing ( this is the kissing yourself rule ):
[ R_263 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_263, 263);
! [2: if the noun is the actor]
if (((noun == actor)))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[We] [don't] get much from that.~ ( a )]
say__p=1;! [5: ~[We] [don't] get much from that.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_324); new_line; .L_Say228; .L_SayX228;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_263, 263, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor kissing ( this is the block kissing rule ):
[ R_264 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_264, 264);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: say ~[The noun] [might not] like that.~ ( a )]
say__p=1;! [4: ~[The noun] [might not] like that.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_325); new_line; .L_Say229; .L_SayX229;}
! [5: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_264, 264, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Answering it that (B223_report_answering_it_tha)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor answering something that ( this is the block answering rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor answering something that ( this is the block answering rule ):
[ R_265 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_265, 265);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: now the prior named object is nothing]
prior_named_noun = nothing;
! [4: say ~[There] [are] no reply.~ ( a )]
say__p=1;! [5: ~[There] [are] no reply.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_326); new_line; .L_Say230; .L_SayX230;}
! [6: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_265, 265, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Telling it about (B224_check_telling_it_about)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Check an actor telling something about ( this is the telling yourself rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor telling something about ( this is the telling yourself rule ):
[ R_266 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_266, 266);
! [2: if the actor is the noun]
if (((actor == noun)))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[We] [talk] to [ourselves] a while.~ ( a )]
say__p=1;! [5: ~[We] [talk] to [ourselves] a while.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_327); new_line; .L_Say231; .L_SayX231;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_266, 266, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Telling it about (B226_report_telling_it_about)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor telling something about ( this is the block telling rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor telling something about ( this is the block telling rule ):
[ R_267 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_267, 267);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: now the prior named object is nothing]
prior_named_noun = nothing;
! [4: say ~This [provoke] no reaction.~ ( a )]
say__p=1;! [5: ~This [provoke] no reaction.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_328); new_line; .L_Say232; .L_SayX232;}
! [6: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_267, 267, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Asking it about (B229_report_asking_it_about)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor asking something about ( this is the block asking rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor asking something about ( this is the block asking rule ):
[ R_268 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_268, 268);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: now the prior named object is nothing]
prior_named_noun = nothing;
! [4: say ~[There] [are] no reply.~ ( a )]
say__p=1;! [5: ~[There] [are] no reply.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_329); new_line; .L_Say233; .L_SayX233;}
! [6: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_268, 268, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Asking it for (B230_check_asking_it_for)
! ----------------------------------------------------------------------------------------------------
! Rule 1/2 ! Check an actor asking something for ( this is the asking yourself for something rule ):
! === equally specific with ===
! Rule 2/2 ! Check an actor asking something for ( this is the translate asking for to giving rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor asking something for ( this is the asking yourself for something rule ):
[ R_269 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_269, 269);
! [2: if the actor is the noun and the actor is the player]
if ((((actor == noun))) && (((actor == player))))
{! [3: try taking inventory]
TryAction(0, player, ##Inv, 0, 0);
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_269, 269, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor asking something for ( this is the translate asking for to giving rule ):
[ R_270 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_270, 270);
! [2: convert to request of the noun to perform giving it to action with the second noun and the actor]
return ConvertToRequest(noun, ##Give, second, actor);
} else if (debug_rules > 1) DB_Rule(R_270, 270, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Waiting (B235_report_waiting)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor waiting ( this is the standard report waiting rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor waiting ( this is the standard report waiting rule ):
[ R_271 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_271, 271);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: if the action is not silent]
if (((keep_silent == false)))
{! [4: now the prior named object is nothing]
prior_named_noun = nothing;
! [5: say ~Time [pass].~ ( a )]
say__p=1;! [6: ~Time [pass].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_330); new_line; .L_Say234; .L_SayX234;}
} else {
! [7: say ~[The actor] [wait].~ ( b )]
say__p=1;! [8: ~[The actor] [wait].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_331); new_line; .L_Say235; .L_SayX235;}
} else if (debug_rules > 1) DB_Rule(R_271, 271, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Touching (B238_report_touching)
! ----------------------------------------------------------------------------------------------------
! Rule 1/3 ! Report an actor touching ( this is the report touching yourself rule ):
! === equally specific with ===
! Rule 2/3 ! Report an actor touching ( this is the report touching other people rule ):
! === equally specific with ===
! Rule 3/3 ! Report an actor touching ( this is the report touching things rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor touching ( this is the report touching yourself rule ):
[ R_272 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_272, 272);
! [2: if the noun is the actor]
if (((noun == actor)))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: if the action is not silent]
if (((keep_silent == false)))
{! [5: say ~[We] [achieve] nothing by this.~ ( a )]
say__p=1;! [6: ~[We] [achieve] nothing by this.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_332); new_line; .L_Say236; .L_SayX236;}
} else {
! [7: say ~[The actor] [touch] [themselves].~ ( b )]
say__p=1;! [8: ~[The actor] [touch] [themselves].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_333); new_line; .L_Say237; .L_SayX237;}
! [9: stop the action]
rtrue;
}
! [10: continue the action]
rfalse;
} else if (debug_rules > 1) DB_Rule(R_272, 272, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Report an actor touching ( this is the report touching other people rule ):
[ R_273 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_273, 273);
! [2: if the noun is a person]
if (((noun ofclass K8_person)))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: if the action is not silent]
if (((keep_silent == false)))
{! [5: say ~[The noun] [might not like] that.~ ( a )]
say__p=1;! [6: ~[The noun] [might not like] that.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_334); new_line; .L_Say238; .L_SayX238;}
} else {
! [7: if the noun is the player]
if (((noun == player)))
{! [8: say ~[The actor] [touch] [us].~ ( b )]
say__p=1;! [9: ~[The actor] [touch] [us].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_335); new_line; .L_Say239; .L_SayX239;} else {
! [10: say ~[The actor] [touch] [the noun].~ ( c )]
say__p=1;! [11: ~[The actor] [touch] [the noun].~ ( c )]
ParaContent(); print (TEXT_TY_Say) (TX_R_336); new_line; .L_Say240; .L_SayX240;}
}
! [12: stop the action]
rtrue;
}
! [13: continue the action]
rfalse;
} else if (debug_rules > 1) DB_Rule(R_273, 273, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Report an actor touching ( this is the report touching things rule ):
[ R_274 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_274, 274);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: if the action is not silent]
if (((keep_silent == false)))
{! [4: say ~[We] [feel] nothing unexpected.~ ( a )]
say__p=1;! [5: ~[We] [feel] nothing unexpected.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_337); new_line; .L_Say241; .L_SayX241;}
} else {
! [6: say ~[The actor] [touch] [the noun].~ ( b )]
say__p=1;! [7: ~[The actor] [touch] [the noun].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_338); new_line; .L_Say242; .L_SayX242;}
} else if (debug_rules > 1) DB_Rule(R_274, 274, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Waving (B239_check_waving)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Check an actor waving ( this is the can't wave what's not held rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor waving ( this is the can't wave what's not held rule ):
[ R_275 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_275, 275);
! [2: if the actor is not the holder of the noun]
if (((~~((actor == (HolderOf(noun)))))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~But [we] [aren't] holding [regarding the noun][those].~ ( a )]
say__p=1;! [5: ~But [we] [aren't] holding [regarding the noun][those].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_339); new_line; .L_Say243; .L_SayX243;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_275, 275, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Waving (B241_report_waving)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor waving ( this is the report waving things rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor waving ( this is the report waving things rule ):
[ R_276 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_276, 276);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: if the action is not silent]
if (((keep_silent == false)))
{! [4: say ~[We] [wave] [the noun].~ ( a )]
say__p=1;! [5: ~[We] [wave] [the noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_340); new_line; .L_Say244; .L_SayX244;}
} else {
! [6: say ~[The actor] [wave] [the noun].~ ( b )]
say__p=1;! [7: ~[The actor] [wave] [the noun].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_341); new_line; .L_Say245; .L_SayX245;}
} else if (debug_rules > 1) DB_Rule(R_276, 276, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Pulling (B242_check_pulling)
! ----------------------------------------------------------------------------------------------------
! Rule 1/3 ! Check an actor pulling ( this is the can't pull what's fixed in place rule ):
! === equally specific with ===
! Rule 2/3 ! Check an actor pulling ( this is the can't pull scenery rule ):
! === equally specific with ===
! Rule 3/3 ! Check an actor pulling ( this is the can't pull people rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor pulling ( this is the can't pull what's fixed in place rule ):
[ R_277 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_277, 277);
! [2: if the noun is fixed in place]
if ((((Adj_57_t1_v10(noun)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[regarding the noun][They] [are] fixed in place.~ ( a )]
say__p=1;! [5: ~[regarding the noun][They] [are] fixed in place.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_342); new_line; .L_Say246; .L_SayX246;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_277, 277, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor pulling ( this is the can't pull scenery rule ):
[ R_278 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_278, 278);
! [2: if the noun is scenery]
if ((((Adj_59_t1_v10(noun)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[We] [are] unable to.~ ( a )]
say__p=1;! [5: ~[We] [are] unable to.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_343); new_line; .L_Say247; .L_SayX247;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_278, 278, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor pulling ( this is the can't pull people rule ):
[ R_279 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_279, 279);
! [2: if the noun is a person]
if (((noun ofclass K8_person)))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[The noun] [might not like] that.~ ( a )]
say__p=1;! [5: ~[The noun] [might not like] that.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_344); new_line; .L_Say248; .L_SayX248;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_279, 279, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Pulling (B244_report_pulling)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor pulling ( this is the report pulling rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor pulling ( this is the report pulling rule ):
[ R_280 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_280, 280);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: if the action is not silent]
if (((keep_silent == false)))
{! [4: now the prior named object is nothing]
prior_named_noun = nothing;
! [5: say ~Nothing obvious [happen].~ ( a )]
say__p=1;! [6: ~Nothing obvious [happen].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_345); new_line; .L_Say249; .L_SayX249;}
} else {
! [7: say ~[The actor] [pull] [the noun].~ ( b )]
say__p=1;! [8: ~[The actor] [pull] [the noun].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_346); new_line; .L_Say250; .L_SayX250;}
} else if (debug_rules > 1) DB_Rule(R_280, 280, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Pushing (B245_check_pushing)
! ----------------------------------------------------------------------------------------------------
! Rule 1/3 ! Check an actor pushing something ( this is the can't push what's fixed in place rule ):
! === equally specific with ===
! Rule 2/3 ! Check an actor pushing something ( this is the can't push scenery rule ):
! === equally specific with ===
! Rule 3/3 ! Check an actor pushing something ( this is the can't push people rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor pushing something ( this is the can't push what's fixed in place rule ):
[ R_281 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_281, 281);
! [2: if the noun is fixed in place]
if ((((Adj_57_t1_v10(noun)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[regarding the noun][They] [are] fixed in place.~ ( a )]
say__p=1;! [5: ~[regarding the noun][They] [are] fixed in place.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_347); new_line; .L_Say251; .L_SayX251;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_281, 281, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor pushing something ( this is the can't push scenery rule ):
[ R_282 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_282, 282);
! [2: if the noun is scenery]
if ((((Adj_59_t1_v10(noun)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[We] [are] unable to.~ ( a )]
say__p=1;! [5: ~[We] [are] unable to.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_348); new_line; .L_Say252; .L_SayX252;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_282, 282, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor pushing something ( this is the can't push people rule ):
[ R_283 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_283, 283);
! [2: if the noun is a person]
if (((noun ofclass K8_person)))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[The noun] [might not like] that.~ ( a )]
say__p=1;! [5: ~[The noun] [might not like] that.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_349); new_line; .L_Say253; .L_SayX253;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_283, 283, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Pushing (B247_report_pushing)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor pushing something ( this is the report pushing rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor pushing something ( this is the report pushing rule ):
[ R_284 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_284, 284);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: if the action is not silent]
if (((keep_silent == false)))
{! [4: now the prior named object is nothing]
prior_named_noun = nothing;
! [5: say ~Nothing obvious [happen].~ ( a )]
say__p=1;! [6: ~Nothing obvious [happen].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_350); new_line; .L_Say254; .L_SayX254;}
} else {
! [7: say ~[The actor] [push] [the noun].~ ( b )]
say__p=1;! [8: ~[The actor] [push] [the noun].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_351); new_line; .L_Say255; .L_SayX255;}
} else if (debug_rules > 1) DB_Rule(R_284, 284, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Turning (B248_check_turning)
! ----------------------------------------------------------------------------------------------------
! Rule 1/3 ! Check an actor turning ( this is the can't turn what's fixed in place rule ):
! === equally specific with ===
! Rule 2/3 ! Check an actor turning ( this is the can't turn scenery rule ):
! === equally specific with ===
! Rule 3/3 ! Check an actor turning ( this is the can't turn people rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor turning ( this is the can't turn what's fixed in place rule ):
[ R_285 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_285, 285);
! [2: if the noun is fixed in place]
if ((((Adj_57_t1_v10(noun)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[regarding the noun][They] [are] fixed in place.~ ( a )]
say__p=1;! [5: ~[regarding the noun][They] [are] fixed in place.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_352); new_line; .L_Say256; .L_SayX256;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_285, 285, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor turning ( this is the can't turn scenery rule ):
[ R_286 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_286, 286);
! [2: if the noun is scenery]
if ((((Adj_59_t1_v10(noun)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[We] [are] unable to.~ ( a )]
say__p=1;! [5: ~[We] [are] unable to.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_353); new_line; .L_Say257; .L_SayX257;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_286, 286, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor turning ( this is the can't turn people rule ):
[ R_287 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_287, 287);
! [2: if the noun is a person]
if (((noun ofclass K8_person)))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[The noun] [might not like] that.~ ( a )]
say__p=1;! [5: ~[The noun] [might not like] that.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_354); new_line; .L_Say258; .L_SayX258;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_287, 287, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Turning (B250_report_turning)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor turning ( this is the report turning rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor turning ( this is the report turning rule ):
[ R_288 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_288, 288);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: if the action is not silent]
if (((keep_silent == false)))
{! [4: now the prior named object is nothing]
prior_named_noun = nothing;
! [5: say ~Nothing obvious [happen].~ ( a )]
say__p=1;! [6: ~Nothing obvious [happen].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_355); new_line; .L_Say259; .L_SayX259;}
} else {
! [7: say ~[The actor] [turn] [the noun].~ ( b )]
say__p=1;! [8: ~[The actor] [turn] [the noun].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_356); new_line; .L_Say260; .L_SayX260;}
} else if (debug_rules > 1) DB_Rule(R_288, 288, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Pushing it to (B251_check_pushing_it_to)
! ----------------------------------------------------------------------------------------------------
! Rule 1/6 ! Check an actor pushing something to ( this is the can't push unpushable things rule ):
! === equally specific with ===
! Rule 2/6 ! Check an actor pushing something to ( this is the can't push to non-directions rule ):
! === equally specific with ===
! Rule 3/6 ! Check an actor pushing something to ( this is the can't push vertically rule ):
! === equally specific with ===
! Rule 4/6 ! Check an actor pushing something to ( this is the can't push from within rule ):
! === equally specific with ===
! Rule 5/6 ! Check an actor pushing something to ( this is the standard pushing in directions rule ):
! === equally specific with ===
! Rule 6/6 ! Check an actor pushing something to ( this is the block pushing in directions rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor pushing something to ( this is the can't push unpushable things rule ):
[ R_289 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_289, 289);
! [2: if the noun is not pushable between rooms]
if (((~~(((Adj_61_t1_v10(noun)))))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[The noun] [cannot] be pushed from place to place.~ ( a )]
say__p=1;! [5: ~[The noun] [cannot] be pushed from place to place.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_357); new_line; .L_Say261; .L_SayX261;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_289, 289, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor pushing something to ( this is the can't push to non-directions rule ):
[ R_290 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_290, 290);
! [2: if the second noun is not a direction]
if (((~~((second ofclass K3_direction)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[regarding the noun][They] [aren't] a direction.~ ( a )]
say__p=1;! [5: ~[regarding the noun][They] [aren't] a direction.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_358); new_line; .L_Say262; .L_SayX262;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_290, 290, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor pushing something to ( this is the can't push vertically rule ):
[ R_291 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_291, 291);
! [2: if the second noun is up or the second noun is down]
if ((((second == I63_up))) || (((second == I64_down))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[The noun] [cannot] be pushed up or down.~ ( a )]
say__p=1;! [5: ~[The noun] [cannot] be pushed up or down.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_359); new_line; .L_Say263; .L_SayX263;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_291, 291, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor pushing something to ( this is the can't push from within rule ):
[ R_292 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_292, 292);
! [2: if the noun encloses the actor]
if (((IndirectlyContains(noun,actor))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[The noun] [cannot] be pushed from here.~ ( a )]
say__p=1;! [5: ~[The noun] [cannot] be pushed from here.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_360); new_line; .L_Say264; .L_SayX264;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_292, 292, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor pushing something to ( this is the standard pushing in directions rule ):
[ R_293 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_293, 293);
! [2: convert to special going-with-push action]
return ConvertToGoingWithPush();
} else if (debug_rules > 1) DB_Rule(R_293, 293, 'action');
rfalse;
];
! From the Standard Rules
! No specific request
! Check an actor pushing something to ( this is the block pushing in directions rule ):
[ R_294 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_294, 294);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: say ~[The noun] [cannot] be pushed from place to place.~ ( a )]
say__p=1;! [4: ~[The noun] [cannot] be pushed from place to place.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_361); new_line; .L_Say265; .L_SayX265;}
! [5: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_294, 294, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Squeezing (B254_check_squeezing)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Check an actor squeezing ( this is the innuendo about squeezing people rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor squeezing ( this is the innuendo about squeezing people rule ):
[ R_295 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_295, 295);
! [2: if the noun is a person]
if (((noun ofclass K8_person)))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[The noun] [might not like] that.~ ( a )]
say__p=1;! [5: ~[The noun] [might not like] that.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_362); new_line; .L_Say266; .L_SayX266;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_295, 295, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Squeezing (B256_report_squeezing)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor squeezing ( this is the report squeezing rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor squeezing ( this is the report squeezing rule ):
[ R_296 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_296, 296);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: if the action is not silent]
if (((keep_silent == false)))
{! [4: say ~[We] [achieve] nothing by this.~ ( a )]
say__p=1;! [5: ~[We] [achieve] nothing by this.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_363); new_line; .L_Say267; .L_SayX267;}
} else {
! [6: say ~[The actor] [squeeze] [the noun].~ ( b )]
say__p=1;! [7: ~[The actor] [squeeze] [the noun].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_364); new_line; .L_Say268; .L_SayX268;}
} else if (debug_rules > 1) DB_Rule(R_296, 296, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Saying yes (B257_check_saying_yes)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Check an actor saying yes ( this is the block saying yes rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor saying yes ( this is the block saying yes rule ):
[ R_297 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_297, 297);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: say ~That was a rhetorical question.~ ( a )]
say__p=1;! [4: ~That was a rhetorical question.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_365); new_line; .L_Say269; .L_SayX269;}
! [5: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_297, 297, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Saying no (B260_check_saying_no)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Check an actor saying no ( this is the block saying no rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor saying no ( this is the block saying no rule ):
[ R_298 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_298, 298);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: say ~That was a rhetorical question.~ ( a )]
say__p=1;! [4: ~That was a rhetorical question.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_366); new_line; .L_Say270; .L_SayX270;}
! [5: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_298, 298, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Burning (B263_check_burning)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Check an actor burning ( this is the block burning rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor burning ( this is the block burning rule ):
[ R_299 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_299, 299);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: say ~This dangerous act [would achieve] little.~ ( a )]
say__p=1;! [4: ~This dangerous act [would achieve] little.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_367); new_line; .L_Say271; .L_SayX271;}
! [5: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_299, 299, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Waking up (B266_check_waking_up)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Check an actor waking up ( this is the block waking up rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor waking up ( this is the block waking up rule ):
[ R_300 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_300, 300);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: now the prior named object is nothing]
prior_named_noun = nothing;
! [4: say ~The dreadful truth [are], this [are not] a dream.~ ( a )]
say__p=1;! [5: ~The dreadful truth [are], this [are not] a dream.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_368); new_line; .L_Say272; .L_SayX272;}
! [6: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_300, 300, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Thinking (B269_check_thinking)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Check an actor thinking ( this is the block thinking rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor thinking ( this is the block thinking rule ):
[ R_301 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_301, 301);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: say ~What a good idea.~ ( a )]
say__p=1;! [4: ~What a good idea.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_369); new_line; .L_Say273; .L_SayX273;}
! [5: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_301, 301, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Smelling (B274_report_smelling)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor smelling ( this is the report smelling rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor smelling ( this is the report smelling rule ):
[ R_302 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_302, 302);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: if the action is not silent]
if (((keep_silent == false)))
{! [4: say ~[We] [smell] nothing unexpected.~ ( a )]
say__p=1;! [5: ~[We] [smell] nothing unexpected.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_370); new_line; .L_Say274; .L_SayX274;}
} else {
! [6: say ~[The actor] [sniff].~ ( b )]
say__p=1;! [7: ~[The actor] [sniff].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_371); new_line; .L_Say275; .L_SayX275;}
} else if (debug_rules > 1) DB_Rule(R_302, 302, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Listening to (B277_report_listening_to)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor listening to ( this is the report listening rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor listening to ( this is the report listening rule ):
[ R_303 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_303, 303);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: if the action is not silent]
if (((keep_silent == false)))
{! [4: say ~[We] [hear] nothing unexpected.~ ( a )]
say__p=1;! [5: ~[We] [hear] nothing unexpected.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_372); new_line; .L_Say276; .L_SayX276;}
} else {
! [6: say ~[The actor] [listen].~ ( b )]
say__p=1;! [7: ~[The actor] [listen].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_373); new_line; .L_Say277; .L_SayX277;}
} else if (debug_rules > 1) DB_Rule(R_303, 303, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Tasting (B280_report_tasting)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor tasting ( this is the report tasting rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor tasting ( this is the report tasting rule ):
[ R_304 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_304, 304);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: if the action is not silent]
if (((keep_silent == false)))
{! [4: say ~[We] [taste] nothing unexpected.~ ( a )]
say__p=1;! [5: ~[We] [taste] nothing unexpected.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_374); new_line; .L_Say278; .L_SayX278;}
} else {
! [6: say ~[The actor] [taste] [the noun].~ ( b )]
say__p=1;! [7: ~[The actor] [taste] [the noun].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_375); new_line; .L_Say279; .L_SayX279;}
} else if (debug_rules > 1) DB_Rule(R_304, 304, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Cutting (B281_check_cutting)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Check an actor cutting ( this is the block cutting rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor cutting ( this is the block cutting rule ):
[ R_305 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_305, 305);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: say ~Cutting [regarding the noun][them] up [would achieve] little.~ ( a )]
say__p=1;! [4: ~Cutting [regarding the noun][them] up [would achieve] little.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_376); new_line; .L_Say280; .L_SayX280;}
! [5: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_305, 305, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Jumping (B286_report_jumping)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor jumping ( this is the report jumping rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor jumping ( this is the report jumping rule ):
[ R_306 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_306, 306);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: if the action is not silent]
if (((keep_silent == false)))
{! [4: say ~[We] [jump] on the spot.~ ( a )]
say__p=1;! [5: ~[We] [jump] on the spot.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_377); new_line; .L_Say281; .L_SayX281;}
} else {
! [6: say ~[The actor] [jump] on the spot.~ ( b )]
say__p=1;! [7: ~[The actor] [jump] on the spot.~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_378); new_line; .L_Say282; .L_SayX282;}
} else if (debug_rules > 1) DB_Rule(R_306, 306, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Tying it to (B287_check_tying_it_to)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Check an actor tying something to ( this is the block tying rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor tying something to ( this is the block tying rule ):
[ R_307 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_307, 307);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: say ~[We] [would achieve] nothing by this.~ ( a )]
say__p=1;! [4: ~[We] [would achieve] nothing by this.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_379); new_line; .L_Say283; .L_SayX283;}
! [5: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_307, 307, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Drinking (B290_check_drinking)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Check an actor drinking ( this is the block drinking rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor drinking ( this is the block drinking rule ):
[ R_308 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_308, 308);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: now the prior named object is nothing]
prior_named_noun = nothing;
! [4: say ~[There's] nothing suitable to drink here.~ ( a )]
say__p=1;! [5: ~[There's] nothing suitable to drink here.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_380); new_line; .L_Say284; .L_SayX284;}
! [6: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_308, 308, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Saying sorry (B293_check_saying_sorry)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Check an actor saying sorry ( this is the block saying sorry rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor saying sorry ( this is the block saying sorry rule ):
[ R_309 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_309, 309);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: say ~Oh, don't [if American dialect option is active]apologize[otherwise]apologise[end if].~ ( a )]
say__p=1;! [4: ~Oh, don't [if American dialect option is active]apologize[otherwise]apologise[end if].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_381); new_line; .L_Say285; .L_SayX285;}
! [5: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_309, 309, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Swinging (B296_check_swinging)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Check an actor swinging ( this is the block swinging rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor swinging ( this is the block swinging rule ):
[ R_310 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_310, 310);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: now the prior named object is nothing]
prior_named_noun = nothing;
! [4: say ~[There's] nothing sensible to swing here.~ ( a )]
say__p=1;! [5: ~[There's] nothing sensible to swing here.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_382); new_line; .L_Say286; .L_SayX286;}
! [6: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_310, 310, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Rubbing (B299_check_rubbing)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Check an actor rubbing ( this is the can't rub another person rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor rubbing ( this is the can't rub another person rule ):
[ R_311 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_311, 311);
! [2: if the noun is a person who is not the actor]
if (((noun ofclass K8_person) && (~~((noun == actor)))))
{! [3: if the actor is the player]
if (((actor == player)))
{! [4: say ~[The noun] [might not like] that.~ ( a )]
say__p=1;! [5: ~[The noun] [might not like] that.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_383); new_line; .L_Say287; .L_SayX287;}
! [6: stop the action]
rtrue;
}
} else if (debug_rules > 1) DB_Rule(R_311, 311, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Rubbing (B301_report_rubbing)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor rubbing ( this is the report rubbing rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor rubbing ( this is the report rubbing rule ):
[ R_312 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_312, 312);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: if the action is not silent]
if (((keep_silent == false)))
{! [4: say ~[We] [rub] [the noun].~ ( a )]
say__p=1;! [5: ~[We] [rub] [the noun].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_384); new_line; .L_Say288; .L_SayX288;}
} else {
! [6: say ~[The actor] [rub] [the noun].~ ( b )]
say__p=1;! [7: ~[The actor] [rub] [the noun].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_385); new_line; .L_Say289; .L_SayX289;}
} else if (debug_rules > 1) DB_Rule(R_312, 312, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Setting it to (B302_check_setting_it_to)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Check an actor setting something to ( this is the block setting it to rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor setting something to ( this is the block setting it to rule ):
[ R_313 ;
if ((((act_requester==nothing) && ((noun ofclass K2_thing))))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_313, 313);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: say ~No, [we] [can't set] [regarding the noun][those] to anything.~ ( a )]
say__p=1;! [4: ~No, [we] [can't set] [regarding the noun][those] to anything.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_386); new_line; .L_Say290; .L_SayX290;}
! [5: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_313, 313, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: report Waving hands (B307_report_waving_hands)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Report an actor waving hands ( this is the report waving hands rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Report an actor waving hands ( this is the report waving hands rule ):
[ R_314 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_314, 314);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: if the action is not silent]
if (((keep_silent == false)))
{! [4: say ~[We] [wave].~ ( a )]
say__p=1;! [5: ~[We] [wave].~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_387); new_line; .L_Say291; .L_SayX291;}
} else {
! [6: say ~[The actor] [wave].~ ( b )]
say__p=1;! [7: ~[The actor] [wave].~ ( b )]
ParaContent(); print (TEXT_TY_Say) (TX_R_388); new_line; .L_Say292; .L_SayX292;}
} else if (debug_rules > 1) DB_Rule(R_314, 314, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Buying (B308_check_buying)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Check an actor buying ( this is the block buying rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor buying ( this is the block buying rule ):
[ R_315 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_315, 315);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: now the prior named object is nothing]
prior_named_noun = nothing;
! [4: say ~Nothing [are] on sale.~ ( a )]
say__p=1;! [5: ~Nothing [are] on sale.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_389); new_line; .L_Say293; .L_SayX293;}
! [6: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_315, 315, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Climbing (B311_check_climbing)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Check an actor climbing ( this is the block climbing rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor climbing ( this is the block climbing rule ):
[ R_316 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_316, 316);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: say ~Little [are] to be achieved by that.~ ( a )]
say__p=1;! [4: ~Little [are] to be achieved by that.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_390); new_line; .L_Say294; .L_SayX294;}
! [5: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_316, 316, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------------------
! Rules in rulebook: check Sleeping (B314_check_sleeping)
! ----------------------------------------------------------------------------------------------------
! Rule 1/1 ! Check an actor sleeping ( this is the block sleeping rule ):
! ----------------------------------------------------------------------------------------------------
! From the Standard Rules
! No specific request
! Check an actor sleeping ( this is the block sleeping rule ):
[ R_317 ;
if ((((act_requester==nothing)))) { ! Runs only when pattern matches
self = noun;
if (debug_rules) DB_Rule(R_317, 317);
! [2: if the actor is the player]
if (((actor == player)))
{! [3: say ~[We] [aren't] feeling especially drowsy.~ ( a )]
say__p=1;! [4: ~[We] [aren't] feeling especially drowsy.~ ( a )]
ParaContent(); print (TEXT_TY_Say) (TX_R_391); new_line; .L_Say295; .L_SayX295;}
! [5: stop the action]
rtrue;
} else if (debug_rules > 1) DB_Rule(R_317, 317, 'action');
rfalse;
];
! ----------------------------------------------------------------------------------------------------
! Definitions of displaced and unbooked rules
! Definitions of adjectives
! From the Standard Rules
! No specific request
! Definition:
[ R_0
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_1
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_2
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_3
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_4
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_5
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_6
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_7
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_8
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_39
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_40
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_41
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_42
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_43
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_44
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_45
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_46
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_47
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_48
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_49
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_50
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_51
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_52
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_53
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_54
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_55
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_56
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_57
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_58
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_59
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_60
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_61
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_62
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_63
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_64
t_0 ! Call parameter: object
;
return false;
];
! From the Standard Rules
! No specific request
! Definition:
[ R_95
t_0 ! Call parameter: object
;
return false;
];
[ Adj_0_t1_v10
t_0 ! Call parameter: thing
;
! meaning of "worn"
if (t_0 ofclass K2_thing) return ((((player == WearerOf(t_0)))));
rfalse;
];
[ Adj_1_t1_v10
t_0 ! Call parameter: thing
;
! meaning of "carried"
if (t_0 ofclass K2_thing) return ((((player == CarrierOf(t_0)))));
rfalse;
];
[ Adj_2_t1_v10
t_0 ! Call parameter: thing
;
! meaning of "held"
if (t_0 ofclass K2_thing) return ((((player == HolderOf(t_0)))));
rfalse;
];
[ Adj_3_t1_v10
t_0 ! Call parameter: thing
;
! meaning of "visible"
if (t_0 ofclass K2_thing) return ((((TestVisibility(player,t_0)))));
rfalse;
];
[ Adj_4_t1_v10
t_0 ! Call parameter: thing
;
! meaning of "invisible"
if (t_0 ofclass K2_thing) return (~~(((((TestVisibility(player,t_0)))))));
rfalse;
];
[ Adj_5_t1_v10
t_0 ! Call parameter: thing
;
! meaning of "touchable"
if (t_0 ofclass K2_thing) return ((((TestTouchability(player,t_0)))));
rfalse;
];
[ Adj_6_t1_v10
t_0 ! Call parameter: thing
;
! meaning of "untouchable"
if (t_0 ofclass K2_thing) return (~~(((((TestTouchability(player,t_0)))))));
rfalse;
];
[ Adj_7_t1_v10
t_0 ! Call parameter: thing
;
! meaning of "concealed"
if (t_0 ofclass K2_thing) return ((((TestConcealment((HolderOf(t_0)),t_0)))));
rfalse;
];
[ Adj_8_t1_v10
t_0 ! Call parameter: thing
;
! meaning of "unconcealed"
if (t_0 ofclass K2_thing) return (~~(((((TestConcealment((HolderOf(t_0)),t_0)))))));
rfalse;
];
[ Adj_9_t1_v10
t_0 ! Call parameter: number
;
! meaning of "on-stage"
if (t_0 ofclass K2_thing) return ((OnStage(t_0, -1)));
rfalse;
];
[ Adj_10_t1_v10
t_0 ! Call parameter: number
;
! meaning of "off-stage"
if (t_0 ofclass K2_thing) return (~~(((OnStage(t_0, -1)))));
rfalse;
];
[ Adj_11_t1_v10
t_0 ! Call parameter: thing
;
! meaning of "offstage"
if (t_0 ofclass K2_thing) return (((((~~Adj_9_t1_v10(t_0))))));
rfalse;
];
[ Adj_12_t1_v10
t_0 ! Call parameter: room
;
! meaning of "adjacent"
if (t_0 ofclass K1_room) return ((((TestAdjacency(real_location,t_0)))));
rfalse;
];
[ Adj_13_t1_v11
t_0 ! Call parameter: number
;
! meaning of "even"
return (((((IntegerRemainder(t_0, 2)) == 0))));
rfalse;
];
[ Adj_14_t1_v11
t_0 ! Call parameter: number
;
! meaning of "odd"
return (~~((((((IntegerRemainder(t_0, 2)) == 0))))));
rfalse;
];
[ Adj_15_t1_v11
t_0 ! Call parameter: number
;
! meaning of "positive"
return ((((t_0 > 0))));
rfalse;
];
[ Adj_15_t1_v12
t_0 ! Call parameter: real number
;
! meaning of "positive"
return ((((REAL_NUMBER_TY_Compare(t_0, NUMBER_TY_to_REAL_NUMBER_TY(0)) > 0))));
rfalse;
];
[ Adj_16_t1_v11
t_0 ! Call parameter: number
;
! meaning of "negative"
return ((((t_0 < 0))));
rfalse;
];
[ Adj_16_t1_v12
t_0 ! Call parameter: real number
;
! meaning of "negative"
return ((((REAL_NUMBER_TY_Compare(t_0, NUMBER_TY_to_REAL_NUMBER_TY(0)) < 0))));
rfalse;
];
[ Adj_17_t1_v14
t_0 ! Call parameter: number
;
! meaning of "empty"
return ((TEXT_TY_Empty(t_0)));
rfalse;
];
[ Adj_17_t1_v20
t_0 ! Call parameter: table name
;
! meaning of "empty"
return ((((TableFilledRows(t_0) == 0))));
rfalse;
];
[ Adj_17_t1_v32
t_0 ! Call parameter: number
;
! meaning of "empty"
return ((RulebookEmpty(t_0)));
rfalse;
];
[ Adj_17_t1_v33
t_0 ! Call parameter: number
;
! meaning of "empty"
return ((ActivityEmpty(t_0)));
rfalse;
];
[ Adj_17_t1_v34
t_0 ! Call parameter: number
;
! meaning of "empty"
return ((LIST_OF_TY_Empty(t_0)));
rfalse;
];
[ Adj_17_t1_v30
t_0 ! Call parameter: number
;
! meaning of "empty"
return ((RELATION_TY_Empty(t_0, -1)));
rfalse;
];
[ Adj_18_t1_v14
t_0 ! Call parameter: number
;
! meaning of "non-empty"
return (~~(((TEXT_TY_Empty(t_0)))));
rfalse;
];
[ Adj_18_t1_v20
t_0 ! Call parameter: table name
;
! meaning of "non-empty"
return (~~(((((TableFilledRows(t_0) == 0))))));
rfalse;
];
[ Adj_18_t1_v32
t_0 ! Call parameter: number
;
! meaning of "non-empty"
return (~~(((RulebookEmpty(t_0)))));
rfalse;
];
[ Adj_18_t1_v33
t_0 ! Call parameter: number
;
! meaning of "non-empty"
return (~~(((ActivityEmpty(t_0)))));
rfalse;
];
[ Adj_18_t1_v34
t_0 ! Call parameter: number
;
! meaning of "non-empty"
return (~~(((LIST_OF_TY_Empty(t_0)))));
rfalse;
];
[ Adj_18_t1_v30
t_0 ! Call parameter: number
;
! meaning of "non-empty"
return (~~(((RELATION_TY_Empty(t_0, -1)))));
rfalse;
];
[ Adj_19_t1_v14
t_0 ! Call parameter: number
;
! meaning of "substituted"
return ((TEXT_TY_IsSubstituted(t_0)));
rfalse;
];
[ Adj_20_t1_v14
t_0 ! Call parameter: number
;
! meaning of "unsubstituted"
return (~~(((TEXT_TY_IsSubstituted(t_0)))));
rfalse;
];
[ Adj_21_t1_v43
t_0 ! Call parameter: scene
;
! meaning of "happening"
return ((scene_status-->(t_0-1)==1));
rfalse;
];
[ Adj_22_t1_v20
t_0 ! Call parameter: table name
;
! meaning of "full"
return ((((TableBlankRows(t_0) == 0))));
rfalse;
];
[ Adj_23_t1_v20
t_0 ! Call parameter: table name
;
! meaning of "non-full"
return (~~(((((TableBlankRows(t_0) == 0))))));
rfalse;
];
[ Adj_24_t1_v33
t_0 ! Call parameter: number
;
! meaning of "going on"
return ((TestActivity(t_0)));
rfalse;
];
[ Adj_25_t1_v16
t_0 ! Call parameter: number
;
! meaning of "active"
return ((TestUseOption(t_0)));
rfalse;
];
[ Adj_26_t1_v16
t_0 ! Call parameter: number
;
! meaning of "inactive"
return (~~(((TestUseOption(t_0)))));
rfalse;
];
[ Adj_27_t1_v30
t_0 ! Call parameter: number
;
! meaning of "equivalence"
return ((RELATION_TY_EquivalenceAdjective(t_0, -1)));
rfalse;
];
[ Adj_28_t1_v30
t_0 ! Call parameter: number
;
! meaning of "symmetric"
return ((RELATION_TY_SymmetricAdjective(t_0, -1)));
rfalse;
];
[ Adj_29_t1_v30
t_0 ! Call parameter: number
;
! meaning of "one-to-one"
return ((RELATION_TY_OToOAdjective(t_0, -1)));
rfalse;
];
[ Adj_30_t1_v30
t_0 ! Call parameter: number
;
! meaning of "one-to-various"
return ((RELATION_TY_OToVAdjective(t_0, -1)));
rfalse;
];
[ Adj_31_t1_v30
t_0 ! Call parameter: number
;
! meaning of "various-to-one"
return ((RELATION_TY_VToOAdjective(t_0, -1)));
rfalse;
];
[ Adj_32_t1_v30
t_0 ! Call parameter: number
;
! meaning of "various-to-various"
return ((RELATION_TY_VToVAdjective(t_0, -1)));
rfalse;
];
[ Adj_33_t1_v18
t_0 ! Call parameter: number
;
! meaning of "modal"
return ((VerbIsModal(t_0)));
rfalse;
];
[ Adj_34_t1_v18
t_0 ! Call parameter: number
;
! meaning of "non-modal"
return (~~(((VerbIsModal(t_0)))));
rfalse;
];
[ Adj_35_t1_v18
t_0 ! Call parameter: number
;
! meaning of "meaningful"
return ((VerbIsMeaningful(t_0)));
rfalse;
];
[ Adj_36_t1_v18
t_0 ! Call parameter: number
;
! meaning of "meaningless"
return (~~(((VerbIsMeaningful(t_0)))));
rfalse;
];
[ Adj_37_t1_v12
t_0 ! Call parameter: real number
;
! meaning of "infinite"
return ((((( REAL_NUMBER_TY_Compare(t_0, 2139095040) == 0))) || ((( REAL_NUMBER_TY_Compare(t_0, -8388608) == 0)))));
rfalse;
];
[ Adj_38_t1_v12
t_0 ! Call parameter: real number
;
! meaning of "finite"
return (~~(((((( REAL_NUMBER_TY_Compare(t_0, 2139095040) == 0))) || ((( REAL_NUMBER_TY_Compare(t_0, -8388608) == 0)))))));
rfalse;
];
[ Adj_39_t1_v12
t_0 ! Call parameter: number
;
! meaning of "nonexistent"
return ((REAL_NUMBER_TY_Nan(t_0)));
rfalse;
];
[ Adj_40_t1_v12
t_0 ! Call parameter: number
;
! meaning of "existent"
return (~~(((REAL_NUMBER_TY_Nan(t_0)))));
rfalse;
];
[ Adj_41_t1_v10
t_0 ! Call parameter: thing
;
! meaning of "locale-supportable"
if (t_0 ofclass K2_thing) return (((((~~(((Adj_59_t1_v10(t_0))))))) && ((((~~(((Adj_67_t1_v10(t_0))))))) && (((~~(((Adj_64_t1_v10(t_0))))))))));
rfalse;
];
[ Adj_42_t1_v10
t_0 ! Call parameter: object
;
! meaning of "plural-named"
if (t_0) return (GetEitherOrProperty(t_0, pluralname));
rfalse;
];
[ Adj_43_t1_v10
t_0 ! Call parameter: object
;
! meaning of "singular-named"
if (t_0) return (GetEitherOrProperty(t_0, pluralname) == false);
rfalse;
];
[ Adj_44_t1_v10
t_0 ! Call parameter: object
;
! meaning of "proper-named"
if (t_0) return (GetEitherOrProperty(t_0, proper));
rfalse;
];
[ Adj_45_t1_v10
t_0 ! Call parameter: object
;
! meaning of "improper-named"
if (t_0) return (GetEitherOrProperty(t_0, proper) == false);
rfalse;
];
[ Adj_46_t1_v10
t_0 ! Call parameter: object
;
! meaning of "ambiguously plural"
if (t_0) return (GetEitherOrProperty(t_0, ambigpluralname));
rfalse;
];
[ Adj_47_t1_v10
t_0 ! Call parameter: object
;
! meaning of "privately-named"
if (t_0) return (GetEitherOrProperty(t_0, privately_named));
rfalse;
];
[ Adj_48_t1_v10
t_0 ! Call parameter: object
;
! meaning of "publicly-named"
if (t_0) return (GetEitherOrProperty(t_0, privately_named) == false);
rfalse;
];
[ Adj_49_t1_v10
t_0 ! Call parameter: object
;
! meaning of "lighted"
if (t_0) return (GetEitherOrProperty(t_0, light));
rfalse;
];
[ Adj_50_t1_v10
t_0 ! Call parameter: object
;
! meaning of "dark"
if (t_0) return (GetEitherOrProperty(t_0, light) == false);
rfalse;
];
[ Adj_51_t1_v10
t_0 ! Call parameter: object
;
! meaning of "visited"
if (t_0) return (GetEitherOrProperty(t_0, visited));
rfalse;
];
[ Adj_52_t1_v10
t_0 ! Call parameter: object
;
! meaning of "unvisited"
if (t_0) return (GetEitherOrProperty(t_0, visited) == false);
rfalse;
];
[ Adj_53_t1_v10
t_0 ! Call parameter: object
;
! meaning of "lit"
if (t_0) return (GetEitherOrProperty(t_0, light));
rfalse;
];
[ Adj_54_t1_v10
t_0 ! Call parameter: object
;
! meaning of "unlit"
if (t_0) return (GetEitherOrProperty(t_0, light) == false);
rfalse;
];
[ Adj_55_t1_v10
t_0 ! Call parameter: object
;
! meaning of "edible"
if (t_0) return (GetEitherOrProperty(t_0, edible));
rfalse;
];
[ Adj_56_t1_v10
t_0 ! Call parameter: object
;
! meaning of "inedible"
if (t_0) return (GetEitherOrProperty(t_0, edible) == false);
rfalse;
];
[ Adj_57_t1_v10
t_0 ! Call parameter: object
;
! meaning of "fixed in place"
if (t_0) return (GetEitherOrProperty(t_0, static));
rfalse;
];
[ Adj_58_t1_v10
t_0 ! Call parameter: object
;
! meaning of "portable"
if (t_0) return (GetEitherOrProperty(t_0, static) == false);
rfalse;
];
[ Adj_59_t1_v10
t_0 ! Call parameter: object
;
! meaning of "scenery"
if (t_0) return (GetEitherOrProperty(t_0, scenery));
rfalse;
];
[ Adj_60_t1_v10
t_0 ! Call parameter: object
;
! meaning of "wearable"
if (t_0) return (GetEitherOrProperty(t_0, clothing));
rfalse;
];
[ Adj_61_t1_v10
t_0 ! Call parameter: object
;
! meaning of "pushable between rooms"
if (t_0) return (GetEitherOrProperty(t_0, pushable));
rfalse;
];
[ Adj_62_t1_v10
t_0 ! Call parameter: object
;
! meaning of "handled"
if (t_0) return (GetEitherOrProperty(t_0, moved));
rfalse;
];
[ Adj_63_t1_v10
t_0 ! Call parameter: object
;
! meaning of "described"
if (t_0) return (GetEitherOrProperty(t_0, concealed) == false);
rfalse;
];
[ Adj_64_t1_v10
t_0 ! Call parameter: object
;
! meaning of "undescribed"
if (t_0) return (GetEitherOrProperty(t_0, concealed));
rfalse;
];
[ Adj_65_t1_v10
t_0 ! Call parameter: object
;
! meaning of "marked for listing"
if (t_0) return (GetEitherOrProperty(t_0, workflag));
rfalse;
];
[ Adj_66_t1_v10
t_0 ! Call parameter: object
;
! meaning of "unmarked for listing"
if (t_0) return (GetEitherOrProperty(t_0, workflag) == false);
rfalse;
];
[ Adj_67_t1_v10
t_0 ! Call parameter: object
;
! meaning of "mentioned"
if (t_0) return (GetEitherOrProperty(t_0, mentioned));
rfalse;
];
[ Adj_68_t1_v10
t_0 ! Call parameter: object
;
! meaning of "unmentioned"
if (t_0) return (GetEitherOrProperty(t_0, mentioned) == false);
rfalse;
];
[ Adj_69_t1_v10
t_0 ! Call parameter: object
;
! meaning of "enterable"
if (t_0) return (GetEitherOrProperty(t_0, enterable));
rfalse;
];
[ Adj_70_t1_v10
t_0 ! Call parameter: object
;
! meaning of "opaque"
if (t_0) return (GetEitherOrProperty(t_0, transparent) == false);
rfalse;
];
[ Adj_71_t1_v10
t_0 ! Call parameter: object
;
! meaning of "transparent"
if (t_0) return (GetEitherOrProperty(t_0, transparent));
rfalse;
];
[ Adj_72_t1_v10
t_0 ! Call parameter: object
;
! meaning of "open"
if (t_0) return (GetEitherOrProperty(t_0, open));
rfalse;
];
[ Adj_73_t1_v10
t_0 ! Call parameter: object
;
! meaning of "closed"
if (t_0) return (GetEitherOrProperty(t_0, open) == false);
rfalse;
];
[ Adj_74_t1_v10
t_0 ! Call parameter: object
;
! meaning of "openable"
if (t_0) return (GetEitherOrProperty(t_0, openable));
rfalse;
];
[ Adj_75_t1_v10
t_0 ! Call parameter: object
;
! meaning of "unopenable"
if (t_0) return (GetEitherOrProperty(t_0, openable) == false);
rfalse;
];
[ Adj_76_t1_v10
t_0 ! Call parameter: object
;
! meaning of "lockable"
if (t_0) return (GetEitherOrProperty(t_0, lockable));
rfalse;
];
[ Adj_77_t1_v10
t_0 ! Call parameter: object
;
! meaning of "locked"
if (t_0) return (GetEitherOrProperty(t_0, locked));
rfalse;
];
[ Adj_78_t1_v10
t_0 ! Call parameter: object
;
! meaning of "unlocked"
if (t_0) return (GetEitherOrProperty(t_0, locked) == false);
rfalse;
];
[ Adj_79_t1_v10
t_0 ! Call parameter: object
;
! meaning of "female"
if (t_0) return (GetEitherOrProperty(t_0, female));
rfalse;
];
[ Adj_80_t1_v10
t_0 ! Call parameter: object
;
! meaning of "male"
if (t_0) return (GetEitherOrProperty(t_0, female) == false);
rfalse;
];
[ Adj_81_t1_v10
t_0 ! Call parameter: object
;
! meaning of "neuter"
if (t_0) return (GetEitherOrProperty(t_0, neuter));
rfalse;
];
[ Adj_82_t1_v10
t_0 ! Call parameter: object
;
! meaning of "switched on"
if (t_0) return (GetEitherOrProperty(t_0, on));
rfalse;
];
[ Adj_83_t1_v10
t_0 ! Call parameter: object
;
! meaning of "switched off"
if (t_0) return (GetEitherOrProperty(t_0, on) == false);
rfalse;
];
[ Adj_84_t1_v43
t_0 ! Call parameter: scene
;
! meaning of "recurring"
return (GProperty(SCENE_TY, t_0, p57_recurring));
rfalse;
];
[ Adj_85_t1_v43
t_0 ! Call parameter: scene
;
! meaning of "non-recurring"
return (GProperty(SCENE_TY, t_0, p57_recurring) == false);
rfalse;
];
[ Adj_86_t1_v10
t_0 ! Call parameter: object
;
! meaning of "<nameless>"
if (t_0) return (GetEitherOrProperty(t_0, absent));
rfalse;
];
[ Adj_87_t1_v10
t_0 ! Call parameter: object
;
! meaning of "<nameless>"
if (t_0) return (GetEitherOrProperty(t_0, mark_as_room));
rfalse;
];
[ Adj_88_t1_v10
t_0 ! Call parameter: object
;
! meaning of "<nameless>"
if (t_0) return (GetEitherOrProperty(t_0, mark_as_thing));
rfalse;
];
[ Adj_9_t2_v10
t_0 ! Call parameter: number
;
! meaning of "on-stage"
if (t_0 ofclass K2_thing) return ((OnStage(t_0, true)));
rfalse;
];
[ Adj_10_t2_v10
t_0 ! Call parameter: number
;
! meaning of "off-stage"
if (t_0 ofclass K2_thing) return ((OnStage(t_0, false)));
rfalse;
];
[ Adj_17_t2_v30
t_0 ! Call parameter: number
;
! meaning of "empty"
return ((RELATION_TY_Empty(t_0, true)));
rfalse;
];
[ Adj_18_t2_v30
t_0 ! Call parameter: number
;
! meaning of "non-empty"
return ((RELATION_TY_Empty(t_0, false)));
rfalse;
];
[ Adj_27_t2_v30
t_0 ! Call parameter: number
;
! meaning of "equivalence"
return ((RELATION_TY_EquivalenceAdjective(t_0, true)));
rfalse;
];
[ Adj_28_t2_v30
t_0 ! Call parameter: number
;
! meaning of "symmetric"
return ((RELATION_TY_SymmetricAdjective(t_0, true)));
rfalse;
];
[ Adj_29_t2_v30
t_0 ! Call parameter: number
;
! meaning of "one-to-one"
return ((RELATION_TY_OToOAdjective(t_0, true)));
rfalse;
];
[ Adj_30_t2_v30
t_0 ! Call parameter: number
;
! meaning of "one-to-various"
return ((RELATION_TY_OToVAdjective(t_0, true)));
rfalse;
];
[ Adj_31_t2_v30
t_0 ! Call parameter: number
;
! meaning of "various-to-one"
return ((RELATION_TY_VToOAdjective(t_0, true)));
rfalse;
];
[ Adj_32_t2_v30
t_0 ! Call parameter: number
;
! meaning of "various-to-various"
return ((RELATION_TY_VToVAdjective(t_0, true)));
rfalse;
];
[ Adj_42_t2_v10
t_0 ! Call parameter: object
;
! meaning of "plural-named"
if (t_0) return (SetEitherOrProperty(t_0, pluralname));
rfalse;
];
[ Adj_43_t2_v10
t_0 ! Call parameter: object
;
! meaning of "singular-named"
if (t_0) return (SetEitherOrProperty(t_0, pluralname, true));
rfalse;
];
[ Adj_44_t2_v10
t_0 ! Call parameter: object
;
! meaning of "proper-named"
if (t_0) return (SetEitherOrProperty(t_0, proper));
rfalse;
];
[ Adj_45_t2_v10
t_0 ! Call parameter: object
;
! meaning of "improper-named"
if (t_0) return (SetEitherOrProperty(t_0, proper, true));
rfalse;
];
[ Adj_46_t2_v10
t_0 ! Call parameter: object
;
! meaning of "ambiguously plural"
if (t_0) return (SetEitherOrProperty(t_0, ambigpluralname));
rfalse;
];
[ Adj_47_t2_v10
t_0 ! Call parameter: object
;
! meaning of "privately-named"
if (t_0) return (SetEitherOrProperty(t_0, privately_named));
rfalse;
];
[ Adj_48_t2_v10
t_0 ! Call parameter: object
;
! meaning of "publicly-named"
if (t_0) return (SetEitherOrProperty(t_0, privately_named, true));
rfalse;
];
[ Adj_49_t2_v10
t_0 ! Call parameter: object
;
! meaning of "lighted"
if (t_0) return (SetEitherOrProperty(t_0, light));
rfalse;
];
[ Adj_50_t2_v10
t_0 ! Call parameter: object
;
! meaning of "dark"
if (t_0) return (SetEitherOrProperty(t_0, light, true));
rfalse;
];
[ Adj_51_t2_v10
t_0 ! Call parameter: object
;
! meaning of "visited"
if (t_0) return (SetEitherOrProperty(t_0, visited));
rfalse;
];
[ Adj_52_t2_v10
t_0 ! Call parameter: object
;
! meaning of "unvisited"
if (t_0) return (SetEitherOrProperty(t_0, visited, true));
rfalse;
];
[ Adj_53_t2_v10
t_0 ! Call parameter: object
;
! meaning of "lit"
if (t_0) return (SetEitherOrProperty(t_0, light));
rfalse;
];
[ Adj_54_t2_v10
t_0 ! Call parameter: object
;
! meaning of "unlit"
if (t_0) return (SetEitherOrProperty(t_0, light, true));
rfalse;
];
[ Adj_55_t2_v10
t_0 ! Call parameter: object
;
! meaning of "edible"
if (t_0) return (SetEitherOrProperty(t_0, edible));
rfalse;
];
[ Adj_56_t2_v10
t_0 ! Call parameter: object
;
! meaning of "inedible"
if (t_0) return (SetEitherOrProperty(t_0, edible, true));
rfalse;
];
[ Adj_57_t2_v10
t_0 ! Call parameter: object
;
! meaning of "fixed in place"
if (t_0) return (SetEitherOrProperty(t_0, static));
rfalse;
];
[ Adj_58_t2_v10
t_0 ! Call parameter: object
;
! meaning of "portable"
if (t_0) return (SetEitherOrProperty(t_0, static, true));
rfalse;
];
[ Adj_59_t2_v10
t_0 ! Call parameter: object
;
! meaning of "scenery"
if (t_0) return (SetEitherOrProperty(t_0, scenery));
rfalse;
];
[ Adj_60_t2_v10
t_0 ! Call parameter: object
;
! meaning of "wearable"
if (t_0) return (SetEitherOrProperty(t_0, clothing));
rfalse;
];
[ Adj_61_t2_v10
t_0 ! Call parameter: object
;
! meaning of "pushable between rooms"
if (t_0) return (SetEitherOrProperty(t_0, pushable));
rfalse;
];
[ Adj_62_t2_v10
t_0 ! Call parameter: object
;
! meaning of "handled"
if (t_0) return (SetEitherOrProperty(t_0, moved));
rfalse;
];
[ Adj_63_t2_v10
t_0 ! Call parameter: object
;
! meaning of "described"
if (t_0) return (SetEitherOrProperty(t_0, concealed, true));
rfalse;
];
[ Adj_64_t2_v10
t_0 ! Call parameter: object
;
! meaning of "undescribed"
if (t_0) return (SetEitherOrProperty(t_0, concealed));
rfalse;
];
[ Adj_65_t2_v10
t_0 ! Call parameter: object
;
! meaning of "marked for listing"
if (t_0) return (SetEitherOrProperty(t_0, workflag));
rfalse;
];
[ Adj_66_t2_v10
t_0 ! Call parameter: object
;
! meaning of "unmarked for listing"
if (t_0) return (SetEitherOrProperty(t_0, workflag, true));
rfalse;
];
[ Adj_67_t2_v10
t_0 ! Call parameter: object
;
! meaning of "mentioned"
if (t_0) return (SetEitherOrProperty(t_0, mentioned));
rfalse;
];
[ Adj_68_t2_v10
t_0 ! Call parameter: object
;
! meaning of "unmentioned"
if (t_0) return (SetEitherOrProperty(t_0, mentioned, true));
rfalse;
];
[ Adj_69_t2_v10
t_0 ! Call parameter: object
;
! meaning of "enterable"
if (t_0) return (SetEitherOrProperty(t_0, enterable));
rfalse;
];
[ Adj_70_t2_v10
t_0 ! Call parameter: object
;
! meaning of "opaque"
if (t_0) return (SetEitherOrProperty(t_0, transparent, true));
rfalse;
];
[ Adj_71_t2_v10
t_0 ! Call parameter: object
;
! meaning of "transparent"
if (t_0) return (SetEitherOrProperty(t_0, transparent));
rfalse;
];
[ Adj_72_t2_v10
t_0 ! Call parameter: object
;
! meaning of "open"
if (t_0) return (SetEitherOrProperty(t_0, open));
rfalse;
];
[ Adj_73_t2_v10
t_0 ! Call parameter: object
;
! meaning of "closed"
if (t_0) return (SetEitherOrProperty(t_0, open, true));
rfalse;
];
[ Adj_74_t2_v10
t_0 ! Call parameter: object
;
! meaning of "openable"
if (t_0) return (SetEitherOrProperty(t_0, openable));
rfalse;
];
[ Adj_75_t2_v10
t_0 ! Call parameter: object
;
! meaning of "unopenable"
if (t_0) return (SetEitherOrProperty(t_0, openable, true));
rfalse;
];
[ Adj_76_t2_v10
t_0 ! Call parameter: object
;
! meaning of "lockable"
if (t_0) return (SetEitherOrProperty(t_0, lockable));
rfalse;
];
[ Adj_77_t2_v10
t_0 ! Call parameter: object
;
! meaning of "locked"
if (t_0) return (SetEitherOrProperty(t_0, locked));
rfalse;
];
[ Adj_78_t2_v10
t_0 ! Call parameter: object
;
! meaning of "unlocked"
if (t_0) return (SetEitherOrProperty(t_0, locked, true));
rfalse;
];
[ Adj_79_t2_v10
t_0 ! Call parameter: object
;
! meaning of "female"
if (t_0) return (SetEitherOrProperty(t_0, female));
rfalse;
];
[ Adj_80_t2_v10
t_0 ! Call parameter: object
;
! meaning of "male"
if (t_0) return (SetEitherOrProperty(t_0, female, true));
rfalse;
];
[ Adj_81_t2_v10
t_0 ! Call parameter: object
;
! meaning of "neuter"
if (t_0) return (SetEitherOrProperty(t_0, neuter));
rfalse;
];
[ Adj_82_t2_v10
t_0 ! Call parameter: object
;
! meaning of "switched on"
if (t_0) return (SetEitherOrProperty(t_0, on));
rfalse;
];
[ Adj_83_t2_v10
t_0 ! Call parameter: object
;
! meaning of "switched off"
if (t_0) return (SetEitherOrProperty(t_0, on, true));
rfalse;
];
[ Adj_84_t2_v43
t_0 ! Call parameter: scene
;
! meaning of "recurring"
return (WriteGProperty(SCENE_TY, t_0, p57_recurring, true));
rfalse;
];
[ Adj_85_t2_v43
t_0 ! Call parameter: scene
;
! meaning of "non-recurring"
return (WriteGProperty(SCENE_TY, t_0, p57_recurring));
rfalse;
];
[ Adj_86_t2_v10
t_0 ! Call parameter: object
;
! meaning of "<nameless>"
if (t_0) return (SetEitherOrProperty(t_0, absent));
rfalse;
];
[ Adj_87_t2_v10
t_0 ! Call parameter: object
;
! meaning of "<nameless>"
if (t_0) return (SetEitherOrProperty(t_0, mark_as_room));
rfalse;
];
[ Adj_88_t2_v10
t_0 ! Call parameter: object
;
! meaning of "<nameless>"
if (t_0) return (SetEitherOrProperty(t_0, mark_as_thing));
rfalse;
];
[ Adj_9_t3_v10
t_0 ! Call parameter: number
;
! meaning of "on-stage"
if (t_0 ofclass K2_thing) return ((OnStage(t_0, false)));
rfalse;
];
[ Adj_10_t3_v10
t_0 ! Call parameter: number
;
! meaning of "off-stage"
if (t_0 ofclass K2_thing) return ((OnStage(t_0, true)));
rfalse;
];
[ Adj_17_t3_v30
t_0 ! Call parameter: number
;
! meaning of "empty"
return ((RELATION_TY_Empty(t_0, false)));
rfalse;
];
[ Adj_18_t3_v30
t_0 ! Call parameter: number
;
! meaning of "non-empty"
return ((RELATION_TY_Empty(t_0, true)));
rfalse;
];
[ Adj_27_t3_v30
t_0 ! Call parameter: number
;
! meaning of "equivalence"
return ((RELATION_TY_EquivalenceAdjective(t_0, false)));
rfalse;
];
[ Adj_28_t3_v30
t_0 ! Call parameter: number
;
! meaning of "symmetric"
return ((RELATION_TY_SymmetricAdjective(t_0, false)));
rfalse;
];
[ Adj_29_t3_v30
t_0 ! Call parameter: number
;
! meaning of "one-to-one"
return ((RELATION_TY_OToOAdjective(t_0, false)));
rfalse;
];
[ Adj_30_t3_v30
t_0 ! Call parameter: number
;
! meaning of "one-to-various"
return ((RELATION_TY_OToVAdjective(t_0, false)));
rfalse;
];
[ Adj_31_t3_v30
t_0 ! Call parameter: number
;
! meaning of "various-to-one"
return ((RELATION_TY_VToOAdjective(t_0, false)));
rfalse;
];
[ Adj_32_t3_v30
t_0 ! Call parameter: number
;
! meaning of "various-to-various"
return ((RELATION_TY_VToVAdjective(t_0, false)));
rfalse;
];
[ Adj_42_t3_v10
t_0 ! Call parameter: object
;
! meaning of "plural-named"
if (t_0) return (SetEitherOrProperty(t_0, pluralname, true));
rfalse;
];
[ Adj_43_t3_v10
t_0 ! Call parameter: object
;
! meaning of "singular-named"
if (t_0) return (SetEitherOrProperty(t_0, pluralname));
rfalse;
];
[ Adj_44_t3_v10
t_0 ! Call parameter: object
;
! meaning of "proper-named"
if (t_0) return (SetEitherOrProperty(t_0, proper, true));
rfalse;
];
[ Adj_45_t3_v10
t_0 ! Call parameter: object
;
! meaning of "improper-named"
if (t_0) return (SetEitherOrProperty(t_0, proper));
rfalse;
];
[ Adj_46_t3_v10
t_0 ! Call parameter: object
;
! meaning of "ambiguously plural"
if (t_0) return (SetEitherOrProperty(t_0, ambigpluralname, true));
rfalse;
];
[ Adj_47_t3_v10
t_0 ! Call parameter: object
;
! meaning of "privately-named"
if (t_0) return (SetEitherOrProperty(t_0, privately_named, true));
rfalse;
];
[ Adj_48_t3_v10
t_0 ! Call parameter: object
;
! meaning of "publicly-named"
if (t_0) return (SetEitherOrProperty(t_0, privately_named));
rfalse;
];
[ Adj_49_t3_v10
t_0 ! Call parameter: object
;
! meaning of "lighted"
if (t_0) return (SetEitherOrProperty(t_0, light, true));
rfalse;
];
[ Adj_50_t3_v10
t_0 ! Call parameter: object
;
! meaning of "dark"
if (t_0) return (SetEitherOrProperty(t_0, light));
rfalse;
];
[ Adj_51_t3_v10
t_0 ! Call parameter: object
;
! meaning of "visited"
if (t_0) return (SetEitherOrProperty(t_0, visited, true));
rfalse;
];
[ Adj_52_t3_v10
t_0 ! Call parameter: object
;
! meaning of "unvisited"
if (t_0) return (SetEitherOrProperty(t_0, visited));
rfalse;
];
[ Adj_53_t3_v10
t_0 ! Call parameter: object
;
! meaning of "lit"
if (t_0) return (SetEitherOrProperty(t_0, light, true));
rfalse;
];
[ Adj_54_t3_v10
t_0 ! Call parameter: object
;
! meaning of "unlit"
if (t_0) return (SetEitherOrProperty(t_0, light));
rfalse;
];
[ Adj_55_t3_v10
t_0 ! Call parameter: object
;
! meaning of "edible"
if (t_0) return (SetEitherOrProperty(t_0, edible, true));
rfalse;
];
[ Adj_56_t3_v10
t_0 ! Call parameter: object
;
! meaning of "inedible"
if (t_0) return (SetEitherOrProperty(t_0, edible));
rfalse;
];
[ Adj_57_t3_v10
t_0 ! Call parameter: object
;
! meaning of "fixed in place"
if (t_0) return (SetEitherOrProperty(t_0, static, true));
rfalse;
];
[ Adj_58_t3_v10
t_0 ! Call parameter: object
;
! meaning of "portable"
if (t_0) return (SetEitherOrProperty(t_0, static));
rfalse;
];
[ Adj_59_t3_v10
t_0 ! Call parameter: object
;
! meaning of "scenery"
if (t_0) return (SetEitherOrProperty(t_0, scenery, true));
rfalse;
];
[ Adj_60_t3_v10
t_0 ! Call parameter: object
;
! meaning of "wearable"
if (t_0) return (SetEitherOrProperty(t_0, clothing, true));
rfalse;
];
[ Adj_61_t3_v10
t_0 ! Call parameter: object
;
! meaning of "pushable between rooms"
if (t_0) return (SetEitherOrProperty(t_0, pushable, true));
rfalse;
];
[ Adj_62_t3_v10
t_0 ! Call parameter: object
;
! meaning of "handled"
if (t_0) return (SetEitherOrProperty(t_0, moved, true));
rfalse;
];
[ Adj_63_t3_v10
t_0 ! Call parameter: object
;
! meaning of "described"
if (t_0) return (SetEitherOrProperty(t_0, concealed));
rfalse;
];
[ Adj_64_t3_v10
t_0 ! Call parameter: object
;
! meaning of "undescribed"
if (t_0) return (SetEitherOrProperty(t_0, concealed, true));
rfalse;
];
[ Adj_65_t3_v10
t_0 ! Call parameter: object
;
! meaning of "marked for listing"
if (t_0) return (SetEitherOrProperty(t_0, workflag, true));
rfalse;
];
[ Adj_66_t3_v10
t_0 ! Call parameter: object
;
! meaning of "unmarked for listing"
if (t_0) return (SetEitherOrProperty(t_0, workflag));
rfalse;
];
[ Adj_67_t3_v10
t_0 ! Call parameter: object
;
! meaning of "mentioned"
if (t_0) return (SetEitherOrProperty(t_0, mentioned, true));
rfalse;
];
[ Adj_68_t3_v10
t_0 ! Call parameter: object
;
! meaning of "unmentioned"
if (t_0) return (SetEitherOrProperty(t_0, mentioned));
rfalse;
];
[ Adj_69_t3_v10
t_0 ! Call parameter: object
;
! meaning of "enterable"
if (t_0) return (SetEitherOrProperty(t_0, enterable, true));
rfalse;
];
[ Adj_70_t3_v10
t_0 ! Call parameter: object
;
! meaning of "opaque"
if (t_0) return (SetEitherOrProperty(t_0, transparent));
rfalse;
];
[ Adj_71_t3_v10
t_0 ! Call parameter: object
;
! meaning of "transparent"
if (t_0) return (SetEitherOrProperty(t_0, transparent, true));
rfalse;
];
[ Adj_72_t3_v10
t_0 ! Call parameter: object
;
! meaning of "open"
if (t_0) return (SetEitherOrProperty(t_0, open, true));
rfalse;
];
[ Adj_73_t3_v10
t_0 ! Call parameter: object
;
! meaning of "closed"
if (t_0) return (SetEitherOrProperty(t_0, open));
rfalse;
];
[ Adj_74_t3_v10
t_0 ! Call parameter: object
;
! meaning of "openable"
if (t_0) return (SetEitherOrProperty(t_0, openable, true));
rfalse;
];
[ Adj_75_t3_v10
t_0 ! Call parameter: object
;
! meaning of "unopenable"
if (t_0) return (SetEitherOrProperty(t_0, openable));
rfalse;
];
[ Adj_76_t3_v10
t_0 ! Call parameter: object
;
! meaning of "lockable"
if (t_0) return (SetEitherOrProperty(t_0, lockable, true));
rfalse;
];
[ Adj_77_t3_v10
t_0 ! Call parameter: object
;
! meaning of "locked"
if (t_0) return (SetEitherOrProperty(t_0, locked, true));
rfalse;
];
[ Adj_78_t3_v10
t_0 ! Call parameter: object
;
! meaning of "unlocked"
if (t_0) return (SetEitherOrProperty(t_0, locked));
rfalse;
];
[ Adj_79_t3_v10
t_0 ! Call parameter: object
;
! meaning of "female"
if (t_0) return (SetEitherOrProperty(t_0, female, true));
rfalse;
];
[ Adj_80_t3_v10
t_0 ! Call parameter: object
;
! meaning of "male"
if (t_0) return (SetEitherOrProperty(t_0, female));
rfalse;
];
[ Adj_81_t3_v10
t_0 ! Call parameter: object
;
! meaning of "neuter"
if (t_0) return (SetEitherOrProperty(t_0, neuter, true));
rfalse;
];
[ Adj_82_t3_v10
t_0 ! Call parameter: object
;
! meaning of "switched on"
if (t_0) return (SetEitherOrProperty(t_0, on, true));
rfalse;
];
[ Adj_83_t3_v10
t_0 ! Call parameter: object
;
! meaning of "switched off"
if (t_0) return (SetEitherOrProperty(t_0, on));
rfalse;
];
[ Adj_84_t3_v43
t_0 ! Call parameter: scene
;
! meaning of "recurring"
return (WriteGProperty(SCENE_TY, t_0, p57_recurring));
rfalse;
];
[ Adj_85_t3_v43
t_0 ! Call parameter: scene
;
! meaning of "non-recurring"
return (WriteGProperty(SCENE_TY, t_0, p57_recurring, true));
rfalse;
];
[ Adj_86_t3_v10
t_0 ! Call parameter: object
;
! meaning of "<nameless>"
if (t_0) return (SetEitherOrProperty(t_0, absent, true));
rfalse;
];
[ Adj_87_t3_v10
t_0 ! Call parameter: object
;
! meaning of "<nameless>"
if (t_0) return (SetEitherOrProperty(t_0, mark_as_room, true));
rfalse;
];
[ Adj_88_t3_v10
t_0 ! Call parameter: object
;
! meaning of "<nameless>"
if (t_0) return (SetEitherOrProperty(t_0, mark_as_thing, true));
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Output.i6t: Timed Events
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Array TimedEventsTable table 0 0;
Array TimedEventTimesTable table 0 0;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Output.i6t: Rulebooks
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Array rulebooks_array --> B0_startup B1_turn_sequence B2_shutdown B3_scene_changing B4_when_play_begins B5_when_play_ends B6_when_scene_begins B7_when_scene_ends B8_every_turn B9_action_processing B10_setting_action_variables B11_specific_action_processi B12_player_s_action_awarenes B13_accessibility B14_reaching_inside B15_reaching_outside B16_visibility B17_persuasion B18_unsuccessful_attempt_by B19_before B20_instead B21_check B22_carry_out B23_after B24_report B25_does_the_player_mean B26_multiple_action_processi B27_when_entire_game_begins B28_when_entire_game_ends B29_before_printing_the_name B30_for_printing_the_name B31_after_printing_the_name B32_before_printing_the_plur B33_for_printing_the_plural_ B34_after_printing_the_plura B35_before_printing_a_number B36_for_printing_a_number B37_after_printing_a_number B38_before_printing_room_des B39_for_printing_room_descri B40_after_printing_room_desc B41_before_printing_inventor B42_for_printing_inventory_d B43_after_printing_inventory B44_before_listing_contents B45_for_listing_contents B46_after_listing_contents B47_before_grouping_together B48_for_grouping_together B49_after_grouping_together B50_before_writing_a_paragra B51_for_writing_a_paragraph_ B52_after_writing_a_paragrap B53_before_listing_nondescri B54_for_listing_nondescript_ B55_after_listing_nondescrip B56_before_printing_the_name B57_for_printing_the_name_of B58_after_printing_the_name_ B59_before_printing_the_desc B60_for_printing_the_descrip B61_after_printing_the_descr B62_before_printing_the_anno B63_for_printing_the_announc B64_after_printing_the_annou B65_before_printing_the_anno B66_for_printing_the_announc B67_after_printing_the_annou B68_before_printing_a_refusa B69_for_printing_a_refusal_t B70_after_printing_a_refusal B71_before_constructing_the_ B72_for_constructing_the_sta B73_after_constructing_the_s B74_before_printing_the_bann B75_for_printing_the_banner_ B76_after_printing_the_banne B77_before_reading_a_command B78_for_reading_a_command B79_after_reading_a_command B80_before_deciding_the_scop B81_for_deciding_the_scope B82_after_deciding_the_scope B83_before_deciding_the_conc B84_for_deciding_the_conceal B85_after_deciding_the_conce B86_before_deciding_whether_ B87_for_deciding_whether_all B88_after_deciding_whether_a B89_before_clarifying_the_pa B90_for_clarifying_the_parse B91_after_clarifying_the_par B92_before_asking_which_do_y B93_for_asking_which_do_you_ B94_after_asking_which_do_yo B95_before_printing_a_parser B96_for_printing_a_parser_er B97_after_printing_a_parser_ B98_before_supplying_a_missi B99_for_supplying_a_missing_ B100_after_supplying_a_missi B101_before_supplying_a_miss B102_for_supplying_a_missing B103_after_supplying_a_missi B104_before_implicitly_takin B105_for_implicitly_taking B106_after_implicitly_taking B107_before_starting_the_vir B108_for_starting_the_virtua B109_after_starting_the_virt B110_before_amusing_a_victor B111_for_amusing_a_victoriou B112_after_amusing_a_victori B113_before_printing_the_pla B114_for_printing_the_player B115_after_printing_the_play B116_before_handling_the_fin B117_for_handling_the_final_ B118_after_handling_the_fina B119_before_printing_the_loc B120_for_printing_the_locale B121_after_printing_the_loca B122_before_choosing_notable B123_for_choosing_notable_lo B124_after_choosing_notable_ B125_before_printing_a_local B126_for_printing_a_locale_p B127_after_printing_a_locale B128_before_issuing_the_resp B129_for_issuing_the_respons B130_after_issuing_the_respo B131_check_taking_inventory B132_carry_out_taking_invent B133_report_taking_inventory B134_check_taking B135_carry_out_taking B136_report_taking B137_check_removing_it_from B138_carry_out_removing_it_f B139_report_removing_it_from B140_check_dropping B141_carry_out_dropping B142_report_dropping B143_check_putting_it_on B144_carry_out_putting_it_on B145_report_putting_it_on B146_check_inserting_it_into B147_carry_out_inserting_it_ B148_report_inserting_it_int B149_check_eating B150_carry_out_eating B151_report_eating B152_check_going B153_carry_out_going B154_report_going B155_check_entering B156_carry_out_entering B157_report_entering B158_check_exiting B159_carry_out_exiting B160_report_exiting B161_check_getting_off B162_carry_out_getting_off B163_report_getting_off B164_check_looking B165_carry_out_looking B166_report_looking B167_check_examining B168_carry_out_examining B169_report_examining B170_check_looking_under B171_carry_out_looking_under B172_report_looking_under B173_check_searching B174_carry_out_searching B175_report_searching B176_check_consulting_it_abo B177_carry_out_consulting_it B178_report_consulting_it_ab B179_check_locking_it_with B180_carry_out_locking_it_wi B181_report_locking_it_with B182_check_unlocking_it_with B183_carry_out_unlocking_it_ B184_report_unlocking_it_wit B185_check_switching_on B186_carry_out_switching_on B187_report_switching_on B188_check_switching_off B189_carry_out_switching_off B190_report_switching_off B191_check_opening B192_carry_out_opening B193_report_opening B194_check_closing B195_carry_out_closing B196_report_closing B197_check_wearing B198_carry_out_wearing B199_report_wearing B200_check_taking_off B201_carry_out_taking_off B202_report_taking_off B203_check_giving_it_to B204_carry_out_giving_it_to B205_report_giving_it_to B206_check_showing_it_to B207_carry_out_showing_it_to B208_report_showing_it_to B209_check_waking B210_carry_out_waking B211_report_waking B212_check_throwing_it_at B213_carry_out_throwing_it_a B214_report_throwing_it_at B215_check_attacking B216_carry_out_attacking B217_report_attacking B218_check_kissing B219_carry_out_kissing B220_report_kissing B221_check_answering_it_that B222_carry_out_answering_it_ B223_report_answering_it_tha B224_check_telling_it_about B225_carry_out_telling_it_ab B226_report_telling_it_about B227_check_asking_it_about B228_carry_out_asking_it_abo B229_report_asking_it_about B230_check_asking_it_for B231_carry_out_asking_it_for B232_report_asking_it_for B233_check_waiting B234_carry_out_waiting B235_report_waiting B236_check_touching B237_carry_out_touching B238_report_touching B239_check_waving B240_carry_out_waving B241_report_waving B242_check_pulling B243_carry_out_pulling B244_report_pulling B245_check_pushing B246_carry_out_pushing B247_report_pushing B248_check_turning B249_carry_out_turning B250_report_turning B251_check_pushing_it_to B252_carry_out_pushing_it_to B253_report_pushing_it_to B254_check_squeezing B255_carry_out_squeezing B256_report_squeezing B257_check_saying_yes B258_carry_out_saying_yes B259_report_saying_yes B260_check_saying_no B261_carry_out_saying_no B262_report_saying_no B263_check_burning B264_carry_out_burning B265_report_burning B266_check_waking_up B267_carry_out_waking_up B268_report_waking_up B269_check_thinking B270_carry_out_thinking B271_report_thinking B272_check_smelling B273_carry_out_smelling B274_report_smelling B275_check_listening_to B276_carry_out_listening_to B277_report_listening_to B278_check_tasting B279_carry_out_tasting B280_report_tasting B281_check_cutting B282_carry_out_cutting B283_report_cutting B284_check_jumping B285_carry_out_jumping B286_report_jumping B287_check_tying_it_to B288_carry_out_tying_it_to B289_report_tying_it_to B290_check_drinking B291_carry_out_drinking B292_report_drinking B293_check_saying_sorry B294_carry_out_saying_sorry B295_report_saying_sorry B296_check_swinging B297_carry_out_swinging B298_report_swinging B299_check_rubbing B300_carry_out_rubbing B301_report_rubbing B302_check_setting_it_to B303_carry_out_setting_it_to B304_report_setting_it_to B305_check_waving_hands B306_carry_out_waving_hands B307_report_waving_hands B308_check_buying B309_carry_out_buying B310_report_buying B311_check_climbing B312_carry_out_climbing B313_report_climbing B314_check_sleeping B315_carry_out_sleeping B316_report_sleeping B317_check_quitting_the_game B318_carry_out_quitting_the_ B319_report_quitting_the_gam B320_check_saving_the_game B321_carry_out_saving_the_ga B322_report_saving_the_game B323_check_restoring_the_gam B324_carry_out_restoring_the B325_report_restoring_the_ga B326_check_restarting_the_ga B327_carry_out_restarting_th B328_report_restarting_the_g B329_check_verifying_the_sto B330_carry_out_verifying_the B331_report_verifying_the_st B332_check_switching_the_sto B333_carry_out_switching_the B334_report_switching_the_st B335_check_switching_the_sto B336_carry_out_switching_the B337_report_switching_the_st B338_check_requesting_the_st B339_carry_out_requesting_th B340_report_requesting_the_s B341_check_requesting_the_sc B342_carry_out_requesting_th B343_report_requesting_the_s B344_check_preferring_abbrev B345_carry_out_preferring_ab B346_report_preferring_abbre B347_check_preferring_unabbr B348_carry_out_preferring_un B349_report_preferring_unabb B350_check_preferring_someti B351_carry_out_preferring_so B352_report_preferring_somet B353_check_switching_score_n B354_carry_out_switching_sco B355_report_switching_score_ B356_check_switching_score_n B357_carry_out_switching_sco B358_report_switching_score_ B359_check_requesting_the_pr B360_carry_out_requesting_th B361_report_requesting_the_p 0;
[ EMPTY_RULEBOOK
forbid_breaks ! Implied call parameter
;
rfalse;
];
[ B0_startup
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = INITIALISE_MEMORY_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return INITIALISE_MEMORY_R;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = VIRTUAL_MACHINE_STARTUP_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return VIRTUAL_MACHINE_STARTUP_R;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = SEED_RANDOM_NUMBER_GENERATOR_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return SEED_RANDOM_NUMBER_GENERATOR_R;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = UPDATE_CHRONOLOGICAL_RECORDS_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return UPDATE_CHRONOLOGICAL_RECORDS_R;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_9();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_9;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = POSITION_PLAYER_IN_MODEL_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return POSITION_PLAYER_IN_MODEL_R;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_10();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_10;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_11();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_11;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_12();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_12;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_13();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_13;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_14();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_14;
}
latest_rule_result-->0 = 0;
return 0; ! 11 rule(s)
];
[ B1_turn_sequence
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = PARSE_COMMAND_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return PARSE_COMMAND_R;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_9();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_9;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = GENERATE_ACTION_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return GENERATE_ACTION_R;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_16();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_16;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_15();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_15;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = TIMED_EVENTS_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return TIMED_EVENTS_R;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = ADVANCE_TIME_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return ADVANCE_TIME_R;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = UPDATE_CHRONOLOGICAL_RECORDS_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return UPDATE_CHRONOLOGICAL_RECORDS_R;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_17();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_17;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = ADJUST_LIGHT_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return ADJUST_LIGHT_R;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = NOTE_OBJECT_ACQUISITIONS_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return NOTE_OBJECT_ACQUISITIONS_R;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_18();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_18;
}
latest_rule_result-->0 = 0;
return 0; ! 12 rule(s)
];
[ B2_shutdown
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_19();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_19;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = RESURRECT_PLAYER_IF_ASKED_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return RESURRECT_PLAYER_IF_ASKED_R;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_20();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_20;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = ASK_FINAL_QUESTION_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return ASK_FINAL_QUESTION_R;
}
latest_rule_result-->0 = 0;
return 0; ! 4 rule(s)
];
[ B3_scene_changing
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = DetectSceneChange();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return DetectSceneChange;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B4_when_play_begins
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_819();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_819;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B5_when_play_ends = EMPTY_RULEBOOK;
[ B6_when_scene_begins
forbid_breaks ! Implied call parameter
rv ! return value
p ! rulebook parameter
;
p = parameter_value;
parameter_value = p;
rv = R_65();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_65;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B7_when_scene_ends = EMPTY_RULEBOOK;
Constant B8_every_turn = EMPTY_RULEBOOK;
[ B9_action_processing
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_22();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_22;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_21();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_21;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_23();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_23;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = BASIC_VISIBILITY_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return BASIC_VISIBILITY_R;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = BASIC_ACCESSIBILITY_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return BASIC_ACCESSIBILITY_R;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = CARRYING_REQUIREMENTS_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return CARRYING_REQUIREMENTS_R;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_24();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_24;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = REQUESTED_ACTIONS_REQUIRE_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return REQUESTED_ACTIONS_REQUIRE_R;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = CARRY_OUT_REQUESTED_ACTIONS_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return CARRY_OUT_REQUESTED_ACTIONS_R;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = DESCEND_TO_SPECIFIC_ACTION_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return DESCEND_TO_SPECIFIC_ACTION_R;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_25();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_25;
}
latest_rule_result-->0 = 0;
return 0; ! 11 rule(s)
];
[ B10_setting_action_variables
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
if (action == ##Go) {
rv = R_151();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_151;
}
latest_rule_result-->0 = 0;
} else {
if (say__p) RulebookParBreak(forbid_breaks);
}
if (action == ##Exit) {
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_174();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_174;
}
latest_rule_result-->0 = 0;
} else {
if (say__p) RulebookParBreak(forbid_breaks);
}
if (action == ##Look) {
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_186();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_186;
}
latest_rule_result-->0 = 0;
} else {
if (say__p) RulebookParBreak(forbid_breaks);
}
return 0; ! 3 rule(s)
];
[ B11_specific_action_processi
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = WORK_OUT_DETAILS_OF_SPECIFIC_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return WORK_OUT_DETAILS_OF_SPECIFIC_R;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_26();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_26;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_27();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_27;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_28();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_28;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_29();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_29;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_30();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_30;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_31();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_31;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_32();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_32;
}
latest_rule_result-->0 = 0;
return 0; ! 8 rule(s)
];
[ B12_player_s_action_awarenes
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_33();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_33;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_34();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_34;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_35();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_35;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_36();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_36;
}
latest_rule_result-->0 = 0;
return 0; ! 4 rule(s)
];
[ B13_accessibility
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = ACCESS_THROUGH_BARRIERS_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return ACCESS_THROUGH_BARRIERS_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B14_reaching_inside
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
p ! rulebook parameter
;
original_deadflag = deadflag;
p = parameter_value;
parameter_value = p;
rv = CANT_REACH_INSIDE_ROOMS_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return CANT_REACH_INSIDE_ROOMS_R;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
parameter_value = p;
rv = CANT_REACH_INSIDE_CLOSED_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return CANT_REACH_INSIDE_CLOSED_R;
}
latest_rule_result-->0 = 0;
return 0; ! 2 rule(s)
];
[ B15_reaching_outside
forbid_breaks ! Implied call parameter
rv ! return value
p ! rulebook parameter
;
p = parameter_value;
parameter_value = p;
rv = CANT_REACH_OUTSIDE_CLOSED_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return CANT_REACH_OUTSIDE_CLOSED_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B16_visibility
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_37();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_37;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B17_persuasion = EMPTY_RULEBOOK;
Constant B18_unsuccessful_attempt_by = EMPTY_RULEBOOK;
Constant B19_before = EMPTY_RULEBOOK;
Constant B20_instead = EMPTY_RULEBOOK;
Constant B21_check = EMPTY_RULEBOOK;
Constant B22_carry_out = EMPTY_RULEBOOK;
Constant B23_after = EMPTY_RULEBOOK;
Constant B24_report = EMPTY_RULEBOOK;
[ B25_does_the_player_mean
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
if (action == ##Take) {
rv = R_38();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_38;
}
latest_rule_result-->0 = 0;
} else {
if (say__p) RulebookParBreak(forbid_breaks);
}
if (action == ##Disrobe) {
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_242();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_242;
}
latest_rule_result-->0 = 0;
} else {
if (say__p) RulebookParBreak(forbid_breaks);
}
return 0; ! 2 rule(s)
];
Constant B26_multiple_action_processi = EMPTY_RULEBOOK;
Constant B27_when_entire_game_begins = EMPTY_RULEBOOK;
Constant B28_when_entire_game_ends = EMPTY_RULEBOOK;
[ B29_before_printing_the_name
forbid_breaks ! Implied call parameter
rv ! return value
p ! rulebook parameter
;
p = parameter_value;
parameter_value = p;
rv = R_66();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_66;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B30_for_printing_the_name
forbid_breaks ! Implied call parameter
rv ! return value
p ! rulebook parameter
;
p = parameter_value;
parameter_value = p;
rv = STANDARD_NAME_PRINTING_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return STANDARD_NAME_PRINTING_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B31_after_printing_the_name = EMPTY_RULEBOOK;
Constant B32_before_printing_the_plur = EMPTY_RULEBOOK;
[ B33_for_printing_the_plural_
forbid_breaks ! Implied call parameter
rv ! return value
p ! rulebook parameter
;
p = parameter_value;
parameter_value = p;
rv = R_67();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_67;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B34_after_printing_the_plura = EMPTY_RULEBOOK;
Constant B35_before_printing_a_number = EMPTY_RULEBOOK;
[ B36_for_printing_a_number
forbid_breaks ! Implied call parameter
rv ! return value
p ! rulebook parameter
;
p = parameter_value;
parameter_value = p;
rv = R_68();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_68;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B37_after_printing_a_number = EMPTY_RULEBOOK;
Constant B38_before_printing_room_des = EMPTY_RULEBOOK;
Constant B39_for_printing_room_descri = EMPTY_RULEBOOK;
Constant B40_after_printing_room_desc = EMPTY_RULEBOOK;
Constant B41_before_printing_inventor = EMPTY_RULEBOOK;
Constant B42_for_printing_inventory_d = EMPTY_RULEBOOK;
Constant B43_after_printing_inventory = EMPTY_RULEBOOK;
Constant B44_before_listing_contents = EMPTY_RULEBOOK;
[ B45_for_listing_contents
forbid_breaks ! Implied call parameter
rv ! return value
p ! rulebook parameter
;
p = parameter_value;
parameter_value = p;
rv = STANDARD_CONTENTS_LISTING_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return STANDARD_CONTENTS_LISTING_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B46_after_listing_contents = EMPTY_RULEBOOK;
Constant B47_before_grouping_together = EMPTY_RULEBOOK;
Constant B48_for_grouping_together = EMPTY_RULEBOOK;
Constant B49_after_grouping_together = EMPTY_RULEBOOK;
Constant B50_before_writing_a_paragra = EMPTY_RULEBOOK;
Constant B51_for_writing_a_paragraph_ = EMPTY_RULEBOOK;
Constant B52_after_writing_a_paragrap = EMPTY_RULEBOOK;
Constant B53_before_listing_nondescri = EMPTY_RULEBOOK;
Constant B54_for_listing_nondescript_ = EMPTY_RULEBOOK;
Constant B55_after_listing_nondescrip = EMPTY_RULEBOOK;
Constant B56_before_printing_the_name = EMPTY_RULEBOOK;
Constant B57_for_printing_the_name_of = EMPTY_RULEBOOK;
Constant B58_after_printing_the_name_ = EMPTY_RULEBOOK;
Constant B59_before_printing_the_desc = EMPTY_RULEBOOK;
Constant B60_for_printing_the_descrip = EMPTY_RULEBOOK;
Constant B61_after_printing_the_descr = EMPTY_RULEBOOK;
Constant B62_before_printing_the_anno = EMPTY_RULEBOOK;
Constant B63_for_printing_the_announc = EMPTY_RULEBOOK;
Constant B64_after_printing_the_annou = EMPTY_RULEBOOK;
Constant B65_before_printing_the_anno = EMPTY_RULEBOOK;
[ B66_for_printing_the_announc
forbid_breaks ! Implied call parameter
rv ! return value
p ! rulebook parameter
;
p = parameter_value;
parameter_value = p;
rv = R_69();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_69;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B67_after_printing_the_annou = EMPTY_RULEBOOK;
Constant B68_before_printing_a_refusa = EMPTY_RULEBOOK;
Constant B69_for_printing_a_refusal_t = EMPTY_RULEBOOK;
Constant B70_after_printing_a_refusal = EMPTY_RULEBOOK;
Constant B71_before_constructing_the_ = EMPTY_RULEBOOK;
Constant B72_for_constructing_the_sta = EMPTY_RULEBOOK;
Constant B73_after_constructing_the_s = EMPTY_RULEBOOK;
Constant B74_before_printing_the_bann = EMPTY_RULEBOOK;
Constant B75_for_printing_the_banner_ = EMPTY_RULEBOOK;
Constant B76_after_printing_the_banne = EMPTY_RULEBOOK;
Constant B77_before_reading_a_command = EMPTY_RULEBOOK;
Constant B78_for_reading_a_command = EMPTY_RULEBOOK;
Constant B79_after_reading_a_command = EMPTY_RULEBOOK;
Constant B80_before_deciding_the_scop = EMPTY_RULEBOOK;
Constant B81_for_deciding_the_scope = EMPTY_RULEBOOK;
Constant B82_after_deciding_the_scope = EMPTY_RULEBOOK;
Constant B83_before_deciding_the_conc = EMPTY_RULEBOOK;
Constant B84_for_deciding_the_conceal = EMPTY_RULEBOOK;
Constant B85_after_deciding_the_conce = EMPTY_RULEBOOK;
Constant B86_before_deciding_whether_ = EMPTY_RULEBOOK;
[ B87_for_deciding_whether_all
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
p ! rulebook parameter
;
original_deadflag = deadflag;
p = parameter_value;
parameter_value = p;
rv = R_74();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_74;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
parameter_value = p;
rv = R_70();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_70;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
parameter_value = p;
rv = R_73();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_73;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
parameter_value = p;
rv = R_72();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_72;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
parameter_value = p;
rv = R_71();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_71;
}
latest_rule_result-->0 = 0;
return 0; ! 5 rule(s)
];
Constant B88_after_deciding_whether_a = EMPTY_RULEBOOK;
Constant B89_before_clarifying_the_pa = EMPTY_RULEBOOK;
Constant B90_for_clarifying_the_parse = EMPTY_RULEBOOK;
Constant B91_after_clarifying_the_par = EMPTY_RULEBOOK;
Constant B92_before_asking_which_do_y = EMPTY_RULEBOOK;
Constant B93_for_asking_which_do_you_ = EMPTY_RULEBOOK;
Constant B94_after_asking_which_do_yo = EMPTY_RULEBOOK;
Constant B95_before_printing_a_parser = EMPTY_RULEBOOK;
Constant B96_for_printing_a_parser_er = EMPTY_RULEBOOK;
Constant B97_after_printing_a_parser_ = EMPTY_RULEBOOK;
Constant B98_before_supplying_a_missi = EMPTY_RULEBOOK;
[ B99_for_supplying_a_missing_
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
p ! rulebook parameter
;
original_deadflag = deadflag;
p = parameter_value;
parameter_value = p;
rv = R_75();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_75;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
parameter_value = p;
rv = R_76();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_76;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
parameter_value = p;
rv = R_77();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_77;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
parameter_value = p;
rv = R_162();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_162;
}
latest_rule_result-->0 = 0;
return 0; ! 4 rule(s)
];
Constant B100_after_supplying_a_missi = EMPTY_RULEBOOK;
Constant B101_before_supplying_a_miss = EMPTY_RULEBOOK;
Constant B102_for_supplying_a_missing = EMPTY_RULEBOOK;
Constant B103_after_supplying_a_missi = EMPTY_RULEBOOK;
Constant B104_before_implicitly_takin = EMPTY_RULEBOOK;
[ B105_for_implicitly_taking
forbid_breaks ! Implied call parameter
rv ! return value
p ! rulebook parameter
;
p = parameter_value;
parameter_value = p;
rv = STANDARD_IMPLICIT_TAKING_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return STANDARD_IMPLICIT_TAKING_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B106_after_implicitly_taking = EMPTY_RULEBOOK;
Constant B107_before_starting_the_vir = EMPTY_RULEBOOK;
[ B108_for_starting_the_virtua
forbid_breaks ! Implied call parameter
rv ! return value
p ! rulebook parameter
;
p = parameter_value;
parameter_value = p;
rv = ENABLE_GLULX_ACCEL_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return ENABLE_GLULX_ACCEL_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B109_after_starting_the_virt = EMPTY_RULEBOOK;
Constant B110_before_amusing_a_victor = EMPTY_RULEBOOK;
Constant B111_for_amusing_a_victoriou = EMPTY_RULEBOOK;
Constant B112_after_amusing_a_victori = EMPTY_RULEBOOK;
Constant B113_before_printing_the_pla = EMPTY_RULEBOOK;
[ B114_for_printing_the_player
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
p ! rulebook parameter
;
original_deadflag = deadflag;
p = parameter_value;
parameter_value = p;
rv = PRINT_OBITUARY_HEADLINE_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return PRINT_OBITUARY_HEADLINE_R;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
parameter_value = p;
rv = PRINT_FINAL_SCORE_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return PRINT_FINAL_SCORE_R;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
parameter_value = p;
rv = DISPLAY_FINAL_STATUS_LINE_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return DISPLAY_FINAL_STATUS_LINE_R;
}
latest_rule_result-->0 = 0;
return 0; ! 3 rule(s)
];
Constant B115_after_printing_the_play = EMPTY_RULEBOOK;
[ B116_before_handling_the_fin
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
p ! rulebook parameter
;
original_deadflag = deadflag;
p = parameter_value;
parameter_value = p;
rv = R_79();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_79;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
parameter_value = p;
rv = R_78();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_78;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
parameter_value = p;
rv = READ_FINAL_ANSWER_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return READ_FINAL_ANSWER_R;
}
latest_rule_result-->0 = 0;
return 0; ! 3 rule(s)
];
[ B117_for_handling_the_final_
forbid_breaks ! Implied call parameter
rv ! return value
p ! rulebook parameter
;
p = parameter_value;
parameter_value = p;
rv = R_80();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_80;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B118_after_handling_the_fina = EMPTY_RULEBOOK;
[ B119_before_printing_the_loc
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
p ! rulebook parameter
;
original_deadflag = deadflag;
p = parameter_value;
parameter_value = p;
rv = R_83();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_83;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
parameter_value = p;
rv = R_84();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_84;
}
latest_rule_result-->0 = 0;
return 0; ! 2 rule(s)
];
[ B120_for_printing_the_locale
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
p ! rulebook parameter
;
original_deadflag = deadflag;
p = parameter_value;
parameter_value = p;
rv = R_85();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_85;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
parameter_value = p;
rv = R_86();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_86;
}
latest_rule_result-->0 = 0;
return 0; ! 2 rule(s)
];
Constant B121_after_printing_the_loca = EMPTY_RULEBOOK;
Constant B122_before_choosing_notable = EMPTY_RULEBOOK;
[ B123_for_choosing_notable_lo
forbid_breaks ! Implied call parameter
rv ! return value
p ! rulebook parameter
;
p = parameter_value;
parameter_value = p;
rv = R_87();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_87;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B124_after_choosing_notable_ = EMPTY_RULEBOOK;
Constant B125_before_printing_a_local = EMPTY_RULEBOOK;
[ B126_for_printing_a_locale_p
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
p ! rulebook parameter
;
original_deadflag = deadflag;
p = parameter_value;
parameter_value = p;
rv = R_94();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_94;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
parameter_value = p;
rv = R_88();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_88;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
parameter_value = p;
rv = R_89();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_89;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
parameter_value = p;
rv = R_90();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_90;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
parameter_value = p;
rv = R_91();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_91;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
parameter_value = p;
rv = R_92();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_92;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
parameter_value = p;
rv = R_93();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_93;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
parameter_value = p;
rv = R_96();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_96;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
parameter_value = p;
rv = R_97();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_97;
}
latest_rule_result-->0 = 0;
return 0; ! 9 rule(s)
];
Constant B127_after_printing_a_locale = EMPTY_RULEBOOK;
Constant B128_before_issuing_the_resp = EMPTY_RULEBOOK;
[ B129_for_issuing_the_respons
forbid_breaks ! Implied call parameter
rv ! return value
p ! rulebook parameter
;
p = parameter_value;
parameter_value = p;
rv = STANDARD_RESPONSE_ISSUING_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return STANDARD_RESPONSE_ISSUING_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B130_after_issuing_the_respo = EMPTY_RULEBOOK;
Constant B131_check_taking_inventory = EMPTY_RULEBOOK;
[ B132_carry_out_taking_invent
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_98();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_98;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_99();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_99;
}
latest_rule_result-->0 = 0;
return 0; ! 2 rule(s)
];
[ B133_report_taking_inventory
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_100();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_100;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B134_check_taking
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_101();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_101;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_102();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_102;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_103();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_103;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_104();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_104;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_105();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_105;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_106();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_106;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_107();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_107;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_108();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_108;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_109();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_109;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_110();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_110;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_111();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_111;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_112();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_112;
}
latest_rule_result-->0 = 0;
return 0; ! 12 rule(s)
];
[ B135_carry_out_taking
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_113();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_113;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B136_report_taking
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_114();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_114;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B137_check_removing_it_from
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_103();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_103;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_115();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_115;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_116();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_116;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_117();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_117;
}
latest_rule_result-->0 = 0;
return 0; ! 4 rule(s)
];
Constant B138_carry_out_removing_it_f = EMPTY_RULEBOOK;
Constant B139_report_removing_it_from = EMPTY_RULEBOOK;
[ B140_check_dropping
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_119();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_119;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_118();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_118;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_120();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_120;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_121();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_121;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_122();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_122;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_123();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_123;
}
latest_rule_result-->0 = 0;
return 0; ! 6 rule(s)
];
[ B141_carry_out_dropping
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_124();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_124;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B142_report_dropping
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_125();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_125;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B143_check_putting_it_on
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_126();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_126;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_127();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_127;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_128();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_128;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_129();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_129;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_130();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_130;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_131();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_131;
}
latest_rule_result-->0 = 0;
return 0; ! 6 rule(s)
];
[ B144_carry_out_putting_it_on
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_132();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_132;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B145_report_putting_it_on
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_133();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_133;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_134();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_134;
}
latest_rule_result-->0 = 0;
return 0; ! 2 rule(s)
];
[ B146_check_inserting_it_into
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_135();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_135;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_136();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_136;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_137();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_137;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_138();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_138;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_139();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_139;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_140();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_140;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_141();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_141;
}
latest_rule_result-->0 = 0;
return 0; ! 7 rule(s)
];
[ B147_carry_out_inserting_it_
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_142();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_142;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B148_report_inserting_it_int
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_143();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_143;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_144();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_144;
}
latest_rule_result-->0 = 0;
return 0; ! 2 rule(s)
];
[ B149_check_eating
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_145();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_145;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_146();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_146;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_147();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_147;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_148();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_148;
}
latest_rule_result-->0 = 0;
return 0; ! 4 rule(s)
];
[ B150_carry_out_eating
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_149();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_149;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B151_report_eating
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_150();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_150;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B152_check_going
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_152();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_152;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_153();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_153;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_154();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_154;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_155();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_155;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_156();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_156;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_157();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_157;
}
latest_rule_result-->0 = 0;
return 0; ! 6 rule(s)
];
[ B153_carry_out_going
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_158();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_158;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_159();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_159;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_160();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_160;
}
latest_rule_result-->0 = 0;
return 0; ! 3 rule(s)
];
[ B154_report_going
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_161();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_161;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B155_check_entering
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_163();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_163;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_164();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_164;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_165();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_165;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_166();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_166;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_167();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_167;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_168();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_168;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_169();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_169;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_170();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_170;
}
latest_rule_result-->0 = 0;
return 0; ! 8 rule(s)
];
[ B156_carry_out_entering
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_171();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_171;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B157_report_entering
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_172();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_172;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_173();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_173;
}
latest_rule_result-->0 = 0;
return 0; ! 2 rule(s)
];
[ B158_check_exiting
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_175();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_175;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_176();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_176;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_177();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_177;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_178();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_178;
}
latest_rule_result-->0 = 0;
return 0; ! 4 rule(s)
];
[ B159_carry_out_exiting
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_179();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_179;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B160_report_exiting
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_180();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_180;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_181();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_181;
}
latest_rule_result-->0 = 0;
return 0; ! 2 rule(s)
];
[ B161_check_getting_off
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_182();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_182;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B162_carry_out_getting_off
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_183();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_183;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B163_report_getting_off
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_184();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_184;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_185();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_185;
}
latest_rule_result-->0 = 0;
return 0; ! 2 rule(s)
];
Constant B164_check_looking = EMPTY_RULEBOOK;
[ B165_carry_out_looking
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_187();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_187;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_188();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_188;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_189();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_189;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_190();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_190;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_191();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_191;
}
latest_rule_result-->0 = 0;
return 0; ! 5 rule(s)
];
[ B166_report_looking
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_192();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_192;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B167_check_examining = EMPTY_RULEBOOK;
[ B168_carry_out_examining
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_193();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_193;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_194();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_194;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_195();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_195;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_196();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_196;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_197();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_197;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_198();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_198;
}
latest_rule_result-->0 = 0;
return 0; ! 6 rule(s)
];
[ B169_report_examining
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_199();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_199;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B170_check_looking_under = EMPTY_RULEBOOK;
[ B171_carry_out_looking_under
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_200();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_200;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B172_report_looking_under
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_201();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_201;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B173_check_searching
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_202();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_202;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_203();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_203;
}
latest_rule_result-->0 = 0;
return 0; ! 2 rule(s)
];
Constant B174_carry_out_searching = EMPTY_RULEBOOK;
[ B175_report_searching
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_204();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_204;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_205();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_205;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_206();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_206;
}
latest_rule_result-->0 = 0;
return 0; ! 3 rule(s)
];
Constant B176_check_consulting_it_abo = EMPTY_RULEBOOK;
Constant B177_carry_out_consulting_it = EMPTY_RULEBOOK;
[ B178_report_consulting_it_ab
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_207();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_207;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B179_check_locking_it_with
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_208();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_208;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_209();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_209;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_210();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_210;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_211();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_211;
}
latest_rule_result-->0 = 0;
return 0; ! 4 rule(s)
];
[ B180_carry_out_locking_it_wi
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_212();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_212;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B181_report_locking_it_with
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_213();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_213;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B182_check_unlocking_it_with
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_214();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_214;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_215();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_215;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_216();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_216;
}
latest_rule_result-->0 = 0;
return 0; ! 3 rule(s)
];
[ B183_carry_out_unlocking_it_
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_217();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_217;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B184_report_unlocking_it_wit
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_218();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_218;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B185_check_switching_on
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_219();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_219;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_220();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_220;
}
latest_rule_result-->0 = 0;
return 0; ! 2 rule(s)
];
[ B186_carry_out_switching_on
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_221();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_221;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B187_report_switching_on
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_222();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_222;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B188_check_switching_off
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_223();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_223;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_224();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_224;
}
latest_rule_result-->0 = 0;
return 0; ! 2 rule(s)
];
[ B189_carry_out_switching_off
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_225();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_225;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B190_report_switching_off
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_226();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_226;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B191_check_opening
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_227();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_227;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_228();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_228;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_229();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_229;
}
latest_rule_result-->0 = 0;
return 0; ! 3 rule(s)
];
[ B192_carry_out_opening
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_230();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_230;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B193_report_opening
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_231();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_231;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_232();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_232;
}
latest_rule_result-->0 = 0;
return 0; ! 2 rule(s)
];
[ B194_check_closing
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_233();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_233;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_234();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_234;
}
latest_rule_result-->0 = 0;
return 0; ! 2 rule(s)
];
[ B195_carry_out_closing
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_235();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_235;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B196_report_closing
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_236();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_236;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B197_check_wearing
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_237();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_237;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_238();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_238;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_239();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_239;
}
latest_rule_result-->0 = 0;
return 0; ! 3 rule(s)
];
[ B198_carry_out_wearing
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_240();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_240;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B199_report_wearing
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_241();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_241;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B200_check_taking_off
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_243();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_243;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_244();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_244;
}
latest_rule_result-->0 = 0;
return 0; ! 2 rule(s)
];
[ B201_carry_out_taking_off
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_245();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_245;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B202_report_taking_off
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_246();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_246;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B203_check_giving_it_to
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_247();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_247;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_248();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_248;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_249();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_249;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_250();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_250;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_251();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_251;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_252();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_252;
}
latest_rule_result-->0 = 0;
return 0; ! 6 rule(s)
];
[ B204_carry_out_giving_it_to
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_253();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_253;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B205_report_giving_it_to
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_254();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_254;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B206_check_showing_it_to
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_255();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_255;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_256();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_256;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_257();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_257;
}
latest_rule_result-->0 = 0;
return 0; ! 3 rule(s)
];
Constant B207_carry_out_showing_it_to = EMPTY_RULEBOOK;
Constant B208_report_showing_it_to = EMPTY_RULEBOOK;
[ B209_check_waking
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_258();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_258;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B210_carry_out_waking = EMPTY_RULEBOOK;
Constant B211_report_waking = EMPTY_RULEBOOK;
[ B212_check_throwing_it_at
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_259();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_259;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_260();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_260;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_261();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_261;
}
latest_rule_result-->0 = 0;
return 0; ! 3 rule(s)
];
Constant B213_carry_out_throwing_it_a = EMPTY_RULEBOOK;
Constant B214_report_throwing_it_at = EMPTY_RULEBOOK;
[ B215_check_attacking
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_262();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_262;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B216_carry_out_attacking = EMPTY_RULEBOOK;
Constant B217_report_attacking = EMPTY_RULEBOOK;
[ B218_check_kissing
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_263();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_263;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_264();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_264;
}
latest_rule_result-->0 = 0;
return 0; ! 2 rule(s)
];
Constant B219_carry_out_kissing = EMPTY_RULEBOOK;
Constant B220_report_kissing = EMPTY_RULEBOOK;
Constant B221_check_answering_it_that = EMPTY_RULEBOOK;
Constant B222_carry_out_answering_it_ = EMPTY_RULEBOOK;
[ B223_report_answering_it_tha
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_265();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_265;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B224_check_telling_it_about
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_266();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_266;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B225_carry_out_telling_it_ab = EMPTY_RULEBOOK;
[ B226_report_telling_it_about
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_267();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_267;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B227_check_asking_it_about = EMPTY_RULEBOOK;
Constant B228_carry_out_asking_it_abo = EMPTY_RULEBOOK;
[ B229_report_asking_it_about
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_268();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_268;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B230_check_asking_it_for
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_269();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_269;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_270();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_270;
}
latest_rule_result-->0 = 0;
return 0; ! 2 rule(s)
];
Constant B231_carry_out_asking_it_for = EMPTY_RULEBOOK;
Constant B232_report_asking_it_for = EMPTY_RULEBOOK;
Constant B233_check_waiting = EMPTY_RULEBOOK;
Constant B234_carry_out_waiting = EMPTY_RULEBOOK;
[ B235_report_waiting
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_271();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_271;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B236_check_touching = EMPTY_RULEBOOK;
Constant B237_carry_out_touching = EMPTY_RULEBOOK;
[ B238_report_touching
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_272();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_272;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_273();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_273;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_274();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_274;
}
latest_rule_result-->0 = 0;
return 0; ! 3 rule(s)
];
[ B239_check_waving
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_275();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_275;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B240_carry_out_waving = EMPTY_RULEBOOK;
[ B241_report_waving
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_276();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_276;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B242_check_pulling
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_277();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_277;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_278();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_278;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_279();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_279;
}
latest_rule_result-->0 = 0;
return 0; ! 3 rule(s)
];
Constant B243_carry_out_pulling = EMPTY_RULEBOOK;
[ B244_report_pulling
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_280();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_280;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B245_check_pushing
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_281();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_281;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_282();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_282;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_283();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_283;
}
latest_rule_result-->0 = 0;
return 0; ! 3 rule(s)
];
Constant B246_carry_out_pushing = EMPTY_RULEBOOK;
[ B247_report_pushing
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_284();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_284;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B248_check_turning
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_285();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_285;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_286();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_286;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_287();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_287;
}
latest_rule_result-->0 = 0;
return 0; ! 3 rule(s)
];
Constant B249_carry_out_turning = EMPTY_RULEBOOK;
[ B250_report_turning
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_288();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_288;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B251_check_pushing_it_to
forbid_breaks ! Implied call parameter
rv ! return value
original_deadflag ! saved state
;
original_deadflag = deadflag;
rv = R_289();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_289;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_290();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_290;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_291();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_291;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_292();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_292;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_293();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_293;
}
latest_rule_result-->0 = 0;
if (original_deadflag ~= deadflag) return 0;
if (say__p) RulebookParBreak(forbid_breaks);
rv = R_294();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_294;
}
latest_rule_result-->0 = 0;
return 0; ! 6 rule(s)
];
Constant B252_carry_out_pushing_it_to = EMPTY_RULEBOOK;
Constant B253_report_pushing_it_to = EMPTY_RULEBOOK;
[ B254_check_squeezing
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_295();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_295;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B255_carry_out_squeezing = EMPTY_RULEBOOK;
[ B256_report_squeezing
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_296();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_296;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B257_check_saying_yes
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_297();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_297;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B258_carry_out_saying_yes = EMPTY_RULEBOOK;
Constant B259_report_saying_yes = EMPTY_RULEBOOK;
[ B260_check_saying_no
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_298();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_298;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B261_carry_out_saying_no = EMPTY_RULEBOOK;
Constant B262_report_saying_no = EMPTY_RULEBOOK;
[ B263_check_burning
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_299();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_299;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B264_carry_out_burning = EMPTY_RULEBOOK;
Constant B265_report_burning = EMPTY_RULEBOOK;
[ B266_check_waking_up
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_300();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_300;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B267_carry_out_waking_up = EMPTY_RULEBOOK;
Constant B268_report_waking_up = EMPTY_RULEBOOK;
[ B269_check_thinking
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_301();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_301;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B270_carry_out_thinking = EMPTY_RULEBOOK;
Constant B271_report_thinking = EMPTY_RULEBOOK;
Constant B272_check_smelling = EMPTY_RULEBOOK;
Constant B273_carry_out_smelling = EMPTY_RULEBOOK;
[ B274_report_smelling
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_302();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_302;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B275_check_listening_to = EMPTY_RULEBOOK;
Constant B276_carry_out_listening_to = EMPTY_RULEBOOK;
[ B277_report_listening_to
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_303();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_303;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B278_check_tasting = EMPTY_RULEBOOK;
Constant B279_carry_out_tasting = EMPTY_RULEBOOK;
[ B280_report_tasting
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_304();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_304;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B281_check_cutting
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_305();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_305;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B282_carry_out_cutting = EMPTY_RULEBOOK;
Constant B283_report_cutting = EMPTY_RULEBOOK;
Constant B284_check_jumping = EMPTY_RULEBOOK;
Constant B285_carry_out_jumping = EMPTY_RULEBOOK;
[ B286_report_jumping
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_306();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_306;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B287_check_tying_it_to
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_307();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_307;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B288_carry_out_tying_it_to = EMPTY_RULEBOOK;
Constant B289_report_tying_it_to = EMPTY_RULEBOOK;
[ B290_check_drinking
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_308();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_308;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B291_carry_out_drinking = EMPTY_RULEBOOK;
Constant B292_report_drinking = EMPTY_RULEBOOK;
[ B293_check_saying_sorry
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_309();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_309;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B294_carry_out_saying_sorry = EMPTY_RULEBOOK;
Constant B295_report_saying_sorry = EMPTY_RULEBOOK;
[ B296_check_swinging
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_310();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_310;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B297_carry_out_swinging = EMPTY_RULEBOOK;
Constant B298_report_swinging = EMPTY_RULEBOOK;
[ B299_check_rubbing
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_311();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_311;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B300_carry_out_rubbing = EMPTY_RULEBOOK;
[ B301_report_rubbing
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_312();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_312;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B302_check_setting_it_to
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_313();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_313;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B303_carry_out_setting_it_to = EMPTY_RULEBOOK;
Constant B304_report_setting_it_to = EMPTY_RULEBOOK;
Constant B305_check_waving_hands = EMPTY_RULEBOOK;
Constant B306_carry_out_waving_hands = EMPTY_RULEBOOK;
[ B307_report_waving_hands
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_314();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_314;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B308_check_buying
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_315();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_315;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B309_carry_out_buying = EMPTY_RULEBOOK;
Constant B310_report_buying = EMPTY_RULEBOOK;
[ B311_check_climbing
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_316();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_316;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B312_carry_out_climbing = EMPTY_RULEBOOK;
Constant B313_report_climbing = EMPTY_RULEBOOK;
[ B314_check_sleeping
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = R_317();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return R_317;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B315_carry_out_sleeping = EMPTY_RULEBOOK;
Constant B316_report_sleeping = EMPTY_RULEBOOK;
Constant B317_check_quitting_the_game = EMPTY_RULEBOOK;
[ B318_carry_out_quitting_the_
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = QUIT_THE_GAME_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return QUIT_THE_GAME_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B319_report_quitting_the_gam = EMPTY_RULEBOOK;
Constant B320_check_saving_the_game = EMPTY_RULEBOOK;
[ B321_carry_out_saving_the_ga
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = SAVE_THE_GAME_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return SAVE_THE_GAME_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B322_report_saving_the_game = EMPTY_RULEBOOK;
Constant B323_check_restoring_the_gam = EMPTY_RULEBOOK;
[ B324_carry_out_restoring_the
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = RESTORE_THE_GAME_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return RESTORE_THE_GAME_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B325_report_restoring_the_ga = EMPTY_RULEBOOK;
Constant B326_check_restarting_the_ga = EMPTY_RULEBOOK;
[ B327_carry_out_restarting_th
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = RESTART_THE_GAME_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return RESTART_THE_GAME_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B328_report_restarting_the_g = EMPTY_RULEBOOK;
Constant B329_check_verifying_the_sto = EMPTY_RULEBOOK;
[ B330_carry_out_verifying_the
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = VERIFY_THE_STORY_FILE_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return VERIFY_THE_STORY_FILE_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B331_report_verifying_the_st = EMPTY_RULEBOOK;
Constant B332_check_switching_the_sto = EMPTY_RULEBOOK;
[ B333_carry_out_switching_the
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = SWITCH_TRANSCRIPT_ON_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return SWITCH_TRANSCRIPT_ON_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B334_report_switching_the_st = EMPTY_RULEBOOK;
Constant B335_check_switching_the_sto = EMPTY_RULEBOOK;
[ B336_carry_out_switching_the
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = SWITCH_TRANSCRIPT_OFF_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return SWITCH_TRANSCRIPT_OFF_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B337_report_switching_the_st = EMPTY_RULEBOOK;
Constant B338_check_requesting_the_st = EMPTY_RULEBOOK;
[ B339_carry_out_requesting_th
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = ANNOUNCE_STORY_FILE_VERSION_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return ANNOUNCE_STORY_FILE_VERSION_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B340_report_requesting_the_s = EMPTY_RULEBOOK;
Constant B341_check_requesting_the_sc = EMPTY_RULEBOOK;
[ B342_carry_out_requesting_th
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = ANNOUNCE_SCORE_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return ANNOUNCE_SCORE_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B343_report_requesting_the_s = EMPTY_RULEBOOK;
Constant B344_check_preferring_abbrev = EMPTY_RULEBOOK;
[ B345_carry_out_preferring_ab
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = PREFER_ABBREVIATED_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return PREFER_ABBREVIATED_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B346_report_preferring_abbre
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = REP_PREFER_ABBREVIATED_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return REP_PREFER_ABBREVIATED_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B347_check_preferring_unabbr = EMPTY_RULEBOOK;
[ B348_carry_out_preferring_un
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = PREFER_UNABBREVIATED_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return PREFER_UNABBREVIATED_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B349_report_preferring_unabb
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = REP_PREFER_UNABBREVIATED_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return REP_PREFER_UNABBREVIATED_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B350_check_preferring_someti = EMPTY_RULEBOOK;
[ B351_carry_out_preferring_so
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = PREFER_SOMETIMES_ABBREVIATED_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return PREFER_SOMETIMES_ABBREVIATED_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B352_report_preferring_somet
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = REP_PREFER_SOMETIMES_ABBR_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return REP_PREFER_SOMETIMES_ABBR_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B353_check_switching_score_n = EMPTY_RULEBOOK;
[ B354_carry_out_switching_sco
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = SWITCH_SCORE_NOTIFY_ON_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return SWITCH_SCORE_NOTIFY_ON_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B355_report_switching_score_
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = REP_SWITCH_NOTIFY_ON_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return REP_SWITCH_NOTIFY_ON_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B356_check_switching_score_n = EMPTY_RULEBOOK;
[ B357_carry_out_switching_sco
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = SWITCH_SCORE_NOTIFY_OFF_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return SWITCH_SCORE_NOTIFY_OFF_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
[ B358_report_switching_score_
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = REP_SWITCH_NOTIFY_OFF_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return REP_SWITCH_NOTIFY_OFF_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B359_check_requesting_the_pr = EMPTY_RULEBOOK;
[ B360_carry_out_requesting_th
forbid_breaks ! Implied call parameter
rv ! return value
;
rv = ANNOUNCE_PRONOUN_MEANINGS_R();
if (rv) {
if (rv == 2) return reason_the_action_failed;
return ANNOUNCE_PRONOUN_MEANINGS_R;
}
latest_rule_result-->0 = 0;
return 0; ! 1 rule(s)
];
Constant B361_report_requesting_the_p = EMPTY_RULEBOOK;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Output.i6t: Scenes
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ DetectSceneChange
chs ! count of changes made
ch ! flag: change made
;
if (scene_status-->0 == 1) {
if ((((deadflag~=0)))) {
ch = true;
if (debug_scenes) print "[Scene 'Entire Game' ends]^";
if (GProperty(43, 1, p57_recurring)) scene_status-->0 = 0; else scene_status-->0 = 2; FollowRulebook(28);
FollowRulebook(WHEN_SCENE_ENDS_RB, 1);
scene_ended-->0 = the_time;
scene_endings-->0 = (scene_endings-->0)|2;
scene_latest_ending-->0 = 1;
jump CScene;
}
}
if (scene_status-->0 == 0) {
if ((((deadflag==0)))) {
ch = true;
if (debug_scenes) print "[Scene 'Entire Game' begins]^";
scene_status-->0 = 1; FollowRulebook(WHEN_SCENE_BEGINS_RB, 1);
FollowRulebook(27);
scene_started-->0 = the_time;
scene_endings-->0 = (scene_endings-->0)|1;
scene_latest_ending-->0 = 0;
jump CScene;
}
}
.CScene;
if (chs>20) ">--> The scene change machinery is stuck.";
if (ch>0) DetectSceneChange(++chs);
rfalse;
];
#IFDEF DEBUG;
[ ShowSceneStatus
chs ! internal use only
sc ! internal use only
ch ! internal use only
;
if (scene_status-->0 == 1) {
print "Scene 'Entire Game' playing (for ", the_time-(scene_started-->0), " mins now)^";
} else {
if (scene_latest_ending-->0 > 0) {
print "Scene 'Entire Game' ended";
print "^";
}
}
];
#ENDIF;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Output.i6t: The New Library
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Actions.i6t: Summary
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Actions.i6t: Action Data
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant AD_ACTION = 0; ! The I6 action number (0 to 4095)
Constant AD_REQUIREMENTS = 1; ! Such as requiring light; a bitmap, see below
Constant AD_NOUN_KOV = 2; ! Kind of value of the first noun
Constant AD_SECOND_KOV = 3; ! Kind of value of the second noun
Constant AD_VARIABLES_CREATOR = 4; ! Routine to initialise variables owned
Constant AD_VARIABLES_ID = 5; ! Frame ID for variables owned by action
Constant AD_RECORD_SIZE = 6;
[ FindAction fa t;
if (fa == -1) fa = action;
t = 1;
while (t <= ActionData-->0) {
if (fa == ActionData-->t) return t;
t = t + AD_RECORD_SIZE;
}
rfalse;
];
[ ActionNumberIndexed i;
if ((i>=0) && (i < AD_RECORDS)) return ActionData-->(i*AD_RECORD_SIZE + AD_ACTION + 1);
return 0;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Actions.i6t: Requirements Bitmap
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant TOUCH_NOUN_ABIT = $$00000001;
Constant TOUCH_SECOND_ABIT = $$00000010;
Constant LIGHT_ABIT = $$00000100;
Constant NEED_NOUN_ABIT = $$00001000;
Constant NEED_SECOND_ABIT = $$00010000;
Constant OUT_OF_WORLD_ABIT = $$00100000;
Constant CARRY_NOUN_ABIT = $$01000000;
Constant CARRY_SECOND_ABIT = $$10000000;
[ NeedToCarryNoun; return TestActionMask(CARRY_NOUN_ABIT); ];
[ NeedToCarrySecondNoun; return TestActionMask(CARRY_SECOND_ABIT); ];
[ NeedToTouchNoun; return TestActionMask(TOUCH_NOUN_ABIT); ];
[ NeedToTouchSecondNoun; return TestActionMask(TOUCH_SECOND_ABIT); ];
[ NeedLightForAction; return TestActionMask(LIGHT_ABIT); ];
[ TestActionMask match mask at;
at = FindAction(-1);
if (at == 0) rfalse;
mask = ActionData-->(at+AD_REQUIREMENTS);
if (mask & match) rtrue;
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Actions.i6t: Try Action
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ TryAction req by ac n s stora smeta tbits saved_command text_of_command;
if (stora) return STORED_ACTION_TY_New(ac, n, s, by, req, stora);
tbits = req & (16+32);
req = req & 1;
@push actor; @push act_requester; @push inp1; @push inp2;
@push parsed_number; smeta = meta;
actor = by; if (req) act_requester = player; else act_requester = 0;
by = FindAction(ac);
if (by) {
if (ActionData-->(by+AD_NOUN_KOV) == OBJECT_TY) inp1 = n;
else { inp1 = 1; parsed_number = n; }
if (ActionData-->(by+AD_SECOND_KOV) == OBJECT_TY) inp2 = s;
else { inp2 = 1; parsed_number = s; }
if (((ActionData-->(by+AD_NOUN_KOV) == UNDERSTANDING_TY) ||
(ActionData-->(by+AD_SECOND_KOV) == UNDERSTANDING_TY)) && (tbits)) {
saved_command = BlkValueCreate(TEXT_TY);
BlkValueCast(saved_command, SNIPPET_TY, players_command);
text_of_command = BlkValueCreate(TEXT_TY);
BlkValueCopy(text_of_command, parsed_number);
SetPlayersCommand(text_of_command);
if (tbits == 16) {
n = players_command; inp1 = 1; parsed_number = players_command;
} else {
s = players_command; inp2 = 1; parsed_number = players_command;
}
BlkValueFree(text_of_command);
@push consult_from; @push consult_words;
consult_from = 1; consult_words = parsed_number - 100;
}
}
BeginAction(ac, n, s, 0, true);
if (saved_command) {
@pull consult_words; @pull consult_from;
SetPlayersCommand(saved_command);
BlkValueFree(saved_command);
}
meta = smeta; @pull parsed_number;
@pull inp2; @pull inp1; @pull act_requester; @pull actor;
TrackActions(true, smeta);
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Actions.i6t: I6 Angle Brackets
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ R_Process a i j;
@push inp1; @push inp2;
inp1 = i; inp2 = j; BeginAction(a, i, j);
@pull inp2; @pull inp1;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Actions.i6t: Conversion
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Global converted_action_outcome = -1;
[ GVS_Convert ac n s;
converted_action_outcome = BeginAction(ac, n, s);
if (converted_action_outcome == true) FollowRulebook( 23, nothing, true );
rtrue;
];
[ ConvertToRequest X AN Y Z;
WORK_OUT_DETAILS_OF_SPECIFIC_R();
if (X == player) TryAction(false, X, AN, Y, Z);
else TryAction(true, X, AN, Y, Z);
rtrue;
];
[ ConvertToGoingWithPush i oldrm newrm infl;
i=noun;
if (IndirectlyContains(noun, actor) == false) { move i to actor; infl = true; }
move_pushing = i;
oldrm = LocationOf(noun);
BeginAction(##Go, second);
newrm = LocationOf(actor);
move_pushing = nothing; move i to newrm;
if (newrm ~= oldrm) {
if (IndirectlyContains(i, player)) TryAction(0, player, ##Look, 0, 0);
RulebookSucceeds();
} else RulebookFails();
rtrue;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Actions.i6t: Implicit Take
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ImplicitTake obj ks;
if (actor == player) { STANDARD_IMPLICIT_TAKING_RM('A', obj); }
else {
if (TestVisibility(player, actor))
STANDARD_IMPLICIT_TAKING_RM('B', obj, actor);
}
ClearParagraphing(3);
@push keep_silent; keep_silent = true;
@push say__p; @push say__pc; ClearParagraphing(4);
if (act_requester) TryAction(true, actor, ##Take, obj, nothing);
else TryAction(false, actor, ##Take, obj, nothing);
DivideParagraphPoint(); @pull say__pc; @pull say__p; AdjustParagraphPoint(); @pull keep_silent;
if (obj in actor) rtrue;
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Actions.i6t: Look After Going
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ LookAfterGoing;
GoingLookBreak();
AbbreviatedRoomDescription();
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Actions.i6t: Abbreviated Room Description
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ AbbreviatedRoomDescription prior_action pos frame_id;
prior_action = action;
action = ##Look;
pos = FindAction(##Look);
if ((pos) && (ActionData-->(pos+AD_VARIABLES_CREATOR))) {
frame_id = ActionData-->(pos+AD_VARIABLES_ID);
Mstack_Create_Frame(ActionData-->(pos+AD_VARIABLES_CREATOR), frame_id);
FollowRulebook(SETTING_ACTION_VARIABLES_RB);
(MStack-->MstVO(frame_id, 0)) = prior_action; ! "room-describing action"
(MStack-->MstVO(frame_id, 1)) = true; ! "abbreviated form allowed"
}
LookSub(); ! The I6 verb routine for "looking"
if (frame_id) Mstack_Destroy_Frame(ActionData-->(pos+AD_VARIABLES_CREATOR), frame_id);
action = prior_action;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Actions.i6t: Begin Action
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ BeginAction a n s moi notrack rv;
ChronologyPoint();
@push action; @push noun; @push second; @push self; @push multiple_object_item;
action = a; noun = n; second = s; self = noun; multiple_object_item = moi;
if (action < 4096) rv = ActionPrimitive();
@pull multiple_object_item; @pull self; @pull second; @pull noun; @pull action;
if (notrack == false) TrackActions(true, meta);
return rv;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Actions.i6t: Action Primitive
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ActionPrimitive rv p1 p2 p3 p4 p5 frame_id;
MStack_CreateRBVars(ACTION_PROCESSING_RB);
if ((keep_silent == false) && (multiflag == false)) DivideParagraphPoint();
reason_the_action_failed = 0;
frame_id = -1;
p1 = FindAction(action);
if ((p1) && (ActionData-->(p1+AD_VARIABLES_CREATOR))) {
frame_id = ActionData-->(p1+AD_VARIABLES_ID);
Mstack_Create_Frame(ActionData-->(p1+AD_VARIABLES_CREATOR), frame_id);
}
if (ActionVariablesNotTypeSafe()) {
if (actor ~= player) { ACTION_PROCESSING_INTERNAL_RM('K'); new_line; }
if (frame_id ~= -1)
Mstack_Destroy_Frame(ActionData-->(p1+AD_VARIABLES_CREATOR), frame_id);
MStack_DestroyRBVars(ACTION_PROCESSING_RB);
return;
}
FollowRulebook(SETTING_ACTION_VARIABLES_RB);
#IFDEF DEBUG;
if ((trace_actions) && (FindAction(-1))) {
print "["; p1=actor; p2=act_requester; p3=action; p4=noun; p5=second;
DB_Action(p1,p2,p3,p4,p5);
print "]^"; ClearParagraphing(5);
}
++debug_rule_nesting;
#ENDIF;
TrackActions(false, meta);
if ((meta) && (actor ~= player)) {
ACTION_PROCESSING_INTERNAL_RM('A', actor); new_line; rv = RS_FAILS; }
else if (meta) { DESCEND_TO_SPECIFIC_ACTION_R(); rv = RulebookOutcome(); }
else { FollowRulebook(ACTION_PROCESSING_RB); rv = RulebookOutcome(); }
#IFDEF DEBUG;
--debug_rule_nesting;
if ((trace_actions) && (FindAction(-1))) {
print "["; DB_Action(p1,p2,p3,p4,p5); print " - ";
switch (rv) {
RS_SUCCEEDS: print "succeeded";
RS_FAILS: print "failed";
#IFNDEF MEMORY_ECONOMY;
if (reason_the_action_failed)
print " the ",
(RulePrintingRule) reason_the_action_failed;
#ENDIF;
default: print "ended without result";
}
print "]^"; say__p = 1;
SetRulebookOutcome(rv); ! In case disturbed by printing activities
}
#ENDIF;
if (rv == RS_SUCCEEDS) UpdateActionBitmap();
if (frame_id ~= -1) {
p1 = FindAction(action);
Mstack_Destroy_Frame(ActionData-->(p1+AD_VARIABLES_CREATOR), frame_id);
}
MStack_DestroyRBVars(ACTION_PROCESSING_RB);
if ((keep_silent == false) && (multiflag == false)) DivideParagraphPoint();
if (rv == RS_SUCCEEDS) rtrue;
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Actions.i6t: Internal Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ACTION_PROCESSING_INTERNAL_R; ];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Actions.i6t: Type Safety
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ActionVariablesNotTypeSafe mask noun_kova second_kova at;
at = FindAction(-1); if (at == 0) rfalse; ! For any I6-defined actions
noun_kova = ActionData-->(at+AD_NOUN_KOV);
second_kova = ActionData-->(at+AD_SECOND_KOV);
!print "at = ", at, " nst = ", noun_kova, "^";
!print "consult_from = ", consult_from, " consult_words = ", consult_from, "^";
!print "inp1 = ", inp1, " noun = ", noun, "^";
!print "inp2 = ", inp2, " second = ", second, "^";
!print "sst = ", second_kova, "^";
if (noun_kova == SNIPPET_TY or UNDERSTANDING_TY) {
if (inp1 ~= 1) { inp2 = inp1; second = noun; }
parsed_number = 100*consult_from + consult_words;
inp1 = 1; noun = nothing; ! noun = parsed_number;
}
if (second_kova == SNIPPET_TY or UNDERSTANDING_TY) {
parsed_number = 100*consult_from + consult_words;
inp2 = 1; second = nothing; ! second = parsed_number;
}
mask = ActionData-->(at+AD_REQUIREMENTS);
if (mask & OUT_OF_WORLD_ABIT) { meta = 1; rfalse; }
meta = 0;
if (inp1 == 1) {
if (noun_kova == OBJECT_TY) {
if (actor == player) { ACTION_PROCESSING_INTERNAL_RM('B'); new_line; }
rtrue;
}
} else {
if (noun_kova ~= OBJECT_TY) {
if (actor == player) { ACTION_PROCESSING_INTERNAL_RM('C'); new_line; }
rtrue;
}
if ((mask & NEED_NOUN_ABIT) && (noun == nothing)) {
@push act_requester; act_requester = nothing;
CarryOutActivity(SUPPLYING_A_MISSING_NOUN_ACT);
@pull act_requester;
if (noun == nothing) {
if (say__p) rtrue;
if (actor == player) { ACTION_PROCESSING_INTERNAL_RM('D'); new_line; }
rtrue;
}
}
if (((mask & NEED_NOUN_ABIT) == 0) && (noun ~= nothing)) {
if (actor == player) { ACTION_PROCESSING_INTERNAL_RM('E'); new_line; }
rtrue;
}
}
if (inp2 == 1) {
if (second_kova == OBJECT_TY) {
if (actor == player) { ACTION_PROCESSING_INTERNAL_RM('F'); new_line; }
rtrue;
}
} else {
if (second_kova ~= OBJECT_TY) {
if (actor == player) { ACTION_PROCESSING_INTERNAL_RM('G'); new_line; }
rtrue;
}
if ((mask & NEED_SECOND_ABIT) && (second == nothing)) {
@push act_requester; act_requester = nothing;
CarryOutActivity(SUPPLYING_A_MISSING_SECOND_ACT);
@pull act_requester;
if (second == nothing) {
if (say__p) rtrue;
if (actor == player) { ACTION_PROCESSING_INTERNAL_RM('H'); new_line; }
rtrue;
}
}
if (((mask & NEED_SECOND_ABIT) == 0) && (second ~= nothing)) {
if (actor == player) { ACTION_PROCESSING_INTERNAL_RM('I'); new_line; }
rtrue;
}
}
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Actions.i6t: Basic Visibility Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ BASIC_VISIBILITY_R;
if (act_requester) rfalse;
if ((NeedLightForAction()) &&
(actor == player) &&
(FollowRulebook(VISIBLE_RB)) &&
(RulebookSucceeded())) {
BeginActivity(REFUSAL_TO_ACT_IN_DARK_ACT);
if (ForActivity(REFUSAL_TO_ACT_IN_DARK_ACT)==false) {
BASIC_VISIBILITY_RM('A'); new_line;
}
EndActivity(REFUSAL_TO_ACT_IN_DARK_ACT);
reason_the_action_failed = BASIC_VISIBILITY_R;
RulebookFails();
rtrue;
}
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Actions.i6t: Basic Accessibility Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ BASIC_ACCESSIBILITY_R mask at;
if (act_requester) rfalse;
at = FindAction(-1);
if (at == 0) rfalse;
mask = ActionData-->(at+AD_REQUIREMENTS);
if ((mask & TOUCH_NOUN_ABIT) && noun && (inp1 ~= 1)) {
if (noun ofclass K3_direction) {
RulebookFails();
reason_the_action_failed = BASIC_ACCESSIBILITY_R;
if (actor~=player) rtrue;
BASIC_ACCESSIBILITY_RM('A'); new_line;
RulebookFails();
reason_the_action_failed = BASIC_ACCESSIBILITY_R;
rtrue;
}
if (ObjectIsUntouchable(noun, (actor~=player), actor)) {
RulebookFails();
reason_the_action_failed = BASIC_ACCESSIBILITY_R;
rtrue;
}
}
if ((mask & TOUCH_SECOND_ABIT) && second && (inp2 ~= 1)) {
if (second ofclass K3_direction) {
RulebookFails();
reason_the_action_failed = BASIC_ACCESSIBILITY_R;
if (actor~=player) rtrue;
BASIC_ACCESSIBILITY_RM('A'); new_line;
RulebookFails();
reason_the_action_failed = BASIC_ACCESSIBILITY_R;
rtrue;
}
if (ObjectIsUntouchable(second, (actor~=player), actor)) {
RulebookFails();
reason_the_action_failed = BASIC_ACCESSIBILITY_R;
rtrue;
}
}
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Actions.i6t: Carrying Requirements Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ CARRYING_REQUIREMENTS_R mask at;
at = FindAction(-1);
if (at == 0) rfalse;
mask = ActionData-->(at+AD_REQUIREMENTS);
if ((mask & TOUCH_NOUN_ABIT) && noun && (inp1 ~= 1)) {
if ((mask & CARRY_NOUN_ABIT) && (noun notin actor)) {
CarryOutActivity(IMPLICITLY_TAKING_ACT, noun);
if (noun notin actor) {
RulebookFails();
reason_the_action_failed = CARRYING_REQUIREMENTS_R;
rtrue;
}
}
}
if ((mask & TOUCH_SECOND_ABIT) && second && (inp2 ~= 1)) {
if ((mask & CARRY_SECOND_ABIT) && (second notin actor)) {
CarryOutActivity(IMPLICITLY_TAKING_ACT, second);
if (second notin actor) {
RulebookFails();
reason_the_action_failed = CARRYING_REQUIREMENTS_R;
rtrue;
}
}
}
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Actions.i6t: Standard Implicit Taking Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ STANDARD_IMPLICIT_TAKING_R;
ImplicitTake(parameter_value);
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Actions.i6t: Requested Actions Require Persuasion Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ REQUESTED_ACTIONS_REQUIRE_R rv;
if ((actor ~= player) && (act_requester)) {
@push say__p;
say__p = 0;
rv = FollowRulebook(PERSUADE_RB);
if (RulebookSucceeded() == false) {
if ((deadflag == false) && (say__p == FALSE)) {
REQUESTED_ACTIONS_REQUIRE_RM('A', actor);
new_line;
}
ActRulebookFails(rv); rtrue;
}
@pull say__p;
}
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Actions.i6t: Carry Out Requested Actions Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ CARRY_OUT_REQUESTED_ACTIONS_R rv;
if ((actor ~= player) && (act_requester)) {
@push act_requester; act_requester = nothing;
rv = BeginAction(action, noun, second);
if (((meta) || (rv == false)) && (deadflag == false)) {
if (FollowRulebook(UNSUCCESSFUL_ATTEMPT_RB) == false) {
CARRY_OUT_REQUESTED_ACTIONS_RM('A', actor); new_line;
}
}
@pull act_requester;
FollowRulebook(AFTER_RB);
ActRulebookSucceeds();
rtrue;
}
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Actions.i6t: Generic Verb Subroutine
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Array Details_of_Specific_Action-->5;
[ GenericVerbSub ch co re vis rv;
@push converted_action_outcome;
converted_action_outcome = -1;
Details_of_Specific_Action-->0 = true;
if (meta) Details_of_Specific_Action-->0 = false;
Details_of_Specific_Action-->1 = keep_silent;
Details_of_Specific_Action-->2 = ch; ! Check rules for the action
Details_of_Specific_Action-->3 = co; ! Carry out rules for the action
Details_of_Specific_Action-->4 = re; ! Report rules for the action
FollowRulebook(SPECIFIC_ACTION_PROCESSING_RB, 0, true);
if ((RulebookFailed()) && (converted_action_outcome == 1)) ActRulebookSucceeds();
@pull converted_action_outcome;
rtrue;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Actions.i6t: Work Out Details Of Specific Action Rule
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ WORK_OUT_DETAILS_OF_SPECIFIC_R;
MStack-->MstVO(SPECIFIC_ACTION_PROCESSING_RB, 0) = Details_of_Specific_Action-->0;
MStack-->MstVO(SPECIFIC_ACTION_PROCESSING_RB, 1) = Details_of_Specific_Action-->1;
MStack-->MstVO(SPECIFIC_ACTION_PROCESSING_RB, 2) = Details_of_Specific_Action-->2;
MStack-->MstVO(SPECIFIC_ACTION_PROCESSING_RB, 3) = Details_of_Specific_Action-->3;
MStack-->MstVO(SPECIFIC_ACTION_PROCESSING_RB, 4) = Details_of_Specific_Action-->4;
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Actions.i6t: Actions Bitmap
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ TestActionBitmap obj act i j k bitmap;
if (obj == nothing) bitmap = ActionHappened;
else {
if (~~(obj provides action_bitmap)) rfalse;
bitmap = obj.&action_bitmap;
}
if (act == -1) return (((bitmap->0) & 1) ~= 0);
for (i=0, k=2: i<ActionCount: i++) {
if (act == ActionCoding-->i) {
return (((bitmap->j) & k) ~= 0);
}
k = k*2; if (k == 256) { k = 1; j++; }
}
rfalse;
];
[ UpdateActionBitmap;
SetActionBitmap(noun, action);
if (action == ##Go) SetActionBitmap(location, ##Enter);
];
[ SetActionBitmap obj act i j k bitmap;
for (i=0, k=2: i<ActionCount: i++) {
if (act == ActionCoding-->i) {
if (obj provides action_bitmap) {
bitmap = obj.&action_bitmap;
bitmap->0 = (bitmap->0) | 1;
bitmap->j = (bitmap->j) | k;
}
ActionHappened->0 = (ActionHappened->0) | 1;
ActionHappened->j = (ActionHappened->j) | k;
}
k = k*2; if (k == 256) { k = 1; j++; }
}
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Actions.i6t: Printing Actions
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ SayActionName act; DB_Action(0, 0, act, 0, 0, 2); ];
[ DA_Name n; if (n ofclass K3_direction) print (name) n; else print (the) n; ];
[ DA_Topic x a b c d i cf cw;
cw = x%100; cf = x/100;
print "~";
for (a=cf:d<cw:d++,a++) {
wn = a; b = WordAddress(a); c = WordLength(a);
for (i=b:i<b+c:i++) {
print (char) 0->i;
}
if (d<cw-1) print " ";
}
print "~";
];
[ DA_Number n; print n; ];
[ DA_TruthState n; if (n==0) print "false"; else print "true"; ];
[ DB_Action ac acr act n s for_say t at l j v c clc;
if ((for_say == 0) && (debug_rule_nesting > 0))
print "(", debug_rule_nesting, ") ";
if ((ac ~= player) && (for_say ~= 2)) {
if (acr) print "asking ", (the) ac, " to try ";
else print (the) ac, " ";
}
DB_Action_Details(act, n, s, for_say);
if ((keep_silent) && (for_say == 0)) print " - silently";
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Activities.i6t: The Activities Stack
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Constant MAX_NESTED_ACTIVITIES = 20;
Global activities_sp = 0;
Array activities_stack --> MAX_NESTED_ACTIVITIES;
Array activity_parameters_stack --> MAX_NESTED_ACTIVITIES;
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Activities.i6t: Rule Debugging Inhibition
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Global inhibit_flag = 0;
Global saved_debug_rules = 0;
[ FixInhibitFlag n act inhibit_rule_debugging;
for (n=0:n<activities_sp:n++) {
act = activities_stack-->n;
if (act == PRINTING_THE_NAME_ACT or PRINTING_THE_PLURAL_NAME_ACT or
PRINTING_ROOM_DESC_DETAILS_ACT or PRINTING_INVENTORY_DETAILS_ACT or
LISTING_CONTENTS_ACT or GROUPING_TOGETHER_ACT or PRINTING_RESPONSE_ACT)
inhibit_rule_debugging = true;
}
if ((inhibit_flag == false) && (inhibit_rule_debugging)) {
saved_debug_rules = debug_rules;
debug_rules = 0;
}
if ((inhibit_flag) && (inhibit_rule_debugging == false)) {
debug_rules = saved_debug_rules;
}
inhibit_flag = inhibit_rule_debugging;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Activities.i6t: Testing Activities
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ TestActivity A desc val i;
for (i=0:i<activities_sp:i++)
if (activities_stack-->i == A) {
if (desc) {
if ((desc)(activity_parameters_stack-->i)) rtrue;
} else if (val) {
if (val == activity_parameters_stack-->i) rtrue;
} else rtrue;
}
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Activities.i6t: Emptiness
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ActivityEmpty A x;
x = Activity_before_rulebooks-->A;
if (rulebooks_array-->x ~= EMPTY_RULEBOOK) rfalse;
x = Activity_for_rulebooks-->A;
if (rulebooks_array-->x ~= EMPTY_RULEBOOK) rfalse;
x = Activity_after_rulebooks-->A;
if (rulebooks_array-->x ~= EMPTY_RULEBOOK) rfalse;
rtrue;
];
[ RulebookEmpty rb;
if (rulebooks_array-->rb ~= EMPTY_RULEBOOK) rfalse;
rtrue;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Activities.i6t: Process Activity Rulebook
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ProcessActivityRulebook rulebook parameter rv;
@push self;
if (parameter) self = parameter;
rv = FollowRulebook(rulebook, parameter, true);
@pull self;
if (rv) rtrue;
rfalse;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Activities.i6t: Carrying Out Activities
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ CarryOutActivity A o rv;
BeginActivity(A, o);
rv = ForActivity(A, o);
EndActivity(A, o);
return rv;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Activities.i6t: Begin
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ BeginActivity A o x;
if (activities_sp == MAX_NESTED_ACTIVITIES) return RunTimeProblem(RTP_TOOMANYACTS);
activity_parameters_stack-->activities_sp = o;
activities_stack-->(activities_sp++) = A;
FixInhibitFlag();
MStack_CreateAVVars(A);
if (Activity_atb_rulebooks->A) { x = action; action = action_to_be; }
o = ProcessActivityRulebook(Activity_before_rulebooks-->A, o);
if (Activity_atb_rulebooks->A) action = x;
return o;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Activities.i6t: For
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ ForActivity A o x;
if (Activity_atb_rulebooks->A) { x = action; action = action_to_be; }
o = ProcessActivityRulebook(Activity_for_rulebooks-->A, o);
if (Activity_atb_rulebooks->A) action = x;
return o;
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Activities.i6t: End
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ EndActivity A o rv x;
if ((activities_sp > 0) && (activities_stack-->(activities_sp-1) == A)) {
if (Activity_atb_rulebooks->A) { x = action; action = action_to_be; }
rv = ProcessActivityRulebook(Activity_after_rulebooks-->A, o);
if (Activity_atb_rulebooks->A) action = x;
activities_sp--; FixInhibitFlag();
MStack_DestroyAVVars(A);
return rv;
}
return RunTimeProblem(RTP_CANTABANDON);
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Activities.i6t: Abandon
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
[ AbandonActivity A o;
if ((activities_sp > 0) && (activities_stack-->(activities_sp-1) == A)) {
activities_sp--; FixInhibitFlag();
MStack_DestroyAVVars(A);
return;
}
return RunTimeProblem(RTP_CANTEND);
];
! ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
! Figures.i6t: Resource Usage
! ==
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment