public override async Task Run() { LegacyLeader t = ConsoleContext.AppContext.Leader; Champion champoin = null; IActionFactory action = null; if (Parameters.Length == 0) { champoin = await GetFromItemIndex(t.PartyGroup); if (!Ready(champoin)) { return; } action = await GetFromItemIndex(champoin.CurrentCombos.ToArray()); } else if (Parameters.Length == 1) { champoin = GetItemAt(t.PartyGroup, 0); if (!Ready(champoin)) { return; } action = await GetFromItemIndex(champoin?.CurrentCombos.ToArray()); } else if (Parameters.Length == 2) { champoin = GetItemAt(t.PartyGroup, 0); if (!Ready(champoin)) { return; } action = GetItemAt(champoin?.CurrentCombos.ToArray(), 1); } if (champoin != null && action != null) { champoin.DoAction(action); } else { Output.WriteLine("Invalid arguments."); } }