Skip to content

Commit b94cbca

Browse files
authored
Merge pull request #860 from FFXIV-CombatReborn/evenmoreninja
Added alt Mudra actions to base
2 parents 3f34bfa + 9852672 commit b94cbca

File tree

2 files changed

+92
-57
lines changed

2 files changed

+92
-57
lines changed

BasicRotations/Melee/NIN_Default.cs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public override void DisplayStatus()
5656
// Logic to determine the action to take during the countdown phase before combat starts.
5757
protected override IAction? CountDownAction(float remainTime)
5858
{
59-
bool realInHuton = IsLastAction(false, HutonPvE);
59+
_ = IsLastAction(false, HutonPvE);
6060
// Clears ninjutsu setup if countdown is more than 6 seconds or if Suiton is the aim but shouldn't be.
6161
if (remainTime > 6)
6262
{
@@ -113,8 +113,8 @@ protected override bool EmergencyAbility(IAction nextGCD, out IAction? act)
113113

114114
// If the last action performed matches any of a list of specific actions, it clears the Ninjutsu aim.
115115
// This serves as a reset/cleanup mechanism to ensure the decision logic starts fresh for the next cycle.
116-
if (IsLastAction(true, NinjutsuPvE, RaitonPvE)
117-
|| (Player.HasStatus(true, StatusID.ShadowWalker) && (_ninActionAim == SuitonPvE || _ninActionAim == HutonPvE))
116+
if (IsLastAction(false, FumaShurikenPvE, KatonPvE, RaitonPvE, HyotonPvE, DotonPvE, SuitonPvE)
117+
|| (IsShadowWalking && (_ninActionAim == SuitonPvE || _ninActionAim == HutonPvE))
118118
|| (_ninActionAim == GokaMekkyakuPvE && IsLastGCD(false, GokaMekkyakuPvE))
119119
|| (_ninActionAim == HyoshoRanryuPvE && IsLastGCD(false, HyoshoRanryuPvE))
120120
|| (_ninActionAim == GokaMekkyakuPvE && !HasKassatsu)
@@ -354,7 +354,7 @@ private bool ChoiceNinjutsu(out IAction? act)
354354
return false;
355355
}
356356
}
357-
else if (TenPvE.CanUse(out _, usedUp: ShadowWalkerNeeded || InTrickAttack || TenPvE.Cooldown.WillHaveXChargesGCD(2, 2, 0)))
357+
else if (TenPvE.CanUse(out _, usedUp: ShadowWalkerNeeded || InTrickAttack || TenPvE.Cooldown.WillHaveXChargesGCD(2, 2, 0)) && _ninActionAim == null)
358358
{
359359
// Chooses buffs or AoE actions based on combat conditions and cooldowns.
360360
// For instance, setting Huton for speed buff or choosing AoE Ninjutsu like Katon or Doton based on enemy positioning.
@@ -519,15 +519,15 @@ private bool DoHyoshoRanryu(out IAction? act)
519519
}
520520
}
521521
//Second
522-
else if (FumaShurikenCurrent && !IsLastAction(false, JinPvE_18807))
522+
else if (FumaShurikenCurrent)
523523
{
524524
if (JinPvE_18807.CanUse(out act, usedUp: true))
525525
{
526526
return true;
527527
}
528528
}
529529
//First
530-
else if (NoActiveNinjutsu && !IsLastAction(false, ChiPvE_18806))
530+
else if (NoActiveNinjutsu)
531531
{
532532
if (ChiPvE_18806.CanUse(out act, usedUp: true))
533533
{
@@ -565,15 +565,15 @@ private bool DoGokaMekkyaku(out IAction? act)
565565
}
566566
}
567567
//Second
568-
else if (FumaShurikenCurrent && !IsLastAction(false, TenPvE_18805))
568+
else if (FumaShurikenCurrent)
569569
{
570570
if (TenPvE_18805.CanUse(out act, usedUp: true))
571571
{
572572
return true;
573573
}
574574
}
575575
//First
576-
else if (NoActiveNinjutsu && !IsLastAction(false, ChiPvE_18806))
576+
else if (NoActiveNinjutsu)
577577
{
578578
if (ChiPvE_18806.CanUse(out act, usedUp: true))
579579
{
@@ -611,23 +611,23 @@ private bool DoSuiton(out IAction? act)
611611
}
612612
}
613613
//Third
614-
else if (RaitonCurrent && !IsLastAction(false, JinPvE_18807))
614+
else if (RaitonCurrent)
615615
{
616616
if (JinPvE_18807.CanUse(out act, usedUp: true))
617617
{
618618
return true;
619619
}
620620
}
621621
//Second
622-
else if (FumaShurikenCurrent && !IsLastAction(false, ChiPvE_18806))
622+
else if (FumaShurikenCurrent)
623623
{
624624
if (ChiPvE_18806.CanUse(out act, usedUp: true))
625625
{
626626
return true;
627627
}
628628
}
629629
//First
630-
else if (NoActiveNinjutsu && !IsLastAction(false, TenPvE))
630+
else if (NoActiveNinjutsu)
631631
{
632632
if (TenPvE.CanUse(out act, usedUp: true))
633633
{
@@ -665,23 +665,23 @@ private bool DoDoton(out IAction? act)
665665
}
666666
}
667667
//Third
668-
else if (HyotonCurrent && !IsLastAction(false, ChiPvE_18806))
668+
else if (HyotonCurrent)
669669
{
670670
if (ChiPvE_18806.CanUse(out act, usedUp: true))
671671
{
672672
return true;
673673
}
674674
}
675675
//Second
676-
else if (FumaShurikenCurrent && !IsLastAction(false, JinPvE_18807))
676+
else if (FumaShurikenCurrent)
677677
{
678678
if (JinPvE_18807.CanUse(out act, usedUp: true))
679679
{
680680
return true;
681681
}
682682
}
683683
//First
684-
else if (NoActiveNinjutsu && !IsLastAction(false, TenPvE))
684+
else if (NoActiveNinjutsu)
685685
{
686686
if (TenPvE.CanUse(out act, usedUp: true))
687687
{
@@ -719,23 +719,23 @@ private bool DoHuton(out IAction? act)
719719
}
720720
}
721721
//Third
722-
else if (HyotonCurrent && !IsLastAction(false, TenPvE_18805))
722+
else if (HyotonCurrent)
723723
{
724724
if (TenPvE_18805.CanUse(out act, usedUp: true))
725725
{
726726
return true;
727727
}
728728
}
729729
//Second
730-
else if (FumaShurikenCurrent && !IsLastAction(false, JinPvE_18807))
730+
else if (FumaShurikenCurrent)
731731
{
732732
if (JinPvE_18807.CanUse(out act, usedUp: true))
733733
{
734734
return true;
735735
}
736736
}
737737
//First
738-
else if (NoActiveNinjutsu && !IsLastAction(false, ChiPvE))
738+
else if (NoActiveNinjutsu)
739739
{
740740
if (ChiPvE.CanUse(out act, usedUp: true))
741741
{
@@ -773,15 +773,15 @@ private bool DoHyoton(out IAction? act)
773773
}
774774
}
775775
//Second
776-
else if (FumaShurikenCurrent && !IsLastAction(false, JinPvE_18807))
776+
else if (FumaShurikenCurrent)
777777
{
778778
if (JinPvE_18807.CanUse(out act, usedUp: true))
779779
{
780780
return true;
781781
}
782782
}
783783
//First
784-
else if (NoActiveNinjutsu && !IsLastAction(false, ChiPvE))
784+
else if (NoActiveNinjutsu)
785785
{
786786
if (ChiPvE.CanUse(out act, usedUp: true))
787787
{
@@ -819,15 +819,15 @@ private bool DoRaiton(out IAction? act)
819819
}
820820
}
821821
//Second
822-
else if (FumaShurikenCurrent && !IsLastAction(false, ChiPvE_18806))
822+
else if (FumaShurikenCurrent)
823823
{
824824
if (ChiPvE_18806.CanUse(out act, usedUp: true))
825825
{
826826
return true;
827827
}
828828
}
829829
//First
830-
else if (NoActiveNinjutsu && !IsLastAction(false, TenPvE))
830+
else if (NoActiveNinjutsu)
831831
{
832832
if (TenPvE.CanUse(out act, usedUp: true))
833833
{
@@ -865,15 +865,15 @@ private bool DoKaton(out IAction? act)
865865
}
866866
}
867867
//Second
868-
else if (FumaShurikenCurrent && !IsLastAction(false, TenPvE_18805))
868+
else if (FumaShurikenCurrent)
869869
{
870870
if (TenPvE_18805.CanUse(out act, usedUp: true))
871871
{
872872
return true;
873873
}
874874
}
875875
//First
876-
else if (NoActiveNinjutsu && !IsLastAction(false, ChiPvE))
876+
else if (NoActiveNinjutsu)
877877
{
878878
if (ChiPvE.CanUse(out act, usedUp: true))
879879
{
@@ -911,7 +911,7 @@ private bool DoFumaShuriken(out IAction? act)
911911
}
912912
}
913913
//First
914-
else if (NoActiveNinjutsu && !IsLastAction(false, TenPvE))
914+
else if (NoActiveNinjutsu)
915915
{
916916
if (TenPvE.CanUse(out act, usedUp: true))
917917
{

RotationSolver.Basic/Rotations/Basic/NinjaRotation.cs

Lines changed: 68 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,74 @@ public override void DisplayStatus()
192192
}
193193
#endregion
194194

195+
#region Mudra
196+
static partial void ModifyTenPvE(ref ActionSetting setting)
197+
{
198+
setting.ActionCheck = () => !RabbitMediumPvEActive && !IsLastAction(ActionID.TenPvE, ActionID.TenPvE_18805);
199+
setting.UnlockedByQuestID = 65748;
200+
setting.IsFriendly = true;
201+
setting.CreateConfig = () => new ActionConfig()
202+
{
203+
ShouldCheckStatus = false,
204+
};
205+
}
206+
207+
static partial void ModifyTenPvE_18805(ref ActionSetting setting)
208+
{
209+
setting.ActionCheck = () => !RabbitMediumPvEActive && !IsLastAction(ActionID.TenPvE, ActionID.TenPvE_18805);
210+
setting.UnlockedByQuestID = 65748;
211+
setting.IsFriendly = true;
212+
setting.CreateConfig = () => new ActionConfig()
213+
{
214+
ShouldCheckStatus = false,
215+
};
216+
}
217+
218+
static partial void ModifyChiPvE(ref ActionSetting setting)
219+
{
220+
setting.ActionCheck = () => !RabbitMediumPvEActive && !IsLastAction(ActionID.ChiPvE, ActionID.ChiPvE_18806);
221+
setting.UnlockedByQuestID = 65750;
222+
setting.IsFriendly = true;
223+
setting.CreateConfig = () => new ActionConfig()
224+
{
225+
ShouldCheckStatus = false,
226+
};
227+
}
228+
229+
static partial void ModifyChiPvE_18806(ref ActionSetting setting)
230+
{
231+
setting.ActionCheck = () => !RabbitMediumPvEActive && !IsLastAction(ActionID.ChiPvE, ActionID.ChiPvE_18806);
232+
setting.UnlockedByQuestID = 65750;
233+
setting.IsFriendly = true;
234+
setting.CreateConfig = () => new ActionConfig()
235+
{
236+
ShouldCheckStatus = false,
237+
};
238+
}
239+
240+
static partial void ModifyJinPvE(ref ActionSetting setting)
241+
{
242+
setting.ActionCheck = () => !RabbitMediumPvEActive && !IsLastAction(ActionID.JinPvE, ActionID.JinPvE_18807);
243+
setting.UnlockedByQuestID = 65768;
244+
setting.IsFriendly = true;
245+
setting.CreateConfig = () => new ActionConfig()
246+
{
247+
ShouldCheckStatus = false,
248+
};
249+
}
250+
251+
static partial void ModifyJinPvE_18807(ref ActionSetting setting)
252+
{
253+
setting.ActionCheck = () => !RabbitMediumPvEActive && !IsLastAction(ActionID.JinPvE, ActionID.JinPvE_18807);
254+
setting.UnlockedByQuestID = 65768;
255+
setting.IsFriendly = true;
256+
setting.CreateConfig = () => new ActionConfig()
257+
{
258+
ShouldCheckStatus = false,
259+
};
260+
}
261+
#endregion
262+
195263
#region PvE Actions
196264

197265
static partial void ModifyRabbitMediumPvE(ref ActionSetting setting)
@@ -248,31 +316,11 @@ static partial void ModifyTrickAttackPvE(ref ActionSetting setting)
248316
};
249317
}
250318

