From 1b3c734b941c5cc500244417f3d9dfd0c75e9ebb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E6=B2=A2=E5=93=8D=E4=B9=9F?= <72963826+Hibiya615@users.noreply.github.com> Date: Sat, 25 Oct 2025 01:14:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=AD=BB=E5=AE=AB190?= =?UTF-8?q?=E7=89=B9=E5=A4=A7=E7=88=86=E7=82=B8=E7=AD=89=E5=BE=85=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Deep_Dungeon/the_Palace_of_the_Dead.cs | 97 ++++---------------------- OnlineRepo.json | 6 +- 2 files changed, 15 insertions(+), 88 deletions(-) diff --git a/Deep_Dungeon/the_Palace_of_the_Dead.cs b/Deep_Dungeon/the_Palace_of_the_Dead.cs index 95a29a8..ea99886 100644 --- a/Deep_Dungeon/the_Palace_of_the_Dead.cs +++ b/Deep_Dungeon/the_Palace_of_the_Dead.cs @@ -17,13 +17,13 @@ namespace the_Palace_of_the_Dead; [ScriptType(guid: "4210c323-eba4-4d67-a7e7-b90799494729", name: "死者宫殿", author: "Tetora", territorys: [561,562,563,564,565,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607], - version: "0.0.0.9",note: noteStr)] + version: "0.0.1.0",note: noteStr)] public class the_Palace_of_the_Dead { const string noteStr = """ - v0.0.0.9: + v0.0.1.0: 死者宫殿绘制 注:方法设置中的层数仅做分割线效果,并不是批量开关 出现问题请携带ARR反馈! @@ -154,8 +154,6 @@ public class the_Palace_of_the_Dead } - private bool isExplosionInterrupted = false; // 190层 特大爆炸打断状态 - [ScriptMethod(name: "死亡重置", eventType: EventTypeEnum.Death, eventCondition: ["TargetDataId:0"], userControl: false)] public void 死亡重置(Event @event, ScriptAccessory accessory) { @@ -952,79 +950,6 @@ public class the_Palace_of_the_Dead } - /* // 废案 - [ScriptMethod(name: "190 熔岩爆弹怪 出现位置预测", eventType: EventTypeEnum.AddCombatant, eventCondition: ["DataId:6385"])] - public void 熔岩爆弹怪_震撼弹预测_通过治疗爆弹怪(Event @event, ScriptAccessory accessory) - { - //在治疗爆弹怪 刷新约54s后 出现熔岩爆弹怪 ,期间BOSS会读条3次 [7169]地面爆破 第3次与第2次间隔较长,应在第3次黄圈读条时准备将BOSS拉去刷新位置 - //暂未知 治疗爆弹怪死亡时间 与BOSS黄圈技能时间轴是否有关联 - //在刷新45s时 大约会读条第3次黄圈(该出现预兆时分别为 4n 次读条),故应 Delay = 45000,DestoryAt = 9000 - - if(isDeveloper) accessory.Method.SendChat($"/e 调试信息:已捕获 治疗爆弹怪生成{timesRemedyBomb}次,开始45秒后绘制倒计时"); - - var dp = accessory.Data.GetDefaultDrawProperties(); - dp.Name = "熔岩爆弹怪_震撼弹预测"; - dp.Color = new Vector4(0f, 0f, 1f, 1.5f); - dp.Scale = new Vector2(7.2f); - dp.Delay = 45000; - dp.DestoryAt = 9000; - - // 根据 治疗爆弹怪 出现次数 决定 熔岩爆弹怪 生成位置 - switch(timesRemedyBomb) { - - case 1: { - dp.Position = new Vector3(-288.63f, 0.14f,-300.26f); - if(isDeveloper) accessory.Method.SendChat($"/e 调试信息 timeRemedyBomb={timesRemedyBomb}"); - break; - } - - case 2:{ - dp.Position = new Vector3(-297.46f, 0.12f,-297.52f); - if(isDeveloper) accessory.Method.SendChat($"/e 调试信息 timeRemedyBomb={timesRemedyBomb}"); - break; - } - - case 3:{ - dp.Position = new Vector3(-288.84f, 0.12f,-305.54f); - if(isDeveloper) accessory.Method.SendChat($"/e 调试信息 timeRemedyBomb={timesRemedyBomb}"); - break; - } - - case 4:{ - dp.Position = new Vector3(-309.13f, 0.05f,-303.74f); - if(isDeveloper) accessory.Method.SendChat($"/e 调试信息 timeRemedyBomb={timesRemedyBomb}"); - break; - } - - case 5:{ - dp.Position = new Vector3(-298.36f, 0.05f,-293.63f); - if(isDeveloper) accessory.Method.SendChat($"/e 调试信息 timeRemedyBomb={timesRemedyBomb}"); - break; - } - - case 6:{ - dp.Position = new Vector3(-301.96f, 0.05f,-314.29f); - if(isDeveloper) accessory.Method.SendChat($"/e 调试信息 timeRemedyBomb={timesRemedyBomb}"); - break; - } - - case 7:{ - dp.Position = new Vector3(-299.12f, 0.05f,-297.56f); - if(isDeveloper) accessory.Method.SendChat($"/e 调试信息 timeRemedyBomb={timesRemedyBomb}"); - break; - } - - default: { - if(isDeveloper) accessory.Method.SendChat($"/e 调试信息 timeRemedyBomb={timesRemedyBomb}"); - break; - } - - } - - accessory.Method.SendDraw(DrawModeEnum.Default, DrawTypeEnum.Circle, dp); - } - */ - [ScriptMethod(name: "熔岩爆弹怪 震撼弹预测销毁", eventType: EventTypeEnum.AddCombatant, eventCondition: ["DataId:6386"], userControl: false)] public void 熔岩爆弹怪_震撼弹预测销毁(Event @event, ScriptAccessory accessory) { @@ -1054,28 +979,30 @@ public class the_Palace_of_the_Dead } + private CancellationTokenSource? _explosionCts; + [ScriptMethod(name: "190 爆弹怪教父 特大爆炸提示", eventType: EventTypeEnum.StartCasting, eventCondition: ["ActionId:7103"])] public async void 爆弹怪教父_特大爆炸提示(Event @event, ScriptAccessory accessory) { - isExplosionInterrupted = false; - - await Task.Delay(15800); - - if (!isExplosionInterrupted) + _explosionCts?.Cancel(); + _explosionCts = new CancellationTokenSource(); + + try { + await Task.Delay(15800, _explosionCts.Token); + if(isText) accessory.Method.TextInfo("99.9%真伤,注意瞬回", duration: 8500, true); if(isTTS) accessory.Method.TTS("99.9%真伤,注意瞬回"); if(isEdgeTTS) accessory.Method.EdgeTTS("99.9%真伤,注意瞬回"); } + catch (TaskCanceledException) { } } - [ScriptMethod(name: "特大爆炸打断销毁", eventType: EventTypeEnum.CancelAction, eventCondition: ["ActionId:7103"], userControl: false)] public void 特大爆炸打断销毁(Event @event, ScriptAccessory accessory) { - isExplosionInterrupted = true; + _explosionCts?.Cancel(); } - #endregion #region 191~200层 小怪 diff --git a/OnlineRepo.json b/OnlineRepo.json index b72ca8d..fcf5ead 100644 --- a/OnlineRepo.json +++ b/OnlineRepo.json @@ -667,12 +667,12 @@ { "Name": "死者宫殿", "Guid": "4210c323-eba4-4d67-a7e7-b90799494729", - "Version": "0.0.0.9", + "Version": "0.0.1.0", "Author": "Tetora", "Repo": "https://github.com/Hibiya615/TetoraKAScript", "DownloadUrl": "https://raw.githubusercontent.com/Hibiya615/TetoraKAScript/refs/heads/main/Deep_Dungeon/the_Palace_of_the_Dead.cs", - "Note": "v0.0.0.9:\n死者宫殿 初版绘制", - "UpdateInfo": "v0.0.0.9 新增调用IC实行变身时自动遁地", + "Note": "v0.0.1.0:\n死者宫殿 初版绘制", + "UpdateInfo": "v0.0.1.0 修改190特大爆炸等待逻辑", "TerritoryIds": [ 561, 562,