Skip to content

Commit

Permalink
Remove the heal delay.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
HT32 committed Oct 5, 2024
1 parent 0b9dfd9 commit c24d39d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
5 changes: 0 additions & 5 deletions RotationSolver.Basic/Configuration/Configs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
14 changes: 4 additions & 10 deletions RotationSolver/Updaters/StateUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit c24d39d

Please sign in to comment.