This commit is contained in:
rwanoux
2024-06-24 08:56:59 +02:00
parent f4a56aa6b0
commit a163528acb
2 changed files with 12 additions and 14 deletions
+7 -6
View File
@@ -20,7 +20,7 @@ export class VermineActor extends Actor {
// Data modifications in this step occur before processing embedded
// documents or derived data.
if (this.type == 'character'){
if (this.type == 'character') {
this._setAgeType();
this._setCharacterEffort();
this._setCharacterSelfControl();
@@ -62,6 +62,7 @@ export class VermineActor extends Actor {
// Calculate the modifier using d20 rules.
ability.mod = Math.floor((ability.value - 10) / 2);
}
}
/**
@@ -138,9 +139,9 @@ export class VermineActor extends Actor {
}
_setAgeType(){
_setAgeType() {
Object.keys(CONFIG.VERMINE.AgeTypes).forEach((type) => {
if(this.system.identity.age >= parseInt(CONFIG.VERMINE.AgeTypes[type].beginning,10)){
if (this.system.identity.age >= parseInt(CONFIG.VERMINE.AgeTypes[type].beginning, 10)) {
this.system.identity.ageType = type;
}
});
@@ -161,9 +162,9 @@ export class VermineActor extends Actor {
}
get modFromAgeWounds() {
if (this.ageType == 1) return {l : 0, h : 0, d: -1};
if (this.ageType == 3) return {l : -1, h : -1, d: -1};
return {l : 0, h : 0, d: 0};
if (this.ageType == 1) return { l: 0, h: 0, d: -1 };
if (this.ageType == 3) return { l: -1, h: -1, d: -1 };
return { l: 0, h: 0, d: 0 };
}
}
-3
View File
@@ -176,7 +176,4 @@ export class VermineActorSheet extends ActorSheet {
// Finally, create the item!
return await Item.create(itemData, { parent: this.actor });
}
async getGroup() {
return await game.actors.find(group => { group == group - 1 })
}
}