Skip to content

Commit

Permalink
Merge pull request #367 from FFXIV-CombatReborn/mergeWIP
Browse files Browse the repository at this point in the history
polygon improvements, tiny dungeon improvements
  • Loading branch information
CarnifexOptimus authored Sep 25, 2024
2 parents 8661fa5 + 28b4efd commit fdeda96
Show file tree
Hide file tree
Showing 5 changed files with 155 additions and 167 deletions.
12 changes: 0 additions & 12 deletions BossMod/Modules/Endwalker/Dungeon/D06DeadEnds/D063Rala.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,6 @@ public override void AddHints(int slot, Actor actor, TextHints hints)
if (!_doomed.Contains(actor) && actor.Role == Role.Healer)
hints.Add($"Heal to full {c.Name}! (Doom)");
}

public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints)
{
base.AddAIHints(slot, actor, assignment, hints);
foreach (var c in _doomed)
{
if (_doomed.Count > 0 && actor.Role == Role.Healer)
hints.ActionsToExecute.Push(ActionID.MakeSpell(ClassShared.AID.Esuna), c, ActionQueue.Priority.High);
else if (_doomed.Count > 0 && actor.Class == Class.BRD)
hints.ActionsToExecute.Push(ActionID.MakeSpell(BRD.AID.WardensPaean), c, ActionQueue.Priority.High);
}
}
}

class LamellarLightCircle(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.LamellarLight1), new AOEShapeCircle(15), 3);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,13 @@ class DarkDeluge(BossModule module) : Components.LocationTargetedAOEs(module, Ac

class Necrobombs(BossModule module) : BossComponent(module)
{
private readonly NecrobombBaitAway _ba = module.FindComponent<NecrobombBaitAway>()!;
private static readonly AOEShapeCircle circle = new(8);

public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints)
{
base.AddAIHints(slot, actor, assignment, hints);
if (_ba.ActiveBaits.Any())
return;
var forbidden = new List<Func<WPos, float>>();
foreach (var e in WorldState.Actors.Where(x => !x.IsAlly && x.Tether.ID == (uint)TetherID.CrawlingNecrobombs))
forbidden.Add(circle.Distance(e.Position, default));
Expand Down Expand Up @@ -137,13 +139,13 @@ public override void OnStatusLose(Actor actor, ActorStatus status)

public override void AddHints(int slot, Actor actor, TextHints hints)
{
if (_doomed.Contains(actor) && !(actor.Role == Role.Healer))
hints.Add("You were doomed! Get healed to full fast.");
else if (_doomed.Contains(actor) && actor.Role == Role.Healer)
hints.Add("Heal yourself to full! (Doom).");
if (_doomed.Contains(actor) && !(actor.Role == Role.Healer || actor.Class == Class.BRD))
hints.Add("You were doomed! Get cleansed fast.");
if (_doomed.Contains(actor) && (actor.Role == Role.Healer || actor.Class == Class.BRD))
hints.Add("Cleanse yourself! (Doom).");
foreach (var c in _doomed)
if (!_doomed.Contains(actor) && actor.Role == Role.Healer)
hints.Add($"Heal to full {c.Name}! (Doom)");
if (!_doomed.Contains(actor) && (actor.Role == Role.Healer || actor.Class == Class.BRD))
hints.Add($"Cleanse {c.Name}! (Doom)");
}

public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,13 @@ class CratersWildRampage(BossModule module) : Components.GenericAOEs(module)
private static readonly Circle circle2 = new(pos2, 7);
public readonly List<Circle> Circles = [];
private bool invert;
private DateTime activation;
private const string hint = "Go inside crater!";

public override IEnumerable<AOEInstance> ActiveAOEs(int slot, Actor actor)
{
if (Circles.Count > 0)
yield return new(new AOEShapeCustom(Circles) with { InvertForbiddenZone = invert }, Arena.Center, Color: invert ? Colors.SafeFromAOE : Colors.AOE);
yield return new(new AOEShapeCustom(Circles) with { InvertForbiddenZone = invert }, Arena.Center, default, activation, invert ? Colors.SafeFromAOE : Colors.AOE);
}

public override void OnActorEAnim(Actor actor, uint state)
Expand All @@ -183,14 +185,31 @@ public override void OnActorEAnim(Actor actor, uint state)
public override void OnCastStarted(Actor caster, ActorCastInfo spell)
{
if ((AID)spell.Action.ID == AID.WildRampage)
{
invert = true;
activation = Module.CastFinishAt(spell);
}
}

public override void OnCastFinished(Actor caster, ActorCastInfo spell)
{
if ((AID)spell.Action.ID == AID.WildRampage)
invert = false;
}

public override void AddHints(int slot, Actor actor, TextHints hints)
{
var activeSafespot = ActiveAOEs(slot, actor).Where(c => c.Color == Colors.SafeFromAOE).ToList();
if (activeSafespot.Count != 0)
{
if (!activeSafespot.Any(c => c.Check(actor.Position)))
hints.Add(hint);
else if (activeSafespot.Any(c => c.Check(actor.Position)))
hints.Add(hint, false);
}
else
base.AddHints(slot, actor, hints);
}
}

abstract class RagingSlice(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeRect(50, 3));
Expand Down
30 changes: 25 additions & 5 deletions BossMod/Modules/Stormblood/Dungeon/D13Burn/D133MistDragon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public enum SID : uint

public enum IconID : uint
{
BaitawayRect = 14,
BaitawayCone = 26
BaitawayCone = 26, // player
BaitawayRect = 14, // player
}

class FogPlumeCross(BossModule module) : Components.GenericAOEs(module)
Expand Down Expand Up @@ -68,22 +68,42 @@ public override void OnCastFinished(Actor caster, ActorCastInfo spell)

class FogPlumeCircle(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.FogPlumeCircle), new AOEShapeCircle(6));

