Skip to content

Commit

Permalink
Requested Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Akechi-kun committed Feb 20, 2025
1 parent 0284898 commit 5e154b1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 152 deletions.
24 changes: 1 addition & 23 deletions BossMod/Autorotation/Utility/ClassDNCUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

public sealed class ClassDNCUtility(RotationModuleManager manager, Actor player) : RoleRangedUtility(manager, player)
{
public enum Track { CuringWaltz = SharedTrack.Count, ShieldSamba, Improvisation, EnAvant }
public enum Track { CuringWaltz = SharedTrack.Count, ShieldSamba, Improvisation }
public enum SambaOption { None, Use87, Use87IfNotActive, Use88, Use88IfNotActive }
public enum EnAvantStrategy { None, CharacterForward, CharacterBackward, CameraForward, CameraBackward }

public static readonly ActionID IDLimitBreak3 = ActionID.MakeSpell(DNC.AID.CrimsonLotus);

Expand All @@ -25,14 +24,6 @@ public static RotationModuleDefinition Definition()

DefineSimpleConfig(res, Track.Improvisation, "Improvisation", "Improv", 300, DNC.AID.Improvisation, 15);

res.Define(Track.EnAvant).As<EnAvantStrategy>("En Avant", "EnAvant", 30)
.AddOption(EnAvantStrategy.None, "None", "No use.", 0, 0, ActionTargets.Self, 50)
.AddOption(EnAvantStrategy.CharacterForward, "CharacterForward", "Dashes in the Forward direction relative to the Character", 30, 0, ActionTargets.Self, 50)
.AddOption(EnAvantStrategy.CharacterBackward, "CharacterBackward", "Dashes in the Backward direction relative to the Character", 30, 0, ActionTargets.Self, 50)
.AddOption(EnAvantStrategy.CameraForward, "CameraForward", "Dashes in the Forward direction relative to the Camera", 30, 0, ActionTargets.Self, 50)
.AddOption(EnAvantStrategy.CameraBackward, "CameraBackward", "Dashes in the Backward direction relative to the Camera", 30, 0, ActionTargets.Self, 50)
.AddAssociatedActions(DNC.AID.EnAvant);

return res;
}

Expand All @@ -53,18 +44,5 @@ public override void Execute(StrategyValues strategy, ref Actor? primaryTarget,
};
if (wantSamba)
Hints.ActionsToExecute.Push(ActionID.MakeSpell(DNC.AID.ShieldSamba), Player, samba.Priority(), samba.Value.ExpireIn);

var ea = strategy.Option(Track.EnAvant);
if (ea.As<EnAvantStrategy>() != EnAvantStrategy.None)
{
var angle = ea.As<EnAvantStrategy>() switch
{
EnAvantStrategy.CharacterBackward => Player.Rotation + 180.Degrees(),
EnAvantStrategy.CameraForward => World.Client.CameraAzimuth + 180.Degrees(),
EnAvantStrategy.CameraBackward => World.Client.CameraAzimuth,
_ => Player.Rotation
};
Hints.ActionsToExecute.Push(ActionID.MakeSpell(DNC.AID.EnAvant), Player, ea.Priority(), ea.Value.ExpireIn, facingAngle: angle);
}
}
}
24 changes: 1 addition & 23 deletions BossMod/Autorotation/Utility/ClassDRGUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

