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); }
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); }
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); }
protected static List <PhaseData> GetPhasesByHealthPercent(ParsedEvtcLog log, NPC mainTarget, List <double> thresholds) { var phases = new List <PhaseData>(); if (thresholds.Count == 0) { return(phases); } long fightDuration = log.FightData.FightEnd; long start = 0; double offset = 100.0 / thresholds.Count; IReadOnlyList <HealthUpdateEvent> hpUpdates = log.CombatData.GetHealthUpdateEvents(mainTarget.AgentItem); for (int i = 0; i < thresholds.Count; i++) { HealthUpdateEvent evt = hpUpdates.FirstOrDefault(x => x.HPPercent <= thresholds[i]); if (evt == null) { break; } var phase = new PhaseData(start, Math.Min(evt.Time, fightDuration), (offset + thresholds[i]) + "% - " + thresholds[i] + "%"); phase.AddTarget(mainTarget); phases.Add(phase); start = Math.Max(evt.Time, 0); } if (phases.Count > 0 && phases.Count < thresholds.Count) { var lastPhase = new PhaseData(start, fightDuration, (offset + thresholds[phases.Count]) + "% -" + thresholds[phases.Count] + "%"); lastPhase.AddTarget(mainTarget); phases.Add(lastPhase); } 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) { 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); }
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) { 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); NPC voice = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.ClawOfTheFallen); NPC claw = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.VoiceOfTheFallen); if (voice == null || claw == null) { throw new MissingKeyActorsException("Claw or Voice not found"); } phases[0].AddTarget(voice); phases[0].AddTarget(claw); long fightEnd = log.FightData.FightEnd; if (!requirePhases) { return(phases); } // List <PhaseData> unmergedPhases = GetPhasesByInvul(log, 762, claw, false, true); for (int i = 0; i < unmergedPhases.Count; i++) { unmergedPhases[i].Name = "Phase " + (i + 1); unmergedPhases[i].AddTarget(claw); unmergedPhases[i].AddTarget(voice); } phases.AddRange(unmergedPhases); // int voiceAndClawCount = 0; int offset = 1; foreach (NPC voiceAndClaw in Targets.Where(x => x.ID == (int)ArcDPSEnums.TargetID.VoiceAndClaw)) { EnterCombatEvent enterCombat = log.CombatData.GetEnterCombatEvents(voiceAndClaw.AgentItem).FirstOrDefault(); PhaseData nextUnmergedPhase = unmergedPhases.Count > offset + 1 ? unmergedPhases[offset] : null; if (enterCombat != null) { var phase = new PhaseData(enterCombat.Time, nextUnmergedPhase != null ? nextUnmergedPhase.Start : Math.Min(fightEnd, voiceAndClaw.LastAware), "Voice and Claw " + ++voiceAndClawCount); phase.AddTarget(voiceAndClaw); phases.Add(phase); offset++; } } // AbstractBuffEvent enrage = log.CombatData.GetBuffData(58619).FirstOrDefault(x => x is BuffApplyEvent); if (enrage != null) { var phase = new PhaseData(enrage.Time, log.FightData.FightEnd, "Enrage"); phase.AddTarget(claw.AgentItem == enrage.To ? claw : voice); phases.Add(phase); } return(phases); }
protected void AddTargetsToPhaseAndFit(PhaseData phase, List <int> ids, ParsedEvtcLog log) { foreach (NPC target in Targets) { if (ids.Contains(target.ID) && phase.InInterval(Math.Max(target.FirstAware, 0))) { phase.AddTarget(target); } } phase.OverrideTimes(log); }
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, AnkkaPlateformChanging, ankka, false, true); for (int i = 0; i < subPhases.Count; i++) { subPhases[i].Name = "Location " + (i + 1); subPhases[i].AddTarget(ankka); } phases.AddRange(subPhases); List <PhaseData> subSubPhases = GetPhasesByInvul(log, Determined895, ankka, false, false); subSubPhases.RemoveAll(x => subPhases.Any(y => Math.Abs(y.Start - x.Start) < ParserHelper.ServerDelayConstant && Math.Abs(y.End - x.End) < ParserHelper.ServerDelayConstant)); int curSubSubPhaseID = 0; PhaseData previousSubPhase = null; for (int i = 0; i < subSubPhases.Count; i++) { PhaseData subsubPhase = subSubPhases[i]; PhaseData subPhase = subPhases.FirstOrDefault(x => x.Start - ParserHelper.ServerDelayConstant <= subsubPhase.Start && x.End + ParserHelper.ServerDelayConstant >= subsubPhase.End); if (previousSubPhase != subPhase) { previousSubPhase = subPhase; curSubSubPhaseID = 0; } if (subPhase != null) { int index = subPhases.IndexOf(subPhase); subsubPhase.OverrideStart(Math.Max(subsubPhase.Start, subPhase.Start)); subsubPhase.OverrideEnd(Math.Min(subsubPhase.End, subPhase.End)); subsubPhase.Name = "Location " + (index + 1) + " - " + (++curSubSubPhaseID); subsubPhase.AddTarget(ankka); } } phases.AddRange(subSubPhases); // return(phases); }
internal List <PhaseData> GetBreakbarPhases(ParsedEvtcLog log, bool requirePhases) { if (!requirePhases) { return(new List <PhaseData>()); } var breakbarPhases = new List <PhaseData>(); foreach (NPC target in Targets) { int i = 0; IReadOnlyList <BreakbarStateEvent> breakbarStateEvents = log.CombatData.GetBreakbarStateEvents(target.AgentItem); IReadOnlyList <BreakbarPercentEvent> breakbarPercentEvents = log.CombatData.GetBreakbarPercentEvents(target.AgentItem); var breakbarActiveEvents = breakbarStateEvents.Where(x => x.State == ArcDPSEnums.BreakbarState.Active).ToList(); var breakbarNotActiveEvents = breakbarStateEvents.Where(x => x.State != ArcDPSEnums.BreakbarState.Active).ToList(); foreach (BreakbarStateEvent active in breakbarActiveEvents) { long start = Math.Max(active.Time - 2000, 0); BreakbarStateEvent notActive = breakbarNotActiveEvents.FirstOrDefault(x => x.Time >= active.Time); long end; if (notActive == null) { DeadEvent deadEvent = log.CombatData.GetDeadEvents(target.AgentItem).LastOrDefault(); if (deadEvent == null) { end = Math.Min(target.LastAware, log.FightData.FightEnd); } else { end = Math.Min(deadEvent.Time, log.FightData.FightEnd); } } else { end = Math.Min(notActive.Time, log.FightData.FightEnd); } var phase = new PhaseData(start, end, target.Character + " Breakbar " + ++i) { BreakbarPhase = true, CanBeSubPhase = false }; phase.AddTarget(target); breakbarPhases.Add(phase); } } return(breakbarPhases); }
internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases) { List <PhaseData> phases = GetInitialPhase(log); AbstractSingleActor mainTarget = Targets.FirstOrDefault(x => x.ID == GenericTriggerID); if (mainTarget == null) { throw new MissingKeyActorsException("Golem not found"); } phases[0].Name = "Final Number"; phases[0].AddTarget(mainTarget); if (!requirePhases) { return(phases); } IReadOnlyList <HealthUpdateEvent> hpUpdates = log.CombatData.GetHealthUpdateEvents(mainTarget.AgentItem); if (hpUpdates.Count > 0) { long fightDuration = log.FightData.FightEnd; var thresholds = new List <double> { 80, 60, 40, 20, 0 }; string[] numberNames = new string[] { "First Number", "Second Number", "Third Number", "Fourth Number" }; // Fifth number would the equivalent of full fight phase for (int j = 0; j < thresholds.Count - 1; j++) { HealthUpdateEvent hpUpdate = hpUpdates.FirstOrDefault(x => x.HPPercent <= thresholds[j]); if (hpUpdate != null) { var phase = new PhaseData(0, hpUpdate.Time, numberNames[j]) { CanBeSubPhase = false }; phase.AddTarget(mainTarget); phases.Add(phase); } } phases.AddRange(GetPhasesByHealthPercent(log, mainTarget, thresholds)); } return(phases); }
internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases) { if (!_targetIDs.Any()) { return(base.GetPhases(log, requirePhases)); } List <PhaseData> phases = GetInitialPhase(log); phases[0].AddTargets(Targets); int phaseCount = 0; foreach (NPC target in Targets) { var phase = new PhaseData(Math.Max(0, target.FirstAware), Math.Min(target.LastAware, log.FightData.FightEnd), "Phase " + (++phaseCount)); phase.AddTarget(target); phases.Add(phase); } return(phases); }
internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases) { List <PhaseData> phases = GetInitialPhase(log); NPC mainTarget = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.ValeGuardian); if (mainTarget == null) { throw new MissingKeyActorsException("Vale Guardian not found"); } phases[0].AddTarget(mainTarget); if (!requirePhases) { return(phases); } // Invul check phases.AddRange(GetPhasesByInvul(log, 757, mainTarget, true, true)); for (int i = 1; i < phases.Count; i++) { PhaseData phase = phases[i]; if (i % 2 == 0) { phase.Name = "Split " + (i) / 2; var ids = new List <int> { (int)ArcDPSEnums.TrashID.BlueGuardian, (int)ArcDPSEnums.TrashID.GreenGuardian, (int)ArcDPSEnums.TrashID.RedGuardian }; AddTargetsToPhaseAndFit(phase, ids, log); foreach (NPC t in phase.Targets) { t.OverrideName(t.Character + " " + Math.Log(i, 2)); } } else { phase.Name = "Phase " + (i + 1) / 2; phase.AddTarget(mainTarget); } } return(phases); }
private static List <PhaseData> GetTargetPhases(ParsedEvtcLog log, AbstractSingleActor target, string baseName) { long start = 0; long end = 0; long fightDuration = log.FightData.FightEnd; var targetPhases = new List <PhaseData>(); var states = new List <AbstractTimeCombatEvent>(); states.AddRange(log.CombatData.GetEnterCombatEvents(target.AgentItem)); states.AddRange(GetFilteredList(log.CombatData, 762, target, true, true).Where(x => x is BuffApplyEvent)); states.AddRange(log.CombatData.GetDeadEvents(target.AgentItem)); states.Sort((x, y) => x.Time.CompareTo(y.Time)); for (int i = 0; i < states.Count; i++) { AbstractTimeCombatEvent state = states[i]; if (state is EnterCombatEvent) { start = state.Time; if (i == states.Count - 1) { targetPhases.Add(new PhaseData(start, fightDuration)); } } else { end = Math.Min(state.Time, fightDuration); targetPhases.Add(new PhaseData(start, end)); if (i == states.Count - 1 && targetPhases.Count < 3) { targetPhases.Add(new PhaseData(end, fightDuration)); } } } for (int i = 0; i < targetPhases.Count; i++) { PhaseData phase = targetPhases[i]; phase.Name = baseName + " P" + (i + 1); phase.AddTarget(target); } return(targetPhases); }
internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases) { List <PhaseData> phases = GetInitialPhase(log); NPC mainTarget = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.Sabir); if (mainTarget == null) { throw new MissingKeyActorsException("Sabir not found"); } phases[0].AddTarget(mainTarget); if (!requirePhases) { return(phases); } IReadOnlyList <AbstractCastEvent> cls = mainTarget.GetCastEvents(log, 0, log.FightData.FightEnd); var wallopingWinds = cls.Where(x => x.SkillId == 56094).ToList(); long start = 0, end = 0; for (int i = 0; i < wallopingWinds.Count; i++) { AbstractCastEvent wallopinbWind = wallopingWinds[i]; end = wallopinbWind.Time; var phase = new PhaseData(start, end, "Phase " + (i + 1)); phase.AddTarget(mainTarget); phases.Add(phase); AbstractCastEvent nextAttack = cls.FirstOrDefault(x => x.Time >= wallopinbWind.EndTime && (x.SkillId == 56620 || x.SkillId == 56629 || x.SkillId == 56307)); if (nextAttack == null) { break; } start = nextAttack.Time; if (i == wallopingWinds.Count - 1) { phase = new PhaseData(start, log.FightData.FightEnd, "Phase " + (i + 2)); phase.AddTarget(mainTarget); phases.Add(phase); } } return(phases); }
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); }
internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases) { // generic method for fractals List <PhaseData> phases = GetInitialPhase(log); AbstractSingleActor skorvald = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.Skorvald); if (skorvald == null) { throw new MissingKeyActorsException("Skorvald not found"); } phases[0].AddTarget(skorvald); if (!requirePhases) { return(phases); } phases.AddRange(GetPhasesByInvul(log, 762, skorvald, true, true)); for (int i = 1; i < phases.Count; i++) { PhaseData phase = phases[i]; if (i % 2 == 0) { phase.Name = "Split " + (i) / 2; var ids = new List <int> { (int)ArcDPSEnums.TrashID.FluxAnomaly4, (int)ArcDPSEnums.TrashID.FluxAnomaly3, (int)ArcDPSEnums.TrashID.FluxAnomaly2, (int)ArcDPSEnums.TrashID.FluxAnomaly1, }; AddTargetsToPhaseAndFit(phase, ids, log); } else { phase.Name = "Phase " + (i + 1) / 2; phase.AddTarget(skorvald); } } return(phases); }
private static List <PhaseData> GetSubPhases(AbstractSingleActor eye, ParsedEvtcLog log) { var res = new List <PhaseData>(); BuffRemoveAllEvent det762Loss = log.CombatData.GetBuffData(SkillIDs.Determined762).OfType <BuffRemoveAllEvent>().Where(x => x.To == eye.AgentItem).FirstOrDefault(); if (det762Loss != null) { int count = 0; long start = det762Loss.Time; List <AbstractBuffEvent> det895s = GetFilteredList(log.CombatData, Determined895, eye, true, true); foreach (AbstractBuffEvent abe in det895s) { if (abe is BuffApplyEvent) { var phase = new PhaseData(start, Math.Min(abe.Time, log.FightData.FightDuration)) { Name = eye.Character + " " + (++count) }; phase.AddTarget(eye); res.Add(phase); } else { start = Math.Min(abe.Time, log.FightData.FightDuration); } } if (start < log.FightData.FightDuration) { var phase = new PhaseData(start, log.FightData.FightDuration) { Name = eye.Character + " " + (++count) }; phase.AddTarget(eye); res.Add(phase); } } return(res); }
internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases) { List <PhaseData> phases = GetInitialPhase(log); NPC mainTarget = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.Samarog); if (mainTarget == null) { throw new MissingKeyActorsException("Samarog not found"); } phases[0].AddTarget(mainTarget); if (!requirePhases) { return(phases); } // Determined check phases.AddRange(GetPhasesByInvul(log, 762, mainTarget, true, true)); for (int i = 1; i < phases.Count; i++) { PhaseData phase = phases[i]; if (i % 2 == 0) { phase.Name = "Split " + i / 2; var ids = new List <int> { (int)ArcDPSEnums.TrashID.Rigom, (int)ArcDPSEnums.TrashID.Guldhem }; AddTargetsToPhaseAndFit(phase, ids, log); } else { phase.Name = "Phase " + (i + 1) / 2; phase.AddTarget(mainTarget); } } return(phases); }
public static void SetPhasePerTarget(NPC target, List <PhaseData> phases, ParsedEvtcLog log) { long fightDuration = log.FightData.FightEnd; EnterCombatEvent phaseStart = log.CombatData.GetEnterCombatEvents(target.AgentItem).LastOrDefault(); if (phaseStart != null) { long start = phaseStart.Time; DeadEvent phaseEnd = log.CombatData.GetDeadEvents(target.AgentItem).LastOrDefault(); long end = fightDuration; if (phaseEnd != null) { end = phaseEnd.Time; } var phase = new PhaseData(start, Math.Min(end, log.FightData.FightEnd)); phase.AddTarget(target); switch (target.ID) { case (int)ArcDPSEnums.TargetID.Narella: phase.Name = "Narella"; break; case (int)ArcDPSEnums.TargetID.Berg: phase.Name = "Berg"; break; case (int)ArcDPSEnums.TargetID.Zane: phase.Name = "Zane"; break; default: throw new MissingKeyActorsException("Unknown target in Bandit Trio"); } phases.Add(phase); } }
internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases) { List <PhaseData> phases = GetInitialPhase(log); AbstractSingleActor mainTarget = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.IcebroodConstruct); if (mainTarget == null) { throw new MissingKeyActorsException("Icebrood Construct not found"); } phases[0].AddTarget(mainTarget); if (!requirePhases) { return(phases); } // Invul check phases.AddRange(GetPhasesByInvul(log, 757, mainTarget, false, true)); for (int i = 1; i < phases.Count; i++) { PhaseData phase = phases[i]; phase.Name = "Phase " + i; phase.AddTarget(mainTarget); } return(phases); }
internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases) { List <PhaseData> phases = GetInitialPhase(log); var subPhasesData = new List <(long start, long end, string name, NPC target)>(); foreach (NPC target in Targets) { long mainPhaseEnd = Math.Min(target.LastAware, log.FightData.FightEnd); switch (target.ID) { case (int)ArcDPSEnums.TrashID.VoidSaltsprayDragon: case (int)ArcDPSEnums.TrashID.VoidTimeCaster: case (int)ArcDPSEnums.TrashID.VoidObliterator: subPhasesData.Add((target.FirstAware, mainPhaseEnd, target.Character, target)); break; case (int)ArcDPSEnums.TargetID.TheDragonVoidJormag: phases[0].AddTarget(target); subPhasesData.Add((target.FirstAware, mainPhaseEnd, "Jormag", target)); break; case (int)ArcDPSEnums.TargetID.TheDragonVoidKralkatorrik: phases[0].AddTarget(target); subPhasesData.Add((target.FirstAware, mainPhaseEnd, "Kralkatorrik", target)); break; case (int)ArcDPSEnums.TargetID.TheDragonVoidMordremoth: phases[0].AddTarget(target); subPhasesData.Add((target.FirstAware, mainPhaseEnd, "Mordremoth", target)); break; case (int)ArcDPSEnums.TargetID.TheDragonVoidPrimordious: phases[0].AddTarget(target); subPhasesData.Add((target.FirstAware, mainPhaseEnd, "Primordious", target)); break; case (int)ArcDPSEnums.TargetID.TheDragonVoidSooWon: phases[0].AddTarget(target); subPhasesData.Add((target.FirstAware, mainPhaseEnd, "Soo-Won", target)); AttackTargetEvent attackTargetEvent = log.CombatData.GetAttackTargetEvents(target.AgentItem).FirstOrDefault(); if (attackTargetEvent != null) { var targetables = log.CombatData.GetTargetableEvents(attackTargetEvent.AttackTarget).Where(x => x.Time >= target.FirstAware).ToList(); var targetOns = targetables.Where(x => x.Targetable).ToList(); var targetOffs = targetables.Where(x => !x.Targetable).ToList(); int id = 0; foreach (TargetableEvent targetOn in targetOns) { long start = targetOn.Time; long end = log.FightData.FightEnd; TargetableEvent targetOff = targetOffs.FirstOrDefault(x => x.Time > start); if (targetOff != null) { end = targetOff.Time; } subPhasesData.Add((start, end, "Soo-Won " + (++id), target)); } } break; case (int)ArcDPSEnums.TargetID.TheDragonVoidZhaitan: phases[0].AddTarget(target); subPhasesData.Add((target.FirstAware, mainPhaseEnd, "Zhaitan", target)); break; case (int)ArcDPSEnums.TargetID.DummyTarget: phases[0].AddTarget(target); break; } } if (!requirePhases) { return(phases); } foreach ((long start, long end, string name, NPC target)subPhaseData in subPhasesData) { var subPhase = new PhaseData(subPhaseData.start, subPhaseData.end, subPhaseData.name); subPhase.AddTarget(subPhaseData.target); phases.Add(subPhase); } return(phases); }
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 fraenir = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.FraenirOfJormag); if (fraenir == null) { throw new MissingKeyActorsException("Fraenir of Jormag not found"); } phases[0].AddTarget(fraenir); AbstractSingleActor icebrood = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.IcebroodConstructFraenir); if (icebrood != null) { phases[0].AddTarget(icebrood); } if (!requirePhases) { return(phases); } AbstractBuffEvent invulApplyFraenir = log.CombatData.GetBuffData(762).Where(x => x.To == fraenir.AgentItem && x is BuffApplyEvent).FirstOrDefault(); if (invulApplyFraenir != null) { // split happened phases.Add(new PhaseData(0, invulApplyFraenir.Time, "Fraenir 1")); if (icebrood != null) { // icebrood enters combat EnterCombatEvent enterCombatIce = log.CombatData.GetEnterCombatEvents(icebrood.AgentItem).LastOrDefault(); if (enterCombatIce != null) { // icebrood phasing AbstractBuffEvent invulApplyIce = log.CombatData.GetBuffData(757).Where(x => x.To == icebrood.AgentItem && x is BuffApplyEvent).FirstOrDefault(); AbstractBuffEvent invulRemoveIce = log.CombatData.GetBuffData(757).Where(x => x.To == icebrood.AgentItem && x is BuffRemoveAllEvent).FirstOrDefault(); long icebroodStart = enterCombatIce.Time; long icebroodEnd = log.FightData.FightEnd; if (invulApplyIce != null && invulRemoveIce != null) { long icebrood2Start = invulRemoveIce.Time; phases.Add(new PhaseData(icebroodStart + 1, invulApplyIce.Time, "Icebrood 1")); AbstractBuffEvent invulRemoveFraenir = log.CombatData.GetBuffData(762).Where(x => x.To == fraenir.AgentItem && x is BuffRemoveAllEvent).FirstOrDefault(); if (invulRemoveFraenir != null) { // fraenir came back DeadEvent deadIce = log.CombatData.GetDeadEvents(icebrood.AgentItem).LastOrDefault(); if (deadIce != null) { icebroodEnd = deadIce.Time; } else { icebroodEnd = invulRemoveFraenir.Time - 1; } phases.Add(new PhaseData(invulRemoveFraenir.Time, log.FightData.FightEnd, "Fraenir 2")); } phases.Add(new PhaseData(icebrood2Start, icebroodEnd, "Icebrood 2")); } phases.Add(new PhaseData(icebroodStart, icebroodEnd, "Icebrood")); } } } phases.Sort((x, y) => x.Start.CompareTo(y.Start)); for (int i = 1; i < phases.Count; i++) { PhaseData phase = phases[i]; if (i == 1 || i == 5) { phase.AddTarget(fraenir); } else { phase.AddTarget(icebrood); } } return(phases); }
internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases) { List <PhaseData> phases = GetInitialPhase(log); NPC mainTarget = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.PeerlessQadim); if (mainTarget == null) { throw new MissingKeyActorsException("Peerless Qadim not found"); } phases[0].AddTarget(mainTarget); if (!requirePhases) { return(phases); } var phaseStarts = new List <long>(); var phaseEnds = new List <long>(); // var magmaDrops = log.CombatData.GetBuffData(56475).Where(x => x is BuffApplyEvent).ToList(); foreach (AbstractBuffEvent magmaDrop in magmaDrops) { if (phaseEnds.Count > 0) { if (Math.Abs(phaseEnds.Last() - magmaDrop.Time) > 1000) { phaseEnds.Add(magmaDrop.Time); } } else { phaseEnds.Add(magmaDrop.Time); } } IReadOnlyList <AnimatedCastEvent> pushes = log.CombatData.GetAnimatedCastData(56405); if (pushes.Count > 0) { AbstractCastEvent push = pushes[0]; phaseStarts.Add(push.EndTime); foreach (long magmaDrop in phaseEnds) { push = pushes.FirstOrDefault(x => x.Time >= magmaDrop); if (push == null) { break; } phaseStarts.Add(push.EndTime); } } // rush to pylon phaseEnds.AddRange(log.CombatData.GetAnimatedCastData(56616).Select(x => x.Time).ToList()); phaseEnds.Add(log.FightData.FightEnd); // tp to middle after pylon destruction phaseStarts.AddRange(log.CombatData.GetAnimatedCastData(56375).Select(x => x.EndTime)); if (phaseEnds.Count < phaseStarts.Count) { return(phases); } for (int i = 0; i < phaseStarts.Count; i++) { var phase = new PhaseData(phaseStarts[i], phaseEnds[i], "Phase " + (i + 1)); phase.AddTarget(mainTarget); phases.Add(phase); } 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.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 { phase.Name = "Phase " + (i + 1) / 2; phase.AddTarget(mainTarget); AddTargetsToPhaseAndFit(phase, ids, log); } } 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.PeerlessQadim); if (mainTarget == null) { throw new MissingKeyActorsException("Peerless Qadim not found"); } phases[0].AddTarget(mainTarget); if (!requirePhases) { return(phases); } var phaseStarts = new List <long>(); var phaseEnds = new List <long>(); // var magmaDrops = log.CombatData.GetBuffData(MagmaDrop).Where(x => x is BuffApplyEvent).ToList(); foreach (AbstractBuffEvent magmaDrop in magmaDrops) { if (phaseEnds.Count > 0) { if (Math.Abs(phaseEnds.Last() - magmaDrop.Time) > 1000) { phaseEnds.Add(magmaDrop.Time); } } else { phaseEnds.Add(magmaDrop.Time); } } IReadOnlyList <AnimatedCastEvent> pushes = log.CombatData.GetAnimatedCastData(ForceOfRetaliationCast); if (pushes.Count > 0) { AbstractCastEvent push = pushes[0]; phaseStarts.Add(push.Time); foreach (long magmaDrop in phaseEnds) { push = pushes.FirstOrDefault(x => x.Time >= magmaDrop); if (push == null) { break; } phaseStarts.Add(push.Time); } } // rush to pylon phaseEnds.AddRange(log.CombatData.GetAnimatedCastData(BatteringBlitz).Select(x => x.Time).ToList()); phaseEnds.Add(log.FightData.FightEnd); // tp to middle after pylon destruction phaseStarts.AddRange(log.CombatData.GetAnimatedCastData(PeerlessQadimTPCenter).Select(x => x.EndTime)); // There should be at least as many starts as ends, otherwise skip phases if (phaseEnds.Count < phaseStarts.Count) { return(phases); } for (int i = 0; i < phaseStarts.Count; i++) { var phase = new PhaseData(phaseStarts[i], phaseEnds[i], "Phase " + (i + 1)); phase.AddTarget(mainTarget); phases.Add(phase); } // intermission phase never finished, add a "dummy" log end if (phaseEnds.Count - 1 == phaseStarts.Count) { phaseStarts.Add(log.FightData.FightEnd); } // There should be as many ends as starts, otherwise anomaly, skip intermission phases if (phaseEnds.Count != phaseStarts.Count) { return(phases); } string[] intermissionNames = { "Magma Drop 1", "Magma Drop 2", "North Pylon", "SouthWest Pylon", "SouthEast Pylon" }; bool skipNames = intermissionNames.Length < phaseEnds.Count - 1; for (int i = 0; i < phaseEnds.Count - 1; i++) { var phase = new PhaseData(phaseEnds[i], Math.Min(phaseStarts[i + 1], log.FightData.FightEnd), skipNames ? "Intermission " + (i + 1) : intermissionNames[i]); phase.AddTarget(mainTarget); phases.Add(phase); } return(phases); }
internal override List <PhaseData> GetPhases(ParsedEvtcLog log, bool requirePhases) { List <PhaseData> phases = GetInitialPhase(log); AbstractSingleActor ca = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.ConjuredAmalgamate); if (ca == null) { throw new MissingKeyActorsException("Conjured Amalgamate not found"); } phases[0].AddTarget(ca); if (!requirePhases) { return(phases); } phases.AddRange(GetPhasesByInvul(log, 52255, ca, true, false)); for (int i = 1; i < phases.Count; i++) { string name; PhaseData phase = phases[i]; if (i % 2 == 1) { name = "Arm Phase"; } else { name = "Burn Phase"; phase.AddTarget(ca); } phase.Name = name; } AbstractSingleActor leftArm = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.CALeftArm); if (leftArm != null) { List <long> targetables = GetTargetableTimes(log, leftArm); for (int i = 1; i < phases.Count; i += 2) { PhaseData phase = phases[i]; if (targetables.Exists(x => phase.InInterval(x))) { phase.Name = "Left " + phase.Name; phase.AddTarget(leftArm); } } } AbstractSingleActor rightArm = Targets.FirstOrDefault(x => x.ID == (int)ArcDPSEnums.TargetID.CARightArm); if (rightArm != null) { List <long> targetables = GetTargetableTimes(log, rightArm); for (int i = 1; i < phases.Count; i += 2) { PhaseData phase = phases[i]; if (targetables.Exists(x => phase.InInterval(x))) { if (phase.Name.Contains("Left")) { phase.Name = "Both Arms Phase"; } else { phase.Name = "Right " + phase.Name; } phase.AddTarget(rightArm); } } } return(phases); }