Esempio n. 1
0
 public static void FightLayout(ICharacters character, ICharacters opponent, bool finish)
 {
     Console.Clear();
     if (finish == true)
     {
         character.HitPoints = character.Health();
         opponent.HitPoints  = opponent.Health();
         Thread thread2 = new Thread(() => ChoicesOnFightOpponent.FightChoices(ref opponent, ref character, 1));
         thread2.Start();
         ChoicesOnFight.FightChoices(ref character, ref opponent, 1);
     }
     else
     {
         Thread.CurrentThread.Abort();
         if (opponent == new ThreeHeadedDragon())
         {
             Arena.Boss(character, opponent);
         }
         else
         {
             Arena.AfterFight(ref character, ref opponent);
         }
     }
 }
Esempio n. 2
0
 public static void AttackMechanics(ref ICharacters character, ref ICharacters opponent, int ifPossible)
 {
     FightOptionAttack.Attack(ref character, ref opponent);
     Timer.SetTime(character, "ATTACK");
     ChoicesOnFight.FightChoices(ref character, ref opponent, ifPossible);
 }
Esempio n. 3
0
        public static void FightOptionsHandler(int choice, ref ICharacters character, ref ICharacters opponent, out int ifPossible)
        {
            switch (choice)
            {
            case 1:
            {
                Timer.IfActionPossible(character, 0, out ifPossible);
                if (ifPossible == 1)
                {
                    ifPossible = 1;
                    FightOptionAttack.AttackMechanics(ref character, ref opponent, ifPossible);
                }
                else
                {
                    ifPossible = 0;
                    ChoicesOnFight.FightChoices(ref character, ref opponent, ifPossible);
                }
                break;
            }

            case 2:
            {
                Timer.IfActionPossible(character, 2, out ifPossible);
                if (ifPossible == 1)
                {
                    ifPossible = 1;
                    FightOptionSpell.SpellMechanics(ref character, ref opponent, ifPossible);
                }
                else
                {
                    ifPossible = 0;
                    ChoicesOnFight.FightChoices(ref character, ref opponent, ifPossible);
                }
                break;
            }

            case 3:
            {
                Timer.IfActionPossible(character, 4, out ifPossible);
                if (ifPossible == 1)
                {
                    ifPossible = 1;
                    FightOptionItem.ItemMechanics(ref character, ref opponent, ifPossible);
                }
                else
                {
                    ifPossible = 0;
                    ChoicesOnFight.FightChoices(ref character, ref opponent, ifPossible);
                }
                break;
            }

            case 4:
            {
                ifPossible          = 1;
                character.HitPoints = 0;
                ChoicesOnFight.FightChoices(ref character, ref opponent, ifPossible);
                break;
            }

            default:
            {
                ifPossible = 1;
                ChoicesOnFight.FightChoices(ref character, ref opponent, ifPossible);
                break;
            }
            }
        }
Esempio n. 4
0
 public static void SpellMechanics(ref ICharacters character, ref ICharacters opponent, int ifPossible)
 {
     FightOptionSpell.Spell(ref character, ref opponent);
     Timer.SetTime(character, "SPELL");
     ChoicesOnFight.FightChoices(ref character, ref opponent, ifPossible);
 }