Skip to content

Commit 48d2cfb

Browse files
Merge pull request #702 from Jaksuhn/valentiones
Valentiones duty
2 parents 0f2d433 + dd2ed4e commit 48d2cfb

File tree

4 files changed

+139
-1
lines changed

4 files changed

+139
-1
lines changed

BossMod/ActionQueue/Roleplay.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,10 @@ public enum AID : uint
223223
TuraliJudgment = 37126,
224224
TrialsOfTural = 37127,
225225
TuraliFervor = 37128,
226-
DawnlitConviction = 37129
226+
DawnlitConviction = 37129,
227+
228+
// The Patisserie
229+
BakeOff = 44039, // instant cast, range 5 60-degree cone, 3 charges
227230
}
228231

229232
public enum TraitID : uint { }
@@ -477,6 +480,8 @@ public Definitions(ActionDefinitions d)
477480
d.RegisterSpell(AID.TrialsOfTural);
478481
d.RegisterSpell(AID.TuraliFervor);
479482
d.RegisterSpell(AID.DawnlitConviction, castAnimLock: 3.86f);
483+
484+
d.RegisterSpell(AID.BakeOff);
480485
}
481486

482487
public void Dispose() { }
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
using BossMod.QuestBattle;
2+
3+
namespace BossMod.Dawntrail.Quest.TheIcingOnTheCake;
4+
5+
// Valentione's Day 2026
6+
public enum OID : uint
7+
{
8+
MammetPtissier = 0x48DF, // R0.150, x?
9+
KupkaKupp = 0x48E0, // R0.300, x?
10+
Boss = KupkaKupp,
11+
12+
CakeStand = 0x1EBE61,
13+
14+
WhippedCreamFrosting = 0x1EBE4D, // 0x56
15+
ChocolateFrosting = 0x1EBE4E,
16+
PistachioFrosting = 0x1EBE4F,
17+
BerryFrosting = 0x1EBE50,
18+
LemonFrosting = 0x1EBE51,
19+
20+
WhiteRolanberries = 0x1EBE52,
21+
Almonds = 0x1EBE53,
22+
Branchberries = 0x1EBE54,
23+
Rolanberries = 0x1EBE55,
24+
SunLemons = 0x1EBE56,
25+
26+
SugarPearls = 0x1EBE57,
27+
ChocolateCubes = 0x1EBE58,
28+
ChocolateFlowers = 0x1EBE59,
29+
ChocolateHearts = 0x1EBE5A,
30+
LemonMacarons = 0x1EBE5B,
31+
32+
MoogleCakeTopper = 0x1EBE5C,
33+
ChocolateEggCakeTopper = 0x1EBE5D,
34+
CactuarCakeTopper = 0x1EBE5E,
35+
HeartCakeTopper = 0x1EBE5F,
36+
ChocoboCakeTopper = 0x1EBE60, // 0x6A
37+
}
38+
39+
public enum AID : uint
40+
{
41+
SugarBlizzard = 44036, // 48DF->self, 3.0s cast, range 15 90-degree cone
42+
}
43+
44+
public enum SID : uint
45+
{
46+
Transporting = 404 // none->player, extra=0x15
47+
}
48+
49+
class DecorateCake(BossModule module) : BossComponent(module)
50+
{
51+
private Actor? CakeStand => WorldState.Actors.FirstOrDefault(o => o.OID == (uint)OID.CakeStand && o.IsTargetable);
52+
private readonly List<Actor> Ingredients = [];
53+
54+
public override void OnMapEffect(byte index, uint state)
55+
{
56+
switch (state)
57+
{
58+
case 0x00020001: // ingredients deactivated
59+
if (MapEffectIndexToOID(index) is { } remove)
60+
Ingredients.RemoveAll(i => i.OID == (uint)remove);
61+
break;
62+
case 0x00080004: // ingredients activated
63+
if (MapEffectIndexToOID(index) is { } add && WorldState.Actors.FirstOrDefault(o => o.OID == (uint)add) is { } actor)
64+
Ingredients.Add(actor);
65+
break;
66+
}
67+
}
68+
69+
public override void AddAIHints(int slot, Actor actor, PartyRolesConfig.Assignment assignment, AIHints hints)
70+
{
71+
if (actor.FindStatus(SID.Transporting) == null)
72+
hints.InteractWithTarget = Ingredients.MinBy(actor.DistanceToHitbox);
73+
else
74+
hints.InteractWithTarget = CakeStand;
75+
}
76+
77+
private OID? MapEffectIndexToOID(byte index) => index switch
78+
{
79+
var ingredient when ingredient is >= 0x56 and <= 0x6A => (OID)((uint)OID.WhippedCreamFrosting + (index - 0x57)),
80+
_ => null
81+
};
82+
}
83+
84+
class SugarBlizzard(BossModule module) : Components.StandardAOEs(module, AID.SugarBlizzard, new AOEShapeCone(15, 45.Degrees()));
85+
86+
// someone can finish/fix this if they want. I really do not care enough for a seasonal quest
87+
class BakeOffAI(BossModule module) : RotationModule<AutoBakeOff>(module);
88+
public class AutoBakeOff(WorldState ws) : UnmanagedRotation(ws, 5)
89+
{
90+
protected override void Exec(Actor? primaryTarget)
91+
{
92+
if (primaryTarget == null)
93+
return;
94+
if (Player.FindStatus(SID.Transporting) != null)
95+
return;
96+
if (!Player.InCombat)
97+
return;
98+
// iterate Hints.PriorityTargets and compare against Hints.NumPriorityTargetsInAOECone. Only execute when they're the same.
99+
// If they're not the same, set a goal zone for an area that will hit all of them, then call useaction with the correct facing angle
100+
UseAction(Roleplay.AID.BakeOff, primaryTarget);
101+
}
102+
}
103+
104+
class TheIcingOnTheCakeStates : StateMachineBuilder
105+
{
106+
public TheIcingOnTheCakeStates(BossModule module) : base(module)
107+
{
108+
TrivialPhase()
109+
.ActivateOnEnter<DecorateCake>()
110+
.ActivateOnEnter<SugarBlizzard>();
111+
}
112+
}
113+
114+
[ModuleInfo(BossModuleInfo.Maturity.Contributed, Contributors = "croizat", GroupType = BossModuleInfo.GroupType.CFC, GroupID = 1045, NameID = 14234)]
115+
public class TheIcingOnTheCake(WorldState ws, Actor primary) : BossModule(ws, primary, new(0, 0), new ArenaBoundsCircle(45))
116+
{
117+
protected override bool CheckPull() => !PrimaryActor.IsDead;
118+
}
4.12 KB
Binary file not shown.

BossMod/Pathfinding/ObstacleMaps/maplist.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5077,5 +5077,20 @@
50775077
"ViewHeight": 60,
50785078
"Filename": "1314.1064.1.bmp"
50795079
}
5080+
],
5081+
"1298.1045": [
5082+
{
5083+
"MinBoundsX": -43.5,
5084+
"MinBoundsY": -1,
5085+
"MinBoundsZ": -43.5,
5086+
"MaxBoundsX": 43.5,
5087+
"MaxBoundsY": 10.5,
5088+
"MaxBoundsZ": 43,
5089+
"OriginX": -43.5,
5090+
"OriginZ": -43.5,
5091+
"ViewWidth": 60,
5092+
"ViewHeight": 60,
5093+
"Filename": "1298.1045.1.bmp"
5094+
}
50805095
]
50815096
}

0 commit comments

Comments
 (0)