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

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Taurenkey committed Aug 22, 2024
2 parents 005935d + 550e210 commit cf75943
Show file tree
Hide file tree
Showing 11 changed files with 256 additions and 204 deletions.
56 changes: 23 additions & 33 deletions XIVSlothCombo/Combos/CustomComboPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2132,12 +2132,12 @@ public enum CustomComboPreset
#region NINJA

[ReplaceSkill(NIN.SpinningEdge)]
[ConflictingCombos(NIN_ArmorCrushCombo, NIN_ST_AdvancedMode, NIN_KassatsuChiJin, NIN_KassatsuTrick)]
[ConflictingCombos(NIN_ST_AdvancedMode)]
[CustomComboInfo("Simple Mode - Single Target", "Replaces Spinning Edge with a one-button full single target rotation.\nThis is the ideal option for newcomers to the job.", NIN.JobID)]
NIN_ST_SimpleMode = 10000,

[ParentCombo(NIN_ST_SimpleMode)]
[CustomComboInfo("Balance Opener Option", "Starts with the Balance opener.\nDoes pre-pull first, if you enter combat before hiding the opener will fail.\nLikewise, moving during TCJ will cause the opener to fail too.\nRequires you to be out of combat with majority of your cooldowns available for it to work.", NIN.JobID)]
[CustomComboInfo("Balance Opener Option", "Starts with the Balance opener.\nRequires level 100, with the following requirements:\n- 2 mudra charges ready\n- Dokumori off cooldown.\n- Kunai's Bane off cooldown.\n- TenChiJin off cooldown.\n- Phantom Kamaitachi off cooldown.\n- Bunshin off cooldown.\n- Dream Within a Dream off cooldown.\n- Kassatsu off cooldown.", NIN.JobID)]
NIN_ST_SimpleMode_BalanceOpener = 10001,

[ReplaceSkill(NIN.DeathBlossom)]
Expand All @@ -2155,29 +2155,29 @@ public enum CustomComboPreset
NIN_ST_AdvancedMode_RangedUptime = 10004,

[ParentCombo(NIN_ST_AdvancedMode)]
[CustomComboInfo("Mug Option", "Adds Mug to Advanced Mode.", NIN.JobID)]
[CustomComboInfo("Mug/Dokumori Option", "Adds Mug/Dokumori to Advanced Mode.", NIN.JobID)]
NIN_ST_AdvancedMode_Mug = 10005,

[ConflictingCombos(NIN_ST_AdvancedMode_Mug_AlignBefore)]
[ParentCombo(NIN_ST_AdvancedMode_Mug)]
[CustomComboInfo("Align Mug with Trick Attack Option", "Only uses Mug whilst the target has Trick Attack, otherwise will use on cooldown.", NIN.JobID)]
[CustomComboInfo("Align Mug with Trick Attack/Kunai's Bane Option", "Only uses Mug whilst the target has Trick Attack/Kunai's Bane, otherwise will use on cooldown.", NIN.JobID)]
NIN_ST_AdvancedMode_Mug_AlignAfter = 10006,

[ConflictingCombos(NIN_ST_AdvancedMode_Mug_AlignAfter)]
[ParentCombo(NIN_ST_AdvancedMode_Mug)]
[CustomComboInfo("Use Mug before Trick Attack Option", "Aligns Mug with Trick Attack but weaves it at least 1 GCD before Trick Attack.", NIN.JobID)]
[CustomComboInfo("Use Mug before Trick Attack/Kunai's Bane Option", "Aligns Mug with Trick Attack/Kunai's Bane but weaves it at least 1 GCD before Trick Attack/Kunai's Bane.", NIN.JobID)]
NIN_ST_AdvancedMode_Mug_AlignBefore = 10007,

[ParentCombo(NIN_ST_AdvancedMode)]
[CustomComboInfo("Trick Attack Option", "Adds Trick Attack to Advanced Mode.", NIN.JobID)] //Has Config
[CustomComboInfo("Trick Attack/Kunai's Bane Option", "Adds Trick Attack/Kunai's Bane to Advanced Mode.", NIN.JobID)] //Has Config
NIN_ST_AdvancedMode_TrickAttack = 10008,

