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

Commit

Permalink
fix: the medicine will be used when in high-end duty or the target is…
Browse files Browse the repository at this point in the history
… a dummy.
  • Loading branch information
ArchiDog1998 committed Mar 24, 2023
1 parent bef84f4 commit afa72d1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 21 deletions.
1 change: 1 addition & 0 deletions RotationSolver.Basic/DataCenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ namespace RotationSolver.Basic;

public static class DataCenter
{
public static bool InHighEndDuty { get; set; } = false;

private static List<NextAct> NextActs = new List<NextAct>();
public static IBaseAction TimeLineAction { internal get; set; }
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Helpers/ObjectHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public static bool CanInterrupt(this BattleChara b)
return _effectRangeCheck[id] = true;
}

private static bool IsDummy(this BattleChara obj) => obj?.NameId == 541;
public static bool IsDummy(this BattleChara obj) => obj?.NameId == 541;
/// <summary>
/// Is character a boss? Max HP exceeds a certain amount.
/// </summary>
Expand Down
40 changes: 21 additions & 19 deletions RotationSolver.Basic/Rotations/CustomRotation_Medicine.cs
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
using RotationSolver.Basic;
using RotationSolver.Basic.Actions;
using RotationSolver.Basic.Helpers;

namespace RotationSolver.Rotations.CustomRotation;

public enum MedicineType : byte
{
Strength,
Dexterity,
Intelligence,
Mind,
}

public abstract partial class CustomRotation
{
public abstract MedicineType MedicineType { get; }
public static IBaseItem TinctureOfStrength6 { get; } = new MedicineItem(36109,
MedicineType.Strength, 196625);
public static IBaseItem TinctureOfDexterity6 { get; } = new MedicineItem(36110,
MedicineType.Dexterity);
public static IBaseItem TinctureOfIntelligence6 { get; } = new MedicineItem(36112,
MedicineType.Intelligence);
public static IBaseItem TinctureOfMind6 { get; } = new MedicineItem(36113,
MedicineType.Mind);

public static IBaseItem TinctureOfStrength7 { get; } = new MedicineItem(37840,
MedicineType.Strength);
public static IBaseItem TinctureOfDexterity7 { get; } = new MedicineItem(37841,
MedicineType.Dexterity);
public static IBaseItem TinctureOfIntelligence7 { get; } = new MedicineItem(37843,
MedicineType.Intelligence);
public static IBaseItem TinctureOfMind7 { get; } = new MedicineItem(37844,
MedicineType.Mind);
public static IBaseItem TinctureOfStrength6 { get; }
= new MedicineItem(36109, MedicineType.Strength, 196625);
public static IBaseItem TinctureOfDexterity6 { get; }
= new MedicineItem(36110, MedicineType.Dexterity);
public static IBaseItem TinctureOfIntelligence6 { get; }
= new MedicineItem(36112, MedicineType.Intelligence);
public static IBaseItem TinctureOfMind6 { get; }
= new MedicineItem(36113, MedicineType.Mind);
public static IBaseItem TinctureOfStrength7 { get; }
= new MedicineItem(37840, MedicineType.Strength);
public static IBaseItem TinctureOfDexterity7 { get; }
= new MedicineItem(37841, MedicineType.Dexterity);
public static IBaseItem TinctureOfIntelligence7 { get; }
= new MedicineItem(37843, MedicineType.Intelligence);
public static IBaseItem TinctureOfMind7 { get; }
= new MedicineItem(37844, MedicineType.Mind);

public static IBaseItem EchoDrops { get; } = new BaseItem(4566);

Expand Down Expand Up @@ -61,8 +63,8 @@ protected bool UseBurstMedicine(out IAction act)
{
act = null;

if (!IsFullParty || !InCombat) return false;
if (Service.Player?.Level < 90) return false;
if (!InCombat) return false;
if (!(Target?.IsDummy() ?? false) && !DataCenter.InHighEndDuty) return false;

switch (MedicineType)
{
Expand Down
1 change: 0 additions & 1 deletion RotationSolver/Updaters/SocialUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ internal class SocialUpdater
};

static bool _canSaying = false;
public static bool InHighEndDuty { get; private set; } = false;
public static TerritoryType[] HighEndDuties { get; private set; } = new TerritoryType[0];

static bool CanSocial
Expand Down

0 comments on commit afa72d1

Please sign in to comment.