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 #457 from FFXIV-CombatReborn/mergeWIP
Prishe module updated
- Loading branch information
Showing
16 changed files
with
374 additions
and
168 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,14 @@ | ||
namespace BossMod.Dawntrail.Alliance.A11Prishe; | ||
|
||
class Banishga(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.Banishga)); | ||
|
||
// Knuckle Sandwich and Brittle Impact happen at the same time and need to be staggered | ||
class KnuckleSandwichAOE1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.KnuckleSandwichAOE1), new AOEShapeCircle(9)); | ||
class KnuckleSandwichAOE2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.KnuckleSandwichAOE2), new AOEShapeCircle(18)); | ||
class KnuckleSandwichAOE3(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.KnuckleSandwichAOE3), new AOEShapeCircle(27)); | ||
class BrittleImpact1(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BrittleImpact1), new AOEShapeDonut(9, 60)); | ||
class BrittleImpact2(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BrittleImpact2), new AOEShapeDonut(18, 60)); | ||
class BrittleImpact3(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BrittleImpact3), new AOEShapeDonut(27, 60)); | ||
|
||
class NullifyingDropkick1(BossModule module) : Components.CastSharedTankbuster(module, ActionID.MakeSpell(AID.NullifyingDropkick1), 6); | ||
|
||
class Holy2(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.Holy2), 6); | ||
|
||
class NullifyingDropkick(BossModule module) : Components.CastSharedTankbuster(module, ActionID.MakeSpell(AID.NullifyingDropkick), 6); | ||
class Holy(BossModule module) : Components.SpreadFromCastTargets(module, ActionID.MakeSpell(AID.Holy), 6); | ||
class BanishgaIV(BossModule module) : Components.RaidwideCast(module, ActionID.MakeSpell(AID.BanishgaIV)); | ||
class Explosion(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Explosion), new AOEShapeCircle(8)); | ||
|
||
[ModuleInfo(BossModuleInfo.Maturity.WIP, Contributors = "The Combat Reborn Team (LTS)", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 1015, NameID = 13351)] | ||
public class A11Prishe(WorldState ws, Actor primary) : BossModule(ws, primary, new(800, 400), new ArenaBoundsSquare(35)); | ||
[ModuleInfo(BossModuleInfo.Maturity.Verified, Contributors = "The Combat Reborn Team (Malediktus, LTS)", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 1015, NameID = 13351)] | ||
public class A11Prishe(WorldState ws, Actor primary) : BossModule(ws, primary, ArenaCenter, DefaultBounds) | ||
{ | ||
public static readonly WPos ArenaCenter = new(800, 400); | ||
public static readonly ArenaBoundsSquare DefaultBounds = new(35); | ||
} |
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
58 changes: 58 additions & 0 deletions
58
BossMod/Modules/Dawntrail/Alliance/A11Prishe/ArenaChanges.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,58 @@ | ||
namespace BossMod.Dawntrail.Alliance.A11Prishe; | ||
|
||
class ArenaChanges(BossModule module) : Components.GenericAOEs(module) | ||
{ | ||
private AOEInstance? _aoe; | ||
private static readonly Square[] defaultSquare = [new(A11Prishe.ArenaCenter, 35)]; | ||
private static readonly Shape[] differenceENVC00020001 = [new Square(new(795, 405), 10), new Square(new(805, 395), 10), new Rectangle(new(810, 430), 15, 5), | ||
new Rectangle(new(830, 420), 5, 15), new Rectangle(new(790, 370), 15, 5), new Rectangle(new(770, 380), 5, 15)]; | ||
private static readonly AOEShapeCustom arenaChangeENVC00020001 = new(defaultSquare, differenceENVC00020001); | ||
private static readonly ArenaBoundsComplex arenaENVC00020001 = new(differenceENVC00020001); | ||
private static readonly Shape[] differenceENVC02000100 = [new Square(new(795, 395), 10), new Square(new(805, 405), 10), new Rectangle(new(820, 370), 15, 5), | ||
new Rectangle(new(830, 390), 5, 15), new Rectangle(new(780, 430), 15, 5), new Rectangle(new(770, 410), 5, 15)]; | ||
private static readonly AOEShapeCustom arenaChangeENVC02000100 = new(defaultSquare, differenceENVC02000100); | ||
private static readonly ArenaBoundsComplex arenaENVC02000100 = new(differenceENVC02000100); | ||
public override IEnumerable<AOEInstance> ActiveAOEs(int slot, Actor actor) => Utils.ZeroOrOne(_aoe); | ||
|
||
public override void OnEventEnvControl(byte index, uint state) | ||
{ | ||
if (index != 0x01) | ||
return; | ||
switch (state) | ||
{ | ||
case 0x00020001: | ||
SetAOE(arenaChangeENVC00020001); | ||
break; | ||
case 0x02000100: | ||
SetAOE(arenaChangeENVC02000100); | ||
break; | ||
case 0x00200010: | ||
SetArena(arenaENVC00020001); | ||
break; | ||
case 0x08000400: | ||
SetArena(arenaENVC02000100); | ||
break; | ||
case 0x00080004 or 0x00800004: | ||
SetDefaultArena(); | ||
break; | ||
} | ||
} | ||
|
||
private void SetDefaultArena() | ||
{ | ||
Arena.Bounds = A11Prishe.DefaultBounds; | ||
Arena.Center = A11Prishe.ArenaCenter; | ||
} | ||
|
||
private void SetArena(ArenaBoundsComplex bounds) | ||
{ | ||
Arena.Bounds = bounds; | ||
Arena.Center = bounds.Center; | ||
_aoe = null; | ||
} | ||
|
||
private void SetAOE(AOEShapeCustom shape) | ||
{ | ||
_aoe = new(shape, A11Prishe.ArenaCenter, default, WorldState.FutureTime(5)); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
BossMod/Modules/Dawntrail/Alliance/A11Prishe/AsuranFists.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,22 @@ | ||
namespace BossMod.Dawntrail.Alliance.A11Prishe; | ||
|
||
class AsuranFists(BossModule module) : Components.GenericTowers(module) | ||
{ | ||
public override void OnActorCreated(Actor actor) | ||
{ | ||
if ((OID)actor.OID == OID.Tower) | ||
Towers.Add(new(actor.Position, 6, PartyState.MaxAllianceSize, PartyState.MaxAllianceSize, activation: WorldState.FutureTime(6.5f))); | ||
} | ||
|
||
public override void OnEventCast(Actor caster, ActorCastEvent spell) | ||
{ | ||
if ((AID)spell.Action.ID is AID.AsuranFists1 or AID.AsuranFists2 or AID.AsuranFists3) | ||
{ | ||
if (++NumCasts == 8) | ||
{ | ||
NumCasts = 0; | ||
Towers.Clear(); | ||
} | ||
} | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
BossMod/Modules/Dawntrail/Alliance/A11Prishe/AuroralUppercut.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,29 @@ | ||
namespace BossMod.Dawntrail.Alliance.A11Prishe; | ||
|
||
class AuroralUppercut(BossModule module) : Components.Knockback(module, ignoreImmunes: true) | ||
{ | ||
private Source? _source; | ||
public override IEnumerable<Source> Sources(int slot, Actor actor) => Utils.ZeroOrOne(_source); | ||
|
||
public override void OnCastStarted(Actor caster, ActorCastInfo spell) | ||
{ | ||
switch ((AID)spell.Action.ID) | ||
{ | ||
case AID.AuroralUppercut1: | ||
_source = new(Arena.Center, 12, Module.CastFinishAt(spell)); | ||
break; | ||
case AID.AuroralUppercut2: | ||
_source = new(Arena.Center, 25, Module.CastFinishAt(spell)); | ||
break; | ||
case AID.AuroralUppercut3: | ||
_source = new(Arena.Center, 38, Module.CastFinishAt(spell)); | ||
break; | ||
} | ||
} | ||
|
||
public override void OnStatusLose(Actor actor, ActorStatus status) | ||
{ | ||
if (_source != null && (SID)status.ID == SID.Knockback) | ||
_source = null; | ||
} | ||
} |
73 changes: 73 additions & 0 deletions
73
BossMod/Modules/Dawntrail/Alliance/A11Prishe/BanishStorm.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,73 @@ | ||
namespace BossMod.Dawntrail.Alliance.A11Prishe; | ||
|
||
class BanishStorm(BossModule module) : Components.Exaflare(module, 6) | ||
{ | ||
private static readonly WPos[] positions = [new(815, 415), new(800, 385), new(785, 400), new(785, 385), new(815, 400), new(800, 415)]; | ||
private static readonly WDir[] directions = | ||
[ | ||
4 * (-0.003f).Degrees().ToDirection(), | ||
4 * 119.997f.Degrees().ToDirection(), | ||
4 * (-120.003f).Degrees().ToDirection(), | ||
4 * 180.Degrees().ToDirection(), | ||
4 * (-60.005f).Degrees().ToDirection(), | ||
4 * 60.Degrees().ToDirection(), | ||
4 * 89.999f.Degrees().ToDirection(), | ||
4 * (-150.001f).Degrees().ToDirection(), | ||
4 * (-30.001f).Degrees().ToDirection(), | ||
4 * (-90.004f).Degrees().ToDirection(), | ||
4 * 29.996f.Degrees().ToDirection(), | ||
4 * 149.996f.Degrees().ToDirection(), | ||
]; | ||
private static readonly Dictionary<byte, (int position, int[] directions, int[] numExplosions)> LineConfigs = new() | ||
{ | ||
{ 0x0A, (0, [0, 1, 2], [5, 5, 14]) }, | ||
{ 0x34, (0, [0, 1, 2], [5, 5, 14]) }, | ||
{ 0x0D, (0, [3, 5, 4], [13, 5, 9]) }, | ||
{ 0x05, (3, [0, 1, 2], [13, 9, 5]) }, | ||
{ 0x02, (3, [3, 5, 4], [5, 14, 5]) }, | ||
{ 0x32, (3, [3, 5, 4], [5, 14, 5]) }, | ||
{ 0x0B, (1, [3, 4, 5], [5, 10, 10]) }, | ||
{ 0x35, (1, [3, 4, 5], [5, 10, 10]) }, | ||
{ 0x08, (1, [0, 2, 1], [13, 9, 9]) }, | ||
{ 0x09, (2, [9, 11, 10], [5, 10, 10]) }, | ||
{ 0x0C, (2, [6, 7, 8], [13, 9, 9]) }, | ||
{ 0x03, (4, [6, 7, 8], [5, 10, 10]) }, | ||
{ 0x06, (4, [9, 11, 10], [13, 9, 9]) }, | ||
{ 0x07, (5, [0, 1, 2], [5, 10, 10]) }, | ||
{ 0x33, (5, [0, 1, 2], [5, 10, 10]) }, | ||
{ 0x04, (5, [3, 5, 4], [13, 9, 9]) }, | ||
}; | ||
|
||
public override void OnEventEnvControl(byte index, uint state) | ||
{ | ||
if (state == 0x00020001 && LineConfigs.TryGetValue(index, out var config)) | ||
{ | ||
var activation1 = WorldState.FutureTime(9.1f); | ||
var activation2 = WorldState.FutureTime(9.8f); | ||
|
||
for (var i = 0; i < 3; ++i) | ||
{ | ||
Lines.Add(new() | ||
{ | ||
Next = positions[config.position] + (i > 0 ? directions[config.directions[i]] : default), | ||
Advance = directions[config.directions[i]], | ||
NextExplosion = i == 0 ? activation1 : activation2, | ||
TimeToMove = 0.7f, | ||
ExplosionsLeft = config.numExplosions[i], | ||
MaxShownExplosions = config.numExplosions[i] | ||
}); | ||
} | ||
} | ||
} | ||
|
||
public override void OnEventCast(Actor caster, ActorCastEvent spell) | ||
{ | ||
if ((AID)spell.Action.ID == AID.Banish) | ||
{ | ||
var index = Lines.FindIndex(item => item.Next.AlmostEqual(caster.Position, 1)); | ||
AdvanceLine(Lines[index], caster.Position); | ||
if (Lines[index].ExplosionsLeft == 0) | ||
Lines.RemoveAt(index); | ||
} | ||
} | ||
} |
Oops, something went wrong.