<commit_before>import React from 'react';

import ItemLink from 'common/ItemLink';
import ITEM_QUALITIES from 'common/ITEM_QUALITIES';

import Analyzer from 'Parser/Core/Analyzer';
import SUGGESTION_IMPORTANCE from 'Parser/Core/ISSUE_IMPORTANCE';

const MAX_LEGENDARY_ILVL = 1000;
const debug = false;

class LegendaryUpgradeChecker extends Analyzer {

  get legendaries() {
    return Object.values(this.selectedCombatant.gear).filter(item => item.quality === ITEM_QUALITIES.LEGENDARY);
  }
  get upgradedLegendaries() {
    return this.legendaries.filter(item => item.itemLevel >= MAX_LEGENDARY_ILVL);
  }

  suggestions(when) {
    this.legendaries.forEach(item => {
        debug && console.log(`Legendary ${item.id} is ${item.itemLevel}`);

        when(item.itemLevel).isLessThan(MAX_LEGENDARY_ILVL)
          .addSuggestion((suggest, actual, recommended) => {
            return suggest(<React.Fragment><ItemLink id={item.id} /> is not the max item level it can be. You should upgrade <ItemLink id={item.id} /> to the current max legendary item level.</React.Fragment>)
              .icon(item.icon)
              .actual(`It's currently ${actual}`)<commit_msg>update max legendary level to 265<commit_after>import React from 'react';

import ItemLink from 'common/ItemLink';
import ITEM_QUALITIES from 'common/ITEM_QUALITIES';

import Analyzer from 'Parser/Core/Analyzer';
import SUGGESTION_IMPORTANCE from 'Parser/Core/ISSUE_IMPORTANCE';

const MAX_LEGENDARY_ILVL = 265;
const debug = false;

class LegendaryUpgradeChecker extends Analyzer {

  get legendaries() {
    return Object.values(this.selectedCombatant.gear).filter(item => item.quality === ITEM_QUALITIES.LEGENDARY);
  }
  get upgradedLegendaries() {
    return this.legendaries.filter(item => item.itemLevel >= MAX_LEGENDARY_ILVL);
  }

  suggestions(when) {
    this.legendaries.forEach(item => {
        debug && console.log(`Legendary ${item.id} is ${item.itemLevel}`);

        when(item.itemLevel).isLessThan(MAX_LEGENDARY_ILVL)
          .addSuggestion((suggest, actual, recommended) => {
            return suggest(<React.Fragment><ItemLink id={item.id} /> is not the max item level it can be. You should upgrade <ItemLink id={item.id} /> to the current max legendary item level.</React.Fragment>)
              .icon(item.icon)
              .actual(`It's currently ${actual}`)
{'fraction_non_alphanumeric': 0.11964361476453118, 'fraction_numerical': 0.004242681374628765, 'mean_word_length': 4.081896551724138, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 21, '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': '3952468', 'n_tokens_mistral': 760, 'n_tokens_neox': 725, 'n_words': 166}