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

Commit

Permalink
fix: fixed the interrupt targeting andLowBlow targeting.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Mar 17, 2023
1 parent bb8f8f7 commit 54b523b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
4 changes: 2 additions & 2 deletions RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ private bool AntiKnockback(JobRole role, SpecialCommandType specialType, out IAc
if (ArmsLength.CanUse(out act)) return true;
break;
case JobRole.Healer:
if (Surecast.CanUse(out act)) return true;
if (SureCast.CanUse(out act)) return true;
break;
case JobRole.RangedPhysical:
if (ArmsLength.CanUse(out act)) return true;
break;
case JobRole.RangedMagical:
if (Surecast.CanUse(out act)) return true;
if (SureCast.CanUse(out act)) return true;
break;
}

Expand Down
21 changes: 15 additions & 6 deletions RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,36 +160,45 @@ internal RoleAction(ActionID actionID, JobRole[] roles, bool isFriendly = false,
/// <summary>
/// 插言
/// </summary>
public static IBaseAction Interject { get; } = new RoleAction(ActionID.Interject, new JobRole[] { JobRole.Tank });
public static IBaseAction Interject { get; } = new RoleAction(ActionID.Interject, new JobRole[] { JobRole.Tank })
{
FilterForHostiles = b => b.Where(ObjectHelper.CanInterrupt),
};

/// <summary>
/// 下踢
/// </summary>
public static IBaseAction LowBlow { get; } = new RoleAction(ActionID.LowBlow, new JobRole[] { JobRole.Tank })
{
ActionCheck = b =>
FilterForHostiles = bs => bs.Where(b =>
{
if (b.IsBoss() || IsMoving || b.CastActionId == 0) return false;

if (!b.IsCastInterruptible || Interject.IsCoolingDown) return true;
return false;
}
}),
};

/// <summary>
/// 扫腿
/// </summary>
public static IBaseAction LegSweep { get; } = new RoleAction(ActionID.LegSweep, new JobRole[] { JobRole.Melee });
public static IBaseAction LegSweep { get; } = new RoleAction(ActionID.LegSweep, new JobRole[] { JobRole.Melee })
{
FilterForHostiles = b => b.Where(ObjectHelper.CanInterrupt),
};

/// <summary>
/// 伤头
/// </summary>
public static IBaseAction HeadGraze { get; } = new RoleAction(ActionID.HeadGraze, new JobRole[] { JobRole.RangedPhysical });
public static IBaseAction HeadGraze { get; } = new RoleAction(ActionID.HeadGraze, new JobRole[] { JobRole.RangedPhysical })
{
FilterForHostiles = b => b.Where(ObjectHelper.CanInterrupt),
};

/// <summary>
/// 沉稳咏唱
/// </summary>
public static IBaseAction Surecast { get; } = new RoleAction(ActionID.Surecast,
public static IBaseAction SureCast { get; } = new RoleAction(ActionID.Surecast,
new JobRole[] { JobRole.RangedMagical, JobRole.Healer }, true, shouldEndSpecial: true);

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/RotationSolverPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public unsafe RotationSolverPlugin(DalamudPluginInterface pluginInterface)
File.ReadAllText(Service.Interface.ConfigFile.FullName))
?? new PluginConfiguration();
}
catch(Exception ex)
catch()
{
Service.Config = new PluginConfiguration();
}
Expand Down

0 comments on commit 54b523b

Please sign in to comment.