public static void FightOptionsHandler(int choice, ref ICharacters opponent, ref ICharacters character, out int ifPossible)
        {
            switch (choice)
            {
            case 1:
            {
                TimerOpponent.IfActionPossible(opponent, 0, out ifPossible);
                if (ifPossible == 1)
                {
                    ifPossible = 1;
                    FightOptionAttackOpponent.AttackMechanics(ref opponent, ref character, ifPossible);
                }
                else
                {
                    ifPossible = 0;
                    ChoicesOnFightOpponent.FightChoices(ref opponent, ref character, ifPossible);
                }
                break;
            }

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

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

            default:
            {
                ifPossible = 1;
                ChoicesOnFightOpponent.FightChoices(ref opponent, ref character, ifPossible);
                break;
            }
            }
        }
示例#2
0
 public static void ItemMechanics(ref ICharacters opponent, ref ICharacters character, int ifPossible)
 {
     FightOptionItemOpponent.Item(ref opponent, ref character);
     TimerOpponent.SetTime(opponent, "ITEMS");
     ChoicesOnFightOpponent.FightChoices(ref opponent, ref character, ifPossible);
 }