Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve performance and readability; add new features #521

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 23 additions & 8 deletions BasicRotations/Melee/MNK_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public enum RiddleOfFireFirst : byte
public bool AutoPB_AOE { get; set; } = true;

[RotationConfig(CombatType.PvE, Name = "Use Howling Fist/Enlightenment as a ranged attack verses single target enemies")]
public bool HowlingSingle { get; set; } = true;
public bool HowlingSingle { get; set; } = false;

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

if (InBrotherhood)
{
// 'If you are in brotherhood, and you have 10 chakra, and forbidden chakra is available, use it.'
if (Chakra == 10 && TheForbiddenChakraPvE.CanUse(out act)) return true;
// 'If you are in brotherhood, and forbidden chakra is available, use it regardless of stacks.'
if (Player.WillStatusEndGCD(1, 0, true, StatusID.Brotherhood) && TheForbiddenChakraPvE.CanUse(out act)) return true;
}
if (!InBrotherhood)
{
// 'If you are not in brotherhood, have 5 chakra, and brotherhood is about to be available, hold.'
if (Chakra == 5 && BrotherhoodPvE.Cooldown.WillHaveOneChargeGCD(1) && TheForbiddenChakraPvE.CanUse(out act)) return false;
// 'If you are not in brotherhood, have 5 chakra, and brotherhood is in cooldown, use it.'
if (Chakra == 5 && BrotherhoodPvE.Cooldown.IsCoolingDown && TheForbiddenChakraPvE.CanUse(out act)) return true;
}
if (!TheForbiddenChakraPvE.EnoughLevel)
{
// 'If you are not high enough level for TheForbiddenChakra, use immediately at 5 chakra.'
if (Chakra == 5 && SteelPeakPvE.CanUse(out act)) return true;
}

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

Expand Down Expand Up @@ -165,11 +185,6 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
if (PerfectBalancePvE.CanUse(out act, usedUp: true)) return true;
}

if (EnlightenmentPvE.CanUse(out act)) return true; // Enlightment
if (HowlingFistPvE.CanUse(out act)) return true; // Howling Fist
if (TheForbiddenChakraPvE.CanUse(out act)) return true;
if (SteelPeakPvE.CanUse(out act)) return true;

// use bh when bh and rof are ready (opener) or ask bh to wait for rof's cd to be close and then use bh
if (!CombatElapsedLessGCD(2)
&& ((BrotherhoodPvE.IsInCooldown && RiddleOfFirePvE.IsInCooldown) || Math.Abs(BrotherhoodPvE.Cooldown.CoolDownGroup - RiddleOfFirePvE.Cooldown.CoolDownGroup) < 3)
Expand All @@ -180,8 +195,8 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
// 'Use on cooldown, unless you know your killtime. You should aim to get as many casts of RoW as you can, and then shift those usages to align with burst as much as possible without losing a use.'
if (!CombatElapsedLessGCD(3) && RiddleOfWindPvE.CanUse(out act)) return true; // Riddle Of Wind

if (HowlingSingle && EnlightenmentPvE.CanUse(out act, skipAoeCheck: true)) return true; // Enlightment
if (HowlingSingle && HowlingFistPvE.CanUse(out act, skipAoeCheck: true)) return true; // Howling Fist
if (EnlightenmentPvE.CanUse(out act, skipAoeCheck: HowlingSingle)) return true; // Enlightment
if (HowlingFistPvE.CanUse(out act, skipAoeCheck: HowlingSingle)) return true; // Howling Fist

return base.AttackAbility(nextGCD, out act);
}
Expand Down
8 changes: 6 additions & 2 deletions RotationSolver.Basic/Configuration/Configs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,12 @@ public const string
[ConditionBool, UI("Disable hostile actions if something is casting an action on the Gaze/Stop list (EXPEREMENTAL)", Filter = AutoActionUsage, Section = 4)]
private static readonly bool _castingStop = false;

[ConditionBool, UI("Disable for the entire duration (Disabling this may lead to Gaze failure)", Filter = AutoActionUsage, Section = 4, Parent = nameof(CastingStop))]
private static readonly bool _castingStopCalculate = true;
[UI("Configurable amount of time before the cast finishes that RSR stops taking actions", Filter = AutoActionUsage, Section = 4, Parent = nameof(CastingStop))]
[Range(0, 15, ConfigUnitType.Seconds)]
public float CastingStopTime { get; set; } = 2.5f;

[ConditionBool, UI("Disable for the entire duration (Enabling this will prevent your actions for the entire cast.)", Filter = AutoActionUsage, Section = 4, Parent = nameof(CastingStop))]
private static readonly bool _castingStopCalculate = false;

[ConditionBool, UI("Automatic Healing Thresholds", Filter = HealingActionCondition, Section = 1, Order = 1)]
private static readonly bool _autoHeal = true;
Expand Down
Loading