basis of wound system

This commit is contained in:
François-Xavier Guillois
2023-09-05 15:04:06 +02:00
parent 983f856187
commit 848366e05c
7 changed files with 156 additions and 75 deletions
+7 -1
View File
@@ -2,6 +2,7 @@ import {onManageActiveEffect, prepareActiveEffectCategories} from "../system/eff
import { VermineActorSheet } from "./actor-sheet.mjs";
import { getRollBox } from "../system/dialogs.mjs";
import { TotemPicker } from "../system/applications.mjs";
import { setCharacterEffort, setCharacterSelfControl, setCharacterThresholds } from "../system/functions.mjs";
/**
* Extend the basic ActorSheet with some very simple modifications
@@ -71,10 +72,15 @@ export class VermineCharacterSheet extends VermineActorSheet {
* @return {undefined}
*/
_prepareCharacterData(context) {
const actor = game.actors.get(context.data._id);
// Handle ability scores.
for (let [k, v] of Object.entries(context.system.abilities)) {
v.label = game.i18n.localize(context.system.abilities[k].label) ?? k;
}
setCharacterEffort(actor);
setCharacterSelfControl(actor);
setCharacterThresholds(actor);
}
/**
@@ -155,7 +161,7 @@ export class VermineCharacterSheet extends VermineActorSheet {
let ageType = "2";
Object.keys(CONFIG.VERMINE.AgeTypes).forEach((type) => {
if(age > parseInt(CONFIG.VERMINE.AgeTypes[type].beginning,10)){
if(age >= parseInt(CONFIG.VERMINE.AgeTypes[type].beginning,10)){
ageType = type;
}
});