Version 12.0.23 - La bibliothèque d'Astrobazzarh #723

Merged
uberwald merged 14 commits from VincentVk/foundryvtt-reve-de-dragon:v11 into v11 2024-11-27 10:12:27 +01:00
Showing only changes of commit 2291eaf135 - Show all commits

View File

@ -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)))