<commit_before>'use strict';

// O12S - Alphascape 4.0 Savage

[{
  zoneRegex: /^Alphascape V4.0 \(Savage\)$/,
  timelineFile: 'o12s.txt',
  triggers: [
    {
      id: 'O12S Beyond Defense',
      regex: / 1[56]:\y{ObjectId}:Omega-M:332C:[^:]*:\y{ObjectId}:(\y{Name}):/,
      regexDe: / 1[56]:\y{ObjectId}:Omega-M:332C:[^:]*:\y{ObjectId}:(\y{Name}):/,
      regexFr: / 1[56]:\y{ObjectId}:Oméga-M:332C:[^:]*:\y{ObjectId}:(\y{Name}):/,
      regexJa: / 1[56]:\y{ObjectId}:オメガM:332C:[^:]*:\y{ObjectId}:(\y{Name}):/,
      condition: function(data, matches) {
        return data.me == matches[1];
      },
      alarmText: {
        en: 'Don\'t Stack!',
      },
    },
    {
      id: 'O12S Local Resonance',
      regex: / 1A:Omega gains the effect of (?:Local Resonance|Unknown_67E) from/,
      regexDe: / 1A:Omega gains the effect of (?:Resonanzprogramm: Nah|Unknown_67E) from/,
      regexFr: / 1A:Oméga gains the effect of (?:Programme de résonance: proximité|Unknown_67E) from/,
      regexJa: / 1A:オメガ gains the effect of (?:レゾナンスプログラム：ニアー|Unknown_67E) from/,
      infoText: {
        en: 'Keep Bosses Apart',
      },
    },
    {
      id: 'O12S Remote Resonance',
      regex: / 1A:Omega gains the effect of (?:Remote Resonance|Unknown_67F) from/,
      regexDe: / 1A:Omega gains the effect of (?:Resonanzprogramm: Fern|Unknown_67F) from/,
      regexFr: / 1A:Oméga gains the effect of (?:Programme de résonance: distance|Unknown_67F) from/,
      regexJa: / 1A:オメガ gains the effect of (?:レゾナンスプログラム：ファー|Unknown_67F) from/,
      alertText: {
        en: 'Move Bosses Together',
      },
    },
    {
      id: 'O12S Solar Ray',
      regex: / 14:(?:3350|3351):(?:Omega|Omega-M) starts using (?:Unknown_3350|Unknown_3351|Solar Ray) on (\y{Name})/,
      regexDe: / 14:(?:3350|3351):(?:Omega|Omega-M) starts using (?:Unknown_3350|Unknown_3351|Sonnenstrahl) on (\y{Name})/,
      regexFr: / 14:(?:3350|3351):(?:Oméga|Oméga-M) starts using (?:Unknown_3350|Unknown_3351|Rayon solaire) on (\y{Name})/,
      regexJa: / 14:(?:3350|3351):(?:オメガ|オメガM) starts using (?:Unknown_3350|Unknown_3351|ソーラレイ) on (\y{Name})/,
      condition: function(data, matches) {
        return data.me == matches[1] || data.role == 'healer';
      },
      suppressSeconds: 1,
      alertText: function(data, matches) {
        if (matches[1] == data.me) {
          return {
            en: 'Tank Buster on YOU',
            de: 'Tenkbuster auf DIR',
            fr: 'Tankbuster sur VOUS',
          };
        }
        if (data.role == 'healer') {
          return {
            en: 'Tank Busters',
            de: 'Tenkbuster',
            fr: 'Tankbuster',
          };
        }
      },
      tts: function(data, matches) {
        if (matches[1] == data.me) {
          return {
            en: 'buster',
            de: 'basta',
            fr: 'tankbuster',
          };
        }
      },
    },
    {
      id: 'O12S Optimized Blade Dance',
      regex: / 14:(?:334B|334C):(?:Omega|Omega-M) starts using (?:Unknown_334B|Unknown_334C|Optimized Blade Dance) on (\y{Name})/,
      regexDe: / 14:(?:334B|334C):(?:Omega|Omega-M) starts using (?:Unknown_334B|Unknown_334C|Omega-Schwertertanz) on (\y{Name})/,
      regexFr: / 14:(?:334B|334C):(?:Oméga|Oméga-M) starts using (?:Unknown_334B|Unknown_334C|Danse de la lame Oméga) on (\y{Name})/,
      regexJa: / 14:(?:334B|334C):(?:オメガ|オメガM) starts using (?:Unknown_334B|Unknown_334C|ブレードダンス・オメガ) on (\y{Name})/,
      condition: function(data, matches) {
        return data.me == matches[1] || data.role == 'healer';
      },
      suppressSeconds: 1,
      alertText: function(data, matches) {
        if (matches[1] == data.me) {
          return {
            en: 'Tank Buster on YOU',
            de: 'Tenkbuster auf DIR',
            fr: 'Tankbuster sur VOUS',
          };
        }
        if (data.role == 'healer') {
          return {
            en: 'Tank Busters',
            de: 'Tenkbuster',
            fr: 'Tankbuster',
          };
        }
      },
      tts: function(data, matches) {
        if (matches[1] == data.me) {
          return {
            en: 'buster',
            de: 'basta',
            fr: 'tankbuster',
          };
        }
      },
    },
    {
      id: 'O12S Electric Slide Marker',
      regex: /1B:........:(\y{Name}):....:....:(009[12345678]):0000:0000:0000:/,
      condition: function(data, matches) {
        return data.me == matches[1];
      },
      alertText: function(data, matches) {
        let num = parseInt(matches[2]);
        let isTriangle = num >= 95;
        num -= 90;
        if (isTriangle)
          num -= 4;

        let squareName = {
          en: 'Square',
        }[data.lang];
        let triangleName = {
          en: 'Triangle',
        }[data.lang];
        return '#' + num + ' ' + (isTriangle ? triangleName : squareName);
      },
    },
    {
      id: 'O12S Stack Marker',
      regex: /1B:........:\y{Name}:....:....:003E:0000:0000:0000:/,
      suppressSeconds: 1,
      infoText: {
        en: 'Stack',
      },
    },
    {
      id: 'O12S Optimized Meteor',
      regex: /1B:........:(\y{Name}):....:....:0057:0000:0000:0000:/,
      condition: function(data, matches) {
        return data.me == matches[1];
      },
      infoText: {
        en: 'Meteor on YOU',
      },
    },
    {
      id: 'O12S Packet Filter F',
      regex: / 1A:(\y{Name}) gains the effect of (?:Unknown_67D|Packet Filter F) from/,
      regexDe: / 1A:(\y{Name}) gains the effect of (?:Unknown_67D|Sicherungssystem F) from/,
      regexFr: / 1A:(\y{Name}) gains the effect of (?:Unknown_67D|Programme protecteur F) from/,
      regexJa: / 1A:(\y{Name}) gains the effect of (?:Unknown_67D|ガードプログラムF) from/,
      condition: function(data, matches) {
        return data.me == matches[1];
      },
      infoText: {
        en: 'Attack Omega-M',
      },
    },
    {
      id: 'O12S Packet Filter M',
      regex: / 1A:(\y{Name}) gains the effect of (?:Unknown_67C|Packet Filter M) from/,
      regexDe: / 1A:(\y{Name}) gains the effect of (?:Unknown_67C|Sicherungssystem M) from/,
      regexFr: / 1A:(\y{Name}) gains the effect of (?:Unknown_67C|Programme protecteur M) from/,
      regexJa: / 1A:(\y{Name}) gains the effect of (?:Unknown_67C|ガードプログラムM) from/,
      condition: function(data, matches) {
        return data.me == matches[1];
      },
      infoText: {
        en: 'Attack Omega-F',
      },
    },
  ],
  timelineReplace: [
    {
      'locale': 'de',
      'replaceSync': {
        'Engage!': 'Start!',
        'Omega': 'Omega',
        'Omega-F': 'Omega-W',
        'Omega-M': 'Omega-M',
        'Optical Unit': 'Optikmodul',

        'Left Arm Unit': 'link[a] Arm',
        'Right Arm Unit': 'recht[a] Arm',<commit_msg>raidboss: o12s final omega triggers<commit_after>'use strict';

// O12S - Alphascape 4.0 Savage

[{
  zoneRegex: /^Alphascape V4.0 \(Savage\)$/,
  timelineFile: 'o12s.txt',
  triggers: [
    {
      id: 'O12S Beyond Defense',
      regex: / 1[56]:\y{ObjectId}:Omega-M:332C:[^:]*:\y{ObjectId}:(\y{Name}):/,
      regexDe: / 1[56]:\y{ObjectId}:Omega-M:332C:[^:]*:\y{ObjectId}:(\y{Name}):/,
      regexFr: / 1[56]:\y{ObjectId}:Oméga-M:332C:[^:]*:\y{ObjectId}:(\y{Name}):/,
      regexJa: / 1[56]:\y{ObjectId}:オメガM:332C:[^:]*:\y{ObjectId}:(\y{Name}):/,
      condition: function(data, matches) {
        return data.me == matches[1];
      },
      alarmText: {
        en: 'Don\'t Stack!',
      },
    },
    {
      id: 'O12S Local Resonance',
      regex: / 1A:Omega gains the effect of (?:Local Resonance|Unknown_67E) from/,
      regexDe: / 1A:Omega gains the effect of (?:Resonanzprogramm: Nah|Unknown_67E) from/,
      regexFr: / 1A:Oméga gains the effect of (?:Programme de résonance: proximité|Unknown_67E) from/,
      regexJa: / 1A:オメガ gains the effect of (?:レゾナンスプログラム：ニアー|Unknown_67E) from/,
      infoText: {
        en: 'Keep Bosses Apart',
      },
    },
    {
      id: 'O12S Remote Resonance',
      regex: / 1A:Omega gains the effect of (?:Remote Resonance|Unknown_67F) from/,
      regexDe: / 1A:Omega gains the effect of (?:Resonanzprogramm: Fern|Unknown_67F) from/,
      regexFr: / 1A:Oméga gains the effect of (?:Programme de résonance: distance|Unknown_67F) from/,
      regexJa: / 1A:オメガ gains the effect of (?:レゾナンスプログラム：ファー|Unknown_67F) from/,
      alertText: {
        en: 'Move Bosses Together',
      },
    },
    {
      id: 'O12S Solar Ray',
      regex: / 14:(?:3350|3351):(?:Omega|Omega-M) starts using (?:Unknown_3350|Unknown_3351|Solar Ray) on (\y{Name})/,
      regexDe: / 14:(?:3350|3351):(?:Omega|Omega-M) starts using (?:Unknown_3350|Unknown_3351|Sonnenstrahl) on (\y{Name})/,
      regexFr: / 14:(?:3350|3351):(?:Oméga|Oméga-M) starts using (?:Unknown_3350|Unknown_3351|Rayon solaire) on (\y{Name})/,
      regexJa: / 14:(?:3350|3351):(?:オメガ|オメガM) starts using (?:Unknown_3350|Unknown_3351|ソーラレイ) on (\y{Name})/,
      condition: function(data, matches) {
        return data.me == matches[1] || data.role == 'healer';
      },
      suppressSeconds: 1,
      alertText: function(data, matches) {
        if (matches[1] == data.me) {
          return {
            en: 'Tank Buster on YOU',
            de: 'Tenkbuster auf DIR',
            fr: 'Tankbuster sur VOUS',
          };
        }
        if (data.role == 'healer') {
          return {
            en: 'Tank Busters',
            de: 'Tenkbuster',
            fr: 'Tankbuster',
          };
        }
      },
      tts: function(data, matches) {
        if (matches[1] == data.me) {
          return {
            en: 'buster',
            de: 'basta',
            fr: 'tankbuster',
          };
        }
      },
    },
    {
      id: 'O12S Optimized Blade Dance',
      regex: / 14:(?:334B|334C):(?:Omega|Omega-M) starts using (?:Unknown_334B|Unknown_334C|Optimized Blade Dance) on (\y{Name})/,
      regexDe: / 14:(?:334B|334C):(?:Omega|Omega-M) starts using (?:Unknown_334B|Unknown_334C|Omega-Schwertertanz) on (\y{Name})/,
      regexFr: / 14:(?:334B|334C):(?:Oméga|Oméga-M) starts using (?:Unknown_334B|Unknown_334C|Danse de la lame Oméga) on (\y{Name})/,
      regexJa: / 14:(?:334B|334C):(?:オメガ|オメガM) starts using (?:Unknown_334B|Unknown_334C|ブレードダンス・オメガ) on (\y{Name})/,
      condition: function(data, matches) {
        return data.me == matches[1] || data.role == 'healer';
      },
      suppressSeconds: 1,
      alertText: function(data, matches) {
        if (matches[1] == data.me) {
          return {
            en: 'Tank Buster on YOU',
            de: 'Tenkbuster auf DIR',
            fr: 'Tankbuster sur VOUS',
          };
        }
        if (data.role == 'healer') {
          return {
            en: 'Tank Busters',
            de: 'Tenkbuster',
            fr: 'Tankbuster',
          };
        }
      },
      tts: function(data, matches) {
        if (matches[1] == data.me) {
          return {
            en: 'buster',
            de: 'basta',
            fr: 'tankbuster',
          };
        }
      },
    },
    {
      id: 'O12S Electric Slide Marker',
      regex: /1B:........:(\y{Name}):....:....:(009[12345678]):0000:0000:0000:/,
      condition: function(data, matches) {
        return data.me == matches[1];
      },
      alertText: function(data, matches) {
        let num = parseInt(matches[2]);
        let isTriangle = num >= 95;
        num -= 90;
        if (isTriangle)
          num -= 4;

        let squareName = {
          en: 'Square',
        }[data.lang];
        let triangleName = {
          en: 'Triangle',
        }[data.lang];
        return '#' + num + ' ' + (isTriangle ? triangleName : squareName);
      },
    },
    {
      id: 'O12S Stack Marker',
      regex: /1B:........:\y{Name}:....:....:003E:0000:0000:0000:/,
      suppressSeconds: 1,
      infoText: {
        en: 'Stack',
      },
    },
    {
      id: 'O12S Optimized Meteor',
      regex: /1B:........:(\y{Name}):....:....:0057:0000:0000:0000:/,
      condition: function(data, matches) {
        return data.me == matches[1];
      },
      infoText: {
        en: 'Meteor on YOU',
      },
    },
    {
      id: 'O12S Packet Filter F',
      regex: / 1A:(\y{Name}) gains the effect of (?:Unknown_67D|Packet Filter F) from/,
      regexDe: / 1A:(\y{Name}) gains the effect of (?:Unknown_67D|Sicherungssystem F) from/,
      regexFr: / 1A:(\y{Name}) gains the effect of (?:Unknown_67D|Programme protecteur F) from/,
      regexJa: / 1A:(\y{Name}) gains the effect of (?:Unknown_67D|ガードプログラムF) from/,
      condition: function(data, matches) {
        return data.me == matches[1];
      },
      infoText: {
        en: 'Attack Omega-M',
      },
    },
    {
      id: 'O12S Packet Filter M',
      regex: / 1A:(\y{Name}) gains the effect of (?:Unknown_67C|Packet Filter M) from/,
      regexDe: / 1A:(\y{Name}) gains the effect of (?:Unknown_67C|Sicherungssystem M) from/,
      regexFr: / 1A:(\y{Name}) gains the effect of (?:Unknown_67C|Programme protecteur M) from/,
      regexJa: / 1A:(\y{Name}) gains the effect of (?:Unknown_67C|ガードプログラムM) from/,
      condition: function(data, matches) {
        return data.me == matches[1];
      },
      infoText: {
        en: 'Attack Omega-F',
      },
    },
    {
      id: 'O12S Diffuse Wave Cannon Sides',
      regex: / 14:3367:Omega starts using (?:Diffuse Wave Cannon|Unknown_3367)/,
      infoText: {
        en: 'Sides',
      },
    },
    {
      id: 'O12S Diffuse Wave Cannon Front/Back',
      regex: / 14:3368:Omega starts using (?:Diffuse Wave Cannon|Unknown_3368)/,
      infoText: {
        en: 'Front or Back',
      },
    },
    {
      id: 'O12S Target Analysis Target',
      regex: /1B:........:(\y{Name}):....:....:000E:0000:0000:0000:/,
      alarmText: function(data, matches) {
        if (data.me == matches[1]) {
          return {
            en: 'Vuln on YOU',
          };
        }
      },
      infoText: function(data, matches) {
        if (data.me == matches[1] || data.role != 'tank')
          return;
        return {
          en: 'Vuln on ' + data.ShortName(matches[1]),
        };
      },
    },
    {
      id: 'O12S Local Tethers',
      regex: / 1A:(\y{Name}) gains the effect of (?:Unknown_688|Local Regression) from/,
      condition: function(data, matches) {
        return data.me == matches[1];
      },
      infoText: {
        en: 'Close Tethers',
      },
    },
    {
      id: 'O12S Far Tethers',
      regex: / 1A:(\y{Name}) gains the effect of (?:Unknown_689|Remote Regression) from/,
      condition: function(data, matches) {
        return data.me == matches[1];
      },
      infoText: {
        en: 'Far Tethers',
      },
    },
    {
      id: '<NAME>',
      regex: / 14:336E:Omega starts using/,
      run: function(data) {
        data.personDebuff = {};
        data.totalDefamation = 0;
        data.totalBlueMarker = 0;
        data.totalStack = 0;
        data.totalRot = 0;
        data.totalHelloWorld = (data.totalHelloWorld || 0) + 1;
      },
    },
    {
      id: 'O12S Defamation',
      regex: / 1A:(\y{Name}) gains the effect of (?:Unknown_681|Critical Overflow Bug) from/,
      condition: function(data, matches) {
        return data.me == matches[1];
      },
      alarmText: {
        en: 'Defamation on YOU',
      },
      run: function(data, matches) {
        data.totalDefamation++;
        data.personDebuff[matches[1]] = true;
      },
    },
    {
      id: 'O12S Latent Defect',
      regex: / 1A:(\y{Name}) gains the effect of (?:Unknown_686|Latent Defect) from/,
      condition: function(data, matches) {
        return data.me == matches[1];
      },
      infoText: {
        en: 'Blue Marker',
      },
      run: function(data, matches) {
        data.totalBlueMarker++;
        data.personDebuff[matches[1]] = true;
      },
    },
    {
      id: 'O12S Rot',
      regex: / 1A:(\y{Name}) gains the effect of (?:Unknown_682|Critical Underflow Bug) from/,
      condition: function(data, matches) {
        return data.me == matches[1];
      },
      infoText: {
        en: 'Rot',
      },
      run: function(data, matches) {
        data.totalRot++;
        data.personDebuff[matches[1]] = true;
      },
    },
    {
      id: 'O12S Stack',
      regex: / 1A:(\y{Name}) gains the effect of (?:Unknown_680|Critical Synchronization Bug) from (?:.*) for (.*) Seconds/,
      condition: function(data, matches) {
        return data.me == matches[1];
      },
      alertText: function(data, matches) {
        let t = parseFloat(matches[2]);
        if (!(t > 0))
          return;
        if (t <= 8) {
          return {
            en: 'Short Stack',
          };
        }
        return {
          en: 'Long Stack',
        };
      },
      run: function(data, matches) {
        data.totalStack++;
        data.personDebuff[matches[1]] = true;
      },
    },
  ],
  timelineReplace: [
    {
      'locale': 'de',
      'replaceSync': {
        'Engage!': 'Start!',
        'Omega': 'Omega',
        'Omega-F': 'Omega-W',
        'Omega-M': 'Omega-M',
        'Optical Unit': 'Optikmodul',

        'Left Arm Unit': 'link[a] Arm',
        'Right Arm Unit': 'recht[a] Arm',
{'fraction_non_alphanumeric': 0.17618575345662446, 'fraction_numerical': 0.041829531532582696, 'mean_word_length': 2.050720768820075, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3726181', 'n_tokens_mistral': 6540, 'n_tokens_neox': 6042, 'n_words': 1289}