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

Commit

Permalink
Merge pull request #55 from FFXIV-CombatReborn/Standarization
Browse files Browse the repository at this point in the history
THE Commit
  • Loading branch information
Toshi authored Apr 23, 2024
2 parents c531ae9 + 1d8b7f7 commit 93ff38d
Show file tree
Hide file tree
Showing 22 changed files with 1,170 additions and 1,150 deletions.
36 changes: 23 additions & 13 deletions BasicRotations/Healer/AST_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ namespace DefaultRotations.Healer;
[Api(1)]
public sealed class AST_Default : AstrologianRotation
{
#region Config Options
[Range(4, 20, ConfigUnitType.Seconds)]
[RotationConfig(CombatType.PvE, Name = "Use Earthly Star during countdown timer.")]
public float UseEarthlyStarTime { get; set; } = 15;
#endregion

#region Countdown Logic
protected override IAction? CountDownAction(float remainTime)
{
if (remainTime < MaleficPvE.Info.CastTime + CountDownAhead
Expand All @@ -21,7 +24,9 @@ public sealed class AST_Default : AstrologianRotation

return base.CountDownAction(remainTime);
}
#endregion

#region Defensive Logic
[RotationDesc(ActionID.CelestialIntersectionPvE, ActionID.ExaltationPvE)]
protected override bool DefenseSingleAbility(IAction nextGCD, out IAction? act)
{
Expand Down Expand Up @@ -51,7 +56,9 @@ protected override bool DefenseAreaAbility(IAction nextGCD, out IAction? act)
if (CollectiveUnconsciousPvE.CanUse(out act)) return true;
return base.DefenseAreaAbility(nextGCD, out act);
}
#endregion

#region GCD Logic
protected override bool GeneralGCD(out IAction? act)
{
////Add AspectedBeneficwhen not in combat.
Expand All @@ -66,14 +73,29 @@ protected override bool GeneralGCD(out IAction? act)
return base.GeneralGCD(out act);
}

[RotationDesc(ActionID.AspectedBeneficPvE, ActionID.BeneficIiPvE, ActionID.BeneficPvE)]
protected override bool HealSingleGCD(out IAction? act)
{
if (AspectedBeneficPvE.CanUse(out act)
&& (IsMoving
|| AspectedBeneficPvE.Target.Target?.GetHealthRatio() > 0.4)) 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)
{
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)
{
if (base.EmergencyAbility(nextGCD, out act)) return true;
Expand All @@ -100,19 +122,6 @@ protected override bool GeneralAbility(IAction nextGCD, out IAction? act)
return base.GeneralAbility(nextGCD, out act);
}

[RotationDesc(ActionID.AspectedBeneficPvE, ActionID.BeneficIiPvE, ActionID.BeneficPvE)]
protected override bool HealSingleGCD(out IAction? act)
{
if (AspectedBeneficPvE.CanUse(out act)
&& (IsMoving
|| AspectedBeneficPvE.Target.Target?.GetHealthRatio() > 0.4)) return true;

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

return base.HealSingleGCD(out act);
}

protected override bool AttackAbility(IAction nextGCD, out IAction? act)
{
if (IsBurst && !IsMoving
Expand Down Expand Up @@ -191,4 +200,5 @@ protected override bool HealAreaAbility(IAction nextGCD, out IAction? act)

return base.HealAreaAbility(nextGCD, out act);
}
#endregion
}
162 changes: 85 additions & 77 deletions BasicRotations/Healer/SCH_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace DefaultRotations.Healer;
[Api(1)]
public sealed class SCH_Default : ScholarRotation
{
#region Config Options
[RotationConfig(CombatType.PvE, Name = "Use spells with cast times to heal.")]
public bool GCDHeal { get; set; } = false;

Expand All @@ -13,29 +14,57 @@ public sealed class SCH_Default : ScholarRotation

[RotationConfig(CombatType.PvE, Name = "Give Recitation to Tank")]
public bool GiveT { get; set; } = false;
#endregion

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);

protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)
#region Countdown Logic
protected override IAction? CountDownAction(float remainTime)
{
if (nextGCD.IsTheSameTo(true, SuccorPvE, AdloquiumPvE))
{
if (RecitationPvE.CanUse(out act)) return true;
}
if (remainTime < RuinPvE.Info.CastTime + CountDownAhead
&& RuinPvE.CanUse(out var act)) return act;

//Remove Aetherpact
foreach (var item in PartyMembers)
if (PrevDUN && remainTime <= 15 && !DeploymentTacticsPvE.Cooldown.IsCoolingDown && PartyMembers.Count() > 1)
{
if (item.GetHealthRatio() < 0.9) continue;
if (item.HasStatus(true, StatusID.FeyUnion_1223))

if (!RecitationPvE.Cooldown.IsCoolingDown) return RecitationPvE;
if (!PartyMembers.Any((n) => n.HasStatus(true, StatusID.Galvanize)))
{
act = AetherpactPvE;
return true;
if (GiveT)
{
return AdloquiumPvE;
}
}
else
{
return DeploymentTacticsPvE;
}
}
return base.CountDownAction(remainTime);
}
#endregion

return base.EmergencyAbility(nextGCD, out act);
#region GCD Logic
[RotationDesc(ActionID.SuccorPvE)]
protected override bool HealAreaGCD(out IAction? act)
{
if (SuccorPvE.CanUse(out act)) return true;

return base.HealAreaGCD(out act);
}

[RotationDesc(ActionID.AdloquiumPvE, ActionID.PhysickPvE)]
protected override bool HealSingleGCD(out IAction? act)
{
if (AdloquiumPvE.CanUse(out act)) return true;
if (PhysickPvE.CanUse(out act)) return true;

return base.HealSingleGCD(out act);
}

[RotationDesc(ActionID.SuccorPvE)]
protected override bool DefenseAreaGCD(out IAction? act)
{
if (SuccorPvE.CanUse(out act)) return true;
return base.DefenseAreaGCD(out act);
}

protected override bool GeneralGCD(out IAction? act)
Expand All @@ -55,51 +84,33 @@ protected override bool GeneralGCD(out IAction? act)

return base.GeneralGCD(out act);
}
#endregion

