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

Commit

Permalink
fix: more condition for tank defense single.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Sep 25, 2023
1 parent dd3fa8b commit 2557b26
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ECommons
2 changes: 1 addition & 1 deletion Resources/RotationSolverRecord.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ClickingCount": 11521
"ClickingCount": 11754
}
1 change: 1 addition & 0 deletions RotationSolver.Basic/Configuration/Configs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ public enum JobConfigFloat : byte
[Default(0.55f)] HealthSingleSpell,

[Default(0.15f)] HealthForDyingTanks,
[Default(1f)] HealthForAutoDefense,
}
#endregion

Expand Down
1 change: 1 addition & 0 deletions RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ private bool AutoDefense(JobRole role, bool helpDefenseAOE, bool helpDefenseSing

//A lot targets are targeting on me.
if (tarOnMeCount >= Service.Config.GetValue(PluginConfigInt.AutoDefenseNumber)
&& Player.GetHealthRatio() <= Service.Config.GetValue(DataCenter.Job, JobConfigFloat.HealthForAutoDefense)
&& movingHere && attacked)
{
if (DefenseSingleAbility(out act)) return true;
Expand Down
1 change: 1 addition & 0 deletions RotationSolver/Localization/ConfigTranslation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ internal static class ConfigTranslation
public static string ToName(this JobConfigFloat config) => config switch
{
JobConfigFloat.HealthForDyingTanks => LocalizationManager.RightLang.ConfigWindow_Param_HealthForDyingTank,
JobConfigFloat.HealthForAutoDefense => LocalizationManager.RightLang.ConfigWindow_Auto_HealthForAutoDefense,
_ => string.Empty,
};

Expand Down
1 change: 1 addition & 0 deletions RotationSolver/Localization/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -745,4 +745,5 @@ internal class Strings
public string ConfigWindow_Actions_ConditionDescription { get; set; }= "Forced Conditions have a higher priority. If Forced Conditions are met, Disabled Condition will be ignored.";

public string ConfigWindow_Auto_UseResourcesAction { get; set; } = "Use actions that use resources";
public string ConfigWindow_Auto_HealthForAutoDefense { get; set; } = "HP Ratio about defense single of Tanks";
}
9 changes: 9 additions & 0 deletions RotationSolver/UI/RotationConfigWindow_Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,7 @@ private static void DrawAutoActionCondition()
ECommons.ExcelServices.Job.BRD,
},
},

new DragFloatRangeSearchPlugin(PluginConfigFloat.WeakenDelayMin, PluginConfigFloat.WeakenDelayMax, 0.002f)
{
JobRoles = new JobRole[]
Expand Down Expand Up @@ -692,6 +693,14 @@ private static void DrawAutoActionCondition()
{
new CheckBoxSearchPlugin(PluginConfigBool.UseDefenseAbility,
new DragIntSearchPlugin(PluginConfigInt.AutoDefenseNumber, 0.05f)
{
JobRoles = new JobRole[]
{
JobRole.Tank,
}
},

new DragFloatSearchJob(JobConfigFloat.HealthForAutoDefense, 0.02f)
{
JobRoles = new JobRole[]
{
Expand Down

0 comments on commit 2557b26

Please sign in to comment.