Beispiel #1
0
        public override int Proc(Armor armor, Character attacker, Character defender, int damage)
        {
            if (Dungeon.BossLevel())
            {
                return(damage);
            }

            var nTries = (armor.level < 0 ? 1 : armor.level + 1) * 5;

            for (var i = 0; i < nTries; i++)
            {
                var pos = pdsharp.utils.Random.Int(Level.Length);

                if (!Dungeon.Visible[pos] || !Level.passable[pos] || Actor.FindChar(pos) != null)
                {
                    continue;
                }

                WandOfBlink.Appear(defender, pos);
                Dungeon.Level.Press(pos, defender);
                Dungeon.Observe();

                break;
            }

            return(damage);
        }
Beispiel #2
0
        private static readonly Mob Dummy; // = new Mob();

        // 0x770088
        public static void Trigger(int pos, Character c)
        {
            if (Dungeon.BossLevel())
            {
                return;
            }

            if (c != null)
            {
                Actor.OccupyCell(c);
            }

            var nMobs = 1;

            if (Random.Int(2) == 0)
            {
                nMobs++;
                if (Random.Int(2) == 0)
                {
                    nMobs++;
                }
            }

            // It's complicated here, because these traps can be activated in chain
            var candidates = new List <int>();

            foreach (var neighbour in Level.NEIGHBOURS8)
            {
                var p = pos + neighbour;
                if (Actor.FindChar(p) == null && (Level.passable[p] || Level.avoid[p]))
                {
                    candidates.Add(p);
                }
            }

            var respawnPoints = new List <int>();

            while (nMobs > 0 && candidates.Count > 0)
            {
                var index = Random.Index(candidates);

                Dummy.pos = candidates[index];
                Actor.OccupyCell(Dummy);

                var cand = candidates[index];
                candidates.RemoveAt(index);
                respawnPoints.Add(cand);

                nMobs--;
            }

            foreach (var point in respawnPoints)
            {
                var mob = Bestiary.Mob(Dungeon.Depth);
                mob.State = mob.WANDERING;
                GameScene.Add(mob, Delay);
                WandOfBlink.Appear(mob, point);
            }
        }
Beispiel #3
0
        public override void Execute(Hero hero, string action)
        {
            if (action == AcSet || action == AcReturn)
            {
                if (Dungeon.BossLevel())
                {
                    hero.Spend(TimeToUse);
                    GLog.Warning(TxtPreventing);
                    return;
                }

                for (var i = 0; i < Level.NEIGHBOURS8.Length; i++)
                {
                    if (Actor.FindChar(hero.pos + Level.NEIGHBOURS8[i]) == null)
                    {
                        continue;
                    }

                    GLog.Warning(TxtCreatures);
                    return;
                }
            }

            switch (action)
            {
            case AcSet:
                _returnDepth = Dungeon.Depth;
                _returnPos   = hero.pos;
                hero.Spend(TimeToUse);
                hero.Busy();
                hero.Sprite.DoOperate(hero.pos);
                Sample.Instance.Play(Assets.SND_BEACON);
                GLog.Information(TxtReturn);
                break;

            case AcReturn:
                if (_returnDepth == Dungeon.Depth)
                {
                    Reset();
                    WandOfBlink.Appear(hero, _returnPos);
                    Dungeon.Level.Press(_returnPos, hero);
                    Dungeon.Observe();
                }
                else
                {
                    InterlevelScene.mode        = InterlevelScene.Mode.RETURN;
                    InterlevelScene.returnDepth = _returnDepth;
                    InterlevelScene.returnPos   = _returnPos;
                    Reset();
                    Game.SwitchScene <InterlevelScene>();
                }
                break;

            default:
                base.Execute(hero, action);
                break;
            }
        }
Beispiel #4
0
        private void Resurrect()
        {
            Actor.FixTime();

            if (Dungeon.BossLevel())
            {
                Dungeon.Hero.Resurrect(Dungeon.Depth);
                Dungeon.Depth--;
                var level = Dungeon.NewLevel(); // true
                Dungeon.SwitchLevel(level, level.entrance);
            }
            else
            {
                Dungeon.Hero.Resurrect(-1);
                Dungeon.ResetLevel();
            }
        }
