Exemplo n.º 1
0
        private static ObjectsPattern CreateGoldenChest()
        {
            var pattern = new ObjectsPattern(3, 3, 0.001);

            pattern.Add(1, 1, (level) => new ContainerObject(new ContainerObjectConfiguration
            {
                Name               = "Chest",
                BlocksMovement     = true,
                MaxHealth          = 30,
                Size               = ObjectSize.Big,
                ZIndex             = ZIndex.BigDecoration,
                MinWoodCount       = 1,
                MaxWoodCount       = 4,
                ContainerType      = "chest",
                LootLevelIncrement = 2,
                WorldImage         = "Furniture_Chest_Golden"
            }, level));

            pattern.AddRequirement(1, 1, RequirementIsEmpty);

            pattern.AddRequirement(0, 0, RequirementNotBlocking);
            pattern.AddRequirement(1, 0, RequirementNotBlocking);
            pattern.AddRequirement(2, 0, RequirementNotBlocking);

            pattern.AddRequirement(0, 1, RequirementNotBlocking);
            pattern.AddRequirement(2, 1, RequirementNotBlocking);

            pattern.AddRequirement(0, 2, RequirementNotBlocking);
            pattern.AddRequirement(1, 2, RequirementNotBlocking);
            pattern.AddRequirement(2, 2, RequirementNotBlocking);

            return(pattern);
        }
Exemplo n.º 2
0
        private static ObjectsPattern CreateTableWithChairs()
        {
            var pattern = new ObjectsPattern(5, 3, 0.0007);

            pattern.Add(1, 1, (level) => new FurnitureObject(new FurnitureObjectConfiguration
            {
                Name         = "Chair",
                MaxHealth    = 10,
                MaxWoodCount = 2,
                MinWoodCount = 0,
                Size         = ObjectSize.Medium,
                ZIndex       = ZIndex.BigDecoration,
                WorldImage   = "Furniture_Chair_Right"
            }));
            pattern.Add(2, 1, (level) => new FurnitureObject(new FurnitureObjectConfiguration
            {
                Name           = "Table",
                MaxHealth      = 20,
                MaxWoodCount   = 4,
                MinWoodCount   = 1,
                Size           = ObjectSize.Big,
                ZIndex         = ZIndex.BigDecoration,
                BlocksMovement = true,
                WorldImage     = "Furniture_Table"
            }));
            pattern.Add(3, 1, (level) => new FurnitureObject(new FurnitureObjectConfiguration
            {
                Name         = "Chair",
                MaxHealth    = 10,
                MaxWoodCount = 2,
                MinWoodCount = 0,
                Size         = ObjectSize.Medium,
                ZIndex       = ZIndex.BigDecoration,
                WorldImage   = "Furniture_Chair_Left"
            }));

            pattern.AddRequirement(0, 0, RequirementIsEmpty);
            pattern.AddRequirement(1, 0, RequirementIsEmpty);
            pattern.AddRequirement(2, 0, RequirementIsEmpty);
            pattern.AddRequirement(3, 0, RequirementIsEmpty);
            pattern.AddRequirement(4, 0, RequirementIsEmpty);

            pattern.AddRequirement(0, 2, RequirementIsEmpty);
            pattern.AddRequirement(1, 2, RequirementIsEmpty);
            pattern.AddRequirement(2, 2, RequirementIsEmpty);
            pattern.AddRequirement(3, 2, RequirementIsEmpty);
            pattern.AddRequirement(4, 2, RequirementIsEmpty);

            return(pattern);
        }
Exemplo n.º 3
0
        private static ObjectsPattern CreateStone()
        {
            var pattern = new ObjectsPattern(1, 1, 0.03);

            pattern.Add(0, 0, level => new Stone());
            pattern.AddRequirement(0, 0, RequirementIsEmpty);
            return(pattern);
        }
Exemplo n.º 4
0
        private static ObjectsPattern CreateShelfUp()
        {
            var pattern = new ObjectsPattern(3, 3, 0.003);

            pattern.Add(1, 1, (level) => CreateShelf(level, "Furniture_Shelf_Up"));
            pattern.AddRequirement(1, 1, RequirementIsEmpty);
            pattern.AddRequirement(0, 0, RequirementIsEmpty);
            pattern.AddRequirement(1, 0, RequirementIsEmpty);
            pattern.AddRequirement(2, 0, RequirementIsEmpty);

            pattern.AddRequirement(0, 2, RequirementIsWall);
            pattern.AddRequirement(1, 2, RequirementIsWall);
            pattern.AddRequirement(2, 2, RequirementIsWall);

            pattern.AddRequirement(0, 1, RequirementIsAny);
            pattern.AddRequirement(2, 1, RequirementIsAny);

            return(pattern);
        }
Exemplo n.º 5
0
        private static ObjectsPattern CreateSpikedFloor()
        {
            var pattern = new ObjectsPattern(3, 3, 0.01);

            pattern.Add(1, 1, level => new SpikedFloorObject());
            pattern.AddRequirement(1, 1, RequirementIsEmpty);

            pattern.AddRequirement(0, 0, RequirementNotBlocking);
            pattern.AddRequirement(1, 0, RequirementNotBlocking);
            pattern.AddRequirement(2, 0, RequirementNotBlocking);

            pattern.AddRequirement(0, 1, RequirementNotBlocking);
            pattern.AddRequirement(2, 1, RequirementNotBlocking);

            pattern.AddRequirement(0, 2, RequirementNotBlocking);
            pattern.AddRequirement(1, 2, RequirementNotBlocking);
            pattern.AddRequirement(2, 2, RequirementNotBlocking);

            return(pattern);
        }