Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: fixed all rotations.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Feb 17, 2024
1 parent a93fff8 commit b713a6a
Show file tree
Hide file tree
Showing 19 changed files with 74 additions and 2,535 deletions.
7 changes: 7 additions & 0 deletions Resources/AnimationLockTime.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
"3543": 0.6,
"3545": 0.6,
"3546": 0.6,
"3547": 0.6,
"3549": 0.6,
"3550": 0.6,
"3551": 0.6,
Expand Down Expand Up @@ -380,6 +381,7 @@
"16510": 0.6,
"16511": 0.1,
"16514": 0.6,
"16516": 0.6,
"16524": 0.1,
"16525": 0.1,
"16526": 0.6,
Expand Down Expand Up @@ -505,6 +507,8 @@
"24387": 0.6,
"24388": 0.6,
"24389": 0.6,
"24390": 0.6,
"24391": 0.6,
"24392": 0.6,
"24393": 0.6,
"24394": 0.6,
Expand All @@ -528,6 +532,7 @@
"25753": 1.15,
"25754": 0.6,
"25755": 0.6,
"25756": 0.6,
"25757": 0.6,
"25758": 0.6,
"25759": 0.6,
Expand Down Expand Up @@ -622,7 +627,9 @@
"31929": 0.1,
"31930": 0.1,
"31931": 0.1,
"32068": 0.6,
"33041": 2.1,
"33218": 0.1,
"33336": 0.1,
"33337": 0.1,
"33341": 0.1,
Expand Down
2 changes: 1 addition & 1 deletion Resources/RotationSolverRecord.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ClickingCount": 61038,
"ClickingCount": 63002,
"SayingHelloCount": 13,
"SaidUsers": []
}
1 change: 1 addition & 0 deletions RotationSolver.Basic/Actions/ActionBasicInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using RotationSolver.Basic.Configuration;

namespace RotationSolver.Basic.Actions;

public struct ActionBasicInfo
{
internal static readonly uint[] ActionsNoNeedCasting =
Expand Down
1 change: 1 addition & 0 deletions RotationSolver.Basic/Actions/IBaseAction.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Action = Lumina.Excel.GeneratedSheets.Action;

namespace RotationSolver.Basic.Actions;

public interface IBaseAction : IAction
{
internal static TargetType? TargetOverride { get; set; } = null;
Expand Down
1 change: 0 additions & 1 deletion RotationSolver.Basic/Helpers/MarkingHelper.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using FFXIVClientStructs.FFXIV.Client.Game.UI;
using System;

namespace RotationSolver.Basic.Helpers;

Expand Down
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Helpers/ObjectHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ or 71344 //Major Quest

if (obj is BattleChara b && b.StatusList.Any(StatusHelper.IsPriority)) return true;

if (Service.Config.ChooseAttackMark && MarkingHelper.AttackSignTargets.Contains(obj.ObjectId)) return true;
if (Service.Config.ChooseAttackMark && MarkingHelper.AttackSignTargets.FirstOrDefault(id => id != GameObject.InvalidGameObjectId) == obj.ObjectId) return true;

return false;
}
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Helpers/StatusHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public static class StatusHelper

internal static StatusID[] TankStanceStatus { get; } =
[
StatusID.Grit, StatusID.RoyalGuard, StatusID.IronWill, StatusID.Defiance
StatusID.Grit, StatusID.RoyalGuard_1833, StatusID.IronWill, StatusID.Defiance
];

internal static StatusID[] NoNeedHealingStatus { get; } =
Expand Down
10 changes: 7 additions & 3 deletions RotationSolver.Basic/Rotations/Basic/DancerRotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,14 @@ static partial void ModifyStandardStepPvE(ref ActionSetting setting)
setting.StatusProvide = [StatusID.StandardStep, StatusID.TechnicalStep];
}

static partial void ModifyTechnicalStepPvE(ref ActionSetting setting)
{
setting.StatusNeed = [StatusID.StandardFinish];
}

