Beispiel #1
0
        private void SaveBoss(BossController bossController)
        {
            Random random    = new Random();
            int    attack    = random.Next(2, 6);
            int    hitPoint  = random.Next(10, 15);
            int    defence   = random.Next(4, 10);
            int    dropExp   = random.Next(100, 220);
            int    dropMoney = random.Next(150, 250);

            bossController.CurrentBoss.Attack    += attack;
            bossController.CurrentBoss.HitPoint  += hitPoint;
            bossController.CurrentBoss.Defence   += defence;
            bossController.CurrentBoss.DropExp   += dropExp;
            bossController.CurrentBoss.MoneyDrop += dropMoney;
            bossController.Update(CurrentBoss);
        }
Beispiel #2
0
        public void DropedExpAndItem()
        {
            UserController userController = new UserController(CurrentUser.Name);
            ItemController itemController = new ItemController(CurrentUser);
            BossController bossController = new BossController(CurrentBoss);

            Messages($"Ви отримали: {bossController.CurrentBoss.MoneyDrop} - грошей, {CurrentBoss.DropExp} - досвіду", true);

            SaveUser(userController, itemController);
            SaveBoss(bossController);
            if (CurrentBoss.Items != null)
            {
                foreach (var item in CurrentBoss.Items)
                {
                    Messages($"Предмет: {item.Name} додано до вашого інвентаря", true);
                }
            }
        }