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

Commit

Permalink
fix: esuna strategy.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Feb 7, 2023
1 parent 70c72dd commit c9a36bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions RotationSolver/Helpers/StatusHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,13 @@ internal static bool IsInvincible(this Status status)

internal static bool IsDangerous(this Status status)
{
if (!status.CanDispel()) return false;
if(status.StackCount > 2) return true;
return dangeriousStatus.Any(id => (uint)id == status.StatusId);
}

internal static bool CanDispel(this Status status)
{
return status.GameData.CanDispel && status.RemainingTime > 2;
}
}
3 changes: 1 addition & 2 deletions RotationSolver/Updaters/TargetUpdater_Friends.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ private unsafe static void UpdateFriends(IEnumerable<BattleChara> allTargets)
DeathPeopleAll.Delay(deathAll);
DeathPeopleParty.Delay(deathParty);

WeakenPeople.Delay(PartyMembers.Where(p => p.StatusList.Any(status =>
status.GameData.CanDispel && status.RemainingTime > 2)));
WeakenPeople.Delay(PartyMembers.Where(p => p.StatusList.Any(StatusHelper.CanDispel)));

DyingPeople.Delay(WeakenPeople.Where(p => p.StatusList.Any(StatusHelper.IsDangerous)));

Expand Down

0 comments on commit c9a36bd

Please sign in to comment.