22 lines
519 B
JavaScript
Raw Normal View History

2021-01-07 20:04:10 +01:00
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--;
2021-01-07 20:04:10 +01:00
}
return Math.min(0, -composantes);
2021-01-07 20:04:10 +01:00
}
2021-04-20 23:16:18 +02:00
static getCaracTache(tache) {
switch (tache) {
case "consistance": return 'dexterite';
case "couleur": return 'vue';
}
return 'intellect';
}
2021-01-07 20:04:10 +01:00
}