internal override void CheckSuccess(CombatData combatData, AgentData agentData, FightData fightData, HashSet <AgentItem> playerAgents)
 {
     base.CheckSuccess(combatData, agentData, fightData, playerAgents);
     if (!fightData.Success)
     {
         NPC desmina = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.Desmina);
         if (desmina == null)
         {
             throw new MissingKeyActorsException("Desmina not found");
         }
         ExitCombatEvent ooc = combatData.GetExitCombatEvents(desmina.AgentItem).LastOrDefault();
         if (ooc != null)
         {
             long time = 0;
             foreach (NPC mob in TrashMobs)
             {
                 time = Math.Max(mob.LastAware, time);
             }
             DespawnEvent dspwn = combatData.GetDespawnEvents(desmina.AgentItem).LastOrDefault();
             if (time != 0 && dspwn == null && time + 500 <= desmina.LastAware)
             {
                 if (!AtLeastOnePlayerAlive(combatData, fightData, time, playerAgents))
                 {
                     return;
                 }
                 fightData.SetSuccess(true, time);
             }
         }
     }
 }
Example #2
0
        internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases)
        {
            List <PhaseData>    phases     = GetInitialPhase(log);
            AbstractSingleActor mainTarget = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.Gorseval);

            if (mainTarget == null)
            {
                throw new MissingKeyActorsException("Gorseval not found");
            }
            phases[0].AddTarget(mainTarget);
            if (!requirePhases)
            {
                return(phases);
            }
            phases.AddRange(GetPhasesByInvul(log, 31877, mainTarget, true, true));
            for (int i = 1; i < phases.Count; i++)
            {
                PhaseData phase = phases[i];
                if (i % 2 == 1)
                {
                    phase.Name = "Phase " + (i + 1) / 2;
                    phase.AddTarget(mainTarget);
                }
                else
                {
                    phase.Name = "Split " + (i) / 2;
                    var ids = new List <int>
                    {
                        (int)ArcDPSEnums.TrashID.ChargedSoul
                    };
                    AddTargetsToPhaseAndFit(phase, ids, log);
                }
            }
            return(phases);
        }
        protected void SetSuccessByDeath(CombatData combatData, FightData fightData, HashSet <AgentItem> playerAgents, bool all, List <int> idsToUse)
        {
            int  success = 0;
            long maxTime = long.MinValue;

            foreach (int id in idsToUse)
            {
                NPC target = Targets.FirstOrDefault(x => x.ID == id);
                if (target == null)
                {
                    return;
                }
                DeadEvent killed = combatData.GetDeadEvents(target.AgentItem).LastOrDefault();
                if (killed != null)
                {
                    long time = killed.Time;
                    success++;
                    AbstractHealthDamageEvent lastDamageTaken = combatData.GetDamageTakenData(target.AgentItem).LastOrDefault(x => (x.HealthDamage > 0) && playerAgents.Contains(x.From.GetFinalMaster()));
                    if (lastDamageTaken != null)
                    {
                        time = Math.Min(lastDamageTaken.Time, time);
                    }
                    maxTime = Math.Max(time, maxTime);
                }
            }
            if ((all && success == idsToUse.Count) || (!all && success > 0))
            {
                fightData.SetSuccess(true, maxTime);
            }
        }
