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

Commit

Permalink
fix: change the lowBlow usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Feb 24, 2023
1 parent 8e39c5b commit eff8400
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using RotationSolver.Actions.BaseAction;
using RotationSolver.Data;
using RotationSolver.Helpers;
using RotationSolver.SigReplacers;
using RotationSolver.Updaters;
using System;
using System.Linq;
Expand Down Expand Up @@ -167,7 +168,13 @@ internal RoleAction(ActionID actionID, JobRole[] roles, bool isFriendly = false,
/// </summary>
public static IBaseAction LowBlow { get; } = new RoleAction(ActionID.LowBlow, new JobRole[] { JobRole.Tank })
{
ActionCheck = b => !b.IsBoss() && !MovingUpdater.IsMoving && b.CastActionId != 0 && !b.IsCastInterruptible,
ActionCheck = b =>
{
if (b.IsBoss() || MovingUpdater.IsMoving || b.CastActionId == 0) return false;

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

/// <summary>
Expand Down
4 changes: 3 additions & 1 deletion RotationSolver/Rotations/Healer/AST/AST_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@

namespace RotationSolver.Rotations.Healer.AST;

[RotationDesc(ActionID.Divination)]
[RotationDesc("This is a burst info", ActionID.Divination)]
internal sealed class AST_Default : AST_Base
{
public override string GameVersion => "6.28";

public override string RotationName => "Default";

public override string Description => "Here is an Example Description";
private protected override IRotationConfigSet CreateConfiguration()
=> base.CreateConfiguration()
.SetFloat("UseEarthlyStarTime", 15, "Use the Earthly Star in Count down time", 4, 20);
Expand All @@ -42,6 +43,7 @@ private protected override IAction CountDownAction(float remainTime)
return base.CountDownAction(remainTime);
}

[RotationDesc("Defence Single Description...\n Please use new line manually..")]
[RotationDesc(ActionID.CelestialIntersection, ActionID.Exaltation)]
private protected override bool DefenceSingleAbility(byte abilitiesRemaining, out IAction act)
{
Expand Down
38 changes: 30 additions & 8 deletions docs/RotationDev/customization.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@


# Customization

Want to write a better rotation? You need to customize it!
Expand Down Expand Up @@ -45,19 +47,39 @@ Sometimes, for saving the resource. We want to save the value to the field. But

## Description

More description about your rotation? Overrive the `DescriptionDict`.
More description about your rotation? Override the `Description`.

Here is an example in BRD:
Here is an example AST:

``` c#
public override SortedList<DescType, string> DescriptionDict => new()
{
{DescType.Description, "Please make sure that the three song times add up to 120 seconds!"},
{DescType.DefenseArea, $"{Troubadour}"},
{DescType.HealSingle, $"{NaturesMinne}"},
};
public override string Description => "Here is an Example Description.";
```

And for the macro special duration. You can use attribute called `RotationDesc` to describe it.

Burst Info should be attached on the class.

``` c#
[RotationDesc("This is a burst info", ActionID.Divination)]
internal sealed class AST_Default : AST_Base
{
//...
}
```

You can also separate it to describe, or just write one.

``` c#
[RotationDesc("Defence Single Description...\n Please use new line manually..")]
[RotationDesc(ActionID.CelestialIntersection, ActionID.Exaltation)]
private protected override bool DefenceSingleAbility(byte abilitiesRemaining, out IAction act)
{
//...
}
```

This is what it look like.



## RotationCheck
Expand Down

0 comments on commit eff8400

Please sign in to comment.