Skip to content

Commit

Permalink
Merge pull request #340 from FFXIV-CombatReborn/PCT-status-tracking
Browse files Browse the repository at this point in the history
Refactor PictomancerRotation stack handling
  • Loading branch information
LTS-FFXIV authored Sep 9, 2024
2 parents f427d2a + 958b717 commit be504b0
Showing 1 changed file with 34 additions and 3 deletions.
37 changes: 34 additions & 3 deletions RotationSolver.Basic/Rotations/Basic/PictomancerRotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,37 @@ public partial class PictomancerRotation
/// </summary>
public static bool HasStarryMuse => Player.HasStatus(true, StatusID.StarryMuse);

/// <summary>
/// Holds the remaining amount of HammerTime stacks
/// </summary>
public static byte HammerStacks
{
get
{
byte stacks = Player.StatusStack(true, StatusID.HammerTime);
return stacks == byte.MaxValue ? (byte)3 : stacks;
}
}

/// <summary>
/// Holds the remaining amount of SubtractivePalette stacks
/// </summary>
public static byte SubtractiveStacks
{
get
{
byte stacks = Player.StatusStack(true, StatusID.SubtractivePalette);
return stacks == byte.MaxValue ? (byte)3 : stacks;
}
}

/// <inheritdoc/>
public override void DisplayStatus()
{
ImGui.Text("HammerStacks: " + HammerStacks.ToString());
ImGui.Text("SubtractiveStacks: " + SubtractiveStacks.ToString());
}

#endregion

static partial void ModifyFireInRedPvE(ref ActionSetting setting)
Expand Down Expand Up @@ -282,7 +313,7 @@ static partial void ModifySteelMusePvE(ref ActionSetting setting)

static partial void ModifyHammerStampPvE(ref ActionSetting setting)
{
setting.ActionCheck = () => HasHammerTime;
setting.ActionCheck = () => HammerStacks == 3;
setting.CreateConfig = () => new ActionConfig()
{
AoeCount = 1,
Expand Down Expand Up @@ -387,7 +418,7 @@ static partial void ModifyHolyInWhitePvE(ref ActionSetting setting)

static partial void ModifyHammerBrushPvE(ref ActionSetting setting)
{
setting.ActionCheck = () => HasHammerTime;
setting.ActionCheck = () => HammerStacks == 2;
setting.ComboIds = [ActionID.HammerStampPvE];
setting.CreateConfig = () => new ActionConfig()
{
Expand All @@ -397,7 +428,7 @@ static partial void ModifyHammerBrushPvE(ref ActionSetting setting)

static partial void ModifyPolishingHammerPvE(ref ActionSetting setting)
{
setting.ActionCheck = () => HasHammerTime;
setting.ActionCheck = () => HammerStacks == 1;
setting.ComboIds = [ActionID.HammerBrushPvE];
setting.CreateConfig = () => new ActionConfig()
{
Expand Down

0 comments on commit be504b0

Please sign in to comment.