Skip to content

Commit

Permalink
triggers build: build: Bump version to 0.33.2 (OverlayPlugin#534) 9f1…
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Dec 7, 2024
1 parent 3fd2883 commit b8ed597
Showing 1 changed file with 170 additions and 0 deletions.
170 changes: 170 additions & 0 deletions 07-dt/ultimate/futures_rewritten.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
const centerX = 100;
const centerY = 100;
const isCardinalDir = (dir) => {
return Directions.outputCardinalDir.includes(dir);
};
// Ordering here matters - the "G1" directions are first, followed by "G2" directions.
// Maybe add a config for this? But for now, assume that N->CCW is G1 and NE->CW is G2.
const p2KnockbackDirs = [
'dirN',
'dirNW',
'dirW',
'dirSW',
'dirS',
'dirSE',
'dirE',
'dirNE',
];
Options.Triggers.push({
id: 'FuturesRewrittenUltimate',
zoneId: ZoneId.FuturesRewrittenUltimate,
Expand All @@ -7,6 +24,10 @@ Options.Triggers.push({
actorSetPosTracker: {},
p1ConcealSafeDirs: [...Directions.output8Dir],
p1FallOfFaithTethers: [],
p2QuadrupleFirstTarget: '',
p2QuadrupleDebuffApplied: false,
p2IcicleImpactStart: 'unknown',
p2FrigidStoneTargets: [],
};
},
timelineTriggers: [],
Expand Down Expand Up @@ -274,6 +295,149 @@ Options.Triggers.push({
},
},
// P2 -- Usurper Of Frost
{
id: 'FRU P2 Quadruple Slap First',
type: 'StartsUsing',
netRegex: { id: '9CFF', source: 'Usurper of Frost' },
response: Responses.tankBuster(),
run: (data, matches) => data.p2QuadrupleFirstTarget = matches.target,
},
{
// Cleansable debuff may be applied with first cast (9CFF)
// although there are ways to avoid appplication (e.g. Warden's Paean)
id: 'FRU P2 Quadruple Slap Debuff Gain',
type: 'GainsEffect',
netRegex: { effectId: '1042', source: 'Usurper of Frost', capture: false },
run: (data) => data.p2QuadrupleDebuffApplied = true,
},
{
id: 'FRU P2 Quadruple Slap Debuff Loss',
type: 'LosesEffect',
netRegex: { effectId: '1042', source: 'Usurper of Frost', capture: false },
run: (data) => data.p2QuadrupleDebuffApplied = false,
},
{
id: 'FRU P2 Quadruple Slap Second',
type: 'StartsUsing',
// short (2.2s) cast time
netRegex: { id: '9D00', source: 'Usurper of Frost' },
response: (data, matches, output) => {
// cactbot-builtin-response
output.responseOutputStrings = {
onYou: Outputs.tankBusterOnYou,
onTarget: Outputs.tankBusterOnPlayer,
busterCleanse: {
en: '${buster} (Cleanse?)',
},
};
const onTarget = output.onTarget({ player: data.party.member(matches.target) });
let busterStr;
if (data.me === matches.target)
busterStr = output.onYou();
else if (
data.p2QuadrupleFirstTarget === matches.target &&
data.p2QuadrupleDebuffApplied &&
data.CanCleanse()
) {
busterStr = output.busterCleanse({ buster: onTarget });
} else
busterStr = onTarget;
if (data.me === matches.target || data.role === 'healer')
return { alertText: busterStr };
return { infoText: busterStr };
},
},
{
id: 'FRU P2 Diamond Dust',
type: 'StartsUsing',
netRegex: { id: '9D05', source: 'Usurper of Frost', capture: false },
response: Responses.bigAoe(),
},
{
id: 'FRU P2 Axe/Scythe Kick Collect',
type: 'StartsUsing',
// 9D0A - Axe Kick (be out), 9D0B - Scythe Kick (be in)
netRegex: { id: ['9D0A', '9D0B'], source: 'Oracle\'s Reflection' },
// there are 2 actors 180 degrees apart, but we only need to collect one
run: (data, matches) => data.p2AxeScytheSafe = matches.id === '9D0A' ? 'out' : 'in',
},
{
id: 'FRU P2 Icicle Impact Initial Collect',
type: 'StartsUsing',
netRegex: { id: '9D06' },
// there are 2 actors 180 degrees apart, but we only need to collect one
condition: (data) => data.p2IcicleImpactStart === 'unknown',
suppressSeconds: 1,
run: (data, matches) => {
const x = parseInt(matches.x);
const y = parseInt(matches.y);
const dir = Directions.xyTo8DirOutput(x, y, centerX, centerY);
data.p2IcicleImpactStart = dir;
},
},
{
id: 'FRU P2 House of Light/Frigid Stone',
type: 'HeadMarker',
netRegex: { id: '0159' },
alertText: (data, matches, output) => {
data.p2FrigidStoneTargets.push(matches.target);
if (data.p2FrigidStoneTargets.length !== 4)
return;
const inOut = data.p2AxeScytheSafe ? output[data.p2AxeScytheSafe]() : output.unknown();
// Assumes that if first Icicle Impacts spawn on cardinals, House of Light baits will also be
// cardinals and Frigid Stone puddle drops will be intercards, and vice versa.
if (data.p2FrigidStoneTargets.includes(data.me)) {
const dir = data.p2IcicleImpactStart === 'unknown'
? output.unknown()
: (isCardinalDir(data.p2IcicleImpactStart)
? output.intercards()
: output.cardinals());
return output.dropPuddle({ inOut: inOut, dir: dir });
}
const dir = data.p2IcicleImpactStart === 'unknown'
? output.unknown()
: (isCardinalDir(data.p2IcicleImpactStart) ? output.cardinals() : output.intercards());
return output.baitCleave({ inOut: inOut, dir: dir });
},
outputStrings: {
dropPuddle: {
en: '${inOut} + Far => Drop Puddle (${dir})',
},
baitCleave: {
en: '${inOut} + Close Bait (${dir})',
},
in: Outputs.in,
out: Outputs.out,
cardinals: Outputs.cardinals,
intercards: Outputs.intercards,
unknown: Outputs.unknown,
},
},
{
id: 'FRU P2 Heavenly Strike',
type: 'Ability',
// use the 'star' (Frigid Stone) drops to fire this alert, as Heavenly Strike has no cast time.
netRegex: { id: '9D07', capture: false },
suppressSeconds: 1,
alertText: (data, _matches, output) => {
const startDir = data.p2IcicleImpactStart;
const startIdx = p2KnockbackDirs.indexOf(startDir);
if (startIdx === -1)
return output.kb();
// give safe directional outputs in the same order they appear in p2KnockbackDirs
const dir1 = startIdx < 4 ? startDir : p2KnockbackDirs[startIdx - 4] ?? 'unknown';
const dir2 = startIdx >= 4 ? startDir : p2KnockbackDirs[startIdx + 4] ?? 'unknown';
return output.kbDir({ kb: output.kb(), dir1: output[dir1](), dir2: output[dir2]() });
},
outputStrings: {
kbDir: {
en: '${kb} (${dir1}/${dir2})',
},
kb: Outputs.knockback,
...Directions.outputStrings8Dir,
unknown: Outputs.unknown,
},
},
// Crystals
// P3 -- Oracle Of Darkness
// P4 -- Duo
Expand All @@ -292,6 +456,8 @@ Options.Triggers.push({
'replaceSync': {
'Fatebreaker(?!\')': 'fusioniert(?:e|er|es|en) Ascian',
'Fatebreaker\'s Image': 'Abbild des fusionierten Ascians',
'Usurper of Frost': 'Shiva-Mitron',
'Oracle\'s Reflection': 'Spiegelbild des Orakels',
},
'replaceText': {
'Blastburn': 'Brandstoß',
Expand Down Expand Up @@ -320,6 +486,8 @@ Options.Triggers.push({
'replaceSync': {
'Fatebreaker(?!\')': 'Sabreur de destins',
'Fatebreaker\'s Image': 'double du Sabreur de destins',
'Usurper of Frost': 'Shiva-Mitron',
'Oracle\'s Reflection': 'reflet de la prêtresse',
},
'replaceText': {
'Blastburn': 'Explosion brûlante',
Expand Down Expand Up @@ -348,6 +516,8 @@ Options.Triggers.push({
'replaceSync': {
'Fatebreaker(?!\')': 'フェイトブレイカー',
'Fatebreaker\'s Image': 'フェイトブレイカーの幻影',
'Usurper of Frost': 'シヴァ・ミトロン',
'Oracle\'s Reflection': '巫女の鏡像',
},
'replaceText': {
'Blastburn': 'バーンブラスト',
Expand Down

0 comments on commit b8ed597

Please sign in to comment.