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

Commit

Permalink
fix: add bozja actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Oct 4, 2023
1 parent 73f101b commit c489f6d
Show file tree
Hide file tree
Showing 6 changed files with 351 additions and 3 deletions.
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Actions/BaseAction_BasicInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public partial class BaseAction : IBaseAction
/// <summary>
/// Is this duty action on the slot.
/// </summary>
public bool IsDutyActionOnSlot => DataCenter.BluSlots.Contains(AdjustedID);
public bool IsDutyActionOnSlot => DataCenter.DutyActions.Contains(AdjustedID);

/// <summary>
/// How many gcd left to add the dot.
Expand Down
3 changes: 3 additions & 0 deletions RotationSolver.Basic/Configuration/MacroInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ public unsafe bool AddMacro(GameObject tar = null)

try
{
#if DEBUG
#else
var shared = RaptureMacroModule.Instance()->SharedSpan[MacroIndex];
var individual = RaptureMacroModule.Instance()->IndividualSpan[MacroIndex];

DataCenter.Macros.Enqueue(new MacroItem(tar, IsShared ? &shared : &individual));
#endif
return true;
}
catch (Exception ex)
Expand Down
75 changes: 74 additions & 1 deletion RotationSolver.Basic/Data/ActionID.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3562,7 +3562,7 @@ public enum ActionID : uint
Sprint = 3,
#endregion

#region VariantActions
#region Variant Actions
/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -3608,4 +3608,77 @@ public enum ActionID : uint
/// </summary>
VariantRampart2 = 33864,
#endregion

#region Bozja Actions

/// <summary>
///
/// </summary>
LostSpellforge = 20706,

/// <summary>
///
/// </summary>
LostSteelsting = 20707,

/// <summary>
///
/// </summary>
LostRampage = 23910,

/// <summary>
///
/// </summary>
LostBurst = 23909,

/// <summary>
///
/// </summary>
LostBravery = 20713,

/// <summary>
///
/// </summary>
LostProtect = 20719,

/// <summary>
///
/// </summary>
LostShell = 20710,

/// <summary>
///
/// </summary>
LostProtect2 = 23915,

/// <summary>
///
/// </summary>
LostShell2 = 23916,

/// <summary>
///
/// </summary>
LostBubble = 23917,

/// <summary>
///
/// </summary>
LostStoneskin = 20712,

/// <summary>
///
/// </summary>
LostStoneskin2 = 23908,

/// <summary>
///
/// </summary>
LostFlarestar = 22352,

/// <summary>
///
/// </summary>
LostSeraphStrike = 22354,
#endregion
}
76 changes: 76 additions & 0 deletions RotationSolver.Basic/Data/StatusID.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1356,4 +1356,80 @@ public enum StatusID : ushort
///
/// </summary>
CollectiveUnconscious = 849,

/// <summary>
///
/// </summary>
LostSpellforge = 2338,

/// <summary>
///
/// </summary>
MagicalAversion = 2370,

/// <summary>
///
/// </summary>
LostSteelsting = 2339,

/// <summary>
///
/// </summary>
PhysicalAversion = 2369,

/// <summary>
///
/// </summary>
LostRampage = 2559,

/// <summary>
///
/// </summary>
LostBurst = 2558,

/// <summary>
///
/// </summary>
LostBravery = 2341,

/// <summary>
///
/// </summary>
LostProtect = 2333,

/// <summary>
///
/// </summary>
LostShell = 2334,

/// <summary>
///
/// </summary>
LostProtect2 = 2561,

/// <summary>
///
/// </summary>
LostShell2 = 2562,

/// <summary>
///
/// </summary>
LostBubble = 2563,

/// <summary>
///
/// </summary>
LostStoneskin = 151,

/// <summary>
///
/// </summary>
LostFlarestar = 2440,

/// <summary>
///
/// </summary>
LostSeraphStrike = 2484,

}
176 changes: 175 additions & 1 deletion RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using ECommons.GameFunctions;
using ECommons.ExcelServices;
using ECommons.GameFunctions;
using RotationSolver.Basic.Traits;

