Add the derived data for the aura ranges

This commit is contained in:
Oliver-Akins 2025-03-09 00:16:21 -07:00
parent 89b51a01e6
commit 4f35db01b6
5 changed files with 54 additions and 3 deletions

View file

@ -1,5 +1,6 @@
import { derivedMaximumBar } from "../helpers.mjs";
import { gameTerms } from "../../gameTerms.mjs";
import { rankToInteger } from "../../utils/rank.mjs";
import { sumReduce } from "../../utils/sumReduce.mjs";
const { fields } = foundry.data;
@ -122,6 +123,13 @@ export class HeroData extends foundry.abstract.TypeDataModel {
prepareBaseData() {
super.prepareBaseData();
// Calculate the person's base Crafting aura
const rank = rankToInteger(this.level.rank);
this.aura = {
normal: ( rank + 1 ) * 2,
heavy: ( rank + 2 ) * 2,
};
this.guts.max = 0;
// The limitations imposed on things like inventory spaces and equipped