Example #4
0
        internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases)
        {
            List <PhaseData>    phases     = GetInitialPhase(log);
            AbstractSingleActor mainTarget = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.WorldVersusWorld);

            if (mainTarget == null)
            {
                throw new MissingKeyActorsException("Main target of the fight not found");
            }
            phases[0].AddTarget(mainTarget);
            if (!requirePhases)
            {
                return(phases);
            }
            if (_detailed)
            {
                phases.Add(new PhaseData(phases[0].Start, phases[0].End)
                {
                    Name          = "Detailed Full Fight",
                    CanBeSubPhase = false
                });
                phases[1].AddTargets(Targets);
                if (phases[1].Targets.Any())
                {
                    phases[1].RemoveTarget(mainTarget);
                }
                phases[0].Dummy = true;
            }
            return(phases);
        }
        internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases)
        {
            List <PhaseData>    phases      = GetInitialPhase(log);
            AbstractSingleActor mainTarget  = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.Freezie);
            AbstractSingleActor heartTarget = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TrashID.FreeziesFrozenHeart);

            if (mainTarget == null)
            {
                throw new MissingKeyActorsException("Freezie not found");
            }
            phases[0].AddTarget(mainTarget);
            if (!requirePhases)
            {
                return(phases);
            }
            phases.AddRange(GetPhasesByInvul(log, 895, mainTarget, true, true));
            for (int i = 1; i < phases.Count; i++)
            {
                PhaseData phase = phases[i];
                if (i % 2 == 1)
                {
                    phase.Name = "Phase " + (i + 1) / 2;
                    phase.AddTarget(mainTarget);
                }
                else
                {
                    phase.Name = "Heal " + (i) / 2;
                    phase.AddTarget(heartTarget);
                }
            }
            return(phases);
        }
Example #6
0
        public void SingleFile()
        {
            var etalong = Targets.FirstOrDefault();

            if (null == etalong)
            {
                return;
            }
            if (!Directory.Exists(etalong.Directory))
            {
                Directory.CreateDirectory(etalong.Directory);
            }
            XElement x = null;

            foreach (var target in Targets)
            {
                var ent = target.Entity;
                if (null == x)
                {
                    x = ent;
                }
                else
                {
                    x.Add(ent.Elements());
                }
            }
            using (var sw = new StreamWriter(etalong.Path))
            {
                sw.Write(x.ToString());
            }
            WriteLog("Wrote: " + etalong.Path);
        }
        internal override void CheckSuccess(CombatData combatData, AgentData agentData, FightData fightData, IReadOnlyCollection <AgentItem> playerAgents)
        {
            base.CheckSuccess(combatData, agentData, fightData, playerAgents);
            // reward or death worked
            if (fightData.Success)
            {
                return;
            }
            AbstractSingleActor skorvald = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.Skorvald);

            if (skorvald == null)
            {
                throw new MissingKeyActorsException("Skorvald not found");
            }
            AbstractHealthDamageEvent lastDamageTaken = combatData.GetDamageTakenData(skorvald.AgentItem).LastOrDefault(x => (x.HealthDamage > 0) && playerAgents.Contains(x.From.GetFinalMaster()));

            if (lastDamageTaken != null)
            {
                BuffApplyEvent invul895Apply = combatData.GetBuffData(895).OfType <BuffApplyEvent>().Where(x => x.To == skorvald.AgentItem && x.Time > lastDamageTaken.Time - 500).LastOrDefault();
                if (invul895Apply != null)
                {
                    fightData.SetSuccess(true, Math.Min(invul895Apply.Time, lastDamageTaken.Time));
                }
            }
        }
        internal override void CheckSuccess(CombatData combatData, AgentData agentData, FightData fightData, IReadOnlyCollection <AgentItem> playerAgents)
        {
            AbstractSingleActor mainTarget = Targets.FirstOrDefault(x => x.ID == GenericTriggerID);

            if (mainTarget == null)
            {
                throw new MissingKeyActorsException("Golem not found");
            }
            long      fightEndLogTime = fightData.FightEnd;
            bool      success         = false;
            DeadEvent deadEvt         = combatData.GetDeadEvents(mainTarget.AgentItem).LastOrDefault();

            if (deadEvt != null)
            {
                fightEndLogTime = deadEvt.Time;
                success         = true;
            }
            else
            {
                IReadOnlyList <HealthUpdateEvent> hpUpdates = combatData.GetHealthUpdateEvents(mainTarget.AgentItem);
                if (hpUpdates.Count > 0)
                {
                    AbstractHealthDamageEvent lastDamageTaken = combatData.GetDamageTakenData(mainTarget.AgentItem).LastOrDefault(x => x.HealthDamage > 0);
                    success = hpUpdates.Last().HPPercent < 2.00;
                    if (success && lastDamageTaken != null)
                    {
                        fightEndLogTime = lastDamageTaken.Time;
                    }
                }
            }
            fightData.SetSuccess(success, fightEndLogTime);
        }
        internal override void CheckSuccess(CombatData combatData, AgentData agentData, FightData fightData, IReadOnlyCollection <AgentItem> playerAgents)
        {
            base.CheckSuccess(combatData, agentData, fightData, playerAgents);
            // reward or death worked
            if (fightData.Success)
            {
                return;
            }
            AbstractSingleActor target = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.Arkk);

            if (target == null)
            {
                throw new MissingKeyActorsException("Arkk not found");
            }
            HashSet <AgentItem> adjustedPlayers = GetParticipatingPlayerAgents(target, combatData, playerAgents);

            // missing buff apply events fallback, some phases will be missing
            // removes should be present
            if (SetSuccessByBuffCount(combatData, fightData, adjustedPlayers, target, Determined762, 10))
            {
                var invulsRemoveTarget = combatData.GetBuffData(Determined762).OfType <BuffRemoveAllEvent>().Where(x => x.To == target.AgentItem).ToList();
                if (invulsRemoveTarget.Count == 5)
                {
                    SetSuccessByCombatExit(new List <AbstractSingleActor> {
                        target
                    }, combatData, fightData, adjustedPlayers);
                }
            }
        }
