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

Commit

Permalink
fix: add an option for beneficial area on target.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 7, 2023
1 parent 20c5680 commit 4ad1f99
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
7 changes: 5 additions & 2 deletions RotationSolver.Basic/Actions/BaseAction_Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,11 @@ private bool TargetAreaFriend(float range, bool mustUse, PlayerCharacter player)
//如果用户不想使用自动友方地面放置功能
if (!Service.Config.UseGroundBeneficialAbility) return false;

//如果当前目标是Boss且有身位,放他身上。
if (Service.TargetManager.Target is BattleChara b && b.DistanceToPlayer() < range &&
if (Service.Config.BeneficialAreaOnTarget && Service.TargetManager.Target != null)
{
_position = Service.TargetManager.Target.Position;
}
else if (Service.TargetManager.Target is BattleChara b && b.DistanceToPlayer() < range &&
b.IsBoss() && b.HasPositional() && b.HitboxRadius <= 8)
{
_position = b.Position;
Expand Down
1 change: 1 addition & 0 deletions RotationSolver.Basic/Configuration/PluginConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ public class PluginConfiguration : IPluginConfiguration
public bool EsunaAll = false;
public bool OnlyAttackInView = false;
public bool OnlyHotOnTanks = false;
public bool BeneficialAreaOnTarget = false;

public string PositionalErrorText = string.Empty;
public float CountDownAhead = 0.6f;
Expand Down
2 changes: 2 additions & 0 deletions RotationSolver/Localization/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ internal partial class Strings

public string ConfigWindow_Param_OnlyHotOnTanks { get; set; } = "Only use hot actions on tank rols.";

public string ConfigWindow_Param_BeneficialAreaOnTarget { get; set; } = "Use Beneficial Area abilities on target.";

public string ConfigWindow_Param_HealthDifference { get; set; } = "Set the HP standard deviation threshold for using AOE heal (ability & spell)";
public string ConfigWindow_Param_HealthAreaAbility { get; set; } = "Set the HP threshold for using AOE healing ability";
public string ConfigWindow_Param_HealthAreaSpell { get; set; } = "Set the HP threshold for using AOE healing spell";
Expand Down
6 changes: 6 additions & 0 deletions RotationSolver/UI/RotationConfigWindow_Param.cs
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,12 @@ private void DrawParamCondition()
DrawCheckBox(LocalizationManager.RightLang.ConfigWindow_Param_OnlyHotOnTanks,
ref Service.Config.OnlyHotOnTanks, Service.Default.OnlyHotOnTanks);

if (Service.Config.UseGroundBeneficialAbility)
{
DrawCheckBox(LocalizationManager.RightLang.ConfigWindow_Param_BeneficialAreaOnTarget,
ref Service.Config.BeneficialAreaOnTarget, Service.Default.BeneficialAreaOnTarget);
}

const float speed = 0.005f;

DrawFloatNumber(LocalizationManager.RightLang.ConfigWindow_Param_MeleeRangeOffset,
Expand Down

0 comments on commit 4ad1f99

Please sign in to comment.