<commit_before>import React from 'react';

import SPELLS from 'common/SPELLS';
import Analyzer from 'parser/core/Analyzer';
import SpellLink from 'common/SpellLink';
import AbilityTracker from 'parser/shared/modules/AbilityTracker';
import StatisticBox from 'interface/others/StatisticBox';
import SpellIcon from 'common/SpellIcon';
import ItemHealingDone from 'interface/others/ItemHealingDone';
import ItemDamageDone from 'interface/others/ItemDamageDone';
import { formatPercentage, formatNumber } from 'common/format';

class HolyNova extends Analyzer {
  static dependencies = {
    abilityTracker: AbilityTracker,
  };

  get casts() {
    return this.abilityTracker.getAbility(SPELLS.HOLY_NOVA.id).casts || 0;
  }

  get healingHits() {
    return this.abilityTracker.getAbility(SPELLS.HOLY_NOVA_HEAL.id).healingHits || 0;
  }

  get effectiveHealing() {
    return this.abilityTracker.getAbility(SPELLS.HOLY_NOVA_HEAL.id).healingEffective + this.abilityTracker.getAbility(SPELLS.HOLY_NOVA_HEAL.id).healingAbsorbed || 0;
  }

  get overHealing() {
    return this.abilityTracker.getAbility(SPELLS.HOLY_NOVA_HEAL.id).healingOverheal || 0;
  }

  get overhealPercent() {
    return this.overHealing / (this.effectiveHealing + this.overHealing);
  }

  get damageHits() {
    return this.abilityTracker.getAbility(SPELLS.HOLY_NOVA.id).damageHits || 0;
  }

  get damageDone() {
    return this.abilityTracker.getAbility(SPELLS.HOLY_NOVA.id).damageEffective;
  }

  get averageFriendlyTargetsHit() {
    if (this.casts > 0) {
      return this.healingHits / this.casts;
    }
    return 0;
  }

  get averageHealingPerCast() {
    if (this.casts > 0) {
      return this.effectiveHealing / this.casts;
    }
    return 0;
  }

  get averageEnemyTargetsHit() {
    if (this.casts > 0) {
      return this.damageHits / this.casts;
    }
    return 0;
  }

  get averageDamagePerCast() {
    if (this.casts > 0) {
      return this.damageDone / this.casts;
    }
    return 0;
  }

  get holyNovaThreshold() {
    return {
      actual: this.averageFriendlyTargetsHit > 0 ? this.averageFriendlyTargetsHit : 10,
      isLessThan: {
        minor: 10,
        average: 5,
        major: 2,
      },
      style: 'number',
    };
  }

  statistic() {
    return (
      <StatisticBox
        icon={<SpellIcon id={SPELLS.HOLY_NOVA.id} />}
        value={(<commit_msg>hiding holy nova if you don't cast any holy novas<commit_after>import React from 'react';

import SPELLS from 'common/SPELLS';
import Analyzer from 'parser/core/Analyzer';
import SpellLink from 'common/SpellLink';
import AbilityTracker from 'parser/shared/modules/AbilityTracker';
import StatisticBox from 'interface/others/StatisticBox';
import SpellIcon from 'common/SpellIcon';
import ItemHealingDone from 'interface/others/ItemHealingDone';
import ItemDamageDone from 'interface/others/ItemDamageDone';
import { formatPercentage, formatNumber } from 'common/format';

class HolyNova extends Analyzer {
  static dependencies = {
    abilityTracker: AbilityTracker,
  };

  get casts() {
    return this.abilityTracker.getAbility(SPELLS.HOLY_NOVA.id).casts || 0;
  }

  get healingHits() {
    return this.abilityTracker.getAbility(SPELLS.HOLY_NOVA_HEAL.id).healingHits || 0;
  }

  get effectiveHealing() {
    return this.abilityTracker.getAbility(SPELLS.HOLY_NOVA_HEAL.id).healingEffective + this.abilityTracker.getAbility(SPELLS.HOLY_NOVA_HEAL.id).healingAbsorbed || 0;
  }

  get overHealing() {
    return this.abilityTracker.getAbility(SPELLS.HOLY_NOVA_HEAL.id).healingOverheal || 0;
  }

  get overhealPercent() {
    return this.overHealing / (this.effectiveHealing + this.overHealing);
  }

  get damageHits() {
    return this.abilityTracker.getAbility(SPELLS.HOLY_NOVA.id).damageHits || 0;
  }

  get damageDone() {
    return this.abilityTracker.getAbility(SPELLS.HOLY_NOVA.id).damageEffective;
  }

  get averageFriendlyTargetsHit() {
    if (this.casts > 0) {
      return this.healingHits / this.casts;
    }
    return 0;
  }

  get averageHealingPerCast() {
    if (this.casts > 0) {
      return this.effectiveHealing / this.casts;
    }
    return 0;
  }

  get averageEnemyTargetsHit() {
    if (this.casts > 0) {
      return this.damageHits / this.casts;
    }
    return 0;
  }

  get averageDamagePerCast() {
    if (this.casts > 0) {
      return this.damageDone / this.casts;
    }
    return 0;
  }

  get holyNovaThreshold() {
    return {
      actual: this.averageFriendlyTargetsHit > 0 ? this.averageFriendlyTargetsHit : 10,
      isLessThan: {
        minor: 10,
        average: 5,
        major: 2,
      },
      style: 'number',
    };
  }

  statistic() {
    if (this.casts === 0) {
      return (<></>);
    }
    return (
      <StatisticBox
        icon={<SpellIcon id={SPELLS.HOLY_NOVA.id} />}
        value={(
{'fraction_non_alphanumeric': 0.11436280614362807, 'fraction_numerical': 0.008509755085097551, 'mean_word_length': 3.318100358422939, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, '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': '248413', 'n_tokens_mistral': 1751, 'n_tokens_neox': 1658, 'n_words': 308}