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

Commit

Permalink
Merge branch 'main' into MCH_Queen
Browse files Browse the repository at this point in the history
  • Loading branch information
Kagekazu authored Aug 22, 2024
2 parents 5d7c2e6 + cf75943 commit 94fdc6c
Show file tree
Hide file tree
Showing 30 changed files with 6,083 additions and 2,281 deletions.
1,214 changes: 786 additions & 428 deletions XIVSlothCombo/Combos/CustomComboPreset.cs

Large diffs are not rendered by default.

19 changes: 16 additions & 3 deletions XIVSlothCombo/Combos/JobHelpers/AST.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
using Dalamud.Game.ClientState.JobGauge.Enums;
 using Dalamud.Game.ClientState.JobGauge.Enums;
using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.Plugin.Services;
using ECommons.DalamudServices;
using ECommons.GameFunctions;
using ECommons.ExcelServices;
using System.Collections.Generic;
using System.Linq;
using XIVSlothCombo.CustomComboNS.Functions;
Expand Down Expand Up @@ -52,11 +54,16 @@ private static bool BetterTargetAvailable()
CustomComboFunctions.OutOfRange(Balance, AST_QuickTargetCards.SelectedRandomMember))
return true;

Svc.Log.Debug($"Picking better?");
var m = AST_QuickTargetCards.SelectedRandomMember as IBattleChara;
if ((DrawnCard is CardType.BALANCE && CustomComboFunctions.JobIDs.Melee.Any(x => x == m.ClassJob.Id)) ||
(DrawnCard is CardType.SPEAR && CustomComboFunctions.JobIDs.Ranged.Any(x => x == m.ClassJob.Id)))
return false;

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.GameObjectId == AST_QuickTargetCards.SelectedRandomMember.GameObjectId) continue;
if (member is null) continue; //Skip nulls/disconnected people
if (member.IsDead) continue;
if (CustomComboFunctions.OutOfRange(Balance, member)) continue;
Expand All @@ -67,13 +74,18 @@ private static bool BetterTargetAvailable()
if (Config.AST_QuickTarget_SkipDamageDown && CustomComboFunctions.TargetHasDamageDown(member)) continue;
if (Config.AST_QuickTarget_SkipRezWeakness && CustomComboFunctions.TargetHasRezWeakness(member)) continue;

if (member.GetRole() is CombatRole.Healer or CombatRole.Tank) 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))))
{
AST_QuickTargetCards.SelectedRandomMember = null;
return true;
}

return false;

Expand All @@ -93,10 +105,11 @@ public static void Invoke()
if (GetPartySlot(2) is not null)
{
SetTarget();
Svc.Log.Debug($"Set card to {SelectedRandomMember.Name}");
Svc.Log.Debug($"Set card to {SelectedRandomMember?.Name}");
}
else
{
Svc.Log.Debug($"Setting card to {LocalPlayer?.Name}");
SelectedRandomMember = LocalPlayer;
}
}
Expand Down
3 changes: 2 additions & 1 deletion XIVSlothCombo/Combos/JobHelpers/DRG.cs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ internal class AnimationLock
DRG.WyrmwindThrust,
DRG.RiseOfTheDragon,
DRG.Starcross,
PvE.Content.Variant.VariantRampart
PvE.Content.Variant.VariantRampart,
PvE.All.TrueNorth
];

internal static readonly List<uint> MidLocks =
Expand Down
Loading

0 comments on commit 94fdc6c

Please sign in to comment.