[ParentCombo(NIN_ST_AdvancedMode_TrickAttack)]
[CustomComboInfo("Save Cooldowns Before Trick Attack Option", "Stops using abilities with longer cooldowns up to 15 seconds before Trick Attack comes off cooldown.", NIN.JobID)] //HasConfig
[CustomComboInfo("Save Cooldowns Before Trick Attack/Kunai's Bane Option", "Stops using abilities with longer cooldowns up to 15 seconds before Trick Attack/Kunai's Bane comes off cooldown.", NIN.JobID)] //HasConfig
NIN_ST_AdvancedMode_TrickAttack_Cooldowns = 10009,

[ParentCombo(NIN_ST_AdvancedMode_TrickAttack)]
[CustomComboInfo("Delayed Trick Attack Option", "Waits at least 8 seconds into combat before using Trick Attack.", NIN.JobID)]
[CustomComboInfo("Delayed Trick Attack/Kunai's Bane Option", "Waits at least 8 seconds into combat before using Trick Attack/Kunai's Bane.", NIN.JobID)]
NIN_ST_AdvancedMode_TrickAttack_Delayed = 10010,

[ParentCombo(NIN_ST_AdvancedMode)]
Expand All @@ -2200,15 +2200,10 @@ public enum CustomComboPreset
[CustomComboInfo("Use Suiton", "Spends Mudra charges on Suiton.", NIN.JobID)]
NIN_ST_AdvancedMode_Ninjitsus_Suiton = 10015,

[ParentCombo(NIN_ST_AdvancedMode_Ninjitsus)]
[CustomComboInfo("Use Huton", "Spends Mudra charges on Huton.", NIN.JobID)]
NIN_ST_AdvancedMode_Ninjitsus_Huton = 10016,

[ParentCombo(NIN_ST_AdvancedMode)]
[CustomComboInfo("Assassinate/Dream Within a Dream Option", "Adds Assassinate and Dream Within a Dream to Advanced Mode.", NIN.JobID)]
NIN_ST_AdvancedMode_AssassinateDWAD = 10017,

[ConflictingCombos(NIN_KassatsuTrick, NIN_KassatsuChiJin)]
[ParentCombo(NIN_ST_AdvancedMode)]
[CustomComboInfo("Kassatsu Option", "Adds Kassatsu to Advanced Mode.", NIN.JobID)]
NIN_ST_AdvancedMode_Kassatsu = 10018,
Expand All @@ -2217,14 +2212,6 @@ public enum CustomComboPreset
[CustomComboInfo($"Use Hyosho Ranryu Option", "Spends Kassatsu on Hyosho Ranryu.", NIN.JobID)]
NIN_ST_AdvancedMode_Kassatsu_HyoshoRaynryu = 10019,

[ParentCombo(NIN_ST_AdvancedMode)]
[CustomComboInfo("Armor Crush Option", "Adds Armor Crush to Advanced Mode.", NIN.JobID)] //Has Config
NIN_ST_AdvancedMode_ArmorCrush = 10020,

[ParentCombo(NIN_ST_AdvancedMode)]
[CustomComboInfo("Huraijin Option", "Adds Huraijin to Advanced Mode.", NIN.JobID)]
NIN_ST_AdvancedMode_Huraijin = 10021,

[ParentCombo(NIN_ST_AdvancedMode)]
[CustomComboInfo("Bhavacakra Option", "Adds Bhavacakra to Advanced Mode.", NIN.JobID)] //Has Config
NIN_ST_AdvancedMode_Bhavacakra = 10022,
Expand All @@ -2233,6 +2220,10 @@ public enum CustomComboPreset
[CustomComboInfo("Ten Chi Jin Option", "Adds Ten Chi Jin (the cooldown) to Advanced Mode.", NIN.JobID)]
NIN_ST_AdvancedMode_TCJ = 10023,

