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 #187 from FFXIV-CombatReborn/IcWaDev
Browse files Browse the repository at this point in the history
Update, clean up, changed settings, remodeled some logics for PCT
  • Loading branch information
IncognitoWater authored Aug 14, 2024
2 parents fddf5f7 + 85d7063 commit c3d9d03
Showing 1 changed file with 66 additions and 195 deletions.
261 changes: 66 additions & 195 deletions BasicRotations/Magical/ICWA_PCT_BETA.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,28 @@

namespace DefaultRotations.Magical;

[Rotation("IcWa_PCT_Beta", CombatType.PvE, GameVersion = "7.0", Description = "Kindly created and donated by Rabbs")]
[SourceCode(Path = "main/DefaultRotations/Magical/PCT_Default.cs")]
[Rotation("IcWa PCT BETA", CombatType.PvE, GameVersion = "7.05", Description = "Kindly created and donated by Rabbs and further update made by IcWa")]
[SourceCode(Path = "main/DefaultRotations/Magical/ICWA_PCT_BETA.cs")]
[Api(3)]
public sealed class IcWa_PCT_Beta : PictomancerRotation
public sealed class IcWaPctBeta : PictomancerRotation
{
public override MedicineType MedicineType => MedicineType.Intelligence;
public static IBaseAction RainbowPrePull { get; } = new BaseAction((ActionID)34688);

[RotationConfig(CombatType.PvE, Name = "Use HolyInWhite or CometInBlack while moving")]
public bool HolyCometMoving { get; set; } = true;

[RotationConfig(CombatType.PvE, Name = "Use swifcast on")]
[RotationConfig(CombatType.PvE, Name = "Use swifcast on (would advise weapon only - Creature can delay timings and f opener and reopener and landscape doesn't bring any bonus on dps.)")]
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 int HolyCometMax { get; set; } = 5;
public enum MotifSwift : byte
{

[Description("CreatureMotif")] CreatureMotif,

[Description("WeaponMotif")] WeaponMotif,

[Description("LandscapeMotif")] LandscapeMotif,

[Description("AllMotif")] AllMotif,

[Description("NoMotif(ManualSwifcast")]
NoMotif
[Description("NoMotif(ManualSwifcast")] NoMotif
}

#region Countdown logic
// Defines logic for actions to take during the countdown before combat starts.
protected override IAction? CountDownAction(float remainTime)
Expand Down Expand Up @@ -109,7 +102,6 @@ protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)
break;
}
}

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

Expand All @@ -133,52 +125,28 @@ protected override bool DefenseAreaAbility(IAction nextGCD, out IAction? act)
#region oGCD Logic
protected override bool AttackAbility(IAction nextGCD, out IAction? act)
{
if (SubtractivePalettePvE.CanUse(out act) && !Player.HasStatus(true, StatusID.SubtractivePalette)) return true;
if (Player.HasStatus(true, StatusID.StarryMuse))
{
if (Player.HasStatus(true, StatusID.SubtractiveSpectrum) && !Player.HasStatus(true, StatusID.SubtractivePalette))
{
if (SubtractivePalettePvE.CanUse(out act)) return true;
}

if (CreatureMotifDrawn)
{
if (FangedMusePvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true) && CreatureMotifDrawn && LivingMusePvE.AdjustedID == FangedMusePvE.ID) return true;
}

if (RetributionOfTheMadeenPvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true) && MadeenPortraitReady) return true;
if (FangedMusePvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true)) return true;
if (RetributionOfTheMadeenPvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true)) return true;
}

if (!Player.HasStatus(true, StatusID.SubtractivePalette) && (PaletteGauge >= 50 || Player.HasStatus(true, StatusID.SubtractiveSpectrum)) && SubtractivePalettePvE.CanUse(out act)) return true;

if (InCombat)
{
if (ScenicMusePvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true) && LandscapeMotifDrawn && CreatureMotifDrawn && CombatTime > 5) return true;
if (RetributionOfTheMadeenPvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true) && MadeenPortraitReady) return true;
if (MogOfTheAgesPvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true) && MooglePortraitReady) return true;
if (StrikingMusePvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true) && WeaponMotifDrawn) return true;
if (PomMusePvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true) && CreatureMotifDrawn && LivingMusePvE.AdjustedID == PomMusePvE.ID) return true;
if (WingedMusePvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true) && CreatureMotifDrawn && LivingMusePvE.AdjustedID == WingedMusePvE.ID) return true;
if (ClawedMusePvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true) && CreatureMotifDrawn && LivingMusePvE.AdjustedID == ClawedMusePvE.ID) return true;
}

