From b8533b34a80328768dadaabc27482276d78b730b Mon Sep 17 00:00:00 2001 From: MZ Date: Sun, 14 Jul 2024 15:10:27 +0930 Subject: [PATCH] Merge SAM changes Based on the RSR SAM spell updates, merged two version of RR SAM rotation files. Delayed opener for manually weaving tincture + correct level 100 spells. Single target and AOE are tested on dummy and level 70 and 100 dungeons (both synced, but not full clear). --- BasicRotations/Melee/SAM_Default.cs | 67 +++++++++++++---------------- 1 file changed, 29 insertions(+), 38 deletions(-) diff --git a/BasicRotations/Melee/SAM_Default.cs b/BasicRotations/Melee/SAM_Default.cs index 97a6d82..137fd0a 100644 --- a/BasicRotations/Melee/SAM_Default.cs +++ b/BasicRotations/Melee/SAM_Default.cs @@ -17,6 +17,7 @@ public sealed class SAM_Default : SamuraiRotation protected override IAction? CountDownAction(float remainTime) { + // pre-pull: can be changed to -9 and -5 instead of 5 and 2, but it's hard to be universal !!! check later !!! if (remainTime <= 5 && MeikyoShisuiPvE.CanUse(out var act)) return act; if (remainTime <= 2 && TrueNorthPvE.CanUse(out act)) return act; return base.CountDownAction(remainTime); @@ -31,13 +32,12 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act) var IsTargetBoss = HostileTarget?.IsBossFromTTK() ?? false; var IsTargetDying = HostileTarget?.IsDying() ?? false; - if (Kenki >= 50 && HasMoon && HasFlower && HaveZanshinReady) - { - if (ZanshinPvE.CanUse(out act, skipAoeCheck: true)) return true; - } - + // IkishotenPvE logic combined with the delayed opener: + // you should weave the tincture in manually after rsr lands the first gcd (usually Gekko) + // and that's the only chance for tincture weaving during opener if (Kenki <= 50 && !CombatElapsedLessGCD(2) && IkishotenPvE.CanUse(out act)) return true; + // from old version - didn't touch this, didn't test this, never saw Hagakure button pressed personally !!! check later !!! if ((HostileTarget?.HasStatus(true, StatusID.Higanbana) ?? false) && (HostileTarget?.WillStatusEnd(32, true, StatusID.Higanbana) ?? false) && !(HostileTarget?.WillStatusEnd(28, true, StatusID.Higanbana) ?? false) && @@ -46,31 +46,34 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act) if (HagakurePvE.CanUse(out act)) return true; } + // moon: fugetsu buff; flower: fuka buff + // only use senei/guren when the two buffs are up for max dps and correct rotation order if (HasMoon && HasFlower) { if (HissatsuGurenPvE.CanUse(out act, skipAoeCheck: !HissatsuSeneiPvE.EnoughLevel)) return true; if (HissatsuSeneiPvE.CanUse(out act)) return true; } - if (ShohaPvE.CanUse(out act, skipAoeCheck: true)) return true; + // Shoha is combined from two spells since 7.0, use it in both single target and aoe + if (ShohaPvE.CanUse(out act, skipAoeCheck: true)) return true; // need to check rsr code for upgrade and remove aoecheck here !!! check later !!! - if (!HaveZanshinReady && (Kenki >= 50 && IkishotenPvE.Cooldown.WillHaveOneCharge(10) || Kenki >= AddKenki || IsTargetBoss && IsTargetDying)) + // dump shinten + if (Kenki >= 50 && IkishotenPvE.Cooldown.WillHaveOneCharge(10) || Kenki >= AddKenki || IsTargetBoss && IsTargetDying) { + if (ZanshinPvE.CanUse(out act, skipAoeCheck: true)) return true; // need to check rsr code for upgrade and remove aoecheck here !!! check later !!! if (HissatsuKyutenPvE.CanUse(out act)) return true; - if (HissatsuShintenPvE.CanUse(out act)) - { - //Debug.WriteLine("Send to debug outputa."); - return true; - } + if (HissatsuShintenPvE.CanUse(out act)) return true; } return base.AttackAbility(nextGCD, out act); } + protected override bool EmergencyAbility(IAction nextGCD, out IAction? act) { var IsTargetBoss = HostileTarget?.IsBossFromTTK() ?? false; var IsTargetDying = HostileTarget?.IsDying() ?? false; + // from old version - didn't touch this, didn't test this, personally i doubt it's working !!! check later !!! if (HasHostilesInRange && IsLastGCD(true, YukikazePvE, MangetsuPvE, OkaPvE) && (!IsTargetBoss || (HostileTarget?.HasStatus(true, StatusID.Higanbana) ?? false) && !(HostileTarget?.WillStatusEnd(40, true, StatusID.Higanbana) ?? false) || !HasMoon && !HasFlower || IsTargetBoss && IsTargetDying)) { @@ -85,18 +88,17 @@ protected override bool EmergencyAbility(IAction nextGCD, out IAction? act) protected override bool GeneralGCD(out IAction? act) { + // use 2nd finisher combo spell first if (KaeshiNamikiriPvE.CanUse(out act, skipAoeCheck: true, usedUp: true)) return true; 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; - + // use 2nd finisher combo spell first 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 @@ -109,47 +111,38 @@ protected override bool GeneralGCD(out IAction? act) } if (SenCount == 2) // 2 sen aoe combo finisher { - // !!! to be updated to TendoGokenPvE + if (TendoGokenPvE.CanUse(out act)) return true; if (TenkaGokenPvE.CanUse(out act, skipAoeCheck: !MidareSetsugekkaPvE.EnoughLevel)) return true; } if (SenCount == 3) // 3 sen single target combo finisher { - // 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; + // need to test for low level content !!! check later !!! + if (TendoSetsugekkaPvE.CanUse(out act)) return true; + if (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; - // !!! not working - if (!HasSetsu && YukikazePvE.CanUse(out act, skipComboCheck: HaveMeikyoShisui && HasGetsu && HasKa || IsLastGCD(true, HakazePvE))) return true; - + if (!HasSetsu && YukikazePvE.CanUse(out act, skipComboCheck: HaveMeikyoShisui && HasGetsu && HasKa)) 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; // 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; + if ((!HasMoon || IsMoonTimeLessThanFlower || !ShifuPvE.EnoughLevel) && JinpuPvE.CanUse(out act)) return true; + if ((!HasFlower || !IsMoonTimeLessThanFlower) && ShifuPvE.CanUse(out act)) return true; // initiate aoe - if (FukoPvE.CanUse(out act, skipComboCheck: true)) return true; + if (FukoPvE.CanUse(out act, skipComboCheck: true)) return true; // fuga doesn't becomes fuko automatically 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) { // 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; + if (HakazePvE.CanUse(out act)) return true; // hakaze becomes gyofu automatically, maybe it's something in rsr // target out of range if (EnpiPvE.CanUse(out act)) return true; @@ -162,8 +155,6 @@ 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