public sealed class ClassDRGUtility(RotationModuleManager manager, Actor player) : RoleMeleeUtility(manager, player)
{
public enum Track { WingedGlide = SharedTrack.Count, ElusiveJump }
public enum Track { WingedGlide = SharedTrack.Count }
public enum DashStrategy { None, GapClose, GapCloseHold1 }
public enum ElusiveStrategy { None, CharacterForward, CharacterBackward, CameraForward, CameraBackward }

public static readonly ActionID IDLimitBreak3 = ActionID.MakeSpell(DRG.AID.DragonsongDive);

Expand All @@ -19,34 +18,13 @@ public static RotationModuleDefinition Definition()
.AddOption(DashStrategy.GapCloseHold1, "GapCloseHold1", "Use as gapcloser if outside melee range; conserves 1 charge for manual usage", 60, 0, ActionTargets.Hostile, 84)
.AddAssociatedActions(DRG.AID.WingedGlide);

res.Define(Track.ElusiveJump).As<ElusiveStrategy>("Elusive Jump", "E.Jump", 30)
.AddOption(ElusiveStrategy.None, "None", "No use.", 0, 0, ActionTargets.Self, 35)
.AddOption(ElusiveStrategy.CharacterForward, "CharacterForward", "Dashes in the Forward direction relative to the Character", 30, 15, ActionTargets.Self, 35)
.AddOption(ElusiveStrategy.CharacterBackward, "CharacterBackward", "Dashes in the Backward direction relative to the Character", 30, 15, ActionTargets.Self, 35)
.AddOption(ElusiveStrategy.CameraForward, "CameraForward", "Dashes in the Forward direction relative to the Camera", 30, 15, ActionTargets.Self, 35)
.AddOption(ElusiveStrategy.CameraBackward, "CameraBackward", "Dashes in the Backward direction relative to the Camera", 30, 15, ActionTargets.Self, 35)
.AddAssociatedActions(DRG.AID.ElusiveJump);

return res;
}

public override void Execute(StrategyValues strategy, ref Actor? primaryTarget, float estimatedAnimLockDelay, bool isMoving)
{
ExecuteShared(strategy, IDLimitBreak3, primaryTarget);

var ej = strategy.Option(Track.ElusiveJump);
if (ej.As<ElusiveStrategy>() != ElusiveStrategy.None)
{
var angle = ej.As<ElusiveStrategy>() switch
{
ElusiveStrategy.CharacterForward => Player.Rotation + 180.Degrees(),
ElusiveStrategy.CameraBackward => World.Client.CameraAzimuth + 180.Degrees(),
ElusiveStrategy.CameraForward => World.Client.CameraAzimuth,
_ => Player.Rotation
};
Hints.ActionsToExecute.Push(ActionID.MakeSpell(DRG.AID.ElusiveJump), Player, ej.Priority(), ej.Value.ExpireIn, facingAngle: angle);
}

var dash = strategy.Option(Track.WingedGlide);
var dashStrategy = strategy.Option(Track.WingedGlide).As<DashStrategy>();
var dashTarget = ResolveTargetOverride(dash.Value) ?? primaryTarget; //Smart-Targeting
Expand Down
23 changes: 1 addition & 22 deletions BossMod/Autorotation/Utility/ClassPCTUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

public sealed class ClassPCTUtility(RotationModuleManager manager, Actor player) : RoleCasterUtility(manager, player)
{
public enum Track { TemperaCoat = SharedTrack.Count, Smudge }
public enum Track { TemperaCoat = SharedTrack.Count }
public enum TemperaCoatOption { None, CoatOnly, CoatGrassaASAP, CoatGrassaWhenever }
public enum SmudgeStrategy { None, CharacterForward, CharacterBackward, CameraForward, CameraBackward }

public static readonly ActionID IDLimitBreak3 = ActionID.MakeSpell(PCT.AID.ChromaticFantasy);

Expand All @@ -20,14 +19,6 @@ public static RotationModuleDefinition Definition()
.AddOption(TemperaCoatOption.CoatGrassaWhenever, "Tempera Coat + Grassa when available", "Use Tempera Coat + Tempera Grassa when weaving or not casting", 90, 10, ActionTargets.Self, 88)
.AddAssociatedActions(PCT.AID.TemperaCoat, PCT.AID.TemperaGrassa);

res.Define(Track.Smudge).As<SmudgeStrategy>("Smudge", uiPriority: 30)
.AddOption(SmudgeStrategy.None, "None", "Do not use automatically", 0, 0, ActionTargets.Self, 20)
.AddOption(SmudgeStrategy.CharacterForward, "CharacterForward", "Dashes in the Forward direction relative to the Character", 20, 5, ActionTargets.Self, 20)
.AddOption(SmudgeStrategy.CharacterBackward, "CharacterBackward", "Dashes in the Backward direction relative to the Character", 20, 5, ActionTargets.Self, 20)
.AddOption(SmudgeStrategy.CameraForward, "CameraForward", "Dashes in the Forward direction relative to the Camera", 20, 5, ActionTargets.Self, 20)
.AddOption(SmudgeStrategy.CameraBackward, "CameraBackward", "Dashes in the Backward direction relative to the Camera", 20, 5, ActionTargets.Self, 20)
.AddAssociatedActions(PCT.AID.Smudge);

return res;
}

Expand Down Expand Up @@ -63,17 +54,5 @@ public override void Execute(StrategyValues strategy, ref Actor? primaryTarget,
Hints.ActionsToExecute.Push(ActionID.MakeSpell(PCT.AID.TemperaGrassa), Player, tempera.Priority(), tempera.Value.ExpireIn);
}
}
var smuh = strategy.Option(Track.Smudge);
if (smuh.As<SmudgeStrategy>() != SmudgeStrategy.None)
{
var angle = smuh.As<SmudgeStrategy>() switch
{
SmudgeStrategy.CharacterBackward => Player.Rotation + 180.Degrees(),
SmudgeStrategy.CameraForward => World.Client.CameraAzimuth,
SmudgeStrategy.CameraBackward => World.Client.CameraAzimuth + 180.Degrees(),
_ => Player.Rotation
};
Hints.ActionsToExecute.Push(ActionID.MakeSpell(PCT.AID.Smudge), Player, smuh.Priority(), smuh.Value.ExpireIn, facingAngle: angle);
}
}
}
29 changes: 2 additions & 27 deletions BossMod/Autorotation/Utility/ClassPLDUtility.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
using static BossMod.Autorotation.ClassPCTUtility;

