Version 12.0.23 - La bibliothèque d'Astrobazzarh #723
@ -16,15 +16,17 @@ const VOIES_DRACONIC = [
|
||||
/* -------------------------------------------- */
|
||||
export class RdDItemSort extends Item {
|
||||
|
||||
static getDraconicsSort(draconicList, sort) {
|
||||
static getDraconicsSort(competencesDraconic, sort) {
|
||||
// se baser sur la voie du sort?
|
||||
switch (Grammar.toLowerCaseNoAccent(sort.name)) {
|
||||
case "lecture d'aura":
|
||||
case "detection d'aura":
|
||||
return draconicList;
|
||||
return competencesDraconic;
|
||||
case "annulation de magie":
|
||||
return draconicList.filter(it => !RdDItemCompetence.isThanatos(it));
|
||||
return competencesDraconic.filter(it => !RdDItemCompetence.isThanatos(it));
|
||||
}
|
||||
return [RdDItemCompetence.getVoieDraconic(draconicList, sort.system.draconic)];
|
||||
const voies = sort.system.draconic.split('/')
|
||||
return voies.map(voie => RdDItemCompetence.getVoieDraconic(competencesDraconic, voie))
|
||||
}
|
||||
|
||||
static getOrdreCode(code) {
|
||||
@ -47,7 +49,6 @@ export class RdDItemSort extends Item {
|
||||
return voie?.code ?? sort.system.draconic
|
||||
}
|
||||
|
||||
|
||||
static $voiesConnues(voiesSort, voies) {
|
||||
const codes = voies.filter(it => voiesSort.includes(it))
|
||||
.sort(Misc.ascending(it => RdDItemSort.getOrdreCode(it)))
|
||||
|
Loading…
Reference in New Issue
Block a user