diff --git a/RotationSolver/Commands/RSCommandType.cs b/RotationSolver/Commands/RSCommandType.cs index 81baa4503..ed004b432 100644 --- a/RotationSolver/Commands/RSCommandType.cs +++ b/RotationSolver/Commands/RSCommandType.cs @@ -7,7 +7,7 @@ internal enum SpecialCommandType : byte HealSingle, DefenseArea, DefenseSingle, - EsunaShieldNorth, + EsunaStanceNorth, RaiseShirk, MoveForward, MoveBack, diff --git a/RotationSolver/Helpers/StatusHelper.cs b/RotationSolver/Helpers/StatusHelper.cs index 89bc39325..9e1ab7730 100644 --- a/RotationSolver/Helpers/StatusHelper.cs +++ b/RotationSolver/Helpers/StatusHelper.cs @@ -22,7 +22,7 @@ internal static class StatusHelper StatusID.AspectedBenefic, StatusID.Regen1, StatusID.Regen2, StatusID.Regen3 }; - public static StatusID[] SheildStatus { get; } = new StatusID[] + public static StatusID[] TankStanceStatus { get; } = new StatusID[] { StatusID.Grit, StatusID.RoyalGuard, StatusID.IronWill, StatusID.Defiance }; diff --git a/RotationSolver/Helpers/TargetFilter.cs b/RotationSolver/Helpers/TargetFilter.cs index 843189125..602f42096 100644 --- a/RotationSolver/Helpers/TargetFilter.cs +++ b/RotationSolver/Helpers/TargetFilter.cs @@ -27,7 +27,7 @@ internal static BattleChara DefaultChooseFriend(IEnumerable availab availableCharas = availableCharas.GetJobCategory(JobRole.Tank); - return availableCharas.FirstOrDefault(t => t.HasStatus(false, StatusHelper.SheildStatus)) + return availableCharas.FirstOrDefault(t => t.HasStatus(false, StatusHelper.TankStanceStatus)) ?? availableCharas.FirstOrDefault(); } @@ -139,7 +139,7 @@ internal static BattleChara FindAttackedTarget(IEnumerable charas, if (!attachedT.Any()) { - attachedT = charas.Where(tank => tank.HasStatus(false, StatusHelper.SheildStatus)); + attachedT = charas.Where(tank => tank.HasStatus(false, StatusHelper.TankStanceStatus)); } if (!attachedT.Any()) diff --git a/RotationSolver/Localization/EnumTranslations.cs b/RotationSolver/Localization/EnumTranslations.cs index b5cf72948..7d9d0e3a4 100644 --- a/RotationSolver/Localization/EnumTranslations.cs +++ b/RotationSolver/Localization/EnumTranslations.cs @@ -117,12 +117,12 @@ internal static class EnumTranslations SpecialCommandType.HealSingle => LocalizationManager.RightLang.SpecialCommandType_HealSingle, SpecialCommandType.DefenseArea => LocalizationManager.RightLang.SpecialCommandType_DefenseArea, SpecialCommandType.DefenseSingle => LocalizationManager.RightLang.SpecialCommandType_DefenseSingle, - SpecialCommandType.EsunaShieldNorth => role switch + SpecialCommandType.EsunaStanceNorth => role switch { JobRole.Tank => LocalizationManager.RightLang.SpecialCommandType_Shield, JobRole.Healer => CustomRotation.Esuna.Name, JobRole.Melee => CustomRotation.TrueNorth.Name, - _ => nameof(SpecialCommandType.EsunaShieldNorth), + _ => nameof(SpecialCommandType.EsunaStanceNorth), }, SpecialCommandType.RaiseShirk => role switch { @@ -152,7 +152,7 @@ internal static class EnumTranslations SpecialCommandType.HealSingle => LocalizationManager.RightLang.Configwindow_HelpItem_HealSingle, SpecialCommandType.DefenseArea => LocalizationManager.RightLang.Configwindow_HelpItem_DefenseArea, SpecialCommandType.DefenseSingle => LocalizationManager.RightLang.Configwindow_HelpItem_DefenseSingle, - SpecialCommandType.EsunaShieldNorth => LocalizationManager.RightLang.Configwindow_HelpItem_EsunaShield, + SpecialCommandType.EsunaStanceNorth => LocalizationManager.RightLang.Configwindow_HelpItem_EsunaShield, SpecialCommandType.RaiseShirk => LocalizationManager.RightLang.Configwindow_HelpItem_RaiseShirk, SpecialCommandType.MoveForward => LocalizationManager.RightLang.Configwindow_HelpItem_MoveForward, SpecialCommandType.MoveBack => LocalizationManager.RightLang.Configwindow_HelpItem_MoveBack, diff --git a/RotationSolver/Rotations/Basic/BRD_Base.cs b/RotationSolver/Rotations/Basic/BRD_Base.cs index 338eb9fe1..6e35155a1 100644 --- a/RotationSolver/Rotations/Basic/BRD_Base.cs +++ b/RotationSolver/Rotations/Basic/BRD_Base.cs @@ -210,7 +210,7 @@ internal abstract class BRD_Base : CustomRotation.CustomRotation private protected override bool EmergencyAbility(byte abilityRemain, IAction nextGCD, out IAction act) { //��ijЩ�dz�Σ�յ�״̬�� - if (RSCommands.SpecialType == SpecialCommandType.EsunaShieldNorth && TargetUpdater.WeakenPeople.Any() || TargetUpdater.DyingPeople.Any()) + if (RSCommands.SpecialType == SpecialCommandType.EsunaStanceNorth && TargetUpdater.WeakenPeople.Any() || TargetUpdater.DyingPeople.Any()) { if (WardensPaean.CanUse(out act, mustUse: true)) return true; } diff --git a/RotationSolver/Rotations/CustomRotation/CustomRotation_Ability.cs b/RotationSolver/Rotations/CustomRotation/CustomRotation_Ability.cs index 86d529605..f6c181d15 100644 --- a/RotationSolver/Rotations/CustomRotation/CustomRotation_Ability.cs +++ b/RotationSolver/Rotations/CustomRotation/CustomRotation_Ability.cs @@ -31,7 +31,7 @@ private bool Ability(byte abilitiesRemaining, IAction nextGCD, out IAction act, if (ShirkOrShield(role, specialType, out act)) return true; if (AntiKnockback(role, specialType, out act)) return true; - if (specialType == SpecialCommandType.EsunaShieldNorth && role == JobRole.Melee) + if (specialType == SpecialCommandType.EsunaStanceNorth && role == JobRole.Melee) { if (TrueNorth.CanUse(out act)) return true; } @@ -87,16 +87,16 @@ private bool ShirkOrShield(JobRole role, SpecialCommandType specialType, out IAc if (Shirk.CanUse(out act)) return true; break; - case SpecialCommandType.EsunaShieldNorth: + case SpecialCommandType.EsunaStanceNorth: if (Shield.CanUse(out act)) return true; break; } if (Service.Configuration.AutoShield) { - if (!TargetUpdater.AllianceTanks.Any(t => t.CurrentHp != 0 && t.HasStatus(false, StatusHelper.SheildStatus))) + if (!TargetUpdater.AllianceTanks.Any(t => t.CurrentHp != 0 && t.HasStatus(false, StatusHelper.TankStanceStatus))) { - if (!HasShield && Shield.CanUse(out act)) return true; + if (!HasTankStance && Shield.CanUse(out act)) return true; } } @@ -164,7 +164,7 @@ private bool AutoDefense(byte abilitiesRemaining, JobRole role, bool helpDefense && TargetFilter.ProvokeTarget(TargetUpdater.HostileTargets, true).Count() != TargetUpdater.HostileTargets.Count()) { - if (!HasShield && Shield.CanUse(out act)) return true; + if (!HasTankStance && Shield.CanUse(out act)) return true; if (Provoke.CanUse(out act, mustUse: true)) return true; } @@ -181,7 +181,7 @@ private bool AutoDefense(byte abilitiesRemaining, JobRole role, bool helpDefense } //Defnece himself. - if (role == JobRole.Tank && HasShield) + if (role == JobRole.Tank && HasTankStance) { var tarOnmeCount = TargetUpdater.TarOnMeTargets.Count(); diff --git a/RotationSolver/Rotations/CustomRotation/CustomRotation_GCD.cs b/RotationSolver/Rotations/CustomRotation/CustomRotation_GCD.cs index 26b6f71c7..bf2cc792e 100644 --- a/RotationSolver/Rotations/CustomRotation/CustomRotation_GCD.cs +++ b/RotationSolver/Rotations/CustomRotation/CustomRotation_GCD.cs @@ -40,7 +40,7 @@ private IAction GCD(byte abilityRemain, bool helpDefenseAOE, bool helpDefenseSin if (helpDefenseSingle && DefenseSingleGCD(out act)) return act; //Esuna - if ((specialType == SpecialCommandType.EsunaShieldNorth || !HasHostilesInRange || Service.Configuration.EsunaAll) + if ((specialType == SpecialCommandType.EsunaStanceNorth || !HasHostilesInRange || Service.Configuration.EsunaAll) && TargetUpdater.WeakenPeople.Any() || TargetUpdater.DyingPeople.Any()) { diff --git a/RotationSolver/Rotations/CustomRotation/CustomRotation_OtherInfo.cs b/RotationSolver/Rotations/CustomRotation/CustomRotation_OtherInfo.cs index 2a496a782..cc60b3ca4 100644 --- a/RotationSolver/Rotations/CustomRotation/CustomRotation_OtherInfo.cs +++ b/RotationSolver/Rotations/CustomRotation/CustomRotation_OtherInfo.cs @@ -33,7 +33,7 @@ internal abstract partial class CustomRotation /// /// /// - internal static bool HasShield => Player?.HasStatus(true, StatusHelper.SheildStatus) ?? false; + internal static bool HasTankStance => Player?.HasStatus(true, StatusHelper.TankStanceStatus) ?? false; /// /// Check the player is moving, such as running, walking or jumping. diff --git a/RotationSolver/Rotations/RangedMagicial/BLM/BLM_Default.cs b/RotationSolver/Rotations/RangedMagicial/BLM/BLM_Default.cs index 4270eafc8..4463521bd 100644 --- a/RotationSolver/Rotations/RangedMagicial/BLM/BLM_Default.cs +++ b/RotationSolver/Rotations/RangedMagicial/BLM/BLM_Default.cs @@ -3,6 +3,8 @@ using RotationSolver.Data; using RotationSolver.Helpers; using RotationSolver.Rotations.Basic; +using RotationSolver.Rotations.CustomRotation; +using System.Collections.Generic; namespace RotationSolver.Rotations.RangedMagicial.BLM; @@ -12,6 +14,11 @@ internal class BLM_Default : BLM_Base public override string RotationName => "Default"; + public override SortedList DescriptionDict => new SortedList() + { + {DescType.HealSingle, $"{BetweenTheLines}, {Leylines}" } + }; + private static bool NeedToGoIce { get diff --git a/RotationSolver/Rotations/RangedMagicial/BLU/BLU_Default.cs b/RotationSolver/Rotations/RangedMagicial/BLU/BLU_Default.cs index 2dd37d924..4e217cc21 100644 --- a/RotationSolver/Rotations/RangedMagicial/BLU/BLU_Default.cs +++ b/RotationSolver/Rotations/RangedMagicial/BLU/BLU_Default.cs @@ -106,7 +106,7 @@ private protected override bool HealAreaGCD(out IAction act) if (BlueId == BLUID.Healer) { //有某些非常危险的状态。 - if (RSCommands.SpecialType == SpecialCommandType.EsunaShieldNorth && TargetUpdater.WeakenPeople.Any() || TargetUpdater.DyingPeople.Any()) + if (RSCommands.SpecialType == SpecialCommandType.EsunaStanceNorth && TargetUpdater.WeakenPeople.Any() || TargetUpdater.DyingPeople.Any()) { if (Exuviation.CanUse(out act, mustUse: true)) return true; } diff --git a/RotationSolver/Rotations/Tank/DRK/DRK_Default.cs b/RotationSolver/Rotations/Tank/DRK/DRK_Default.cs index e95a8f8a4..5d117cdfd 100644 --- a/RotationSolver/Rotations/Tank/DRK/DRK_Default.cs +++ b/RotationSolver/Rotations/Tank/DRK/DRK_Default.cs @@ -18,14 +18,9 @@ internal sealed class DRK_Default : DRK_Base protected override bool CanHealSingleAbility => false; - /// - /// 在4人本的道中已经聚好怪可以使用相关技能(不移动且身边有大于3只小怪) - /// - private static bool CanUseSpellInDungeonsMiddle => TargetUpdater.PartyMembers.Count() is > 1 and <= 4 && !Target.IsBoss() && !IsMoving - && TargetUpdater.HostileTargets.GetObjectInRadius(5).Count() >= 3; - public override SortedList DescriptionDict => new() { + {DescType.Description, "If you don't want to use Provoke, please remove the tank stance." }, {DescType.HealSingle, $"{TheBlackestNight}"}, {DescType.DefenseArea, $"{DarkMissionary}"}, {DescType.DefenseSingle, $"{Oblation}, {ShadowWall}, {DarkMind}"}, @@ -39,6 +34,16 @@ private protected override IRotationConfigSet CreateConfiguration() .SetBool("TheBlackestNight", true, "Keep 3000 MP"); } + private protected override IAction CountDownAction(float remainTime) + { + //Provoke when has Shield. + if (HasTankStance && remainTime <= 0.7 && Provoke.CanUse(out var act)) return act; + if (remainTime <= 2 && UseTincture(out act)) return act; + if (remainTime <= 3 && TheBlackestNight.CanUse(out act)) return act; + if (remainTime <= 4 && BloodWeapon.CanUse(out act)) return act; + return base.CountDownAction(remainTime); + } + private protected override bool HealSingleAbility(byte abilitiesRemaining, out IAction act) { if (TheBlackestNight.CanUse(out act)) return true; @@ -54,6 +59,32 @@ private protected override bool DefenceAreaAbility(byte abilitiesRemaining, out return false; } + private protected override bool DefenceSingleAbility(byte abilitiesRemaining, out IAction act) + { + if (TheBlackestNight.CanUse(out act)) return true; + + if (abilitiesRemaining == 2) + { + //10 + if (TargetUpdater.HostileTargets.Count() > 1 && Oblation.CanUse(out act)) return true; + + //30 + if (ShadowWall.CanUse(out act)) return true; + + //20 + if (Rampart.CanUse(out act)) return true; + if (DarkMind.CanUse(out act)) return true; + + //10 + if(Oblation.CanUse(out act, emptyOrSkipCombo:true)) return true; + } + + if (Reprisal.CanUse(out act)) return true; + + act = null; + return false; + } + private protected override bool GeneralGCD(out IAction act) { //寂灭 @@ -70,7 +101,6 @@ private protected override bool GeneralGCD(out IAction act) if (Blood >= 50 && BloodWeapon.WillHaveOneChargeGCD(1) || Blood >= 90 && !Player.HasStatus(true, StatusID.Delirium)) return true; if (!Delirium.EnoughLevel) return true; - } //AOE @@ -83,14 +113,13 @@ private protected override bool GeneralGCD(out IAction act) if (HardSlash.CanUse(out act)) return true; if (RSCommands.SpecialType == SpecialCommandType.MoveForward && MoveForwardAbility(1, out act)) return true; - if (Unmend.CanUse(out act)) return true; return false; } private protected override bool AttackAbility(byte abilitiesRemaining, out IAction act) { - if (InBurst && (!IsFullParty && CanUseSpellInDungeonsMiddle || IsFullParty)) + //if (InBurst && (!IsFullParty && CanUseSpellInDungeonsMiddle || IsFullParty)) { //嗜血 if (BloodWeapon.CanUse(out act)) return true; @@ -140,30 +169,6 @@ private protected override bool AttackAbility(byte abilitiesRemaining, out IActi } - private protected override bool DefenceSingleAbility(byte abilitiesRemaining, out IAction act) - { - //上黑盾 - if (TheBlackestNight.CanUse(out act)) return true; - - if (abilitiesRemaining == 2) - { - //减伤10% - if (Oblation.CanUse(out act)) return true; - - //减伤30% - if (ShadowWall.CanUse(out act)) return true; - - //减伤20% - if (Rampart.CanUse(out act)) return true; - if (DarkMind.CanUse(out act)) return true; - } - //降低攻击 - //雪仇 - if (Reprisal.CanUse(out act)) return true; - - act = null; - return false; - } private bool CanUseEdgeofDarkness(out IAction act) { @@ -184,11 +189,4 @@ private bool CanUseEdgeofDarkness(out IAction act) return false; } - private protected override IAction CountDownAction(float remainTime) - { - //战斗前嗜血和血乱 - if (remainTime <= 7 && Delirium.CanUse(out var act)) return act; - if (remainTime <= 5 && BloodWeapon.CanUse(out var act1)) return act1; - return base.CountDownAction(remainTime); - } } diff --git a/RotationSolver/Rotations/Tank/PLD/PLD_Default.cs b/RotationSolver/Rotations/Tank/PLD/PLD_Default.cs index c3b9ab541..42ee81125 100644 --- a/RotationSolver/Rotations/Tank/PLD/PLD_Default.cs +++ b/RotationSolver/Rotations/Tank/PLD/PLD_Default.cs @@ -159,7 +159,7 @@ private protected override bool AttackAbility(byte abilitiesRemaining, out IActi } if (OathGauge == 100 && Player.CurrentHp < Player.MaxHp)//忠义已满且不满血 { - if (HasShield && Sheltron.CanUse(out act)) return true;//盾阵 + if (HasTankStance && Sheltron.CanUse(out act)) return true;//盾阵 } return false; diff --git a/RotationSolver/Rotations/Tank/WAR/WAR_Default.cs b/RotationSolver/Rotations/Tank/WAR/WAR_Default.cs index 475c13862..d255bc51d 100644 --- a/RotationSolver/Rotations/Tank/WAR/WAR_Default.cs +++ b/RotationSolver/Rotations/Tank/WAR/WAR_Default.cs @@ -124,7 +124,7 @@ private protected override bool AttackAbility(byte abilitiesRemaining, out IActi } //�̸����Ѱ��� - if (!HasShield && NascentFlash.CanUse(out act)) return true; + if (!HasTankStance && NascentFlash.CanUse(out act)) return true; //ս�� if (Infuriate.CanUse(out act, emptyOrSkipCombo: true)) return true; diff --git a/RotationSolver/Windows/RotationConfigWindow_Help.cs b/RotationSolver/Windows/RotationConfigWindow_Help.cs index 9e4354abf..bfa50994f 100644 --- a/RotationSolver/Windows/RotationConfigWindow_Help.cs +++ b/RotationSolver/Windows/RotationConfigWindow_Help.cs @@ -74,7 +74,7 @@ private void DrawHelpTab() SpecialCommandType.MoveBack.DisplayCommandHelp(getHelp: EnumTranslations.ToHelp); ImGui.Separator(); - SpecialCommandType.EsunaShieldNorth.DisplayCommandHelp(getHelp: EnumTranslations.ToHelp); + SpecialCommandType.EsunaStanceNorth.DisplayCommandHelp(getHelp: EnumTranslations.ToHelp); ImGui.Separator(); SpecialCommandType.RaiseShirk.DisplayCommandHelp(getHelp: EnumTranslations.ToHelp);