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

Commit

Permalink
fix: make healer more selfish
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 10, 2023
1 parent 189b4ff commit 8c44f2e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Configuration/PluginConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public class PluginConfiguration : IPluginConfiguration

public Dictionary<ClassJobID, float> HealthForDyingTanks { get; set; } = new Dictionary<ClassJobID, float>();

public float HealthTankRatio = 0.4f;
public float HealthTankHealerRatio = 0.4f;

public bool InterruptibleMoreCheck = true;
public float SpecialDuration = 3;
Expand Down
7 changes: 6 additions & 1 deletion RotationSolver.Basic/Helpers/TargetFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@ internal static BattleChara DefaultChooseFriend(IEnumerable<BattleChara> availab

availableCharas = availableCharas.Where(StatusHelper.NeedHealing);

var healerTars = availableCharas.GetJobCategory(JobRole.Healer);
var tankTars = availableCharas.GetJobCategory(JobRole.Tank);

var healerTar = tankTars.OrderBy(ObjectHelper.GetHealingRatio).FirstOrDefault();
if (healerTar != null && healerTar.GetHealingRatio() < Service.Config.HealthTankHealerRatio)
return healerTar;

var tankTar = tankTars.OrderBy(ObjectHelper.GetHealingRatio).FirstOrDefault();
if (tankTar != null && tankTar.GetHealingRatio() < Service.Config.HealthTankRatio)
if (tankTar != null && tankTar.GetHealingRatio() < Service.Config.HealthTankHealerRatio)
return tankTar;

var tar = availableCharas.OrderBy(ObjectHelper.GetHealingRatio).FirstOrDefault();
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Localization/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ internal partial class Strings
public string ConfigWindow_Param_HealthSingleAbility { get; set; } = "Set the HP threshold for using single healing ability";
public string ConfigWindow_Param_HealthSingleSpell { get; set; } = "Set the HP threshold for using single healing spell";

public string ConfigWindow_Param_HealthTankRatio { get; set; } = "Heal tank first it tank's HP threshold is lower than this.";
public string ConfigWindow_Param_HealthTankHealerRatio { get; set; } = "Heal healer or tank first if its HP threshold is lower than this.";


public string ConfigWindow_Param_HealingOfTimeSubtractSingle { get; set; } = "Set the HP threshold reduce with hot effect(single)";
Expand Down
4 changes: 2 additions & 2 deletions RotationSolver/UI/RotationConfigWindow_Param.cs
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,8 @@ private void DrawParamCondition()
DrawFloatNumber(LocalizationManager.RightLang.ConfigWindow_Param_HealthSingleSpell,
ref Service.Config.HealthSingleSpell, speed);

DrawFloatNumber(LocalizationManager.RightLang.ConfigWindow_Param_HealthTankRatio,
ref Service.Config.HealthTankRatio, speed);
DrawFloatNumber(LocalizationManager.RightLang.ConfigWindow_Param_HealthTankHealerRatio,
ref Service.Config.HealthTankHealerRatio, speed);
}

private void DrawParamTarget()
Expand Down

0 comments on commit 8c44f2e

Please sign in to comment.