Esempio n. 1
0
 /// <summary>
 /// This method determines if the exit is currently passable. This is primarily to detect if
 ///     1) Hidden exits have been exposed -or-
 ///     2) Key/Door/Gate exits have been opened
 /// This will make no attempt to determine if the player has enough money or is the right
 /// level/class/race/item to enter the exit. Those parameters should have already been verified via
 /// the pathfinding algorithm.
 /// </summary>
 /// <param name="room"></param>
 /// <returns></returns>
 public virtual bool IsCurrentlyPassable(MajorModelEntities model, SeenRoom room)
 {
     if (room.Exits.Any(x => x.Equals(model.PlainExitNames[(int)Direction], StringComparison.InvariantCultureIgnoreCase)))
     {
         return(true);
     }
     return(false);
 }
Esempio n. 2
0
        public override bool IsCurrentlyPassable(MajorModelEntities model, SeenRoom room)
        {
            var regex = KeyExitData.GetBarrierExitRegex(model, this, BarrierState.Open);

            if (room.Exits.Any(x => regex.IsMatch(x)))
            {
                return(true);
            }
            return(false);
        }
        public override bool IsCurrentlyPassable(MajorModelEntities model, SeenRoom room)
        {
            string exitName = ExitName(model);

            if (room.Exits.Any(x => x.Equals(exitName, StringComparison.InvariantCultureIgnoreCase)))
            {
                return(true);
            }
            return(false);
        }