public override Cell CreateInstance(World world) { HeroEquipment equipment = new HeroEquipment("simple helmet", "simple armor", "simple shoes", CapacityBelt); HeroStay hs = new HeroStay(Strong, Agility, Endurance, Intelligence); Wizard wizard = new Wizard(hs, world, equipment, Health, Mana, Damage, Armor, LevelFraction); OnCreateHero(wizard); return wizard; }
public Wizard(HeroStay hs, World world, HeroEquipment equipment, int heroHealth, int heroMana, int heroDamage, int heroArmor, int levelFraction) { HeroStay = hs; _world = world; Health = heroHealth; Armor = heroArmor; Damage = heroDamage; Mana = heroMana; FractionLevel = levelFraction; HeroEquipment = equipment; Level = 1; }
public static void ShowInventary(HeroEquipment he) { Console.Clear(); Console.WriteLine("Шлем: {0}", he._helmet); Console.WriteLine("Броня: {0}", he._armor); Potion[] tmpPotion = he._belt._cells; for (int i = 0; i < tmpPotion.Length; ++i) { Console.WriteLine("{0} ячейка пояса - {1}", i+1, tmpPotion[i]); } Console.WriteLine("Ботинки: {0}", he._shoes); Console.ReadKey(); }