############################################################################## # Commands ############################################################################## # Command structure explanation # # Values in [] are optional # Values in () are choices of fixed values; value in all caps is default # Special (Iourta) == (IN|on|under|over|through|at) Note that some of the # values can be missing to indicate limited options. Capital value is the # default. # Values in <> refer to objects or people # | == or # / == synonym # # Generally a command will follow one of the following formats: # verb # verb # verb modifier # verb modifier # # Commands can be chained on one input by putting either '.' or ' THEN ' in # between the commands. # Examples: > x door.x room # > x door then x room # # TODO: Leaving out the subject or target will cause the parser to attempt to # use the current object of attention. # This goes along with pronoun processing. # # TODO: Implement ',' , "AND", "ALL", "ALL " as multi-object linkers. # # TODO: Implement "keyring" concept for locking/unlocking things. ############################################################################## ############################################################################## ### # Investigating the world and yourself ### search look [(AROUND|AT|behind|under|through) (|me/self/myself)] examine inventory listen [[to] ] smell [] taste z # stand still and let time pass stand sit [on] [] # defaults to ground ### # Manipulating things ### take/carry /put in inventory drop /put down put (Iourt) throw [(iourtA) ] hit/attack [with ] kick eat/drink/swallow empty fill [with ] push pull [with ] pry with ride/drive lock [with ] unlock [with ] open/unwrap close/shut cut [with ] raise [ with ] lower touch [with ] turn/crank/rotate fix [with ] break [with ] ### # Interacting with people (or other conversational-type things) ### tell about ask about , "arbitrary command" hug kiss think [[about] ] ### # Moving around ### go / # where is one of: N,S,E,W,NE,NW,SE,SW,U,D climb [(iOurt)] jump [(iOurt) ] crawl [|(ioUrt) ] swim [|in ] fly [|(uRt) ] ### # Meta-commands ### help # display basic commands, description of game, etc. credits # display credit file quit # quit the whole program save # prompts for a save-file name and location restore # prompts for a save-file to restore restart # restart the current game hint[s] [about ] # access hint file, if provided toggle "arbitrary string" # allows for arbitrary modes to be implemented # Modes verbose # verbose descriptions of rooms and objects every time short # verbose desc. first time, abbrev. thereafter status # status bar present showroom # current room is shown in status bar turns # elapsed turns are shown in status bar debug # debug info is written to stdout debugingame # debug info is written directly to the game output ############################################################################## # Regex ############################################################################## # General interpretation is: # Group 1: verb # Group 2: long subject # Group 3: adjective | subject (if 4 == null) # Group 4: subject # Group 5: modifier # Group 6: long target # Group 7: adjective | target (if 8 == null) # Group 8: target # # Short commands in the form of [modifier] are interpreted: # Group 1: verb # Group 2: # Group 3: modifier # Group 4: # Group 5: # Group 6: long target # Group 7: adjective | target (if 8 == null) # Group 8: target ############################################################################## (|.*? )(?:the |a |an )?((.*? )?(|.*? )?)(?: )?(at |in |over |into |behind |under |through |with |over |about )?(?:the |a |an )?((.*? )?(|.*)?)