[RotationDesc(ActionID.AdloquiumPvE, ActionID.PhysickPvE)]
protected override bool HealSingleGCD(out IAction? act)
{
if (AdloquiumPvE.CanUse(out act)) return true;
if (PhysickPvE.CanUse(out act)) return true;

return base.HealSingleGCD(out act);
}

[RotationDesc(ActionID.AetherpactPvE, ActionID.ProtractionPvE, ActionID.SacredSoilPvE, ActionID.ExcogitationPvE, ActionID.LustratePvE, ActionID.AetherpactPvE)]
protected override bool HealSingleAbility(IAction nextGCD, out IAction? act)
{
var haveLink = PartyMembers.Any(p => p.HasStatus(true, StatusID.FeyUnion_1223));

if (AetherpactPvE.CanUse(out act) && FairyGauge >= 70 && !haveLink) return true;
if (ProtractionPvE.CanUse(out act)) return true;
if (SacredSoilPvE.CanUse(out act)) return true;
if (ExcogitationPvE.CanUse(out act)) return true;
if (LustratePvE.CanUse(out act)) return true;
if (AetherpactPvE.CanUse(out act) && !haveLink) return true;

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

[RotationDesc(ActionID.ExcogitationPvE)]
protected override bool DefenseSingleAbility(IAction nextGCD, out IAction? act)
#region oGCD Logic
protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)
{
if (ExcogitationPvE.CanUse(out act)) return true;
return base.DefenseSingleAbility(nextGCD, out act);
}
if (nextGCD.IsTheSameTo(true, SuccorPvE, AdloquiumPvE))
{
if (RecitationPvE.CanUse(out act)) return true;
}

