From ef289d7f6377d27f521fec195f600f81097b72d2 Mon Sep 17 00:00:00 2001 From: MZ Date: Sun, 14 Jul 2024 10:02:18 +0930 Subject: [PATCH] Update SAM_Default.cs sam working blue log --- BasicRotations/Melee/SAM_Default.cs | 73 +++++++++++++++++++++-------- 1 file changed, 54 insertions(+), 19 deletions(-) diff --git a/BasicRotations/Melee/SAM_Default.cs b/BasicRotations/Melee/SAM_Default.cs index 857c44a..1157ecf 100644 --- a/BasicRotations/Melee/SAM_Default.cs +++ b/BasicRotations/Melee/SAM_Default.cs @@ -1,4 +1,8 @@ -namespace DefaultRotations.Melee; +using System.Diagnostics; +using static FFXIVClientStructs.FFXIV.Client.UI.Info.InfoProxyCommonList; +using static FFXIVClientStructs.FFXIV.Client.UI.Misc.CharaViewPortrait.Delegates; + +namespace DefaultRotations.Melee; [Rotation("Default", CombatType.PvE, GameVersion = "7.00")] [SourceCode(Path = "main/DefaultRotations/Melee/SAM_Default.cs")] @@ -31,7 +35,12 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act) var IsTargetBoss = HostileTarget?.IsBossFromTTK() ?? false; var IsTargetDying = HostileTarget?.IsDying() ?? false; - if (Kenki <= 50 && IkishotenPvE.CanUse(out act)) return true; + if (Kenki >= 50 && HasMoon && HasFlower && HaveZanshinReady) + { + if (ZanshinPvE.CanUse(out act, skipAoeCheck: true)) return true; + } + + if (Kenki <= 50 && !CombatElapsedLessGCD(2) && IkishotenPvE.CanUse(out act)) return true; if ((HostileTarget?.HasStatus(true, StatusID.Higanbana) ?? false) && (HostileTarget?.WillStatusEnd(32, true, StatusID.Higanbana) ?? false) && @@ -47,13 +56,16 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act) if (HissatsuSeneiPvE.CanUse(out act)) return true; } - if (ShohaPvE.CanUse(out act, skipAoeCheck: true)) return true; // Ignores how many targets under actions + if (ShohaPvE.CanUse(out act, skipAoeCheck: true)) return true; - if (Kenki >= 50 && IkishotenPvE.Cooldown.WillHaveOneCharge(10) || Kenki >= AddKenki || IsTargetBoss && IsTargetDying) + if (!HaveZanshinReady && (Kenki >= 50 && IkishotenPvE.Cooldown.WillHaveOneCharge(10) || Kenki >= AddKenki || IsTargetBoss && IsTargetDying)) { - if (ZanshinPvE.CanUse(out act, skipAoeCheck: true)) return true; // Ignores how many targets under actions if (HissatsuKyutenPvE.CanUse(out act)) return true; - if (HissatsuShintenPvE.CanUse(out act)) return true; + if (HissatsuShintenPvE.CanUse(out act)) + { + //Debug.WriteLine("Send to debug outputa."); + return true; + } } return base.AttackAbility(nextGCD, out act); @@ -82,47 +94,68 @@ protected override bool GeneralGCD(out IAction? act) var IsTargetBoss = HostileTarget?.IsBossFromTTK() ?? false; var IsTargetDying = HostileTarget?.IsDying() ?? false; + //if (TendoKaeshiGokenPvE.CanUse(out act, skipAoeCheck: true, usedUp: true)) return true; + //if (TendoKaeshiSetsugekkaPvE.CanUse(out act, skipAoeCheck: true, usedUp: true)) return true; + + if (IsLastGCD(true, TendoSetsugekkaPvE) && TendoKaeshiSetsugekkaPvE.CanUse(out act)) return true; + if (KaeshiGokenPvE.CanUse(out act, skipAoeCheck: true, usedUp: true)) return true; if (KaeshiSetsugekkaPvE.CanUse(out act, skipAoeCheck: true, usedUp: true)) return true; - if (TendoKaeshiGokenPvE.CanUse(out act, skipAoeCheck: true, usedUp: true)) return true; - if (TendoKaeshiSetsugekkaPvE.CanUse(out act, skipAoeCheck: true, usedUp: true)) return true; + // burst finisher if ((!IsTargetBoss || (HostileTarget?.HasStatus(true, StatusID.Higanbana) ?? false)) && HasMoon && HasFlower && OgiNamikiriPvE.CanUse(out act, skipAoeCheck: true)) return true; - if (SenCount == 1 && IsTargetBoss && !IsTargetDying) + // 1/2/3 sen finishers + if (SenCount == 1 && IsTargetBoss && !IsTargetDying) // 1 sen + has two buffs + not aoe = put dot on boss (not dying) { if (HasMoon && HasFlower && !FugaPvE.CanUse(out _) && HiganbanaPvE.CanUse(out act)) return true; } - if (SenCount == 2) + if (SenCount == 2) // 2 sen aoe combo finisher { - if (TendoGokenPvE.CanUse(out act)) return true; + // !!! to be updated to TendoGokenPvE if (TenkaGokenPvE.CanUse(out act, skipAoeCheck: !MidareSetsugekkaPvE.EnoughLevel)) return true; } - if (SenCount == 3) + if (SenCount == 3) // 3 sen single target combo finisher { - if (TendoSetsugekkaPvE.CanUse(out act)) return true; - if (MidareSetsugekkaPvE.CanUse(out act)) return true; + // if 7.0 spell buff is not up, use normal finisher + if (!HaveTsubamegaeshiReady && MidareSetsugekkaPvE.CanUse(out act, skipComboCheck: !HaveTsubamegaeshiReady)) return true; + // if 7.0 spell buff is up, use the upgraded finisher + if (HaveTsubamegaeshiReady && TendoSetsugekkaPvE.CanUse(out act, skipComboCheck: HaveTsubamegaeshiReady)) return true; + + // use TendoSetsugekka when the level is met, or use MidareSetsugekka - not tested + if (!TendoSetsugekkaPvE.EnoughLevel && MidareSetsugekkaPvE.CanUse(out act)) return true; } + // aoe 12 combo's 2 if ((!HasMoon || IsMoonTimeLessThanFlower || !OkaPvE.EnoughLevel) && MangetsuPvE.CanUse(out act, skipComboCheck: HaveMeikyoShisui && !HasGetsu)) return true; if ((!HasFlower || !IsMoonTimeLessThanFlower) && OkaPvE.CanUse(out act, skipComboCheck: HaveMeikyoShisui && !HasKa)) return true; - if (!HasSetsu && YukikazePvE.CanUse(out act, skipComboCheck: HaveMeikyoShisui && HasGetsu && HasKa)) return true; + // !!! not working + if (!HasSetsu && YukikazePvE.CanUse(out act, skipComboCheck: HaveMeikyoShisui && HasGetsu && HasKa || IsLastGCD(true, HakazePvE))) return true; + // single target 123 combo's 3 or used 3 directly during burst when MeikyoShisui is active if (GekkoPvE.CanUse(out act, skipComboCheck: HaveMeikyoShisui && !HasGetsu)) return true; if (KashaPvE.CanUse(out act, skipComboCheck: HaveMeikyoShisui && !HasKa)) return true; - if ((!HasMoon || IsMoonTimeLessThanFlower || !ShifuPvE.EnoughLevel) && JinpuPvE.CanUse(out act)) return true; - if ((!HasFlower || !IsMoonTimeLessThanFlower) && ShifuPvE.CanUse(out act)) return true; + // single target 123 combo's 2 + if ((!HasMoon || IsMoonTimeLessThanFlower || !ShifuPvE.EnoughLevel) && JinpuPvE.CanUse(out act, skipComboCheck: IsLastGCD(true, HakazePvE))) return true; + if ((!HasFlower || !IsMoonTimeLessThanFlower) && ShifuPvE.CanUse(out act, skipComboCheck: IsLastGCD(true, HakazePvE))) return true; + // initiate aoe if (FukoPvE.CanUse(out act, skipComboCheck: true)) return true; if (!FukoPvE.EnoughLevel && FugaPvE.CanUse(out act, skipComboCheck: true)) return true; + // MeikyoShisui buff is not active - not bursting - single target 123 combo's 1 if (!HaveMeikyoShisui) { - if (GyofuPvE.CanUse(out act)) return true; + // target in range if (HakazePvE.CanUse(out act)) return true; + + //if (GyofuPvE.CanUse(out act)) return true; + //if (!GyofuPvE.EnoughLevel && HakazePvE.CanUse(out act)) return true; + + // target out of range if (EnpiPvE.CanUse(out act)) return true; } @@ -133,6 +166,8 @@ protected override bool GeneralGCD(out IAction? act) #region Extra Methods private static bool HaveMeikyoShisui => Player.HasStatus(true, StatusID.MeikyoShisui); + private static bool HaveTsubamegaeshiReady => Player.HasStatus(true, StatusID.TsubamegaeshiReady); + private static bool HaveZanshinReady => Player.HasStatus(true, StatusID.ZanshinReady); #endregion -} +} \ No newline at end of file