Esempio n. 1
0
        public override void MonsterDied(Monster monster, CharacterClass character)
        {
            Creature temporaryCreature = (Creature)monster;
            Random   typeOfLoot        = new Random();

            Console.WriteLine($"You vanquised {Name}, and looted {monster.GoldValue} Gold and {monster.ExperienceValue}xp");
            Console.WriteLine($"And a random item .... ");
            if (typeOfLoot.Next(1, 3) == 1)
            {
                Weapon weaponLoot = RandomWeapon(QualityGenerator(monster));
                character.AddWeaponToInventory(weaponLoot);
            }
            else
            {
                Shield shieldLoot = RandomShield(QualityGenerator(monster));
                character.AddShieldToInventory(shieldLoot);
            }
            character.ExperienceGained(monster.ExperienceValue);
            character.Gold += monster.GoldValue;
        }