Skip to content

Commit 258c82e

Browse files
authored
Merge pull request #274 from FFXIV-CombatReborn/rsr-users-can-read-and-other-jokes-we-tell-ourselves
TLDR; UI pass for clarity and control, Dragoon base fix, new engage targeting mode, exposed TTK HP percentage to users.
2 parents 10871eb + dc009f3 commit 258c82e

File tree

12 files changed

+276
-386
lines changed

12 files changed

+276
-386
lines changed

RotationSolver.Basic/Configuration/Configs.cs

Lines changed: 112 additions & 121 deletions
Large diffs are not rendered by default.

RotationSolver.Basic/Configuration/Timeline/MoveTimelineItem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ internal override void OnEnable()
2323
{
2424
base.OnEnable();
2525

26-
if (!Service.Config.EnableTimelineMovement) return;
26+
return;
2727

2828
var ipc = Svc.PluginInterface.GetIpcSubscriber<List<Vector3>, bool, object>("vnavmesh.Path.MoveTo");
2929

@@ -39,7 +39,7 @@ internal override void OnDisable()
3939
{
4040
base.OnDisable();
4141

42-
if (!Service.Config.EnableTimelineMovement) return;
42+
return;
4343

4444
var ipc = Svc.PluginInterface.GetIpcSubscriber<object>("vnavmesh.Path.Stop");
4545
ipc?.InvokeAction();

RotationSolver.Basic/Data/TargetHostileType.cs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,25 @@
66
public enum TargetHostileType : byte
77
{
88
/// <summary>
9-
/// All
9+
/// All targets.
1010
/// </summary>
11-
[Description("All targets that are in range for any abilities")]
11+
[Description("All targets that are in range for any abilities (Tanks)")]
1212
AllTargetsCanAttack,
1313

1414
/// <summary>
1515
/// Have target.
1616
/// </summary>
17-
[Description("Previously engaged targets (engages on countdown timer)")]
17+
[Description("Previously engaged targets (Non-Tanks)")]
1818
TargetsHaveTarget,
1919

2020
/// <summary>
21-
/// ALl Targets When solo.
21+
/// All targets when solo .
22+
/// </summary>
23+
[Description("All targets when solo in duty, or previously engaged.")]
24+
AllTargetsWhenSoloInDuty,
25+
26+
/// <summary>
27+
/// All targets when solo.
2228
/// </summary>
2329
[Description("All targets when solo, or previously engaged.")]
2430
AllTargetsWhenSolo,

RotationSolver.Basic/Helpers/ObjectHelper.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using Dalamud.Game.ClientState.Objects.Enums;
1+
using Dalamud.Game.ClientState.Conditions;
2+
using Dalamud.Game.ClientState.Objects.Enums;
23
using Dalamud.Game.ClientState.Objects.SubKinds;
34
using Dalamud.Game.ClientState.Statuses;
45
using ECommons.DalamudServices;
@@ -118,7 +119,8 @@ internal static bool IsAttackable(this IBattleChara IBattleChara)
118119
{
119120
TargetHostileType.AllTargetsCanAttack => true,
120121
TargetHostileType.TargetsHaveTarget => IBattleChara.TargetObject is IBattleChara,
121-
TargetHostileType.AllTargetsWhenSolo => DataCenter.PartyMembers.Length < 2
122+
TargetHostileType.AllTargetsWhenSolo => DataCenter.PartyMembers.Length < 2 || IBattleChara.TargetObject is IBattleChara,
123+
TargetHostileType.AllTargetsWhenSoloInDuty => (DataCenter.PartyMembers.Length < 2 && Svc.Condition[ConditionFlag.BoundByDuty])
122124
|| IBattleChara.TargetObject is IBattleChara,
123125
_ => true,
124126
};
@@ -321,7 +323,7 @@ public static bool IsDying(this IBattleChara b)
321323
{
322324
if (b == null) return false;
323325
if (b.IsDummy()) return false;
324-
return b.GetTimeToKill() <= Service.Config.DyingTimeToKill || b.GetHealthRatio() < 0.02f;
326+
return b.GetTimeToKill() <= Service.Config.DyingTimeToKill || b.GetHealthRatio() < Service.Config.IsDyingConfig;
325327
}
326328

327329
internal static unsafe bool InCombat(this IBattleChara obj)
@@ -375,7 +377,7 @@ internal static bool IsAttacked(this IBattleChara b)
375377

376378
internal static unsafe bool CanSee(this IGameObject b)
377379
{
378-
var point = Player.Object.Position + Vector3.UnitY * Player.IGameObject->Height;
380+
var point = Player.Object.Position + Vector3.UnitY * Player.GameObject->Height;
379381
var tarPt = b.Position + Vector3.UnitY * b.Struct()->Height;
380382
var direction = tarPt - point;
381383

RotationSolver.Basic/Rotations/Basic/DragoonRotation.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static partial void ModifyPiercingTalonPvE(ref ActionSetting setting)
6363
static partial void ModifyDisembowelPvE(ref ActionSetting setting)
6464
{
6565
setting.ComboIds = [ActionID.TrueThrustPvE, ActionID.RaidenThrustPvE];
66-
setting.StatusProvide = [StatusID.PowerSurge];
66+
setting.StatusProvide = [StatusID.PowerSurge_2720];
6767
}
6868

6969
static partial void ModifyFullThrustPvE(ref ActionSetting setting)
@@ -161,7 +161,7 @@ static partial void ModifyGeirskogulPvE(ref ActionSetting setting)
161161
static partial void ModifySonicThrustPvE(ref ActionSetting setting)
162162
{
163163
setting.ComboIds = [ActionID.DraconianFuryPvE, ActionID.DoomSpikePvE];
164-
setting.StatusProvide = [StatusID.PowerSurge];
164+
setting.StatusProvide = [StatusID.PowerSurge_2720];
165165
setting.CreateConfig = () => new()
166166
{
167167
AoeCount = 2,
@@ -266,7 +266,7 @@ static partial void ModifyLanceBarragePvE(ref ActionSetting setting)
266266
static partial void ModifySpiralBlowPvE(ref ActionSetting setting)
267267
{
268268
setting.ComboIds = [ActionID.TrueThrustPvE, ActionID.RaidenThrustPvE];
269-
setting.StatusProvide = [StatusID.PowerSurge];
269+
setting.StatusProvide = [StatusID.PowerSurge_2720];
270270
}
271271

272272
static partial void ModifyStarcrossPvE(ref ActionSetting setting)
@@ -287,7 +287,7 @@ static partial void ModifyHighJumpPvP(ref ActionSetting setting)
287287

288288
/// <inheritdoc/>
289289
[RotationDesc(ActionID.FeintPvE)]
290-
protected sealed override bool DefenseAreaAbility(IAction nextGCD, out IAction? act)
290+
protected override bool DefenseAreaAbility(IAction nextGCD, out IAction? act)
291291
{
292292
if (FeintPvE.CanUse(out act)) return true;
293293
return false;

RotationSolver.Basic/Rotations/CustomRotation_GCD.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ partial class CustomRotation
108108

109109
IBaseAction.TargetOverride = TargetType.Death;
110110

111-
if (Service.Config.RaisePlayerByCasting && RaiseSpell(out act, true)) return act;
111+
if (Service.Config.RaisePlayerByCasting && SwiftcastPvE.Cooldown.IsCoolingDown && RaiseSpell(out act, true)) return act;
112112

113113
IBaseAction.TargetOverride = null;
114114

@@ -148,23 +148,22 @@ private bool RaiseSpell(out IAction? act, bool mustUse)
148148
{
149149
return true;
150150
}
151-
else if (mustUse)
151+
else if (Service.Config.RaisePlayerBySwift && !SwiftcastPvE.Cooldown.IsCoolingDown)
152152
{
153-
var action = act;
154153
if (SwiftcastPvE.CanUse(out act))
155154
{
156155
return true;
157156
}
158-
else if (!IsMoving)
157+
}
158+
else if (mustUse)
159+
{
160+
var action = act;
161+
if (!IsMoving)
159162
{
160163
act = action;
161164
return true;
162165
}
163166
}
164-
else if (Service.Config.RaisePlayerBySwift && !SwiftcastPvE.Cooldown.IsCoolingDown)
165-
{
166-
return true;
167-
}
168167
}
169168

170169
return false;
@@ -178,6 +177,7 @@ bool RaiseAction(out IAction act, bool ignoreCastingCheck)
178177
}
179178
}
180179

180+
181181
/// <summary>
182182
/// The gcd for raising.
183183
/// </summary>

0 commit comments

Comments
 (0)