! this is a test of basic manipulation of multiple objects (balls etc)
! Bugs fixed/investigated using this test file
! - "drop cubes" when carrying no balls
!
!
#Iftrue (#version_number == 8);
Constant USEINFORM;
#Endif;

Constant Story      "Parser test";
Constant Headline   "^A parser test suite for PunyInform.^";
Serial "200827";
Constant INITIAL_LOCATION_VALUE = LitRoom;

! Uncomment to show time instead of score/turns
!Statusline time;

!Constant DEBUG_PARSEANDPERFORM;
!Constant DEBUG_PARSEPATTERN;
!Constant DEBUG_PARSETOKEN;
!Constant DEBUG_PARSENOUNPHRASE;
!Constant DEBUG_GETNEXTNOUN;
!Constant DEBUG_SCOPE;

! Uncomment to add optional features to PunyLib
!Constant DEBUG;
!Constant CUSTOM_ABBREVIATIONS;
!Constant OPTIONAL_ALLOW_WRITTEN_NUMBERS;
Constant OPTIONAL_EXTENDED_METAVERBS;
!Constant OPTIONAL_EXTENDED_VERBSET;
!Constant OPTIONAL_FULL_SCORE;
!Constant OPTIONAL_FULL_DIRECTIONS;
!Constant OPTIONAL_GUESS_MISSING_NOUN;
!Constant OPTIONAL_MANUAL_SCOPE;
!Constant RUNTIME_ERRORS = 0;

#Ifdef USEINFORM;
Include "Parser";
Include "VerbLib";
#IfNot;
Include "globals.h";
#EndIf;

[ InScope person i;
  if (person == player && location == thedark) {
    objectloop (i in parent(player)) {
      if (i has moved) {
        PlaceInScope(i);
      }
    }
  }
  if (person == player && real_location == DarkRoom2 ) {
    PlaceInScope(Table);
    rtrue;
  }
  rfalse;
];


! Uncomment to add PunyLib extensions
!Include "ext_menu.h";
!Include "ext_flags.h";
!Include "ext_quote_box.h";
!Include "ext_cheap_scenery.h";

#Ifndef USEINFORM;
Include "puny.h";
#EndIf;

Object LitRoom "Lit Room"
	with
		description [;
			print "You are in a brightly lit room. Dark doorway leads west and east.";
		],
		e_to DarkRoom1,
		w_to DarkRoom2
	has light;

Object -> Ball "ball"
	with
		name 'ball';


Object DarkRoom1 "Dark Room"
	with
		description "Light falls in from the doorway to the west.",
		w_to LitRoom;

Object -> Chair "chair"
	with
		name 'chair';

Object DarkRoom2 "Dark Room"
	with
		description "Light falls in from the doorway to the east.",
		e_to LitRoom;

Object -> Table "table"
	with
		name 'table';

[Initialise;
	print "^^The testsuite is open for business!^^";
	print "If you drop the ball in the dark room it will still be in scope.^";
#IfDef USEINFORM;
    location=LitRoom;
#EndIf;
];

#Ifdef USEINFORM;
Include "Grammar";
#Endif;

