diff --git a/QuestPaths/4.x - Stormblood/Allied Societies/Ananta/Dailies/3061_Ants in the Pants.json b/QuestPaths/4.x - Stormblood/Allied Societies/Ananta/Dailies/3061_Ants in the Pants.json index 48f32de4..6592441b 100644 --- a/QuestPaths/4.x - Stormblood/Allied Societies/Ananta/Dailies/3061_Ants in the Pants.json +++ b/QuestPaths/4.x - Stormblood/Allied Societies/Ananta/Dailies/3061_Ants in the Pants.json @@ -1,7 +1,6 @@ { "$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json", "Author": "liza", - "Disabled": true, "QuestSequence": [ { "Sequence": 0, @@ -22,6 +21,37 @@ { "Sequence": 1, "Steps": [ + { + "DataId": 1024777, + "Position": { + "X": -41.641907, + "Y": 55.97816, + "Z": 211.38318 + }, + "TerritoryId": 612, + "InteractionType": "Interact" + } + ] + }, + { + "Sequence": 2, + "Steps": [ + { + "Position": { + "X": 482.93036, + "Y": 42.43753, + "Z": 350.85095 + }, + "StopDistance": 0.5, + "TerritoryId": 612, + "InteractionType": "Combat", + "EnemySpawnType": "AutoOnEnterArea", + "KillEnemyDataIds": [ + 8593 + ], + "Fly": true, + "Land": true + } ] }, { diff --git a/Questionable/Controller/CombatModules/Mount147Module.cs b/Questionable/Controller/CombatModules/Mount147Module.cs new file mode 100644 index 00000000..f0c43176 --- /dev/null +++ b/Questionable/Controller/CombatModules/Mount147Module.cs @@ -0,0 +1,51 @@ +using System; +using System.Numerics; +using Dalamud.Game.ClientState.Objects.Types; +using Questionable.Functions; +using Questionable.Model; +using Questionable.Model.Questing; + +namespace Questionable.Controller.CombatModules; + +/// +/// Commandeered Magitek Armor; used in 'Magiteknical Failure' quest. +/// +internal sealed class Mount147Module : ICombatModule +{ + public const ushort MountId = 147; + private readonly EAction[] _actions = [EAction.Trample]; + + private readonly MovementController _movementController; + private readonly GameFunctions _gameFunctions; + + + public Mount147Module(MovementController movementController, GameFunctions gameFunctions) + { + _movementController = movementController; + _gameFunctions = gameFunctions; + } + + public bool CanHandleFight(CombatController.CombatData combatData) => _gameFunctions.GetMountId() == MountId; + + public bool Start(CombatController.CombatData combatData) => true; + + public bool Stop() => true; + + public void Update(IGameObject gameObject) + { + if (_movementController.IsPathfinding || _movementController.IsPathRunning) + return; + + foreach (EAction action in _actions) + { + if (_gameFunctions.UseAction(gameObject, action, checkCanUse: false)) + return; + } + } + + public void MoveToTarget(IGameObject gameObject) + { + } + + public bool CanAttack(IBattleNpc target) => target.DataId is 8593; +} diff --git a/Questionable/Controller/Steps/Interactions/Combat.cs b/Questionable/Controller/Steps/Interactions/Combat.cs index f0b7ff15..c0a09a3a 100644 --- a/Questionable/Controller/Steps/Interactions/Combat.cs +++ b/Questionable/Controller/Steps/Interactions/Combat.cs @@ -22,7 +22,8 @@ internal static class Combat ArgumentNullException.ThrowIfNull(step.EnemySpawnType); - if (gameFunctions.GetMountId() != Mount128Module.MountId) + if (gameFunctions.GetMountId() != Mount128Module.MountId && + gameFunctions.GetMountId() != Mount147Module.MountId) yield return new Mount.UnmountTask(); if (step.CombatDelaySecondsAtStart != null) diff --git a/Questionable/Controller/Steps/QuestCleanUp.cs b/Questionable/Controller/Steps/QuestCleanUp.cs index d5564180..d9c7701f 100644 --- a/Questionable/Controller/Steps/QuestCleanUp.cs +++ b/Questionable/Controller/Steps/QuestCleanUp.cs @@ -38,7 +38,7 @@ internal static class QuestCleanUp } // if the quest uses no mount actions, that's not a mount quest - if (!quest.AllSteps().Any(x => x.Step.Action is { } action && action.RequiresMount())) + if (!quest.AllSteps().Any(x => (x.Step.Action is { } action && action.RequiresMount()) || (x.Step.InteractionType == EInteractionType.Combat && x.Step.KillEnemyDataIds.Contains(8593)))) { logger.LogInformation("Quest doesn't use any mount actions, teleporting to {Aetheryte}", mountConfiguration.ClosestAetheryte); return teleportTask; diff --git a/Questionable/Data/AlliedSocietyData.cs b/Questionable/Data/AlliedSocietyData.cs index 0ac4db07..4d388539 100644 --- a/Questionable/Data/AlliedSocietyData.cs +++ b/Questionable/Data/AlliedSocietyData.cs @@ -16,6 +16,7 @@ internal sealed class AlliedSocietyData { 66, new(1016093, EAetheryteLocation.SeaOfCloudsOkZundu) }, { 79, new(1017031, EAetheryteLocation.DravanianForelandsAnyxTrine) }, { 89, new(1017322, EAetheryteLocation.ChurningMistsZenith) }, + { 147, new(1024777, EAetheryteLocation.FringesPeeringStones) }, { 369, new(1051798, EAetheryteLocation.KozamaukaDockPoga) }, }.AsReadOnly(); diff --git a/Questionable/QuestionablePlugin.cs b/Questionable/QuestionablePlugin.cs index 73af794f..6c89d5ad 100644 --- a/Questionable/QuestionablePlugin.cs +++ b/Questionable/QuestionablePlugin.cs @@ -246,6 +246,7 @@ public sealed class QuestionablePlugin : IDalamudPlugin serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); + serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); serviceCollection.AddSingleton();