Beispiel #5
0
        public override void Create()
        {
            Music.Instance.Play(Assets.TUNE, true);
            Music.Instance.Volume(1f);

            PixelDungeon.LastClass(Dungeon.Hero.heroClass.Ordinal());

            base.Create();
            Camera.Main.ZoomTo(defaultZoom + PixelDungeon.Zoom());

            Scene = this;

            _terrain = new Group();
            Add(_terrain);

            _water = new SkinnedBlock(levels.Level.Width * DungeonTilemap.Size, Level.Height * DungeonTilemap.Size, Dungeon.Level.WaterTex());
            _terrain.Add(_water);

            _ripples = new Group();
            _terrain.Add(_ripples);

            _tiles = new DungeonTilemap();
            _terrain.Add(_tiles);

            Dungeon.Level.AddVisuals(this);

            _plants = new Group();
            Add(_plants);

            foreach (var plant in Dungeon.Level.plants.Values)
            {
                AddPlantSprite(plant);
            }

            _heaps = new Group();
            Add(_heaps);

            foreach (var heap in Dungeon.Level.heaps.Values)
            {
                AddHeapSprite(heap);
            }

            _emitters = new Group();
            _effects  = new Group();
            _emoicons = new Group();

            _mobs = new Group();
            Add(_mobs);

            foreach (var mob in Dungeon.Level.mobs)
            {
                AddMobSprite(mob);
                if (Statistics.AmuletObtained)
                {
                    mob.Beckon(Dungeon.Hero.pos);
                }
            }

            Add(_emitters);
            Add(_effects);

            _gases = new Group();
            Add(_gases);

            foreach (var blob in Dungeon.Level.Blobs.Values)
            {
                blob.Emitter = null;
                AddBlobSprite(blob);
            }

            _fog = new FogOfWar(Level.Width, Level.Height);
            _fog.UpdateVisibility(Dungeon.Visible, Dungeon.Level.visited, Dungeon.Level.mapped);
            Add(_fog);

            Brightness(PixelDungeon.Brightness());

            _spells = new Group();
            Add(_spells);

            _statuses = new Group();
            Add(_statuses);

            Add(_emoicons);

            _hero = new HeroSprite();
            _hero.Place(Dungeon.Hero.pos);
            _hero.UpdateArmor();
            _mobs.Add(_hero);


            Add(new HealthIndicator());

            Add(_cellSelector = new CellSelector(_tiles));

            var sb = new StatusPane();

            sb.Camera = uiCamera;
            sb.SetSize(uiCamera.CameraWidth, 0);
            Add(sb);

            _toolbar        = new Toolbar();
            _toolbar.Camera = uiCamera;
            _toolbar.SetRect(0, uiCamera.CameraHeight - _toolbar.Height, uiCamera.CameraWidth, _toolbar.Height);
            Add(_toolbar);

            var attack = new AttackIndicator();

            attack.Camera = uiCamera;
            attack.SetPos(uiCamera.CameraWidth - attack.Width, _toolbar.Top() - attack.Height);
            Add(attack);

            _log        = new GameLog();
            _log.Camera = uiCamera;
            _log.SetRect(0, _toolbar.Top(), attack.Left(), 0);
            Add(_log);

            if (Dungeon.Depth < Statistics.DeepestFloor)
            {
                GLog.Information(TxtWelcomeBack, Dungeon.Depth);
            }
            else
            {
                GLog.Information(TxtWelcome, Dungeon.Depth);
                Sample.Instance.Play(Assets.SND_DESCEND);
            }

            switch (Dungeon.Level.feeling)
            {
            case Level.Feeling.CHASM:
                GLog.Warning(TxtChasm);
                break;

            case Level.Feeling.WATER:
                GLog.Warning(TxtWater);
                break;

            case Level.Feeling.GRASS:
                GLog.Warning(TxtGrass);
                break;
            }

            if (Dungeon.Level is RegularLevel && ((RegularLevel)Dungeon.Level).SecretDoors > pdsharp.utils.Random.IntRange(3, 4))
            {
                GLog.Warning(TxtSecrets);
            }

            if (Dungeon.NightMode && !Dungeon.BossLevel())
            {
                GLog.Warning(TxtNightMode);
            }

            _busy        = new BusyIndicator();
            _busy.Camera = uiCamera;
            _busy.X      = 1;
            _busy.Y      = sb.Bottom() + 1;
            Add(_busy);

            switch (InterlevelScene.mode)
            {
            case InterlevelScene.Mode.RESURRECT:
                WandOfBlink.Appear(Dungeon.Hero, Dungeon.Level.entrance);
                new Flare(8, 32).Color(0xFFFF66, true).Show(_hero, 2f);
                break;

            case InterlevelScene.Mode.RETURN:
                WandOfBlink.Appear(Dungeon.Hero, Dungeon.Hero.pos);
                break;

            case InterlevelScene.Mode.FALL:
                Chasm.HeroLand();
                break;

            case InterlevelScene.Mode.DESCEND:
                switch (Dungeon.Depth)
                {
                case 1:
                    WndStory.ShowChapter(WndStory.ID_SEWERS);
                    break;

                case 6:
                    WndStory.ShowChapter(WndStory.ID_PRISON);
                    break;

                case 11:
                    WndStory.ShowChapter(WndStory.ID_CAVES);
                    break;

                case 16:
                    WndStory.ShowChapter(WndStory.ID_METROPOLIS);
                    break;

                case 22:
                    WndStory.ShowChapter(WndStory.ID_HALLS);
                    break;
                }

                if (Dungeon.Hero.IsAlive && Dungeon.Depth != 22)
                {
                    Badge.ValidateNoKilling();
                }

                break;
            }

            Camera.Main.Target = _hero;

            //var m = new string[Level.Width];
            //var b = new StringBuilder();
            //for (var i = 0; i < Level.passable.Length; i++)
            //{
            //    var cx = i % Level.Width;
            //    var cy = i / Level.Width;
            //    if (i == Dungeon.Hero.pos)
            //    {
            //        m[cx] += "H";
            //        continue;
            //    }

            //    if (Level.passable[i])
            //        m[cx] += ".";
            //    else
            //        m[cx] += "#";
            //}
            //foreach (var s in m)
            //    b.AppendLine(s);
            //Debug.WriteLine(b);

            //for (var i = 0; i < Dungeon.Level.mapped.Length; i++)
            //    Dungeon.Level.mapped[i] = true;

            FadeIn();
        }
