Skip to content

Commit

Permalink
triggers build: raidboss: convert NetRegexes.echo/message/dialog to p…
Browse files Browse the repository at this point in the history
…arams (#5451)

Part of #4986.

Closes #5452. 5f38b03
  • Loading branch information
github-actions committed Jun 25, 2023
1 parent 06f7b08 commit c081565
Show file tree
Hide file tree
Showing 12 changed files with 140 additions and 72 deletions.
14 changes: 9 additions & 5 deletions 00-misc/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ Options.Triggers.push({
id: 'Test Lang',
type: 'GameLog',
// In game: /echo cactbot lang
netRegex: NetRegexes.echo({ line: 'cactbot lang.*?', capture: false }),
netRegex: { line: 'cactbot lang.*?', code: Util.gameLogCodes.echo, capture: false },
infoText: (data, _matches, output) => output.text({ lang: data.parserLang }),
outputStrings: {
text: {
Expand All @@ -234,7 +234,7 @@ Options.Triggers.push({
{
id: 'Test Response',
type: 'GameLog',
netRegex: NetRegexes.echo({ line: 'cactbot test response.*?', capture: false }),
netRegex: { line: 'cactbot test response.*?', code: Util.gameLogCodes.echo, capture: false },
response: (_data, _matches, output) => {
// cactbot-builtin-response
output.responseOutputStrings = {
Expand All @@ -254,7 +254,7 @@ Options.Triggers.push({
{
id: 'Test Watch',
type: 'GameLog',
netRegex: NetRegexes.echo({ line: 'cactbot test watch.*?', capture: false }),
netRegex: { line: 'cactbot test watch.*?', code: Util.gameLogCodes.echo, capture: false },
promise: (data) =>
Util.watchCombatant({
names: [
Expand Down Expand Up @@ -296,7 +296,7 @@ Options.Triggers.push({
{
id: 'Test Config',
type: 'GameLog',
netRegex: NetRegexes.echo({ line: 'cactbot test config.*?', capture: false }),
netRegex: { line: 'cactbot test config.*?', code: Util.gameLogCodes.echo, capture: false },
alertText: (data, _matches, output) => {
return output.text({ value: data.triggerSetConfig.testTriggerOutput.toString() });
},
Expand All @@ -312,7 +312,11 @@ Options.Triggers.push({
{
id: 'Test Combatant Cast Enable',
type: 'GameLog',
netRegex: NetRegexes.echo({ line: 'cactbot test combatant cast.*?', capture: false }),
netRegex: {
line: 'cactbot test combatant cast.*?',
code: Util.gameLogCodes.echo,
capture: false,
},
run: (data) => {
data.watchingForCast = true;
},
Expand Down
5 changes: 3 additions & 2 deletions 02-arr/dungeon/haukke_manor.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ Options.Triggers.push({
// Void Lamp Spawn
id: 'Haukke Normal Void Lamps',
type: 'GameLog',
netRegex: NetRegexes.message({
netRegex: {
line: 'The void lamps have begun emitting an eerie glow',
code: Util.gameLogCodes.message,
capture: false,
}),
},
infoText: (_data, _matches, output) => output.text(),
outputStrings: {
text: {
Expand Down
5 changes: 3 additions & 2 deletions 02-arr/raid/t1.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,11 @@ Options.Triggers.push({
{
id: 'T1 Slime Timer First',
type: 'GameLog',
netRegex: NetRegexes.message({
netRegex: {
line: 'The Allagan megastructure will be sealed off.*?',
code: Util.gameLogCodes.message,
capture: false,
}),
},
delaySeconds: 35,
suppressSeconds: 5,
infoText: (_data, _matches, output) => output.text(),
Expand Down
6 changes: 5 additions & 1 deletion 02-arr/raid/t8.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ Options.Triggers.push({
{
id: 'T8 Landmine Start',
type: 'GameLog',
netRegex: NetRegexes.message({ line: 'Landmines have been scattered.*?', capture: false }),
netRegex: {
line: 'Landmines have been scattered.*?',
code: Util.gameLogCodes.message,
capture: false,
},
alertText: (_data, _matches, output) => output.text(),
run: (data) => data.landmines = {},
outputStrings: {
Expand Down
6 changes: 5 additions & 1 deletion 03-hw/alliance/dun_scaith.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,11 @@ Options.Triggers.push({
// However, the RP text seems to be the only indicator.
id: 'Dun Scaith Shadow Links',
type: 'GameLog',
netRegex: NetRegexes.message({ line: 'Shadows gather on the floor.*?', capture: false }),
netRegex: {
line: 'Shadows gather on the floor.*?',
code: Util.gameLogCodes.message,
capture: false,
},
suppressSeconds: 5,
response: Responses.stopMoving(),
},
Expand Down
16 changes: 11 additions & 5 deletions 03-hw/alliance/weeping_city.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,21 @@ Options.Triggers.push({
// only when that boss is in progress.
id: 'Weeping City HeadMarker Arachne',
type: 'GameLog',
netRegex: NetRegexes.message({
netRegex: {
line: 'The Queen\'s Room will be sealed off.*?',
code: Util.gameLogCodes.message,
capture: false,
}),
},
run: (data) => data.arachneStarted = true,
},
{
id: 'Weeping City HeadMarker Ozma',
type: 'GameLog',
netRegex: NetRegexes.message({ line: 'The Gloriole will be sealed off.*?', capture: false }),
netRegex: {
line: 'The Gloriole will be sealed off.*?',
code: Util.gameLogCodes.message,
capture: false,
},
run: (data) => {
data.arachneStarted = false;
data.ozmaStarted = true;
Expand All @@ -89,10 +94,11 @@ Options.Triggers.push({
{
id: 'Weeping City HeadMarker Calofisteri',
type: 'GameLog',
netRegex: NetRegexes.message({
netRegex: {
line: 'The Tomb Of The Nullstone will be sealed off.*?',
code: Util.gameLogCodes.message,
capture: false,
}),
},
run: (data) => {
data.ozmaStarted = false;
data.calStarted = true;
Expand Down
24 changes: 20 additions & 4 deletions 04-sb/eureka/eureka_hydatos.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,21 @@ Options.Triggers.push({
{
id: 'BA Seal',
type: 'GameLog',
netRegex: NetRegexes.message({ line: '.* will be sealed off.*?', capture: false }),
netRegex: {
line: '.* will be sealed off.*?',
code: Util.gameLogCodes.message,
capture: false,
},
run: (data) => data.sealed = true,
},
{
id: 'BA Clear Data',
type: 'GameLog',
netRegex: NetRegexes.message({ line: '.*is no longer sealed.*?', capture: false }),
netRegex: {
line: '.*is no longer sealed.*?',
code: Util.gameLogCodes.message,
capture: false,
},
run: (data) => {
delete data.side;
delete data.mythcall;
Expand Down Expand Up @@ -234,7 +242,11 @@ Options.Triggers.push({
{
id: 'BA Owain Fire Element',
type: 'GameLog',
netRegex: NetRegexes.dialog({ line: '[^:]*:Munderg, turn flesh to ash.*?', capture: false }),
netRegex: {
line: '[^:]*:Munderg, turn flesh to ash.*?',
code: Util.gameLogCodes.dialog,
capture: false,
},
condition: (data) => data.side === 'east',
alertText: (_data, _matches, output) => output.getToIce(),
infoText: (_data, _matches, output) => output.switchMagia(),
Expand All @@ -260,7 +272,11 @@ Options.Triggers.push({
{
id: 'BA Owain Ice Element',
type: 'GameLog',
netRegex: NetRegexes.dialog({ line: '[^:]*:Munderg, turn blood to ice.*?', capture: false }),
netRegex: {
line: '[^:]*:Munderg, turn blood to ice.*?',
code: Util.gameLogCodes.dialog,
capture: false,
},
condition: (data) => data.side === 'east',
alertText: (_data, _matches, output) => output.getToFire(),
infoText: (_data, _matches, output) => output.switchMagia(),
Expand Down
5 changes: 3 additions & 2 deletions 04-sb/trial/byakko-ex.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,11 @@ Options.Triggers.push({
{
id: 'ByaEx Tiger Add',
type: 'GameLog',
netRegex: NetRegexes.dialog({
netRegex: {
line: '[^:]*:Twofold is my wrath, twice-cursed my foes!.*?',
code: Util.gameLogCodes.dialog,
capture: false,
}),
},
condition: (data) => data.role === 'tank',
infoText: (_data, _matches, output) => output.text(),
outputStrings: {
Expand Down
5 changes: 3 additions & 2 deletions 04-sb/trial/tsukuyomi-ex.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,11 @@ Options.Triggers.push({
// There's no "starts using" here. She pushes at 35% to this ability.
// This happens after 2nd meteors naturally, but if dps is good
// then this could push unexpectedly earlier (or paired with buster).
netRegex: NetRegexes.dialog({
netRegex: {
line: '[^:]*:No\. No\.\.\. Not yet\. Not\. Yet\..*?',
code: Util.gameLogCodes.dialog,
capture: false,
}),
},
response: Responses.aoe(),
},
{
Expand Down
Loading

0 comments on commit c081565

Please sign in to comment.