forked from awgil/ffxiv_bossmod
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #436 from FFXIV-CombatReborn/mergeWIP
merge vbm (sphene ex WIP)
- Loading branch information
Showing
165 changed files
with
1,478 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
BossMod/Modules/Dawntrail/Extreme/Ex3Sphene/AbsoluteAuthority.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
namespace BossMod.Dawntrail.Extreme.Ex3Sphene; | ||
|
||
class AbsoluteAuthorityPuddles(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.AbsoluteAuthorityPuddlesAOE), 8); | ||
|
||
class AbsoluteAuthorityExpansionBoot(BossModule module) : Components.UniformStackSpread(module, 6, 15, 4, alwaysShowSpreads: true) // TODO: verify falloff | ||
{ | ||
public int NumCasts; | ||
private readonly Ex3SpheneConfig _config = Service.Config.Get<Ex3SpheneConfig>(); | ||
|
||
public override void OnStatusGain(Actor actor, ActorStatus status) | ||
{ | ||
switch ((SID)status.ID) | ||
{ | ||
case SID.AuthoritysExpansion: | ||
if (!_config.AbsoluteAuthorityIgnoreFlares) | ||
AddSpread(actor, status.ExpireAt); | ||
break; | ||
case SID.AuthoritysBoot: | ||
AddStack(actor, status.ExpireAt); | ||
break; | ||
} | ||
} | ||
|
||
public override void OnEventCast(Actor caster, ActorCastEvent spell) | ||
{ | ||
if ((AID)spell.Action.ID is AID.AbsoluteAuthorityExpansion or AID.AbsoluteAuthorityBoot) | ||
{ | ||
++NumCasts; | ||
Spreads.Clear(); | ||
Stacks.Clear(); | ||
} | ||
} | ||
} | ||
|
||
class AbsoluteAuthorityHeel(BossModule module) : Components.CastCounter(module, ActionID.MakeSpell(AID.AbsoluteAuthorityHeel)) | ||
{ | ||
private BitMask _targets; | ||
|
||
private const float Radius = 3; // TODO: verify | ||
|
||
public override void AddHints(int slot, Actor actor, TextHints hints) | ||
{ | ||
if (_targets[slot] && !Raid.WithoutSlot().InRadiusExcluding(actor, Radius).Any()) | ||
hints.Add("Stack with someone!"); | ||
} | ||
|
||
public override void DrawArenaForeground(int pcSlot, Actor pc) | ||
{ | ||
if (_targets[pcSlot]) | ||
Arena.AddCircle(pc.Position, Radius, Colors.Safe); | ||
} | ||
|
||
public override void OnStatusGain(Actor actor, ActorStatus status) | ||
{ | ||
if ((SID)status.ID == SID.AuthoritysHeel) | ||
{ | ||
_targets.Set(Raid.FindSlot(actor.InstanceID)); | ||
} | ||
} | ||
} | ||
|
||
class AbsoluteAuthorityKnockback(BossModule module) : Components.KnockbackFromCastTarget(module, ActionID.MakeSpell(AID.AbsoluteAuthorityKnockback), 30, kind: Kind.DirForward); |
46 changes: 46 additions & 0 deletions
46
BossMod/Modules/Dawntrail/Extreme/Ex3Sphene/Aethertithe.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
namespace BossMod.Dawntrail.Extreme.Ex3Sphene; | ||
|
||
class Aethertithe(BossModule module) : Components.GenericAOEs(module) | ||
{ | ||
public AOEInstance? AOE; | ||
|
||
private static readonly AOEShapeCone _shape = new(100, 30.Degrees()); // TODO: verify angle | ||
|
||
public override IEnumerable<AOEInstance> ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(AOE); | ||
|
||
public override void OnEventEnvControl(byte index, uint state) | ||
{ | ||
if (index != 0) | ||
return; | ||
Angle? dir = state switch | ||
{ | ||
0x04000100 => -60.Degrees(), | ||
0x08000100 => 0.Degrees(), | ||
0x10000100 => 60.Degrees(), | ||
_ => null | ||
}; | ||
if (dir != null) | ||
{ | ||
AOE = new(_shape, Module.PrimaryActor.Position, dir.Value, WorldState.FutureTime(5.1f)); | ||
} | ||
} | ||
|
||
public override void OnEventCast(Actor caster, ActorCastEvent spell) | ||
{ | ||
if ((AID)spell.Action.ID is AID.AethertitheAOER or AID.AethertitheAOEC or AID.AethertitheAOEL) | ||
{ | ||
AOE = null; | ||
++NumCasts; | ||
} | ||
} | ||
} | ||
|
||
class Retribute : Components.GenericWildCharge | ||
{ | ||
public Retribute(BossModule module) : base(module, 4, ActionID.MakeSpell(AID.RetributeAOE), 60) | ||
{ | ||
Source = module.PrimaryActor; | ||
foreach (var (i, p) in module.Raid.WithSlot(true)) | ||
PlayerRoles[i] = p.Role == Role.Healer ? PlayerRole.Target : PlayerRole.Share; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
namespace BossMod.Dawntrail.Extreme.Ex3Sphene; | ||
|
||
class Coronation(BossModule module) : Components.GenericAOEs(module, ActionID.MakeSpell(AID.RuthlessRegalia)) | ||
{ | ||
public struct Group | ||
{ | ||
public required Actor Source; | ||
public Actor? LeftPartner; | ||
public Actor? RightPartner; | ||
|
||
public readonly bool Contains(Actor player) => LeftPartner == player || RightPartner == player; | ||
} | ||
|
||
public readonly List<Group> Groups = []; | ||
private DateTime _activation; | ||
|
||
private static readonly AOEShapeRect _shape = new(100, 6); | ||
|
||
public override IEnumerable<AOEInstance> ActiveAOEs(int slot, Actor actor) => Groups.Select(g => new AOEInstance(_shape, g.Source.Position, g.Source.Rotation, _activation)); | ||
|
||
public override PlayerPriority CalcPriority(int pcSlot, Actor pc, int playerSlot, Actor player, ref uint customColor) | ||
{ | ||
var index = Groups.FindIndex(g => g.Contains(pc)); | ||
return index >= 0 && Groups[index].Contains(player) ? PlayerPriority.Interesting : PlayerPriority.Irrelevant; | ||
} | ||
|
||
public override void DrawArenaForeground(int pcSlot, Actor pc) | ||
{ | ||
foreach (ref var g in Groups.AsSpan()) | ||
{ | ||
Arena.Actor(g.Source, Colors.Object, true); | ||
if (g.Contains(pc)) | ||
{ | ||
if (g.LeftPartner != null) | ||
Arena.AddLine(g.LeftPartner.Position, g.Source.Position, Colors.Danger); | ||
if (g.RightPartner != null) | ||
Arena.AddLine(g.RightPartner.Position, g.Source.Position, Colors.Danger); | ||
} | ||
} | ||
} | ||
|
||
public override void OnTethered(Actor source, ActorTetherInfo tether) | ||
{ | ||
if ((TetherID)tether.ID is TetherID.CoronationL or TetherID.CoronationR) | ||
{ | ||
_activation = WorldState.FutureTime(10.1f); | ||
var index = Groups.FindIndex(g => g.Source.InstanceID == tether.Target); | ||
if (index < 0 && WorldState.Actors.Find(tether.Target) is var target && target != null) | ||
{ | ||
index = Groups.Count; | ||
Groups.Add(new() { Source = target }); | ||
} | ||
if (index >= 0) | ||
{ | ||
ref var group = ref Groups.Ref(index); | ||
ref var partner = ref (TetherID)tether.ID == TetherID.CoronationL ? ref group.LeftPartner : ref group.RightPartner; | ||
if (partner != null) | ||
ReportError($"Both {source} and {partner} have identical tether"); | ||
partner = source; | ||
} | ||
} | ||
} | ||
} | ||
|
||
class AtomicRay(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.AtomicRayAOE), 16, false); |
30 changes: 30 additions & 0 deletions
30
BossMod/Modules/Dawntrail/Extreme/Ex3Sphene/DimensionalDistortion.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
namespace BossMod.Dawntrail.Extreme.Ex3Sphene; | ||
|
||
class DimensionalDistortion(BossModule module) : Components.Exaflare(module, 6) | ||
{ | ||
public override void OnCastStarted(Actor caster, ActorCastInfo spell) | ||
{ | ||
if ((AID)spell.Action.ID is AID.DimensionalDistortionFirst) | ||
{ | ||
Lines.Add(new() { Next = caster.Position, Advance = 8.5f * spell.Rotation.ToDirection(), NextExplosion = Module.CastFinishAt(spell), TimeToMove = 1.1f, ExplosionsLeft = 5, MaxShownExplosions = 2 }); | ||
} | ||
} | ||
|
||
public override void OnEventCast(Actor caster, ActorCastEvent spell) | ||
{ | ||
if ((AID)spell.Action.ID is AID.DimensionalDistortionFirst or AID.DimensionalDistortionRest) | ||
{ | ||
++NumCasts; | ||
int index = Lines.FindIndex(item => item.Next.AlmostEqual(caster.Position, 1)); | ||
if (index == -1) | ||
{ | ||
ReportError($"Failed to find entry for {caster.InstanceID:X}"); | ||
return; | ||
} | ||
|
||
AdvanceLine(Lines[index], caster.Position); | ||
if (Lines[index].ExplosionsLeft == 0) | ||
Lines.RemoveAt(index); | ||
} | ||
} | ||
} |
Oops, something went wrong.