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

Update BLM and SAM classes with new options and logic #515

Merged
merged 1 commit into from
Jan 2, 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
18 changes: 13 additions & 5 deletions BasicRotations/Magical/BLM_Default.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace DefaultRotations.Magical;

[Rotation("Default", CombatType.PvE, GameVersion = "7.01")]
[Rotation("Default", CombatType.PvE, GameVersion = "7.15")]
[SourceCode(Path = "main/BasicRotations/Magical/BLM_Default.cs")]
[Api(4)]
public class BLM_Default : BlackMageRotation
Expand All @@ -9,14 +9,20 @@ public class BLM_Default : BlackMageRotation
[RotationConfig(CombatType.PvE, Name = "Use Transpose to Astral Fire before Paradox")]
public bool UseTransposeForParadox { get; set; } = true;

[RotationConfig(CombatType.PvE, Name = "Use Retrace when out of Leylines and standing still (Dangerous and Experimental)")]
public bool UseRetrace { get; set; } = false;

[RotationConfig(CombatType.PvE, Name = "Extend Astral Fire time more conservatively (3 GCDs) (Default is 2 GCDs)")]
public bool ExtendTimeSafely { get; set; } = false;

[RotationConfig(CombatType.PvE, Name = @"Use ""Double Paradox"" rotation [N15]")]
public bool UseN15 { get; set; } = false;

[RotationConfig(CombatType.PvE, Name = "Use Leylines in combat when standing still")]
public bool LeylineMadness { get; set; } = false;

[RotationConfig(CombatType.PvE, Name = "Use both stacks of Leylines automatically")]
public bool Leyline2Madness { get; set; } = false;

[RotationConfig(CombatType.PvE, Name = "Use Retrace when out of Leylines in combat and standing still")]
public bool UseRetrace { get; set; } = false;
#endregion

#region Additional oGCD Logic
Expand Down Expand Up @@ -90,10 +96,12 @@ protected sealed override bool DefenseAreaAbility(IAction nextGCD, out IAction?
#endregion

#region oGCD Logic
[RotationDesc(ActionID.ManafontPvE, ActionID.TransposePvE)]
[RotationDesc(ActionID.TransposePvE, ActionID.LeyLinesPvE, ActionID.RetracePvE)]
protected override bool GeneralAbility(IAction nextGCD, out IAction? act)
{
if (IsMoving && HasHostilesInRange && TriplecastPvE.CanUse(out act, usedUp: true)) return true;
if (LeylineMadness && InCombat && HasHostilesInRange && LeyLinesPvE.CanUse(out act, usedUp: Leyline2Madness)) return true;
if (!IsLastAbility(ActionID.LeyLinesPvE) && UseRetrace && InCombat && HasHostilesInRange && RetracePvE.CanUse(out act)) return true;

return base.GeneralAbility(nextGCD, out act);
}
Expand Down
19 changes: 7 additions & 12 deletions BasicRotations/Melee/SAM_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public enum STtoAOEStrategy : byte
{
[Description("Hagakure")] Hagakure,

[Description("Midare Setsugekka")] MidareSetsugekka,
[Description("Setsugekka")] Setsugekka,
}

[Range(0, 100, ConfigUnitType.None, 1)]
Expand Down Expand Up @@ -45,7 +45,7 @@ public enum STtoAOEStrategy : byte
[RotationConfig(CombatType.PvE, Name = "Enable TEA Checker.")]
public bool EnableTEAChecker { get; set; } = false;

[RotationConfig(CombatType.PvE, Name = "Use Hagakure or Midare Setsugekka when going from single target to AOE scenarios")]
[RotationConfig(CombatType.PvE, Name = "Use Hagakure or Midare/Tendo Setsugekka when going from single target to AOE scenarios")]
public STtoAOEStrategy STtoAOE { get; set; } = STtoAOEStrategy.Hagakure;
#endregion

Expand Down Expand Up @@ -175,7 +175,8 @@ protected override bool GeneralGCD(out IAction? act)
if (MidareSetsugekkaPvE.CanUse(out _) && HagakurePvE.CanUse(out act)) return true;
break;

case STtoAOEStrategy.MidareSetsugekka:
case STtoAOEStrategy.Setsugekka:
if (TendoSetsugekkaPvE.CanUse(out act)) return true;
if (MidareSetsugekkaPvE.CanUse(out act)) return true;
break;
}
Expand All @@ -196,24 +197,18 @@ protected override bool GeneralGCD(out IAction? act)
if (FukoPvE.CanUse(out act, skipComboCheck: true)) return true;
if (!FukoPvE.EnoughLevel && FugaPvE.CanUse(out act, skipComboCheck: true)) return true;

if (TendoSetsugekkaPvE.CanUse(out act)) return true;
if (MidareSetsugekkaPvE.CanUse(out act)) return true;

if (TendoSetsugekkaPvE.CanUse(out act)) return true;
if (TendoKaeshiSetsugekkaPvE.CanUse(out act)) return true;
// use 2nd finisher combo spell first
if (KaeshiNamikiriPvE.CanUse(out act, usedUp: true)) return true;

// use 2nd finisher combo spell first
if (KaeshiSetsugekkaPvE.CanUse(out act, usedUp: true)) return true;
if (TendoKaeshiSetsugekkaPvE.CanUse(out act, usedUp: true)) return true;
if (!KaeshiNamikiriReady && KaeshiSetsugekkaPvE.CanUse(out act, usedUp: true)) return true;
if (!KaeshiNamikiriReady && TendoKaeshiSetsugekkaPvE.CanUse(out act, usedUp: true)) return true;

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

if (TendoSetsugekkaPvE.CanUse(out act)) return true;
if (MidareSetsugekkaPvE.CanUse(out act)) return true;

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

Expand Down
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Configuration/Configs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ public const string
Filter = UiInformation)]
private static readonly bool _showToastsAboutDoAction = false;

[ConditionBool, UI("Automatically trigger dps burst phase.", Description = "If this is disabled, you will not use abilties that consume resources/gauge.", Filter = AutoActionUsage, Section = 4)]
[ConditionBool, UI("Allow rotations that use this config to use abilties definied in the rotation as burst", Filter = AutoActionUsage, Section = 4)]
private static readonly bool _autoBurst = true;

[ConditionBool, UI("Automatic Healing Thresholds", Filter = HealingActionCondition, Section = 1, Order = 1)]
Expand Down
2 changes: 2 additions & 0 deletions RotationSolver.Basic/Rotations/Basic/BlackMageRotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ static partial void ModifyLeyLinesPvE(ref ActionSetting setting)
setting.ActionCheck = () => !IsMoving;
setting.StatusProvide = [StatusID.LeyLines];
setting.UnlockedByQuestID = 67215;
setting.IsFriendly = true;
setting.CreateConfig = () => new ActionConfig()
{
TimeToKill = 15,
Expand Down Expand Up @@ -418,6 +419,7 @@ static partial void ModifyRetracePvE(ref ActionSetting setting)
{
setting.ActionCheck = () => !IsMoving && !Player.HasStatus(true, StatusID.CircleOfPower);
setting.StatusNeed = [StatusID.LeyLines];
setting.IsFriendly = true;
setting.CreateConfig = () => new ActionConfig()
{
AoeCount = 1,
Expand Down