From c24d39da4193a9f18ad93b7de470693eb15d1c24 Mon Sep 17 00:00:00 2001 From: HT32 Date: Fri, 4 Oct 2024 15:29:20 -0700 Subject: [PATCH] Remove the heal delay. Using a different delay for each type of heal auto status leads to scenarios where RSR makes irrational decisions. For example, in a situation where both canHealSingleSpell and canHealAreaSpell become true at the same time (like a hard-hitting AOE), it may decide to do a single target heal just because that delay happened to be shorter. --- RotationSolver.Basic/Configuration/Configs.cs | 5 ----- RotationSolver/Updaters/StateUpdater.cs | 14 ++++---------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/RotationSolver.Basic/Configuration/Configs.cs b/RotationSolver.Basic/Configuration/Configs.cs index 3d3d3218c..849564be4 100644 --- a/RotationSolver.Basic/Configuration/Configs.cs +++ b/RotationSolver.Basic/Configuration/Configs.cs @@ -497,11 +497,6 @@ public const string [Range(0, 5, ConfigUnitType.Seconds, 0.05f)] public Vector2 HealWhenNothingTodoDelay { get; set; } = new(0.5f, 1); - [UI("Auto Heal delay range", - Parent = nameof(AutoHeal))] - [Range(0, 3, ConfigUnitType.Seconds, 0.002f)] - public Vector2 HealDelay { get; set; } = new(0.5f, 1); - [UI("How soon before countdown is finished to start casting or attacking.", Filter = BasicTimer, Section = 1, PvPFilter = JobFilterType.NoJob)] [Range(0, 0.7f, ConfigUnitType.Seconds, 0.002f)] diff --git a/RotationSolver/Updaters/StateUpdater.cs b/RotationSolver/Updaters/StateUpdater.cs index 9b7af5016..a9108d958 100644 --- a/RotationSolver/Updaters/StateUpdater.cs +++ b/RotationSolver/Updaters/StateUpdater.cs @@ -20,12 +20,6 @@ public static void UpdateState() DataCenter.AutoStatus = StatusFromAutomatic(); } - 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() { AutoStatus status = AutoStatus.None; @@ -83,19 +77,19 @@ private static AutoStatus StatusFromAutomatic() canHealAreaSpell = DataCenter.PartyMembersDifferHP < Service.Config.HealthDifference && DataCenter.PartyMembersAverHP < Lerp(Service.Config.HealthAreaSpell, Service.Config.HealthAreaSpellHot, ratio); } - if (_healDelay1.Delay(canHealAreaAbility)) + if (canHealAreaAbility) { status |= AutoStatus.HealAreaAbility; } - if (_healDelay2.Delay(canHealAreaSpell)) + if (canHealAreaSpell) { status |= AutoStatus.HealAreaSpell; } - if (_healDelay3.Delay(canHealSingleAbility)) + if (canHealSingleAbility) { status |= AutoStatus.HealSingleAbility; } - if (_healDelay4.Delay(canHealSingleSpell)) + if (canHealSingleSpell) { status |= AutoStatus.HealSingleSpell; }