Skip to content

Commit

Permalink
Merge pull request #501 from FFXIV-CombatReborn/mergeWIP
Browse files Browse the repository at this point in the history
cenote ja ja gural modules
  • Loading branch information
CarnifexOptimus authored Dec 16, 2024
2 parents ee20873 + 54ec547 commit 95690ae
Show file tree
Hide file tree
Showing 24 changed files with 1,016 additions and 86 deletions.
2 changes: 1 addition & 1 deletion BossMod/BossModule/ArenaBounds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public List<RelTriangle> ClipAndTriangulateRect(WDir startOffset, WDir endOffset

public void AddToInstanceCache(object key, object value)
{
if (Cache.Count > 2500)
if (Cache.Count > 500)
Cache.Clear();
Cache[key] = value;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public enum OID : uint
TuraliTomato = 0x4303, // R0.84, icon 4, needs to be killed in order from 1 to 5 for maximum rewards
TuligoraQueen = 0x4304, // R0.84, icon 5, needs to be killed in order from 1 to 5 for maximum rewards
UolonOfFortune = 0x42FF, // R3.5
AlpacaOfFortune = 0x42FE, // R1.8
Helper = 0x233C
}

Expand Down Expand Up @@ -37,6 +38,9 @@ public enum AID : uint
BlazingBlastVisual = 38259, // Boss->self, 3s cast, single-target visual
BlazingBlast = 38260, // Helper->location, 3s cast, range 6 circle

Inhale = 38280, // UolonOfFortune->self, 0.5s cast, range 27 120-degree cone
Spin = 38279, // UolonOfFortune->self, 3.0s cast, range 11 circle
RottenSpores = 38277, // UolonOfFortune->location, 3.0s cast, range 6 circle
TearyTwirl = 32301, // TuraliOnion->self, 3.5s cast, range 7 circle
HeirloomScream = 32304, // TuraliTomato->self, 3.5s cast, range 7 circle
PungentPirouette = 32303, // TuraliGarlic->self, 3.5s cast, range 7 circle
Expand All @@ -63,6 +67,9 @@ class CrossfireBlade2(BossModule module) : Crosses(module, AID.CrossfireBlade2);
class BlazingBreath(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.BlazingBreath), new AOEShapeRect(44, 5));
class BlazingBlast(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.BlazingBlast), 6);

class Spin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11));
class RottenSpores(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.RottenSpores), 6);

abstract class Mandragoras(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCircle(7));
class PluckAndPrune(BossModule module) : Mandragoras(module, AID.PluckAndPrune);
class TearyTwirl(BossModule module) : Mandragoras(module, AID.TearyTwirl);
Expand All @@ -85,6 +92,8 @@ public BullApollyonStates(BossModule module) : base(module)
.ActivateOnEnter<CrossfireBlade2>()
.ActivateOnEnter<CrossfireBlade3>()
.ActivateOnEnter<BlazingBlast>()
.ActivateOnEnter<Spin>()
.ActivateOnEnter<RottenSpores>()
.ActivateOnEnter<PluckAndPrune>()
.ActivateOnEnter<TearyTwirl>()
.ActivateOnEnter<HeirloomScream>()
Expand All @@ -94,11 +103,11 @@ public BullApollyonStates(BossModule module) : base(module)
}
}

[ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Kismet, Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 993, NameID = 13247)]
public class BullApollyon(WorldState ws, Actor primary) : SharedBounds(ws, primary)
[ModuleInfo(BossModuleInfo.Maturity.Verified, Contributors = "Kismet, Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 993, NameID = 13247)]
public class BullApollyon(WorldState ws, Actor primary) : SharedBoundsBoss(ws, primary)
{
private static readonly uint[] bonusAdds = [(uint)OID.TuraliEggplant, (uint)OID.TuraliTomato, (uint)OID.TuligoraQueen, (uint)OID.TuraliGarlic,
(uint)OID.TuraliOnion, (uint)OID.UolonOfFortune];
(uint)OID.TuraliOnion, (uint)OID.UolonOfFortune, (uint)OID.AlpacaOfFortune];
public static readonly uint[] All = [(uint)OID.Boss, .. bonusAdds];

protected override void DrawEnemies(int pcSlot, Actor pc)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ public enum OID : uint
TuraliTomato = 0x4303, // R0.84, icon 4, needs to be killed in order from 1 to 5 for maximum rewards
TuligoraQueen = 0x4304, // R0.84, icon 5, needs to be killed in order from 1 to 5 for maximum rewards
UolonOfFortune = 0x42FF, // R3.5
AlpacaOfFortune = 0x42FE, // R1.800, x0 (spawn during fight)

AlpacaOfFortune = 0x42FE, // R1.8
Helper = 0x233C
}

Expand Down Expand Up @@ -48,6 +47,7 @@ public enum AID : uint

Inhale = 38280, // UolonOfFortune->self, 0.5s cast, range 27 120-degree cone
Spin = 38279, // UolonOfFortune->self, 3.0s cast, range 11 circle
RottenSpores = 38277, // UolonOfFortune->location, 3.0s cast, range 6 circle
TearyTwirl = 32301, // TuraliOnion->self, 3.5s cast, range 7 circle
HeirloomScream = 32304, // TuraliTomato->self, 3.5s cast, range 7 circle
PungentPirouette = 32303, // TuraliGarlic->self, 3.5s cast, range 7 circle
Expand All @@ -59,7 +59,7 @@ public enum AID : uint
public enum SID : uint
{
Concealed = 3997, // Boss->Boss, extra=0x2
Slime = 569, // Boss->player, extra=0x0
Slime = 569 // Boss->player, extra=0x0
}

class Lap(BossModule module) : Components.SingleTargetCast(module, ActionID.MakeSpell(AID.Lap));
Expand Down Expand Up @@ -132,6 +132,7 @@ public override void OnActorCreated(Actor actor)
}

class Spin(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Spin), new AOEShapeCircle(11));
class RottenSpores(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.RottenSpores), 6);

abstract class Mandragoras(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCircle(7));
class PluckAndPrune(BossModule module) : Mandragoras(module, AID.PluckAndPrune);
Expand Down Expand Up @@ -162,12 +163,13 @@ public GoldenMolterStates(BossModule module) : base(module)
.ActivateOnEnter<PungentPirouette>()
.ActivateOnEnter<Pollen>()
.ActivateOnEnter<Spin>()
.ActivateOnEnter<RottenSpores>()
.Raw.Update = () => module.Enemies(GoldenMolter.All).All(x => x.IsDeadOrDestroyed);
}
}

[ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "Kismet, Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 993, NameID = 13248)]
public class GoldenMolter(WorldState ws, Actor primary) : SharedBounds(ws, primary)
[ModuleInfo(BossModuleInfo.Maturity.Verified, Contributors = "Kismet, Malediktus", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 993, NameID = 13248)]
public class GoldenMolter(WorldState ws, Actor primary) : SharedBoundsBoss(ws, primary)
{
private static readonly uint[] bonusAdds = [(uint)OID.TuraliEggplant, (uint)OID.TuraliTomato, (uint)OID.TuligoraQueen, (uint)OID.TuraliGarlic,
(uint)OID.TuraliOnion, (uint)OID.UolonOfFortune, (uint)OID.AlpacaOfFortune];
Expand Down
147 changes: 147 additions & 0 deletions BossMod/Modules/Dawntrail/TreasureHunt/CenoteJaJaGural/Room1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
namespace BossMod.Dawntrail.TreasureHunt.CenoteJaJaGural.Room1;

public enum OID : uint
{
Boss = 0x1EBAA4, // R0.5
CenoteWoodsman = 0x4310, // R1.9
CenotePitcherWeed = 0x4311, // R2.4
CenoteNetzach = 0x4312, // R3.18
CenoteSilverLobo = 0x4307, // R4.0
CenoteGedan = 0x4308, // R2.2
CenoteBandercoeurl = 0x4309, // R2.5
CenoteTohtson = 0x430A, // R1.75
Cenotekeeper = 0x430B, // R1.7
CenoteTohsoq = 0x430C, // R2.0
CenoteTomaton = 0x430D, // R2.04
CenoteTomatuxmool = 0x430E, // R2.04
CenoteNecrosis = 0x430F, // R2.88

UolonOfFortune = 0x42FF, // R3.5
AlpacaOfFortune = 0x42FE, // R1.8
TuraliOnion = 0x4300, // R0.84, icon 1, needs to be killed in order from 1 to 5 for maximum rewards
TuraliEggplant = 0x4301, // R0.84, icon 2, needs to be killed in order from 1 to 5 for maximum rewards
TuraliGarlic = 0x4302, // R0.84, icon 3, needs to be killed in order from 1 to 5 for maximum rewards
TuraliTomato = 0x4303, // R0.84, icon 4, needs to be killed in order from 1 to 5 for maximum rewards
TuligoraQueen = 0x4304, // R0.84, icon 5, needs to be killed in order from 1 to 5 for maximum rewards
}

public enum AID : uint
{
AutoAttack1 = 872, // UolonOfFortune/CenoteTomaton/CenoteTomatuxmool/CenoteTohtson/Cenotekeeper/CenoteGedan/CenoteWoodsman/CenoteNetzach->player, no cast, single-target
AutoAttack2 = 870, // CenoteTohsoq/CenoteSilverLobo/CenoteBandercoeurl/CenotePitcherWeed->player, no cast, single-target
AutoAttack3 = 871, // CenoteNecrosis->player, no cast, single-target

NepenthicPlunge = 38291, // CenotePitcherWeed->self, 3.0s cast, range 10 90-degree cone
CreepingHush = 38292, // CenoteNetzach->self, 3.0s cast, range 12 120-degree cone
Ovation = 38290, // CenoteWoodsman->self, 3.0s cast, range 14 width 4 rect
BestialFire = 38283, // CenoteBandercoeurl->location, 3.0s cast, range 5 circle
HeadButt = 38284, // CenoteTohtson->self, 2.5s cast, range 6 120-degree cone
AetherialBlast = 38287, // CenoteTohsoq->self, 3.0s cast, range 20 width 4 rect
IsleDrop = 38285, // Cenotekeeper->location, 3.0s cast, range 6 circle
Envenomate = 38281, // CenoteSilverLobo->players, 4.0s cast, width 3 rect charge
SyrupSpout = 38288, // CenoteTomatuxmool/CenoteTomaton->self, 3.0s cast, range 10 120-degree cone
SpinningAttack = 38289, // CenoteNecrosis->self, 3.0s cast, range 10 width 4 rect
NeckRip = 38282, // CenoteGedan->player, no cast, single-target

Inhale = 38280, // UolonOfFortune->self, 0.5s cast, range 27 120-degree cone
Spin = 38279, // UolonOfFortune->self, 3.0s cast, range 11 circle
RottenSpores = 38277, // UolonOfFortune->location, 3.0s cast, range 6 circle
TearyTwirl = 32301, // TuraliOnion->self, 3.5s cast, range 7 circle
HeirloomScream = 32304, // TuraliTomato->self, 3.5s cast, range 7 circle
PungentPirouette = 32303, // TuraliGarlic->self, 3.5s cast, range 7 circle
PluckAndPrune = 32302, // TuraliEggplant->self, 3.5s cast, range 7 circle
Pollen = 32305, // TuligoraQueen->self, 3.5s cast, range 7 circle
Telega = 9630 // BonusAdds->self, no cast, single-target, bonus adds disappear
}

class NepenthicPlunge(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.NepenthicPlunge), new AOEShapeCone(10, 45.Degrees()));
class CreepingHush(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CreepingHush), new AOEShapeCone(12, 60.Degrees()));
class Ovation(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.Ovation), new AOEShapeRect(14, 2));
class BestialFire(BossModule module) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(AID.BestialFire), 5);
class HeadButt(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.CreepingHush), new AOEShapeCone(6, 60.Degrees()));
class AetherialBlast(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.AetherialBlast), new AOEShapeRect(20, 2));
class Envenomate(BossModule module) : Components.BaitAwayChargeCast(module, ActionID.MakeSpell(AID.Envenomate), 1.5f);
class SyrupSpout(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SyrupSpout), new AOEShapeCone(10, 60.Degrees()));
class SpinningAttack(BossModule module) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(AID.SpinningAttack), new AOEShapeRect(10, 2));

abstract class CircleLoc6(BossModule module, AID aid) : Components.LocationTargetedAOEs(module, ActionID.MakeSpell(aid), 6);
class IsleDrop(BossModule module) : CircleLoc6(module, AID.IsleDrop);
class RottenSpores(BossModule module) : CircleLoc6(module, AID.RottenSpores);

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

abstract class Mandragoras(BossModule module, AID aid) : Components.SelfTargetedAOEs(module, ActionID.MakeSpell(aid), new AOEShapeCircle(7));
class PluckAndPrune(BossModule module) : Mandragoras(module, AID.PluckAndPrune);
class TearyTwirl(BossModule module) : Mandragoras(module, AID.TearyTwirl);
class HeirloomScream(BossModule module) : Mandragoras(module, AID.HeirloomScream);
class PungentPirouette(BossModule module) : Mandragoras(module, AID.PungentPirouette);
class Pollen(BossModule module) : Mandragoras(module, AID.Pollen);