Example #10
0
 internal override void CheckSuccess(CombatData combatData, AgentData agentData, FightData fightData, IReadOnlyCollection <AgentItem> playerAgents)
 {
     base.CheckSuccess(combatData, agentData, fightData, playerAgents);
     if (!fightData.Success)
     {
         IReadOnlyList <AgentItem> prisoners = agentData.GetNPCsByID((int)ArcDPSEnums.TrashID.Prisoner2);
         var prisonerDeaths = new List <DeadEvent>();
         foreach (AgentItem prisoner in prisoners)
         {
             prisonerDeaths.AddRange(combatData.GetDeadEvents(prisoner));
         }
         if (prisonerDeaths.Count == 0)
         {
             AbstractSingleActor narella = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.Narella);
             if (narella == null)
             {
                 throw new MissingKeyActorsException("Narella not found");
             }
             DeadEvent deadEvent = combatData.GetDeadEvents(narella.AgentItem).LastOrDefault();
             if (deadEvent != null)
             {
                 fightData.SetSuccess(true, deadEvent.Time);
                 return;
             }
             SetSuccessByCombatExit(new HashSet <int>(GetSuccessCheckIds()), combatData, fightData, playerAgents);
         }
     }
 }
Example #11
0
 public LockFileTarget GetTarget(NuGetFramework framework, string runtimeIdentifier)
 {
     return(Targets.FirstOrDefault(t =>
                                   t.TargetFramework.Equals(framework) &&
                                   ((string.IsNullOrEmpty(runtimeIdentifier) && string.IsNullOrEmpty(t.RuntimeIdentifier) ||
                                     string.Equals(runtimeIdentifier, t.RuntimeIdentifier, StringComparison.OrdinalIgnoreCase)))));
 }
Example #12
0
        internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases)
        {
            List <PhaseData>    phases     = GetInitialPhase(log);
            AbstractSingleActor mainTarget = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.SooWonOW);
            AbstractSingleActor tailTarget = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TrashID.SooWonTail);

            if (mainTarget == null)
            {
                throw new MissingKeyActorsException("Soo-Won not found");
            }

            phases[0].AddTarget(mainTarget);
            if (!requirePhases)
            {
                return(phases);
            }

            phases.AddRange(GetPhasesByInvul(log, new long[] { 757, 66242 }, mainTarget, true, true, 0,
                                             log.FightData.FightEnd));

            int phaseOffset = GetPhaseOffset(log, mainTarget);

            InitPhases(phases, mainTarget, tailTarget, phaseOffset);

            return(phases);
        }
