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

Commit

Permalink
fix: add Isdead to check is plaer dead.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Feb 17, 2023
1 parent 5b23bbb commit f4f2e59
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
6 changes: 3 additions & 3 deletions RotationSolver/Helpers/TargetFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,11 @@ internal static BattleChara GetDeathPeople(IEnumerable<BattleChara> deathAll, IE

internal unsafe static IEnumerable<BattleChara> GetDeath(this IEnumerable<BattleChara> charas) => charas.Where(item =>
{
if (!item.IsTargetable()) return false;
//如果还有血,就算了。
if (!item.IsDead) return false;
if (item.CurrentHp != 0) return false;
if (!item.IsTargetable()) return false;
//如果已经有复活的Buff了,那就算了。
if (item.HasStatus(false, StatusID.Raise)) return false;
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Rotations/RangedMagicial/BLU/BLU_25.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ private protected override bool GeneralGCD(out IAction act)

if (TripleTrident.OnSlot && TripleTrident.RightType && TripleTrident.WillHaveOneChargeGCD(OnSlotCount(Whistle, Tingle), 0))
{
if (Whistle.CanUse(out act)) return true;
if ((TripleTrident.CanUse(out _, mustUse: true) || !HasHostilesInRange) &&Whistle.CanUse(out act)) return true;

if (!Player.HasStatus(true, StatusID.Tingling)
&& Tingle.CanUse(out act, mustUse: true)) return true;
Expand Down
3 changes: 0 additions & 3 deletions RotationSolver/Updaters/TargetUpdater_Friends.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ private static IEnumerable<BattleChara> GetPartyMembers(IEnumerable<BattleChara>

private unsafe static void UpdateFriends(IEnumerable<BattleChara> allTargets)
{
#region Friend
PartyMembers = GetPartyMembers(allTargets);
AllianceMembers = allTargets.OfType<PlayerCharacter>();

Expand All @@ -118,11 +117,9 @@ private unsafe static void UpdateFriends(IEnumerable<BattleChara> allTargets)
DeathPeopleParty.Delay(deathParty);

WeakenPeople.Delay(PartyMembers.Where(p => p.StatusList.Any(StatusHelper.CanDispel)));

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

SayHelloToAuthor();
#endregion

PartyMembersHP = PartyMembers.Select(ObjectHelper.GetHealthRatio).Where(r => r > 0);
if (PartyMembersHP.Any())
Expand Down

0 comments on commit f4f2e59

Please sign in to comment.