namespace RotationSolver.Basic.Rotations;
Expand Down Expand Up @@ -286,6 +287,179 @@ public override bool CanUse(out IAction act, CanUseOption option = CanUseOption.
/// </summary>
public static IBaseAction VariantRampart2 { get; } = new RoleAction(ActionID.VariantRampart2,
new JobRole[] { JobRole.Melee, JobRole.Healer, JobRole.RangedMagical, JobRole.RangedPhysical }, ActionOption.Buff | ActionOption.DutyAction);

/// <summary>
///
/// </summary>
public static IBaseAction LostSpellforge { get; } = new BaseAction(ActionID.LostSpellforge,
ActionOption.DutyAction | ActionOption.Friendly)
{
StatusProvide = new StatusID[] {StatusID.LostSpellforge },
ActionCheck = (b, m) => Target?.HasStatus(false, StatusID.MagicalAversion) ?? false,
ChoiceTarget = (targets, mustUse) => targets.FirstOrDefault(t =>
{
switch((Job)t.ClassJob.Id)
{
case Job.WAR:
case Job.GNB:
case Job.MNK:
case Job.SAM:
case Job.DRG:
case Job.MCH:
case Job.DNC:

case Job.PLD:
case Job.DRK:
case Job.NIN:
case Job.BRD:
case Job.RDM:
return true;
}
return false;
}),
};

/// <summary>
///
/// </summary>
public static IBaseAction LostSteelsting { get; } = new BaseAction(ActionID.LostSteelsting,
ActionOption.DutyAction | ActionOption.Friendly)
{
StatusProvide = new StatusID[] { StatusID.LostSteelsting },
ActionCheck = (b, m) => Target?.HasStatus(false, StatusID.PhysicalAversion) ?? false,
ChoiceTarget = (targets, mustUse) => targets.FirstOrDefault(t =>
{
switch ((Job)t.ClassJob.Id)
{
case Job.WHM:
case Job.SCH:
case Job.AST:
case Job.SGE:
case Job.BLM:
case Job.SMN:

case Job.PLD:
case Job.DRK:
case Job.NIN:
case Job.BRD:
case Job.RDM:
return true;
}

return false;
}),
};

/// <summary>
///
/// </summary>
public static IBaseAction LostRampage { get; } = new BaseAction(ActionID.LostRampage,
ActionOption.DutyAction | ActionOption.Friendly)
{
StatusProvide = new StatusID[] { StatusID.LostRampage },
ActionCheck = (b, m) => Target?.HasStatus(false, StatusID.PhysicalAversion) ?? false,
};

/// <summary>
///
/// </summary>
public static IBaseAction LostBurst { get; } = new BaseAction(ActionID.LostBurst,
ActionOption.DutyAction | ActionOption.Friendly)
{
StatusProvide = new StatusID[] { StatusID.LostBurst },
ActionCheck = (b, m) => Target?.HasStatus(false, StatusID.MagicalAversion) ?? false,
};

/// <summary>
///
/// </summary>
public static IBaseAction LostBravery { get; } = new BaseAction(ActionID.LostBravery,
ActionOption.DutyAction | ActionOption.Friendly)
{
StatusProvide = new StatusID[] { StatusID.LostBravery },
};

/// <summary>
///
/// </summary>
public static IBaseAction LostProtect { get; } = new BaseAction(ActionID.LostProtect,
ActionOption.DutyAction | ActionOption.Friendly)
{
StatusProvide = new StatusID[] { StatusID.LostProtect, StatusID.LostProtect2 },
};

/// <summary>
///
/// </summary>
public static IBaseAction LostShell { get; } = new BaseAction(ActionID.LostShell,
ActionOption.DutyAction | ActionOption.Friendly)
{
StatusProvide = new StatusID[] { StatusID.LostShell, StatusID.LostShell2 },
};

/// <summary>
///
/// </summary>
public static IBaseAction LostProtect2 { get; } = new BaseAction(ActionID.LostProtect2,
ActionOption.DutyAction | ActionOption.Friendly)
{
StatusProvide = new StatusID[] { StatusID.LostProtect2 },
};

/// <summary>
///
/// </summary>
public static IBaseAction LostShell2 { get; } = new BaseAction(ActionID.LostShell2,
ActionOption.DutyAction | ActionOption.Friendly)
{
StatusProvide = new StatusID[] { StatusID.LostShell2 },
};

/// <summary>
///
/// </summary>
public static IBaseAction LostBubble { get; } = new BaseAction(ActionID.LostBubble,
ActionOption.DutyAction | ActionOption.Friendly)
{
StatusProvide = new StatusID[] { StatusID.LostBubble },
};

/// <summary>
///
/// </summary>
public static IBaseAction LostStoneskin { get; } = new BaseAction(ActionID.LostStoneskin,
ActionOption.DutyAction | ActionOption.Defense)
{
ChoiceTarget = TargetFilter.FindAttackedTarget,
StatusProvide = new StatusID[] { StatusID.LostStoneskin },
};

/// <summary>
///
/// </summary>
public static IBaseAction LostStoneskin2 { get; } = new BaseAction(ActionID.LostStoneskin2,
ActionOption.DutyAction | ActionOption.Defense)
{
StatusProvide = new StatusID[] { StatusID.LostStoneskin },
};

/// <summary>
///
/// </summary>
public static IBaseAction LostFlarestar { get; } = new BaseAction(ActionID.LostFlarestar,
ActionOption.DutyAction)
{
StatusProvide = new StatusID[] { StatusID.LostFlarestar },
};

/// <summary>
///
/// </summary>
public static IBaseAction LostSeraphStrike { get; } = new BaseAction(ActionID.LostSeraphStrike,
ActionOption.DutyAction)
{
StatusProvide = new StatusID[] { StatusID.LostSeraphStrike },
};
#endregion

IBaseAction[] _allBaseActions;
Expand Down
Loading

0 comments on commit c489f6d

Please sign in to comment.