Beispiel #1
0
        internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases)
        {
            long             fightDuration = log.FightData.FightEnd;
            List <PhaseData> phases        = GetInitialPhase(log);
            NPC mainTarget = GetMainTarget();

            if (mainTarget == null)
            {
                throw new MissingKeyActorsException("Xera not found");
            }
            phases[0].AddTarget(mainTarget);
            if (requirePhases)
            {
                AbstractBuffEvent invulXera = GetInvulXeraEvent(log, mainTarget);
                // split happened
                if (invulXera != null)
                {
                    var phase1 = new PhaseData(0, invulXera.Time, "Phase 1");
                    phase1.AddTarget(mainTarget);
                    phases.Add(phase1);

                    var glidingEndTime = _xeraSecondPhaseStartTime > 0 ? _xeraSecondPhaseStartTime : fightDuration;
                    var glidingPhase   = new PhaseData(invulXera.Time, glidingEndTime, "Gliding");
                    glidingPhase.AddTargets(Targets.Where(t => t.ID == (int)ArcDPSEnums.TrashID.ChargedBloodstone));
                    phases.Add(glidingPhase);

                    if (_xeraSecondPhaseStartTime > 0)
                    {
                        var phase2 = new PhaseData(_xeraSecondPhaseStartTime, fightDuration, "Phase 2");
                        mainTarget.SetManualHealth(24085950);
                        phase2.AddTarget(mainTarget);
                        phase2.AddTargets(Targets.Where(t => t.ID == (int)ArcDPSEnums.TrashID.BloodstoneShard));
                        //mainTarget.AddCustomCastLog(end, -5, (int)(start - end), ParseEnum.Activation.None, (int)(start - end), ParseEnum.Activation.None, log);
                        phases.Add(phase2);
                    }
                }
            }
            return(phases);
        }
Beispiel #2
0
 private static void AddSplitPhase(List <PhaseData> phases, IReadOnlyList <AbstractSingleActor> targets, AbstractSingleActor ministerLi, ParsedEvtcLog log, int phaseID)
 {
     if (targets.All(x => x != null))
     {
         EnterCombatEvent cbtEnter = null;
         foreach (NPC target in targets)
         {
             cbtEnter = log.CombatData.GetEnterCombatEvents(target.AgentItem).LastOrDefault();
             if (cbtEnter != null)
             {
                 break;
             }
         }
         if (cbtEnter != null)
         {
             AbstractBuffEvent nextPhaseStartEvt = log.CombatData.GetBuffData(ministerLi.AgentItem).FirstOrDefault(x => x is BuffRemoveAllEvent && x.BuffID == 762 && x.Time > cbtEnter.Time);
             long phaseEnd = nextPhaseStartEvt != null ? nextPhaseStartEvt.Time : log.FightData.FightEnd;
             var  addPhase = new PhaseData(cbtEnter.Time, phaseEnd, "Split Phase " + phaseID);
             addPhase.AddTargets(targets);
             phases.Add(addPhase);
         }
     }
 }
