Социальная интеллектуальная игра «ЗаБотань!»

Автор работы: Пользователь скрыл имя, 18 Декабря 2013 в 18:34, курсовая работа

Описание работы

Идея совместить популярные игровые механики и интеллектуальное развитие пришла ко мне ещё в 8-ом классе. Для реализации мечты не хватало опыта и единомышленников. БГУИР дал мне и то, и то другое. Я знал, что проект должен быть прост в реализации, а порог входа на выбранный рынок должен быть как можно ниже. И я выбрал рынок социальных игр.

Содержание работы

Введение 3
Классификация игры, сюжет и миссия 4
Структура программы 5
Диаграмма классов 6
Основные алгоритмы 7
Описание игрового процесса 9
Описание игровых вещей Ошибка! Закладка не определена.12
Описание игрового баланса Ошибка! Закладка не определена.13
Заключение 14
Литература 15
Исходный код…………………………………………….…………………………………………….16

Файлы: 1 файл

Пояснительная записка Заботань!.docx

— 739.55 Кб (Скачать файл)

                                                break;

                                            }

                                            if (thisclient.Fight.TimeStarting >= DateTime.Now)

                                                break;

                                            thisclient.Fight.Start();

 

                                        }

                                        #endregion

                                        #region fight

                                        else if (thisclient.Fight.Status == FightStatus.Fighting)

                                        {

                                            var enemy = thisclient.Fight.Enemy;

 

                                            if (enemy == null || (!enemy.IsBot && !WorldServer.world_players.Contains((Client)enemy)))

                                            {

                                                thisclient.Fight.End();

                                                break;

                                            }

 

 

                                            if (thisclient.Fight.TryDie())

                                                break;

                                            thisclient.Fight.TrySendQuestion();

 

                                            thisclient.Fight.TryBullet();

 

                                            #region if bot

                                            if (enemy.IsBot)

                                            {

                                                Bot bot = (Bot)enemy;

                                               

                                                //Нанести урон от бота

                                                if (thisclient.CurrentHP > 0f)

                                                {

                                                    bot.CalculateDamage(thisclient);

                                                }

                                                for (int j = 0; j < bot.Fight.Bullet.Count; j++)

                                                {

                                                    Bullet b = bot.Fight.Bullet[j];

                                                    if ((DateTime.Now - b.StartTime).TotalMilliseconds > Config.TimeForBullet)

                                                    {

                                                        thisclient.CurrentHP -= b.Dmg;

                                                        bot.Fight.Bullet.RemoveAt(j);

                                                    }

                                                }

                                            }

                                            #endregion

 

                                        }

                                        #endregion

                                        #region EndFight

                                        else if (thisclient.Fight.Status == FightStatus.End)

                                        {

                                            BasePlayer enemy = thisclient.Fight.Enemy;

 

                                            #region Если противник вышел

                                            if (enemy == null || (!enemy.IsBot && !WorldServer.world_players.Contains((Client)enemy)))

                                            {

                                                Arena.GoArena(thisclient);

                                                byte fwin = 1;

                                                if (thisclient.CurrentHP == 0f)

                                                    fwin = 0;

                                                if (fwin == 1)

                                                {

                                                    thisclient.AddRanking(thisclient.Level);

                                                    thisclient.CountFightPvpWin++;

 

                                                    short winmon = (short)(Config.MoneyForWinner * (1 + thisclient.Fight.CountTrueRecpone));

                                                    thisclient.AddMoney(winmon);

 

                                                    thisclient.SendFightEnd(PlayerFlags.PVP, fwin, winmon, (short)thisclient.Level);

 

                                                    AwardsManager.UA_KillPvp(thisclient);

                                                }

                                                else

                                                {

                                                    thisclient.AddRanking(-thisclient.Level);

                                                    thisclient.CountFightPvpLose++;

                                                    thisclient.SendFightEnd(PlayerFlags.PVP, fwin, 0, (short)-thisclient.Level);

                                                }

 

 

                                                thisclient.Fight.Reset();

                                                thisclient.CurrentHP = thisclient.MaxHP;

                                                thisclient.SendAttributes();

                                                break;

                                            }

                                            #endregion

                                            byte win1 = 0;

                                            byte win2 = 1;

                                            Arena.GoArena(thisclient);

                                            if (!enemy.IsBot)

                                                Arena.GoArena((Client)enemy);

                                            #region ничья

                                            if (thisclient.CurrentHP == 0f && enemy.CurrentHP == 0f)

                                            {

                                                win1 = win2 = 2;

                                                thisclient.AddMoney(Config.MoneyForTie);

                                                thisclient.SendFightEnd(PlayerFlags.PVP, win1, Config.MoneyForTie, 0);

                                                thisclient.CountFightPvpTie++;

                                                if (!enemy.IsBot)

                                                {

                                                    ((Client)enemy).AddMoney(Config.MoneyForTie);

                                                    ((Client)enemy).SendFightEnd(PlayerFlags.PVP, win2, Config.MoneyForTie, 0);

                                                    ((Client)enemy).CountFightPvpTie++;

                                                }

                                            }

                                            #endregion

                                            #region игрок выйграл

                                            else if (enemy.CurrentHP == 0f)

                                            {

                                                win1 = 1;

                                                win2 = 0;

 

                                                if (!enemy.IsBot)

                                                {

                                                    ((Client)enemy).CountFightPvpLose++;

                                                    ((Client)enemy).AddRanking(-((Client)enemy).Level);

                                                    ((Client)enemy).AddMoney(Config.MoneyForLose);

                                                    ((Client)enemy).SendFightEnd(PlayerFlags.PVP, win2, Config.MoneyForLose, (short)-((Client)enemy).Level);

                                                }

                                                thisclient.CountFightPvpWin++;

                                                thisclient.AddRanking(thisclient.Level);

                                                short winmon = (short)(Config.MoneyForWinner * (1 + thisclient.Fight.CountTrueRecpone));

                                                thisclient.AddMoney(winmon);

                                                thisclient.SendFightEnd(PlayerFlags.PVP, win1, winmon, (short)thisclient.Level);

 

                                                AwardsManager.UA_KillPvp(thisclient);

                                            }

                                            #endregion

                                            #region игрок проиграл

                                            else

                                            {

                                                if (!enemy.IsBot)

                                                {

                                                    ((Client)enemy).AddRanking(((Client)enemy).Level);

                                                    //((Client)enemy).Money += Config.MoneyForWinner;

                                                    ((Client)enemy).CountFightPvpWin++;

                                                    short winmon = (short)(Config.MoneyForWinner * (1 + ((Client)enemy).Fight.CountTrueRecpone));

                                                    ((Client)enemy).AddMoney(winmon);

                                                    ((Client)enemy).SendFightEnd(PlayerFlags.PVP, win2, winmon, (short)((Client)enemy).Level);

 

                                                    AwardsManager.UA_KillPvp((Client)enemy);

                                                }

                                                thisclient.CountFightPvpLose++;

                                                thisclient.AddRanking(-thisclient.Level);

                                                thisclient.AddMoney(Config.MoneyForLose);

                                                thisclient.SendFightEnd(PlayerFlags.PVP, win1, Config.MoneyForLose, (short)-thisclient.Level);

                                            }

                                            #endregion

                                            thisclient.CurrentHP = thisclient.MaxHP;

                                            enemy.CurrentHP = enemy.MaxHP;

                                            thisclient.SendAttributes();

                                            if (!enemy.IsBot)

                                                ((Client)enemy).SendAttributes();

 

                                            thisclient.Fight.Reset();

                                            if (!enemy.IsBot)

                                                ((Client)enemy).Fight.Reset();

 

                                            //((Client)enemy).isproccess = false;

                                        }

                                        #endregion

                                        break;

                                    #endregion

                                    #region FVF

                                    case PlayerFlags.FVF:

                                        #region Start

                                        if (thisclient.Fight.Status == FightStatus.Start)

                                        {

                                            Client enemy = (Client)thisclient.Fight.Enemy;

                                            if (enemy == null || !WorldServer.world_players.Contains(enemy))

                                            {

                                                thisclient.Fight.End();

                                                break;

                                            }

                                            if (thisclient.Fight.TimeStarting >= DateTime.Now)

                                                break;

                                            thisclient.Fight.Start();

                                        }

                                        #endregion

                                        #region fight

                                        else if (thisclient.Fight.Status == FightStatus.Fighting)

                                        {

                                            Client enemy = (Client)thisclient.Fight.Enemy;

 

                                            if (enemy == null || !WorldServer.world_players.Contains(enemy))

                                            {

                                                thisclient.Fight.End();

                                                break;

                                            }

                                            if (thisclient.Fight.TryDie())

                                                break;

                                            thisclient.Fight.TrySendQuestion();

 

 

                                            thisclient.Fight.TryBullet();

Информация о работе Социальная интеллектуальная игра «ЗаБотань!»