static partial void ModifyDoubleTechnicalFinishPvE(ref ActionSetting setting)
{
setting.StatusProvide = [StatusID.StandardStep, StatusID.TechnicalStep];
setting.StatusNeed = [StatusID.StandardFinish];
setting.CreateConfig = () => new()
{
TimeToKill = 20,
Expand Down Expand Up @@ -195,7 +199,7 @@ protected bool DanceFinishGCD(out IAction? act, bool finishNow = false)
{
if (Player.HasStatus(true, StatusID.StandardStep) && CompletedSteps == 2)
{
if (StandardFinishPvE.CanUse(out act, skipAoeCheck: true))
if (DoubleStandardFinishPvE.CanUse(out act, skipAoeCheck: true))
{
return true;
}
Expand All @@ -209,7 +213,7 @@ protected bool DanceFinishGCD(out IAction? act, bool finishNow = false)

if (Player.HasStatus(true, StatusID.TechnicalStep) && CompletedSteps == 4)
{
if (TechnicalFinishPvE.CanUse(out act, skipAoeCheck: true))
if (QuadrupleTechnicalFinishPvE.CanUse(out act, skipAoeCheck: true))
{
return true;
}
Expand Down
9 changes: 8 additions & 1 deletion RotationSolver.Basic/Rotations/Basic/DarkKnightRotation.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace RotationSolver.Basic.Rotations.Basic;
using static Dalamud.Interface.Utility.Raii.ImRaii;

namespace RotationSolver.Basic.Rotations.Basic;

partial class DarkKnightRotation
{
Expand Down Expand Up @@ -89,6 +91,11 @@ static partial void ModifyStalwartSoulPvE(ref ActionSetting setting)
setting.StatusNeed = [StatusID.SaltedEarth];
}

static partial void ModifySaltAndDarknessPvE(ref ActionSetting setting)
{
setting.ActionCheck = () => Service.GetAdjustedActionId(ActionID.SaltedEarthPvE) == ActionID.SaltAndDarknessPvE;
}

static partial void ModifyShadowbringerPvE(ref ActionSetting setting)
{
setting.ActionCheck = () => !DarkSideEndAfterGCD();
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Rotations/Basic/PaladinRotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ partial class PaladinRotation

static partial void ModifyAtonementPvE(ref ActionSetting setting)
{
setting.StatusNeed = [StatusID.SwordOath];
setting.StatusNeed = [StatusID.SwordOath_1902];
}

static partial void ModifyShieldBashPvE(ref ActionSetting setting)
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Rotations/Basic/SummonerRotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ static partial void ModifySummonEmeraldPvE(ref ActionSetting setting)
static RandomDelay _carbuncleDelay = new (() => (2, 2));
static partial void ModifySummonCarbunclePvE(ref ActionSetting setting)
{
setting.ActionCheck = () => _carbuncleDelay.Delay(!DataCenter.HasPet && AttunmentTimeRaw == 0 && SummonTimeRaw == 0);
setting.ActionCheck = () => _carbuncleDelay.Delay(!DataCenter.HasPet && AttunmentTimeRaw == 0 && SummonTimeRaw == 0) && DataCenter.LastGCD is not ActionID.SummonCarbunclePvE;
}

static partial void ModifyGemshinePvE(ref ActionSetting setting)
Expand Down
6 changes: 2 additions & 4 deletions RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using RotationSolver.Basic.Configuration;

namespace RotationSolver.Basic.Rotations;
namespace RotationSolver.Basic.Rotations;

partial class CustomRotation
{
Expand Down Expand Up @@ -47,7 +45,7 @@ private bool Ability(IAction nextGCD, out IAction? act)
if (DataCenter.MergedStatus.HasFlag(AutoStatus.Positional) && role == JobRole.Melee
&& !(Player?.HasStatus(false, StatusHelper.NoPositionalStatus) ?? true))
{
if (TrueNorthPvE.CanUse(out act)) return true;
if (TrueNorthPvE.CanUse(out act, isEmpty: true)) return true;
}

IBaseAction.TargetOverride = TargetType.Heal;
Expand Down
4 changes: 3 additions & 1 deletion RotationSolver.GameData/Getters/Actions/ActionGetterBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Action = Lumina.Excel.GeneratedSheets.Action;

namespace RotationSolver.GameData.Getters.Actions;

internal abstract class ActionGetterBase(Lumina.GameData gameData)
: ExcelRowGetter<Action>(gameData)
{
Expand All @@ -19,11 +20,12 @@ protected override void BeforeCreating()

protected override bool AddToList(Action item)
{
if (item.RowId is 3 or 120) return true; //Sprint and cure.
if (item.ClassJobCategory.Row == 0) return false;
var name = item.Name.RawString;
if (string.IsNullOrEmpty(name)) return false;
if (!name.All(char.IsAscii)) return false;
if (item.Icon == 0) return false;
if (item.Icon is 0 or 405) return false;

if (item.ActionCategory.Row
is 6 or 7 // No DoL or DoH Action
Expand Down
Loading

0 comments on commit b713a6a

Please sign in to comment.