Skip to content

Commit

Permalink
ARF Modules 1 & 2 Created
Browse files Browse the repository at this point in the history
-> Regula module created (boss #1)
-> Harmachis module created (boss #2) (ty xan for dealing with me... you were of great help ;-;)
  • Loading branch information
LeontopodiumNivale14 committed Sep 15, 2024
1 parent 0d5561a commit 5d7974d
Show file tree
Hide file tree
Showing 2 changed files with 200 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
namespace BossMod.Heavensward.Dungeon.D06AetherochemicalResearchFacility.D061RegulaVanHydrus;

public enum OID : uint
{
Boss = 0xE97, // R1.650, x1
ClockworkHunter = 0xF5C, // R1.250, x6
Helper = 0x1B2, // R0.500, x1
MagitekTurretI = 0xE98, // R0.600, x0 (spawn during fight)
MagitekTurretII = 0xE99, // R0.600, x0 (spawn during fight)
}

public enum AID : uint
{
AutoAttack = 870, // Boss->player, no cast, single-target
AetherochemicalGrenado = 4322, // MagitekTurretII->location, 3.0s cast, range 8 circle
AetherochemicalLaser = 4321, // MagitekTurretI->player, 3.0s cast, range 50 width 4 rect
Bastardbluss = 4314, // Boss->player, no cast, single-target, tankbuster + stun
Judgment = 4317, // Boss->player, no cast, single-target
JudgmentAOE = 4318, // Helper->self, 3.0s cast, range 8 circle
MagitekSlug = 4315, // Boss->self, 2.5s cast, range 60+R width 4 rect
MagitekSpread = 4316, // Boss->self, 4.5s cast, range 30+R 240-degree cone, knockback 20, away from source
MagitekTurret = 4320, // Boss->self, no cast, single-target
Quickstep = 4319, // Boss->location, no cast, single-target
SelfDetonate = 4323, // MagitekTurretI/MagitekTurretII->self, 5.0s cast, range 40+R circle
}

public enum TetherID : uint
{
BaitAway = 17 // MagitekTurretI->player
}

class AetherochemicalGrenado(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.AetherochemicalGrenado), 8);
class AetherochemicalLaser(BossModule module) : Components.BaitAwayTethers(module, new AOEShapeRect(50, 2), (uint)TetherID.BaitAway, ActionID.MakeSpell(AID.AetherochemicalLaser));
class AetherochemicalLaserAOE(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AetherochemicalLaser), new AOEShapeRect(50, 2));
class JudgmentAOE(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.JudgmentAOE), new AOEShapeCircle(8));
class MagiteckTurrents(BossModule module) : Components.AddsMulti(module, [(uint)OID.MagitekTurretI, (uint)OID.MagitekTurretII]);
class MagitekSlug(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MagitekSlug), new AOEShapeRect(61.65f, 2));
class MagitekSpread(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.MagitekSpread), new AOEShapeCone(31.65f, 120.Degrees()));
class SelfDetonate(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.SelfDetonate));

class D061RegulaVanHydrusStates : StateMachineBuilder
{
public D061RegulaVanHydrusStates(BossModule module) : base(module)
{
TrivialPhase()
.ActivateOnEnter<AetherochemicalGrenado>()
.ActivateOnEnter<AetherochemicalLaser>()
.ActivateOnEnter<AetherochemicalLaserAOE>()
.ActivateOnEnter<JudgmentAOE>()
.ActivateOnEnter<MagiteckTurrents>()
.ActivateOnEnter<MagitekSlug>()
.ActivateOnEnter<MagitekSpread>()
.ActivateOnEnter<SelfDetonate>();
}
}

[ModuleInfo(BossModuleInfo.Maturity.WIP, Contributors = "Herc, LegendofIceman", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 38, NameID = 3818)]
public class D061RegulaVanHydrus(WorldState ws, Actor primary) : BossModule(ws, primary, new(-111, -295), new ArenaBoundsCircle(21)); // edge of arena is -273
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
namespace BossMod.Heavensward.Dungeon.D06AetherochemicalResearchFacility.D062Harmachis;

public enum OID : uint
{
Boss = 0xE9A, // R2.000-5.300, x1, Depends on which form they're in
Helper = 0x1B2
}

public enum AID : uint
{
AutoAttack = 870, // Boss->player, no cast, single-target

BallisticMissileB = 4334, // Boss->self, 3.0s cast, single-target , done
BallisticMissileH = 4335, // Helper->self, no cast, ???
BallisticMissileVisual = 4771, // Helper->self, 4.0s cast, range 4 circle

WeighingOfTheHeartNaga = 3790, // Boss->self, 3.0s cast, single-target (Snake form, Gaze -> x2 CircleofFlames)
WeighingOfTheHeartMachina = 3792, // Boss->self, 3.0s cast, single-target (2 Player Enum -> Stack)
WeighingOfTheHeartCobra = 4328, // Boss->self, 3.0s cast, single-target (Damage up form + Cleave)
WeighingOfTheHeartFormSphinx = 5007, // Helper->self, no cast, single-target

ChthonicHush = 4327, // Boss->self, no cast, range 12+R (R=5.3) 120-degree cone
CircleOfFlames = 4332, // Boss->player, no cast, range 5 circle
GaseousBomb = 4336, // Boss->player, no cast, range 5 circle
HoodSwing = 4329, // Boss->self, no cast, range 8+R ?-degree cone
InertiaStream = 4333, // Boss->player, no cast, single-target
Ka = 4326, // Boss->self, 3.0s cast, range 40+R 60-degree cone
Paradox = 4325, // Helper->location, 3.0s cast, range 5 circle
Petrifaction = 4331, // Boss->self, 3.0s cast, range 60 circle
RiddleOfTheSphinx = 4324, // Boss->self, 3.0s cast, single-target
SteelScales = 4330, // Boss->self, no cast, single-target
}

