import { Misc } from "./misc.js";

export class RdDAlchimie {
  static getDifficulte(termes) {
    let elements = termes.split('-');
    let composantes = elements.length;
    let distincts = Object.keys(Misc.classifyFirst(elements, it => it)).length;
    if (distincts == 1) {
      composantes--;
    }
    return Math.min(0, -composantes);
  }

  static getCaracTache(tache) {
    switch (tache) {
      case "consistance": return 'dexterite';
      case "couleur": return 'vue';
    }
    return 'intellect';
  }
}
