private IEnumerable<Creature> InitializeCreatures()
        {
            var rabbit = new Herbivore
                {
                    Id = 1,
                    FavoritePlant = "Carrot",
                    TransmitsDesease = false,
                    Details = new CreatureDetails
                        {
                            Attributes = new Attributes { Health = 5, Stamina = 25, Mana = -25 },
                            Name = "Rabbit",
                        }
                };

            var cow = new Herbivore
                {
                    Id = 2,
                    FavoritePlant = "Grass",
                    TransmitsDesease = false,
                    Details = new CreatureDetails
                        {
                            Attributes = new Attributes { Health = 87, Stamina = 33, Mana = 0 },
                            Name = "Cow",
                        }
                };

            var deer = new Herbivore
                {
                    Id = 3,
                    FavoritePlant = "Acorn",
                    TransmitsDesease = true,
                    Details = new CreatureDetails
                        {
                            Attributes = new Attributes { Health = 25, Stamina = 25, Mana = 0 },
                            Name = "Deer",
                        }
                };

            var wolf = new Carnivore
                {
                    Id = 4,
                    Eats = new[] { rabbit, deer },
                    TransmitsDesease = true,
                    Details = new CreatureDetails
                        {
                            Attributes = new Attributes { Health = 15, Stamina = 0, Mana = 0 },
                            Name = "Wolf",
                        }
                };

            var tiger = new Carnivore
                {
                    Id = 5,
                    Eats = new Animal[] { rabbit, deer, cow, wolf },
                    TransmitsDesease = true,
                    Details = new CreatureDetails
                        {
                            Attributes = new Attributes { Health = 150, Stamina = 225, Mana = 0 },
                            Name = "Tiger",
                        }
                };

            var omnomnomnivore = new Omnivore
                {
                    Id = 6,
                    FavoritePlant = "French Fries",
                    Details = new CreatureDetails
                        {
                            Attributes = new Attributes { Health = 1000, Stamina = 5, Mana = 0 },
                            Name = "Omnomnomnivore",
                        }
                };

            omnomnomnivore.Eats = new Animal[] { rabbit, cow, deer, wolf, tiger, omnomnomnivore };

            var wraith = new Monster
                {
                    Id = 7,
                    Details = new CreatureDetails
                        {
                            Attributes = new Attributes { Health = 193, Stamina = 227, Mana = 50 },
                            Name = "Wraith",
                        }
                };

            var troll = new Troll
                {
                    Id = 8,
                    Discriminator = 22,
                    Details = new CreatureDetails
                        {
                            Attributes = new Attributes { Health = 460, Stamina = 480, Mana = 0 },
                            Name = "Frost Troll",
                        }
                };

            return new Creature[] { rabbit, cow, deer, wolf, tiger, omnomnomnivore, wraith, troll };
        }
Пример #2
0
        private IEnumerable <Creature> InitializeCreatures()
        {
            var rabbit = new Herbivore
            {
                Id               = 1,
                FavoritePlant    = "Carrot",
                TransmitsDesease = false,
                Details          = new CreatureDetails
                {
                    Attributes = new Attributes {
                        Health = 5, Stamina = 25, Mana = -25
                    },
                    Name = "Rabbit",
                }
            };

            var cow = new Herbivore
            {
                Id               = 2,
                FavoritePlant    = "Grass",
                TransmitsDesease = false,
                Details          = new CreatureDetails
                {
                    Attributes = new Attributes {
                        Health = 87, Stamina = 33, Mana = 0
                    },
                    Name = "Cow",
                }
            };

            var deer = new Herbivore
            {
                Id               = 3,
                FavoritePlant    = "Acorn",
                TransmitsDesease = true,
                Details          = new CreatureDetails
                {
                    Attributes = new Attributes {
                        Health = 25, Stamina = 25, Mana = 0
                    },
                    Name = "Deer",
                }
            };

            var wolf = new Carnivore
            {
                Id               = 4,
                Eats             = new[] { rabbit, deer },
                TransmitsDesease = true,
                Details          = new CreatureDetails
                {
                    Attributes = new Attributes {
                        Health = 15, Stamina = 0, Mana = 0
                    },
                    Name = "Wolf",
                }
            };

            var tiger = new Carnivore
            {
                Id               = 5,
                Eats             = new Animal[] { rabbit, deer, cow, wolf },
                TransmitsDesease = true,
                Details          = new CreatureDetails
                {
                    Attributes = new Attributes {
                        Health = 150, Stamina = 225, Mana = 0
                    },
                    Name = "Tiger",
                }
            };

            var omnomnomnivore = new Omnivore
            {
                Id            = 6,
                FavoritePlant = "French Fries",
                Details       = new CreatureDetails
                {
                    Attributes = new Attributes {
                        Health = 1000, Stamina = 5, Mana = 0
                    },
                    Name = "Omnomnomnivore",
                }
            };

            omnomnomnivore.Eats = new Animal[] { rabbit, cow, deer, wolf, tiger, omnomnomnivore };

            var wraith = new Monster
            {
                Id      = 7,
                Details = new CreatureDetails
                {
                    Attributes = new Attributes {
                        Health = 193, Stamina = 227, Mana = 50
                    },
                    Name = "Wraith",
                }
            };

            var troll = new Troll
            {
                Id            = 8,
                Discriminator = 22,
                Details       = new CreatureDetails
                {
                    Attributes = new Attributes {
                        Health = 460, Stamina = 480, Mana = 0
                    },
                    Name = "Frost Troll",
                }
            };

            return(new Creature[] { rabbit, cow, deer, wolf, tiger, omnomnomnivore, wraith, troll });
        }