Skip to content

Commit a967460

Browse files
authored
Merge pull request #834 from FFXIV-CombatReborn/statusCapXVPR
Update to DRG, NIN, VPR, and MCH. Added config for statusfull mobs.
2 parents eb3cba0 + 40a26ca commit a967460

File tree

7 files changed

+150
-69
lines changed

7 files changed

+150
-69
lines changed

BasicRotations/Melee/DRG_Default.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ protected override bool GeneralGCD(out IAction? act)
250250
return true;
251251
}
252252

253-
if (PiercingTalonPvE.CanUse(out act))
253+
if (!IsLastAction(true, WingedGlidePvE) && PiercingTalonPvE.CanUse(out act))
254254
{
255255
return true;
256256
}

BasicRotations/Melee/VPR_Default.cs

Lines changed: 95 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ protected override bool GeneralGCD(out IAction? act)
496496
}
497497
}
498498
//AOE Serpent Combo
499+
// aoe 3
499500
switch ((HasGrimHunter, HasGrimSkin))
500501
{
501502
case (true, _):
@@ -513,66 +514,113 @@ protected override bool GeneralGCD(out IAction? act)
513514
return true;
514515
break;
515516
}
516-
517-
if (HuntersBitePvE.CanUse(out act, skipAoeCheck: true))
518-
{
519-
return true;
520-
}
521-
522-
if (SwiftskinsBitePvE.CanUse(out act, skipAoeCheck: true))
517+
// aoe 2
518+
switch (HunterOrSwiftEndsFirst)
523519
{
524-
return true;
525-
}
526-
527-
if (ReavingMawPvE.CanUse(out act))
528-
{
529-
return true;
520+
case "Hunter":
521+
if (HuntersBitePvE.CanUse(out act))
522+
return true;
523+
break;
524+
case "Swift":
525+
if (SwiftskinsBitePvE.CanUse(out act))
526+
return true;
527+
break;
528+
case "Equal":
529+
case null:
530+
if (HuntersBitePvE.CanUse(out act))
531+
return true;
532+
if (SwiftskinsBitePvE.CanUse(out act))
533+
return true;
534+
break;
530535
}
531-
532-
if (SteelMawPvE.CanUse(out act))
536+
// aoe 1
537+
switch ((HasSteel, HasReavers))
533538
{
534-
return true;
539+
case (true, _):
540+
if (SteelMawPvE.CanUse(out act))
541+
return true;
542+
break;
543+
case (_, true):
544+
if (ReavingMawPvE.CanUse(out act))
545+
return true;
546+
break;
547+
case (false, false):
548+
if (ReavingMawPvE.CanUse(out act))
549+
return true;
550+
if (SteelMawPvE.CanUse(out act))
551+
return true;
552+
break;
535553
}
536554

537555
//Single Target Serpent Combo
538-
if (FlankstingStrikePvE.CanUse(out act))
539-
{
540-
return true;
541-
}
542-
543-
if (FlanksbaneFangPvE.CanUse(out act))
544-
{
545-
return true;
546-
}
547-
548-
if (HindstingStrikePvE.CanUse(out act))
549-
{
550-
return true;
551-
}
552-
553-
if (HindsbaneFangPvE.CanUse(out act))
556+
// st 3
557+
switch ((HasFlankstung, HasFlanksbane, HasHindstung, HasHindsbane))
554558
{
555-
return true;
556-
}
557-
558-
if (HuntersStingPvE.CanUse(out act))
559-
{
560-
return true;
561-
}
562-
563-
if (SwiftskinsStingPvE.CanUse(out act))
564-
{
565-
return true;
559+
case (true, _, _, _):
560+
if (HindsbaneFangPvE.CanUse(out act))
561+
return true;
562+
break;
563+
case (_, true, _, _):
564+
if (HindstingStrikePvE.CanUse(out act))
565+
return true;
566+
break;
567+
case (_, _, true, _):
568+
if (FlanksbaneFangPvE.CanUse(out act))
569+
return true;
570+
break;
571+
case (_, _, _, true):
572+
if (FlankstingStrikePvE.CanUse(out act))
573+
return true;
574+
break;
575+
case (false, false, false, false):
576+
if (HindsbaneFangPvE.CanUse(out act))
577+
return true;
578+
if (HindstingStrikePvE.CanUse(out act))
579+
return true;
580+
if (FlanksbaneFangPvE.CanUse(out act))
581+
return true;
582+
if (FlankstingStrikePvE.CanUse(out act))
583+
return true;
584+
break;
566585
}
567586

568-
if (ReavingFangsPvE.CanUse(out act))
587+
// st 2
588+
switch (HunterOrSwiftEndsFirst)
569589
{
570-
return true;
590+
case "Hunter":
591+
if (HuntersStingPvE.CanUse(out act))
592+
return true;
593+
break;
594+
case "Swift":
595+
if (SwiftskinsStingPvE.CanUse(out act))
596+
return true;
597+
break;
598+
case "Equal":
599+
case null:
600+
if (HuntersStingPvE.CanUse(out act))
601+
return true;
602+
if (SwiftskinsStingPvE.CanUse(out act))
603+
return true;
604+
break;
571605
}
572606

