public void line_200() { // 210 // Print a blank line dialogScript.outputDialog(""); // 220 // Describe the player's location ///print("Line 220: Number of rooms: " + editorScript.numberOfRooms_R); ///print("Line 220: ROOM: " + engineScript.playerLocation_ROOM); for (int i = 0; i <= DISPLAY_LINES; i++) { if (editorScript.roomDescription[engineScript.playerLocation_ROOM, i] != null) { //print("Line 200:48 - " + editorScript.roomDescription[engineScript.playerLocation_ROOM, i]); //print("Line 200:50 - CALLING OUTPUTSCRIPT.DISPLAY_OUTPUT, i = " + i); //outputScript.display_Output(editorScript.roomDescription[engineScript.playerLocation_ROOM, i]); //engineScript.dialog.Add(editorScript.roomDescription[engineScript.playerLocation_ROOM, i]); dialogScript.outputDialog(editorScript.roomDescription[engineScript.playerLocation_ROOM, i]); } } // GOTO 300 engineScript.gameState = "line_300"; ///print("Leaving line 200 to GOTO 300"); }
public void line_100() { ///print("Entering line 100"); // 100 // See if player's location is dark if (engineScript.switch_S[ROOM_IS_DARK] == 1) { print("Room is dark"); // 110 // Darkness countdown if (engineScript.counter_C[ROOM_IS_DARK] > 0) { // Subtract one from the ROOM_IS_DARK counter_C engineScript.counter_C[ROOM_IS_DARK] = engineScript.counter_C[ROOM_IS_DARK] - 1; } // 120 // See if the lamp is on if (engineScript.switch_S[LAMP_IS_ON] == 1) { // GOTO 200 - Describe room engineScript.gameState = "line_200"; ///print("Leaving line 100 to GOTO 200"); return; } else { // 130 dialogScript.outputDialog(""); dialogScript.outputDialog("It is dark here. You better get some light or you may be in trouble."); // 140 // No lamp countdown if (engineScript.counter_C[NO_LAMP] > 0) { engineScript.counter_C[NO_LAMP] = engineScript.counter_C[NO_LAMP] - 1; } // 150 // GOTO 1000 - Accept command engineScript.gameState = "line_1000"; ///print("Leaving line 100 to GOTO 1000"); } } else { engineScript.gameState = "line_200"; ///print("Leaving line 100 to GOTO 200"); return; } }
public void noComprende() { // 1310 dialogScript.outputDialog(""); dialogScript.outputDialog("Sorry . . ."); dialogScript.outputDialog(""); dialogScript.outputDialog("My vocabulary is pretty limited,"); dialogScript.outputDialog("but I am a good listener . . ."); // 1320 ///print("Line number: 1320"); // GOTO 100 engineScript.gameState = "line_100"; }
public void line_2300() { // Have all been scanned? //print( "Line number: 2300" ); //print("CP: " + engineScript.tableIndex_CP + ", " + "Actions: " + editorScript.numberOfActions_A); if (engineScript.tableIndex_CP <= editorScript.numberOfActions_A - 1) { engineScript.gameState = "line_2400"; // GOTO 2400 return; } // 2310 // Has a match been found? //print("Line number: 2310"); bool matchFound = Convert.ToBoolean(engineScript.matchFound_MATCH); if (matchFound) { engineScript.gameState = "line_1000"; // GOTO 1000 return; } // 2320 string playerMessage = "You cannot"; // 2330 int validDirection; int.TryParse(engineScript.keyword_Ps[KEYWORD_ONE], out validDirection); if (validDirection < 13) { playerMessage = playerMessage + " go that way"; } // 2340 playerMessage = playerMessage + "."; dialogScript.outputDialog(""); dialogScript.outputDialog(playerMessage); // 2350 // GOTO 100 engineScript.gameState = "line_100"; }
public void line_1140() { //CLS // 1150 // Command index - Y //print( "Line number: 1150" ); engineScript.commandIndex_Y = 0; //print("Y = " + engineScript.commandIndex_Y); // 1160 dialogScript.outputDialog(""); dialogScript.outputDialog(">> " + engineScript.command_Ys); // 1170 //print( "Line number: 1170" ); engineScript.keyword_Ps[KEYWORD_TWO] = "00"; // GOTO 1200 engineScript.gameState = "line_1200"; }
public void line_1100() { if (engineScript.counter_C[COMMAND_ONE] > 0) { engineScript.counter_C[COMMAND_ONE] = engineScript.counter_C[COMMAND_ONE] - 1; } // 1110 if (engineScript.counter_C[COMMAND_TWO] > 0) { engineScript.counter_C[COMMAND_TWO] = engineScript.counter_C[COMMAND_TWO] - 1; } // 1120 dialogScript.outputDialog(""); dialogScript.outputDialog("What do you wish to do?"); // 1130 // Input command - Y$ engineScript.machineState = AdventureEngine.Turns.Player; }
public void line_300() { // Reset object flag - F //print( "Line number: 300" ); engineScript.objectFound_F = 0; // 310 // Describe any objects here //print( "Line number: 310" ); for (int objectCount = 1; objectCount <= editorScript.numberOfObjects_O - 1; objectCount++) { // 320 //print( "Line number: 320" ); if (editorScript.gameObject_O[objectCount] == engineScript.playerLocation_ROOM) { if (engineScript.objectFound_F == 0) { // 340 //print( "Line number: 340" ); dialogScript.outputDialog(""); dialogScript.outputDialog("There is also:"); } // 350 //print( "Line number: 350" ); // Set object found flag engineScript.objectFound_F = 1; // 400 //print( "Line number: 400" ); dialogScript.outputDialog(" " + editorScript.objectDescription_Os[objectCount]); } // 500 } // GOTO 1000 engineScript.gameState = "line_1000"; }
// 4000 // Action A // Display a list of the objects the player is carrying public void Action_A() { dialogScript.outputDialog(""); // 4010 //dialogScript.outputDialog( "You are holding:" ); // 4020 engineScript.objectFound_F = 0; // 4030 for (int objectCount = 1; objectCount <= editorScript.numberOfObjects_O - 1; objectCount++) { if (editorScript.gameObject_O[objectCount] == -1) { if (engineScript.objectFound_F == 0) { // 4000 dialogScript.outputDialog(""); // 4010 dialogScript.outputDialog("You are carrying:"); } // 4060 engineScript.objectFound_F = 1; // 4050 dialogScript.outputDialog(" " + editorScript.objectDescription_Os[objectCount]); } // 4070 } // 4080 bool objectFound = Convert.ToBoolean(engineScript.objectFound_F); if (objectFound) { // 4090 // GOTO 100 engineScript.BREAK = 100; return; } else { dialogScript.outputDialog("You are not carrying anything."); // 4090 // GOTO 100 engineScript.BREAK = 100; } }