diff --git a/Resources/HostileCastingArea.json b/Resources/HostileCastingArea.json index db2393c6b..f69bb1d0b 100644 --- a/Resources/HostileCastingArea.json +++ b/Resources/HostileCastingArea.json @@ -493,5 +493,6 @@ 20253, 17435, 35384, - 35386 + 35386, + 36001 ] \ No newline at end of file diff --git a/Resources/RotationSolverRecord.json b/Resources/RotationSolverRecord.json index bac222b02..764f5afea 100644 --- a/Resources/RotationSolverRecord.json +++ b/Resources/RotationSolverRecord.json @@ -1,5 +1,5 @@ { - "ClickingCount": 68504, - "SayingHelloCount": 57, + "ClickingCount": 68802, + "SayingHelloCount": 58, "SaidUsers": [] } \ No newline at end of file diff --git a/RotationSolver.Basic/Actions/ActionTargetInfo.cs b/RotationSolver.Basic/Actions/ActionTargetInfo.cs index 33ad70e41..d5a3095f1 100644 --- a/RotationSolver.Basic/Actions/ActionTargetInfo.cs +++ b/RotationSolver.Basic/Actions/ActionTargetInfo.cs @@ -695,19 +695,22 @@ private readonly bool CanGetTarget(GameObject target, GameObject subTarget) if (!gameObjects.Any()) return null; var attachedT = gameObjects.Where(ObjectHelper.IsTargetOnSelf); - if (!attachedT.Any()) + if (!DataCenter.AutoStatus.HasFlag(AutoStatus.DefenseSingle)) { - attachedT = gameObjects.Where(tank => tank.HasStatus(false, StatusHelper.TankStanceStatus)); - } + if (!attachedT.Any()) + { + attachedT = gameObjects.Where(tank => tank.HasStatus(false, StatusHelper.TankStanceStatus)); + } - if (!attachedT.Any()) - { - attachedT = gameObjects.GetJobCategory(JobRole.Tank); - } + if (!attachedT.Any()) + { + attachedT = gameObjects.GetJobCategory(JobRole.Tank); + } - if (!attachedT.Any()) - { - attachedT = gameObjects; + if (!attachedT.Any()) + { + attachedT = gameObjects; + } } return attachedT.OrderBy(ObjectHelper.GetHealthRatio).FirstOrDefault(); diff --git a/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs b/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs index aed7b90e7..e7a29f73b 100644 --- a/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs +++ b/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs @@ -49,6 +49,7 @@ private bool Ability(IAction nextGCD, out IAction? act) } IBaseAction.TargetOverride = TargetType.Heal; + IBaseAction.ShouldEndSpecial = false; if (DataCenter.CommandStatus.HasFlag(AutoStatus.HealAreaAbility)) { @@ -78,6 +79,7 @@ private bool Ability(IAction nextGCD, out IAction? act) } IBaseAction.TargetOverride = null; + IBaseAction.ShouldEndSpecial = true; if (DataCenter.CommandStatus.HasFlag(AutoStatus.Speed) && SpeedAbility(out act)) return true; diff --git a/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs b/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs index c6beb757e..3b7438430 100644 --- a/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs +++ b/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs @@ -7,7 +7,15 @@ partial class CustomRotation internal static void LoadActionSetting(ref IBaseAction action) { var a = action.Action; - if(!a.CanTargetFriendly && !a.CanTargetHostile) + if(a.CanTargetFriendly || a.CanTargetParty) + { + action.Setting.IsFriendly = true; + } + else if (a.CanTargetHostile) + { + action.Setting.IsFriendly = false; + } + else { action.Setting.IsFriendly = a.EffectRange > 5; } diff --git a/RotationSolver/Localization/Localization.json b/RotationSolver/Localization/Localization.json index d77c5d982..3079d3241 100644 --- a/RotationSolver/Localization/Localization.json +++ b/RotationSolver/Localization/Localization.json @@ -204,5 +204,9 @@ "RotationSolver.Data.UiString.ConfigWindow_List_Statuses": "Statuses", "RotationSolver.Data.UiString.ConfigWindow_List_Actions": "Actions", "RotationSolver.Data.UiString.ConfigWindow_List_Territories": "Map specific settings", - "RotationSolver.Data.UiString.ConfigWindow_Rotation_BetaRotation": "Beta Rotation!" + "RotationSolver.Data.UiString.ConfigWindow_Rotation_BetaRotation": "Beta Rotation!", + "RotationSolver.Data.UiString.SpecialCommandType_HealSingle": "Heal Single", + "RotationSolver.Data.UiString.SpecialCommandType_HealArea": "Heal Area", + "RotationSolver.Data.UiString.SpecialCommandType_DefenseSingle": "Defense Single", + "RotationSolver.Data.UiString.ConfigWindow_Actions_GcdCount": "How many gcds are needed to add the status." } \ No newline at end of file diff --git a/RotationSolver/UI/RotationConfigWindow.cs b/RotationSolver/UI/RotationConfigWindow.cs index 4ff847019..e3c46a23f 100644 --- a/RotationSolver/UI/RotationConfigWindow.cs +++ b/RotationSolver/UI/RotationConfigWindow.cs @@ -1424,8 +1424,8 @@ private static unsafe void DrawActions() ImGui.Text("Recast One: " + action.Cooldown.RecastTimeOneChargeRaw.ToString()); ImGui.Text("Recast Elapsed: " + action.Cooldown.RecastTimeElapsedRaw.ToString()); - ImGui.Text($"Can Use: {action.CanUse(out _)} "); - ImGui.Text("IgnoreCastCheck:" + action.CanUse(out _, ignoreCastingCheck : true).ToString()); + ImGui.Text($"Can Use: {action.CanUse(out _, ignoreClippingCheck: true)} "); + ImGui.Text("IgnoreCastCheck:" + action.CanUse(out _, ignoreClippingCheck: true, ignoreCastingCheck : true).ToString()); if (action.Target != null) { ImGui.Text("Target Name: " + action.Target.Value.Target?.Name ?? string.Empty); diff --git a/RotationSolver/Updaters/StateUpdater.cs b/RotationSolver/Updaters/StateUpdater.cs index 15bafedfd..ec8e1647c 100644 --- a/RotationSolver/Updaters/StateUpdater.cs +++ b/RotationSolver/Updaters/StateUpdater.cs @@ -19,10 +19,11 @@ public static void UpdateState() DataCenter.AutoStatus = StatusFromAutomatic(); } - static readonly RandomDelay _healDelay1 = new(() => Service.Config.HealDelay), - _healDelay2 = new(() => Service.Config.HealDelay), - _healDelay3 = new(() => Service.Config.HealDelay), - _healDelay4 = new(() => Service.Config.HealDelay); + static RandomDelay + _healDelay1 = new(() => Service.Config.HealDelay), + _healDelay2 = new(() => Service.Config.HealDelay), + _healDelay3 = new(() => Service.Config.HealDelay), + _healDelay4 = new(() => Service.Config.HealDelay); private static AutoStatus StatusFromAutomatic() { @@ -44,7 +45,7 @@ private static AutoStatus StatusFromAutomatic() } } - if (DataCenter.HPNotFull && CanUseHealAction) + if (DataCenter.HPNotFull /*&& CanUseHealAction*/) { var singleAbility = ShouldHealSingle(StatusHelper.SingleHots, Service.Config.HealthSingleAbility,