Skip to content

Commit

Permalink
更新了QT时间轴设置,更改了ACR属性,修复了营救排除的BUFF
Browse files Browse the repository at this point in the history
  • Loading branch information
Airexplosion committed Mar 17, 2024
1 parent 3a5b44f commit 8f82f03
Show file tree
Hide file tree
Showing 6 changed files with 142 additions and 8 deletions.
2 changes: 2 additions & 0 deletions Sage/GCD/贤者GCD_贤炮.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ public int Check()
{ //虽然isredy包含,但等级不到还是不打
if (Core.Me.ClassLevel < 90) return -3;

if (!Qt.GetQt("贤炮开关")) return -5;

if (!SpellsDefine.Pneuma.IsReady()) return -10;//在冷却跳过

//不在移动 / 不需咏唱 才打
Expand Down
2 changes: 1 addition & 1 deletion Sage/GCD/贤者GCD_预后.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public int Check()

public void Build(Slot slot)
{
LogHelper.Print("准备群盾");
//LogHelper.Print("准备群盾");
//如果在移动
if (Core.Get<IMemApiMove>().IsMoving())
{ //但身上没群盾
Expand Down
56 changes: 56 additions & 0 deletions Sage/时间轴/CheckAddersgall.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
//using CombatRoutine.TriggerModel;
//using Common;
//using Common.Define;
//using Common.GUI;
//using Common.Language;
//using ImGuiNET;

//namespace 残光.贤者.时间轴
//{
// public class CheckAddersgall : ITriggerCond
// {
// public string Remark { get; set; }

// public CompareType CompareType = CompareType.LessEqual;

// public int Count;
// public string DisplayName => "贤/检测蛇胆".Loc();

// public void Check()
// {

// }

// public bool Draw()
// {
// ImGui.Text("蛇胆数量");
// ImGui.SameLine();
// ImGuiHelper.DrawEnum("", ref CompareType, size: 50, nameMap: CompareUtil.CompareTypeNameMap);
// ImGui.SameLine();
// ImGuiHelper.LeftInputInt("",ref Count);
// return true;
// }

// public bool Handle(ITriggerCondParams triggerCondParams)
// {
// var currValue = Core.Get<IMemApiSage>().Addersgall();
// switch (CompareType)
// {
// case CompareType.Equal:
// return currValue == Count;
// case CompareType.NotEqual:
// return currValue != Count;
// case CompareType.Greater:
// return currValue > Count ;
// case CompareType.GreaterEqual:
// return currValue >= Count ;
// case CompareType.Less:
// return currValue < Count ;
// case CompareType.LessEqual:
// return currValue <= Count ;
// default:
// throw new ArgumentOutOfRangeException();
// }
// }
// }
//}
70 changes: 70 additions & 0 deletions Sage/时间轴/SGE_Qt.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
using System.Numerics;
using CombatRoutine.TriggerModel;
using Common.Language;
using ImGuiNET;

namespace 残光.贤者.时间轴;

public class ZANSGEQt : ITriggerAction
{

public string DisplayName => "SGE/QT设置".Loc();

private int 当前combo = 0;

public string ValueName { get; set; } = new("");
public bool Value { get; set; } = new();

private int radioType;
private int radioCheck;

public string Remark { get; set; }
public void Check()
{
}

public bool Draw()
{
var qtArray = Qt.GetQtArray();
当前combo = Array.IndexOf(qtArray,ValueName);
if (当前combo == -1)
{
当前combo = 0;
}
radioCheck = Value?0:1;
//return false;
if (ImGui.BeginTabBar("###TriggerTab"))
{
if (ImGui.BeginTabItem("贤者"))
{
ImGui.BeginChild("###TriggerSage", new Vector2(0,0));

//选择类型
//ImGui.SetCursorPos(new Vector2(40,10));
ImGui.RadioButton("Qt", ref radioType, 0);
ImGui.NewLine();

ImGui.SetCursorPos(new Vector2(0,40));
if (radioType == 0)
{
ImGui.Combo("Qt开关",ref 当前combo,qtArray,qtArray.Length);
ValueName = qtArray[当前combo];
ImGui.RadioButton("开", ref radioCheck, 0);
ImGui.SameLine();
ImGui.RadioButton("关", ref radioCheck, 1);
Value = radioCheck == 0;
}
ImGui.EndChild();
ImGui.EndTabItem();
}
ImGui.EndTabBar();
}
return true;
}

public bool Handle()
{
Qt.SetQt(ValueName, Value);
return true;
}
}
4 changes: 2 additions & 2 deletions Sage/贤者热键调用.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public void Draw(Vector2 size)
public void DrawExternal(Vector2 size, bool isActive)
{
var RescueTarget = PartyHelper.CastableAlliesWithin30
.Where(r => r.CurrentHealth > 0 && !r.HasAura(2663) && !r.HasAura(7559) && !r.HasAura(7548))
.Where(r => r.CurrentHealth > 0 && !r.HasAura(2663) && !r.HasAura(1209) && !r.HasAura(1984) && !r.HasAura(160) && !r.HasAura(2345) && !r.HasAura(75) && !r.HasAura(712) && !r.HasAura(712) && !r.HasAura(1096) && !r.HasAura(1303))
.OrderBy(r => r.Distance(PartyHelper.CastableAlliesWithin30.FirstOrDefault()))
.LastOrDefault();

Expand All @@ -108,7 +108,7 @@ public void Run()
if (AI.Instance.BattleData.NextSlot == null)
AI.Instance.BattleData.NextSlot = new Slot();
var RescueTarget = PartyHelper.CastableAlliesWithin30
.Where(r => r.CurrentHealth > 0 && !r.HasAura(2663) && !r.HasAura(7559) && !r.HasAura(7548))
.Where(r => r.CurrentHealth > 0 && !r.HasAura(2663) && !r.HasAura(1209) && !r.HasAura(1984) && !r.HasAura(160) && !r.HasAura(2345) && !r.HasAura(75) && !r.HasAura(712) && !r.HasAura(1096) && !r.HasAura(1303))
.OrderBy(r => r.Distance(PartyHelper.CastableAlliesWithin30.FirstOrDefault()))
.LastOrDefault();
AI.Instance.BattleData.NextSlot.Add(new Spell(7571u, RescueTarget));
Expand Down
16 changes: 11 additions & 5 deletions 贤者基础条目.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Common.Language;
using Dalamud.Interface.Internal;
using ImGuiNET;
using 残光.贤者.时间轴;
using 残光.贤者;
using 残光.贤者.GCD;
using 残光.贤者.能力技;
Expand All @@ -31,12 +32,12 @@ public void DrawOverlay()
public string AuthorName { get; } = "Zanhikari";
public Jobs TargetJob { get; } = Jobs.Sage;

public AcrType AcrType { get; } = AcrType.Normal;
public AcrType AcrType { get; } = AcrType.Both;

public int MinLevel { get; } = 1;
public int MaxLevel { get; } = 90;

public string Description { get; } = "只适用于日随,请在ACR设置中设置奶量阈值。";
public string Description { get; } = "可能只适用于日随,或许可以打打不太难的高难(记得写时间轴),请在ACR设置中设置奶量阈值。";


public List<ISlotResolver> SlotResolvers = new()
Expand Down Expand Up @@ -74,9 +75,11 @@ public Rotation Build(string settingFolder)

.AddSettingUIs(new 贤者面板设置())
.AddSlotSequences()
.AddOpener(GetOpener);
//.AddTriggerAction(new ZanhikariSgeQt())
.AddOpener(GetOpener)
.AddTriggerAction(new ZANSGEQt());
//.AddTriggerCondition(new CheckAddersgall());
//.AddTriggerAction(new ZanhikariSgeQt())
//.AddTriggerCondition(new CheckAddersgall());
}
private IOpener opener90 = new 贤者90起手();
private IOpener opener90pne = new 贤者90贤炮起手();
Expand Down Expand Up @@ -123,10 +126,13 @@ public bool BuildQt(out JobViewWindow jobViewWindow)
jobViewWindow.AddQt("群盾", false);
jobViewWindow.AddQt("减伤", true);
jobViewWindow.AddQt("群奶", true);
jobViewWindow.AddQt("贤炮开关", true);
jobViewWindow.AddQt("单奶", true);
jobViewWindow.AddQt("自动康复", true);
jobViewWindow.AddQt("单盾", false);
jobViewWindow.AddQt("拉人发送消息", true);
jobViewWindow.AddQt("这俩凑数", true);
jobViewWindow.AddQt("用的开关", true);

//jobViewWindow.AddQt("失衡走位", false);

Expand All @@ -138,7 +144,7 @@ public bool BuildQt(out JobViewWindow jobViewWindow)
jobViewWindow.AddHotkey("防击退", new HotKeyResolver_NormalSpell(7559, SpellTargetType.Self, false));
jobViewWindow.AddHotkey("消化", new HotKeyResolver_NormalSpell(24301, SpellTargetType.Self, false));
jobViewWindow.AddHotkey("魂灵风息", new HotKeyResolver_NormalSpell(24318, SpellTargetType.Target, false));
jobViewWindow.AddHotkey("预后", new HotKeyResolver_NormalSpell(SpellsDefine.Prognosis, SpellTargetType.Target, false));
jobViewWindow.AddHotkey("预后", new HotKeyResolver_NormalSpell(SpellsDefine.Prognosis, SpellTargetType.Self, false));
// jobViewWindow.AddHotkey("群盾接消化", new HotkeyResolver_General("../../RotationPlugin/Zanhikari/Resources/群盾接消化.png",
//() =>
//{
Expand Down

0 comments on commit 8f82f03

Please sign in to comment.