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 #191 from FFXIV-CombatReborn/IcWaDev
Browse files Browse the repository at this point in the history
Added overcap settings for comet only modify settings to avoid lost of desynced hammer changed some conditions on prebuild bool and optimised code
  • Loading branch information
IncognitoWater authored Aug 21, 2024
2 parents 5d9d425 + 45e7de1 commit 7a34753
Showing 1 changed file with 32 additions and 37 deletions.
69 changes: 32 additions & 37 deletions BasicRotations/Magical/ICWA_PCT_BETA.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ public sealed class IcWaPctBeta : PictomancerRotation
public MotifSwift MotifSwiftCast { get; set; } = MotifSwift.WeaponMotif;
[Range(1, 5, ConfigUnitType.None, 1)]
[RotationConfig(CombatType.PvE, Name = "Paint overcap protection. How many paint do you need to be at before using a paint?")]
public bool UseCapCometHoly { get; set; } = true;
[RotationConfig(CombatType.PvE, Name = "Use the paint overcap protection ( will still use comet while moving if the setup is on)")]
public bool UseCapCometOnly { get; set; } = false;
[RotationConfig(CombatType.PvE, Name = "Use the paint overcap protection for comet only or ( will still use comet while moving if the setup is on)")]
public int HolyCometMax { get; set; } = 5;
public enum MotifSwift : byte
{
Expand Down Expand Up @@ -129,7 +133,11 @@ protected override bool DefenseAreaAbility(IAction nextGCD, out IAction? act)
#region oGCD Logic
protected override bool AttackAbility(IAction nextGCD, out IAction? act)
{
bool burstTimingChecker = !ScenicMusePvE.Cooldown.WillHaveOneCharge(32) || Player.HasStatus(true, StatusID.StarryMuse);
bool burstTimingCheckerStriking = !ScenicMusePvE.Cooldown.WillHaveOneCharge(60) || Player.HasStatus(true, StatusID.StarryMuse);
if (CombatTime < 5)
{
if (StrikingMusePvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true) && WeaponMotifDrawn) return true;
}
if (SubtractivePalettePvE.CanUse(out act) && !Player.HasStatus(true, StatusID.SubtractivePalette)) return true;
if (Player.HasStatus(true, StatusID.StarryMuse))
{
Expand All @@ -138,15 +146,15 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
}
if (Player.Level < 92)
{
if (ScenicMusePvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true) && CombatTime > 3 ) return true;
if (ScenicMusePvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true) && CombatTime > 3 && IsBurst ) return true;
}
else
{
if (ScenicMusePvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true) && CombatTime > 5 ) return true;
if (ScenicMusePvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true) && CombatTime > 5 && IsBurst ) return true;
}
if (RetributionOfTheMadeenPvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true)) return true;
if (MogOfTheAgesPvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true)) return true;
if (StrikingMusePvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true) && burstTimingChecker) return true;
if (StrikingMusePvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true) && burstTimingCheckerStriking) return true;
if (PomMusePvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true) && LivingMusePvE.AdjustedID == PomMusePvE.ID) return true;
if (WingedMusePvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true) && LivingMusePvE.AdjustedID == WingedMusePvE.ID) return true;
if (ClawedMusePvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true) && LivingMusePvE.AdjustedID == ClawedMusePvE.ID) return true;
Expand All @@ -157,19 +165,15 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
#region GCD Logic
protected override bool GeneralGCD(out IAction? act)
{
bool burstTimingChecker = !ScenicMusePvE.Cooldown.WillHaveOneCharge(32) || Player.HasStatus(true, StatusID.StarryMuse);
bool burstTimingChecker = !ScenicMusePvE.Cooldown.WillHaveOneCharge(52) && SteelMusePvE.Cooldown.CurrentCharges != 1 || Player.HasStatus(true, StatusID.StarryMuse);
//Opener requirements
if (CombatTime < 5)
{
if (StrikingMusePvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true) && WeaponMotifDrawn) return true;
if (HolyInWhitePvE.CanUse(out act, skipCastingCheck: true, skipAoeCheck: true) && Paint > 0) return true;
if (!CreatureMotifDrawn)
{
if (PomMotifPvE.CanUse(out act) && CreatureMotifPvE.AdjustedID == PomMotifPvE.ID) return true;
if (WingMotifPvE.CanUse(out act) && CreatureMotifPvE.AdjustedID == WingMotifPvE.ID) return true;
if (ClawMotifPvE.CanUse(out act) && CreatureMotifPvE.AdjustedID == ClawMotifPvE.ID) return true;
if (MawMotifPvE.CanUse(out act) && CreatureMotifPvE.AdjustedID == MawMotifPvE.ID) return true;
}
if (PomMotifPvE.CanUse(out act) && CreatureMotifPvE.AdjustedID == PomMotifPvE.ID) return true;
if (WingMotifPvE.CanUse(out act) && CreatureMotifPvE.AdjustedID == WingMotifPvE.ID) return true;
if (ClawMotifPvE.CanUse(out act) && CreatureMotifPvE.AdjustedID == ClawMotifPvE.ID) return true;
if (MawMotifPvE.CanUse(out act) && CreatureMotifPvE.AdjustedID == MawMotifPvE.ID) return true;
}
// some gcd priority
if (RainbowDripPvE.CanUse(out act, skipAoeCheck: true) && Player.HasStatus(true, StatusID.RainbowBright)) return true;
Expand All @@ -178,47 +182,38 @@ protected override bool GeneralGCD(out IAction? act)
if (CometInBlackPvE.CanUse(out act, skipCastingCheck: true, skipAoeCheck: true) && Paint > 0) return true;
}
if (StarPrismPvE.CanUse(out act, skipAoeCheck: true) && Player.HasStatus(true, StatusID.Starstruck)) return true;
if (HammerStampPvE.CanUse(out act, skipCastingCheck: true, skipAoeCheck: true) && Player.HasStatus(true, StatusID.HammerTime) && InCombat && burstTimingChecker) return true;
//Cast when not in fight
if (HammerStampPvE.CanUse(out act, skipCastingCheck: true, skipAoeCheck: true) && HasHammerTime && burstTimingChecker) return true;
//Cast when not in fight or no target available
if (!InCombat)
{
if (!CreatureMotifDrawn)
{
if (PomMotifPvE.CanUse(out act) && CreatureMotifPvE.AdjustedID == PomMotifPvE.ID) return true;
if (WingMotifPvE.CanUse(out act) && CreatureMotifPvE.AdjustedID == WingMotifPvE.ID) return true;
if (ClawMotifPvE.CanUse(out act) && CreatureMotifPvE.AdjustedID == ClawMotifPvE.ID) return true;
if (MawMotifPvE.CanUse(out act) && CreatureMotifPvE.AdjustedID == MawMotifPvE.ID) return true;
}
if (!WeaponMotifDrawn)
{
if (HammerMotifPvE.CanUse(out act)) return true;
}
if (!LandscapeMotifDrawn)
{
if (StarrySkyMotifPvE.CanUse(out act) && !Player.HasStatus(true, StatusID.Hyperphantasia)) return true;
}
if (PomMotifPvE.CanUse(out act) && CreatureMotifPvE.AdjustedID == PomMotifPvE.ID) return true;
if (WingMotifPvE.CanUse(out act) && CreatureMotifPvE.AdjustedID == WingMotifPvE.ID) return true;
if (ClawMotifPvE.CanUse(out act) && CreatureMotifPvE.AdjustedID == ClawMotifPvE.ID) return true;
if (MawMotifPvE.CanUse(out act) && CreatureMotifPvE.AdjustedID == MawMotifPvE.ID) return true;
if (HammerMotifPvE.CanUse(out act)) return true;
if (StarrySkyMotifPvE.CanUse(out act) && !Player.HasStatus(true, StatusID.Hyperphantasia)) return true;
if (RainbowDripPvE.CanUse(out act)) return true;
}
// timings for motif casting
if (!LandscapeMotifDrawn && ScenicMusePvE.Cooldown.RecastTimeRemainOneCharge <= 15 && !Player.HasStatus(true, StatusID.StarryMuse) && !Player.HasStatus(true, StatusID.Hyperphantasia))
if (ScenicMusePvE.Cooldown.RecastTimeRemainOneCharge <= 15 && !Player.HasStatus(true, StatusID.StarryMuse) && !Player.HasStatus(true, StatusID.Hyperphantasia))
{
if (StarrySkyMotifPvE.CanUse(out act) && !Player.HasStatus(true, StatusID.Hyperphantasia)) return true;
}
if (!CreatureMotifDrawn && (LivingMusePvE.Cooldown.HasOneCharge || LivingMusePvE.Cooldown.RecastTimeRemainOneCharge <= CreatureMotifPvE.Info.CastTime) && !Player.HasStatus(true, StatusID.StarryMuse) && !Player.HasStatus(true, StatusID.Hyperphantasia))
if ((LivingMusePvE.Cooldown.HasOneCharge || LivingMusePvE.Cooldown.RecastTimeRemainOneCharge <= CreatureMotifPvE.Info.CastTime * 1.7) && !Player.HasStatus(true, StatusID.StarryMuse) && !Player.HasStatus(true, StatusID.Hyperphantasia))
{
if (PomMotifPvE.CanUse(out act) && CreatureMotifPvE.AdjustedID == PomMotifPvE.ID) return true;
if (WingMotifPvE.CanUse(out act) && CreatureMotifPvE.AdjustedID == WingMotifPvE.ID) return true;
if (ClawMotifPvE.CanUse(out act) && CreatureMotifPvE.AdjustedID == ClawMotifPvE.ID) return true;
if (MawMotifPvE.CanUse(out act) && CreatureMotifPvE.AdjustedID == MawMotifPvE.ID) return true;
;
}
if (!WeaponMotifDrawn && !Player.HasStatus(true, StatusID.HammerTime) && (SteelMusePvE.Cooldown.HasOneCharge || SteelMusePvE.Cooldown.RecastTimeRemainOneCharge <= WeaponMotifPvE.Info.CastTime) && !Player.HasStatus(true, StatusID.StarryMuse) && !Player.HasStatus(true, StatusID.Hyperphantasia))
if ((SteelMusePvE.Cooldown.HasOneCharge || SteelMusePvE.Cooldown.RecastTimeRemainOneCharge <= WeaponMotifPvE.Info.CastTime) && !Player.HasStatus(true, StatusID.StarryMuse) && !Player.HasStatus(true, StatusID.Hyperphantasia))
{
if (HammerMotifPvE.CanUse(out act)) return true;
}
bool isMovingAndNoDraw = IsMoving && act != StarrySkyMotifPvE && act != PomMotifPvE && act != WingMotifPvE && act != ClawMotifPvE && act != MawMotifPvE && act != HammerMotifPvE && !Player.HasStatus(true, StatusID.Swiftcast);
bool isMovingAndSwift = IsMoving && !Player.HasStatus(true, StatusID.Swiftcast);
// white/black paint use while moving
if (isMovingAndNoDraw)
if (isMovingAndSwift)
{
if (HammerStampPvE.CanUse(out act, skipCastingCheck: true, skipAoeCheck: true) && burstTimingChecker) return true;
if (HolyCometMoving)
Expand All @@ -241,10 +236,10 @@ protected override bool GeneralGCD(out IAction? act)
if (StarrySkyMotifPvE.CanUse(out act, skipCastingCheck: landscape) && !Player.HasStatus(true, StatusID.Hyperphantasia) && landscape) return true;
}
//white paint over cap protection
if (Paint == HolyCometMax)
if ((Paint == HolyCometMax && !Player.HasStatus(true, StatusID.StarryMuse)) && (UseCapCometHoly || UseCapCometOnly))
{
if (CometInBlackPvE.CanUse(out act, skipCastingCheck: true, skipAoeCheck: true)) return true;
if (HolyInWhitePvE.CanUse(out act, skipCastingCheck: true, skipAoeCheck: true)) return true;
if (HolyInWhitePvE.CanUse(out act, skipCastingCheck: true, skipAoeCheck: true) && !UseCapCometOnly) return true;
}
//aoe sub
if (ThunderIiInMagentaPvE.CanUse(out act)) return true;
Expand Down

0 comments on commit 7a34753

Please sign in to comment.