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

Commit

Permalink
fix: updated template.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Aug 23, 2023
1 parent 2d30001 commit 7ef8cc1
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 25 deletions.
21 changes: 14 additions & 7 deletions RotationSolver.Basic/Helpers/StatusHelper.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Dalamud.Game.ClientState.Statuses;
using Dalamud.Logging;
using ECommons.Automation;
using ECommons.ExcelServices;
using ECommons.GameHelpers;
Expand Down Expand Up @@ -96,13 +97,19 @@ public static bool WillStatusEnd(this BattleChara obj, float time, bool isFromSe
/// <param name="isFromSelf"></param>
/// <param name="statusIDs"></param>
/// <returns></returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public static float StatusTime(this BattleChara obj, bool isFromSelf, params StatusID[] statusIDs)
{
if (DataCenter.HasApplyStatus(obj?.ObjectId ?? 0, statusIDs)) return float.MaxValue;
var times = obj.StatusTimes(isFromSelf, statusIDs);
if (times == null || !times.Any()) return 0;
return Math.Max(0, times.Min() - DataCenter.WeaponRemain);
internal static float StatusTime(this BattleChara obj, bool isFromSelf, params StatusID[] statusIDs)
{
try
{
if (DataCenter.HasApplyStatus(obj?.ObjectId ?? 0, statusIDs)) return float.MaxValue;
var times = obj.StatusTimes(isFromSelf, statusIDs);
if (times == null || !times.Any()) return 0;
return Math.Max(0, times.Min() - DataCenter.WeaponRemain);
}
catch
{
return 0;
}
}

private static IEnumerable<float> StatusTimes(this BattleChara obj, bool isFromSelf, params StatusID[] statusIDs)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
namespace RotationSolver.ItemTemplates;


// RotationDesc here is used to display burst actions, indicating that if 'Auto Burst' is not turned on, the actions will not be released
[RotationDesc(ActionID.None)]
// Link to the Ratation source code
[SourceCode(Path = "main/DefaultRotations/Melee/NIN_Default.cs")]
[SourceCode(Path = "%Branch/FilePath to your sourse code% eg. main/DefaultRotations/Melee/NIN_Default.cs%")]
// The detailed or extended description links of this Ratation, such as loop diagrams, recipe urls, teaching videos, etc.,
// can be written more than one
[LinkDescription("https://www.thebalanceffxiv.com/img/jobs/nin/earlymug3.png")]
[LinkDescription("https://www.thebalanceffxiv.com/img/jobs/nin/nininfographicwindows.png")]
[LinkDescription("https://docs.google.com/spreadsheets/u/0/d/1BZZrqWMRrugCeiBICEgjCz2vRNXt_lRTxPnSQr24Em0/htmlview#",
"Under the “Planner (With sample section)”")]
[LinkDescription("%Link to the pics or just a link%", "%Description about your rotation.%")]
[YoutubeLink(ID = "%If you got a youtube video link, please add here, just video id!%")]

//For the case your rotation is still beta.
[BetaRotation]

// Change this base class to your job's base class. It is named like XXX_Base.
internal class Full_Template : AST_Base
Expand Down Expand Up @@ -90,7 +92,7 @@ protected override bool GeneralAbility(out IAction act)

protected override bool AttackAbility(out IAction act)
{
throw new NotImplementedException();
return base.AttackAbility(out act);
}

//For some 0gcds very important, even more than healing, defense, interrupt, etc.
Expand Down Expand Up @@ -191,6 +193,7 @@ public override void DisplayStatus()
{
base.DisplayStatus();
}

// Modify this bool to display your DisplayStatus on the Formal Page.
public override bool ShowStatus => base.ShowStatus;
#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="RotationSolver.Basic" Version="3.2.3.2" />
<PackageReference Include="RotationSolver.Basic" Version="3.2.6" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
namespace RotationSolver.ItemTemplates;

// RotationDesc here is used to display burst actions, indicating that if 'Auto Burst' is not turned on, the actions will not be released
[RotationDesc(ActionID.Lightspeed)]
// Link to the Ratation source code
[SourceCode(Path = "main/DefaultRotations/Melee/NIN_Default.cs")]
[SourceCode(Path = "%Branch/FilePath to your sourse code% eg. main/DefaultRotations/Melee/NIN_Default.cs%")]
// The detailed or extended description links of this Ratation, such as loop diagrams, recipe urls, teaching videos, etc.,
// can be written more than one
[LinkDescription("https://www.thebalanceffxiv.com/img/jobs/nin/earlymug3.png")]
[LinkDescription("https://www.thebalanceffxiv.com/img/jobs/nin/nininfographicwindows.png")]
[LinkDescription("https://docs.google.com/spreadsheets/u/0/d/1BZZrqWMRrugCeiBICEgjCz2vRNXt_lRTxPnSQr24Em0/htmlview#",
"Under the “Planner (With sample section)”")]
[LinkDescription("%Link to the pics or just a link%", "%Description about your rotation.%")]
[YoutubeLink(ID ="%If you got a youtube video link, please add here, just video id!%")]


// Change this base class to your job's base class. It is named like XXX_Base.
public class Simple_Template : AST_Base
Expand All @@ -29,6 +26,6 @@ protected override bool GeneralGCD(out IAction act)
//0GCD actions here.
protected override bool AttackAbility(out IAction act)
{
throw new NotImplementedException();
return base.AttackAbility(out act);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="RotationSolver.Basic" Version="3.2.3.2" />
<PackageReference Include="RotationSolver.Basic" Version="3.2.6" />
</ItemGroup>

<ItemGroup>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?xml version="1.0" ?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="5b5d55b8-3641-45dc-97ba-98f49408c39c" Version="1.41" Language="en-US" Publisher="秋水" />
<Identity Id="5b5d55b8-3641-45dc-97ba-98f49408c39c" Version="1.5" Language="en-US" Publisher="秋水" />
<DisplayName>RotationSolver Templates</DisplayName>
<Description xml:space="preserve">A rotation development template for rotation solver</Description>
<ReleaseNotes>First release.</ReleaseNotes>
<Icon>RotationSolverIcon_128.png</Icon>
<PreviewImage>RotationSolverIcon_128.png</PreviewImage>
<Tags>FFXIV, FF14, Dalamud, Rotation</Tags>
Expand Down

0 comments on commit 7ef8cc1

Please sign in to comment.