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

Commit

Permalink
Merge pull request #1836 from Kagekazu/RPR_SoD
Browse files Browse the repository at this point in the history
[RPR] few fixes
  • Loading branch information
Taurenkey authored Nov 17, 2024
2 parents 6a91bd9 + 04ef80f commit 639b109
Show file tree
Hide file tree
Showing 3 changed files with 293 additions and 279 deletions.
10 changes: 7 additions & 3 deletions XIVSlothCombo/Combos/CustomComboPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2878,7 +2878,7 @@ public enum CustomComboPreset

[ReplaceSkill(RPR.Slice)]
[ConflictingCombos(RPR_ST_AdvancedMode)]
[CustomComboInfo("Simple Mode - Single Target", "Replaces Slice with a one-button full single target rotation.\nThis is ideal for newcomers to the job.", RPR.JobID)]
[CustomComboInfo("Simple Mode - Single Target", "Replaces Slice with a one-button full single target rotation.\nThis is ideal for newcomers to the job.", RPR.JobID,1)]
RPR_ST_SimpleMode = 12000,

#endregion
Expand Down Expand Up @@ -2981,7 +2981,7 @@ public enum CustomComboPreset

[ReplaceSkill(RPR.SpinningScythe)]
[ConflictingCombos(RPR_AoE_AdvancedMode)]
[CustomComboInfo("Simple Mode - AoE", "Replaces Spinning Scythe with a one-button full single target rotation.\nThis is ideal for newcomers to the job.", RPR.JobID)]
[CustomComboInfo("Simple Mode - AoE", "Replaces Spinning Scythe with a one-button full single target rotation.\nThis is ideal for newcomers to the job.", RPR.JobID,2)]
RPR_AoE_SimpleMode = 12100,

#endregion
Expand Down Expand Up @@ -3075,7 +3075,11 @@ public enum CustomComboPreset
[CustomComboInfo("Enshroud Combo Option", "Adds Enshroud combo (Void/Cross Reaping, Communio, Lemure's Slice, Sacrificium and Perfectio) on Blood Stalk and Grim Swathe.", RPR.JobID)]
RPR_GluttonyBloodSwathe_Enshroud = 12202,

// Last value = 12202
[ParentCombo(RPR_GluttonyBloodSwathe)]
[CustomComboInfo("Sacrificium only Option", "Adds only Sacrificium on Blood Stalk and Grim Swathe while enshrouded.", RPR.JobID)]
RPR_GluttonyBloodSwathe_Sacrificium = 12203,

// Last value = 12203

#endregion

Expand Down
55 changes: 31 additions & 24 deletions XIVSlothCombo/Combos/JobHelpers/RPR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,24 @@
using ECommons.DalamudServices;
using FFXIVClientStructs.FFXIV.Client.Game;
using XIVSlothCombo.Combos.JobHelpers.Enums;
using XIVSlothCombo.Combos.PvE;
using XIVSlothCombo.Data;
using static XIVSlothCombo.Combos.PvE.RPR;
using static XIVSlothCombo.CustomComboNS.Functions.CustomComboFunctions;

namespace XIVSlothCombo.Combos.JobHelpers;

internal abstract class RPR
internal class RPR
{
// RPR Gauge & Extensions
public static float GCD = GetCooldown(Slice).CooldownTotal;

public static bool trueNorthReady = TargetNeedsPositionals() && ActionReady(All.TrueNorth) &&
!HasEffect(All.Buffs.TrueNorth);

public static RPROpenerLogic RPROpener = new();
public static RPRGauge Gauge = GetJobGauge<RPRGauge>();

internal class RPROpenerLogic
{
private OpenerState currentState = OpenerState.PrePull;
Expand Down Expand Up @@ -203,43 +213,32 @@ public bool DoFullOpener(ref uint actionID)
}
}

