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

Commit

Permalink
fix: fix for must use on dot acition.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jan 21, 2023
1 parent 1307b08 commit fda37e4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
13 changes: 6 additions & 7 deletions RotationSolver/Actions/BaseAction/BaseAction_Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ private bool TargetParty(float range, int aoeCount, bool mustUse, out BattleChar
target = ChoiceTarget(availableCharas, mustUse);
}

return CheckStatus(target, mustUse);
return mustUse || CheckStatus(target);
}

private bool TargetDeath(out BattleChara target)
Expand Down Expand Up @@ -298,7 +298,7 @@ private bool TargetHostileManual(BattleChara b, bool mustUse, int aoeCount, out
if (TargetStatus != null && !ObjectHelper.CanDot(b)) return false;

//Already has status.
if (!CheckStatus(b, mustUse)) return false;
if (!mustUse && !CheckStatus(b)) return false;

return true;
}
Expand Down Expand Up @@ -411,10 +411,10 @@ internal bool CanGetTarget(BattleChara target, BattleChara subTarget)
private IEnumerable<BattleChara> TargetFilterFuncEot(IEnumerable<BattleChara> tars, bool mustUse)
{
if (FilterForTarget != null) return FilterForTarget(tars);
if (TargetStatus == null || !_isEot) return tars;
if (TargetStatus == null || !_isEot || mustUse) return tars;

var canDot = tars.Where(ObjectHelper.CanDot);
var DontHave = canDot.Where(b => CheckStatus(b, mustUse));
var canDot = mustUse ? tars : tars.Where(ObjectHelper.CanDot);
var DontHave = canDot.Where(CheckStatus);

if (mustUse)
{
Expand All @@ -433,11 +433,10 @@ private IEnumerable<BattleChara> TargetFilterFuncEot(IEnumerable<BattleChara> ta
/// </summary>
/// <param name="tar"></param>
/// <returns>True for add Eot.</returns>
private bool CheckStatus(BattleChara tar, bool mustUse)
private bool CheckStatus(BattleChara tar)
{
if (tar == null) return false;

if (mustUse) return true;
if (TargetStatus == null) return true;

return tar.WillStatusEndGCD((uint)Service.Configuration.AddDotGCDCount, 0, true, TargetStatus);
Expand Down
6 changes: 4 additions & 2 deletions RotationSolver/Rotations/Healer/SCH/SCH_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,16 @@ private protected override bool GeneralGCD(out IAction act)
//DoT
if (Bio.ShouldUse(out act)) return true;


//AOE
if (ArtofWar.ShouldUse(out act)) return true;

//单体
//Single
if (Ruin.ShouldUse(out act)) return true;
if (Ruin2.ShouldUse(out act)) return true;

//Add dot.
if (Bio.ShouldUse(out act, true)) return true;

return false;
}

Expand Down

0 comments on commit fda37e4

Please sign in to comment.