namespace BossMod.Autorotation;
namespace BossMod.Autorotation;

public sealed class ClassPLDUtility(RotationModuleManager manager, Actor player) : RoleTankUtility(manager, player)
{
public enum Track { Sheltron = SharedTrack.Count, Sentinel, Cover, Bulwark, DivineVeil, PassageOfArms, HallowedGround } //What we're tracking
public enum Track { Sheltron = SharedTrack.Count, Sentinel, Cover, Bulwark, DivineVeil, HallowedGround } //What we're tracking
public enum ShelOption { None, Sheltron, HolySheltron, Intervention } //Sheltron Options
public enum SentOption { None, Sentinel, Guardian } //Sentinel enhancement
public enum ArmsDirection { None, CharacterForward, CharacterBackward, CameraForward, CameraBackward }

public static readonly ActionID IDLimitBreak3 = ActionID.MakeSpell(PLD.AID.LastBastion); //LB
public static readonly ActionID IDStanceApply = ActionID.MakeSpell(PLD.AID.IronWill); //StanceOn
Expand Down Expand Up @@ -35,15 +32,6 @@ public static RotationModuleDefinition Definition()
DefineSimpleConfig(res, Track.Cover, "Cover", "", 320, PLD.AID.Cover, 12); //120s CD, 12s duration, -50 OathGauge cost
DefineSimpleConfig(res, Track.Bulwark, "Bulwark", "Bul", 450, PLD.AID.Bulwark, 10); //90s CD, 15s duration
DefineSimpleConfig(res, Track.DivineVeil, "DivineVeil", "Veil", 220, PLD.AID.DivineVeil, 30); //90s CD, 30s duration

res.Define(Track.PassageOfArms).As<ArmsDirection>("PassageOfArms", "PoA", 400) //PassageOfArms definition for CD plans
.AddOption(ArmsDirection.None, "None", "Do not use automatically")
.AddOption(ArmsDirection.CharacterForward, "CharacterForward", "Faces the Forward direction relative to the Character", 120, 18, ActionTargets.Self, 70)
.AddOption(ArmsDirection.CharacterBackward, "CharacterBackward", "Faces the Backward direction relative to the Character", 120, 18, ActionTargets.Self, 70)
.AddOption(ArmsDirection.CameraForward, "CameraForward", "Faces the Forward direction relative to the Camera", 120, 18, ActionTargets.Self, 70)
.AddOption(ArmsDirection.CameraBackward, "CameraBackward", "Faces the Backward direction relative to the Camera", 120, 18, ActionTargets.Self, 70)
.AddAssociatedActions(PLD.AID.PassageOfArms);

DefineSimpleConfig(res, Track.HallowedGround, "HallowedGround", "Inv", 400, PLD.AID.HallowedGround, 10); //420s CD, 10s duration

return res;
Expand Down Expand Up @@ -77,18 +65,5 @@ public override void Execute(StrategyValues strategy, ref Actor? primaryTarget,
};
if (sentAction != default)
Hints.ActionsToExecute.Push(ActionID.MakeSpell(sentAction), Player, sent.Priority(), sent.Value.ExpireIn); //Sentinel execution

var poa = strategy.Option(Track.PassageOfArms);
if (poa.As<ArmsDirection>() != ArmsDirection.None)
{
var angle = poa.As<ArmsDirection>() switch
{
ArmsDirection.CharacterBackward => Player.Rotation + 180.Degrees(),
ArmsDirection.CameraForward => World.Client.CameraAzimuth + 180.Degrees(),
ArmsDirection.CameraBackward => World.Client.CameraAzimuth,
_ => Player.Rotation
};
Hints.ActionsToExecute.Push(ActionID.MakeSpell(PLD.AID.PassageOfArms), Player, poa.Priority(), poa.Value.ExpireIn, facingAngle: angle);
}
}
}
58 changes: 1 addition & 57 deletions BossMod/Autorotation/Utility/ClassRPRUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