Beispiel #6
0
        public override void Paint(Level level, Room room)
        {
            int[] traps = { Terrain.TOXIC_TRAP, Terrain.TOXIC_TRAP, Terrain.TOXIC_TRAP, Terrain.PARALYTIC_TRAP, Terrain.PARALYTIC_TRAP, !Dungeon.BossLevel(Dungeon.Depth + 1) ? Terrain.CHASM : Terrain.SUMMONING_TRAP };

            Fill(level, room, Terrain.WALL);
            Fill(level, room, 1, pdsharp.utils.Random.Element(traps));

            var door = room.Entrance();

            door.Set(Room.Door.DoorType.REGULAR);

            var lastRow = level.map[room.Left + 1 + (room.Top + 1) * Level.Width] == Terrain.CHASM ? Terrain.CHASM : Terrain.EMPTY;

            var x = -1;
            var y = -1;

            if (door.X == room.Left)
            {
                x = room.Right - 1;
                y = room.Top + room.Height() / 2;
                Fill(level, x, room.Top + 1, 1, room.Height() - 1, lastRow);
            }
            else if (door.X == room.Right)
            {
                x = room.Left + 1;
                y = room.Top + room.Height() / 2;
                Fill(level, x, room.Top + 1, 1, room.Height() - 1, lastRow);
            }
            else if (door.Y == room.Top)
            {
                x = room.Left + room.Width() / 2;
                y = room.Bottom - 1;
                Fill(level, room.Left + 1, y, room.Width() - 1, 1, lastRow);
            }
            else if (door.Y == room.Bottom)
            {
                x = room.Left + room.Width() / 2;
                y = room.Top + 1;
                Fill(level, room.Left + 1, y, room.Width() - 1, 1, lastRow);
            }

            var pos = x + y * Level.Width;

            if (Random.Int(3) == 0)
            {
                if (lastRow == Terrain.CHASM)
                {
                    Set(level, pos, Terrain.EMPTY);
                }
                level.Drop(Prize(level), pos).HeapType = Heap.Type.Chest;
            }
            else
            {
                Set(level, pos, Terrain.PEDESTAL);
                level.Drop(Prize(level), pos);
            }

            level.AddItemToSpawn(new PotionOfLevitation());
        }
