Support de personnages sans compétences
Un personnage peut maintenant n'avoir aucune compétence Exemple: les entités invoquées (Kanaillous, ..) n'ont pas besoin d'une liste de compétences sans aucune valeur. Ceci permettrait de supprimer des compétences prohibées. # Conflicts: # module/actor.js # module/actor/base-actor-reve.js
This commit is contained in:
@ -39,11 +39,12 @@ import { DialogChoixXpCarac } from "./dialog-choix-xp-carac.js";
|
||||
import { RdDItemArme } from "./item-arme.js";
|
||||
import { RdDCombatManager } from "./rdd-combat.js";
|
||||
import { RdDItemTete } from "./item/tete.js";
|
||||
import { SystemCompendiums } from "./settings/system-compendiums.js";
|
||||
import { DialogSelect } from "./dialog-select.js";
|
||||
import { PAS_DE_DRACONIC, POSSESSION_SANS_DRACONIC } from "./item/base-items.js";
|
||||
|
||||
export const MAINS_DIRECTRICES = ['Droitier', 'Gaucher', 'Ambidextre']
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/**
|
||||
* Extend the base Actor entity by defining a custom roll data structure which is ideal for the Simple system.
|
||||
@ -153,10 +154,9 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
/* -------------------------------------------- */
|
||||
getDemiReve() { return this.system.reve.tmrpos.coord }
|
||||
getDraconicList() { return this.itemTypes[ITEM_TYPES.competence].filter(it => it.system.categorie == 'draconic') }
|
||||
getBestDraconic() { return foundry.utils.duplicate(this.getDraconicList().sort(Misc.descending(it => it.system.niveau)).find(it => true)) }
|
||||
getBestDraconic() { return foundry.utils.duplicate([...this.getDraconicList(), PAS_DE_DRACONIC].sort(Misc.descending(it => it.system.niveau)).find(it => true)) }
|
||||
getDraconicOuPossession() {
|
||||
return [...this.getDraconicList().filter(it => it.system.niveau >= 0),
|
||||
super.getDraconicOuPossession()]
|
||||
return [...this.getDraconicList().filter(it => it.system.niveau >= 0), POSSESSION_SANS_DRACONIC]
|
||||
.sort(Misc.descending(it => it.system.niveau))
|
||||
.find(it => true)
|
||||
}
|
||||
|
Reference in New Issue
Block a user