Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
Kagekazu committed Jul 23, 2024
2 parents 86ef49b + 627f97f commit 500d2bf
Show file tree
Hide file tree
Showing 17 changed files with 1,537 additions and 1,081 deletions.
236 changes: 126 additions & 110 deletions XIVSlothCombo/Combos/CustomComboPreset.cs

Large diffs are not rendered by default.

38 changes: 37 additions & 1 deletion XIVSlothCombo/Combos/JobHelpers/AST.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.Plugin.Services;
using ECommons.DalamudServices;
using System;
using System.Collections.Generic;
using System.Linq;
using XIVSlothCombo.CustomComboNS.Functions;
Expand Down Expand Up @@ -34,7 +35,8 @@ private static void CheckCards(IFramework framework)
DrawnCard = Gauge.DrawnCards[0];
}

if (CustomComboFunctions.IsEnabled(CustomComboPreset.AST_Cards_QuickTargetCards) && (AST_QuickTargetCards.SelectedRandomMember is null || AST_QuickTargetCards.SelectedRandomMember.IsDead))
if (CustomComboFunctions.IsEnabled(CustomComboPreset.AST_Cards_QuickTargetCards) &&
(AST_QuickTargetCards.SelectedRandomMember is null || BetterTargetAvailable()))
{
if (CustomComboFunctions.ActionReady(Play1))
AST_QuickTargetCards.Invoke();
Expand All @@ -45,6 +47,40 @@ private static void CheckCards(IFramework framework)

}

private static bool BetterTargetAvailable()
{
if (AST_QuickTargetCards.SelectedRandomMember is null ||
AST_QuickTargetCards.SelectedRandomMember.IsDead ||
CustomComboFunctions.OutOfRange(Balance, AST_QuickTargetCards.SelectedRandomMember))
return true;

Svc.Log.Debug($"Picking better?");
var targets = new List<IBattleChara>();
for (int i = 1; i <= 8; i++) //Checking all 8 available slots and skipping nulls & DCs
{
if (CustomComboFunctions.GetPartySlot(i) is not IBattleChara member) continue;
if (member is null) continue; //Skip nulls/disconnected people
if (member.IsDead) continue;
if (CustomComboFunctions.OutOfRange(Balance, member)) continue;

if (CustomComboFunctions.FindEffectOnMember(Buffs.BalanceBuff, member) is not null) continue;
if (CustomComboFunctions.FindEffectOnMember(Buffs.SpearBuff, member) is not null) continue;

if (Config.AST_QuickTarget_SkipDamageDown && CustomComboFunctions.TargetHasDamageDown(member)) continue;
if (Config.AST_QuickTarget_SkipRezWeakness && CustomComboFunctions.TargetHasRezWeakness(member)) continue;

targets.Add(member);
}

if (targets.Count == 0) return false;
if ((DrawnCard is CardType.BALANCE && targets.Any(x => CustomComboFunctions.JobIDs.Melee.Any(y => y == x.ClassJob.Id))) ||
(DrawnCard is CardType.SPEAR && targets.Any(x => CustomComboFunctions.JobIDs.Ranged.Any(y => y == x.ClassJob.Id))))
return true;

return false;

}

