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

Commit

Permalink
Update SAM_Default.cs
Browse files Browse the repository at this point in the history
sam working blue log
  • Loading branch information
MillerTheBest committed Jul 14, 2024
1 parent de8ecbe commit ef289d7
Showing 1 changed file with 54 additions and 19 deletions.
73 changes: 54 additions & 19 deletions BasicRotations/Melee/SAM_Default.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
namespace DefaultRotations.Melee;
using System.Diagnostics;
using static FFXIVClientStructs.FFXIV.Client.UI.Info.InfoProxyCommonList;
using static FFXIVClientStructs.FFXIV.Client.UI.Misc.CharaViewPortrait.Delegates;

namespace DefaultRotations.Melee;

[Rotation("Default", CombatType.PvE, GameVersion = "7.00")]
[SourceCode(Path = "main/DefaultRotations/Melee/SAM_Default.cs")]
Expand Down Expand Up @@ -31,7 +35,12 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
var IsTargetBoss = HostileTarget?.IsBossFromTTK() ?? false;
var IsTargetDying = HostileTarget?.IsDying() ?? false;

if (Kenki <= 50 && IkishotenPvE.CanUse(out act)) return true;
if (Kenki >= 50 && HasMoon && HasFlower && HaveZanshinReady)
{
if (ZanshinPvE.CanUse(out act, skipAoeCheck: true)) return true;
}

if (Kenki <= 50 && !CombatElapsedLessGCD(2) && IkishotenPvE.CanUse(out act)) return true;

if ((HostileTarget?.HasStatus(true, StatusID.Higanbana) ?? false) &&
(HostileTarget?.WillStatusEnd(32, true, StatusID.Higanbana) ?? false) &&
Expand All @@ -47,13 +56,16 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
if (HissatsuSeneiPvE.CanUse(out act)) return true;
}

if (ShohaPvE.CanUse(out act, skipAoeCheck: true)) return true; // Ignores how many targets under actions
if (ShohaPvE.CanUse(out act, skipAoeCheck: true)) return true;

if (Kenki >= 50 && IkishotenPvE.Cooldown.WillHaveOneCharge(10) || Kenki >= AddKenki || IsTargetBoss && IsTargetDying)
if (!HaveZanshinReady && (Kenki >= 50 && IkishotenPvE.Cooldown.WillHaveOneCharge(10) || Kenki >= AddKenki || IsTargetBoss && IsTargetDying))
{
if (ZanshinPvE.CanUse(out act, skipAoeCheck: true)) return true; // Ignores how many targets under actions
if (HissatsuKyutenPvE.CanUse(out act)) return true;
if (HissatsuShintenPvE.CanUse(out act)) return true;
if (HissatsuShintenPvE.CanUse(out act))
{
//Debug.WriteLine("Send to debug outputa.");
return true;
}
}

return base.AttackAbility(nextGCD, out act);
Expand Down Expand Up @@ -82,47 +94,68 @@ protected override bool GeneralGCD(out IAction? act)
var IsTargetBoss = HostileTarget?.IsBossFromTTK() ?? false;
var IsTargetDying = HostileTarget?.IsDying() ?? false;

//if (TendoKaeshiGokenPvE.CanUse(out act, skipAoeCheck: true, usedUp: true)) return true;
//if (TendoKaeshiSetsugekkaPvE.CanUse(out act, skipAoeCheck: true, usedUp: true)) return true;

if (IsLastGCD(true, TendoSetsugekkaPvE) && TendoKaeshiSetsugekkaPvE.CanUse(out act)) return true;

if (KaeshiGokenPvE.CanUse(out act, skipAoeCheck: true, usedUp: true)) return true;
if (KaeshiSetsugekkaPvE.CanUse(out act, skipAoeCheck: true, usedUp: true)) return true;
if (TendoKaeshiGokenPvE.CanUse(out act, skipAoeCheck: true, usedUp: true)) return true;
if (TendoKaeshiSetsugekkaPvE.CanUse(out act, skipAoeCheck: true, usedUp: true)) return true;

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

