public static bool MoveEast() { Room temp = Program.ObteJuego().pl.currentRoom.GetEastRoom(); if (temp != null) { if (temp.GetType() == typeof(RoomClosed) && ((RoomClosed)temp).IsClosed()) { if (RoomClosed.UseKey()) { ((RoomClosed)temp).OpenRoom(); if (Program.ObteJuego().pl.GetMaldicion(4)) { Program.ObteJuego().pl.currentRoom.SetVisible(0); } Program.ObteJuego().pl.currentRoom = temp; ConsoleBuffer.ObteBuffer().InsertText("Vas al este"); Program.ObteJuego().pl.lastRoom = 1; return(true); } else { if (!Program.ObteJuego().pl.GetMaldicion(4)) { temp.SetVisible(1); } return(false); } } else { if (Program.ObteJuego().pl.GetMaldicion(4)) { Program.ObteJuego().pl.currentRoom.SetVisible(0); } Program.ObteJuego().pl.currentRoom = temp; ConsoleBuffer.ObteBuffer().InsertText("Vas al este"); Program.ObteJuego().pl.lastRoom = 1; return(true); } } else { ConsoleBuffer.ObteBuffer().InsertText("No hay habitación al este"); return(false); } }
public static bool MoveSouth() { Room temp = Program.pl.currentRoom.GetSouthRoom(); if (temp != null) { if (temp.GetType() == typeof(RoomClosed) && ((RoomClosed)temp).IsClosed()) { if (RoomClosed.UseKey()) { ((RoomClosed)temp).OpenRoom(); if (Program.pl.GetMaldicion(4)) { Program.pl.currentRoom.SetVisible(0); } Program.pl.currentRoom = temp; Program.buffer.InsertText("Vas al sur"); Program.pl.lastRoom = 0; return(true); } else { if (!Program.pl.GetMaldicion(4)) { temp.SetVisible(1); } return(false); } } else { if (Program.pl.GetMaldicion(4)) { Program.pl.currentRoom.SetVisible(0); } Program.pl.currentRoom = temp; Program.buffer.InsertText("Vas al sur"); Program.pl.lastRoom = 0; return(true); } } else { Program.buffer.InsertText("No hay habitación al sur"); return(false); } }