internal class RPRHelpers
internal class RPRHelper
{
public static unsafe bool IsComboExpiring(float Times)
{
float GCD = GetCooldown(Slice).CooldownTotal * Times;

if (ActionManager.Instance()->Combo.Timer != 0 && ActionManager.Instance()->Combo.Timer < GCD)
return true;

return false;
return ActionManager.Instance()->Combo.Timer != 0 && ActionManager.Instance()->Combo.Timer < GCD;
}

public static bool IsBuffExpiring(float Times)
{
float GCD = GetCooldown(Slice).CooldownTotal * Times;

if ((HasEffect(Buffs.EnhancedGallows) && GetBuffRemainingTime(Buffs.EnhancedGallows) < GCD) ||
(HasEffect(Buffs.EnhancedGibbet) && GetBuffRemainingTime(Buffs.EnhancedGibbet) < GCD))
return true;

return false;
return (HasEffect(Buffs.EnhancedGallows) && GetBuffRemainingTime(Buffs.EnhancedGallows) < GCD) ||
(HasEffect(Buffs.EnhancedGibbet) && GetBuffRemainingTime(Buffs.EnhancedGibbet) < GCD);
}

public static bool IsDebuffExpiring(float Times)
{
float GCD = GetCooldown(Slice).CooldownTotal * Times;

if (TargetHasEffect(Debuffs.DeathsDesign) && GetDebuffRemainingTime(Debuffs.DeathsDesign) < GCD)
return true;

return false;
return TargetHasEffect(Debuffs.DeathsDesign) && GetDebuffRemainingTime(Debuffs.DeathsDesign) < GCD;
}

public static bool UseEnshroud(RPRGauge gauge)
{
float GCD = GetCooldown(Slice).CooldownTotal;

if (LevelChecked(Enshroud) && (gauge.Shroud >= 50 || HasEffect(Buffs.IdealHost)) &&
!HasEffect(Buffs.SoulReaver) && !HasEffect(Buffs.Executioner) &&
!HasEffect(Buffs.PerfectioParata) && !HasEffect(Buffs.Enshrouded))
Expand All @@ -259,7 +258,7 @@ public static bool UseEnshroud(RPRGauge gauge)

//2nd part of Double Enshroud
if (LevelChecked(PlentifulHarvest) &&
WasLastWeaponskill(PlentifulHarvest))
JustUsed(PlentifulHarvest, 5))
return true;

//Natural Odd Minute Shrouds
Expand All @@ -278,29 +277,37 @@ public static bool UseEnshroud(RPRGauge gauge)

public static bool UseShadowOfDeath()
{
float GCD = GetCooldown(Slice).CooldownTotal;

if (LevelChecked(ShadowOfDeath) && !HasEffect(Buffs.SoulReaver) &&
!HasEffect(Buffs.Executioner) && !HasEffect(Buffs.PerfectioParata) &&
!HasEffect(Buffs.ImmortalSacrifice) && !IsComboExpiring(1) && !JustUsed(Perfectio) &&
!HasEffect(Buffs.ImmortalSacrifice) && !IsComboExpiring(3) &&
!JustUsed(ShadowOfDeath))
{
//1st part double enshroud
if (LevelChecked(PlentifulHarvest) && HasEffect(Buffs.Enshrouded) &&
GetCooldownRemainingTime(ArcaneCircle) <= GCD * 2 + 1.5 && JustUsed(Enshroud))
return true;

//2nd part double enshroud
if (LevelChecked(PlentifulHarvest) && HasEffect(Buffs.Enshrouded) &&
(GetCooldownRemainingTime(ArcaneCircle) <= GCD || IsOffCooldown(ArcaneCircle)) &&
(JustUsed(VoidReaping) || JustUsed(CrossReaping)))
return true;

if (!HasEffect(Buffs.Enshrouded) &&
//lvl 88+ general use
if (LevelChecked(PlentifulHarvest) && !HasEffect(Buffs.Enshrouded) &&
((IsEnabled(CustomComboPreset.RPR_ST_SimpleMode) &&
GetDebuffRemainingTime(Debuffs.DeathsDesign) <= 8) ||
(IsEnabled(CustomComboPreset.RPR_ST_AdvancedMode) &&
GetDebuffRemainingTime(Debuffs.DeathsDesign) <= Config.RPR_SoDRefreshRange)) &&
(GetCooldownRemainingTime(ArcaneCircle) > GCD * 8 || IsOffCooldown(ArcaneCircle) ||
!LevelChecked(ArcaneCircle)))
(GetCooldownRemainingTime(ArcaneCircle) > GCD * 8 || IsOffCooldown(ArcaneCircle)))
return true;

//below lvl 88 use
if (!LevelChecked(PlentifulHarvest) &&
((IsEnabled(CustomComboPreset.RPR_ST_SimpleMode) &&
GetDebuffRemainingTime(Debuffs.DeathsDesign) <= 8) ||
(IsEnabled(CustomComboPreset.RPR_ST_AdvancedMode) &&
GetDebuffRemainingTime(Debuffs.DeathsDesign) <= Config.RPR_SoDRefreshRange)))
return true;
}

Expand Down
Loading

0 comments on commit 639b109

Please sign in to comment.