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

Commit

Permalink
fix: changed the medicine type framework.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Mar 4, 2023
1 parent 2a613fe commit 67c8795
Show file tree
Hide file tree
Showing 27 changed files with 116 additions and 42 deletions.
21 changes: 21 additions & 0 deletions RotationSolver/Actions/MedicineItem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using RotationSolver.Data;
using RotationSolver.Rotations.CustomRotation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RotationSolver.Actions
{
internal class MedicineItem : BaseItem
{
private MedicineType _type;
public MedicineItem(uint row, MedicineType type, uint a4 = 65535) : base(row, a4)
{
_type = type;
}

internal bool InType(ICustomRotation rotation) => rotation.MedicineType == _type;
}
}
21 changes: 0 additions & 21 deletions RotationSolver/Actions/RoleItem.cs

This file was deleted.

1 change: 0 additions & 1 deletion RotationSolver/Localization/Localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"Configwindow_Param_HealDelay": "Set the range of random delay for healing people in second.",
"Configwindow_Param_NotInCombatDelay": "Set the range of random delay for Not In Combat in second.",
"Configwindow_Param_StopCastingDelay": "Set the range of random delay for stoping casting when target is no need to cast in second.",
"Configwindow_Param_WorkTaskDelay": "Set the work task delay in millisecond. Smaller, more precise, more resource-intensive",
"Configwindow_Param_Display": "Display",
"Configwindow_Param_Advanced": "Advanced",
"Configwindow_Param_PoslockCasting": "Lock the movement when casting.",
Expand Down
3 changes: 3 additions & 0 deletions RotationSolver/Rotations/Basic/AST_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using RotationSolver.Actions.BaseAction;
using RotationSolver.Data;
using RotationSolver.Helpers;
using RotationSolver.Rotations.CustomRotation;
using System;
using System.Linq;

