Esempio n. 1
0
        public static void AbilityInfo(Player player, string[] input)
        {
            string inputName = InputHelper.ParseInput(input);
            int    index     = player.Abilities.FindIndex(
                f => f.Name == inputName || f.Name.Contains(inputName));
            TextInfo textInfo = new CultureInfo("en-US", false).TextInfo;

            if (index != -1 && player.PlayerClass == PlayerClassType.Warrior)
            {
                OutputHelper.Display.StoreUserOutput(
                    Settings.FormatInfoText(),
                    Settings.FormatDefaultBackground(),
                    textInfo.ToTitleCase(player.Abilities[index].Name));
                string rankString = $"Rank: {player.Abilities[index].Rank}";
                OutputHelper.Display.StoreUserOutput(
                    Settings.FormatInfoText(),
                    Settings.FormatDefaultBackground(),
                    rankString);
                string rageCostString = $"Rage Cost: {player.Abilities[index].RageCost}";
                OutputHelper.Display.StoreUserOutput(
                    Settings.FormatInfoText(),
                    Settings.FormatDefaultBackground(),
                    rageCostString);
                switch (player.Abilities[index].WarAbilityCategory)
                {
                case WarriorAbility.Slash:
                    PlayerAbility.OffenseDamageAbilityInfo(player, index);
                    break;

                case WarriorAbility.Rend:
                    PlayerAbility.OffenseDamageAbilityInfo(player, index);
                    break;

                case WarriorAbility.Charge:
                    PlayerAbility.StunAbilityInfo(player, index);
                    break;

                case WarriorAbility.Block:
                    PlayerAbility.DefenseAbilityInfo(player, index);
                    break;

                case WarriorAbility.Berserk:
                    PlayerAbility.BerserkAbilityInfo(player, index);
                    break;

                case WarriorAbility.Disarm:
                    PlayerAbility.DisarmAbilityInfo(player, index);
                    break;

                case WarriorAbility.Bandage:
                    PlayerAbility.BandageAbilityInfo(player, index);
                    break;

                case WarriorAbility.PowerAura:
                    PlayerAbility.PowerAuraAbilityInfo(player, index);
                    break;

                case WarriorAbility.WarCry:
                    PlayerAbility.WarCryAbilityInfo(player, index);
                    break;

                case WarriorAbility.Onslaught:
                    PlayerAbility.OffenseDamageAbilityInfo(player, index);
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
            }
            else if (index != -1 && player.PlayerClass == PlayerClassType.Archer)
            {
                OutputHelper.Display.StoreUserOutput(
                    Settings.FormatInfoText(),
                    Settings.FormatDefaultBackground(),
                    textInfo.ToTitleCase(player.Abilities[index].Name));
                string rankString = $"Rank: {player.Abilities[index].Rank}";
                OutputHelper.Display.StoreUserOutput(
                    Settings.FormatInfoText(),
                    Settings.FormatDefaultBackground(),
                    rankString);
                string comboCostString = $"Combo Cost: {player.Abilities[index].ComboCost}";
                OutputHelper.Display.StoreUserOutput(
                    Settings.FormatInfoText(),
                    Settings.FormatDefaultBackground(),
                    comboCostString);
                switch (player.Abilities[index].ArcAbilityCategory)
                {
                case ArcherAbility.Distance:
                    PlayerAbility.DistanceAbilityInfo(player, index);
                    break;

                case ArcherAbility.Gut:
                    PlayerAbility.OffenseDamageAbilityInfo(player, index);
                    break;

                case ArcherAbility.Precise:
                    PlayerAbility.OffenseDamageAbilityInfo(player, index);
                    break;

                case ArcherAbility.Stun:
                    PlayerAbility.StunAbilityInfo(player, index);
                    break;

                case ArcherAbility.Double:
                    PlayerAbility.OffenseDamageAbilityInfo(player, index);
                    break;

                case ArcherAbility.Wound:
                    PlayerAbility.OffenseDamageAbilityInfo(player, index);
                    break;

                case ArcherAbility.Bandage:
                    PlayerAbility.BandageAbilityInfo(player, index);
                    break;

                case ArcherAbility.SwiftAura:
                    PlayerAbility.SwiftAuraAbilityInfo(player, index);
                    break;

                case ArcherAbility.ImmolatingArrow:
                    PlayerAbility.OffenseDamageAbilityInfo(player, index);
                    break;

                case ArcherAbility.Ambush:
                    PlayerAbility.OffenseDamageAbilityInfo(player, index);
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
            }
            else if (index != -1 && player.PlayerClass == PlayerClassType.Mage)
            {
                OutputHelper.Display.StoreUserOutput(
                    Settings.FormatFailureOutputText(),
                    Settings.FormatDefaultBackground(),
                    "You're not a warrior or archer!");
            }
            else
            {
                OutputHelper.Display.StoreUserOutput(
                    Settings.FormatFailureOutputText(),
                    Settings.FormatDefaultBackground(),
                    "You don't have that ability.");
            }
        }