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

Further beta changes beyond plus ultra #45

Merged
merged 7 commits into from
Apr 15, 2024
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
2 changes: 1 addition & 1 deletion BasicRotations/Magical/BLM_Beta.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace DefaultRotations.Magical;

[Rotation("Testing Rotations", CombatType.PvE, GameVersion = "6.58")]
[Rotation("Beta Rotations", CombatType.PvE, GameVersion = "6.58")]
[SourceCode(Path = "main/DefaultRotations/Magical/BLM_Beta.cs")]
[Api(1)]
public class BLM_Beta : BlackMageRotation
Expand Down
208 changes: 208 additions & 0 deletions BasicRotations/Ranged/BRD_Beta.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
namespace DefaultRotations.Ranged;

[Rotation("Beta Rotations", CombatType.PvE, GameVersion = "6.58",
Description = "Please make sure that the three song times add up to 120 seconds!")]
[SourceCode(Path = "main/DefaultRotations/Ranged/BRD_Beta.cs")]
[Api(1)]
public sealed class BRD_Beta : BardRotation
{
#region Config Options
[RotationConfig(CombatType.PvE, Name = @"Use Raging Strikes on ""Wanderer's Minuet""")]
public bool BindWAND { get; set; } = false;

[Range(1, 45, ConfigUnitType.Seconds, 1)]
[RotationConfig(CombatType.PvE, Name = "Wanderer's Minuet Uptime")]
public float WANDTime { get; set; } = 43;

[Range(0, 45, ConfigUnitType.Seconds, 1)]
[RotationConfig(CombatType.PvE, Name = "Mage's Ballad Uptime")]
public float MAGETime { get; set; } = 34;

[Range(0, 45, ConfigUnitType.Seconds, 1)]
[RotationConfig(CombatType.PvE, Name = "Army's Paeon Uptime")]
public float ARMYTime { get; set; } = 43;

[RotationConfig(CombatType.PvE, Name = "First Song")]
private Song FirstSong { get; set; } = Song.WANDERER;

private bool BindWANDEnough => BindWAND && this.TheWanderersMinuetPvE.EnoughLevel;
private float WANDRemainTime => 45 - WANDTime;
private float MAGERemainTime => 45 - MAGETime;
private float ARMYRemainTime => 45 - ARMYTime;
#endregion

#region Emergency Logic
protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)
{
if (nextGCD.IsTheSameTo(true, StraightShotPvE, VenomousBitePvE, WindbitePvE, IronJawsPvE))
{
return base.EmergencyAbility(nextGCD, out act);
}
else if ((!RagingStrikesPvE.EnoughLevel || Player.HasStatus(true, StatusID.RagingStrikes)) && (!BattleVoicePvE.EnoughLevel || Player.HasStatus(true, StatusID.BattleVoice)))
{
if ((EmpyrealArrowPvE.Cooldown.IsCoolingDown && !EmpyrealArrowPvE.Cooldown.WillHaveOneChargeGCD(1) || !EmpyrealArrowPvE.EnoughLevel) && Repertoire != 3)
{
if (!Player.HasStatus(true, StatusID.StraightShotReady) && BarragePvE.CanUse(out act)) return true;
}
}

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

#region oGCD Logic
protected override bool AttackAbility(IAction nextGCD, out IAction? act)
{
act = null;
if (Song == Song.NONE)
{
switch (FirstSong)
{
case Song.WANDERER:
if (TheWanderersMinuetPvE.CanUse(out act)) return true;
break;

case Song.ARMY:
if (ArmysPaeonPvE.CanUse(out act)) return true;
break;

case Song.MAGE:
if (MagesBalladPvE.CanUse(out act)) return true;
break;
}
if (TheWanderersMinuetPvE.CanUse(out act)) return true;
if (MagesBalladPvE.CanUse(out act)) return true;
if (ArmysPaeonPvE.CanUse(out act)) return true;
}

if (IsBurst && Song != Song.NONE && MagesBalladPvE.EnoughLevel)
{
if (RagingStrikesPvE.CanUse(out act))
{
if (BindWANDEnough && Song == Song.WANDERER && TheWanderersMinuetPvE.EnoughLevel) return true;
if (!BindWANDEnough) return true;
}

if (RadiantFinalePvE.CanUse(out act, skipAoeCheck: true))
{
if (Player.HasStatus(true, StatusID.RagingStrikes) && RagingStrikesPvE.Cooldown.ElapsedOneChargeAfterGCD(1)) return true;
}

if (BattleVoicePvE.CanUse(out act, skipAoeCheck: true))
{
if (IsLastAction(true, RadiantFinalePvE)) return true;

if (Player.HasStatus(true, StatusID.RagingStrikes) && RagingStrikesPvE.Cooldown.ElapsedOneChargeAfterGCD(1)) return true;
}
}

if (RadiantFinalePvE.EnoughLevel && RadiantFinalePvE.Cooldown.IsCoolingDown && BattleVoicePvE.EnoughLevel && !BattleVoicePvE.Cooldown.IsCoolingDown) return false;

if (TheWanderersMinuetPvE.CanUse(out act, onLastAbility: true))
{
if (SongEndAfter(ARMYRemainTime) && (Song != Song.NONE || Player.HasStatus(true, StatusID.ArmysEthos))) return true;
}

if (Song != Song.NONE && EmpyrealArrowPvE.CanUse(out act)) return true;

if (PitchPerfectPvE.CanUse(out act))
{
if (SongEndAfter(3) && Repertoire > 0) return true;

if (Repertoire == 3) return true;

// if (Repertoire == 2 && EmpyrealArrowPvE.Cooldown.WillHaveOneChargeGCD(1) && NextAbilityToNextGCD < PitchPerfectPvE.AnimationLockTime + Ping) return true;

if (Repertoire == 2 && EmpyrealArrowPvE.Cooldown.WillHaveOneChargeGCD()) return true; // && NextAbilityToNextGCD > PitchPerfectPvE.AnimationLockTime + Ping) return true;
}

if (MagesBalladPvE.CanUse(out act))
{
if (Song == Song.WANDERER && SongEndAfter(WANDRemainTime) && Repertoire == 0) return true;
if (Song == Song.ARMY && SongEndAfterGCD(2) && TheWanderersMinuetPvE.Cooldown.IsCoolingDown) return true;
}

if (ArmysPaeonPvE.CanUse(out act))
{
if (TheWanderersMinuetPvE.EnoughLevel && SongEndAfter(MAGERemainTime) && Song == Song.MAGE) return true;
if (TheWanderersMinuetPvE.EnoughLevel && SongEndAfter(2) && MagesBalladPvE.Cooldown.IsCoolingDown && Song == Song.WANDERER) return true;
if (!TheWanderersMinuetPvE.EnoughLevel && SongEndAfter(2)) return true;
}

if (SidewinderPvE.CanUse(out act))
{
if (Player.HasStatus(true, StatusID.BattleVoice) && (Player.HasStatus(true, StatusID.RadiantFinale) || !RadiantFinalePvE.EnoughLevel)) return true;

if (!BattleVoicePvE.Cooldown.WillHaveOneCharge(10) && !RadiantFinalePvE.Cooldown.WillHaveOneCharge(10)) return true;

if (RagingStrikesPvE.Cooldown.IsCoolingDown && !Player.HasStatus(true, StatusID.RagingStrikes)) return true;
}
if (BloodletterLogic(out act, Player.HasStatus(true, StatusID.RagingStrikes))) return true;

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

#region GCD Logic
protected override bool GeneralGCD(out IAction? act)
{
if (IronJawsPvE.CanUse(out act)) return true;
if (IronJawsPvE.CanUse(out act, skipStatusProvideCheck: true) && (IronJawsPvE.Target.Target?.WillStatusEnd(30, true, IronJawsPvE.Setting.TargetStatusProvide ?? []) ?? false))
{
if (Player.HasStatus(true, StatusID.RagingStrikes) && Player.WillStatusEndGCD(1, 0, true, StatusID.RagingStrikes)) return true;
}

if (CanUseApexArrow(out act)) return true;

if (BlastArrowPvE.CanUse(out act, skipAoeCheck: true))
{
if (!Player.HasStatus(true, StatusID.RagingStrikes)) return true;
if (Player.HasStatus(true, StatusID.RagingStrikes) && BarragePvE.Cooldown.IsCoolingDown) return true;
}

if (ShadowbitePvE.CanUse(out act)) return true;
if (QuickNockPvE.CanUse(out act)) return true;

if (WindbitePvE.CanUse(out act)) return true;
if (VenomousBitePvE.CanUse(out act)) return true;

if (StraightShotPvE.CanUse(out act)) return true;
if (HeavyShotPvE.CanUse(out act)) return true;

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

#region Extra Methods
private bool CanUseApexArrow(out IAction act)
{
if (!ApexArrowPvE.CanUse(out act, skipAoeCheck: true)) return false;

if (QuickNockPvE.CanUse(out _) && SoulVoice == 100) return true;

if (SoulVoice == 100 && BattleVoicePvE.Cooldown.WillHaveOneCharge(25)) return false;

if (SoulVoice >= 80 && Player.HasStatus(true, StatusID.RagingStrikes) && Player.WillStatusEnd(10, false, StatusID.RagingStrikes)) return true;

if (SoulVoice == 100 && Player.HasStatus(true, StatusID.RagingStrikes) && Player.HasStatus(true, StatusID.BattleVoice)) return true;

if (Song == Song.MAGE && SoulVoice >= 80 && SongEndAfter(22) && SongEndAfter(18)) return true;

if (!Player.HasStatus(true, StatusID.RagingStrikes) && SoulVoice == 100) return true;

return false;
}
private bool BloodletterLogic(out IAction? act, bool burst)
{
act = null;
if (!burst && RagingStrikesPvE.Cooldown.WillHaveOneCharge(30) && !(BloodletterPvE.Cooldown.CurrentCharges >= 3)) return false;

if (burst && EmpyrealArrowPvE.Cooldown.IsCoolingDown || !EmpyrealArrowPvE.Cooldown.WillHaveOneChargeGCD() || Repertoire != 3 || !EmpyrealArrowPvE.EnoughLevel)
{
if (RainOfDeathPvE.CanUse(out act, usedUp: true)) return true;
if (BloodletterPvE.CanUse(out act, usedUp: true)) return true;
}
return false;
}
#endregion
}
70 changes: 39 additions & 31 deletions BasicRotations/Ranged/BRD_Default.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using Lumina.Excel.GeneratedSheets2;

namespace DefaultRotations.Ranged;

[Rotation("LTS's Default", CombatType.PvE, GameVersion = "6.58",
Expand All @@ -8,6 +6,7 @@ namespace DefaultRotations.Ranged;
[Api(1)]
public sealed class BRD_Default : BardRotation
{
#region Config Options
[RotationConfig(CombatType.PvE, Name = @"Use Raging Strikes on ""Wanderer's Minuet""")]
public bool BindWAND { get; set; } = false;

Expand All @@ -30,35 +29,9 @@ public sealed class BRD_Default : BardRotation
private float WANDRemainTime => 45 - WANDTime;
private float MAGERemainTime => 45 - MAGETime;
private float ARMYRemainTime => 45 - ARMYTime;
#endregion

protected override bool GeneralGCD(out IAction? act)
{
if (IronJawsPvE.CanUse(out act)) return true;
if (IronJawsPvE.CanUse(out act, skipStatusProvideCheck: true) && (IronJawsPvE.Target.Target?.WillStatusEnd(30, true, IronJawsPvE.Setting.TargetStatusProvide ?? []) ?? false))
{
if (Player.HasStatus(true, StatusID.RagingStrikes) && Player.WillStatusEndGCD(1, 0, true, StatusID.RagingStrikes)) return true;
}

if (CanUseApexArrow(out act)) return true;

if (BlastArrowPvE.CanUse(out act, skipAoeCheck : true))
{
if (!Player.HasStatus(true, StatusID.RagingStrikes)) return true;
if (Player.HasStatus(true, StatusID.RagingStrikes) && BarragePvE.Cooldown.IsCoolingDown) return true;
}

if (ShadowbitePvE.CanUse(out act)) return true;
if (QuickNockPvE.CanUse(out act)) return true;

if (WindbitePvE.CanUse(out act)) return true;
if (VenomousBitePvE.CanUse(out act)) return true;

if (StraightShotPvE.CanUse(out act)) return true;
if (HeavyShotPvE.CanUse(out act)) return true;

return base.GeneralGCD(out act);
}

#region Emergency Logic
protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)
{
if (nextGCD.IsTheSameTo(true, StraightShotPvE, VenomousBitePvE, WindbitePvE, IronJawsPvE))
Expand All @@ -75,7 +48,9 @@ protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)

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

#region oGCD Logic
protected override bool AttackAbility(IAction nextGCD, out IAction? act)
{
act = null;
Expand Down Expand Up @@ -172,10 +147,42 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)

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

#region GCD Logic
protected override bool GeneralGCD(out IAction? act)
{
if (IronJawsPvE.CanUse(out act)) return true;
if (IronJawsPvE.CanUse(out act, skipStatusProvideCheck: true) && (IronJawsPvE.Target.Target?.WillStatusEnd(30, true, IronJawsPvE.Setting.TargetStatusProvide ?? []) ?? false))
{
if (Player.HasStatus(true, StatusID.RagingStrikes) && Player.WillStatusEndGCD(1, 0, true, StatusID.RagingStrikes)) return true;
}

if (CanUseApexArrow(out act)) return true;

if (BlastArrowPvE.CanUse(out act, skipAoeCheck: true))
{
if (!Player.HasStatus(true, StatusID.RagingStrikes)) return true;
if (Player.HasStatus(true, StatusID.RagingStrikes) && BarragePvE.Cooldown.IsCoolingDown) return true;
}

if (ShadowbitePvE.CanUse(out act)) return true;
if (QuickNockPvE.CanUse(out act)) return true;

if (WindbitePvE.CanUse(out act)) return true;
if (VenomousBitePvE.CanUse(out act)) return true;

if (StraightShotPvE.CanUse(out act)) return true;
if (HeavyShotPvE.CanUse(out act)) return true;

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

#region Extra Methods
private bool CanUseApexArrow(out IAction act)
{
if (!ApexArrowPvE.CanUse(out act,skipAoeCheck: true)) return false;
if (!ApexArrowPvE.CanUse(out act, skipAoeCheck: true)) return false;

if (QuickNockPvE.CanUse(out _) && SoulVoice == 100) return true;

Expand All @@ -191,4 +198,5 @@ private bool CanUseApexArrow(out IAction act)

return false;
}
#endregion
}
Loading