class ColdFogGrowth(BossModule module) : Components.GenericAOEs(module)
class ColdFog(BossModule module) : Components.GenericAOEs(module)
{
private AOEInstance? _aoe;
private DateTime activation;
private bool reset;

public override IEnumerable<AOEInstance> ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe);

public override void OnStatusGain(Actor actor, ActorStatus status)
{
if ((SID)status.ID == SID.AreaOfInfluenceUp)
_aoe = new(new AOEShapeCircle(4 + status.Extra), Arena.Center);
_aoe = new(new AOEShapeCircle(4 + status.Extra), Arena.Center, default, activation);
}

public override void OnCastStarted(Actor caster, ActorCastInfo spell)
{
if ((AID)spell.Action.ID == AID.ColdFogVisual)
activation = Module.CastFinishAt(spell);
}

public override void OnEventCast(Actor caster, ActorCastEvent spell)
{
if ((AID)spell.Action.ID == AID.ColdFog)
{
_aoe = null;
reset = false;
}
}

public override void Update()
{
if (_aoe != null && !reset && !Module.Enemies(OID.DraconicRegard).Any(x => !x.IsDead))
{
_aoe = _aoe.Value with { Activation = WorldState.FutureTime(5.6f) };
reset = true;
}
}
}

Expand Down Expand Up @@ -246,7 +266,7 @@ public D133MistDragonStates(BossModule module) : base(module)
TrivialPhase()
.ActivateOnEnter<FogPlumeCircle>()
.ActivateOnEnter<FogPlumeCross>()
.ActivateOnEnter<ColdFogGrowth>()
.ActivateOnEnter<ColdFog>()
.ActivateOnEnter<ChillingAspiration>()
.ActivateOnEnter<RimeWreath>()
.ActivateOnEnter<TouchDown>()
Expand Down
Loading

0 comments on commit fdeda96

Please sign in to comment.