public enum SID : uint
{
Transfiguration = 705, // Boss->Boss, extra=0x1D/0x1E/0x1F
DamageUp = 443, // Boss->Boss, extra=0x1
Poison = 2104, // Boss->player, extra=0x0
Bind = 2518 // Boss->player, extra=0x0
}

public enum IconID : uint
{
Enumeration = 382, // Helper, 2 person enum
Stack = 93 // player
}

class BallisticMissile(BossModule module) : Components.UniformStackSpread(module, 4, 0, 2, 2)
{
public override void OnStatusGain(Actor actor, ActorStatus status)
{
if ((SID)status.ID == SID.Bind)
AddStack(actor, WorldState.FutureTime(6.2f));
}

public override void OnEventCast(Actor caster, ActorCastEvent spell)
{
if ((AID)spell.Action.ID == AID.BallisticMissileH)
Stacks.Clear();
}
}

class ChthonicHush(BossModule module) : Components.Cleave(module, ActionID.MakeSpell(AID.ChthonicHush), new AOEShapeCone(13.3f, 60.Degrees()))
{
private readonly GasousBomb _stack1 = module.FindComponent<GasousBomb>()!;
private readonly BallisticMissile _stack2 = module.FindComponent<BallisticMissile>()!;

public override void AddHints(int slot, Actor actor, TextHints hints)
{
if (!_stack1.ActiveStacks.Any() && !_stack2.ActiveStacks.Any())
base.AddHints(slot, actor, hints);
}

public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints)
{
if (!_stack1.ActiveStacks.Any() && !_stack2.ActiveStacks.Any())
base.AddAIHints(slot, actor, assignment, hints);
}

public override void DrawArenaForeground(int pcSlot, Actor pc)
{
if (!_stack1.ActiveStacks.Any() && !_stack2.ActiveStacks.Any())
base.DrawArenaForeground(pcSlot, pc);
}
}

class CircleofFlame(BossModule module) : Components.UniformStackSpread(module, 0, 5, 0, 0, true)
{
public int NumCasts { get; private set; }

public override void OnCastFinished(Actor caster, ActorCastInfo spell)
{
if ((AID)spell.Action.ID == AID.Petrifaction && WorldState.Actors.Find(spell.TargetID) is var target && target != null)
foreach (var actor in WorldState.Party.WithoutSlot())
{
AddSpread(actor);
}
}

public override void OnEventCast(Actor caster, ActorCastEvent spell)
{

if ((AID)spell.Action.ID is AID.CircleOfFlames)
++NumCasts;

if ((AID)spell.Action.ID is AID.CircleOfFlames && NumCasts >= 2)
{
// reset for next usage of mechanic, thanks xan for the tip on how tf to fix this/dealing with me asking questions
NumCasts = 0;
Spreads.Clear();
}
}
}

class FormNaga(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.WeighingOfTheHeartNaga), "Naga Form, Gaze -> x2 Spread AOE's");
class FormMachina(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.WeighingOfTheHeartMachina), "Machina form, 2 Player Enum/Stack -> Party Stack");
class FormCobra(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.WeighingOfTheHeartCobra), "Cobra form, damage up + cleave");
class GasousBomb(BossModule module) : Components.StackWithIcon(module, (uint)IconID.Stack, ActionID.MakeSpell(AID.GaseousBomb), 5, 0, 2, 4);
class Ka(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Ka), new AOEShapeCone(45, 30.Degrees()));
class Paradox(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.Paradox), 5);
class Petrifaction(BossModule module) : Components.CastGaze(module, ActionID.MakeSpell(AID.Petrifaction));

class D062HarmachisStates : StateMachineBuilder
{
public D062HarmachisStates(BossModule module) : base(module)
{
TrivialPhase()
.ActivateOnEnter<BallisticMissile>()
.ActivateOnEnter<GasousBomb>()
.ActivateOnEnter<Paradox>()
.ActivateOnEnter<Petrifaction>()
.ActivateOnEnter<Ka>()
.ActivateOnEnter<ChthonicHush>()
.ActivateOnEnter<CircleofFlame>()
.ActivateOnEnter<FormNaga>()
.ActivateOnEnter<FormMachina>()
.ActivateOnEnter<FormCobra>();
}
}

[ModuleInfo(BossModuleInfo.Maturity.WIP, GroupType = BossModuleInfo.GroupType.CFC, GroupID = 38, NameID = 3821)]
public class D062Harmachis(WorldState ws, Actor primary) : BossModule(ws, primary, new(248, 272), new ArenaBoundsCircle(20));

0 comments on commit 5d7974d

Please sign in to comment.