Skip to content

Commit

Permalink
Merge pull request #474 from FFXIV-CombatReborn/MCH-beta
Browse files Browse the repository at this point in the history
Update bard to allow downtime song usage
  • Loading branch information
LTS-FFXIV authored Dec 14, 2024
2 parents c0f846e + 805768e commit 3679c67
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 26 deletions.
51 changes: 28 additions & 23 deletions BasicRotations/Ranged/BRD_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ public sealed class BRD_Default : BardRotation

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

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

[RotationConfig(CombatType.PvE, Name = "First Song")]
private Song FirstSong { get; set; } = Song.WANDERER;
Expand Down Expand Up @@ -89,10 +89,8 @@ protected override bool DefenseAreaAbility(IAction nextGCD, out IAction act)
return false;
}

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

if (Song == Song.NONE && InCombat)
{
switch (FirstSong)
Expand All @@ -114,6 +112,31 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
if (ArmysPaeonPvE.CanUse(out act)) return true;
}

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

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

if (ArmysPaeonPvE.CanUse(out act) && InCombat)
{
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;
}

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

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

if (IsBurst && Song != Song.NONE && MagesBalladPvE.EnoughLevel)
{
if (((!RadiantFinalePvE.EnoughLevel && !RagingStrikesPvE.Cooldown.IsCoolingDown)
Expand All @@ -130,11 +153,6 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)

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

if (TheWanderersMinuetPvE.CanUse(out act) && InCombat)
{
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, skipCastingCheck: true, skipAoeCheck: true, skipComboCheck: true))
Expand All @@ -146,19 +164,6 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
if (Repertoire == 2 && EmpyrealArrowPvE.Cooldown.WillHaveOneChargeGCD() && RadiantFinalePvE.Cooldown.IsCoolingDown) return true;
}

if (MagesBalladPvE.CanUse(out act) && InCombat)
{
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) && InCombat)
{
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) && RagingStrikesPvE.Cooldown.IsCoolingDown || !RadiantFinalePvE.EnoughLevel)) return true;
Expand Down
9 changes: 6 additions & 3 deletions RotationSolver.Basic/Rotations/Basic/BardRotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,11 @@ static partial void ModifyWindbitePvE(ref ActionSetting setting)

static partial void ModifyMagesBalladPvE(ref ActionSetting setting)
{
setting.StatusProvide = [StatusID.MagesBallad_2217, StatusID.Repertoire];
setting.StatusProvide = [StatusID.MagesBallad_2217];
setting.ActionCheck = () => InCombat;
setting.TargetType = TargetType.Self;
setting.UnlockedByQuestID = 66621;
setting.IsFriendly = true;
}

static partial void ModifyTheWardensPaeanPvE(ref ActionSetting setting)
Expand All @@ -149,10 +150,11 @@ static partial void ModifyBarragePvE(ref ActionSetting setting)

static partial void ModifyArmysPaeonPvE(ref ActionSetting setting)
{
setting.StatusProvide = [StatusID.ArmysPaeon_2218, StatusID.Repertoire];
setting.StatusProvide = [StatusID.ArmysPaeon_2218];
setting.ActionCheck = () => InCombat;
setting.TargetType = TargetType.Self;
setting.UnlockedByQuestID = 66623;
setting.IsFriendly = true;
}

static partial void ModifyRainOfDeathPvE(ref ActionSetting setting)
Expand All @@ -177,10 +179,11 @@ static partial void ModifyBattleVoicePvE(ref ActionSetting setting)

static partial void ModifyTheWanderersMinuetPvE(ref ActionSetting setting)
{
setting.StatusProvide = [StatusID.TheWanderersMinuet_2216, StatusID.Repertoire];
setting.StatusProvide = [StatusID.TheWanderersMinuet_2216];
setting.ActionCheck = () => InCombat;
setting.TargetType = TargetType.Self;
setting.UnlockedByQuestID = 67250;
setting.IsFriendly = true;
}

static partial void ModifyPitchPerfectPvE(ref ActionSetting setting)
Expand Down

0 comments on commit 3679c67

Please sign in to comment.