Skip to content

Commit

Permalink
triggers build: raidboss: TOP P5 Sigma Staff/Feet Call (#5318) 9ce4875
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Apr 3, 2023
1 parent eb6254a commit 3016485
Showing 1 changed file with 0 additions and 64 deletions.
64 changes: 0 additions & 64 deletions 06-ew/ultimate/the_omega_protocol.js
Original file line number Diff line number Diff line change
Expand Up @@ -1213,70 +1213,6 @@ Options.Triggers.push({
return { infoText: output.unmarkedBlue() };
},
},
{
id: 'TOP Sigma Omega-M Location',
// Same NPC that casts Sigma Version teleports to card/intercard
type: 'Ability',
netRegex: { id: '8014', source: 'Omega-M' },
delaySeconds: 5.4,
durationSeconds: 26,
suppressSeconds: 1,
promise: async (data, matches) => {
data.combatantData = [];
data.combatantData = (await callOverlayHandler({
call: 'getCombatants',
ids: [parseInt(matches.sourceId, 16)],
})).combatants;
},
alertText: (data, _matches, output) => {
const m = data.combatantData.pop();
if (m === undefined) {
console.error(`Sigma Omega-M Location: missing m: ${JSON.stringify(data.combatantData)}`);
return;
}
// Calculate combatant position in an all 8 cards/intercards
const matchedPositionTo8Dir = (combatant) => {
// Positions are moved up 100 and right 100
const y = combatant.PosY - 100;
const x = combatant.PosX - 100;
// During Sigma, Omega-M teleports to one of the 8 cardinals + numerical
// slop on a radius=20 circle.
// N = (100, 80), E = (120, 100), S = (100, 120), W = (80, 100)
// NE = (114.14, 85.86), SE = (114.14, 114.14), SW = (85.86, 114.14), NW = (85.86, 85.86)
//
// Map NW = 0, N = 1, ..., W = 7
return Math.round(5 - 4 * Math.atan2(x, y) / Math.PI) % 8;
};
const dir = matchedPositionTo8Dir(m);
const dirs = {
0: output.northwest(),
1: output.north(),
2: output.northeast(),
3: output.east(),
4: output.southeast(),
5: output.south(),
6: output.southwest(),
7: output.west(),
};
return output.mLocation({
dir: dirs[dir] ?? output.unknown(),
});
},
outputStrings: {
north: Outputs.north,
northeast: Outputs.northeast,
east: Outputs.east,
southeast: Outputs.southeast,
south: Outputs.south,
southwest: Outputs.southwest,
west: Outputs.west,
northwest: Outputs.northwest,
unknown: Outputs.unknown,
mLocation: {
en: '${dir} M',
},
},
},
{
id: 'TOP P5 Sigma Debuffs',
type: 'Ability',
Expand Down

0 comments on commit 3016485

Please sign in to comment.