Example #13
0
        internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases)
        {
            long             fightDuration = log.FightData.FightEnd;
            List <PhaseData> phases        = GetInitialPhase(log);
            NPC mainTarget = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.SoullessHorror);

            if (mainTarget == null)
            {
                throw new MissingKeyActorsException("Soulless Horror not found");
            }
            phases[0].AddTarget(mainTarget);
            if (!requirePhases)
            {
                return(phases);
            }
            var  howling = mainTarget.GetCastEvents(log, 0, log.FightData.FightEnd).Where(x => x.SkillId == 48662).ToList();
            long start   = 0;
            int  i       = 1;

            foreach (AbstractCastEvent c in howling)
            {
                var phase = new PhaseData(start, Math.Min(c.Time, fightDuration), "Pre-Breakbar " + i++);
                phase.AddTarget(mainTarget);
                start = c.EndTime;
                phases.Add(phase);
            }
            if (fightDuration - start > 3000)
            {
                var lastPhase = new PhaseData(start, fightDuration, "Final");
                lastPhase.AddTarget(mainTarget);
                phases.Add(lastPhase);
            }
            return(phases);
        }
Example #14
0
            public OIGGame(Mod.MEGame game, IEnumerable <GameTarget> targets)
            {
                Game = game;
                Targets.ReplaceAll(targets);
                ToggleDisablerCommand = new GenericCommand(ToggleDisabler, CanToggleDisabler);
                switch (Game)
                {
                case Mod.MEGame.ME1:
                    GameTitle      = @"Mass Effect";
                    GameIconSource = @"/images/gameicons/ME1_48.ico";
                    break;

                case Mod.MEGame.ME2:
                    GameTitle      = @"Mass Effect 2";
                    GameIconSource = @"/images/gameicons/ME2_48.ico";
                    break;

                case Mod.MEGame.ME3:
                    GameTitle      = @"Mass Effect 3";
                    GameIconSource = @"/images/gameicons/ME3_48.ico";
                    break;
                }
                SelectedTarget = Targets.FirstOrDefault();
                if (SelectedTarget == null)
                {
                    D3D9Status = M3L.GetString(M3L.string_noOriginBasedTargetsInstalledForThisGame);
                }
            }
        internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases)
        {
            long                fightDuration = log.FightData.FightEnd;
            List <PhaseData>    phases        = GetInitialPhase(log);
            AbstractSingleActor mainTarget    = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.Slothasor);

            if (mainTarget == null)
            {
                throw new MissingKeyActorsException("Slothasor not found");
            }
            phases[0].AddTarget(mainTarget);
            if (!requirePhases)
            {
                return(phases);
            }
            var  sleepy = mainTarget.GetCastEvents(log, 0, log.FightData.FightEnd).Where(x => x.SkillId == NarcolepsySkill).ToList();
            long start  = 0;
            int  i      = 1;

            foreach (AbstractCastEvent c in sleepy)
            {
                var phase = new PhaseData(start, Math.Min(c.Time, fightDuration), "Phase " + i++);
                phase.AddTarget(mainTarget);
                start = c.EndTime;
                phases.Add(phase);
            }
            var lastPhase = new PhaseData(start, fightDuration, "Phase " + i++);

            lastPhase.AddTarget(mainTarget);
            phases.Add(lastPhase);
            return(phases);
        }
