Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: add bulwark status.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Mar 4, 2023
1 parent 87ea46c commit fc4c49f
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 14 deletions.
4 changes: 2 additions & 2 deletions RotationSolver/Actions/BaseAction/BaseAction_Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ internal static bool TankDefenseSelf(BattleChara chara)
{
return TargetUpdater.TarOnMeTargets.Any();
}
internal static bool TankBreakOtherCheck(ClassJobID id, BattleChara chara)
internal static bool TankBreakOtherCheck(ClassJobID id)
{
var tankHealth = id.GetHealthForDyingTank();

return TargetUpdater.HasHostilesInRange
&& Service.ClientState.LocalPlayer.GetHealthRatio() < tankHealth
&& TargetUpdater.PartyMembersAverHP > tankHealth + 0.05f;
&& TargetUpdater.PartyMembersAverHP > tankHealth + 0.01f;
}

private bool FindTarget(bool mustUse, out BattleChara target)
Expand Down
6 changes: 3 additions & 3 deletions RotationSolver/Data/StatusID.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,7 @@ internal enum StatusID : ushort
/// <summary>
/// 铁壁
/// </summary>
Rampart1 = 71,
Rampart2 = 1191,
Rampart3 = 1978,
Rampart = 1191,

/// <summary>
/// 复仇
Expand Down Expand Up @@ -1119,4 +1117,6 @@ internal enum StatusID : ushort
Aetherpact = 1223,

ConfiteorReady = 3019,

Bulwark = 77,
}
2 changes: 1 addition & 1 deletion RotationSolver/Rotations/Basic/DRK_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ protected static bool DarkSideEndAfterGCD(uint gctCount = 0, uint abilityCount =
private protected override bool EmergencyAbility(byte abilitiesRemaining, IAction nextGCD, out IAction act)
{
//行尸走肉
if (LivingDead.CanUse(out act) && BaseAction.TankBreakOtherCheck(JobIDs[0], LivingDead.Target)) return true;
if (LivingDead.CanUse(out act) && BaseAction.TankBreakOtherCheck(JobIDs[0])) return true;

return base.EmergencyAbility(abilitiesRemaining, nextGCD, out act);
}
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Rotations/Basic/GNB_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ internal abstract class GNB_Base : CustomRotation.CustomRotation

private protected override bool EmergencyAbility(byte abilitiesRemaining, IAction nextGCD, out IAction act)
{
if (Superbolide.CanUse(out act) && BaseAction.TankBreakOtherCheck(JobIDs[0], Superbolide.Target)) return true;
if (Superbolide.CanUse(out act) && BaseAction.TankBreakOtherCheck(JobIDs[0])) return true;
return base.EmergencyAbility(abilitiesRemaining, nextGCD, out act);
}

Expand Down
11 changes: 7 additions & 4 deletions RotationSolver/Rotations/Basic/PLD_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ internal abstract class PLD_Base : CustomRotation.CustomRotation
/// <summary>
/// 神圣领域
/// </summary>
public static IBaseAction HallowedGround { get; } = new BaseAction(ActionID.HallowedGround, isTimeline: true);
public static IBaseAction HallowedGround { get; } = new BaseAction(ActionID.HallowedGround, true, isTimeline: true);

/// <summary>
/// 圣光幕帘
Expand Down Expand Up @@ -200,17 +200,20 @@ internal abstract class PLD_Base : CustomRotation.CustomRotation
/// <summary>
/// 盾阵
/// </summary>
public static IBaseAction Sheltron { get; } = new BaseAction(ActionID.Sheltron, isTimeline: true)
public static IBaseAction Sheltron { get; } = new BaseAction(ActionID.Sheltron, true, isTimeline: true)
{
ActionCheck = Cover.ActionCheck,
};

public static IBaseAction Bulwark { get; } = new BaseAction(ActionID.Bulwark, isTimeline: true);
public static IBaseAction Bulwark { get; } = new BaseAction(ActionID.Bulwark, true, isTimeline: true)
{
StatusProvide = Rampart.StatusProvide,
};


private protected override bool EmergencyAbility(byte abilitiesRemaining, IAction nextGCD, out IAction act)
{
if (HallowedGround.CanUse(out act) && BaseAction.TankBreakOtherCheck(JobIDs[0], HallowedGround.Target)) return true;
if (HallowedGround.CanUse(out act) && BaseAction.TankBreakOtherCheck(JobIDs[0])) return true;
return base.EmergencyAbility(abilitiesRemaining, nextGCD, out act);
}

Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Rotations/Basic/WAR_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ internal abstract class WAR_Base : CustomRotation.CustomRotation
private protected override bool EmergencyAbility(byte abilitiesRemaining, IAction nextGCD, out IAction act)
{
//死斗 如果血不够了。
if (Holmgang.CanUse(out act) && BaseAction.TankBreakOtherCheck(JobIDs[0], Holmgang.Target)) return true;
if (Holmgang.CanUse(out act) && BaseAction.TankBreakOtherCheck(JobIDs[0])) return true;
return base.EmergencyAbility(abilitiesRemaining, nextGCD, out act);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ internal RoleAction(ActionID actionID, JobRole[] roles, bool isFriendly = false,
StatusProvide = new StatusID[]
{
StatusID.Superbolide, StatusID.HallowedGround,
StatusID.Rampart1, StatusID.Rampart2, StatusID.Rampart3,
StatusID.Rampart, StatusID.Bulwark,
//原初的直觉和血气
StatusID.RawIntuition, StatusID.Bloodwhetting,
//复仇
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Windows/OverlayWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace RotationSolver.Windows;

internal static class OverlayWindow
{
internal static BattleChara EnemyLocationTarget;
internal static BattleChara EnemyLocationTarget { get; set; }
internal static EnemyPositional ShouldPositional { get; set; } = EnemyPositional.None;
public static void Draw()
{
Expand Down

0 comments on commit fc4c49f

Please sign in to comment.