Skip to content

Commit

Permalink
triggers build: raidboss: small p12s pangenesis adjustments (#5604) 4…
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jun 23, 2023
1 parent 34bff67 commit b448e8f
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions 06-ew/raid/p12s.js
Original file line number Diff line number Diff line change
Expand Up @@ -1443,8 +1443,10 @@ Options.Triggers.push({
delaySeconds: 0.5,
durationSeconds: (data) => {
// There's ~13 seconds until the first tower and ~18 until the second tower.
// Some strats have 'not' take the first tower or the second tower,
// so to avoid noisy alerts only extend duration for the long tilts.
const myRole = data.pangenesisRole[data.me];
return myRole === 'not' || myRole === 'longDark' || myRole === 'longLight' ? 17 : 12;
return myRole === 'longDark' || myRole === 'longLight' ? 17 : 12;
},
suppressSeconds: 999999,
alertText: (data, _matches, output) => {
Expand Down Expand Up @@ -1562,6 +1564,12 @@ Options.Triggers.push({
darkTower: {
en: 'Dark Tower',
},
lightTowerSwitch: {
en: 'Light Tower (switch)',
},
darkTowerSwitch: {
en: 'Dark Tower (switch)',
},
};
let tower;
if (data.pangenesisCurrentColor === 'light')
Expand All @@ -1572,10 +1580,12 @@ Options.Triggers.push({
tower = data.lastPangenesisTowerColor;
if (tower === undefined)
return;
// TODO: should we also say "Dark Tower (again)" or "Dark Tower (switch)" for emphasis?
const severity = tower === data.lastPangenesisTowerColor ? 'infoText' : 'alertText';
const text = tower === 'light' ? output.lightTower() : output.darkTower();
return { [severity]: text };
const isSameTower = tower === data.lastPangenesisTowerColor;
if (isSameTower)
return { infoText: tower === 'light' ? output.lightTower() : output.darkTower() };
if (tower === 'light')
return { alertText: output.lightTowerSwitch() };
return { alertText: output.darkTowerSwitch() };
},
},
],
Expand Down

0 comments on commit b448e8f

Please sign in to comment.