diff --git a/BasicRotations/Melee/SAM_Default.cs b/BasicRotations/Melee/SAM_Default.cs index e45d5f4e8..1d982dcbb 100644 --- a/BasicRotations/Melee/SAM_Default.cs +++ b/BasicRotations/Melee/SAM_Default.cs @@ -1,16 +1,12 @@ namespace DefaultRotations.Melee; -[Rotation("Default", CombatType.PvE, GameVersion = "7.05")] +[Rotation("Default", CombatType.PvE, GameVersion = "7.11")] [SourceCode(Path = "main/BasicRotations/Melee/SAM_Default.cs")] [Api(4)] public sealed class SAM_Default : SamuraiRotation { #region Config Options - [Range(0, 85, ConfigUnitType.None, 5)] - [RotationConfig(CombatType.PvE, Name = "Use Kenki above.")] - public int AddKenki { get; set; } = 50; - [RotationConfig(CombatType.PvE, Name = "Prevent Higanbana use if theres more than one target")] public bool HiganbanaTargets { get; set; } = false; @@ -58,6 +54,26 @@ protected override bool DefenseSingleAbility(IAction nextGCD, out IAction? act) #region oGCD Logic + protected override bool EmergencyAbility(IAction nextGCD, out IAction? act) + { + act = null; + if (EnableTEAChecker && Target.Name.ToString() == "Jagd Doll" && Target.GetHealthRatio() < 0.25) + { + return false; + } + + 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)) + { + if (MeikyoShisuiPvE.CanUse(out act, usedUp: true)) return true; + } + return base.EmergencyAbility(nextGCD, out act); + } + protected override bool AttackAbility(IAction nextGCD, out IAction? act) { act = null; @@ -83,34 +99,17 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act) if (HagakurePvE.CanUse(out act)) return true; } - if (ZanshinPvE.CanUse(out act)) return true; // need to check rsr code for upgrade and remove aoecheck here !!! check later !!! - if (HissatsuGurenPvE.CanUse(out act, skipAoeCheck: !HissatsuSeneiPvE.EnoughLevel)) return true; - if (HissatsuSeneiPvE.CanUse(out act)) return true; + if (ZanshinPvE.CanUse(out act)) return true; - if (HissatsuKyutenPvE.CanUse(out act)) return true; - if (HissatsuShintenPvE.CanUse(out act)) return true; + //ensures pooling Kenki for Zanshin if it's available + bool hasZanshinReady = Player.HasStatus(true, StatusID.ZanshinReady_3855); - return base.AttackAbility(nextGCD, out act); - } + if (!hasZanshinReady && HissatsuGurenPvE.CanUse(out act, skipAoeCheck: !HissatsuSeneiPvE.EnoughLevel)) return true; + if (!hasZanshinReady && HissatsuSeneiPvE.CanUse(out act)) return true; + if (!hasZanshinReady && HissatsuKyutenPvE.CanUse(out act)) return true; + if (!hasZanshinReady && HissatsuShintenPvE.CanUse(out act)) return true; - protected override bool EmergencyAbility(IAction nextGCD, out IAction? act) - { - act = null; - if (EnableTEAChecker && Target.Name.ToString() == "Jagd Doll" && Target.GetHealthRatio() < 0.25) - { - return false; - } - - 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)) - { - if (MeikyoShisuiPvE.CanUse(out act, usedUp: true)) return true; - } - return base.EmergencyAbility(nextGCD, out act); + return base.AttackAbility(nextGCD, out act); } #endregion diff --git a/BasicRotations/Ranged/BRD_Default.cs b/BasicRotations/Ranged/BRD_Default.cs index 745db9fd2..07d234b0d 100644 --- a/BasicRotations/Ranged/BRD_Default.cs +++ b/BasicRotations/Ranged/BRD_Default.cs @@ -91,6 +91,24 @@ protected override bool DefenseAreaAbility(IAction nextGCD, out IAction act) protected override bool GeneralAbility(IAction nextGCD, out IAction? act) { + if (TheWanderersMinuetPvE.CanUse(out act) && InCombat && !IsLastAbility(ActionID.ArmysPaeonPvE) && !IsLastAbility(ActionID.MagesBalladPvE)) + { + if (SongEndAfter(ARMYRemainTime) && (Song != Song.NONE || Player.HasStatus(true, StatusID.ArmysEthos))) return true; + } + + if (MagesBalladPvE.CanUse(out act) && InCombat && !IsLastAbility(ActionID.ArmysPaeonPvE) && !IsLastAbility(ActionID.TheWanderersMinuetPvE)) + { + if (Song == Song.WANDERER && SongEndAfter(WANDRemainTime) && (Repertoire == 0 || !HasHostilesInMaxRange)) return true; + if (Song == Song.ARMY && SongEndAfterGCD(2) && TheWanderersMinuetPvE.Cooldown.IsCoolingDown) return true; + } + + if (ArmysPaeonPvE.CanUse(out act) && InCombat && !IsLastAbility(ActionID.MagesBalladPvE) && !IsLastAbility(ActionID.TheWanderersMinuetPvE)) + { + if (TheWanderersMinuetPvE.EnoughLevel && SongEndAfter(MAGERemainTime) && Song == Song.MAGE) return true; + if (TheWanderersMinuetPvE.EnoughLevel && SongEndAfter(2) && MagesBalladPvE.Cooldown.IsCoolingDown && Song == Song.WANDERER) return true; + if (!TheWanderersMinuetPvE.EnoughLevel && SongEndAfter(2)) return true; + } + if (Song == Song.NONE && InCombat) { switch (FirstSong) @@ -112,24 +130,6 @@ protected override bool GeneralAbility(IAction nextGCD, out IAction? act) if (ArmysPaeonPvE.CanUse(out act)) return true; } - if (TheWanderersMinuetPvE.CanUse(out act) && InCombat) - { - if (SongEndAfter(ARMYRemainTime) && (Song != Song.NONE || Player.HasStatus(true, StatusID.ArmysEthos))) return true; - } - - if (MagesBalladPvE.CanUse(out act) && InCombat) - { - if (Song == Song.WANDERER && SongEndAfter(WANDRemainTime) && (Repertoire == 0 || !HasHostilesInMaxRange)) return true; - if (Song == Song.ARMY && SongEndAfterGCD(2) && TheWanderersMinuetPvE.Cooldown.IsCoolingDown) return true; - } - - if (ArmysPaeonPvE.CanUse(out act) && InCombat) - { - if (TheWanderersMinuetPvE.EnoughLevel && SongEndAfter(MAGERemainTime) && Song == Song.MAGE) return true; - if (TheWanderersMinuetPvE.EnoughLevel && SongEndAfter(2) && MagesBalladPvE.Cooldown.IsCoolingDown && Song == Song.WANDERER) return true; - if (!TheWanderersMinuetPvE.EnoughLevel && SongEndAfter(2)) return true; - } - return base.GeneralAbility(nextGCD, out act); } diff --git a/RotationSolver.Basic/Rotations/Basic/SamuraiRotation.cs b/RotationSolver.Basic/Rotations/Basic/SamuraiRotation.cs index 574e4365d..9175525a1 100644 --- a/RotationSolver.Basic/Rotations/Basic/SamuraiRotation.cs +++ b/RotationSolver.Basic/Rotations/Basic/SamuraiRotation.cs @@ -282,7 +282,7 @@ static partial void ModifyGyofuPvE(ref ActionSetting setting) static partial void ModifyZanshinPvE(ref ActionSetting setting) { - setting.StatusNeed = [StatusID.ZanshinReady]; + setting.StatusNeed = [StatusID.ZanshinReady_3855]; setting.ActionCheck = () => Kenki >= 50; setting.CreateConfig = () => new ActionConfig() {