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

Commit

Permalink
Merge pull request #28 from FFXIV-CombatReborn/DT-NIN-Basic-Support
Browse files Browse the repository at this point in the history
DT NIN Basic Support
  • Loading branch information
Tykku authored Jul 4, 2024
2 parents 0b478e1 + 15b6063 commit f67de47
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 28 deletions.
50 changes: 23 additions & 27 deletions BasicRotations/Melee/NIN_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace DefaultRotations.Melee;

[Rotation("Default", CombatType.PvE, GameVersion = "7.00")]
[SourceCode(Path = "main/DefaultRotations/Melee/NIN_Default.cs")]
[Api(1)]
[Api(2)]
public sealed class NIN_Default : NinjaRotation
{
#region Config Options
Expand All @@ -11,6 +11,8 @@ public sealed class NIN_Default : NinjaRotation
public bool UseHide { get; set; } = true;
[RotationConfig(CombatType.PvE, Name = "Use Unhide")]
public bool AutoUnhide { get; set; } = true;

public bool IsShadowWalking = (Player.HasStatus(true, StatusID.ShadowWalker));
#endregion

#region CountDown Logic
Expand All @@ -20,7 +22,7 @@ public sealed class NIN_Default : NinjaRotation

// Clears ninjutsu setup if countdown is more than 10 seconds or if Huton is the aim but shouldn't be.
if (remainTime > 10) ClearNinjutsu();
var realInHuton = !HutonEndAfterGCD() || IsLastAction(false, HutonPvE);
var realInHuton = IsLastAction(false, HutonPvE);
if (realInHuton && _ninActionAim == HutonPvE) ClearNinjutsu();

// Decision-making for ninjutsu actions based on remaining time until combat starts.
Expand Down Expand Up @@ -101,6 +103,12 @@ private bool ChoiceNinjutsu(out IAction? act)
return false;
}

/*if (HutonPvE.CanUse(out _))
{
SetNinjutsu(HutonPvE);
return false;
}*/

if (KatonPvE.CanUse(out _))
{
SetNinjutsu(KatonPvE);
Expand All @@ -127,19 +135,6 @@ private bool ChoiceNinjutsu(out IAction? act)
// For instance, setting Huton for speed buff or choosing AoE Ninjutsu like Katon or Doton based on enemy positioning.
// Also considers using Suiton for vulnerability debuff on the enemy if conditions are optimal.

if (!HutonEndAfterGCD() && _ninActionAim?.ID == HutonPvE.ID)
{
ClearNinjutsu();
return false;
}
if (TenPvE.CanUse(out _, usedUp: true)
&& (!InCombat) && HutonPvE.CanUse(out _)
&& !IsLastAction(false, HutonPvE))
{
SetNinjutsu(HutonPvE);
return false;
}

//Aoe
if (KatonPvE.CanUse(out _))
{
Expand Down Expand Up @@ -299,9 +294,6 @@ private bool DoNinjutsu(out IAction? act)
[RotationDesc(ActionID.ForkedRaijuPvE)]
protected override bool MoveForwardGCD(out IAction? act)
{
// Initializes the action to null, indicating no action has been chosen yet.
act = null;

// Checks if Forked Raiju, a movement-friendly ability, can be used.
// If so, sets it as the action to perform, returning true to indicate an action has been selected.
if (ForkedRaijuPvE.CanUse(out act)) return true;
Expand All @@ -328,14 +320,17 @@ protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)
// Next, checks if a burst medicine is available and appropriate to use.
if (UseBurstMedicine(out act)) return true;

if (TenriJindoPvE.CanUse(out act)) return true;

// If in a burst phase and not just starting combat, checks if Mug is available to generate additional Ninki.
if (IsBurst && !CombatElapsedLess(5) && MugPvE.CanUse(out act)) return true;

// Prioritizes using Suiton and Trick Attack for maximizing damage, especially outside the initial combat phase.
if (!CombatElapsedLess(6))
{
// Attempts to use Trick Attack if it's available.
if (TrickAttackPvE.CanUse(out act)) return true;
if (KunaisBanePvE.CanUse(out act, skipAoeCheck: true, skipStatusProvideCheck: IsShadowWalking)) return true;
if (!KunaisBanePvE.EnoughLevel && TrickAttackPvE.CanUse(out act, skipStatusProvideCheck: IsShadowWalking)) return true;

// If Trick Attack is on cooldown but will not be ready soon, considers using Meisui to recover Ninki.
if (TrickAttackPvE.Cooldown.IsCoolingDown && !TrickAttackPvE.Cooldown.WillHaveOneCharge(19) && MeisuiPvE.CanUse(out act)) return true;
Expand Down Expand Up @@ -416,14 +411,16 @@ protected override bool GeneralGCD(out IAction? act)
if (DeathBlossomPvE.CanUse(out act)) return true;

//Single
if (ArmorCrushPvE.CanUse(out act)) return true;
if (!InTrickAttack && Kazematoi < 5 && ArmorCrushPvE.CanUse(out act)) return true;
if (AeolianEdgePvE.CanUse(out act)) return true;
if (GustSlashPvE.CanUse(out act)) return true;
if (SpinningEdgePvE.CanUse(out act)) return true;

//Range

if (ThrowingDaggerPvE.CanUse(out act)) return true;
if (!Player.HasStatus(true, StatusID.Mudra))
{
if (ThrowingDaggerPvE.CanUse(out act)) return true;
}

if (AutoUnhide)
{
Expand Down Expand Up @@ -452,11 +449,10 @@ protected override bool GeneralGCD(out IAction? act)
// Displays the current status of the rotation, including the aimed ninjutsu action, if any.
public override void DisplayStatus()
{
if (_ninActionAim != null)
{
ImGui.Text(_ninActionAim.ToString() + _ninActionAim.AdjustedID.ToString());
}

ImGui.Text(Ninki.ToString());

base.DisplayStatus();
}
#endregion
}
}
2 changes: 1 addition & 1 deletion BasicRotations/RebornRotations.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<None Remove="Duty\PVPRotations\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="RotationSolverReborn.Basic" Version="7.0.0.13" />
<PackageReference Include="RotationSolverReborn.Basic" Version="7.0.0.15" />
</ItemGroup>
<ItemGroup>
<Reference Include="Dalamud">
Expand Down

0 comments on commit f67de47

Please sign in to comment.