Skip to content

Commit

Permalink
Merge pull request #513 from FFXIV-CombatReborn/SAM512
Browse files Browse the repository at this point in the history
Add STtoAOE strategy option to SAM_Default class
  • Loading branch information
LTS-FFXIV authored Jan 2, 2025
2 parents 9918cb0 + 7da1a71 commit dc6241e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
31 changes: 30 additions & 1 deletion BasicRotations/Melee/SAM_Default.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace DefaultRotations.Melee;
using System.ComponentModel;

namespace DefaultRotations.Melee;

[Rotation("Default", CombatType.PvE, GameVersion = "7.15")]
[SourceCode(Path = "main/BasicRotations/Melee/SAM_Default.cs")]
Expand All @@ -7,6 +9,13 @@ public sealed class SAM_Default : SamuraiRotation
{
#region Config Options

public enum STtoAOEStrategy : byte
{
[Description("Hagakure")] Hagakure,

[Description("Midare Setsugekka")] MidareSetsugekka,
}

[Range(0, 100, ConfigUnitType.None, 1)]
[RotationConfig(CombatType.PvE, Name = "Kenki needed to use Shinten")]
public int ShintenKenki { get; set; } = 75;
Expand Down Expand Up @@ -35,6 +44,9 @@ public sealed class SAM_Default : SamuraiRotation

[RotationConfig(CombatType.PvE, Name = "Enable TEA Checker.")]
public bool EnableTEAChecker { get; set; } = false;

[RotationConfig(CombatType.PvE, Name = "Use Hagakure or Midare Setsugekka when going from single target to AOE scenarios")]
public STtoAOEStrategy STtoAOE { get; set; } = STtoAOEStrategy.Hagakure;
#endregion

#region Countdown Logic
Expand Down Expand Up @@ -154,6 +166,23 @@ protected override bool GeneralGCD(out IAction? act)

if ((!HiganbanaTargets || (HiganbanaTargets && NumberOfAllHostilesInRange < 2)) && (HostileTarget?.WillStatusEnd(18, true, StatusID.Higanbana) ?? false) && HiganbanaPvE.CanUse(out act, skipStatusProvideCheck: true)) return true;

if (NumberOfHostilesInRange >= 3)
{
switch (STtoAOE)
{
case STtoAOEStrategy.Hagakure:
default:
if (MidareSetsugekkaPvE.CanUse(out _) && HagakurePvE.CanUse(out act)) return true;
break;

case STtoAOEStrategy.MidareSetsugekka:
if (MidareSetsugekkaPvE.CanUse(out act)) return true;
break;
}
}

if (!HagakurePvE.EnoughLevel && NumberOfHostilesInRange >= 3 && MidareSetsugekkaPvE.CanUse(out act)) return true;

if (TendoKaeshiGokenPvE.CanUse(out act)) return true;
if (TendoGokenPvE.CanUse(out act)) return true;
if (KaeshiGokenPvE.CanUse(out act)) return true;
Expand Down

0 comments on commit dc6241e

Please sign in to comment.