Ejemplo n.º 1
0
        public Rooms(int id, string roomname, string description, int exitN, int exitE, int exitS, int exitW, int mobId)
        {
            RoomName    = roomname;
            Description = description;
            ID          = id;
            ExitEast    = exitE;
            ExitNorth   = exitN;
            ExitWest    = exitW;
            ExitSouth   = exitS;

            // Adding a random monster to the list to use later inside of rooms
            if (mobId != 4)
            {
                if (mobId > 1)
                {
                    Random rand = new Random();

                    int getNewMob = rand.Next(0, 4);
                    RoomsMob = new Mobs(IDA.Mob[getNewMob]);
                    RoomMobs.Add(RoomsMob);
                }
            }
            else
            {
                RoomMobs.Add(IDA.FindMobID(mobId));
            }
        }
Ejemplo n.º 2
0
        public static void lookForVerb(string noun)
        {
            Mobs lookForMob = IDA.FindMobName(noun);

            if (lookForMob != null)
            {
                foreach (Mobs mob in Player.CurrentRoom.RoomMobs.ToList())
                {
                    if (mob.Name == lookForMob.Name)
                    {
                        MobFound(mob);
                    }
                }
            }
        }