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 #201 from FFXIV-CombatReborn/MCHBS
Browse files Browse the repository at this point in the history
MCH barrel stabilizer prioritization option, healer dot options
  • Loading branch information
LTS-FFXIV authored Aug 30, 2024
2 parents c44669e + 8f550fb commit fe68f1e
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 52 deletions.
93 changes: 48 additions & 45 deletions BasicRotations/Healer/AST_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ public sealed class AST_Default : AstrologianRotation
[Range(0, 1, ConfigUnitType.Percent)]
[RotationConfig(CombatType.PvE, Name = "Minimum HP threshold among party member needed to use Horoscope")]
public float HoroscopeHeal { get; set; } = 0.3f;

[RotationConfig(CombatType.PvE, Name = "Use DOT while moving even if it does not need refresh (disabling is a damage down)")]
public bool DOTUpkeep { get; set; } = true;
#endregion

#region Countdown Logic
Expand Down Expand Up @@ -87,51 +90,6 @@ protected override bool DefenseAreaAbility(IAction nextGCD, out IAction? act)
}
#endregion

#region GCD Logic
protected override bool GeneralGCD(out IAction? act)
{
act = null;
if (BubbleProtec && Player.HasStatus(true, StatusID.CollectiveUnconscious_848)) return false;

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

if (CombustPvE.CanUse(out act)) return true;
if (MaleficPvE.CanUse(out act)) return true;
if (CombustPvE.CanUse(out act, skipStatusProvideCheck: true)) return true;

return base.GeneralGCD(out act);
}

[RotationDesc(ActionID.AspectedBeneficPvE, ActionID.BeneficIiPvE, ActionID.BeneficPvE)]
protected override bool HealSingleGCD(out IAction? act)
{
act = null;
if (BubbleProtec && Player.HasStatus(true, StatusID.CollectiveUnconscious_848)) return false;
if (MicroPrio && Player.HasStatus(true, StatusID.Macrocosmos)) return false;

if (AspectedBeneficPvE.CanUse(out act)
&& (IsMoving
|| AspectedBeneficPvE.Target.Target?.GetHealthRatio() > AspectedBeneficHeal)) return true;

if (BeneficIiPvE.CanUse(out act)) return true;
if (BeneficPvE.CanUse(out act)) return true;

return base.HealSingleGCD(out act);
}

[RotationDesc(ActionID.AspectedHeliosPvE, ActionID.HeliosPvE)]
protected override bool HealAreaGCD(out IAction? act)
{
act = null;
if (BubbleProtec && Player.HasStatus(true, StatusID.CollectiveUnconscious_848)) return false;
if (MicroPrio && Player.HasStatus(true, StatusID.Macrocosmos)) return false;

if (AspectedHeliosPvE.CanUse(out act)) return true;
if (HeliosPvE.CanUse(out act)) return true;
return base.HealAreaGCD(out act);
}
#endregion

#region oGCD Logic
protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)
{
Expand Down Expand Up @@ -240,6 +198,51 @@ protected override bool HealAreaAbility(IAction nextGCD, out IAction? act)
}
#endregion

#region GCD Logic
protected override bool GeneralGCD(out IAction? act)
{
act = null;
if (BubbleProtec && Player.HasStatus(true, StatusID.CollectiveUnconscious_848)) return false;

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

if (CombustPvE.CanUse(out act)) return true;
if (MaleficPvE.CanUse(out act)) return true;
if (CombustPvE.CanUse(out act, skipStatusProvideCheck: DOTUpkeep)) return true;

return base.GeneralGCD(out act);
}

[RotationDesc(ActionID.AspectedBeneficPvE, ActionID.BeneficIiPvE, ActionID.BeneficPvE)]
protected override bool HealSingleGCD(out IAction? act)
{
act = null;
if (BubbleProtec && Player.HasStatus(true, StatusID.CollectiveUnconscious_848)) return false;
if (MicroPrio && Player.HasStatus(true, StatusID.Macrocosmos)) return false;

if (AspectedBeneficPvE.CanUse(out act)
&& (IsMoving
|| AspectedBeneficPvE.Target.Target?.GetHealthRatio() > AspectedBeneficHeal)) return true;

if (BeneficIiPvE.CanUse(out act)) return true;
if (BeneficPvE.CanUse(out act)) return true;

return base.HealSingleGCD(out act);
}

[RotationDesc(ActionID.AspectedHeliosPvE, ActionID.HeliosPvE)]
protected override bool HealAreaGCD(out IAction? act)
{
act = null;
if (BubbleProtec && Player.HasStatus(true, StatusID.CollectiveUnconscious_848)) return false;
if (MicroPrio && Player.HasStatus(true, StatusID.Macrocosmos)) return false;

if (AspectedHeliosPvE.CanUse(out act)) return true;
if (HeliosPvE.CanUse(out act)) return true;
return base.HealAreaGCD(out act);
}
#endregion

#region Extra Methods
public override bool CanHealSingleSpell => base.CanHealSingleSpell && (GCDHeal || PartyMembers.GetJobCategory(JobRole.Healer).Count() < 2);
public override bool CanHealAreaSpell => base.CanHealAreaSpell && (GCDHeal || PartyMembers.GetJobCategory(JobRole.Healer).Count() < 2);
Expand Down
9 changes: 6 additions & 3 deletions BasicRotations/Healer/SCH_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ public sealed class SCH_Default : ScholarRotation
[Range(0, 1, ConfigUnitType.Percent)]
[RotationConfig(CombatType.PvE, Name = "Remove Aetherpact to conserve resources if party member is above this percentage")]
public float AetherpactRemove { get; set; } = 0.9f;

