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

Commit

Permalink
fix: improve the attack mark priority.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 28, 2023
1 parent 1572491 commit a498ef4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
11 changes: 11 additions & 0 deletions RotationSolver.Basic/Actions/BaseAction_Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,17 @@ private bool TargetHostile(float range, bool mustUse, int aoeCount, out BattleCh
return false;
}

//找到被标记攻击的怪
if (Service.Config.ChooseAttackMark)
{
var b = MarkingHelper.GetAttackMarkChara(DataCenter.HostileTargets);
if (b != null && TargetFilterFuncEot(new BattleChara[] { b }, mustUse).Any())
{
target = b;
return true;
}
}

target = ChoiceTarget(GetMostObjects(TargetFilterFuncEot(DataCenter.HostileTargets, mustUse), aoeCount), mustUse);
if (target == null) return false;
return true;
Expand Down
6 changes: 1 addition & 5 deletions RotationSolver.Basic/Helpers/TargetFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,14 @@ internal static BattleChara DefaultFindHostile(IEnumerable<BattleChara> availabl
{
if (availableCharas == null || !availableCharas.Any()) return null;

//找到被标记攻击的怪
var b = MarkingHelper.GetAttackMarkChara(availableCharas);
if (Service.Config.ChooseAttackMark && b != null) return b;

//去掉停止标记的怪
if (Service.Config.FilterStopMark)
{
var charas = MarkingHelper.FilterStopCharaes(availableCharas);
if (charas?.Any() ?? false) availableCharas = charas;
}

b = availableCharas.FirstOrDefault(ObjectHelper.IsTopPriorityHostile);
var b = availableCharas.FirstOrDefault(ObjectHelper.IsTopPriorityHostile);
if (b != null) return b;

if (DataCenter.TreasureCharas.Length > 0)
Expand Down
3 changes: 2 additions & 1 deletion RotationSolver/Localization/Localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@
"ConfigWindow_Param_HealingOfTimeSubtractArea": "Set the HP threshold reduce with hot effect(AOE)",
"ConfigWindow_Param_HealthSingleAbility": "Set the HP threshold for using single healing ability",
"ConfigWindow_Param_HealthSingleSpell": "Set the HP threshold for using single healing spell",
"ConfigWindow_Param_HealthTankHealerRatio": "Heal healer or tank first if its HP threshold is lower than this.",
"ConfigWindow_Param_HealthHealerRatio": "Heal healer first if its HP threshold is lower than this.",
"ConfigWindow_Param_HealthTankRatio": "Heal tank first if its HP threshold is lower than this.",
"ConfigWindow_Param_HealingOfTimeSubtractSingle": "Set the HP threshold reduce with hot effect(single)",
"ConfigWindow_Param_HealthForDyingTank": "Set the HP threshold for tank to use invincibility",
"ConfigWindow_Param_MeleeRangeOffset": "Melee Range action using offset",
Expand Down

0 comments on commit a498ef4

Please sign in to comment.