From 9aebe45fe8b3ba32906d81970a7fe2a4531e0d84 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Wed, 12 Mar 2025 20:13:04 +0100 Subject: [PATCH] Naadam --- .../2498_The Time between the Seconds.json | 6 ++++- .../2509_The Labors of Magnai.json | 12 +++++++++- .../MSQ/A4-Azim Steppe/2515_Naadam.json | 9 ++++---- .../2523_On the Eve of Destiny.json | 11 ++++++++- Questionable/Controller/QuestController.cs | 2 +- .../Steps/Interactions/SinglePlayerDuty.cs | 23 ++++++++++++++++--- Questionable/Functions/GameFunctions.cs | 2 +- 7 files changed, 53 insertions(+), 12 deletions(-) diff --git a/QuestPaths/4.x - Stormblood/MSQ/A3.2-Yanxia 1/2498_The Time between the Seconds.json b/QuestPaths/4.x - Stormblood/MSQ/A3.2-Yanxia 1/2498_The Time between the Seconds.json index 95052575..c240b4c3 100644 --- a/QuestPaths/4.x - Stormblood/MSQ/A3.2-Yanxia 1/2498_The Time between the Seconds.json +++ b/QuestPaths/4.x - Stormblood/MSQ/A3.2-Yanxia 1/2498_The Time between the Seconds.json @@ -44,7 +44,11 @@ }, "StopDistance": 7, "TerritoryId": 614, - "InteractionType": "SinglePlayerDuty" + "InteractionType": "SinglePlayerDuty", + "SinglePlayerDutyOptions": { + "Enabled": true, + "TestedBossModVersion": "0.1.0.1" + } } ] }, diff --git a/QuestPaths/4.x - Stormblood/MSQ/A4-Azim Steppe/2509_The Labors of Magnai.json b/QuestPaths/4.x - Stormblood/MSQ/A4-Azim Steppe/2509_The Labors of Magnai.json index 7c762d51..2f56c5ff 100644 --- a/QuestPaths/4.x - Stormblood/MSQ/A4-Azim Steppe/2509_The Labors of Magnai.json +++ b/QuestPaths/4.x - Stormblood/MSQ/A4-Azim Steppe/2509_The Labors of Magnai.json @@ -80,9 +80,19 @@ "Z": 23.111439 }, "TerritoryId": 622, - "InteractionType": "Dive", + "InteractionType": "WalkTo", "DisableNavmesh": true }, + { + "Position": { + "X": 65.04901, + "Y": 1.9869974, + "Z": 23.111439 + }, + "TerritoryId": 622, + "InteractionType": "Dive", + "DelaySecondsAtStart": 2 + }, { "DataId": 2008252, "Position": { diff --git a/QuestPaths/4.x - Stormblood/MSQ/A4-Azim Steppe/2515_Naadam.json b/QuestPaths/4.x - Stormblood/MSQ/A4-Azim Steppe/2515_Naadam.json index a37bb517..8fdeef6c 100644 --- a/QuestPaths/4.x - Stormblood/MSQ/A4-Azim Steppe/2515_Naadam.json +++ b/QuestPaths/4.x - Stormblood/MSQ/A4-Azim Steppe/2515_Naadam.json @@ -55,7 +55,6 @@ "Answer": "TEXT_STMBDA416_02515_A1_000_103" } ], - "$": "QW: 0 0 0 0 0 0 -> QW: 17 0 0 0 0 32", "CompletionQuestVariablesFlags": [ null, null, @@ -81,7 +80,6 @@ "Answer": "TEXT_STMBDA416_02515_A1_120_070" } ], - "$": "QW: 17 0 0 0 0 32 -> QW: 33 0 16 0 0 96", "CompletionQuestVariablesFlags": [ null, null, @@ -100,7 +98,6 @@ }, "TerritoryId": 622, "InteractionType": "Interact", - "$": "QW: 33 0 16 0 0 96 -> QW: 49 16 16 0 0 112", "CompletionQuestVariablesFlags": [ null, null, @@ -138,7 +135,11 @@ "Z": -508.20172 }, "TerritoryId": 622, - "InteractionType": "SinglePlayerDuty" + "InteractionType": "SinglePlayerDuty", + "SinglePlayerDutyOptions": { + "Enabled": true, + "TestedBossModVersion": "0.1.0.1" + } } ] }, diff --git a/QuestPaths/4.x - Stormblood/MSQ/A5-Yanxia 2/2523_On the Eve of Destiny.json b/QuestPaths/4.x - Stormblood/MSQ/A5-Yanxia 2/2523_On the Eve of Destiny.json index 5350174a..71d619bd 100644 --- a/QuestPaths/4.x - Stormblood/MSQ/A5-Yanxia 2/2523_On the Eve of Destiny.json +++ b/QuestPaths/4.x - Stormblood/MSQ/A5-Yanxia 2/2523_On the Eve of Destiny.json @@ -97,6 +97,16 @@ { "Sequence": 255, "Steps": [ + { + "Position": { + "X": 175.34885, + "Y": 5.16971, + "Z": -419.04416 + }, + "TerritoryId": 614, + "InteractionType": "WalkTo", + "Fly": true + }, { "DataId": 1020519, "Position": { @@ -106,7 +116,6 @@ }, "TerritoryId": 614, "InteractionType": "CompleteQuest", - "Fly": true, "DialogueChoices": [ { "Type": "List", diff --git a/Questionable/Controller/QuestController.cs b/Questionable/Controller/QuestController.cs index 404a8334..0df9e8d9 100644 --- a/Questionable/Controller/QuestController.cs +++ b/Questionable/Controller/QuestController.cs @@ -209,7 +209,7 @@ internal sealed class QuestController : MiniTaskController { if (_condition[ConditionFlag.Unconscious] && _condition[ConditionFlag.SufferingStatusAffliction63] && - _clientState.TerritoryType == SinglePlayerDuty.LahabreaTerritoryId) + _clientState.TerritoryType == SinglePlayerDuty.SpecialTerritories.Lahabrea) { // ignore, we're in the lahabrea fight } diff --git a/Questionable/Controller/Steps/Interactions/SinglePlayerDuty.cs b/Questionable/Controller/Steps/Interactions/SinglePlayerDuty.cs index 264d8128..c356c287 100644 --- a/Questionable/Controller/Steps/Interactions/SinglePlayerDuty.cs +++ b/Questionable/Controller/Steps/Interactions/SinglePlayerDuty.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Numerics; using Dalamud.Game.ClientState.Conditions; using Dalamud.Game.ClientState.Objects; using Dalamud.Game.ClientState.Objects.Types; @@ -19,10 +20,11 @@ namespace Questionable.Controller.Steps.Interactions; internal static class SinglePlayerDuty { - private static class SpecialTerritories + internal static class SpecialTerritories { public const ushort Lahabrea = 1052; public const ushort ItsProbablyATrap = 665; + public const ushort Naadam = 688; } internal sealed class Factory( @@ -43,7 +45,7 @@ internal static class SinglePlayerDuty throw new TaskException("Failed to get content finder condition for solo instance"); yield return new StartSinglePlayerDuty(cfcData.ContentFinderConditionId); - yield return new EnableAi(); + yield return new EnableAi(cfcData.TerritoryId == SpecialTerritories.Naadam); if (cfcData.TerritoryId == SpecialTerritories.Lahabrea) { yield return new SetTarget(14643); @@ -56,12 +58,27 @@ internal static class SinglePlayerDuty "Wait(resurrection)"); yield return new EnableAi(); } - else if (cfcData.TerritoryId == SpecialTerritories.ItsProbablyATrap) + else if (cfcData.TerritoryId is SpecialTerritories.ItsProbablyATrap) { yield return new WaitCondition.Task(() => DutyActionsAvailable() || clientState.TerritoryType != SpecialTerritories.ItsProbablyATrap, "Wait(Phase 2)"); yield return new EnableAi(true); } + else if (cfcData.TerritoryId is SpecialTerritories.Naadam) + { + yield return new WaitCondition.Task( + () => + { + if (clientState.TerritoryType != SpecialTerritories.Naadam) + return true; + + var pos = clientState.LocalPlayer?.Position ?? default; + return (new Vector3(352.01f, -1.45f, 288.59f) - pos).Length() < 10f; + }, + "Wait(moving to Ovoo)"); + yield return new Mount.UnmountTask(); + yield return new EnableAi(); + } yield return new WaitSinglePlayerDuty(cfcData.ContentFinderConditionId); yield return new DisableAi(); diff --git a/Questionable/Functions/GameFunctions.cs b/Questionable/Functions/GameFunctions.cs index 65891373..1516b57d 100644 --- a/Questionable/Functions/GameFunctions.cs +++ b/Questionable/Functions/GameFunctions.cs @@ -438,7 +438,7 @@ internal sealed unsafe class GameFunctions if (_condition[ConditionFlag.Unconscious] && _condition[ConditionFlag.SufferingStatusAffliction63] && - _clientState.TerritoryType == SinglePlayerDuty.LahabreaTerritoryId) + _clientState.TerritoryType == SinglePlayerDuty.SpecialTerritories.Lahabrea) return false; // needed to process the tasks return _condition[ConditionFlag.Occupied] || _condition[ConditionFlag.Occupied30] || -- 2.30.2