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

Commit

Permalink
fix: when mustuse, skip the filter for hostiles check.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 2, 2023
1 parent 2a3037a commit bd964d5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion RotationSolver.Basic/Actions/BaseAction/BaseAction_Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,11 @@ public bool CanGetTarget(BattleChara target, BattleChara subTarget)

private IEnumerable<BattleChara> TargetFilterFuncEot(IEnumerable<BattleChara> tars, bool mustUse)
{
if (FilterForHostiles != null) tars = FilterForHostiles(tars);
if (FilterForHostiles != null)
{
var filtered = FilterForHostiles(tars);
if (filtered.Any() || !mustUse) tars = filtered;
}
if (TargetStatus == null || !IsEot) return tars;

var dontHave = tars.Where(CheckStatus);
Expand Down

0 comments on commit bd964d5

Please sign in to comment.