class Room1States : StateMachineBuilder
{
public Room1States(BossModule module) : base(module)
{
TrivialPhase()
.ActivateOnEnter<NepenthicPlunge>()
.ActivateOnEnter<CreepingHush>()
.ActivateOnEnter<Ovation>()
.ActivateOnEnter<BestialFire>()
.ActivateOnEnter<HeadButt>()
.ActivateOnEnter<AetherialBlast>()
.ActivateOnEnter<IsleDrop>()
.ActivateOnEnter<Envenomate>()
.ActivateOnEnter<SyrupSpout>()
.ActivateOnEnter<SpinningAttack>()
.ActivateOnEnter<Spin>()
.ActivateOnEnter<RottenSpores>()
.ActivateOnEnter<PluckAndPrune>()
.ActivateOnEnter<TearyTwirl>()
.ActivateOnEnter<HeirloomScream>()
.ActivateOnEnter<PungentPirouette>()
.ActivateOnEnter<Pollen>()
.Raw.Update = () => module.Enemies(Room1.All).All(x => x.IsDeadOrDestroyed) || module.PrimaryActor.EventState == 7;
}
}

[ModuleInfo(BossModuleInfo.Maturity.Verified, Contributors = "The Combat Reborn Team (Malediktus)", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 993, NameID = 5057)]
public class Room1(WorldState ws, Actor primary) : BossModule(ws, primary, ArenaBounds.Center, ArenaBounds)
{
private static readonly WPos arenaCenter = new(0, 377);
private static readonly Angle a135 = 135.Degrees();
private static readonly WDir dir135 = a135.ToDirection(), dirM135 = (-a135).ToDirection();
public static readonly ArenaBoundsComplex ArenaBounds = new([new Polygon(arenaCenter, 19.5f * CosPI.Pi36th, 36), new Rectangle(arenaCenter + 8.65f * dir135, 20, 6.15f, a135),
new Rectangle(arenaCenter + 8.65f * dirM135, 20, 6.15f, -a135), new Rectangle(arenaCenter + 12 * dir135, 20, 4.3f, a135), new Rectangle(arenaCenter + 12 * dirM135, 20, 4.3f, -a135),
new Rectangle(arenaCenter + 14.3f * dir135, 20, 3.5f, a135), new Rectangle(arenaCenter + 14.3f * dirM135, 20, 3.5f, -a135)], [new Rectangle(new(0, 397), 20, 1.4f)]);
private static readonly uint[] bonusAdds = [(uint)OID.TuligoraQueen, (uint)OID.TuraliTomato, (uint)OID.TuraliOnion, (uint)OID.TuraliEggplant,
(uint)OID.TuraliGarlic, (uint)OID.UolonOfFortune, (uint)OID.AlpacaOfFortune];
private static readonly uint[] trash = [(uint)OID.CenoteNetzach, (uint)OID.CenotePitcherWeed, (uint)OID.CenoteWoodsman, (uint)OID.CenoteSilverLobo, (uint)OID.CenoteGedan,
(uint)OID.CenoteBandercoeurl, (uint)OID.CenoteTohsoq, (uint)OID.Cenotekeeper, (uint)OID.CenoteTohtson, (uint)OID.CenoteTomatuxmool, (uint)OID.CenoteTomaton, (uint)OID.CenoteNecrosis];
public static readonly uint[] All = [(uint)OID.Boss, .. trash, .. bonusAdds];

protected override void DrawEnemies(int pcSlot, Actor pc)
{
Arena.Actor(PrimaryActor, Colors.Object);
Arena.Actors(Enemies(trash));
Arena.Actors(Enemies(bonusAdds), Colors.Vulnerable);
}

protected override bool CheckPull() => !PrimaryActor.IsTargetable;

protected override void CalculateModuleAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints)
{
for (var i = 0; i < hints.PotentialTargets.Count; ++i)
{
var e = hints.PotentialTargets[i];
e.Priority = (OID)e.Actor.OID switch
{
OID.TuraliOnion => 6,
OID.TuraliEggplant => 5,
OID.TuraliGarlic => 4,
OID.TuraliTomato => 3,
OID.TuligoraQueen or OID.AlpacaOfFortune => 2,
OID.UolonOfFortune => 1,
_ => 0
};
}
}
}
Loading

0 comments on commit 95690ae

Please sign in to comment.