public sealed class ClassRPRUtility(RotationModuleManager manager, Actor player) : RoleMeleeUtility(manager, player)
{
public enum Track { ArcaneCrest = SharedTrack.Count, Ingress, Egress, Regress }
public enum IngressStrategy { None, CharacterForward, CharacterBackward, CameraForward, CameraBackward }
public enum EgressStrategy { None, CharacterForward, CharacterBackward, CameraForward, CameraBackward }
public enum RegressStrategy { None, Use }
public enum Track { ArcaneCrest = SharedTrack.Count }

public static readonly ActionID IDLimitBreak3 = ActionID.MakeSpell(RPR.AID.TheEnd);

Expand All @@ -16,65 +13,12 @@ public static RotationModuleDefinition Definition()

DefineSimpleConfig(res, Track.ArcaneCrest, "Crest", "", 600, RPR.AID.ArcaneCrest, 5);

res.Define(Track.Ingress).As<IngressStrategy>("Hell's Ingress", "Ingress", 30)
.AddOption(IngressStrategy.None, "None", "No use.", 0, 0, ActionTargets.Self, 20)
.AddOption(IngressStrategy.CharacterForward, "CharacterForward", "Dashes in the Forward direction relative to the Character", 20, 10, ActionTargets.Self, 20)
.AddOption(IngressStrategy.CharacterBackward, "CharacterBackward", "Dashes in the Backward direction relative to the Character", 20, 10, ActionTargets.Self, 20)
.AddOption(IngressStrategy.CameraForward, "CameraForward", "Dashes in the Forward direction relative to the Camera", 20, 10, ActionTargets.Self, 20)
.AddOption(IngressStrategy.CameraBackward, "CameraBackward", "Dashes in the Backward direction relative to the Camera", 20, 10, ActionTargets.Self, 20)
.AddAssociatedActions(RPR.AID.HellsIngress);

res.Define(Track.Egress).As<EgressStrategy>("Hell's Egress", "Egress", 30)
.AddOption(EgressStrategy.None, "None", "No use.", 0, 0, ActionTargets.Self, 20)
.AddOption(EgressStrategy.CharacterForward, "CharacterForward", "Dashes in the Forward direction relative to the Character", 20, 10, ActionTargets.Self, 20)
.AddOption(EgressStrategy.CharacterBackward, "CharacterBackward", "Dashes in the Backward direction relative to the Character", 20, 10, ActionTargets.Self, 20)
.AddOption(EgressStrategy.CameraForward, "CameraForward", "Dashes in the Forward direction relative to the Camera", 20, 10, ActionTargets.Self, 20)
.AddOption(EgressStrategy.CameraBackward, "CameraBackward", "Dashes in the Backward direction relative to the Camera", 20, 10, ActionTargets.Self, 20)
.AddAssociatedActions(RPR.AID.HellsEgress);

res.Define(Track.Regress).As<RegressStrategy>("Regress", "Regress", 30)
.AddOption(RegressStrategy.None, "None", "No use.", 0, 0, ActionTargets.Self, 74)
.AddOption(RegressStrategy.Use, "Use", "Use Regress", 0, 0, ActionTargets.Self, 74)
.AddAssociatedActions(RPR.AID.Regress);

return res;
}

