Skip to content

Commit

Permalink
Merge commit 'refs/pull/332/head' of https://github.com/awgil/ffxiv_b…
Browse files Browse the repository at this point in the history
…ossmod

# Conflicts:
#	BossMod/Components/Exaflare.cs
#	BossMod/Modules/Shadowbringers/Dungeon/D01Holminster/D013Philia.cs
  • Loading branch information
awgil committed Apr 6, 2024
2 parents 9c94ab2 + 27f0430 commit a2da0ed
Show file tree
Hide file tree
Showing 17 changed files with 563 additions and 9 deletions.
1 change: 1 addition & 0 deletions BossMod/BossModule/ArenaColor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public static class ArenaColor
public const uint SafeFromAOE = 0x80008000;
public const uint Danger = 0xff00ffff;
public const uint Safe = 0xff00ff00;
public const uint Trap = 0x80000080;
public const uint PC = 0xff00ff00;
public const uint Enemy = 0xff0000ff;
public const uint Object = 0xff0080ff;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public override void OnEventEnvControl(BossModule module, byte index, uint state
if (state == 0x08000400 && index == 0x49)
Shape = Arena.ExtendEast;
}

public override void Update(BossModule module)
{

Expand Down
2 changes: 1 addition & 1 deletion BossMod/Modules/Endwalker/Alliance/A33Oschon/A33Oschon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,4 @@ protected override void DrawEnemies(int pcSlot, Actor pc)
Arena.Actor(_oschonP1, ArenaColor.Enemy);
Arena.Actor(_oschonP2, ArenaColor.Enemy);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,4 @@ public enum IconID : uint
FlintedFoehnStack = 316, // player
TankbusterP1 = 344, // player
TankbusterP2 = 500, // player
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ public override void OnEventIcon(BossModule module, Actor actor, uint iconID)
if (iconID == (uint)IconID.FlintedFoehnStack)
AddStack(actor, module.WorldState.CurrentTime.AddSeconds(4.5f));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent
if ((AID)spell.Action.ID == AID.GreatWhirlwind)
_aoe = null;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class WanderingVolley : Components.Knockback
{
private readonly List<Source> _sources = [];
private static AOEShapeCone _shape = new(30, 90.Degrees());
private static readonly AOEShapeCone _shape = new(30, 90.Degrees());

public override IEnumerable<Source> Sources(BossModule module, int slot, Actor actor) => _sources;

Expand Down Expand Up @@ -63,4 +63,4 @@ public WanderingVolleyRaidwide1() : base(ActionID.MakeSpell(AID.WanderingVolley)
class WanderingVolleyRaidwide2 : Components.RaidwideCast
{
public WanderingVolleyRaidwide2() : base(ActionID.MakeSpell(AID.WanderingVolley2)) { }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ByregotStrikeCone : Components.GenericAOEs
{
private readonly List<AOEInstance> _aoes = [];

private static AOEShapeCone _shape = new(90, 22.5f.Degrees());
private static readonly AOEShapeCone _shape = new(90, 22.5f.Degrees());

public override IEnumerable<AOEInstance> ActiveAOEs(BossModule module, int slot, Actor actor) => _aoes;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public override void OnCastStarted(BossModule module, Actor caster, ActorCastInf
if (_index is 0x53 or 0x54 or 0x57 or 0x56 or 0x51 or 0x50)
_aoes.Add(new(donut, position, activation: _activation3));
}
}
}

public override void OnCastFinished(BossModule module, Actor caster, ActorCastInfo spell)
{
Expand All @@ -138,4 +138,4 @@ public override void OnCastFinished(BossModule module, Actor caster, ActorCastIn
_aoes.RemoveAt(0);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
namespace BossMod.Shadowbringers.Foray.Duel.Duel5Menenius;

internal class BlueHiddenMines : Components.GenericTowers
{
public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell)
{
if ((AID)spell.Action.ID is AID.ActivateBlueMine)
{
Towers.Add(new(caster.Position, 3.6f));
}
else if ((AID)spell.Action.ID is AID.DetonateBlueMine)
{
Towers.RemoveAll(t => t.Position.AlmostEqual(caster.Position, 1));
}
}

public override void AddHints(BossModule module, int slot, Actor actor, TextHints hints, MovementHints? movementHints)
{
if (Towers.Count > 0)
{
hints.Add("Soak the mine!");
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
namespace BossMod.Shadowbringers.Foray.Duel.Duel5Menenius;

class SpiralScourge : Components.SingleTargetCast
{
public SpiralScourge() : base(ActionID.MakeSpell(AID.SpiralScourge), "Use Manawall, Excellence, or Invuln.") { }
}

class CallousCrossfire : Components.SingleTargetCast
{
public CallousCrossfire() : base(ActionID.MakeSpell(AID.CallousCrossfire), "Use Light Curtain / Reflect.") { }
}

class ReactiveMunition : Components.StayMove
{
public override void OnStatusGain(BossModule module, Actor actor, ActorStatus status)
{
if ((SID)status.ID is SID.AccelerationBomb)
{
if (module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && slot < Requirements.Length)
Requirements[slot] = Requirement.Stay;
}
}

public override void OnStatusLose(BossModule module, Actor actor, ActorStatus status)
{
if ((SID)status.ID is SID.AccelerationBomb)
{
if (module.Raid.FindSlot(actor.InstanceID) is var slot && slot >= 0 && slot < Requirements.Length)
Requirements[slot] = Requirement.None;
}
}
}

class SenseWeakness : Components.StayMove
{
public override void OnCastStarted(BossModule module, Actor caster, ActorCastInfo spell)
{
if ((AID)spell.Action.ID == AID.SenseWeakness)
{
if (module.Raid.FindSlot(caster.TargetID) is var slot && slot >= 0 && slot < Requirements.Length)
Requirements[slot] = Requirement.Move;
}
}

public override void OnEventCast(BossModule module, Actor caster, ActorCastEvent spell)
{
if ((AID)spell.Action.ID == AID.SenseWeakness)
{
if (module.Raid.FindSlot(caster.TargetID) is var slot && slot >= 0 && slot < Requirements.Length)
Requirements[slot] = Requirement.None;
}
}
}

class MagitekImpetus : Components.StatusDrivenForcedMarch
{
public MagitekImpetus() : base(3, (uint)SID.ForwardMarch, (uint)SID.AboutFace, (uint)SID.LeftFace, (uint)SID.RightFace)
{
ActivationLimit = 1;
}
}

class ProactiveMunition : Components.StandardChasingAOEs
{
public ProactiveMunition() : base(new AOEShapeCircle(6), ActionID.MakeSpell(AID.ProactiveMunitionTrackingStart), ActionID.MakeSpell(AID.ProactiveMunitionTrackingMove), 6, 1, 5) { }
}

[ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "SourP", GroupType = BossModuleInfo.GroupType.BozjaDuel, GroupID = 778, NameID = 23)] // bnpcname=9695
public class Duel5Menenius : BossModule
{
public Duel5Menenius(WorldState ws, Actor primary) : base(ws, primary, new ArenaBoundsSquare(new(-810, 520 /*y=260.3*/), 20)) { }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
namespace BossMod.Shadowbringers.Foray.Duel.Duel5Menenius;

public enum AID : uint
{
AutoAttack = 6497,
TeraTempest = 0x5D60,
CallousCrossfire = 23901,
MagitekMinefield = 23887,
ActivateBlueMine = 23888,
DetonateBlueMine = 23890,
ActivateRedMine = 23889,
DetonateRedMine = 0x5D41,
IndiscriminateDetonation = 23892,
GigaTempest = 23875,
GigaTempestLargeStart = 0x5D44,
GigaTempestLargeMove = 0x5D46,
GigaTempestSmallStart = 0x5D45,
GigaTempestSmallMove = 0x5D47,
Ruination = 23880,
RuinationExaStart = 23881,
RuinationExaMove = 23882,
SpiralScourge = 23900,
WindslicerShot = 23883,
GunberdWindslicer = 23885,
DarkShot = 23884,
GunberdDark = 23886,
ProactiveMunition = 0x5D58,
ProactiveMunitionTrackingStart = 0x5D59,
ProactiveMunitionTrackingMove = 0x5D5A,
ReactiveMunition = 23894,
SenseWeakness = 23893,
MagitekImpetus = 23899,
};

public enum SID : uint
{
ForwardMarch = 0x50D,
AboutFace = 0x50E,
LeftFace = 0x50F,
RightFace = 0x510,
AccelerationBomb = 0x430,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
namespace BossMod.Shadowbringers.Foray.Duel.Duel5Menenius;

class Duel5MeneniusStates : StateMachineBuilder
{
public Duel5MeneniusStates(BossModule module) : base(module)
{
DeathPhase(0, SinglePhase)
.ActivateOnEnter<ReactiveMunition>()
.ActivateOnEnter<GunberdShot>()
.ActivateOnEnter<LargeGigaTempest>()
.ActivateOnEnter<SmallGigaTempest>()
.ActivateOnEnter<RuinationExaflare>()
.ActivateOnEnter<ProactiveMunition>()
.ActivateOnEnter<MagitekImpetus>()
.ActivateOnEnter<BlueHiddenMines>()
.ActivateOnEnter<RedHiddenMines>();
}

private void SinglePhase(uint id)
{
CallousCrossfire(id, 13);

MagitekMinefield(id + 0x10000, 12);
GigaTempest(id + 0x20000, 11.25f);
ReadyShot(id + 0x30000, 15.5f);
Gunberd(id + 0x40000, 2);
MagitekImpetus(id + 0x50000, 2.6f);
MagitekMinefield(id + 0x60000, 6.2f);
ReadyShot(id + 0x70000, 10.25f);
Gunberd(id + 0x80000, 2);
MagitekMinefield(id + 0x90000, 5.6f);
Ruination(id + 0xA0000, 6.5f);
SpiralScourge(id + 0xB0000, 18.25f);

ProactiveMunition(id + 0x100000, 7.25f);
MagitekMinefield(id + 0x110000, 7.25f);
ReactiveMunition(id + 0x120000, 7.25f);
SenseWeakness(id + 0x130000, 13);
ReadyShot(id + 0x140000, 12.25f);
GigaTempest(id + 0x150000, 2);
MagitekImpetus(id + 0x160000, 3.3f);
Gunberd(id + 0x170000, 10);
ReactiveMunition(id + 0x180000, 13.6f);
Ruination(id + 0x190000, 4f);
SenseWeakness(id + 0x1A0000, 8.25f);
IndiscriminateDetonation(id + 0x1B0000, 3.25f);

ReadyShot(id + 0x200000, 11.25f);
ReactiveMunition(id + 0x210000, 2);
MagitekMinefield(id + 0x220000, 2);
MagitekImpetus(id + 0x230000, 10.3f);
MagitekMinefield(id + 0x240000, 8.25f);
Gunberd(id + 0x250000, 9.25f);
MagitekMinefield(id + 0x260000, 8.6f);
ReadyShot(id + 0x270000, 12.5f);
Ruination(id + 0x280000, 2.25f);
MagitekMinefield(id + 0x290000, 10.3f);
Gunberd(id + 0x2A0000, 9.3f);
ReadyShot(id + 0x2B0000, 13.8f);
GigaTempest(id + 0x2C0000, 2.2f);
MagitekImpetus(id + 0x2D0000, 3.5f);
Gunberd(id + 0x2E0000, 10.3f);
ReactiveMunition(id + 0x2F0000, 13.7f);
Ruination(id + 0x300000, 4.5f);
SenseWeakness(id + 0x310000, 8.25f);
IndiscriminateDetonation(id + 0x320000, 3.2f);

TeraTempest(id + 0x400000, 12.9f);
}

private void CallousCrossfire(uint id, float delay)
{
Cast(id, AID.CallousCrossfire, delay, 4, "Turret Crossfire")
.ActivateOnEnter<CallousCrossfire>()
.DeactivateOnExit<CallousCrossfire>();
}

private void MagitekMinefield(uint id, float delay)
{
Cast(id, AID.MagitekMinefield, delay, 3, "Place Mine");
}

private void IndiscriminateDetonation(uint id, float delay)
{
Cast(id, AID.IndiscriminateDetonation, delay, 4, "Detonate Mines");
}

private void GigaTempest(uint id, float delay)
{
Cast(id, AID.GigaTempest, delay, 5, "Gigatempest");
}

private void MagitekImpetus(uint id, float delay)
{
Cast(id, AID.MagitekImpetus, delay, 3, "Place Forced March");
}

private void ReadyShot(uint id, float delay)
{
CastMulti(id, new[] { AID.DarkShot, AID.WindslicerShot }, delay, 4, "Load Dark/Windslicer Shot");
}

private void Gunberd(uint id, float delay)
{
CastMulti(id, new[] { AID.GunberdDark, AID.GunberdWindslicer }, delay, 4, "Shoot Dark/Windslicer Shot");
}

private void Ruination(uint id, float delay)
{
Cast(id, AID.Ruination, delay, 4, "Ruination")
.ActivateOnEnter<RuinationCross>()
.DeactivateOnExit<RuinationCross>();
}

private void SpiralScourge(uint id, float delay)
{
Cast(id, AID.SpiralScourge, delay, 6, "Tankbuster")
.ActivateOnEnter<SpiralScourge>()
.DeactivateOnExit<SpiralScourge>();
}
private void ProactiveMunition(uint id, float delay)
{
Cast(id, AID.ProactiveMunition, delay, 5, "Chasing AOE");
}

private void ReactiveMunition(uint id, float delay)
{
Cast(id, AID.ReactiveMunition, delay, 3, "Place Acceleration Bomb");
}

private void SenseWeakness(uint id, float delay)
{
Cast(id, AID.SenseWeakness, delay, 4.5f, "Move")
.ActivateOnEnter<SenseWeakness>()
.DeactivateOnExit<SenseWeakness>();
}

private void TeraTempest(uint id, float delay)
{
Cast(id, AID.TeraTempest, delay, 25, "Enrage");
}
}
Loading

0 comments on commit a2da0ed

Please sign in to comment.