Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,47 @@
namespace BossMod.QuestBattle.ARealmReborn.ClassJobQuests.MNK;
namespace BossMod.QuestBattle.ARealmReborn.ClassJobQuests.MNK;

[ZoneModuleInfo(BossModuleInfo.Maturity.Contributed, 323)]
[ZoneModuleInfo(BossModuleInfo.Maturity.Contributed, 322, 261)]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is correct. 322 and 323 both map to quest battles that are called "Return of the Holyfist". I don't know why there are two of them.

internal class ReturnOfTheHolyfist(WorldState ws) : QuestBattle(ws)
{
public override void AddQuestAIHints(Actor player, AIHints hints) => hints.PrioritizeAll();
}
private int _snapPunchCount;
private int _comboStep; // 0=Bootshine, 1=TrueStrike, 2=SnapPunch

public override List<QuestObjective> DefineObjectives(WorldState ws) => [
new QuestObjective(ws)
.With(obj => {
obj.OnEventCast += (act, spell) => {
if (act.OID != 0) return;
var id = spell.Action;
if (_comboStep == 0 && id == ActionID.MakeSpell(BossMod.MNK.AID.Bootshine))
_comboStep = 1;
else if (_comboStep == 1 && id == ActionID.MakeSpell(BossMod.MNK.AID.TrueStrike))
_comboStep = 2;
else if (_comboStep == 2 && id == ActionID.MakeSpell(BossMod.MNK.AID.SnapPunch))
{
_snapPunchCount++;
_comboStep = 0;
}
};
// no completion condition — objective stays active so Hints and OnEventCast keep firing
})
.Hints((player, hints) => {
if (_snapPunchCount >= 3) return;
var target = hints.PotentialTargets.FirstOrDefault()?.Actor;
if (target == null) return;
hints.ForcedTarget = target;
var next = _comboStep switch {
0 => BossMod.MNK.AID.Bootshine,
1 => BossMod.MNK.AID.TrueStrike,
_ => BossMod.MNK.AID.SnapPunch,
};
hints.ActionsToExecute.Push(ActionID.MakeSpell(next), target, ActionQueue.Priority.VeryHigh);
})
];

public override void AddQuestAIHints(Actor player, AIHints hints)
{
// ForcePriority bypasses the PriorityPointless setter guard so the mob appears in PotentialTargets
foreach (var e in hints.PotentialTargets)
e.ForcePriority(0);
}
}