diff --git a/resources/netregexes.ts b/resources/netregexes.ts index 3168ee707d..ddc903b856 100644 --- a/resources/netregexes.ts +++ b/resources/netregexes.ts @@ -35,6 +35,12 @@ const keysThatRequireTranslationAsConst = [ export const keysThatRequireTranslation: readonly string[] = keysThatRequireTranslationAsConst; export type KeysThatRequireTranslation = typeof keysThatRequireTranslationAsConst[number]; +export const gameLogCodes = { + echo: '0038', + dialog: '0044', + message: '0839', +} as const; + const defaultParams = < T extends LogDefinitionTypes, V extends LogDefinitionVersions, @@ -474,7 +480,7 @@ export default class NetRegexes { ['type', 'timestamp', 'code', 'name', 'line', 'capture'], ); - return NetRegexes.gameLog({ ...params, code: '0038' }); + return NetRegexes.gameLog({ ...params, code: gameLogCodes.echo }); } /** @@ -489,7 +495,7 @@ export default class NetRegexes { ['type', 'timestamp', 'code', 'name', 'line', 'capture'], ); - return NetRegexes.gameLog({ ...params, code: '0044' }); + return NetRegexes.gameLog({ ...params, code: gameLogCodes.dialog }); } /** @@ -504,7 +510,7 @@ export default class NetRegexes { ['type', 'timestamp', 'code', 'name', 'line', 'capture'], ); - return NetRegexes.gameLog({ ...params, code: '0839' }); + return NetRegexes.gameLog({ ...params, code: gameLogCodes.message }); } /** diff --git a/resources/util.ts b/resources/util.ts index 906f93fc0a..745b4a1a6b 100644 --- a/resources/util.ts +++ b/resources/util.ts @@ -7,6 +7,7 @@ import { Job, Role } from '../types/job'; import { NetMatches } from '../types/net_matches'; import { OutputStrings } from '../types/trigger'; +import { gameLogCodes } from './netregexes'; import Outputs from './outputs'; import { callOverlayHandler } from './overlay_plugin_api'; @@ -414,6 +415,7 @@ const Util = { watchCombatantOverride = watchFunc; clearCombatantsOverride = clearFunc; }, + gameLogCodes: gameLogCodes, } as const; export default Util; diff --git a/ui/raidboss/data/00-misc/test.ts b/ui/raidboss/data/00-misc/test.ts index a903a0c2af..cfd3f5e865 100644 --- a/ui/raidboss/data/00-misc/test.ts +++ b/ui/raidboss/data/00-misc/test.ts @@ -1,4 +1,3 @@ -import NetRegexes from '../../../../resources/netregexes'; import outputs from '../../../../resources/outputs'; import { ConfigValue } from '../../../../resources/user_config'; import Util from '../../../../resources/util'; @@ -237,7 +236,7 @@ const triggerSet: TriggerSet = { 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: { @@ -253,7 +252,7 @@ const triggerSet: TriggerSet = { { 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 = { @@ -273,7 +272,7 @@ const triggerSet: TriggerSet = { { 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: [ @@ -315,7 +314,7 @@ const triggerSet: TriggerSet = { { 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() }); }, @@ -331,7 +330,11 @@ const triggerSet: TriggerSet = { { 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; }, diff --git a/ui/raidboss/data/02-arr/dungeon/haukke_manor.ts b/ui/raidboss/data/02-arr/dungeon/haukke_manor.ts index cc52dcfe4c..5d8c5ffff1 100644 --- a/ui/raidboss/data/02-arr/dungeon/haukke_manor.ts +++ b/ui/raidboss/data/02-arr/dungeon/haukke_manor.ts @@ -1,6 +1,6 @@ import Conditions from '../../../../../resources/conditions'; -import NetRegexes from '../../../../../resources/netregexes'; import { Responses } from '../../../../../resources/responses'; +import Util from '../../../../../resources/util'; import ZoneId from '../../../../../resources/zone_id'; import { RaidbossData } from '../../../../../types/data'; import { TriggerSet } from '../../../../../types/trigger'; @@ -52,10 +52,11 @@ const triggerSet: TriggerSet = { // 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: { diff --git a/ui/raidboss/data/02-arr/raid/t1.ts b/ui/raidboss/data/02-arr/raid/t1.ts index cd8cb029a4..c8401f2c40 100644 --- a/ui/raidboss/data/02-arr/raid/t1.ts +++ b/ui/raidboss/data/02-arr/raid/t1.ts @@ -1,6 +1,6 @@ import Conditions from '../../../../../resources/conditions'; -import NetRegexes from '../../../../../resources/netregexes'; import { Responses } from '../../../../../resources/responses'; +import Util from '../../../../../resources/util'; import ZoneId from '../../../../../resources/zone_id'; import { RaidbossData } from '../../../../../types/data'; import { TriggerSet } from '../../../../../types/trigger'; @@ -89,10 +89,11 @@ const triggerSet: TriggerSet = { { 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!(), diff --git a/ui/raidboss/data/02-arr/raid/t8.ts b/ui/raidboss/data/02-arr/raid/t8.ts index fc3ad5f38e..6428685fff 100644 --- a/ui/raidboss/data/02-arr/raid/t8.ts +++ b/ui/raidboss/data/02-arr/raid/t8.ts @@ -1,5 +1,5 @@ -import NetRegexes from '../../../../../resources/netregexes'; import { Responses } from '../../../../../resources/responses'; +import Util from '../../../../../resources/util'; import ZoneId from '../../../../../resources/zone_id'; import { RaidbossData } from '../../../../../types/data'; import { TriggerSet } from '../../../../../types/trigger'; @@ -27,7 +27,11 @@ const triggerSet: TriggerSet = { { 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: { diff --git a/ui/raidboss/data/03-hw/alliance/dun_scaith.ts b/ui/raidboss/data/03-hw/alliance/dun_scaith.ts index d44f4980df..d75edafc21 100644 --- a/ui/raidboss/data/03-hw/alliance/dun_scaith.ts +++ b/ui/raidboss/data/03-hw/alliance/dun_scaith.ts @@ -1,6 +1,6 @@ import Conditions from '../../../../../resources/conditions'; -import NetRegexes from '../../../../../resources/netregexes'; import { Responses } from '../../../../../resources/responses'; +import Util from '../../../../../resources/util'; import ZoneId from '../../../../../resources/zone_id'; import { RaidbossData } from '../../../../../types/data'; import { TriggerSet } from '../../../../../types/trigger'; @@ -456,7 +456,11 @@ const triggerSet: TriggerSet = { // 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(), }, diff --git a/ui/raidboss/data/03-hw/alliance/weeping_city.ts b/ui/raidboss/data/03-hw/alliance/weeping_city.ts index 4eb161ffe0..e00d881200 100644 --- a/ui/raidboss/data/03-hw/alliance/weeping_city.ts +++ b/ui/raidboss/data/03-hw/alliance/weeping_city.ts @@ -1,6 +1,6 @@ import Conditions from '../../../../../resources/conditions'; -import NetRegexes from '../../../../../resources/netregexes'; import { Responses } from '../../../../../resources/responses'; +import Util from '../../../../../resources/util'; import ZoneId from '../../../../../resources/zone_id'; import { RaidbossData } from '../../../../../types/data'; import { TriggerSet } from '../../../../../types/trigger'; @@ -84,16 +84,21 @@ const triggerSet: TriggerSet = { // 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; @@ -102,10 +107,11 @@ const triggerSet: TriggerSet = { { 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; diff --git a/ui/raidboss/data/04-sb/eureka/eureka_hydatos.ts b/ui/raidboss/data/04-sb/eureka/eureka_hydatos.ts index 8a416e33bb..f5cba04907 100644 --- a/ui/raidboss/data/04-sb/eureka/eureka_hydatos.ts +++ b/ui/raidboss/data/04-sb/eureka/eureka_hydatos.ts @@ -1,5 +1,5 @@ -import NetRegexes from '../../../../../resources/netregexes'; import { Responses } from '../../../../../resources/responses'; +import Util from '../../../../../resources/util'; import ZoneId from '../../../../../resources/zone_id'; import { RaidbossData } from '../../../../../types/data'; import { TriggerSet } from '../../../../../types/trigger'; @@ -92,13 +92,21 @@ const triggerSet: TriggerSet = { { 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; @@ -250,7 +258,11 @@ const triggerSet: TriggerSet = { { 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!(), @@ -276,7 +288,11 @@ const triggerSet: TriggerSet = { { 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!(), diff --git a/ui/raidboss/data/04-sb/trial/byakko-ex.ts b/ui/raidboss/data/04-sb/trial/byakko-ex.ts index cd40971de2..9d20ec03ec 100644 --- a/ui/raidboss/data/04-sb/trial/byakko-ex.ts +++ b/ui/raidboss/data/04-sb/trial/byakko-ex.ts @@ -1,6 +1,6 @@ import Conditions from '../../../../../resources/conditions'; -import NetRegexes from '../../../../../resources/netregexes'; import { Responses } from '../../../../../resources/responses'; +import Util from '../../../../../resources/util'; import ZoneId from '../../../../../resources/zone_id'; import { RaidbossData } from '../../../../../types/data'; import { TriggerSet } from '../../../../../types/trigger'; @@ -193,10 +193,11 @@ const triggerSet: TriggerSet = { { 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: { diff --git a/ui/raidboss/data/04-sb/trial/tsukuyomi-ex.ts b/ui/raidboss/data/04-sb/trial/tsukuyomi-ex.ts index a21d13d495..8df979a82c 100644 --- a/ui/raidboss/data/04-sb/trial/tsukuyomi-ex.ts +++ b/ui/raidboss/data/04-sb/trial/tsukuyomi-ex.ts @@ -1,7 +1,7 @@ import Conditions from '../../../../../resources/conditions'; -import NetRegexes from '../../../../../resources/netregexes'; import Outputs from '../../../../../resources/outputs'; import { Responses } from '../../../../../resources/responses'; +import Util from '../../../../../resources/util'; import ZoneId from '../../../../../resources/zone_id'; import { RaidbossData } from '../../../../../types/data'; import { TriggerSet } from '../../../../../types/trigger'; @@ -161,10 +161,11 @@ const triggerSet: TriggerSet = { // 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(), }, { diff --git a/ui/raidboss/data/04-sb/ultimate/unending_coil_ultimate.ts b/ui/raidboss/data/04-sb/ultimate/unending_coil_ultimate.ts index 820949f628..1b7f0647f8 100644 --- a/ui/raidboss/data/04-sb/ultimate/unending_coil_ultimate.ts +++ b/ui/raidboss/data/04-sb/ultimate/unending_coil_ultimate.ts @@ -1,5 +1,4 @@ import Conditions from '../../../../../resources/conditions'; -import NetRegexes from '../../../../../resources/netregexes'; import Outputs from '../../../../../resources/outputs'; import { callOverlayHandler } from '../../../../../resources/overlay_plugin_api'; import { Responses } from '../../../../../resources/responses'; @@ -461,10 +460,11 @@ const triggerSet: TriggerSet = { // https://xivapi.com/NpcYell/6497?pretty=true id: 'UCU Nael Quote 1', type: 'GameLog', - netRegex: NetRegexes.dialog({ + netRegex: { line: 'From on high I descend, the hallowed moon to call.*?', + code: Util.gameLogCodes.dialog, capture: false, - }), + }, durationSeconds: 6, infoText: (_data, _matches, output) => output.text!(), outputStrings: { @@ -482,10 +482,11 @@ const triggerSet: TriggerSet = { // https://xivapi.com/NpcYell/6496?pretty=true id: 'UCU Nael Quote 2', type: 'GameLog', - netRegex: NetRegexes.dialog({ + netRegex: { line: 'From on high I descend, the iron path to walk.*?', + code: Util.gameLogCodes.dialog, capture: false, - }), + }, durationSeconds: 6, infoText: (_data, _matches, output) => output.text!(), outputStrings: { @@ -503,7 +504,11 @@ const triggerSet: TriggerSet = { // https://xivapi.com/NpcYell/6495?pretty=true id: 'UCU Nael Quote 3', type: 'GameLog', - netRegex: NetRegexes.dialog({ line: 'Take fire, O hallowed moon.*?', capture: false }), + netRegex: { + line: 'Take fire, O hallowed moon.*?', + code: Util.gameLogCodes.dialog, + capture: false, + }, durationSeconds: 6, infoText: (_data, _matches, output) => output.text!(), outputStrings: { @@ -521,10 +526,11 @@ const triggerSet: TriggerSet = { // https://xivapi.com/NpcYell/6494?pretty=true id: 'UCU Nael Quote 4', type: 'GameLog', - netRegex: NetRegexes.dialog({ + netRegex: { line: 'Blazing path, lead me to iron rule.*?', + code: Util.gameLogCodes.dialog, capture: false, - }), + }, infoText: (_data, _matches, output) => output.text!(), outputStrings: { text: { @@ -541,10 +547,11 @@ const triggerSet: TriggerSet = { // https://xivapi.com/NpcYell/6493?pretty=true id: 'UCU Nael Quote 5', type: 'GameLog', - netRegex: NetRegexes.dialog({ + netRegex: { line: 'O hallowed moon, take fire and scorch my foes.*?', + code: Util.gameLogCodes.dialog, capture: false, - }), + }, infoText: (_data, _matches, output) => output.text!(), outputStrings: { text: { @@ -561,10 +568,11 @@ const triggerSet: TriggerSet = { // https://xivapi.com/NpcYell/6492?pretty=true id: 'UCU Nael Quote 6', type: 'GameLog', - netRegex: NetRegexes.dialog({ + netRegex: { line: 'O hallowed moon, shine you the iron path.*?', + code: Util.gameLogCodes.dialog, capture: false, - }), + }, infoText: (_data, _matches, output) => output.text!(), outputStrings: { text: { @@ -581,10 +589,11 @@ const triggerSet: TriggerSet = { // https://xivapi.com/NpcYell/6501?pretty=true id: 'UCU Nael Quote 7', type: 'GameLog', - netRegex: NetRegexes.dialog({ + netRegex: { line: 'Fleeting light! \'Neath the red moon, scorch you the earth.*?', + code: Util.gameLogCodes.dialog, capture: false, - }), + }, delaySeconds: 4, durationSeconds: 6, // Make this alert so it doesn't overlap with the dive infoText occuring here. @@ -604,10 +613,11 @@ const triggerSet: TriggerSet = { // https://xivapi.com/NpcYell/6500?pretty=true id: 'UCU Nael Quote 8', type: 'GameLog', - netRegex: NetRegexes.dialog({ + netRegex: { line: 'Fleeting light! Amid a rain of stars, exalt you the red moon.*?', + code: Util.gameLogCodes.dialog, capture: false, - }), + }, delaySeconds: 4, durationSeconds: 6, // Make this alert so it doesn't overlap with the dive infoText occuring here. @@ -627,10 +637,11 @@ const triggerSet: TriggerSet = { // https://xivapi.com/NpcYell/6502?pretty=true id: 'UCU Nael Quote 9', type: 'GameLog', - netRegex: NetRegexes.dialog({ + netRegex: { line: 'From on high I descend, the moon and stars to bring.*?', + code: Util.gameLogCodes.dialog, capture: false, - }), + }, durationSeconds: 9, infoText: (_data, _matches, output) => output.text!(), outputStrings: { @@ -648,10 +659,11 @@ const triggerSet: TriggerSet = { // https://xivapi.com/NpcYell/6503?pretty=true id: 'UCU Nael Quote 10', type: 'GameLog', - netRegex: NetRegexes.dialog({ + netRegex: { line: 'From hallowed moon I descend, a rain of stars to bring.*?', + code: Util.gameLogCodes.dialog, capture: false, - }), + }, durationSeconds: 9, infoText: (_data, _matches, output) => output.text!(), outputStrings: { @@ -669,10 +681,11 @@ const triggerSet: TriggerSet = { // https://xivapi.com/NpcYell/6507?pretty=true id: 'UCU Nael Quote 11', type: 'GameLog', - netRegex: NetRegexes.dialog({ + netRegex: { line: 'From hallowed moon I bare iron, in my descent to wield.*?', + code: Util.gameLogCodes.dialog, capture: false, - }), + }, durationSeconds: 9, infoText: (_data, _matches, output) => output.text!(), outputStrings: { @@ -690,10 +703,10 @@ const triggerSet: TriggerSet = { // https://xivapi.com/NpcYell/6506?pretty=true id: 'UCU Nael Quote 12', type: 'GameLog', - netRegex: NetRegexes.dialog({ + netRegex: { line: 'From hallowed moon I descend, upon burning earth to tread.*?', capture: false, - }), + }, durationSeconds: 9, infoText: (_data, _matches, output) => output.text!(), outputStrings: { @@ -711,10 +724,11 @@ const triggerSet: TriggerSet = { // https://xivapi.com/NpcYell/6504?pretty=true id: 'UCU Nael Quote 13', type: 'GameLog', - netRegex: NetRegexes.dialog({ + netRegex: { line: 'Unbending iron, take fire and descend.*?', + code: Util.gameLogCodes.dialog, capture: false, - }), + }, durationSeconds: 9, infoText: (_data, _matches, output) => output.text!(), outputStrings: { @@ -732,10 +746,11 @@ const triggerSet: TriggerSet = { // https://xivapi.com/NpcYell/6505?pretty=true id: 'UCU Nael Quote 14', type: 'GameLog', - netRegex: NetRegexes.dialog({ + netRegex: { line: 'Unbending iron, descend with fiery edge.*?', + code: Util.gameLogCodes.dialog, capture: false, - }), + }, durationSeconds: 9, infoText: (_data, _matches, output) => output.text!(), outputStrings: { diff --git a/ui/raidboss/data/05-shb/alliance/the_copied_factory.ts b/ui/raidboss/data/05-shb/alliance/the_copied_factory.ts index 91f281d914..2a89fa11d7 100644 --- a/ui/raidboss/data/05-shb/alliance/the_copied_factory.ts +++ b/ui/raidboss/data/05-shb/alliance/the_copied_factory.ts @@ -1,6 +1,6 @@ import Conditions from '../../../../../resources/conditions'; -import NetRegexes from '../../../../../resources/netregexes'; import { Responses } from '../../../../../resources/responses'; +import Util from '../../../../../resources/util'; import ZoneId from '../../../../../resources/zone_id'; import { RaidbossData } from '../../../../../types/data'; import { TriggerSet } from '../../../../../types/trigger'; @@ -124,10 +124,11 @@ const triggerSet: TriggerSet = { { id: 'Copied Hobbes Right Arm', type: 'GameLog', - netRegex: NetRegexes.message({ + netRegex: { line: 'The wall-mounted right arm begins to move.*?', + code: Util.gameLogCodes.message, capture: false, - }), + }, infoText: (_data, _matches, output) => output.text!(), run: (data) => data.alliance = data.alliance ?? 'A', outputStrings: { @@ -144,10 +145,12 @@ const triggerSet: TriggerSet = { { id: 'Copied Hobbes Flamethrowers', type: 'GameLog', - netRegex: NetRegexes.message({ + + netRegex: { line: 'The wall-mounted flamethrowers activate\..*?', + code: Util.gameLogCodes.message, capture: false, - }), + }, alertText: (_data, _matches, output) => output.text!(), run: (data) => data.alliance = data.alliance || 'B', outputStrings: { @@ -164,10 +167,11 @@ const triggerSet: TriggerSet = { { id: 'Copied Hobbes Left Arm 1', type: 'GameLog', - netRegex: NetRegexes.message({ + netRegex: { line: 'The wall-mounted left arm begins to move.*?', + code: Util.gameLogCodes.message, capture: false, - }), + }, durationSeconds: 6, response: Responses.getOut('info'), run: (data) => data.alliance = data.alliance || 'C', @@ -175,10 +179,11 @@ const triggerSet: TriggerSet = { { id: 'Copied Hobbes Left Arm 2', type: 'GameLog', - netRegex: NetRegexes.message({ + netRegex: { line: 'The wall-mounted left arm begins to move.*?', + code: Util.gameLogCodes.message, capture: false, - }), + }, delaySeconds: 8, alertText: (_data, _matches, output) => output.text!(), outputStrings: { @@ -195,10 +200,11 @@ const triggerSet: TriggerSet = { { id: 'Copied Hobbes Left Arm 3', type: 'GameLog', - netRegex: NetRegexes.message({ + netRegex: { line: 'The wall-mounted left arm begins to move.*?', + code: Util.gameLogCodes.message, capture: false, - }), + }, delaySeconds: 10, alertText: (_data, _matches, output) => output.text!(), outputStrings: { @@ -228,10 +234,11 @@ const triggerSet: TriggerSet = { { id: 'Copied Hobbes Electric Floor', type: 'GameLog', - netRegex: NetRegexes.message({ + netRegex: { line: 'You hear frenzied movement from machines beneath.*?', + code: Util.gameLogCodes.message, capture: false, - }), + }, durationSeconds: 10, suppressSeconds: 15, infoText: (_data, _matches, output) => output.text!(), @@ -249,10 +256,11 @@ const triggerSet: TriggerSet = { { id: 'Copied Hobbes Conveyer Belts', type: 'GameLog', - netRegex: NetRegexes.message({ + netRegex: { line: 'The conveyer belts whirr to life!.*?', + code: Util.gameLogCodes.message, capture: false, - }), + }, infoText: (_data, _matches, output) => output.text!(), outputStrings: { text: { @@ -268,10 +276,11 @@ const triggerSet: TriggerSet = { { id: 'Copied Hobbes Oil 1', type: 'GameLog', - netRegex: NetRegexes.message({ + netRegex: { line: 'Flammable oil is leaking from the floor.*?', + code: Util.gameLogCodes.message, capture: false, - }), + }, durationSeconds: 3, suppressSeconds: 15, alertText: (_data, _matches, output) => output.text!(), @@ -289,10 +298,11 @@ const triggerSet: TriggerSet = { { id: 'Copied Hobbes Oil 2', type: 'GameLog', - netRegex: NetRegexes.message({ + netRegex: { line: 'Flammable oil is leaking from the floor.*?', + code: Util.gameLogCodes.message, capture: false, - }), + }, delaySeconds: 6, durationSeconds: 3, suppressSeconds: 15, diff --git a/ui/raidboss/data/06-ew/dungeon/the_sildihn_subterrane.ts b/ui/raidboss/data/06-ew/dungeon/the_sildihn_subterrane.ts index 15f0fd80ce..eb25a83ffa 100644 --- a/ui/raidboss/data/06-ew/dungeon/the_sildihn_subterrane.ts +++ b/ui/raidboss/data/06-ew/dungeon/the_sildihn_subterrane.ts @@ -1,6 +1,6 @@ -import NetRegexes from '../../../../../resources/netregexes'; import Outputs from '../../../../../resources/outputs'; import { Responses } from '../../../../../resources/responses'; +import Util from '../../../../../resources/util'; import ZoneId from '../../../../../resources/zone_id'; import { RaidbossData } from '../../../../../types/data'; import { TriggerSet } from '../../../../../types/trigger'; @@ -123,7 +123,11 @@ const triggerSet: TriggerSet = { { id: 'Sildihn Geryon Seal Left Mechs', type: 'GameLog', - netRegex: NetRegexes.message({ line: 'The Silt Pump will be sealed off.*?', capture: false }), + netRegex: { + line: 'The Silt Pump will be sealed off.*?', + code: Util.gameLogCodes.message, + capture: false, + }, // May be overwritten by Runaway Sludge below. run: (data) => data.catapultMechs = leftDoorYesPump, }, @@ -151,10 +155,11 @@ const triggerSet: TriggerSet = { { id: 'Sildihn Geryon Seal Right Mechs', type: 'GameLog', - netRegex: NetRegexes.message({ + netRegex: { line: 'The Settling Basin will be sealed off.*?', + code: Util.gameLogCodes.message, capture: false, - }), + }, // May be overwritten by Suddenly Sewage below. run: (data) => data.catapultMechs = rightDoorNoCeruleum, },