Beispiel #7
0
        public override void Paint(Level level, Room room)
        {
            Fill(level, room, Terrain.WALL);
            foreach (var door in room.Connected.Values)
            {
                door.Set(Room.Door.DoorType.REGULAR);
            }

            if (!Dungeon.BossLevel() && Random.Int(5) == 0)
            {
                switch (Random.Int(6))
                {
                case 0:
                    if (level.feeling != Level.Feeling.GRASS)
                    {
                        if (Math.Min(room.Width(), room.Height()) >= 4 && Math.Max(room.Width(), room.Height()) >= 6)
                        {
                            PaintGraveyard(level, room);
                            return;
                        }
                    }

                    break;

                case 1:
                    if (Dungeon.Depth > 1)
                    {
                        PaintBurned(level, room);
                        return;
                    }
                    break;

                case 2:
                    if (Math.Max(room.Width(), room.Height()) >= 4)
                    {
                        PaintStriped(level, room);
                        return;
                    }
                    break;

                case 3:
                    if (room.Width() >= 6 && room.Height() >= 6)
                    {
                        PaintStudy(level, room);
                        return;
                    }
                    break;

                case 4:
                    if (level.feeling != Level.Feeling.WATER)
                    {
                        if (room.Connected.Count == 2 && room.Width() >= 4 && room.Height() >= 4)
                        {
                            PaintBridge(level, room);
                            return;
                        }
                    }
                    break;

                case 5:
                    if (!Dungeon.BossLevel() && !Dungeon.BossLevel(Dungeon.Depth + 1) && Math.Min(room.Width(), room.Height()) >= 5)
                    {
                        PaintFissure(level, room);
                        return;
                    }
                    break;
                }
            }

            Fill(level, room, 1, Terrain.EMPTY);
        }
Beispiel #8
0
        private static void PaintBridge(Level level, Room room)
        {
            Fill(level, room.Left + 1, room.Top + 1, room.Width() - 1, room.Height() - 1, !Dungeon.BossLevel() && !Dungeon.BossLevel(Dungeon.Depth + 1) && Random.Int(3) == 0 ? Terrain.CHASM : Terrain.WATER);

            Point door1 = null;
            Point door2 = null;

            foreach (var p in room.Connected.Values)
            {
                if (door1 == null)
                {
                    door1 = p;
                }
                else
                {
                    door2 = p;
                }
            }

            if ((door1.X == room.Left && door2.X == room.Right) || (door1.X == room.Right && door2.X == room.Left))
            {
                var s = room.Width() / 2;

                DrawInside(level, room, door1, s, Terrain.EMPTY_SP);
                DrawInside(level, room, door2, s, Terrain.EMPTY_SP);
                Fill(level, room.Center().X, Math.Min(door1.Y, door2.Y), 1, Math.Abs(door1.Y - door2.Y) + 1, Terrain.EMPTY_SP);
            }
            else
            if ((door1.Y == room.Top && door2.Y == room.Bottom) || (door1.Y == room.Bottom && door2.Y == room.Top))
            {
                int s = room.Height() / 2;

                DrawInside(level, room, door1, s, Terrain.EMPTY_SP);
                DrawInside(level, room, door2, s, Terrain.EMPTY_SP);
                Fill(level, Math.Min(door1.X, door2.X), room.Center().Y, Math.Abs(door1.X - door2.X) + 1, 1, Terrain.EMPTY_SP);
            }
            else
            if (door1.X == door2.X)
            {
                Fill(level, door1.X == room.Left ? room.Left + 1 : room.Right - 1, Math.Min(door1.Y, door2.Y), 1, Math.Abs(door1.Y - door2.Y) + 1, Terrain.EMPTY_SP);
            }
            else
            if (door1.Y == door2.Y)
            {
                Fill(level, Math.Min(door1.X, door2.X), door1.Y == room.Top ? room.Top + 1 : room.Bottom - 1, Math.Abs(door1.X - door2.X) + 1, 1, Terrain.EMPTY_SP);
            }
            else
            if (door1.Y == room.Top || door1.Y == room.Bottom)
            {
                DrawInside(level, room, door1, Math.Abs(door1.Y - door2.Y), Terrain.EMPTY_SP);
                DrawInside(level, room, door2, Math.Abs(door1.X - door2.X), Terrain.EMPTY_SP);
            }
            else
            if (door1.X == room.Left || door1.X == room.Right)
            {
                DrawInside(level, room, door1, Math.Abs(door1.X - door2.X), Terrain.EMPTY_SP);
                DrawInside(level, room, door2, Math.Abs(door1.Y - door2.Y), Terrain.EMPTY_SP);
            }
        }
