forked from liza/Questionable
Add 'Ants in the Pants' Ananta quest
This commit is contained in:
parent
2be0ab85d3
commit
b97600bd6f
@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
|
"$schema": "https://git.carvel.li/liza/Questionable/raw/branch/master/QuestPaths/quest-v1.json",
|
||||||
"Author": "liza",
|
"Author": "liza",
|
||||||
"Disabled": true,
|
|
||||||
"QuestSequence": [
|
"QuestSequence": [
|
||||||
{
|
{
|
||||||
"Sequence": 0,
|
"Sequence": 0,
|
||||||
@ -22,6 +21,37 @@
|
|||||||
{
|
{
|
||||||
"Sequence": 1,
|
"Sequence": 1,
|
||||||
"Steps": [
|
"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
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
51
Questionable/Controller/CombatModules/Mount147Module.cs
Normal file
51
Questionable/Controller/CombatModules/Mount147Module.cs
Normal file
@ -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;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Commandeered Magitek Armor; used in 'Magiteknical Failure' quest.
|
||||||
|
/// </summary>
|
||||||
|
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;
|
||||||
|
}
|
@ -22,7 +22,8 @@ internal static class Combat
|
|||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(step.EnemySpawnType);
|
ArgumentNullException.ThrowIfNull(step.EnemySpawnType);
|
||||||
|
|
||||||
if (gameFunctions.GetMountId() != Mount128Module.MountId)
|
if (gameFunctions.GetMountId() != Mount128Module.MountId &&
|
||||||
|
gameFunctions.GetMountId() != Mount147Module.MountId)
|
||||||
yield return new Mount.UnmountTask();
|
yield return new Mount.UnmountTask();
|
||||||
|
|
||||||
if (step.CombatDelaySecondsAtStart != null)
|
if (step.CombatDelaySecondsAtStart != null)
|
||||||
|
@ -38,7 +38,7 @@ internal static class QuestCleanUp
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if the quest uses no mount actions, that's not a mount quest
|
// 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);
|
logger.LogInformation("Quest doesn't use any mount actions, teleporting to {Aetheryte}", mountConfiguration.ClosestAetheryte);
|
||||||
return teleportTask;
|
return teleportTask;
|
||||||
|
@ -16,6 +16,7 @@ internal sealed class AlliedSocietyData
|
|||||||
{ 66, new(1016093, EAetheryteLocation.SeaOfCloudsOkZundu) },
|
{ 66, new(1016093, EAetheryteLocation.SeaOfCloudsOkZundu) },
|
||||||
{ 79, new(1017031, EAetheryteLocation.DravanianForelandsAnyxTrine) },
|
{ 79, new(1017031, EAetheryteLocation.DravanianForelandsAnyxTrine) },
|
||||||
{ 89, new(1017322, EAetheryteLocation.ChurningMistsZenith) },
|
{ 89, new(1017322, EAetheryteLocation.ChurningMistsZenith) },
|
||||||
|
{ 147, new(1024777, EAetheryteLocation.FringesPeeringStones) },
|
||||||
{ 369, new(1051798, EAetheryteLocation.KozamaukaDockPoga) },
|
{ 369, new(1051798, EAetheryteLocation.KozamaukaDockPoga) },
|
||||||
}.AsReadOnly();
|
}.AsReadOnly();
|
||||||
|
|
||||||
|
@ -246,6 +246,7 @@ public sealed class QuestionablePlugin : IDalamudPlugin
|
|||||||
serviceCollection.AddSingleton<LeveUiController>();
|
serviceCollection.AddSingleton<LeveUiController>();
|
||||||
|
|
||||||
serviceCollection.AddSingleton<ICombatModule, Mount128Module>();
|
serviceCollection.AddSingleton<ICombatModule, Mount128Module>();
|
||||||
|
serviceCollection.AddSingleton<ICombatModule, Mount147Module>();
|
||||||
serviceCollection.AddSingleton<ICombatModule, ItemUseModule>();
|
serviceCollection.AddSingleton<ICombatModule, ItemUseModule>();
|
||||||
serviceCollection.AddSingleton<ICombatModule, BossModModule>();
|
serviceCollection.AddSingleton<ICombatModule, BossModModule>();
|
||||||
serviceCollection.AddSingleton<ICombatModule, RotationSolverRebornModule>();
|
serviceCollection.AddSingleton<ICombatModule, RotationSolverRebornModule>();
|
||||||
|
Loading…
Reference in New Issue
Block a user