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

Commit

Permalink
fix: fixed action id about dnc.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Nov 9, 2023
1 parent 8f35bd3 commit 4954c51
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Resources/RotationSolverRecord.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ClickingCount": 58199,
"ClickingCount": 59325,
"SayingHelloCount": 2,
"SaidUsers": []
}
12 changes: 12 additions & 0 deletions RotationSolver.Basic/Data/ActionID.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1524,13 +1524,25 @@ public enum ActionID : uint
/// <summary>
///
/// </summary>
[Obsolete("This is the one for 0 steps.")]
StandardFinish = 16003,

/// <summary>
///
/// </summary>
DoubleStandardFinish = 16192,

/// <summary>
///
/// </summary>
[Obsolete("This is the one for 0 steps.")]
TechnicalFinish = 16004,

/// <summary>
///
/// </summary>
QuadrupleTechnicalFinish = 16196,

/// <summary>
///
/// </summary>
Expand Down
36 changes: 30 additions & 6 deletions RotationSolver.Basic/Rotations/Basic/DNC_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,19 +265,19 @@ public abstract class DNC_Base : CustomRotation
/// <summary>
///
/// </summary>
protected static IBaseAction StandardFinish { get; } = new BaseAction(ActionID.StandardFinish)
protected static IBaseAction StandardFinish { get; } = new BaseAction(ActionID.DoubleStandardFinish)
{
StatusNeed = new[] { StatusID.StandardStep },
ActionCheck = (b, m) => IsDancing && CompletedSteps == 2,
ActionCheck = (b, m) => IsDancing && CompletedSteps == 2 && Service.GetAdjustedActionId(ActionID.StandardStep) == ActionID.DoubleStandardFinish,
};

/// <summary>
///
/// </summary>
protected static IBaseAction TechnicalFinish { get; } = new BaseAction(ActionID.TechnicalFinish)
protected static IBaseAction TechnicalFinish { get; } = new BaseAction(ActionID.QuadrupleTechnicalFinish)
{
StatusNeed = new[] { StatusID.TechnicalStep },
ActionCheck = (b, m) => IsDancing && CompletedSteps == 4,
ActionCheck = (b, m) => IsDancing && CompletedSteps == 4 && Service.GetAdjustedActionId(ActionID.TechnicalStep) == ActionID.QuadrupleTechnicalFinish,
};

private static IBaseAction Emboite { get; } = new BaseAction(ActionID.Emboite)
Expand Down Expand Up @@ -309,8 +309,32 @@ protected static bool ExecuteStepGCD(out IAction act)
{
act = null;
if (!Player.HasStatus(true, StatusID.StandardStep, StatusID.TechnicalStep)) return false;
if (Player.HasStatus(true, StatusID.StandardStep) && CompletedSteps == 2) return false;
if (Player.HasStatus(true, StatusID.TechnicalStep) && CompletedSteps == 4) return false;
if (Player.HasStatus(true, StatusID.StandardStep) && CompletedSteps == 2)
{
if (StandardFinish.CanUse(out act, CanUseOption.MustUse))
{
return true;
}
if (Player.WillStatusEnd(1, true, StatusID.StandardStep, StatusID.StandardFinish))
{
act = StandardStep;
return true;
}
return false;
}
if (Player.HasStatus(true, StatusID.TechnicalStep) && CompletedSteps == 4)
{
if (TechnicalFinish.CanUse(out act, CanUseOption.MustUse))
{
return true;
}
if (Player.WillStatusEnd(1, true, StatusID.TechnicalStep))
{
act = TechnicalStep;
return true;
}
return false;
}

if (Emboite.CanUse(out act)) return true;
if (Entrechat.CanUse(out act)) return true;
Expand Down
1 change: 0 additions & 1 deletion RotationSolver/UI/RotationConfigWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2293,7 +2293,6 @@ private static void DrawListTerritories()
#endregion

#region Debug

private static void DrawDebug()
{
foreach (var searchable in _debugSearchable)
Expand Down
2 changes: 1 addition & 1 deletion XIVPainter

0 comments on commit 4954c51

Please sign in to comment.