[ParentCombo(NIN_ST_AdvancedMode)]
[CustomComboInfo("Tenri Jindo Option", "Adds Tenri Jindo to Advanced Mode.", NIN.JobID)]
NIN_ST_AdvancedMode_TenriJindo = 10071,

[ParentCombo(NIN_ST_AdvancedMode)]
[CustomComboInfo("Meisui Option", "Adds Meisui to Advanced Mode.", NIN.JobID)]
NIN_ST_AdvancedMode_Meisui = 10024,
Expand All @@ -2253,9 +2244,8 @@ public enum CustomComboPreset
[CustomComboInfo("Forked Raiju Gap-Closer Option", "Uses Forked Raiju when out of range.", NIN.JobID)]
NIN_ST_AdvancedMode_Raiju_Forked = 10028,

[ConflictingCombos(NIN_KassatsuChiJin, NIN_KassatsuTrick)]
[ParentCombo(NIN_ST_AdvancedMode)]
[CustomComboInfo("Balance Opener Option", "Starts with the Balance opener.\nDoes pre-pull first, if you enter combat before hiding the opener will fail.\nLikewise, moving during TCJ will cause the opener to fail too.\nRequires you to be out of combat with majority of your cooldowns available for it to work.", NIN.JobID)]
[CustomComboInfo("Balance Opener Option", "Starts with the Balance opener.\nRequires level 100, with the following requirements:\n- 2 mudra charges ready\n- Dokumori off cooldown.\n- Kunai's Bane off cooldown.\n- TenChiJin off cooldown.\n- Phantom Kamaitachi off cooldown.\n- Bunshin off cooldown.\n- Dream Within a Dream off cooldown.\n- Kassatsu off cooldown.", NIN.JobID)]
NIN_ST_AdvancedMode_BalanceOpener = 10029,

[ParentCombo(NIN_ST_AdvancedMode)]
Expand Down Expand Up @@ -2283,6 +2273,10 @@ public enum CustomComboPreset
[CustomComboInfo("Advanced Mode - AoE", "Replace Death Blossom with a one-button full AoE rotation.\nThese features are ideal if you want to customize the rotation.", NIN.JobID)]
NIN_AoE_AdvancedMode = 10035,

[ParentCombo(NIN_AoE_AdvancedMode)]
[CustomComboInfo("Kunai's Bane Option", "Adds Kunai's Bane to Advanced Mode. (Does not add Trick Attack)", NIN.JobID)]
NIN_AoE_AdvancedMode_KunaisBane = 10073,

[ParentCombo(NIN_AoE_AdvancedMode)]
[CustomComboInfo("Assassinate/Dream Within a Dream Option", "Adds Assassinate/Dream Within a Dream to Advanced Mode.", NIN.JobID)]
NIN_AoE_AdvancedMode_AssassinateDWAD = 10036,
Expand All @@ -2307,7 +2301,6 @@ public enum CustomComboPreset
[CustomComboInfo("Use Huton", "Spends Mudra charges on Huton.", NIN.JobID)]
NIN_AoE_AdvancedMode_Ninjitsus_Huton = 10041,

[ConflictingCombos(NIN_KassatsuTrick, NIN_KassatsuChiJin)]
[ParentCombo(NIN_AoE_AdvancedMode)]
[CustomComboInfo("Kassatsu Option", "Adds Kassatsu to Advanced Mode.", NIN.JobID)]
NIN_AoE_AdvancedMode_Kassatsu = 10042,
Expand All @@ -2316,10 +2309,6 @@ public enum CustomComboPreset
[CustomComboInfo("Goka Mekkyaku Option", "Adds Goka Mekkyaku to Advanced Mode.", NIN.JobID)]
NIN_AoE_AdvancedMode_GokaMekkyaku = 10043,

[ParentCombo(NIN_AoE_AdvancedMode)]
[CustomComboInfo("Huraijin Option", "Adds Huraijin to Advanced Mode.", NIN.JobID)]
NIN_AoE_AdvancedMode_Huraijin = 10044,

