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

Commit

Permalink
fix: add PLD Test rotation.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Mar 2, 2023
1 parent f4e21c2 commit 80b282d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 35 deletions.
10 changes: 5 additions & 5 deletions RotationSolver/Rotations/Basic/PLD_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ internal abstract class PLD_Base : CustomRotation.CustomRotation
{
private static PLDGauge JobGauge => Service.JobGauges.Get<PLDGauge>();

protected static bool HasDivineMight => !Player.WillStatusEndGCD(0, 0, true, StatusID.DivineMight);

protected static bool HasFightOrFlight => !Player.WillStatusEndGCD(0, 0, true, StatusID.FightOrFlight);

/// <summary>
/// 忠义度
/// </summary>
Expand Down Expand Up @@ -47,7 +51,6 @@ internal abstract class PLD_Base : CustomRotation.CustomRotation
TargetStatus = new[]
{
StatusID.GoringBlade,
StatusID.BladeofValor,
}
};

Expand Down Expand Up @@ -155,10 +158,7 @@ internal abstract class PLD_Base : CustomRotation.CustomRotation
/// <summary>
/// 信念之剑
/// </summary>
public static IBaseAction BladeofFaith { get; } = new BaseAction(ActionID.BladeofFaith)
{
StatusNeed = new[] { StatusID.ReadyForBladeofFaith },
};
public static IBaseAction BladeofFaith { get; } = new BaseAction(ActionID.BladeofFaith);

/// <summary>
/// 安魂祈祷
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected bool UseBurstMedicine(out IAction act)
{
act = null;

if (!IsFullParty) return false;
if (!IsFullParty || !InCombat) return false;
if (Service.ClientState.LocalPlayer?.Level < 90) return false;

var role = Job.GetJobRole();
Expand Down
54 changes: 25 additions & 29 deletions RotationSolver/Rotations/Tank/PLD/PLD_Test.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,64 +4,59 @@
using RotationSolver.Data;
using RotationSolver.Helpers;
using RotationSolver.Rotations.Basic;
using RotationSolver.Updaters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RotationSolver.Rotations.Tank.PLD;

[RotationDesc("The whole rotation's burst is base on this:")]
[RotationDesc(ActionID.FightorFlight)]
internal class PLD_Test : PLD_Base
{
public override string GameVersion => "6.31";
public override string RotationName => "Test";

public override string Description => "NO PRE-PULL FOF OPENER";
public override string Description => "Tentative v1.2";

private protected override IRotationConfigSet CreateConfiguration()
{
return base.CreateConfiguration()
.SetBool("UseDivineVeilPre", false, "DivineVeilPre in 15 seconds counting down.");
}

private protected override IAction CountDownAction(float remainTime)
{
if (remainTime <= HolySpirit.CastTime + Service.Configuration.CountDownAhead
if (remainTime < HolySpirit.CastTime + Service.Configuration.CountDownAhead
&& HolySpirit.CanUse(out var act)) return act;

if (Configs.GetBool("UseDivineVeilPre") && remainTime <= 15
if (remainTime < 15 && Configs.GetBool("UseDivineVeilPre")
&& DivineVeil.CanUse(out act)) return act;

return base.CountDownAction(remainTime);
}

private protected override bool EmergencyAbility(byte abilitiesRemaining, IAction nextGCD, out IAction act)
{
if (abilitiesRemaining == 1 && nextGCD.IsTheSameTo(true, RiotBlade, GoringBlade))
{
if (FightorFlight.CanUse(out act)) return true;
}
return base.EmergencyAbility(abilitiesRemaining, nextGCD, out act);
}

private protected override bool AttackAbility(byte abilitiesRemaining, out IAction act)
{
if(CombatElapsedLess(6) )
{
if(FightorFlight.CanUse(out act)) return true;
}
else if(InBurst)
act = null;

if (abilitiesRemaining == 1 && InCombat)
{
if(UseBurstMedicine(out act)) return true;
if (UseBurstMedicine(out act)) return true;
if (InBurst && FightorFlight.CanUse(out act)) return true;
}
if (CombatElapsedLess(5)) return false;

if (CircleofScorn.CanUse(out act, mustUse: true)) return true;
if (SpiritsWithin.CanUse(out act, mustUse: true)) return true;
if (Expiacion.CanUse(out act, mustUse: true)) return true;
act = null;
if (SpiritsWithin.CanUse(out act, mustUse: true)) return true;

if (Player.WillStatusEndGCD(4, 0, true, StatusID.FightOrFlight)
&& Requiescat.CanUse(out act, mustUse: true)) return true;

if (HasFightOrFlight && Intervene.CanUse(out act, true, true)) return true;
return false;
}

private static bool UseHoly => HasDivineMight && !FightorFlight.WillHaveOneChargeGCD(1);

private protected override bool GeneralGCD(out IAction act)
{
if (BladeofValor.CanUse(out act, mustUse: true)) return true;
Expand All @@ -70,14 +65,15 @@ private protected override bool GeneralGCD(out IAction act)
if (Confiteor.CanUse(out act, mustUse: true)) return true;

//AOE
if (Player.HasStatus(true, StatusID.Requiescat)
&& HolyCircle.CanUse(out act)) return true;
if (UseHoly && HolyCircle.CanUse(out act)) return true;
if (Prominence.CanUse(out act)) return true;
if (TotalEclipse.CanUse(out act)) return true;

//Single
if (GoringBlade.CanUse(out act)) return true; // Dot
if (UseHoly && HolySpirit.CanUse(out act)) return true;
if (!CombatElapsedLess(7) && GoringBlade.CanUse(out act)) return true; // Dot
if (RageofHalone.CanUse(out act)) return true;
if (!FightorFlight.WillHaveOneChargeGCD(1) && Atonement.CanUse(out act)) return true;
if (RiotBlade.CanUse(out act)) return true;
if (FastBlade.CanUse(out act)) return true;

Expand Down

0 comments on commit 80b282d

Please sign in to comment.