Fiche de creature

This commit is contained in:
2023-12-02 09:03:58 +01:00
parent 68689add33
commit 5c889a5153
64 changed files with 519 additions and 201 deletions

View File

@@ -37,11 +37,12 @@ export class WastelandActor extends Actor {
return actor;
}
const skills = await WastelandUtility.loadCompendium("fvtt-wasteland.skills")
if (data.type == 'personnage') {
const skills = await WastelandUtility.loadCompendium("fvtt-wasteland.skills")
data.items = skills.map(i => i.toObject())
}
if (data.type == 'pnj') {
if (data.type == 'creature') {
data.items = skills.filter(i=>i.name.toLowerCase().includes("mêlée")).map(i => i.toObject())
}
return super.create(data, options);
@@ -119,6 +120,9 @@ export class WastelandActor extends Actor {
getArtifex() {
return this.getItemSorted(["artifex"])
}
getCapacites() {
return this.getItemSorted(["capacite"])
}
getPouvoirs() {
return this.getItemSorted(["pouvoir"])
}