Expand All @@ -13,6 +14,8 @@ internal abstract class AST_Base : CustomRotation.CustomRotation
{
private static ASTGauge JobGauge => Service.JobGauges.Get<ASTGauge>();

public override MedicineType MedicineType => MedicineType.Mind;

/// <summary>
/// 抽出来的卡是啥。
/// </summary>
Expand Down
4 changes: 4 additions & 0 deletions RotationSolver/Rotations/Basic/BLM_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using RotationSolver.Attributes;
using RotationSolver.Data;
using RotationSolver.Helpers;
using RotationSolver.Rotations.CustomRotation;
using RotationSolver.Updaters;

namespace RotationSolver.Rotations.Basic
Expand All @@ -12,6 +13,9 @@ internal abstract partial class BLM_Base : CustomRotation.CustomRotation
{
private static BLMGauge JobGauge => Service.JobGauges.Get<BLMGauge>();

public override MedicineType MedicineType => MedicineType.Intelligence;


/// <summary>
/// 冰状态层数
/// </summary>
Expand Down
3 changes: 3 additions & 0 deletions RotationSolver/Rotations/Basic/BLU_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using RotationSolver.Configuration.RotationConfig;
using RotationSolver.Data;
using RotationSolver.Helpers;
using RotationSolver.Rotations.CustomRotation;
using RotationSolver.Updaters;
using System.Linq;

Expand All @@ -17,6 +18,8 @@ internal interface IBLUAction : IBaseAction
}
internal abstract class BLU_Base : CustomRotation.CustomRotation
{
public override MedicineType MedicineType => MedicineType.Intelligence;

internal enum BLUID : byte
{
Tank,
Expand Down
3 changes: 3 additions & 0 deletions RotationSolver/Rotations/Basic/BRD_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using RotationSolver.Commands;
using RotationSolver.Data;
using RotationSolver.Helpers;
using RotationSolver.Rotations.CustomRotation;
using RotationSolver.Updaters;
using System.Linq;

Expand All @@ -15,6 +16,8 @@ internal abstract class BRD_Base : CustomRotation.CustomRotation
{
private static BRDGauge JobGauge => Service.JobGauges.Get<BRDGauge>();

public override MedicineType MedicineType => MedicineType.Dexterity;

/// <summary>
/// 诗心数量
/// </summary>
Expand Down
3 changes: 3 additions & 0 deletions RotationSolver/Rotations/Basic/DNC_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
using RotationSolver.Attributes;
using RotationSolver.Data;
using RotationSolver.Helpers;
using RotationSolver.Rotations.CustomRotation;
using System.Linq;

namespace RotationSolver.Rotations.Basic;
internal abstract class DNC_Base : CustomRotation.CustomRotation
{
private static DNCGauge JobGauge => Service.JobGauges.Get<DNCGauge>();

public override MedicineType MedicineType => MedicineType.Dexterity;

/// <summary>
/// 正在跳舞
/// </summary>
Expand Down
3 changes: 3 additions & 0 deletions RotationSolver/Rotations/Basic/DRG_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using RotationSolver.Attributes;
using RotationSolver.Data;
using RotationSolver.Helpers;
using RotationSolver.Rotations.CustomRotation;
using System.Linq;

namespace RotationSolver.Rotations.Basic;
Expand All @@ -13,6 +14,8 @@ internal abstract class DRG_Base : CustomRotation.CustomRotation
{
private static DRGGauge JobGauge => Service.JobGauges.Get<DRGGauge>();

public override MedicineType MedicineType => MedicineType.Strength;

public sealed override ClassJobID[] JobIDs => new ClassJobID[] { ClassJobID.Dragoon, ClassJobID.Lancer };

/// <summary>
Expand Down
4 changes: 4 additions & 0 deletions RotationSolver/Rotations/Basic/DRK_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
using RotationSolver.Attributes;
using RotationSolver.Data;
using RotationSolver.Helpers;
using RotationSolver.Rotations.CustomRotation;

namespace RotationSolver.Rotations.Basic;
internal abstract class DRK_Base : CustomRotation.CustomRotation
{
private static DRKGauge JobGauge => Service.JobGauges.Get<DRKGauge>();

public override MedicineType MedicineType => MedicineType.Strength;

private static float DarksideTimeRemaining => JobGauge.DarksideTimeRemaining / 1000f;
/// <summary>
/// 暗血
Expand Down
3 changes: 3 additions & 0 deletions RotationSolver/Rotations/Basic/GNB_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using RotationSolver.Attributes;
using RotationSolver.Data;
using RotationSolver.Helpers;
using RotationSolver.Rotations.CustomRotation;

namespace RotationSolver.Rotations.Basic;

Expand All @@ -13,6 +14,8 @@ internal abstract class GNB_Base : CustomRotation.CustomRotation
{
private static GNBGauge JobGauge => Service.JobGauges.Get<GNBGauge>();

public override MedicineType MedicineType => MedicineType.Strength;

/// <summary>
/// 晶囊数量
/// </summary>
Expand Down
3 changes: 3 additions & 0 deletions RotationSolver/Rotations/Basic/MCH_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
using RotationSolver.Attributes;
using RotationSolver.Data;
using RotationSolver.Helpers;
using RotationSolver.Rotations.CustomRotation;

namespace RotationSolver.Rotations.Basic;

internal abstract class MCH_Base : CustomRotation.CustomRotation
{
private static MCHGauge JobGauge => Service.JobGauges.Get<MCHGauge>();

public override MedicineType MedicineType => MedicineType.Dexterity;

/// <summary>
/// 处于过热中
/// </summary>
Expand Down
4 changes: 4 additions & 0 deletions RotationSolver/Rotations/Basic/MNK_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@
using RotationSolver.Attributes;
using RotationSolver.Data;
using RotationSolver.Helpers;
using RotationSolver.Rotations.CustomRotation;

namespace RotationSolver.Rotations.Basic;

internal abstract class MNK_Base : CustomRotation.CustomRotation
{
private static MNKGauge JobGauge => Service.JobGauges.Get<MNKGauge>();

public override MedicineType MedicineType => MedicineType.Strength;


/// <summary>
/// 查克拉们
/// </summary>
Expand Down
3 changes: 3 additions & 0 deletions RotationSolver/Rotations/Basic/NIN_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using RotationSolver.Attributes;
using RotationSolver.Data;
using RotationSolver.Helpers;
using RotationSolver.Rotations.CustomRotation;

namespace RotationSolver.Rotations.Basic;

Expand All @@ -16,6 +17,8 @@ internal interface INinAction : IBaseAction
internal abstract class NIN_Base : CustomRotation.CustomRotation
{
private static NINGauge JobGauge => Service.JobGauges.Get<NINGauge>();
public override MedicineType MedicineType => MedicineType.Dexterity;


/// <summary>
/// 在风buff中
Expand Down
3 changes: 3 additions & 0 deletions RotationSolver/Rotations/Basic/PLD_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using RotationSolver.Attributes;
using RotationSolver.Data;
using RotationSolver.Helpers;
using RotationSolver.Rotations.CustomRotation;
using RotationSolver.Updaters;
using System.Linq;

Expand All @@ -12,6 +13,8 @@ namespace RotationSolver.Rotations.Basic;
internal abstract class PLD_Base : CustomRotation.CustomRotation
{
private static PLDGauge JobGauge => Service.JobGauges.Get<PLDGauge>();
public override MedicineType MedicineType => MedicineType.Strength;


protected static bool HasDivineMight => !Player.WillStatusEndGCD(0, 0, true, StatusID.DivineMight);

Expand Down
4 changes: 4 additions & 0 deletions RotationSolver/Rotations/Basic/RDM_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using RotationSolver.Attributes;
using RotationSolver.Data;
using RotationSolver.Helpers;
using RotationSolver.Rotations.CustomRotation;
using RotationSolver.Updaters;
using System.Linq;

Expand All @@ -13,6 +14,9 @@ internal abstract class RDM_Base : CustomRotation.CustomRotation
{
private static RDMGauge JobGauge => Service.JobGauges.Get<RDMGauge>();

public override MedicineType MedicineType => MedicineType.Intelligence;


/// <summary>
/// 白魔元
/// </summary>
Expand Down
4 changes: 4 additions & 0 deletions RotationSolver/Rotations/Basic/RPR_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@
using RotationSolver.Attributes;
using RotationSolver.Data;
using RotationSolver.Helpers;
using RotationSolver.Rotations.CustomRotation;

namespace RotationSolver.Rotations.Basic;

internal abstract class RPR_Base : CustomRotation.CustomRotation
{
private static RPRGauge JobGauge => Service.JobGauges.Get<RPRGauge>();

public override MedicineType MedicineType => MedicineType.Strength;


/// <summary>
/// 红色灵魂
/// </summary>
Expand Down
3 changes: 3 additions & 0 deletions RotationSolver/Rotations/Basic/SAM_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@
using RotationSolver.Attributes;
using RotationSolver.Data;
using RotationSolver.Helpers;
using RotationSolver.Rotations.CustomRotation;

namespace RotationSolver.Rotations.Basic;

internal abstract class SAM_Base : CustomRotation.CustomRotation
{
private static SAMGauge JobGauge => Service.JobGauges.Get<SAMGauge>();
public override MedicineType MedicineType => MedicineType.Strength;


/// <summary>
/// 雪闪
Expand Down
4 changes: 4 additions & 0 deletions RotationSolver/Rotations/Basic/SCH_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using RotationSolver.Actions.BaseAction;
using RotationSolver.Data;
using RotationSolver.Helpers;
using RotationSolver.Rotations.CustomRotation;
using RotationSolver.Updaters;

namespace RotationSolver.Rotations.Basic;
Expand All @@ -11,6 +12,9 @@ internal abstract class SCH_Base : CustomRotation.CustomRotation
{
private static SCHGauge JobGauge => Service.JobGauges.Get<SCHGauge>();

public override MedicineType MedicineType => MedicineType.Mind;


/// <summary>
/// 契约槽
/// </summary>
Expand Down
3 changes: 3 additions & 0 deletions RotationSolver/Rotations/Basic/SGE_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using RotationSolver.Actions.BaseAction;
using RotationSolver.Data;
using RotationSolver.Helpers;
using RotationSolver.Rotations.CustomRotation;
using RotationSolver.Updaters;
using System.Linq;

Expand All @@ -16,6 +17,8 @@ internal abstract class SGE_Base : CustomRotation.CustomRotation
protected static byte Addersgall => JobGauge.Addersgall;

protected static byte Addersting => JobGauge.Addersting;
public override MedicineType MedicineType => MedicineType.Strength;


/// <summary>
/// 豆子倒计时还有多久能来一颗啊
Expand Down
4 changes: 4 additions & 0 deletions RotationSolver/Rotations/Basic/SMN_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using RotationSolver.Actions.BaseAction;
using RotationSolver.Attributes;
using RotationSolver.Data;
using RotationSolver.Rotations.CustomRotation;
using RotationSolver.Updaters;

namespace RotationSolver.Rotations.Basic;
Expand All @@ -11,6 +12,9 @@ internal abstract class SMN_Base : CustomRotation.CustomRotation
{
private static SMNGauge JobGauge => Service.JobGauges.Get<SMNGauge>();

public override MedicineType MedicineType => MedicineType.Strength;


/// <summary>
/// 有以太超流
/// </summary>
Expand Down
3 changes: 3 additions & 0 deletions RotationSolver/Rotations/Basic/WAR_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@
using RotationSolver.Attributes;
using RotationSolver.Data;
using RotationSolver.Helpers;
using RotationSolver.Rotations.CustomRotation;

namespace RotationSolver.Rotations.Basic;

internal abstract class WAR_Base : CustomRotation.CustomRotation
{
private static WARGauge JobGauge => Service.JobGauges.Get<WARGauge>();
public override MedicineType MedicineType => MedicineType.Strength;


public sealed override ClassJobID[] JobIDs => new ClassJobID[] { ClassJobID.Warrior, ClassJobID.Marauder };
private sealed protected override IBaseAction Shield => Defiance;
Expand Down
3 changes: 3 additions & 0 deletions RotationSolver/Rotations/Basic/WHM_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
using RotationSolver.Actions.BaseAction;
using RotationSolver.Data;
using RotationSolver.Helpers;
using RotationSolver.Rotations.CustomRotation;

namespace RotationSolver.Rotations.Basic;

internal abstract class WHM_Base : CustomRotation.CustomRotation
{
private static WHMGauge JobGauge => Service.JobGauges.Get<WHMGauge>();
public override MedicineType MedicineType => MedicineType.Mind;


/// <summary>
/// 百合花的数量
Expand Down
Loading

0 comments on commit 67c8795

Please sign in to comment.