From 3aab72c137fcc3d2642d56c45c4938fdec08fb05 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A7=8B=E6=B0=B4?= <1123993881@qq.com>
Date: Thu, 20 Apr 2023 20:50:02 +0800
Subject: [PATCH] fix: add Shield Bash for PLD.
---
Directory.Build.props | 2 +-
.../Actions/BaseAction_Target.cs | 2 +-
RotationSolver.Basic/Actions/IBaseAction.cs | 5 +++++
RotationSolver.Basic/Data/ActionID.cs | 2 ++
.../Rotations/Basic/PLD_Base.cs | 6 ++++++
.../Rotations/CustomRotation_Actions.cs | 21 -------------------
6 files changed, 15 insertions(+), 23 deletions(-)
diff --git a/Directory.Build.props b/Directory.Build.props
index eb374e7e7..abdb54e11 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -3,7 +3,7 @@
net7.0-windows
enable
ArchiTed
- 2.3.3
+ 2.3.3.1
x64
AnyCPU
diff --git a/RotationSolver.Basic/Actions/BaseAction_Target.cs b/RotationSolver.Basic/Actions/BaseAction_Target.cs
index 91f14db7e..f18c39807 100644
--- a/RotationSolver.Basic/Actions/BaseAction_Target.cs
+++ b/RotationSolver.Basic/Actions/BaseAction_Target.cs
@@ -34,7 +34,7 @@ private get
init => _choiceTarget = value;
}
- public Func, IEnumerable> FilterForHostiles { private get; init; } = null;
+ public Func, IEnumerable> FilterForHostiles { get; init; } = null;
public StatusID[] TargetStatus { get; init; } = null;
diff --git a/RotationSolver.Basic/Actions/IBaseAction.cs b/RotationSolver.Basic/Actions/IBaseAction.cs
index cd6b0bb3e..3ca9848ee 100644
--- a/RotationSolver.Basic/Actions/IBaseAction.cs
+++ b/RotationSolver.Basic/Actions/IBaseAction.cs
@@ -51,6 +51,11 @@ public interface IBaseAction : IAction
///
bool IsGeneralGCD { get; }
+ ///
+ /// The filter for hostiles.
+ ///
+ Func, IEnumerable> FilterForHostiles { get; }
+
///
/// Can I use this action at this time. It will check a lot of things.
/// Level, Enabled, Action Status, MP, Player Status, Coll down, Combo, Moving (for casting), Charges, Target, etc.
diff --git a/RotationSolver.Basic/Data/ActionID.cs b/RotationSolver.Basic/Data/ActionID.cs
index 67af10b76..98ce1dd86 100644
--- a/RotationSolver.Basic/Data/ActionID.cs
+++ b/RotationSolver.Basic/Data/ActionID.cs
@@ -846,6 +846,8 @@ public enum ActionID : uint
ShieldLob = 24,
+ ShieldBash = 16,
+
FightOrFlight = 20,
TotalEclipse = 7381,
diff --git a/RotationSolver.Basic/Rotations/Basic/PLD_Base.cs b/RotationSolver.Basic/Rotations/Basic/PLD_Base.cs
index abfe1883d..19fbb86be 100644
--- a/RotationSolver.Basic/Rotations/Basic/PLD_Base.cs
+++ b/RotationSolver.Basic/Rotations/Basic/PLD_Base.cs
@@ -34,6 +34,12 @@ public abstract class PLD_Base : CustomRotation
ActionCheck = b => !IsLastAction(IActionHelper.MovingActions),
};
+ public static IBaseAction ShieldBash { get; } = new BaseAction(ActionID.ShieldBash, ActionOption.Timeline)
+ {
+ FilterForHostiles = LowBlow.FilterForHostiles,
+ ActionCheck = b => LowBlow.IsCoolingDown,
+ };
+
public static IBaseAction FightOrFlight { get; } = new BaseAction(ActionID.FightOrFlight, ActionOption.Buff);
public static IBaseAction TotalEclipse { get; } = new BaseAction(ActionID.TotalEclipse);
diff --git a/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs b/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
index e5c8de84f..e217e8a63 100644
--- a/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
+++ b/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
@@ -107,54 +107,33 @@ internal RoleAction(ActionID actionID, JobRole[] roles, ActionOption option = Ac
ActionCheck = BaseAction.TankDefenseSelf,
};
- ///
- /// 挑衅
- ///
public static IBaseAction Provoke { get; } = new RoleAction(ActionID.Provoke, new JobRole[] { JobRole.Tank }, ActionOption.Timeline)
{
FilterForHostiles = b => TargetFilter.ProvokeTarget(b),
};
- ///
- /// 雪仇
- ///
public static IBaseAction Reprisal { get; } = new RoleAction(ActionID.Reprisal, new JobRole[] { JobRole.Tank }, ActionOption.Defense);
- ///
- /// 退避
- ///
public static IBaseAction Shirk { get; } = new RoleAction(ActionID.Shirk, new JobRole[] { JobRole.Tank }, ActionOption.Friendly | ActionOption.Timeline)
{
ChoiceTarget = (friends, mustUse) => TargetFilter.GetJobCategory(friends, JobRole.Tank)?.FirstOrDefault(),
};
- ///
- /// 浴血
- ///
public static IBaseAction Bloodbath { get; } = new RoleAction(ActionID.Bloodbath, new JobRole[] { JobRole.Melee }, ActionOption.Heal)
{
ActionCheck = SecondWind.ActionCheck,
};
- ///
- /// 牵制
- ///
public static IBaseAction Feint { get; } = new RoleAction(ActionID.Feint, new JobRole[] { JobRole.Melee }, ActionOption.Defense)
{
ActionCheck = b => !b.HasStatus(false, StatusID.Feint),
};
- ///
- /// 插言
- ///
public static IBaseAction Interject { get; } = new RoleAction(ActionID.Interject, new JobRole[] { JobRole.Tank })
{
FilterForHostiles = b => b.Where(ObjectHelper.CanInterrupt),
};
- ///
- /// 下踢
- ///
public static IBaseAction LowBlow { get; } = new RoleAction(ActionID.LowBlow, new JobRole[] { JobRole.Tank })
{
FilterForHostiles = bs => bs.Where(b =>