Skip to content

Commit

Permalink
Merge pull request #499 from FFXIV-CombatReborn/ShadowWalker
Browse files Browse the repository at this point in the history
Soft refactor of SAM to align with rewrite
  • Loading branch information
LTS-FFXIV authored Dec 31, 2024
2 parents 720b962 + 42e43e6 commit 706ffaf
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions BasicRotations/Melee/SAM_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public sealed class SAM_Default : SamuraiRotation
public bool ZanshinPrio { get; set; } = true;

[RotationConfig(CombatType.PvE, Name = "Prevent Higanbana use if theres more than one target")]
public bool HiganbanaTargets { get; set; } = false;
public bool HiganbanaTargets { get; set; } = true;

[RotationConfig(CombatType.PvE, Name = "Enable TEA Checker.")]
public bool EnableTEAChecker { get; set; } = false;
Expand Down Expand Up @@ -85,12 +85,12 @@ protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)
return false;
}

var IsTargetBoss = HostileTarget?.IsBossFromTTK() ?? false;
var IsTargetDying = HostileTarget?.IsDying() ?? false;
var isTargetBoss = HostileTarget?.IsBossFromTTK() ?? false;
var isTargetDying = HostileTarget?.IsDying() ?? false;

// from old version - didn't touch this, didn't test this, personally i doubt it's working !!! check later !!!
if (HasHostilesInRange && IsLastGCD(true, YukikazePvE, MangetsuPvE, OkaPvE) &&
(!IsTargetBoss || (HostileTarget?.HasStatus(true, StatusID.Higanbana) ?? false) && !(HostileTarget?.WillStatusEnd(40, true, StatusID.Higanbana) ?? false) || !HasMoon && !HasFlower || IsTargetBoss && IsTargetDying))
(!isTargetBoss || (HostileTarget?.HasStatus(true, StatusID.Higanbana) ?? false) && !(HostileTarget?.WillStatusEnd(40, true, StatusID.Higanbana) ?? false) || !HasMoon && !HasFlower || isTargetBoss && isTargetDying))
{
if (MeikyoShisuiPvE.CanUse(out act, usedUp: true)) return true;
}
Expand All @@ -105,8 +105,8 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
return false;
}

var IsTargetBoss = HostileTarget?.IsBossFromTTK() ?? false;
var IsTargetDying = HostileTarget?.IsDying() ?? false;
var isTargetBoss = HostileTarget?.IsBossFromTTK() ?? false;
var isTargetDying = HostileTarget?.IsDying() ?? false;

// IkishotenPvE logic combined with the delayed opener:
// you should weave the tincture in manually after rsr lands the first gcd (usually Gekko)
Expand All @@ -124,7 +124,7 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)

if (Kenki >= GurenKenki && ZanshinPvE.CanUse(out act)) return true;

//ensures pooling Kenki for Zanshin if it's available
// ensures pooling Kenki for Zanshin if it's available
bool hasZanshinReady = Player.HasStatus(true, StatusID.ZanshinReady_3855) && ZanshinPrio;

if (!hasZanshinReady && Kenki >= GurenKenki && HissatsuGurenPvE.CanUse(out act, skipAoeCheck: !HissatsuSeneiPvE.EnoughLevel)) return true;
Expand All @@ -139,7 +139,7 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)

#region GCD Logic

StatusID[] SamBuffs = [StatusID.Fugetsu, StatusID.Fuka];
StatusID[] SamBuffs = { StatusID.Fugetsu, StatusID.Fuka };

protected override bool GeneralGCD(out IAction? act)
{
Expand All @@ -151,7 +151,6 @@ 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 (MidareSetsugekkaPvE.CanUse(out act)) return true;

if (TenkaGokenPvE.CanUse(out act)) return true;
Expand All @@ -162,8 +161,8 @@ protected override bool GeneralGCD(out IAction? act)
// use 2nd finisher combo spell first
if (KaeshiNamikiriPvE.CanUse(out act, usedUp: true)) return true;

var IsTargetBoss = HostileTarget?.IsBossFromTTK() ?? false;
var IsTargetDying = HostileTarget?.IsDying() ?? false;
var isTargetBoss = HostileTarget?.IsBossFromTTK() ?? false;
var isTargetDying = HostileTarget?.IsDying() ?? false;

// use 2nd finisher combo spell first
if (KaeshiGokenPvE.CanUse(out act, usedUp: true)) return true;
Expand All @@ -172,7 +171,7 @@ protected override bool GeneralGCD(out IAction? act)
if (TendoKaeshiSetsugekkaPvE.CanUse(out act, usedUp: true)) return true;

// burst finisher
if ((!IsTargetBoss || (HostileTarget?.HasStatus(true, StatusID.Higanbana) ?? false)) && HasMoon && HasFlower
if ((!isTargetBoss || (HostileTarget?.HasStatus(true, StatusID.Higanbana) ?? false)) && HasMoon && HasFlower
&& OgiNamikiriPvE.CanUse(out act)) return true;

if (TendoSetsugekkaPvE.CanUse(out act)) return true;
Expand All @@ -182,7 +181,7 @@ protected override bool GeneralGCD(out IAction? act)
if ((!HasMoon || IsMoonTimeLessThanFlower || !OkaPvE.EnoughLevel) && MangetsuPvE.CanUse(out act, skipComboCheck: HaveMeikyoShisui && !HasGetsu)) return true;
if ((!HasFlower || !IsMoonTimeLessThanFlower) && OkaPvE.CanUse(out act, skipComboCheck: HaveMeikyoShisui && !HasKa)) return true;

if (!HasSetsu && SamBuffs.All(SamBuffs => Player.HasStatus(true, SamBuffs)) &&
if (!HasSetsu && SamBuffs.All(buff => Player.HasStatus(true, buff)) &&
YukikazePvE.CanUse(out act, skipComboCheck: HaveMeikyoShisui && HasGetsu && HasKa)) return true;

// single target 123 combo's 3 or used 3 directly during burst when MeikyoShisui is active, while also trying to start with the one that player is in position for extra DMG
Expand Down Expand Up @@ -217,4 +216,4 @@ protected override bool GeneralGCD(out IAction? act)
}

#endregion
}
}

0 comments on commit 706ffaf

Please sign in to comment.