251-
static partial void ModifyTenPvE(ref ActionSetting setting)
252-
{
253-
setting.UnlockedByQuestID = 65748;
254-
setting.IsFriendly = true;
255-
setting.CreateConfig = () => new ActionConfig()
256-
{
257-
ShouldCheckStatus = false,
258-
};
259-
}
260-
261319
static partial void ModifyNinjutsuPvE(ref ActionSetting setting)
262320
{
263321

264322
}
265323

266-
static partial void ModifyChiPvE(ref ActionSetting setting)
267-
{
268-
setting.UnlockedByQuestID = 65750;
269-
setting.IsFriendly = true;
270-
setting.CreateConfig = () => new ActionConfig()
271-
{
272-
ShouldCheckStatus = false,
273-
};
274-
}
275-
276324
static partial void ModifyDeathBlossomPvE(ref ActionSetting setting)
277325
{
278326
setting.CreateConfig = () => new ActionConfig()
@@ -292,16 +340,6 @@ static partial void ModifyShukuchiPvE(ref ActionSetting setting)
292340
setting.UnlockedByQuestID = 65752;
293341
}
294342

295-
static partial void ModifyJinPvE(ref ActionSetting setting)
296-
{
297-
setting.UnlockedByQuestID = 65768;
298-
setting.IsFriendly = true;
299-
setting.CreateConfig = () => new ActionConfig()
300-
{
301-
ShouldCheckStatus = false,
302-
};
303-
}
304-
305343
static partial void ModifyKassatsuPvE(ref ActionSetting setting)
306344
{
307345
setting.StatusProvide = [StatusID.Kassatsu];
@@ -350,9 +388,6 @@ static partial void ModifyDokumoriPvE(ref ActionSetting setting)
350388
setting.CreateConfig = () => new ActionConfig()
351389
{
352390
TimeToKill = 10,
353-
};
354-
setting.CreateConfig = () => new ActionConfig()
355-
{
356391
AoeCount = 1,
357392
};
358393
}

0 commit comments

Comments
 (0)