Example #16
0
        internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases)
        {
            List <PhaseData>    phases = GetInitialPhase(log);
            AbstractSingleActor nikare = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.Nikare);

            if (nikare == null)
            {
                throw new MissingKeyActorsException("Nikare not found");
            }
            phases[0].AddTarget(nikare);
            AbstractSingleActor kenut = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.Kenut);

            if (kenut != null)
            {
                phases[0].AddTarget(kenut);
            }
            if (!requirePhases)
            {
                return(phases);
            }
            List <PhaseData> nikPhases = GetTargetPhases(log, nikare, "Nikare");

            FallBackPhases(nikare, nikPhases, log, true);
            phases.AddRange(nikPhases);
            if (kenut != null)
            {
                List <PhaseData> kenPhases = GetTargetPhases(log, kenut, "Kenut");
                FallBackPhases(kenut, kenPhases, log, false);
                phases.AddRange(kenPhases);
            }
            return(phases);
        }
        internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases)
        {
            List <PhaseData>    phases = GetInitialPhase(log);
            AbstractSingleActor cairn  = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.Cairn);

            if (cairn == null)
            {
                throw new MissingKeyActorsException("Cairn not found");
            }
            phases[0].AddTarget(cairn);
            if (!requirePhases)
            {
                return(phases);
            }
            BuffApplyEvent enrageApply = log.CombatData.GetBuffData(EnragedCairn).OfType <BuffApplyEvent>().FirstOrDefault(x => x.To == cairn.AgentItem);

            if (enrageApply != null)
            {
                var normalPhase = new PhaseData(0, enrageApply.Time)
                {
                    Name = "Calm"
                };
                normalPhase.AddTarget(cairn);

                var enragePhase = new PhaseData(enrageApply.Time + 1, log.FightData.FightEnd)
                {
                    Name = "Angry"
                };
                enragePhase.AddTarget(cairn);

                phases.Add(normalPhase);
                phases.Add(enragePhase);
            }
            return(phases);
        }
        internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases)
        {
            List <PhaseData>    phases = GetInitialPhase(log);
            AbstractSingleActor ankka  = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.Ankka);

            if (ankka == null)
            {
                throw new MissingKeyActorsException("Ankka not found");
            }
            phases[0].AddTarget(ankka);
            if (!requirePhases)
            {
                return(phases);
            }
            List <PhaseData> subPhases = GetPhasesByInvul(log, 895, ankka, false, false);

            for (int i = 0; i < subPhases.Count; i++)
            {
                subPhases[i].Name = "Phase " + (i + 1);
                subPhases[i].AddTarget(ankka);
            }
            phases.AddRange(subPhases);
            //
            return(phases);
        }
        internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases)
        {
            List <PhaseData> phases = GetInitialPhase(log);
            NPC berg = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.Berg);

            if (berg == null)
            {
                throw new MissingKeyActorsException("Berg not found");
            }
            NPC zane = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.Zane);

            if (zane == null)
            {
                throw new MissingKeyActorsException("Zane not found");
            }
            NPC narella = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.Narella);

            if (narella == null)
            {
                throw new MissingKeyActorsException("Narella not found");
            }
            phases[0].AddTargets(Targets);
            if (!requirePhases)
            {
                return(phases);
            }
            foreach (NPC target in Targets)
            {
                SetPhasePerTarget(target, phases, log);
            }
            return(phases);
        }