[RotationDesc(ActionID.SuccorPvE)]
protected override bool HealAreaGCD(out IAction? act)
{
if (SuccorPvE.CanUse(out act)) return true;
//Remove Aetherpact
foreach (var item in PartyMembers)
{
if (item.GetHealthRatio() < 0.9) continue;
if (item.HasStatus(true, StatusID.FeyUnion_1223))
{
act = AetherpactPvE;
return true;
}
}

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


[RotationDesc(ActionID.SummonSeraphPvE, ActionID.ConsolationPvE, ActionID.WhisperingDawnPvE, ActionID.SacredSoilPvE, ActionID.IndomitabilityPvE)]
protected override bool HealAreaAbility(IAction nextGCD, out IAction? act)
{
//慰藉
if (WhisperingDawnPvE.Cooldown.ElapsedOneChargeAfterGCD(1) || FeyIlluminationPvE.Cooldown.ElapsedOneChargeAfterGCD(1) || FeyBlessingPvE.Cooldown.ElapsedOneChargeAfterGCD(1))
{
if (SummonSeraphPvE.CanUse(out act)) return true;
Expand All @@ -114,11 +125,19 @@ protected override bool HealAreaAbility(IAction nextGCD, out IAction? act)
return base.HealAreaAbility(nextGCD, out act);
}

[RotationDesc(ActionID.SuccorPvE)]
protected override bool DefenseAreaGCD(out IAction? act)
[RotationDesc(ActionID.AetherpactPvE, ActionID.ProtractionPvE, ActionID.SacredSoilPvE, ActionID.ExcogitationPvE, ActionID.LustratePvE, ActionID.AetherpactPvE)]
protected override bool HealSingleAbility(IAction nextGCD, out IAction? act)
{
if (SuccorPvE.CanUse(out act)) return true;
return base.DefenseAreaGCD(out act);
var haveLink = PartyMembers.Any(p => p.HasStatus(true, StatusID.FeyUnion_1223));

if (AetherpactPvE.CanUse(out act) && FairyGauge >= 70 && !haveLink) return true;
if (ProtractionPvE.CanUse(out act)) return true;
if (SacredSoilPvE.CanUse(out act)) return true;
if (ExcogitationPvE.CanUse(out act)) return true;
if (LustratePvE.CanUse(out act)) return true;
if (AetherpactPvE.CanUse(out act) && !haveLink) return true;

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

[RotationDesc(ActionID.FeyIlluminationPvE, ActionID.ExpedientPvE, ActionID.SummonSeraphPvE, ActionID.ConsolationPvE, ActionID.SacredSoilPvE)]
Expand All @@ -137,6 +156,12 @@ protected override bool DefenseAreaAbility(IAction nextGCD, out IAction? act)
return base.DefenseAreaAbility(nextGCD, out act);
}

[RotationDesc(ActionID.ExcogitationPvE)]
protected override bool DefenseSingleAbility(IAction nextGCD, out IAction? act)
{
if (ExcogitationPvE.CanUse(out act)) return true;
return base.DefenseSingleAbility(nextGCD, out act);
}

protected override bool AttackAbility(IAction nextGCD, out IAction? act)
{
Expand All @@ -155,28 +180,11 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)

return base.AttackAbility(nextGCD, out act);
}
#endregion

protected override IAction? CountDownAction(float remainTime)
{
if (remainTime < RuinPvE.Info.CastTime + CountDownAhead
&& RuinPvE.CanUse(out var act)) return act;

if (PrevDUN && remainTime <= 15 && !DeploymentTacticsPvE.Cooldown.IsCoolingDown && PartyMembers.Count() > 1)
{
#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);

if (!RecitationPvE.Cooldown.IsCoolingDown) return RecitationPvE;
if (!PartyMembers.Any((n) => n.HasStatus(true, StatusID.Galvanize)))
{
if (GiveT)
{
return AdloquiumPvE;
}
}
else
{
return DeploymentTacticsPvE;
}
}
return base.CountDownAction(remainTime);
}
#endregion
}
Loading

0 comments on commit 93ff38d

Please sign in to comment.