Skip to content

Commit

Permalink
Update SAM and BRD abilities, remove AddKenki config
Browse files Browse the repository at this point in the history
Updated BRD logic to prevent back to back song usage during downtime.
Changed status ID in `ModifyZanshinPvE` method in `SamuraiRotation.cs` to `StatusID.ZanshinReady_3855`.
Updated SAM logic to prevent Kenki usage when Zanshin is ready to allow for pooling and usage.
  • Loading branch information
LTS-FFXIV committed Dec 15, 2024
1 parent 3679c67 commit 68a979e
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 49 deletions.
59 changes: 29 additions & 30 deletions BasicRotations/Melee/SAM_Default.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
namespace DefaultRotations.Melee;

[Rotation("Default", CombatType.PvE, GameVersion = "7.05")]
[Rotation("Default", CombatType.PvE, GameVersion = "7.11")]
[SourceCode(Path = "main/BasicRotations/Melee/SAM_Default.cs")]
[Api(4)]
public sealed class SAM_Default : SamuraiRotation
{
#region Config Options

[Range(0, 85, ConfigUnitType.None, 5)]
[RotationConfig(CombatType.PvE, Name = "Use Kenki above.")]
public int AddKenki { get; set; } = 50;

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

Expand Down Expand Up @@ -58,6 +54,26 @@ protected override bool DefenseSingleAbility(IAction nextGCD, out IAction? act)

#region oGCD Logic

protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)
{
act = null;
if (EnableTEAChecker && Target.Name.ToString() == "Jagd Doll" && Target.GetHealthRatio() < 0.25)
{
return 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))
{
if (MeikyoShisuiPvE.CanUse(out act, usedUp: true)) return true;
}
return base.EmergencyAbility(nextGCD, out act);
}

protected override bool AttackAbility(IAction nextGCD, out IAction? act)
{
act = null;
Expand All @@ -83,34 +99,17 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
if (HagakurePvE.CanUse(out act)) return true;
}

if (ZanshinPvE.CanUse(out act)) return true; // need to check rsr code for upgrade and remove aoecheck here !!! check later !!!
if (HissatsuGurenPvE.CanUse(out act, skipAoeCheck: !HissatsuSeneiPvE.EnoughLevel)) return true;
if (HissatsuSeneiPvE.CanUse(out act)) return true;
if (ZanshinPvE.CanUse(out act)) return true;

if (HissatsuKyutenPvE.CanUse(out act)) return true;
if (HissatsuShintenPvE.CanUse(out act)) return true;
//ensures pooling Kenki for Zanshin if it's available
bool hasZanshinReady = Player.HasStatus(true, StatusID.ZanshinReady_3855);

return base.AttackAbility(nextGCD, out act);
}
if (!hasZanshinReady && HissatsuGurenPvE.CanUse(out act, skipAoeCheck: !HissatsuSeneiPvE.EnoughLevel)) return true;
if (!hasZanshinReady && HissatsuSeneiPvE.CanUse(out act)) return true;
if (!hasZanshinReady && HissatsuKyutenPvE.CanUse(out act)) return true;
if (!hasZanshinReady && HissatsuShintenPvE.CanUse(out act)) return true;

protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)
{
act = null;
if (EnableTEAChecker && Target.Name.ToString() == "Jagd Doll" && Target.GetHealthRatio() < 0.25)
{
return 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))
{
if (MeikyoShisuiPvE.CanUse(out act, usedUp: true)) return true;
}
return base.EmergencyAbility(nextGCD, out act);
return base.AttackAbility(nextGCD, out act);
}

#endregion
Expand Down
36 changes: 18 additions & 18 deletions BasicRotations/Ranged/BRD_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,24 @@ protected override bool DefenseAreaAbility(IAction nextGCD, out IAction act)

protected override bool GeneralAbility(IAction nextGCD, out IAction? act)
{
if (TheWanderersMinuetPvE.CanUse(out act) && InCombat && !IsLastAbility(ActionID.ArmysPaeonPvE) && !IsLastAbility(ActionID.MagesBalladPvE))
{
if (SongEndAfter(ARMYRemainTime) && (Song != Song.NONE || Player.HasStatus(true, StatusID.ArmysEthos))) return true;
}

if (MagesBalladPvE.CanUse(out act) && InCombat && !IsLastAbility(ActionID.ArmysPaeonPvE) && !IsLastAbility(ActionID.TheWanderersMinuetPvE))
{
if (Song == Song.WANDERER && SongEndAfter(WANDRemainTime) && (Repertoire == 0 || !HasHostilesInMaxRange)) return true;
if (Song == Song.ARMY && SongEndAfterGCD(2) && TheWanderersMinuetPvE.Cooldown.IsCoolingDown) return true;
}

if (ArmysPaeonPvE.CanUse(out act) && InCombat && !IsLastAbility(ActionID.MagesBalladPvE) && !IsLastAbility(ActionID.TheWanderersMinuetPvE))
{
if (TheWanderersMinuetPvE.EnoughLevel && SongEndAfter(MAGERemainTime) && Song == Song.MAGE) return true;
if (TheWanderersMinuetPvE.EnoughLevel && SongEndAfter(2) && MagesBalladPvE.Cooldown.IsCoolingDown && Song == Song.WANDERER) return true;
if (!TheWanderersMinuetPvE.EnoughLevel && SongEndAfter(2)) return true;
}

if (Song == Song.NONE && InCombat)
{
switch (FirstSong)
Expand All @@ -112,24 +130,6 @@ protected override bool GeneralAbility(IAction nextGCD, out IAction? act)
if (ArmysPaeonPvE.CanUse(out act)) return true;
}

if (TheWanderersMinuetPvE.CanUse(out act) && InCombat)
{
if (SongEndAfter(ARMYRemainTime) && (Song != Song.NONE || Player.HasStatus(true, StatusID.ArmysEthos))) return true;
}

if (MagesBalladPvE.CanUse(out act) && InCombat)
{
if (Song == Song.WANDERER && SongEndAfter(WANDRemainTime) && (Repertoire == 0 || !HasHostilesInMaxRange)) return true;
if (Song == Song.ARMY && SongEndAfterGCD(2) && TheWanderersMinuetPvE.Cooldown.IsCoolingDown) return true;
}

if (ArmysPaeonPvE.CanUse(out act) && InCombat)
{
if (TheWanderersMinuetPvE.EnoughLevel && SongEndAfter(MAGERemainTime) && Song == Song.MAGE) return true;
if (TheWanderersMinuetPvE.EnoughLevel && SongEndAfter(2) && MagesBalladPvE.Cooldown.IsCoolingDown && Song == Song.WANDERER) return true;
if (!TheWanderersMinuetPvE.EnoughLevel && SongEndAfter(2)) return true;
}

return base.GeneralAbility(nextGCD, out act);
}

Expand Down
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Rotations/Basic/SamuraiRotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ static partial void ModifyGyofuPvE(ref ActionSetting setting)

static partial void ModifyZanshinPvE(ref ActionSetting setting)
{
setting.StatusNeed = [StatusID.ZanshinReady];
setting.StatusNeed = [StatusID.ZanshinReady_3855];
setting.ActionCheck = () => Kenki >= 50;
setting.CreateConfig = () => new ActionConfig()
{
Expand Down

0 comments on commit 68a979e

Please sign in to comment.