if (ScenicMusePvE.CanUse(out act, skipCastingCheck: true, skipStatusProvideCheck: true, skipComboCheck: true, skipAoeCheck: true, usedUp: true) && CombatTime > 5) 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)) 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;
return base.AttackAbility(nextGCD, out act);
}
#endregion

#region GCD Logic
protected override bool MoveForwardGCD(out IAction? act)
{
act = null;

return base.MoveForwardGCD(out act);
}

protected override bool GeneralGCD(out IAction? act)
{
bool BurstTimingChecker = !ScenicMusePvE.Cooldown.WillHaveOneCharge(32) || Player.HasStatus(true, StatusID.StarryMuse);

bool IsTargetDying = HostileTarget?.IsDying() ?? false;

bool burstTimingChecker = !ScenicMusePvE.Cooldown.WillHaveOneCharge(32) || 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;
Expand All @@ -191,26 +159,15 @@ protected override bool GeneralGCD(out IAction? act)
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;
if (Player.HasStatus(true, StatusID.StarryMuse))
{
if (CometInBlackPvE.CanUse(out act, skipCastingCheck: true, skipAoeCheck: true) && Paint > 0 && Player.HasStatus(true, StatusID.MonochromeTones)) return true;
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;

// white/black paint use while moving
if (IsMoving)
{
if (HammerStampPvE.CanUse(out act, skipCastingCheck: true, skipAoeCheck: true) && Player.HasStatus(true, StatusID.HammerTime) && InCombat && BurstTimingChecker) return true;
if (HolyCometMoving)
{
if (CometInBlackPvE.CanUse(out act, skipCastingCheck: true, skipAoeCheck: true) && Paint > 0 && Player.HasStatus(true, StatusID.MonochromeTones)) return true;
if (HolyInWhitePvE.CanUse(out act, skipCastingCheck: true, skipAoeCheck: true) && Paint > 0) return true;
}
}

if (HammerStampPvE.CanUse(out act, skipCastingCheck: true, skipAoeCheck: true) && Player.HasStatus(true, StatusID.HammerTime) && InCombat && BurstTimingChecker) 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 (!InCombat)
{
if (!CreatureMotifDrawn)
Expand All @@ -228,103 +185,9 @@ protected override bool GeneralGCD(out IAction? act)
{
if (StarrySkyMotifPvE.CanUse(out act) && !Player.HasStatus(true, StatusID.Hyperphantasia)) return true;
}

if (RainbowDripPvE.CanUse(out act)) return true;
}

if (InCombat && !Player.HasStatus(true, StatusID.StarryMuse) && !Player.HasStatus(true, StatusID.Hyperphantasia) && !IsTargetDying && (HasSwift || !HasHostilesInMaxRange) && (!CreatureMotifDrawn || !WeaponMotifDrawn && !Player.HasStatus(true, StatusID.HammerTime) || !LandscapeMotifDrawn))
{
bool swiftmode = HasSwift || !SwiftcastPvE.Cooldown.IsCoolingDown;
switch (MotifSwiftCast)
{
case MotifSwift.CreatureMotif:
if (!CreatureMotifDrawn)
{
if (PomMotifPvE.CanUse(out act, skipCastingCheck: swiftmode) && CreatureMotifPvE.AdjustedID == PomMotifPvE.ID) return true;
if (WingMotifPvE.CanUse(out act, skipCastingCheck: swiftmode) && CreatureMotifPvE.AdjustedID == WingMotifPvE.ID) return true;
if (ClawMotifPvE.CanUse(out act, skipCastingCheck: swiftmode) && CreatureMotifPvE.AdjustedID == ClawMotifPvE.ID) return true;
if (MawMotifPvE.CanUse(out act, skipCastingCheck: swiftmode) && CreatureMotifPvE.AdjustedID == MawMotifPvE.ID) return true;
}
if (!WeaponMotifDrawn && !Player.HasStatus(true, StatusID.HammerTime))
{
if (HammerMotifPvE.CanUse(out act, skipCastingCheck: swiftmode) && CombatTime > 23) return true;
}
if (!LandscapeMotifDrawn)
{
if (StarrySkyMotifPvE.CanUse(out act, skipCastingCheck: swiftmode) && !Player.HasStatus(true, StatusID.Hyperphantasia)) return true;
}
break;
case MotifSwift.WeaponMotif:
if (!WeaponMotifDrawn && !Player.HasStatus(true, StatusID.HammerTime))
{
if (HammerMotifPvE.CanUse(out act, skipCastingCheck: swiftmode) && CombatTime > 23) return true;
}
if (!LandscapeMotifDrawn)
{
if (StarrySkyMotifPvE.CanUse(out act, skipCastingCheck: swiftmode) && !Player.HasStatus(true, StatusID.Hyperphantasia)) return true;
}
if (!CreatureMotifDrawn)
{
if (PomMotifPvE.CanUse(out act, skipCastingCheck: swiftmode) && CreatureMotifPvE.AdjustedID == PomMotifPvE.ID) return true;
if (WingMotifPvE.CanUse(out act, skipCastingCheck: swiftmode) && CreatureMotifPvE.AdjustedID == WingMotifPvE.ID) return true;
if (ClawMotifPvE.CanUse(out act, skipCastingCheck: swiftmode) && CreatureMotifPvE.AdjustedID == ClawMotifPvE.ID) return true;
if (MawMotifPvE.CanUse(out act, skipCastingCheck: swiftmode) && CreatureMotifPvE.AdjustedID == MawMotifPvE.ID) return true;
}
break;
case MotifSwift.LandscapeMotif:
if (!LandscapeMotifDrawn)
{
if (StarrySkyMotifPvE.CanUse(out act, skipCastingCheck: swiftmode) && !Player.HasStatus(true, StatusID.Hyperphantasia)) return true;
}
if (!WeaponMotifDrawn && !Player.HasStatus(true, StatusID.HammerTime))
{
if (HammerMotifPvE.CanUse(out act, skipCastingCheck: swiftmode) && CombatTime > 23) return true;
}
if (!CreatureMotifDrawn)
{
if (PomMotifPvE.CanUse(out act, skipCastingCheck: swiftmode) && CreatureMotifPvE.AdjustedID == PomMotifPvE.ID) return true;
if (WingMotifPvE.CanUse(out act, skipCastingCheck: swiftmode) && CreatureMotifPvE.AdjustedID == WingMotifPvE.ID) return true;
if (ClawMotifPvE.CanUse(out act, skipCastingCheck: swiftmode) && CreatureMotifPvE.AdjustedID == ClawMotifPvE.ID) return true;
if (MawMotifPvE.CanUse(out act, skipCastingCheck: swiftmode) && CreatureMotifPvE.AdjustedID == MawMotifPvE.ID) return true;
}
break;
case MotifSwift.AllMotif:
if (!CreatureMotifDrawn)
{
if (PomMotifPvE.CanUse(out act, skipCastingCheck: swiftmode) && CreatureMotifPvE.AdjustedID == PomMotifPvE.ID) return true;
if (WingMotifPvE.CanUse(out act, skipCastingCheck: swiftmode) && CreatureMotifPvE.AdjustedID == WingMotifPvE.ID) return true;
if (ClawMotifPvE.CanUse(out act, skipCastingCheck: swiftmode) && CreatureMotifPvE.AdjustedID == ClawMotifPvE.ID) return true;
if (MawMotifPvE.CanUse(out act, skipCastingCheck: swiftmode) && CreatureMotifPvE.AdjustedID == MawMotifPvE.ID) return true;
}
if (!WeaponMotifDrawn && !Player.HasStatus(true, StatusID.HammerTime))
{
if (HammerMotifPvE.CanUse(out act, skipCastingCheck: swiftmode) && CombatTime > 23) return true;
}
if (!LandscapeMotifDrawn)
{
if (StarrySkyMotifPvE.CanUse(out act, skipCastingCheck: swiftmode) && !Player.HasStatus(true, StatusID.Hyperphantasia)) return true;
}
break;
case MotifSwift.NoMotif:
if (!LandscapeMotifDrawn)
{
if (StarrySkyMotifPvE.CanUse(out act) && !Player.HasStatus(true, StatusID.Hyperphantasia)) return true;
}
if (!WeaponMotifDrawn && !Player.HasStatus(true, StatusID.HammerTime))
{
if (HammerMotifPvE.CanUse(out act) && CombatTime > 23) 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;
}
break;
}
}

// timings for motif casting
if (!LandscapeMotifDrawn && 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;
Expand All @@ -341,45 +204,53 @@ protected override bool GeneralGCD(out IAction? act)
{
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);
// white/black paint use while moving
if (isMovingAndNoDraw)
{
if (HammerStampPvE.CanUse(out act, skipCastingCheck: true, skipAoeCheck: true) && burstTimingChecker) return true;
if (HolyCometMoving)
{
if (CometInBlackPvE.CanUse(out act, skipCastingCheck: true, skipAoeCheck: true)) return true;
if (HolyInWhitePvE.CanUse(out act, skipCastingCheck: true, skipAoeCheck: true)) return true;
}
}
// When in swift management
if (Player.HasStatus(true, StatusID.Swiftcast) && (!LandscapeMotifDrawn || !CreatureMotifDrawn || !WeaponMotifDrawn))
{
bool creature = MotifSwiftCast is MotifSwift.CreatureMotif or MotifSwift.AllMotif;
bool weapon = MotifSwiftCast is MotifSwift.WeaponMotif or MotifSwift.AllMotif;
bool landscape = MotifSwiftCast is MotifSwift.LandscapeMotif or MotifSwift.AllMotif;
if (PomMotifPvE.CanUse(out act, skipCastingCheck: creature) && CreatureMotifPvE.AdjustedID == PomMotifPvE.ID && creature) return true;
if (WingMotifPvE.CanUse(out act, skipCastingCheck: creature) && CreatureMotifPvE.AdjustedID == WingMotifPvE.ID && creature) return true;
if (ClawMotifPvE.CanUse(out act, skipCastingCheck: creature) && CreatureMotifPvE.AdjustedID == ClawMotifPvE.ID && creature) return true;
if (MawMotifPvE.CanUse(out act, skipCastingCheck: creature) && CreatureMotifPvE.AdjustedID == MawMotifPvE.ID && creature) return true;
if (HammerMotifPvE.CanUse(out act, skipCastingCheck: weapon) && weapon) return true;
if (StarrySkyMotifPvE.CanUse(out act, skipCastingCheck: landscape) && !Player.HasStatus(true, StatusID.Hyperphantasia) && landscape) return true;
}
//white paint over cap protection
if (Paint == 5)
if (Paint == HolyCometMax)
{
if (CometInBlackPvE.CanUse(out act, skipCastingCheck: true, skipAoeCheck: true) && Paint > 0 && Player.HasStatus(true, StatusID.MonochromeTones)) return true;
if (HolyInWhitePvE.CanUse(out act, skipCastingCheck: true, skipAoeCheck: true) && Paint > 0) return true;
if (CometInBlackPvE.CanUse(out act, skipCastingCheck: true, skipAoeCheck: true)) return true;
if (HolyInWhitePvE.CanUse(out act, skipCastingCheck: true, skipAoeCheck: true)) return true;
}
//aoe
//
if (ThunderIiInMagentaPvE.CanUse(out act) && Player.HasStatus(true, StatusID.SubtractivePalette) && Player.HasStatus(true, StatusID.AetherhuesIi)) return true;
if (StoneIiInYellowPvE.CanUse(out act) && Player.HasStatus(true, StatusID.SubtractivePalette) && Player.HasStatus(true, StatusID.Aetherhues)) return true;
if (BlizzardIiInCyanPvE.CanUse(out act) && Player.HasStatus(true, StatusID.SubtractivePalette)) return true;


if (WaterIiInBluePvE.CanUse(out act) && Player.HasStatus(true, StatusID.AetherhuesIi)) return true;
if (AeroIiInGreenPvE.CanUse(out act) && Player.HasStatus(true, StatusID.Aetherhues)) return true;
//aoe sub
if (ThunderIiInMagentaPvE.CanUse(out act)) return true;
if (StoneIiInYellowPvE.CanUse(out act)) return true;
if (BlizzardIiInCyanPvE.CanUse(out act)) return true;
//aoe normal
if (WaterIiInBluePvE.CanUse(out act)) return true;
if (AeroIiInGreenPvE.CanUse(out act)) return true;
if (FireIiInRedPvE.CanUse(out act)) return true;

//single target
//

if (ThunderInMagentaPvE.CanUse(out act) && Player.HasStatus(true, StatusID.SubtractivePalette) && Player.HasStatus(true, StatusID.AetherhuesIi)) return true;
if (StoneInYellowPvE.CanUse(out act) && Player.HasStatus(true, StatusID.SubtractivePalette) && Player.HasStatus(true, StatusID.Aetherhues)) return true;
if (BlizzardInCyanPvE.CanUse(out act) && Player.HasStatus(true, StatusID.SubtractivePalette)) return true;


if (WaterInBluePvE.CanUse(out act) && Player.HasStatus(true, StatusID.AetherhuesIi)) return true;
if (AeroInGreenPvE.CanUse(out act) && Player.HasStatus(true, StatusID.Aetherhues)) return true;
//single target sub
if (ThunderInMagentaPvE.CanUse(out act)) return true;
if (StoneInYellowPvE.CanUse(out act)) return true;
if (BlizzardInCyanPvE.CanUse(out act)) return true;
//single target normal
if (WaterInBluePvE.CanUse(out act)) return true;
if (AeroInGreenPvE.CanUse(out act)) return true;
if (FireInRedPvE.CanUse(out act)) return true;

return base.GeneralGCD(out act);
}

private bool AttackGCD(out IAction? act, bool burst)
{
act = null;

return false;
}
#endregion

}

0 comments on commit c3d9d03

Please sign in to comment.