From 8f82f0332c9086c03e96235ca4cdd01d96c3365c Mon Sep 17 00:00:00 2001 From: Zanko Date: Sun, 17 Mar 2024 22:40:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BA=86QT=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E8=BD=B4=E8=AE=BE=E7=BD=AE=EF=BC=8C=E6=9B=B4=E6=94=B9=E4=BA=86?= =?UTF-8?q?ACR=E5=B1=9E=E6=80=A7=EF=BC=8C=E4=BF=AE=E5=A4=8D=E4=BA=86?= =?UTF-8?q?=E8=90=A5=E6=95=91=E6=8E=92=E9=99=A4=E7=9A=84BUFF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...50\200\205GCD_\350\264\244\347\202\256.cs" | 2 + ...50\200\205GCD_\351\242\204\345\220\216.cs" | 2 +- .../CheckAddersgall.cs" | 56 +++++++++++++++ .../SGE_Qt.cs" | 70 +++++++++++++++++++ ...55\351\224\256\350\260\203\347\224\250.cs" | 4 +- ...72\347\241\200\346\235\241\347\233\256.cs" | 16 +++-- 6 files changed, 142 insertions(+), 8 deletions(-) create mode 100644 "Sage/\346\227\266\351\227\264\350\275\264/CheckAddersgall.cs" create mode 100644 "Sage/\346\227\266\351\227\264\350\275\264/SGE_Qt.cs" diff --git "a/Sage/GCD/\350\264\244\350\200\205GCD_\350\264\244\347\202\256.cs" "b/Sage/GCD/\350\264\244\350\200\205GCD_\350\264\244\347\202\256.cs" index 49bb725..42b1d41 100644 --- "a/Sage/GCD/\350\264\244\350\200\205GCD_\350\264\244\347\202\256.cs" +++ "b/Sage/GCD/\350\264\244\350\200\205GCD_\350\264\244\347\202\256.cs" @@ -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;//在冷却跳过 //不在移动 / 不需咏唱 才打 diff --git "a/Sage/GCD/\350\264\244\350\200\205GCD_\351\242\204\345\220\216.cs" "b/Sage/GCD/\350\264\244\350\200\205GCD_\351\242\204\345\220\216.cs" index fcd3544..d391fbb 100644 --- "a/Sage/GCD/\350\264\244\350\200\205GCD_\351\242\204\345\220\216.cs" +++ "b/Sage/GCD/\350\264\244\350\200\205GCD_\351\242\204\345\220\216.cs" @@ -53,7 +53,7 @@ public int Check() public void Build(Slot slot) { - LogHelper.Print("准备群盾"); + //LogHelper.Print("准备群盾"); //如果在移动 if (Core.Get().IsMoving()) { //但身上没群盾 diff --git "a/Sage/\346\227\266\351\227\264\350\275\264/CheckAddersgall.cs" "b/Sage/\346\227\266\351\227\264\350\275\264/CheckAddersgall.cs" new file mode 100644 index 0000000..29beee0 --- /dev/null +++ "b/Sage/\346\227\266\351\227\264\350\275\264/CheckAddersgall.cs" @@ -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().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(); +// } +// } +// } +//} \ No newline at end of file diff --git "a/Sage/\346\227\266\351\227\264\350\275\264/SGE_Qt.cs" "b/Sage/\346\227\266\351\227\264\350\275\264/SGE_Qt.cs" new file mode 100644 index 0000000..03be895 --- /dev/null +++ "b/Sage/\346\227\266\351\227\264\350\275\264/SGE_Qt.cs" @@ -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; + } +} \ No newline at end of file diff --git "a/Sage/\350\264\244\350\200\205\347\203\255\351\224\256\350\260\203\347\224\250.cs" "b/Sage/\350\264\244\350\200\205\347\203\255\351\224\256\350\260\203\347\224\250.cs" index bfbbff3..cc97fea 100644 --- "a/Sage/\350\264\244\350\200\205\347\203\255\351\224\256\350\260\203\347\224\250.cs" +++ "b/Sage/\350\264\244\350\200\205\347\203\255\351\224\256\350\260\203\347\224\250.cs" @@ -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(); @@ -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)); diff --git "a/\350\264\244\350\200\205\345\237\272\347\241\200\346\235\241\347\233\256.cs" "b/\350\264\244\350\200\205\345\237\272\347\241\200\346\235\241\347\233\256.cs" index b41b245..c1e585a 100644 --- "a/\350\264\244\350\200\205\345\237\272\347\241\200\346\235\241\347\233\256.cs" +++ "b/\350\264\244\350\200\205\345\237\272\347\241\200\346\235\241\347\233\256.cs" @@ -8,6 +8,7 @@ using Common.Language; using Dalamud.Interface.Internal; using ImGuiNET; +using 残光.贤者.时间轴; using 残光.贤者; using 残光.贤者.GCD; using 残光.贤者.能力技; @@ -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 SlotResolvers = new() @@ -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贤炮起手(); @@ -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); @@ -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", //() => //{