Skip to content

Commit

Permalink
piles of random shit
Browse files Browse the repository at this point in the history
  • Loading branch information
xanunderscore committed Sep 29, 2024
1 parent 1438591 commit c998594
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 1 deletion.
12 changes: 11 additions & 1 deletion BossMod/Autorotation/xan/AI/Healer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ private void HealSingle(Action<Actor, PartyMemberState> healFun)
healFun(a, b);
}

private static readonly Dictionary<uint, bool> _esunaCache = [];
private static bool StatusIsRemovable(uint statusID)
{
if (_esunaCache.TryGetValue(statusID, out var value))
return value;
var check = Utils.StatusIsRemovable(statusID);
_esunaCache[statusID] = check;
return check;
}

private static readonly uint[] NoHealStatuses = [
82, // Hallowed Ground
409, // Holmgang
Expand Down Expand Up @@ -140,7 +150,7 @@ public override void Execute(StrategyValues strategy, Actor? primaryTarget, floa
var canEsuna = actor.IsTargetable && !esunas[i];
foreach (var s in actor.Statuses)
{
if (canEsuna && Utils.StatusIsRemovable(s.ID))
if (canEsuna && StatusIsRemovable(s.ID))
state.EsunableStatusRemaining = Math.Max(StatusDuration(s.ExpireAt), state.EsunableStatusRemaining);

if (NoHealStatuses.Contains(s.ID))
Expand Down
56 changes: 56 additions & 0 deletions BossMod/Modules/Heavensward/Quest/TheFateOfStars.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
namespace BossMod.Heavensward.Quest.TheFateOfStars;

public enum OID : uint
{
Boss = 0x161E,
Helper = 0x233C,
_Gen_MagitekTurretI = 0x161F, // R0.600, x0 (spawn during fight)
_Gen_MagitekTurretII = 0x1620, // R0.600, x0 (spawn during fight)
_Gen_TerminusEst = 0x1621, // R1.000, x0 (spawn during fight)
}

public enum AID : uint
{
_AutoAttack_Attack = 870, // Boss->player, no cast, single-target
_Weaponskill_MagitekTurret = 6029, // Boss->self, no cast, single-target
_Weaponskill_MagitekSlug = 6026, // Boss->self, 2.5s cast, range 60+R width 4 rect
_Weaponskill_AetherochemicalLaser = 6030, // 161F->player, no cast, single-target
_Weaponskill_Quickstep = 6028, // Boss->location, no cast, single-target
_Weaponskill_AetherochemicalGrenado = 6031, // 1620->location, 3.0s cast, range 8 circle
_Weaponskill_TerminusEst = 6022, // Boss->self, no cast, single-target
_Weaponskill_ = 6024, // Boss->self, no cast, single-target
_Weaponskill_SelfDetonate = 6032, // 161F/1620->self, 5.0s cast, range 40+R circle
_Weaponskill_MagitekSpread = 6027, // Boss->self, 3.0s cast, range 20+R 240-degree cone
}

class MagitekSlug(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID._Weaponskill_MagitekSlug), new AOEShapeRect(60, 2));
class AetherochemicalGrenado(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID._Weaponskill_AetherochemicalGrenado), 8);
class SelfDetonate(BossModule module) : Components.CastHint(module, ActionID.MakeSpell(AID._Weaponskill_SelfDetonate), "Kill turret before detonation!", true)
{
public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints)
{
foreach (var h in hints.PriorityTargets)
if (h.Actor.CastInfo?.Action == WatchedAction)
h.Priority = 5;
}
}
class MagitekSpread(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID._Weaponskill_MagitekSpread), new AOEShapeCone(20.55f, 120.Degrees()));

class RegulaVanHydrusStates : StateMachineBuilder
{
public RegulaVanHydrusStates(BossModule module) : base(module)
{
TrivialPhase()
.ActivateOnEnter<MagitekSlug>()
.ActivateOnEnter<AetherochemicalGrenado>()
.ActivateOnEnter<SelfDetonate>()
.ActivateOnEnter<MagitekSpread>();
}
}

[ModuleInfo(BossModuleInfo.Maturity.WIP, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 173, NameID = 3818)]
public class RegulaVanHydrus(WorldState ws, Actor primary) : BossModule(ws, primary, new(230, 79), new ArenaBoundsCircle(20))
{
protected override void DrawEnemies(int pcSlot, Actor pc) => Arena.Actors(WorldState.Actors.Where(x => !x.IsAlly), ArenaColor.Enemy);
}

14 changes: 14 additions & 0 deletions BossMod/QuestBattle/Heavensward/SideQuests/TheFateOfStars.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace BossMod.QuestBattle.Heavensward.SideQuests;

[Quest(BossModuleInfo.Maturity.Contributed, 173)]
internal class ABloodyReunion(WorldState ws) : QuestBattle(ws)
{
public override List<QuestObjective> DefineObjectives(WorldState ws) => [
new QuestObjective(ws)
.WithConnection(new Vector3(288.62f, 222.20f, 271.82f))
.Hints((player, hints) => {
if (World.Actors.FirstOrDefault(x => x.OID == 0x1EA080 && x.EventState != 7) is Actor shield)
hints.AddForbiddenZone(ShapeDistance.InvertedCircle(shield.Position, 5));
})
];
}
9 changes: 9 additions & 0 deletions BossMod/QuestBattle/Stormblood/SideQuests/TheHuntForOmega.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace BossMod.QuestBattle.Stormblood.SideQuests;

[Quest(BossModuleInfo.Maturity.Contributed, 275)]
internal class InterdimensionalRift(WorldState ws) : QuestBattle(ws)
{
public override List<QuestObjective> DefineObjectives(WorldState ws) => [
new QuestObjective(ws).WithConnection(new Vector3(0.11f, -272.00f, 432.78f))
];
}

0 comments on commit c998594

Please sign in to comment.