<commit_before>'use strict';

// TODO: is there a different ability if the shield duty action isn't used properly?
// TODO: is there an ability from Raiden (the bird) if you get eaten?
// TODO: maybe chain lightning warning if you get hit while you have system shock (8B8)

let noOrb = (str) => {
  return {
    en: str + ' (no orb)',
    fr: str + ' (pas d\'orbe)',
  };
};

[{
  zoneRegex: {
    en: /^Eden's Verse: Fulmination \(Savage\)$/,
    ko: /^희망의 낙원 에덴: 공명편\(영웅\) \(1\)$/,
  },
  damageWarn: {
    'Impact': '4E3B', // Stratospear landing AoE
    'Gallop': '4BB4', // Sideways add charge
    'Shock Strike': '4BC1', // Small AoE circles during Thunderstorm
    'Stepped Leader Twister': '4BC7', // Twister stepped leader
    'Stepped Leader Donut': '4BC8', // Donut stepped leader
    'Shock': '4E3D', // Hated of Levin Stormcloud-cleansable exploding debuff
  },
  damageFail: {
    'Judgment Jolt': '4BA7', // Stratospear explosions
  },
  triggers: [
    {
      // Helper for orb pickup failures
      id: 'E5S Orb Tracking',
      gainsEffectRegex: gLang.kEffect.SurgeProtection,
      losesEffectRegex: gLang.kEffect.SurgeProtection,
      run: function(e, data) {
        data.hasOrb = data.hasOrb || {};
        data.hasOrb[e.targetName] = e.gains;
      },
    },
    {
      id: 'E5S Divine Judgement Volts',
      damageRegex: '4BB7',
      condition: function(e, data) {
        return !data.hasOrb[e.targetName];
      },
      mistake: function(e) {
        return { type: 'fail', blame: e.targetName, text: noOrb(e.abilityName) };
      },
    },
    {
      // Large AoE circles during Thunderstorm
      id: 'E5S Volt Strike Double',
      damageRegex: '4BC3',
      condition: function(e, data) {
        // Double taps only.
        return e.type != '15';
      },
      mistake: function(e, data) {
        return { type: 'warn', blame: e.targetName, text: e.abilityName };
      },
    },
    {
      id: 'E5S Volt Strike Orb',
      damageRegex: '4BC3',
      condition: function(e, data) {
        return !data.hasOrb[e.targetName];
      },
      mistake: function(e) {
        return { type: 'fail', blame: e.targetName, text: noOrb(e.abilityName) };
      },
    },
    {
      id: 'E5S Deadly Discharge Big Knockback',
      damageRegex: '4BB2',
      condition: function(e, data) {
        return !data.hasOrb[e.targetName];
      },
      mistake: function(e) {
        return { type: 'fail', blame: e.targetName, text: noOrb(e.abilityName) };
      },
    },
    {
      id: 'E5S Crippling Blow',
      damageRegex: '4BCA',
      condition: function(e, data) {
        // Double taps only.
        return e.type != '15';
      },
      mistake: function(e, data) {
        return { type: 'warn', blame: e.targetName, text: e.abilityName };
      },
    },
    {
      id: 'E5S Lightning Bolt',
      damageRegex: '4BB9',<commit_msg>oopsy: be more robust to orb state in e5s<commit_after>'use strict';

// TODO: is there a different ability if the shield duty action isn't used properly?
// TODO: is there an ability from Raiden (the bird) if you get eaten?
// TODO: maybe chain lightning warning if you get hit while you have system shock (8B8)

let noOrb = (str) => {
  return {
    en: str + ' (no orb)',
    fr: str + ' (pas d\'orbe)',
  };
};

[{
  zoneRegex: {
    en: /^Eden's Verse: Fulmination \(Savage\)$/,
    ko: /^희망의 낙원 에덴: 공명편\(영웅\) \(1\)$/,
  },
  damageWarn: {
    'Impact': '4E3B', // Stratospear landing AoE
    'Gallop': '4BB4', // Sideways add charge
    'Shock Strike': '4BC1', // Small AoE circles during Thunderstorm
    'Stepped Leader Twister': '4BC7', // Twister stepped leader
    'Stepped Leader Donut': '4BC8', // Donut stepped leader
    'Shock': '4E3D', // Hated of Levin Stormcloud-cleansable exploding debuff
  },
  damageFail: {
    'Judgment Jolt': '4BA7', // Stratospear explosions
  },
  triggers: [
    {
      // Helper for orb pickup failures
      id: 'E5S Orb Tracking',
      gainsEffectRegex: gLang.kEffect.SurgeProtection,
      losesEffectRegex: gLang.kEffect.SurgeProtection,
      run: function(e, data) {
        data.hasOrb = data.hasOrb || {};
        data.hasOrb[e.targetName] = e.gains;
      },
    },
    {
      id: 'E5S Divine Judgement Volts',
      damageRegex: '4BB7',
      condition: function(e, data) {
        return !data.hasOrb || !data.hasOrb[e.targetName];
      },
      mistake: function(e) {
        return { type: 'fail', blame: e.targetName, text: noOrb(e.abilityName) };
      },
    },
    {
      // Large AoE circles during Thunderstorm
      id: 'E5S Volt Strike Double',
      damageRegex: '4BC3',
      condition: function(e, data) {
        // Double taps only.
        return e.type != '15';
      },
      mistake: function(e, data) {
        return { type: 'warn', blame: e.targetName, text: e.abilityName };
      },
    },
    {
      id: 'E5S Volt Strike Orb',
      damageRegex: '4BC3',
      condition: function(e, data) {
        return !data.hasOrb || !data.hasOrb[e.targetName];
      },
      mistake: function(e) {
        return { type: 'fail', blame: e.targetName, text: noOrb(e.abilityName) };
      },
    },
    {
      id: 'E5S Deadly Discharge Big Knockback',
      damageRegex: '4BB2',
      condition: function(e, data) {
        return !data.hasOrb || !data.hasOrb[e.targetName];
      },
      mistake: function(e) {
        return { type: 'fail', blame: e.targetName, text: noOrb(e.abilityName) };
      },
    },
    {
      id: 'E5S Crippling Blow',
      damageRegex: '4BCA',
      condition: function(e, data) {
        // Double taps only.
        return e.type != '15';
      },
      mistake: function(e, data) {
        return { type: 'warn', blame: e.targetName, text: e.abilityName };
      },
    },
    {
      id: 'E5S Lightning Bolt',
      damageRegex: '4BB9',
{'fraction_non_alphanumeric': 0.1475437993816558, 'fraction_numerical': 0.013569220199244246, 'mean_word_length': 2.2898305084745765, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '917069', 'n_tokens_mistral': 2087, 'n_tokens_neox': 2075, 'n_words': 534}