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

Commit

Permalink
fix: add another check for Karida.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed May 6, 2023
1 parent f721872 commit c28aeda
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions RotationSolver.Basic/DataCenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ public static void SetSpecialType(SpecialCommandType specialType)
() => (Service.Config.InterruptDelayMin, Service.Config.InterruptDelayMax));

public static IEnumerable<GameObject> AllTargets { get; set; }
public static IEnumerable<BattleChara> AllBattles { get; set; }

public static uint[] TreasureCharas { get; set; } = Array.Empty<uint>();
public static bool HasHostilesInRange => NumberOfHostilesInRange > 0;
Expand Down
3 changes: 2 additions & 1 deletion RotationSolver.Basic/Rotations/Basic/SGE_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ protected static bool AddersgallEndAfterGCD(uint gctCount = 0, float offset = 0)

return TargetFilter.FindAttackedTarget(targets, mustUse);
},
ActionCheck = b => !b.HasStatus(true, StatusID.Kardion),
ActionCheck = b => !b.HasStatus(true, StatusID.Kardion)
&& DataCenter.AllBattles.All(o => !o.HasStatus(true, StatusID.Kardion)),
};

public static IBaseAction Prognosis { get; } = new BaseAction(ActionID.Prognosis, ActionOption.Heal | ActionOption.EndSpecial);
Expand Down
7 changes: 4 additions & 3 deletions RotationSolver/Updaters/TargetUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@ internal static partial class TargetUpdater
internal static void UpdateTarget()
{
DataCenter.AllTargets = Service.ObjectTable.GetObjectInRadius(30);
var battles = DataCenter.AllTargets.OfType<BattleChara>();
UpdateHostileTargets(battles);
UpdateFriends(battles);
DataCenter.AllBattles = DataCenter.AllTargets.OfType<BattleChara>();
UpdateHostileTargets(DataCenter.AllBattles);
UpdateFriends(DataCenter.AllBattles);
UpdateNamePlate(Service.ObjectTable.OfType<BattleChara>());
}

internal static void ClearTarget()
{
var empty = Array.Empty<BattleChara>();
DataCenter.AllTargets
= DataCenter.AllBattles
= DataCenter.AllHostileTargets
= DataCenter.TarOnMeTargets
= DataCenter.PartyMembers
Expand Down

0 comments on commit c28aeda

Please sign in to comment.