Beispiel #9
0
        protected internal override void Decorate()
        {
            foreach (var room in Rooms)
            {
                if (room.type != RoomType.STANDARD)
                {
                    continue;
                }

                if (room.Width() <= 3 || room.Height() <= 3)
                {
                    continue;
                }

                var s = room.Square();

                if (Random.Int(s) > 8)
                {
                    var corner = (room.Left + 1) + (room.Top + 1) * Width;
                    if (map[corner - 1] == Terrain.WALL && map[corner - Width] == Terrain.WALL)
                    {
                        map[corner] = Terrain.WALL;
                    }
                }

                if (Random.Int(s) > 8)
                {
                    var corner = (room.Right - 1) + (room.Top + 1) * Width;
                    if (map[corner + 1] == Terrain.WALL && map[corner - Width] == Terrain.WALL)
                    {
                        map[corner] = Terrain.WALL;
                    }
                }

                if (Random.Int(s) > 8)
                {
                    var corner = (room.Left + 1) + (room.Bottom - 1) * Width;
                    if (map[corner - 1] == Terrain.WALL && map[corner + Width] == Terrain.WALL)
                    {
                        map[corner] = Terrain.WALL;
                    }
                }

                if (Random.Int(s) > 8)
                {
                    var corner = (room.Right - 1) + (room.Bottom - 1) * Width;
                    if (map[corner + 1] == Terrain.WALL && map[corner + Width] == Terrain.WALL)
                    {
                        map[corner] = Terrain.WALL;
                    }
                }

                foreach (var n in room.Connected.Keys)
                {
                    if ((n.type == RoomType.STANDARD || n.type == RoomType.TUNNEL) && Random.Int(3) == 0)
                    {
                        Painter.Set(this, room.Connected[n], Terrain.EMPTY_DECO);
                    }
                }
            }

            for (var i = Width + 1; i < Length - Width; i++)
            {
                if (map[i] != Terrain.EMPTY)
                {
                    continue;
                }

                var n = 0;
                if (map[i + 1] == Terrain.WALL)
                {
                    n++;
                }

                if (map[i - 1] == Terrain.WALL)
                {
                    n++;
                }

                if (map[i + Width] == Terrain.WALL)
                {
                    n++;
                }

                if (map[i - Width] == Terrain.WALL)
                {
                    n++;
                }

                if (Random.Int(6) <= n)
                {
                    map[i] = Terrain.EMPTY_DECO;
                }
            }

            for (var i = 0; i < Length; i++)
            {
                if (map[i] == Terrain.WALL && Random.Int(12) == 0)
                {
                    map[i] = Terrain.WALL_DECO;
                }
            }

            while (true)
            {
                var pos = RoomEntrance.Random();

                if (pos == entrance)
                {
                    continue;
                }

                map[pos] = Terrain.SIGN;
                break;
            }

            if (Dungeon.BossLevel(Dungeon.Depth + 1))
            {
                return;
            }

            foreach (var r in Rooms)
            {
                if (r.type != RoomType.STANDARD)
                {
                    continue;
                }

                foreach (var n in r.Neigbours)
                {
                    if (n.type != RoomType.STANDARD || r.Connected.ContainsKey(n))
                    {
                        continue;
                    }

                    var w = r.Intersect(n);
                    if (w.Left == w.Right && w.Bottom - w.Top >= 5)
                    {
                        w.Top    += 2;
                        w.Bottom -= 1;

                        w.Right++;

                        Painter.Fill(this, w.Left, w.Top, 1, w.Height(), Terrain.CHASM);
                    }
                    else
                    if (w.Top == w.Bottom && w.Right - w.Left >= 5)
                    {
                        w.Left  += 2;
                        w.Right -= 1;

                        w.Bottom++;

                        Painter.Fill(this, w.Left, w.Top, w.Width(), 1, Terrain.CHASM);
                    }
                }
            }
        }