if (SenCount == 1 && IsTargetBoss && !IsTargetDying)
// 1/2/3 sen finishers
if (SenCount == 1 && IsTargetBoss && !IsTargetDying) // 1 sen + has two buffs + not aoe = put dot on boss (not dying)
{
if (HasMoon && HasFlower && !FugaPvE.CanUse(out _) && HiganbanaPvE.CanUse(out act)) return true;
}
if (SenCount == 2)
if (SenCount == 2) // 2 sen aoe combo finisher
{
if (TendoGokenPvE.CanUse(out act)) return true;
// !!! to be updated to TendoGokenPvE
if (TenkaGokenPvE.CanUse(out act, skipAoeCheck: !MidareSetsugekkaPvE.EnoughLevel)) return true;
}
if (SenCount == 3)
if (SenCount == 3) // 3 sen single target combo finisher
{
if (TendoSetsugekkaPvE.CanUse(out act)) return true;
if (MidareSetsugekkaPvE.CanUse(out act)) return true;
// if 7.0 spell buff is not up, use normal finisher
if (!HaveTsubamegaeshiReady && MidareSetsugekkaPvE.CanUse(out act, skipComboCheck: !HaveTsubamegaeshiReady)) return true;
// if 7.0 spell buff is up, use the upgraded finisher
if (HaveTsubamegaeshiReady && TendoSetsugekkaPvE.CanUse(out act, skipComboCheck: HaveTsubamegaeshiReady)) return true;

// use TendoSetsugekka when the level is met, or use MidareSetsugekka - not tested
if (!TendoSetsugekkaPvE.EnoughLevel && MidareSetsugekkaPvE.CanUse(out act)) return true;
}

// aoe 12 combo's 2
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 && YukikazePvE.CanUse(out act, skipComboCheck: HaveMeikyoShisui && HasGetsu && HasKa)) return true;
// !!! not working
if (!HasSetsu && YukikazePvE.CanUse(out act, skipComboCheck: HaveMeikyoShisui && HasGetsu && HasKa || IsLastGCD(true, HakazePvE))) return true;

// single target 123 combo's 3 or used 3 directly during burst when MeikyoShisui is active
if (GekkoPvE.CanUse(out act, skipComboCheck: HaveMeikyoShisui && !HasGetsu)) return true;
if (KashaPvE.CanUse(out act, skipComboCheck: HaveMeikyoShisui && !HasKa)) return true;

if ((!HasMoon || IsMoonTimeLessThanFlower || !ShifuPvE.EnoughLevel) && JinpuPvE.CanUse(out act)) return true;
if ((!HasFlower || !IsMoonTimeLessThanFlower) && ShifuPvE.CanUse(out act)) return true;
// single target 123 combo's 2
if ((!HasMoon || IsMoonTimeLessThanFlower || !ShifuPvE.EnoughLevel) && JinpuPvE.CanUse(out act, skipComboCheck: IsLastGCD(true, HakazePvE))) return true;
if ((!HasFlower || !IsMoonTimeLessThanFlower) && ShifuPvE.CanUse(out act, skipComboCheck: IsLastGCD(true, HakazePvE))) return true;

// initiate aoe
if (FukoPvE.CanUse(out act, skipComboCheck: true)) return true;
if (!FukoPvE.EnoughLevel && FugaPvE.CanUse(out act, skipComboCheck: true)) return true;

// MeikyoShisui buff is not active - not bursting - single target 123 combo's 1
if (!HaveMeikyoShisui)
{
if (GyofuPvE.CanUse(out act)) return true;
// target in range
if (HakazePvE.CanUse(out act)) return true;

//if (GyofuPvE.CanUse(out act)) return true;
//if (!GyofuPvE.EnoughLevel && HakazePvE.CanUse(out act)) return true;

// target out of range
if (EnpiPvE.CanUse(out act)) return true;
}

Expand All @@ -133,6 +166,8 @@ protected override bool GeneralGCD(out IAction? act)

#region Extra Methods
private static bool HaveMeikyoShisui => Player.HasStatus(true, StatusID.MeikyoShisui);
private static bool HaveTsubamegaeshiReady => Player.HasStatus(true, StatusID.TsubamegaeshiReady);
private static bool HaveZanshinReady => Player.HasStatus(true, StatusID.ZanshinReady);

#endregion
}
}

0 comments on commit ef289d7

Please sign in to comment.