[RotationConfig(CombatType.PvE, Name = "Use DOT while moving even if it does not need refresh (disabling is a damage down)")]
public bool DOTUpkeep { get; set; } = true;
#endregion

#region Countdown Logic
Expand Down Expand Up @@ -208,9 +211,9 @@ protected override bool GeneralGCD(out IAction? act)
if (RuinIiPvE.CanUse(out act)) return true;

//Add dot while moving.
if (BiolysisPvE.CanUse(out act, skipStatusProvideCheck: true)) return true;
if (BioIiPvE.CanUse(out act, skipStatusProvideCheck: true)) return true;
if (BioPvE.CanUse(out act, skipStatusProvideCheck: true)) return true;
if (BiolysisPvE.CanUse(out act, skipStatusProvideCheck: DOTUpkeep)) return true;
if (BioIiPvE.CanUse(out act, skipStatusProvideCheck: DOTUpkeep)) return true;
if (BioPvE.CanUse(out act, skipStatusProvideCheck: DOTUpkeep)) return true;

return base.GeneralGCD(out act);
}
Expand Down
5 changes: 4 additions & 1 deletion BasicRotations/Healer/WHM_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ public sealed class WHM_Default : WhiteMageRotation
[RotationConfig(CombatType.PvE, Name = "Use spells with cast times to heal. (Ignored if you are the only healer in party)")]
public bool GCDHeal { get; set; } = false;

[RotationConfig(CombatType.PvE, Name = "Use DOT while moving even if it does not need refresh (disabling is a damage down)")]
public bool DOTUpkeep { get; set; } = true;

[RotationConfig(CombatType.PvE, Name = "Use Lily at max stacks.")]
public bool UseLilyWhenFull { get; set; } = true;

Expand Down Expand Up @@ -180,7 +183,7 @@ protected override bool GeneralGCD(out IAction? act)
if (UseLily(out act)) return true;
}

if (AeroPvE.CanUse(out act, skipStatusProvideCheck: true)) return true;
if (AeroPvE.CanUse(out act, skipStatusProvideCheck: DOTUpkeep)) return true;

return base.GeneralGCD(out act);
}
Expand Down
5 changes: 4 additions & 1 deletion BasicRotations/Healer/zAST_BETA.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ public sealed class zAST_BETA : AstrologianRotation
[Range(4, 20, ConfigUnitType.Seconds)]
[RotationConfig(CombatType.PvE, Name = "Use Earthly Star during countdown timer.")]
public float UseEarthlyStarTime { get; set; } = 15;

[RotationConfig(CombatType.PvE, Name = "Use DOT while moving even if it does not need refresh (disabling is a damage down)")]
public bool DOTUpkeep { get; set; } = true;
#endregion

#region Countdown Logic
Expand Down Expand Up @@ -175,7 +178,7 @@ protected override bool GeneralGCD(out IAction? act)

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

if (CombustIiiPvE.CanUse(out act, skipStatusProvideCheck: true)) return true;
if (CombustIiiPvE.CanUse(out act, skipStatusProvideCheck: DOTUpkeep)) return true;

return base.GeneralGCD(out act);
}
Expand Down
7 changes: 6 additions & 1 deletion BasicRotations/Ranged/MCH_Default.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
namespace DefaultRotations.Ranged;

[Rotation("Default", CombatType.PvE, GameVersion = "7.00", Description = "")]
[Rotation("Default", CombatType.PvE, GameVersion = "7.05")]
[SourceCode(Path = "main/DefaultRotations/Ranged/MCH_Default.cs")]
[Api(3)]
public sealed class MCH_Default : MachinistRotation
{
#region Config Options
[RotationConfig(CombatType.PvE, Name = "(Warning: Queen logic is new and untested, uncheck to test new logic) Skip Queen Logic and uses Rook Autoturret/Automaton Queen immediately whenever you get 50 battery")]
private bool SkipQueenLogic { get; set; } = true;

[RotationConfig(CombatType.PvE, Name = "Prioritize Barrel Stabilizer use")]
private bool BSPrio { get; set; } = false;
#endregion

#region Countdown logic
Expand Down Expand Up @@ -65,6 +68,8 @@ protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)
// Logic for using attack abilities outside of GCD, focusing on burst windows and cooldown management.
protected override bool AttackAbility(IAction nextGCD, out IAction? act)
{
if (BSPrio && BarrelStabilizerPvE.CanUse(out act)) return true;

// Check for not burning Hypercharge below level 52 on AOE
bool LowLevelHyperCheck = !AutoCrossbowPvE.EnoughLevel && SpreadShotPvE.CanUse(out _);

Expand Down
2 changes: 1 addition & 1 deletion BasicRotations/RebornRotations.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<Compile Include="Duty\EmanationDefault" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="RotationSolverReborn.Basic" Version="7.0.5.39" />
<PackageReference Include="RotationSolverReborn.Basic" Version="7.0.5.40" />
</ItemGroup>
<ItemGroup>
<Reference Include="Dalamud">
Expand Down

0 comments on commit fe68f1e

Please sign in to comment.