Beispiel #10
0
        public virtual void Create()
        {
            resizingNeeded = false;

            map     = new int[Length];
            visited = new bool[Length];
            mapped  = new bool[Length];

            mobs   = new HashSet <Mob>();
            heaps  = new SparseArray <Heap>();
            Blobs  = new Dictionary <Type, Blob>();
            plants = new SparseArray <Plant>();

            if (!Dungeon.BossLevel())
            {
                AddItemToSpawn(Generator.Random(Generator.Category.FOOD));
#if !DEBUG
                if (Dungeon.PosNeeded())
                {
                    AddItemToSpawn(new PotionOfStrength());
                    Dungeon.PotionOfStrength++;
                }
                if (Dungeon.SoeNeeded())
                {
                    AddItemToSpawn(new ScrollOfUpgrade());
                    Dungeon.ScrollsOfUpgrade++;
                }
                if (Dungeon.AsNeeded())
                {
                    AddItemToSpawn(new Stylus());
                    Dungeon.ArcaneStyli++;
                }

                if (Dungeon.Depth > 1)
                {
                    switch (pdsharp.utils.Random.Int(10))
                    {
                    case 0:
                        if (!Dungeon.BossLevel(Dungeon.Depth + 1))
                        {
                            feeling = Feeling.CHASM;
                        }
                        break;

                    case 1:
                        feeling = Feeling.WATER;
                        break;

                    case 2:
                        feeling = Feeling.GRASS;
                        break;
                    }
                }
#endif
            }


            var pitNeeded = Dungeon.Depth > 1 && weakFloorCreated;

            do
            {
                var terrain = feeling == Feeling.CHASM ? Terrain.CHASM : Terrain.WALL;
                for (var i = 0; i < map.Length; i++)
                {
                    map[i] = terrain;
                }

                pitRoomNeeded    = pitNeeded;
                weakFloorCreated = false;
            }while (!Build());

            Decorate();

            BuildFlagMaps();
            CleanWalls();

            CreateMobs();
            CreateItems();
        }
Beispiel #11
0
        protected override bool Build()
        {
            if (!InitRooms())
            {
                return(false);
            }

            int distance;
            var retry       = 0;
            var minDistance = (int)Math.Sqrt(Rooms.Count);

            do
            {
                do
                {
                    RoomEntrance = Random.Element(Rooms);
                }while (RoomEntrance.Width() < 4 || RoomEntrance.Height() < 4);

                do
                {
                    RoomExit = Random.Element(Rooms);
                }while (RoomExit == RoomEntrance || RoomExit.Width() < 4 || RoomExit.Height() < 4);

                Graph.BuildDistanceMap(Rooms, RoomExit);
                distance = RoomEntrance.Distance();

                if (retry++ > 10)
                {
                    return(false);
                }
            }while (distance < minDistance);

            RoomEntrance.type = RoomType.ENTRANCE;
            RoomExit.type     = RoomType.EXIT;

            var connected = new List <Room>();

            connected.Add(RoomEntrance);

            Graph.BuildDistanceMap(Rooms, RoomExit);
            var path = Graph.BuildPath(Rooms, RoomEntrance, RoomExit);

            var room = RoomEntrance;

            foreach (var next in path)
            {
                room.Connect(next);
                room = next;
                connected.Add(room);
            }

            Graph.SetPrice(path, RoomEntrance.distance);

            Graph.BuildDistanceMap(Rooms, RoomExit);
            path = Graph.BuildPath(Rooms, RoomEntrance, RoomExit);

            room = RoomEntrance;
            foreach (var next in path)
            {
                room.Connect(next);
                room = next;
                connected.Add(room);
            }

            var nConnected = (int)(Rooms.Count * Random.Float(0.5f, 0.7f));

            while (connected.Count < nConnected)
            {
                var cr = Random.Element(connected);
                var or = Random.Element(cr.Neigbours);

                if (connected.Contains(or))
                {
                    continue;
                }

                cr.Connect(or);
                connected.Add(or);
            }

            if (Dungeon.ShopOnLevel())
            {
                var shop = RoomEntrance.Connected.Keys.FirstOrDefault(r => r.Connected.Count == 1 && r.Width() >= 5 && r.Height() >= 5);

                if (shop == null)
                {
                    return(false);
                }
                shop.type = RoomType.SHOP;
            }

            Specials = new List <RoomType>(levels.Room.SPECIALS);
            if (Dungeon.BossLevel(Dungeon.Depth + 1))
            {
                Specials.Remove(RoomType.WEAK_FLOOR);
            }
            AssignRoomType();

            Paint();
            PaintWater();
            PaintGrass();

            PlaceTraps();

            return(true);
        }