Beispiel #3
0
        private void InitPhases(List <PhaseData> phases, AbstractSingleActor mainTarget,
                                AbstractSingleActor tailTarget, int phaseOffset)
        {
            for (int i = 1; i < phases.Count; i++)
            {
                PhaseData phase = phases[i];
                switch (i + phaseOffset)
                {
                case 1:
                    phase.Name = "100% - 80%";
                    phase.AddTarget(mainTarget);
                    break;

                case 2:
                    phase.Name = "First Greens";
                    phase.AddTarget(mainTarget);
                    break;

                case 3:
                    phase.Name = "80% - 60%";
                    phase.AddTarget(mainTarget);
                    phase.AddTarget(tailTarget);
                    break;

                case 4:
                    phase.Name = "First Spear";
                    phase.AddTarget(mainTarget);
                    break;

                case 5:
                    phase.Name = "First Champions";
                    phase.AddTargets(Targets.Where(x =>
                                                   x.ID == (int)ArcDPSEnums.TrashID.VoidGiant2 ||
                                                   x.ID == (int)ArcDPSEnums.TrashID.VoidTimeCaster2));
                    break;

                case 6:
                    phase.Name = "60% - 40%";
                    phase.AddTarget(mainTarget);
                    phase.AddTarget(tailTarget);
                    break;

                case 7:
                    phase.Name = "Second Greens";
                    phase.AddTarget(mainTarget);
                    break;

                case 8:
                    phase.Name = "40% - 20%";
                    phase.AddTarget(mainTarget);
                    phase.AddTarget(tailTarget);
                    break;

                case 9:
                    phase.Name = "Second Spear";
                    phase.AddTarget(mainTarget);
                    break;

                case 10:
                    phase.Name = "Second Champions";
                    phase.AddTargets(Targets.Where(x =>
                                                   x.ID == (int)ArcDPSEnums.TrashID.VoidBrandstalker ||
                                                   x.ID == (int)ArcDPSEnums.TrashID.VoidColdsteel2 ||
                                                   x.ID == (int)ArcDPSEnums.TrashID.VoidObliterator2));
                    break;

                case 11:
                    phase.Name = "20% - 0%";
                    phase.AddTarget(mainTarget);
                    phase.AddTarget(tailTarget);
                    break;
                }
            }
        }
        internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases)
        {
            List <PhaseData>    phases     = GetInitialPhase(log);
            AbstractSingleActor mainTarget = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.Sabetha);

            if (mainTarget == null)
            {
                throw new MissingKeyActorsException("Sabetha not found");
            }
            phases[0].AddTarget(mainTarget);
            if (!requirePhases)
            {
                return(phases);
            }
            // Invul check
            phases.AddRange(GetPhasesByInvul(log, 757, mainTarget, true, true));
            var ids = new List <int>
            {
                (int)ArcDPSEnums.TrashID.Kernan,
                (int)ArcDPSEnums.TrashID.Knuckles,
                (int)ArcDPSEnums.TrashID.Karde,
            };

            for (int i = 1; i < phases.Count; i++)
            {
                PhaseData phase = phases[i];
                if (i % 2 == 0)
                {
                    AddTargetsToPhaseAndFit(phase, ids, log);
                    if (phase.Targets.Count > 0)
                    {
                        AbstractSingleActor phaseTar = phase.Targets[0];
                        switch (phaseTar.ID)
                        {
                        case (int)ArcDPSEnums.TrashID.Kernan:
                            phase.Name = "Kernan";
                            break;

                        case (int)ArcDPSEnums.TrashID.Knuckles:
                            phase.Name = "Knuckles";
                            break;

                        case (int)ArcDPSEnums.TrashID.Karde:
                            phase.Name = "Karde";
                            break;

                        default:
                            phase.Name = "Unknown";
                            break;
                        }
                    }
                }
                else
                {
                    int phaseID = (i + 1) / 2;
                    phase.Name = "Phase " + phaseID;
                    phase.AddTarget(mainTarget);
                    switch (phaseID)
                    {
                    case 2:
                        phase.AddTargets(Targets.Where(x => x.ID == (int)ArcDPSEnums.TrashID.Kernan));
                        break;

                    case 3:
                        phase.AddTargets(Targets.Where(x => x.ID == (int)ArcDPSEnums.TrashID.Knuckles));
                        break;

                    case 4:
                        phase.AddTargets(Targets.Where(x => x.ID == (int)ArcDPSEnums.TrashID.Karde));
                        break;

                    default:
                        break;
                    }
                }
            }
            return(phases);
        }
        internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases)
        {
            List <PhaseData>    phases  = GetInitialPhase(log);
            AbstractSingleActor maiTrin = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.MaiTrinStrike);

            if (maiTrin == null)
            {
                throw new MissingKeyActorsException("Mai Trin not found");
            }
            phases[0].AddTarget(maiTrin);
            AbstractSingleActor echoOfScarlet = GetEchoOfScarletBriar(log.FightData);

            if (echoOfScarlet != null)
            {
                phases[0].AddTarget(echoOfScarlet);
            }
            if (!requirePhases)
            {
                return(phases);
            }
            if (log.CombatData.GetDamageTakenData(maiTrin.AgentItem).Any())
            {
                HealthUpdateEvent lastHPUpdate = log.CombatData.GetHealthUpdateEvents(maiTrin.AgentItem).LastOrDefault();
                long maiTrinEnd               = lastHPUpdate.Time;
                long maiTrinStart             = 0;
                BuffRemoveAllEvent buffRemove = log.CombatData.GetBuffData(SkillIDs.Determined895).OfType <BuffRemoveAllEvent>().Where(x => x.To == maiTrin.AgentItem).FirstOrDefault();
                if (buffRemove != null)
                {
                    maiTrinStart = buffRemove.Time;
                }
                var mainPhase = new PhaseData(0, maiTrinEnd, "Mai Trin");
                mainPhase.AddTarget(maiTrin);
                phases.Add(mainPhase);
                List <PhaseData> maiPhases = GetPhasesByInvul(log, 38793, maiTrin, true, true, maiTrinStart, maiTrinEnd);
                for (int i = 0; i < maiPhases.Count; i++)
                {
                    PhaseData subPhase = maiPhases[i];
                    if ((i % 2) == 0)
                    {
                        subPhase.Name = "Mai Trin Phase " + ((i / 2) + 1);
                        subPhase.AddTarget(maiTrin);
                    }
                    else
                    {
                        subPhase.Name = "Mai Trin Split Phase " + ((i / 2) + 1);
                        subPhase.AddTargets(GetHPScarletPhantoms(subPhase));
                    }
                }
                phases.AddRange(maiPhases);
            }
            if (echoOfScarlet != null)
            {
                long echoStart = echoOfScarlet.FirstAware + 10000;
                var  phase     = new PhaseData(echoStart, log.FightData.FightEnd, "Echo of Scarlet Briar");
                phase.AddTarget(echoOfScarlet);
                phases.Add(phase);
                List <PhaseData> echoPhases = GetPhasesByInvul(log, 38793, echoOfScarlet, true, true, echoStart, log.FightData.FightEnd);
                for (int i = 0; i < echoPhases.Count; i++)
                {
                    PhaseData subPhase = echoPhases[i];
                    if ((i % 2) == 0)
                    {
                        subPhase.Name = "Echo Phase " + ((i / 2) + 1);
                        subPhase.AddTarget(echoOfScarlet);
                    }
                    else
                    {
                        subPhase.Name = "Echo Split Phase " + ((i / 2) + 1);
                        subPhase.AddTargets(GetHPScarletPhantoms(subPhase));
                    }
                }
                phases.AddRange(echoPhases);
            }
            return(phases);
        }