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 #142 from FFXIV-CombatReborn/Reprisal-fix
Browse files Browse the repository at this point in the history
DRK and PLD fixes, PLD now has configs for Cover and Intervention
  • Loading branch information
LTS-FFXIV authored Jul 25, 2024
2 parents b8e29f4 + a944831 commit f211e54
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 33 deletions.
10 changes: 6 additions & 4 deletions BasicRotations/Tank/DRK_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,19 @@ protected override bool DefenseSingleAbility(IAction nextGCD, out IAction? act)
//10
if (OblationPvE.CanUse(out act, usedUp: true)) return true;

if (ReprisalPvE.CanUse(out act, skipAoeCheck: true)) return true;

if (TheBlackestNightPvE.CanUse(out act)) return true;
//20
if (DarkMindPvE.CanUse(out act)) return true;

//30
if ((!RampartPvE.Cooldown.IsCoolingDown || RampartPvE.Cooldown.ElapsedAfter(60)) && ShadowWallPvE.CanUse(out act)) return true;

//20
if (ShadowWallPvE.Cooldown.IsCoolingDown && ShadowWallPvE.Cooldown.ElapsedAfter(60) && RampartPvE.CanUse(out act)) return true;
if (DarkMindPvE.CanUse(out act)) return true;

return base.DefenseAreaAbility(nextGCD, out act);
if (ReprisalPvE.CanUse(out act)) return true;

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

protected override bool AttackAbility(IAction nextGCD, out IAction? act)
Expand Down
66 changes: 37 additions & 29 deletions BasicRotations/Tank/PLD_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ public class PLD_Default : PaladinRotation
[RotationConfig(CombatType.PvE, Name = "Use Shield Bash when Low Blow is cooling down")]
public bool UseShieldBash { get; set; } = true;

[Range(0, 1, ConfigUnitType.Percent)]
[RotationConfig(CombatType.PvE, Name = "Health threshold for Intervention")]
public float InterventionRatio { get; set; } = 0.6f;

[Range(0, 1, ConfigUnitType.Percent)]
[RotationConfig(CombatType.PvE, Name = "Health threshold for Cover")]
public float CoverRatio { get; set; } = 0.3f;

public static bool HasSupplicationReady => Player.HasStatus(true, StatusID.SupplicationReady);
public static bool HasSepulchreReady => Player.HasStatus(true, StatusID.SepulchreReady);
public static bool HasHonorReady => Player.HasStatus(true, StatusID.BladeOfHonorReady);
Expand Down Expand Up @@ -49,40 +57,17 @@ protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)
if ((Player.HasStatus(true, StatusID.Rampart) || Player.HasStatus(true, StatusID.Sentinel)) && InterventionPvE.CanUse(out act) &&
InterventionPvE.Target.Target?.GetHealthRatio() < 0.6) return true;

if (CoverPvE.CanUse(out act) && CoverPvE.Target.Target?.DistanceToPlayer() < 10 && CoverPvE.Target.Target?.GetHealthRatio() < 0.3) return true;
if (CoverPvE.CanUse(out act) && CoverPvE.Target.Target?.DistanceToPlayer() < 10 && CoverPvE.Target.Target?.GetHealthRatio() < CoverRatio) return true;

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

protected override bool AttackAbility(IAction nextGCD, out IAction? act)
{
act = null;

if (InCombat)
{
if (UseBurstMedicine(out act)) return true;
if (IsBurst && !CombatElapsedLess(5) && FightOrFlightPvE.CanUse(out act)) return true;
}
if (CombatElapsedLess(8)) return false;

if (CircleOfScornPvE.CanUse(out act, skipAoeCheck: true)) return true;
if (SpiritsWithinPvE.CanUse(out act, skipAoeCheck: true)) return true;

//if (Player.WillStatusEndGCD(6, 0, true, StatusID.FightOrFlight)
// && RequiescatPvE.CanUse(out act, skipAoeCheck: true)) return true;
if (Player.HasStatus(true, StatusID.FightOrFlight) && RequiescatPvE.CanUse(out act, skipAoeCheck: true)) return true;

if (!IsMoving && IntervenePvE.CanUse(out act, skipAoeCheck: true, usedUp: HasFightOrFlight)) return true;

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

[RotationDesc(ActionID.ReprisalPvE, ActionID.DivineVeilPvE)]
protected override bool DefenseAreaAbility(IAction nextGCD, out IAction? act)
{

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

if (!Player.HasStatus(true, StatusID.Bulwark) && ReprisalPvE.CanUse(out act, skipAoeCheck: true)) return true;
if (PassageOfArmsPvE.CanUse(out act)) return true;
return base.DefenseAreaAbility(nextGCD, out act);
}
Expand All @@ -94,11 +79,11 @@ protected override bool DefenseSingleAbility(IAction nextGCD, out IAction? act)
// If the player has the Hallowed Ground status, don't use any abilities.
if (!Player.HasStatus(true, StatusID.HallowedGround))
{
// If Bulwark can be used and there are more than 2 hostiles in range, use it and return true.
if (BulwarkPvE.CanUse(out act, true) && NumberOfHostilesInRange > 2) return true;
// If Bulwark can be used, use it and return true.
if (BulwarkPvE.CanUse(out act, skipAoeCheck: true)) return true;

// If Oath can be used, use it and return true.
//if (UseOath(out act, true)) return true;
if (UseOath(out act, true)) return true;

// If Rampart is not cooling down or has been cooling down for more than 60 seconds, and Sentinel can be used, use Sentinel and return true.
if ((!RampartPvE.Cooldown.IsCoolingDown || RampartPvE.Cooldown.ElapsedAfter(60)) && SentinelPvE.CanUse(out act)) return true;
Expand All @@ -107,12 +92,35 @@ protected override bool DefenseSingleAbility(IAction nextGCD, out IAction? act)
if ((SentinelPvE.EnoughLevel && SentinelPvE.Cooldown.IsCoolingDown && SentinelPvE.Cooldown.ElapsedAfter(60) || !SentinelPvE.EnoughLevel) && RampartPvE.CanUse(out act)) return true;

// If Reprisal can be used, use it and return true.
if (ReprisalPvE.CanUse(out act, skipAoeCheck: true, skipStatusProvideCheck: true)) return true;
if (ReprisalPvE.CanUse(out act)) return true;

}

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

protected override bool AttackAbility(IAction nextGCD, out IAction? act)
{
act = null;

if (InCombat)
{
if (UseBurstMedicine(out act)) return true;
if (IsBurst && !CombatElapsedLess(5) && FightOrFlightPvE.CanUse(out act)) return true;
}
if (CombatElapsedLess(8)) return false;

if (CircleOfScornPvE.CanUse(out act, skipAoeCheck: true)) return true;
if (SpiritsWithinPvE.CanUse(out act, skipAoeCheck: true)) return true;

//if (Player.WillStatusEndGCD(6, 0, true, StatusID.FightOrFlight)
// && RequiescatPvE.CanUse(out act, skipAoeCheck: true)) return true;
if (Player.HasStatus(true, StatusID.FightOrFlight) && RequiescatPvE.CanUse(out act, skipAoeCheck: true)) return true;

if (!IsMoving && IntervenePvE.CanUse(out act, skipAoeCheck: true, usedUp: HasFightOrFlight)) return true;

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

#region GCD Logic
Expand Down

0 comments on commit f211e54

Please sign in to comment.