Ejemplo n.º 1
0
 //Checking the player's inventory status on entering Demon Room
 public string CheckRoom5Condition(int currentRoomCopy, string[] roomDescriptions, Adventure adventObj)
 {
     if ((currentRoomCopy == 5) && (adventObj.playerSword == false || adventObj.playerShield == false || adventObj.playerEnergy == false))
     {
         return(roomDescriptions[4] + "\n" + roomDescriptions[5]);
     }
     else if ((currentRoomCopy == 5) && (adventObj.playerSword == true && adventObj.playerShield == true && adventObj.playerEnergy == true))
     {
         return(roomDescriptions[4] + "\n" + roomDescriptions[6]);
     }
     else
     {
         return("");
     }
 }