Skip to content

Commit

Permalink
Merge pull request #402 from Four-amer/main
Browse files Browse the repository at this point in the history
New method + viper changes
  • Loading branch information
LTS-FFXIV authored Sep 23, 2024
2 parents 62d7408 + ee7dd85 commit b2a6661
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Helpers/ObjectHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ public static float GetHealthRatio(this IGameObject g)
/// <returns>
/// An <see cref="EnemyPositional"/> value indicating whether the player is in front, at the rear, or on the flank of the enemy.
/// </returns>
internal static EnemyPositional FindEnemyPositional(this IGameObject enemy)
public static EnemyPositional FindEnemyPositional(this IGameObject enemy)
{
if (enemy == null || Player.Object == null) return EnemyPositional.None;

Expand Down
4 changes: 2 additions & 2 deletions RotationSolver.Basic/Rotations/Basic/ViperRotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -368,12 +368,12 @@ static partial void ModifyVicewinderPvE(ref ActionSetting setting)

static partial void ModifyHuntersCoilPvE(ref ActionSetting setting)
{
setting.ActionCheck = () => DreadCombo == DreadCombo.Dreadwinder && SerpentCombo == SerpentCombo.NONE;
setting.ActionCheck = () => (DreadCombo == DreadCombo.Dreadwinder || DreadCombo == DreadCombo.SwiftskinsCoil) && SerpentCombo == SerpentCombo.NONE;
}

static partial void ModifySwiftskinsCoilPvE(ref ActionSetting setting)
{
setting.ActionCheck = () => DreadCombo == DreadCombo.HuntersCoil && SerpentCombo == SerpentCombo.NONE;
setting.ActionCheck = () => (DreadCombo == DreadCombo.Dreadwinder || DreadCombo == DreadCombo.HuntersCoil) && SerpentCombo == SerpentCombo.NONE;
}

static partial void ModifyVicepitPvE(ref ActionSetting setting)
Expand Down
18 changes: 18 additions & 0 deletions RotationSolver.Basic/Rotations/CustomRotation_OtherInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,24 @@ partial class CustomRotation
/// </summary>
protected static IBattleChara? HostileTarget => DataCenter.HostileTarget;


/// <summary>
/// Is player in position to hit the positional?
/// </summary>
/// <param name="positional"> Which Positional? "Flank" or "Rear"?</param>
/// <param name="enemy"></param>
/// <returns></returns>
public static bool CanHitPositional(EnemyPositional positional, IBattleChara enemy)
{
if (enemy == null) return false;

EnemyPositional enemy_positional = enemy.FindEnemyPositional();

if (enemy_positional == positional)
return true;
return false;
}

/// <summary>
/// Is there any hostile target in range? 25 for ranged jobs and healer, 3 for melee and tank.
/// </summary>
Expand Down

0 comments on commit b2a6661

Please sign in to comment.