Пример #1
0
        private static async Task <HandleMinionResult> HandleMinion(YokaiMinion minion)
        {
            if (ConditionParser.HasAtLeast(minion.MedalItemId, YokaiWatchGrindData.GetMedalsToFarm(minion)))
            {
                return(HandleMinionResult.Finished);
            }

            if (minion.Ignored)
            {
                return(HandleMinionResult.Ignored);
            }

            if (SummonMinion.CanSummonMinion() && !await SummonMinion.IsMinionSummoned(minion.EnglishName))
            {
                var summonMinionResult = await SummonMinion.Main(minion.EnglishName);

                if (summonMinionResult != SummonMinionResult.Success)
                {
                    minion.Ignored = true;
                    return(HandleMinionResult.Failed);
                }
            }

            if (Core.Player.InCombat || !WorldManager.CanTeleport() || WorldManager.ZoneId == GetMinionMedalZone(minion))
            {
                return(HandleMinionResult.InProgress);
            }

            var medalsToFarm = YokaiWatchGrindData.GetMedalsToFarm(minion) - OracleInventoryManager.GetItemAmount(minion.MedalItemId);

            Logger.SendLog("We need " + medalsToFarm + " Legendary " + minion.EnglishName + " Medal(s). Teleporting to your chosen zone.");
            await ZoneChange.HandleZoneChange(GetMinionMedalZone(minion), true);

            return(HandleMinionResult.InProgress);
        }
Пример #2
0
        internal static int GetZoneChoice(YokaiMinion minion)
        {
            switch (minion.MinionId)
            {
            case YokaiMinionId.Jibanyan:
                return(ModeSettings.Instance.JibanyanZoneChoice);

            case YokaiMinionId.Komasan:
                return(ModeSettings.Instance.KomasanZoneChoice);

            case YokaiMinionId.Usapyon:
                return(ModeSettings.Instance.UsapyonZoneChoice);

            case YokaiMinionId.Whisper:
                return(ModeSettings.Instance.WhisperZoneChoice);

            case YokaiMinionId.Shogunyan:
                return(ModeSettings.Instance.ShogunyanZoneChoice);

            case YokaiMinionId.Hovernyan:
                return(ModeSettings.Instance.HovernyanZoneChoice);

            case YokaiMinionId.Komajiro:
                return(ModeSettings.Instance.KomajiroZoneChoice);

            case YokaiMinionId.Noko:
                return(ModeSettings.Instance.NokoZoneChoice);

            case YokaiMinionId.Venoct:
                return(ModeSettings.Instance.VenoctZoneChoice);

            case YokaiMinionId.Kyubi:
                return(ModeSettings.Instance.KyubiZoneChoice);

            case YokaiMinionId.Robonyan:
                return(ModeSettings.Instance.RobonyanZoneChoice);

            case YokaiMinionId.Blizzaria:
                return(ModeSettings.Instance.BlizzariaZoneChoice);

            case YokaiMinionId.Manjimutt:
                return(ModeSettings.Instance.ManjimuttZoneChoice);

            default:
                throw new ArgumentOutOfRangeException(nameof(minion), minion, null);
            }
        }
Пример #3
0
        private static uint GetMinionMedalZone(YokaiMinion minion)
        {
            var zoneIndex = YokaiWatchGrindData.GetZoneChoice(minion);

            switch (zoneIndex)
            {
            case 1:
                return(minion.MedalZoneOne);

            case 2:
                return(minion.MedalZoneTwo);

            case 3:
                return(minion.MedalZoneThree);

            default:
                return(minion.MedalZoneOne);
            }
        }