Example #20
0
        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 = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.EchoOfScarletBriar);

            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(895).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, false, true, maiTrinStart, maiTrinEnd);
                for (int i = 0; i < maiPhases.Count; i++)
                {
                    PhaseData subPhase = maiPhases[i];
                    subPhase.Name = "Mai Trin Phase " + (i + 1);
                    subPhase.AddTarget(maiTrin);
                }
                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, false, true, echoStart, log.FightData.FightEnd);
                for (int i = 0; i < echoPhases.Count; i++)
                {
                    PhaseData subPhase = echoPhases[i];
                    subPhase.Name = "Echo Phase " + (i + 1);
                    subPhase.AddTarget(echoOfScarlet);
                }
                phases.AddRange(echoPhases);
            }
            return(phases);
        }
        internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases)
        {
            long             fightDuration = log.FightData.FightEnd;
            List <PhaseData> phases        = GetInitialPhase(log);
            NPC mainTarget = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.Matthias);

            if (mainTarget == null)
            {
                throw new MissingKeyActorsException("Matthias not found");
            }
            phases[0].AddTarget(mainTarget);
            if (!requirePhases)
            {
                return(phases);
            }
            // Special buff cast check
            AbstractBuffEvent heatWave = log.CombatData.GetBuffData(34526).FirstOrDefault();

            if (heatWave != null)
            {
                phases.Add(new PhaseData(0, heatWave.Time - 1));
                AbstractHealthDamageEvent downPour = log.CombatData.GetDamageData(mainTarget.AgentItem).FirstOrDefault(x => x.SkillId == 34554);
                if (downPour != null)
                {
                    phases.Add(new PhaseData(heatWave.Time, downPour.Time - 1));
                    IReadOnlyList <AbstractCastEvent> castLogs = mainTarget.GetCastEvents(log, 0, log.FightData.FightEnd);
                    AbstractCastEvent abo = castLogs.FirstOrDefault(x => x.SkillId == 34427);
                    if (abo != null)
                    {
                        phases.Add(new PhaseData(downPour.Time, abo.Time - 1));
                        AbstractBuffEvent invulRemove = log.CombatData.GetBuffData(mainTarget.AgentItem).FirstOrDefault(x => x.Time >= abo.Time && x.Time <= abo.Time + 10000 && x.BuffID == 757 && !(x is BuffApplyEvent));
                        if (invulRemove != null)
                        {
                            phases.Add(new PhaseData(invulRemove.Time, fightDuration));
                        }
                    }
                    else
                    {
                        phases.Add(new PhaseData(downPour.Time, fightDuration));
                    }
                }
                else
                {
                    phases.Add(new PhaseData(heatWave.Time, fightDuration));
                }
            }
            else
            {
                phases.Add(new PhaseData(0, fightDuration));
            }
            string[] namesMat = new[] { "Ice Phase", "Fire Phase", "Storm Phase", "Abomination Phase" };
            for (int i = 1; i < phases.Count; i++)
            {
                phases[i].Name      = namesMat[i - 1];
                phases[i].DrawStart = i > 1;
                phases[i].AddTarget(mainTarget);
            }
            return(phases);
        }
Example #22
0
        internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases)
        {
            List <PhaseData>    phases = GetInitialPhase(log);
            AbstractSingleActor mama   = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.MAMA);

            if (mama == null)
            {
                throw new MissingKeyActorsException("MAMA not found");
            }
            phases[0].AddTarget(mama);
            if (!requirePhases)
            {
                return(phases);
            }
            phases.AddRange(GetPhasesByInvul(log, 762, mama, true, true));
            for (int i = 1; i < phases.Count; i++)
            {
                PhaseData phase = phases[i];
                if (i % 2 == 0)
                {
                    var ids = new List <int>
                    {
                        (int)ArcDPSEnums.TrashID.GreenKnight,
                        (int)ArcDPSEnums.TrashID.RedKnight,
                        (int)ArcDPSEnums.TrashID.BlueKnight,
                    };
                    AddTargetsToPhaseAndFit(phase, ids, log);
                    if (phase.Targets.Count > 0)
                    {
                        AbstractSingleActor phaseTar = phase.Targets[0];
                        switch (phaseTar.ID)
                        {
                        case (int)ArcDPSEnums.TrashID.GreenKnight:
                            phase.Name = "Green Knight";
                            break;

                        case (int)ArcDPSEnums.TrashID.RedKnight:
                            phase.Name = "Red Knight";
                            break;

                        case (int)ArcDPSEnums.TrashID.BlueKnight:
                            phase.Name = "Blue Knight";
                            break;

                        default:
                            phase.Name = "Unknown";
                            break;
                        }
                    }
                }
                else
                {
                    phase.Name = "Phase " + (i + 1) / 2;
                    phase.AddTarget(mama);
                }
            }
            return(phases);
        }
        internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases)
        {
            List <PhaseData>    phases = GetInitialPhase(log);
            AbstractSingleActor woj    = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.WhisperOfJormag);

            if (woj == null)
            {
                throw new MissingKeyActorsException("Whisper of Jormag not found");
            }
            phases[0].AddTarget(woj);
            if (!requirePhases)
            {
                return(phases);
            }
            long start, end;
            var  tpOutEvents  = log.CombatData.GetBuffData(SkillIDs.WhisperTeleportOut).Where(x => x is BuffRemoveAllEvent).ToList();
            var  tpBackEvents = log.CombatData.GetBuffData(SkillIDs.WhisperTeleportBack).Where(x => x is BuffRemoveAllEvent).ToList();

            // 75% tp happened
            if (tpOutEvents.Count > 0)
            {
                end = tpOutEvents.Min(x => x.Time);
                phases.Add(new PhaseData(0, end, "Pre Doppelganger 1"));
                // remove everything related to 75% tp out
                tpOutEvents.RemoveAll(x => x.Time <= end + 1000);
            }
            // 75% tp finished
            if (tpBackEvents.Count > 0)
            {
                start = tpBackEvents.Min(x => x.Time);
                // 25% tp happened
                if (tpOutEvents.Count > 0)
                {
                    end = tpOutEvents.Min(x => x.Time);
                    tpOutEvents.Clear();
                    tpBackEvents.RemoveAll(x => x.Time <= end);
                }
                // 25% tp did not happen
                else
                {
                    end = log.FightData.FightEnd;
                    tpBackEvents.Clear();
                }
                phases.Add(new PhaseData(start, end, "Pre Doppelganger 2"));
                // 25% tp finished
                if (tpBackEvents.Count > 0)
                {
                    start = tpBackEvents.Min(x => x.Time);
                    phases.Add(new PhaseData(start, log.FightData.FightEnd, "Final"));
                }
            }
            for (int i = 1; i < phases.Count; i++)
            {
                phases[i].AddTarget(woj);
            }
            return(phases);
        }
