Ejemplo n.º 1
0
        private bool TryPlacePlant()
        {
            Point pos = Tilemap.RandomPosition(ChamberTree.GetRandomChamber());

            if (CanPlaceCreature(pos))
            {
                new HealingPlant(this, pos);
                return(true);
            }
            return(false);
        }
Ejemplo n.º 2
0
        private bool TryPlaceItem()
        {
            Point pos = Tilemap.RandomPosition(ChamberTree.GetRandomChamber());

            if (CanPlaceItem(pos))
            {
                dungeon.Generator.NewWeapon(this, pos, LevelIndex);
                return(true);
            }
            return(false);
        }
Ejemplo n.º 3
0
        private bool TryPlaceMonster()
        {
            Point pos = Tilemap.RandomPosition(ChamberTree.GetRandomChamber());

            if (CanPlaceCreature(pos))
            {
                Generator.NewRandomMonster(this, pos, LevelIndex);
                return(true);
            }
            return(false);
        }
Ejemplo n.º 4
0
        private bool TryPlaceStairsDown()
        {
            Point pos  = ChamberTree.GetRandomChamber().Center;
            Tile  tile = Tilemap.GetTile(pos);

            if (tile.Type != Tile.TileType.wall)
            {
                Tilemap.SetTile(pos, Tile.TileType.exit);
                Exit = new Point(pos.X, pos.Y);
                return(true);
            }
            return(false);
        }