public override void Execute(StrategyValues strategy, ref Actor? primaryTarget, float estimatedAnimLockDelay, bool isMoving)
{
ExecuteShared(strategy, IDLimitBreak3, primaryTarget);
ExecuteSimple(strategy.Option(Track.ArcaneCrest), RPR.AID.ArcaneCrest, Player);

var reg = strategy.Option(Track.Regress);
var regStrat = strategy.Option(Track.Regress).As<RegressStrategy>();
var zone = World.Actors.FirstOrDefault(x => x.OID == 0x4C3 && x.OwnerID == Player.InstanceID);
if (regStrat != RegressStrategy.None && Player.FindStatus(RPR.SID.Threshold) != null)
Hints.ActionsToExecute.Push(ActionID.MakeSpell(RPR.AID.Regress), Player, reg.Priority(), reg.Value.ExpireIn, targetPos: zone!.PosRot.XYZ());

var ing = strategy.Option(Track.Ingress);
if (ing.As<IngressStrategy>() != IngressStrategy.None && Player.FindStatus(RPR.SID.Threshold) == null)
{
var angle = ing.As<IngressStrategy>() switch
{
IngressStrategy.CharacterBackward => Player.Rotation + 180.Degrees(),
IngressStrategy.CameraForward => World.Client.CameraAzimuth + 180.Degrees(),
IngressStrategy.CameraBackward => World.Client.CameraAzimuth,
_ => Player.Rotation
};
Hints.ActionsToExecute.Push(ActionID.MakeSpell(RPR.AID.HellsIngress), Player, ing.Priority(), ing.Value.ExpireIn, facingAngle: angle);
}

var egg = strategy.Option(Track.Egress);
if (egg.As<EgressStrategy>() != EgressStrategy.None && Player.FindStatus(RPR.SID.Threshold) == null)
{
var angle = egg.As<EgressStrategy>() switch
{
EgressStrategy.CharacterForward => Player.Rotation + 180.Degrees(),
EgressStrategy.CameraBackward => World.Client.CameraAzimuth + 180.Degrees(),
EgressStrategy.CameraForward => World.Client.CameraAzimuth,
_ => Player.Rotation
};
Hints.ActionsToExecute.Push(ActionID.MakeSpell(RPR.AID.HellsEgress), Player, egg.Priority(), egg.Value.ExpireIn, facingAngle: angle);
}
}
}

0 comments on commit 5e154b1

Please sign in to comment.