Example #24
0
        internal override FightData.CMStatus IsCM(CombatData combatData, AgentData agentData, FightData fightData)
        {
            NPC target = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.PeerlessQadim);

            if (target == null)
            {
                throw new MissingKeyActorsException("Peerless Qadim not found");
            }
            return((target.GetHealth(combatData) > 48e6) ? FightData.CMStatus.CM : FightData.CMStatus.NoCM);
        }
        internal override FightData.EncounterMode GetEncounterMode(CombatData combatData, AgentData agentData, FightData fightData)
        {
            AbstractSingleActor mordremoth = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.Mordremoth);

            if (mordremoth == null)
            {
                throw new MissingKeyActorsException("Mordremoth not found");
            }
            return((mordremoth.GetHealth(combatData) > 9e6) ? FightData.EncounterMode.CM : FightData.EncounterMode.Story);
        }
Example #26
0
        internal virtual string GetLogicName(CombatData combatData, AgentData agentData)
        {
            AbstractSingleActor target = Targets.FirstOrDefault(x => x.ID == GenericTriggerID);

            if (target == null)
            {
                return("UNKNOWN");
            }
            return(target.Character);
        }
Example #27
0
        internal override FightData.CMStatus IsCM(CombatData combatData, AgentData agentData, FightData fightData)
        {
            AbstractSingleActor target = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.ConjuredAmalgamate);

            if (target == null)
            {
                throw new MissingKeyActorsException("Conjured Amalgamate not found");
            }
            return(combatData.GetBuffData(53075).Count > 0 ? FightData.CMStatus.CM : FightData.CMStatus.NoCM);
        }
        internal virtual string GetLogicName(ParsedEvtcLog log)
        {
            NPC target = Targets.FirstOrDefault(x => x.ID == GenericTriggerID);

            if (target == null)
            {
                return("UNKNOWN");
            }
            return(target.Character);
        }
Example #29
0
        internal override FightData.CMStatus IsCM(CombatData combatData, AgentData agentData, FightData fightData)
        {
            AbstractSingleActor target = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.Samarog);

            if (target == null)
            {
                throw new MissingKeyActorsException("Samarog not found");
            }
            return((target.GetHealth(combatData) > 30e6) ? FightData.CMStatus.CM : FightData.CMStatus.NoCM);
        }
        internal override FightData.EncounterMode GetEncounterMode(CombatData combatData, AgentData agentData, FightData fightData)
        {
            AbstractSingleActor target = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.PeerlessQadim);

            if (target == null)
            {
                throw new MissingKeyActorsException("Peerless Qadim not found");
            }
            return((target.GetHealth(combatData) > 48e6) ? FightData.EncounterMode.CM : FightData.EncounterMode.Normal);
        }