[ParentCombo(NIN_AoE_AdvancedMode)]
[CustomComboInfo("Hellfrog Medium Option", "Adds Hellfrog Medium to Advanced Mode.", NIN.JobID)]
NIN_AoE_AdvancedMode_HellfrogMedium = 10045,
Expand All @@ -2328,6 +2317,10 @@ public enum CustomComboPreset
[CustomComboInfo("Ten Chi Jin Option", "Adds Ten Chi Jin (the cooldown) to Advanced Mode.", NIN.JobID)]
NIN_AoE_AdvancedMode_TCJ = 10046,

[ParentCombo(NIN_AoE_AdvancedMode)]
[CustomComboInfo("Tenri Jindo Option", "Adds Tenri Jindo to Advanced Mode.", NIN.JobID)]
NIN_AoE_AdvancedMode_TenriJindo = 10072,

[ParentCombo(NIN_AoE_AdvancedMode)]
[CustomComboInfo("Meisui Option", "Adds Meisui to Advanced Mode.", NIN.JobID)]
NIN_AoE_AdvancedMode_Meisui = 10047,
Expand All @@ -2353,26 +2346,23 @@ public enum CustomComboPreset
NIN_AoE_AdvancedMode_Bloodbath = 10052,

[ReplaceSkill(NIN.ArmorCrush)]
[ConflictingCombos(NIN_ST_SimpleMode)]
[CustomComboInfo("Armor Crush Combo Feature", "Replace Armor Crush with its combo chain.", NIN.JobID)]
NIN_ArmorCrushCombo = 10053,

[ConflictingCombos(NIN_ST_AdvancedMode_BalanceOpener, NIN_ST_AdvancedMode_BalanceOpener, NIN_ST_AdvancedMode_Kassatsu, NIN_AoE_AdvancedMode_Kassatsu, NIN_KassatsuChiJin)]
[ReplaceSkill(NIN.Kassatsu)]
[CustomComboInfo("Kassatsu to Trick Feature", "Replaces Kassatsu with Trick Attack while Suiton or Hidden is up.\nCooldown tracking plugin recommended.", NIN.JobID)]
[CustomComboInfo("Kassatsu to Trick Feature", "Replaces Kassatsu with Trick Attack/Kunai's Bane while Suiton or Hidden is up.\nCooldown tracking plugin recommended.", NIN.JobID)]
NIN_KassatsuTrick = 10054,

[ReplaceSkill(NIN.TenChiJin)]
[CustomComboInfo("Ten Chi Jin to Meisui Feature", "Replaces Ten Chi Jin (the move) with Meisui while Suiton is up.\nCooldown tracking plugin recommended.", NIN.JobID)]
NIN_TCJMeisui = 10055,

[ConflictingCombos(NIN_ST_AdvancedMode_BalanceOpener, NIN_ST_AdvancedMode_BalanceOpener, NIN_KassatsuTrick, NIN_ST_AdvancedMode_Kassatsu, NIN_AoE_AdvancedMode_Kassatsu)]
[ReplaceSkill(NIN.Chi)]
[CustomComboInfo("Kassatsu Chi/Jin Feature", "Replaces Chi with Jin while Kassatsu is up if you have Enhanced Kassatsu.", NIN.JobID)]
NIN_KassatsuChiJin = 10056,

[ReplaceSkill(NIN.Hide)]
[CustomComboInfo("Hide to Mug/Trick Attack Feature", "Replaces Hide with Mug while in combat and Trick Attack whilst Hidden.", NIN.JobID)]
[CustomComboInfo("Hide to Mug/Trick Attack/Kunai's Bane Feature", "Replaces Hide with Mug while in combat and Trick Attack/Kunai's Bane whilst Hidden.", NIN.JobID)]
NIN_HideMug = 10057,

[ReplaceSkill(NIN.Ten, NIN.Chi, NIN.Jin)]
Expand Down
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
Loading

0 comments on commit cf75943

Please sign in to comment.