573-
if (SteelFangsPvE.CanUse(out act))
607+
// st 1
608+
switch ((HasSteel, HasReavers))
574609
{
575-
return true;
610+
case (true, _):
611+
if (SteelFangsPvE.CanUse(out act))
612+
return true;
613+
break;
614+
case (_, true):
615+
if (ReavingFangsPvE.CanUse(out act))
616+
return true;
617+
break;
618+
case (false, false):
619+
if (ReavingFangsPvE.CanUse(out act))
620+
return true;
621+
if (SteelFangsPvE.CanUse(out act))
622+
return true;
623+
break;
576624
}
577625

578626
//Ranged

BasicRotations/Ranged/MCH_Rework.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,21 +99,21 @@ protected override bool AttackAbility(IAction nextGCD, out IAction? act)
9999
{
100100
if (!WildfirePvE.EnoughLevel)
101101
{
102-
if (HyperchargePvE.CanUse(out act))
102+
if (HyperchargePvE.CanUse(out act, skipTTKCheck: true))
103103
{
104104
return true;
105105
}
106106
}
107107
if ((HasWildfire || (WildfirePvE.Cooldown.IsCoolingDown && Battery == 100)) && !FullMetalFieldPvE.EnoughLevel)
108108
{
109-
if (HyperchargePvE.CanUse(out act))
109+
if (HyperchargePvE.CanUse(out act, skipTTKCheck: true))
110110
{
111111
return true;
112112
}
113113
}
114114
if (HasWildfire && FullMetalFieldPvE.EnoughLevel && IsLastAction(false, FullMetalFieldPvE))
115115
{
116-
if (HyperchargePvE.CanUse(out act))
116+
if (HyperchargePvE.CanUse(out act, skipTTKCheck: true))
117117
{
118118
return true;
119119
}
@@ -352,7 +352,7 @@ private bool ToolChargeSoon(out IAction? act)
352352
}
353353
else
354354
{
355-
return HyperchargePvE.CanUse(out act);
355+
return HyperchargePvE.CanUse(out act, skipTTKCheck: true);
356356
}
357357
}
358358

@@ -419,7 +419,7 @@ private bool UseQueen(out IAction? act, IAction nextGCD)
419419
// Opener
420420
if (Battery == 60 && IsLastGCD(false, ExcavatorPvE) && CombatTime < 15)
421421
{
422-
if (RookAutoturretPvE.CanUse(out act))
422+
if (RookAutoturretPvE.CanUse(out act, skipTTKCheck: true))
423423
{
424424
return true;
425425
}
@@ -428,7 +428,7 @@ private bool UseQueen(out IAction? act, IAction nextGCD)
428428
// Only allow battery usage if the current transition matches the expected step
429429
if (foundStepPair)
430430
{
431-
if (RookAutoturretPvE.CanUse(out act))
431+
if (RookAutoturretPvE.CanUse(out act, skipTTKCheck: true))
432432
{
433433
return true;
434434
}
@@ -438,7 +438,7 @@ private bool UseQueen(out IAction? act, IAction nextGCD)
438438
if ((nextGCD.IsTheSameTo(false, CleanShotPvE, HeatedCleanShotPvE) && Battery > 90)
439439
|| (nextGCD.IsTheSameTo(false, HotShotPvE, AirAnchorPvE, ChainSawPvE, ExcavatorPvE) && Battery > 80))
440440
{
441-
if (RookAutoturretPvE.CanUse(out act))
441+
if (RookAutoturretPvE.CanUse(out act, skipTTKCheck: true))
442442
{
443443
return true;
444444
}

RotationSolver.Basic/Actions/ActionTargetInfo.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,11 @@ private readonly bool CheckStatus(IBattleChara battleChara, bool skipStatusProvi
251251
return false;
252252
}
253253

254+
if (Service.Config.Statuscap && battleChara != Player.Object && StatusHelper.IsStatusCapped(battleChara))
255+
{
256+
return false;
257+
}
258+
254259
if (!action.Config.ShouldCheckTargetStatus && !action.Config.ShouldCheckStatus)
255260
{
256261
return true;

RotationSolver.Basic/Configuration/Configs.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ public const string
5353
Filter = AutoActionUsage, Section = 3)]
5454
public AoEType AoEType { get; set; } = AoEType.Full;
5555

56+
[ConditionBool, UI("Ignore status application against mobs that are status capped.",
57+
Filter = AutoActionUsage, Section = 3)]
58+
private static readonly bool _statuscap = false;
59+
5660
[ConditionBool, UI("Don't attack new mobs by AoE. (Dangerous)", Description = "Never use any AoE action when this may attack mobs that are not hostile targets.",
5761
Filter = AutoActionUsage, Section = 3)]
5862
private static readonly bool _noNewHostiles = false;

RotationSolver.Basic/Helpers/StatusHelper.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,11 @@ public static bool HasApplyStatus(this IBattleChara battleChara, StatusID[] stat
436436
/// <param name="status"></param>
437437
public static void StatusOff(StatusID status)
438438
{
439+
if (!DataCenter.IsActivated())
440+
{
441+
return;
442+
}
443+
439444
if (!Player.Object.HasStatus(false, status))
440445
{
441446
return;

0 commit comments

Comments
 (0)