internal class AST_QuickTargetCards : CustomComboFunctions
{

Expand Down
97 changes: 44 additions & 53 deletions XIVSlothCombo/Combos/JobHelpers/RPR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,8 @@ private bool DoPrePullSteps(ref uint actionID)

if (CurrentState == OpenerState.PrePull && PrePullStep > 0)
{
if (CustomComboFunctions.HasEffect(Buffs.Soulsow) && PrePullStep == 1) PrePullStep++;
else if (PrePullStep == 1) actionID = Soulsow;

if (CustomComboFunctions.LocalPlayer.CastActionId == Harpe && CustomComboFunctions.HasEffect(Buffs.Soulsow) && PrePullStep == 2) CurrentState = OpenerState.InOpener;
else if (PrePullStep == 2) actionID = Harpe;

if (PrePullStep == 2 && !CustomComboFunctions.HasEffect(Buffs.Soulsow))
CurrentState = OpenerState.FailedOpener;
if (CustomComboFunctions.WasLastAction(ShadowOfDeath) && PrePullStep == 1) CurrentState = OpenerState.InOpener;
else if (PrePullStep == 1) actionID = ShadowOfDeath;

if (ActionWatching.CombatActions.Count > 2 && CustomComboFunctions.InCombat())
CurrentState = OpenerState.FailedOpener;
Expand All @@ -104,71 +98,68 @@ private bool DoOpener(ref uint actionID)

if (currentState == OpenerState.InOpener)
{
if (CustomComboFunctions.WasLastAction(ShadowOfDeath) && OpenerStep == 1) OpenerStep++;
else if (OpenerStep == 1) actionID = ShadowOfDeath;

if (CustomComboFunctions.WasLastAction(SoulSlice) && OpenerStep == 2) OpenerStep++;
else if (OpenerStep == 2) actionID = SoulSlice;
if (CustomComboFunctions.WasLastAction(SoulSlice) && OpenerStep == 1) OpenerStep++;
else if (OpenerStep == 1) actionID = SoulSlice;

if (CustomComboFunctions.WasLastAction(ArcaneCircle) && OpenerStep == 3) OpenerStep++;
else if (OpenerStep == 3) actionID = ArcaneCircle;
if (CustomComboFunctions.WasLastAction(ArcaneCircle) && OpenerStep == 2) OpenerStep++;
else if (OpenerStep == 2) actionID = ArcaneCircle;

if (CustomComboFunctions.WasLastAction(Gluttony) && OpenerStep == 4) OpenerStep++;
else if (OpenerStep == 4) actionID = Gluttony;
if (CustomComboFunctions.WasLastAction(Gluttony) && OpenerStep == 3) OpenerStep++;
else if (OpenerStep == 3) actionID = Gluttony;

if (CustomComboFunctions.WasLastAction(ExecutionersGibbet) && OpenerStep == 5) OpenerStep++;
else if (OpenerStep == 5) actionID = ExecutionersGibbet;
if (CustomComboFunctions.WasLastAction(ExecutionersGibbet) && OpenerStep == 4) OpenerStep++;
else if (OpenerStep == 4) actionID = ExecutionersGibbet;

if (CustomComboFunctions.WasLastAction(ExecutionersGallows) && OpenerStep == 6) OpenerStep++;
else if (OpenerStep == 6) actionID = ExecutionersGallows;
if (CustomComboFunctions.WasLastAction(ExecutionersGallows) && OpenerStep == 5) OpenerStep++;
else if (OpenerStep == 5) actionID = ExecutionersGallows;

if (CustomComboFunctions.WasLastAction(PlentifulHarvest) && OpenerStep == 7) OpenerStep++;
else if (OpenerStep == 7) actionID = PlentifulHarvest;
if (CustomComboFunctions.WasLastAction(PlentifulHarvest) && OpenerStep == 6) OpenerStep++;
else if (OpenerStep == 6) actionID = PlentifulHarvest;

if (CustomComboFunctions.WasLastAction(Enshroud) && OpenerStep == 8) OpenerStep++;
else if (OpenerStep == 8) actionID = Enshroud;
if (CustomComboFunctions.WasLastAction(Enshroud) && OpenerStep == 7) OpenerStep++;
else if (OpenerStep == 7) actionID = Enshroud;

if (CustomComboFunctions.WasLastAction(VoidReaping) && OpenerStep == 9) OpenerStep++;
else if (OpenerStep == 9) actionID = VoidReaping;
if (CustomComboFunctions.WasLastAction(VoidReaping) && OpenerStep == 8) OpenerStep++;
else if (OpenerStep == 8) actionID = VoidReaping;

if (CustomComboFunctions.WasLastAction(Sacrificium) && OpenerStep == 10) OpenerStep++;
else if (OpenerStep == 10) actionID = Sacrificium;
if (CustomComboFunctions.WasLastAction(Sacrificium) && OpenerStep == 9) OpenerStep++;
else if (OpenerStep == 9) actionID = Sacrificium;

if (CustomComboFunctions.WasLastAction(CrossReaping) && OpenerStep == 11) OpenerStep++;
else if (OpenerStep == 11) actionID = CrossReaping;
if (CustomComboFunctions.WasLastAction(CrossReaping) && OpenerStep == 10) OpenerStep++;
else if (OpenerStep == 10) actionID = CrossReaping;

if (CustomComboFunctions.WasLastAction(LemuresSlice) && OpenerStep == 12) OpenerStep++;
else if (OpenerStep == 12) actionID = LemuresSlice;
if (CustomComboFunctions.WasLastAction(LemuresSlice) && OpenerStep == 11) OpenerStep++;
else if (OpenerStep == 11) actionID = LemuresSlice;

if (CustomComboFunctions.WasLastAction(VoidReaping) && OpenerStep == 13) OpenerStep++;
else if (OpenerStep == 13) actionID = VoidReaping;
if (CustomComboFunctions.WasLastAction(VoidReaping) && OpenerStep == 12) OpenerStep++;
else if (OpenerStep == 12) actionID = VoidReaping;

if (CustomComboFunctions.WasLastAction(CrossReaping) && OpenerStep == 14) OpenerStep++;
else if (OpenerStep == 14) actionID = CrossReaping;
if (CustomComboFunctions.WasLastAction(CrossReaping) && OpenerStep == 13) OpenerStep++;
else if (OpenerStep == 13) actionID = CrossReaping;

if (CustomComboFunctions.WasLastAction(LemuresSlice) && OpenerStep == 15) OpenerStep++;
else if (OpenerStep == 15) actionID = LemuresSlice;
if (CustomComboFunctions.WasLastAction(LemuresSlice) && OpenerStep == 14) OpenerStep++;
else if (OpenerStep == 14) actionID = LemuresSlice;

if (CustomComboFunctions.WasLastAction(Communio) && OpenerStep == 16) OpenerStep++;
else if (OpenerStep == 16) actionID = Communio;
if (CustomComboFunctions.WasLastAction(Communio) && OpenerStep == 15) OpenerStep++;
else if (OpenerStep == 15) actionID = Communio;

if (CustomComboFunctions.WasLastAction(Perfectio) && OpenerStep == 17) OpenerStep++;
else if (OpenerStep == 17) actionID = Perfectio;
if (CustomComboFunctions.WasLastAction(Perfectio) && OpenerStep == 16) OpenerStep++;
else if (OpenerStep == 16) actionID = Perfectio;

if (CustomComboFunctions.WasLastAction(SoulSlice) && OpenerStep == 18) OpenerStep++;
else if (OpenerStep == 18) actionID = SoulSlice;
if (CustomComboFunctions.WasLastAction(SoulSlice) && OpenerStep == 17) OpenerStep++;
else if (OpenerStep == 17) actionID = SoulSlice;

if (CustomComboFunctions.WasLastAction(UnveiledGibbet) && OpenerStep == 19) OpenerStep++;
else if (OpenerStep == 19) actionID = UnveiledGibbet;
if (CustomComboFunctions.WasLastAction(UnveiledGibbet) && OpenerStep == 18) OpenerStep++;
else if (OpenerStep == 18) actionID = UnveiledGibbet;

if (CustomComboFunctions.WasLastAction(Gibbet) && OpenerStep == 20) OpenerStep++;
else if (OpenerStep == 20) actionID = Gibbet;
if (CustomComboFunctions.WasLastAction(Gibbet) && OpenerStep == 19) OpenerStep++;
else if (OpenerStep == 19) actionID = Gibbet;

if (CustomComboFunctions.WasLastAction(ShadowOfDeath) && OpenerStep == 21) OpenerStep++;
else if (OpenerStep == 21) actionID = ShadowOfDeath;
if (CustomComboFunctions.WasLastAction(ShadowOfDeath) && OpenerStep == 20) OpenerStep++;
else if (OpenerStep == 20) actionID = ShadowOfDeath;

if (CustomComboFunctions.WasLastAction(Slice) && OpenerStep == 22) CurrentState = OpenerState.OpenerFinished;
else if (OpenerStep == 22) actionID = Slice;
if (CustomComboFunctions.WasLastAction(Slice) && OpenerStep == 21) CurrentState = OpenerState.OpenerFinished;
else if (OpenerStep == 21) actionID = Slice;

if (ActionWatching.TimeSinceLastAction.TotalSeconds >= 5)
CurrentState = OpenerState.FailedOpener;
Expand Down
5 changes: 4 additions & 1 deletion XIVSlothCombo/Combos/PvE/AST.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
if (IsEnabled(CustomComboPreset.AST_DPS_LightSpeed) &&
ActionReady(Lightspeed) &&
GetTargetHPPercent() > Config.AST_DPS_LightSpeedOption &&
CanSpellWeave(actionID))
IsMoving &&
!HasEffect(Buffs.Lightspeed))
return Lightspeed;



if (IsEnabled(CustomComboPreset.AST_DPS_Lucid) &&
ActionReady(All.LucidDreaming) &&
LocalPlayer.CurrentMp <= Config.AST_LucidDreaming &&
Expand Down
Loading

0 comments on commit 500d2bf

Please sign in to comment.