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 rotation of MNK.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Mar 26, 2023
1 parent 22369fb commit 4a89575
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 23 deletions.
6 changes: 5 additions & 1 deletion RotationSolver.Basic/Actions/IAction.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
namespace RotationSolver.Basic.Actions;
using System.ComponentModel;

namespace RotationSolver.Basic.Actions;

public interface IAction : ITexture
{
bool Use();
uint ID { get; }
uint AdjustedID { get; }
float RecastTimeOneCharge { get; }

[EditorBrowsable(EditorBrowsableState.Never)]
float RecastTimeElapsed { get; }
bool IsCoolingDown { get; }

Expand Down
1 change: 1 addition & 0 deletions RotationSolver.Basic/Actions/IBaseAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public interface IBaseAction : IAction
/// <param name="remain"></param>
/// <returns></returns>
bool WillHaveOneCharge(float remain);

#endregion

#region Target
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Data/StatusID.cs
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ public enum StatusID : ushort
/// <summary>
/// 红莲极意
/// </summary>
RiddleofFire = 1181,
RiddleOfFire = 1181,

/// <summary>
/// 义结金兰:攻击
Expand Down
3 changes: 2 additions & 1 deletion RotationSolver.Basic/Helpers/ObjectHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ public static unsafe bool IsOthersPlayers(this GameObject obj)

public static unsafe bool IsNPCEnemy(this GameObject obj)
=> obj.GetObjectKind() == ObjectKind.BattleNpc
&& (byte)obj.GetBattleNPCSubKind() is (byte)BattleNpcSubKind.Enemy or 1;
&& (byte)obj.GetBattleNPCSubKind() is (byte)BattleNpcSubKind.Enemy or 1
&& ActionManager.CanUseActionOnTarget((uint)ActionID.Blizzard, obj.GetAddress());


public static unsafe ObjectKind GetObjectKind(this GameObject obj) => (ObjectKind)obj.GetAddress()->ObjectKind;
Expand Down
10 changes: 5 additions & 5 deletions RotationSolver.Basic/Rotations/Basic/MNK_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public abstract class MNK_Base : CustomRotation
/// <summary>
/// 破坏神脚 aoe
/// </summary>
public static IBaseAction ShadowoftheDestroyer { get; } = new BaseAction(ActionID.ShadowoftheDestroyer);
public static IBaseAction ShadowOfTheDestroyer { get; } = new BaseAction(ActionID.ShadowoftheDestroyer);

/// <summary>
/// 双掌打 伤害提高
Expand All @@ -67,15 +67,15 @@ public abstract class MNK_Base : CustomRotation
/// <summary>
/// 四面脚 aoe
/// </summary>
public static IBaseAction FourpointFury { get; } = new BaseAction(ActionID.FourpointFury);
public static IBaseAction FourPointFury { get; } = new BaseAction(ActionID.FourpointFury);

/// <summary>
/// 破碎拳
/// </summary>
public static IBaseAction Demolish { get; } = new BaseAction(ActionID.Demolish, isEot: true)
{
TargetStatus = new StatusID[] { StatusID.Demolish },
GetDotGcdCount = () => 2,
GetDotGcdCount = () => 3,
};

/// <summary>
Expand All @@ -86,7 +86,7 @@ public abstract class MNK_Base : CustomRotation
/// <summary>
/// 地烈劲 aoe
/// </summary>
public static IBaseAction Rockbreaker { get; } = new BaseAction(ActionID.Rockbreaker);
public static IBaseAction RockBreaker { get; } = new BaseAction(ActionID.Rockbreaker);

/// <summary>
/// 斗气
Expand Down Expand Up @@ -117,7 +117,7 @@ public abstract class MNK_Base : CustomRotation
/// <summary>
/// 红莲极意 提高dps
/// </summary>
public static IBaseAction RiddleofFire { get; } = new BaseAction(ActionID.RiddleofFire, true);
public static IBaseAction RiddleOfFire { get; } = new BaseAction(ActionID.RiddleofFire, true);

/// <summary>
/// 突进技能
Expand Down
26 changes: 14 additions & 12 deletions RotationSolver.Default/Melee/MNK_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace RotationSolver.Default.Melee;
[LinkDescription("https://i.imgur.com/C5lQhpe.png")]
public sealed class MNK_Default : MNK_Base
{
public override string GameVersion => "6.31";
public override string GameVersion => "6.35";

public override string RotationName => "LunarSolarOpener";

Expand All @@ -19,7 +19,6 @@ protected override IAction CountDownAction(float remainTime)
if (remainTime < 0.2)
{
if (Thunderclap.CanUse(out var act, true, true)) return act;
if (Thunderclap.CanUse(out act, false, true)) return act;
}
if (remainTime < 15)
{
Expand All @@ -38,18 +37,20 @@ private static bool OpoOpoForm(out IAction act)
return false;
}


private static bool RaptorForm(out IAction act)
{
if (FourpointFury.CanUse(out act)) return true;
if (Player.WillStatusEndGCD(3, 0, true, StatusID.DisciplinedFist) && TwinSnakes.CanUse(out act)) return true;
if (FourPointFury.CanUse(out act)) return true;
if ((Player.WillStatusEndGCD(3, 0, true, StatusID.DisciplinedFist)
|| Player.WillStatusEndGCD(6, 0, true, StatusID.DisciplinedFist)
&& (Player.HasStatus(false, StatusID.RiddleOfFire) || RiddleOfFire.WillHaveOneChargeGCD(3))
) && TwinSnakes.CanUse(out act)) return true;
if (TrueStrike.CanUse(out act)) return true;
return false;
}

private static bool CoerlForm(out IAction act)
{
if (Rockbreaker.CanUse(out act)) return true;
if (RockBreaker.CanUse(out act)) return true;
if (Demolish.CanUse(out act)) return true;
if (SnapPunch.CanUse(out act)) return true;
return false;
Expand Down Expand Up @@ -95,7 +96,7 @@ static bool PerfectBalanceActions(out IAction act)
if (ElixirField.CanUse(out act, mustUse: true)) return true;
}
}
else if (Player.HasStatus(true, StatusID.PerfectBalance) && Level >= 60)
else if (Player.HasStatus(true, StatusID.PerfectBalance) && ElixirField.EnoughLevel)
{
//Some time, no choice
if (HasSolar)
Expand Down Expand Up @@ -162,19 +163,20 @@ protected override bool AttackAbility(byte abilitiesRemaining, out IAction act)
if (abilitiesRemaining == 1 && InCombat)
{
if (UseBurstMedicine(out act)) return true;
if (InBurst && !CombatElapsedLess(5) && RiddleofFire.CanUse(out act)) return true;
if (InBurst && !CombatElapsedLessGCD(2) && RiddleOfFire.CanUse(out act)) return true;
}

if (CombatElapsedLess(8)) return false;

if (Brotherhood.CanUse(out act)) return true;
if (CombatElapsedLessGCD(3)) return false;

if (BeastChakras.Contains(BeastChakra.NONE) && Player.HasStatus(true, StatusID.RaptorForm)
&& (!RiddleofFire.EnoughLevel || Player.HasStatus(false, StatusID.RiddleofFire)))
&& (!RiddleOfFire.EnoughLevel || Player.HasStatus(false, StatusID.RiddleOfFire)
|| RiddleOfFire.WillHaveOneChargeGCD(3) && (PerfectBalance.ElapsedAfter(60) || !PerfectBalance.IsCoolingDown)))
{
if (PerfectBalance.CanUse(out act, emptyOrSkipCombo: true)) return true;
}

if (Brotherhood.CanUse(out act)) return true;

if (RiddleofWind.CanUse(out act)) return true;

if (HowlingFist.CanUse(out act)) return true;
Expand Down
6 changes: 3 additions & 3 deletions RotationSolver.Old/Melee/MNK_Old.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ private bool OpoOpoForm(out IAction act)

private bool RaptorForm(out IAction act)
{
if (FourpointFury.CanUse(out act)) return true;
if (FourPointFury.CanUse(out act)) return true;

if (Player.WillStatusEndGCD(3, 0, true, StatusID.DisciplinedFist) && TwinSnakes.CanUse(out act)) return true;

Expand All @@ -33,7 +33,7 @@ private bool RaptorForm(out IAction act)

private bool CoerlForm(out IAction act)
{
if (Rockbreaker.CanUse(out act)) return true;
if (RockBreaker.CanUse(out act)) return true;
if (Demolish.CanUse(out act)) return true;
if (SnapPunch.CanUse(out act)) return true;
return false;
Expand Down Expand Up @@ -111,7 +111,7 @@ protected override bool AttackAbility(byte abilitiesRemaining, out IAction act)
{
if (InBurst)
{
if (RiddleofFire.CanUse(out act)) return true;
if (RiddleOfFire.CanUse(out act)) return true;
if (Brotherhood.CanUse(out act)) return true;
}

Expand Down

0 comments on commit 4a89575

Please sign in to comment.