ds4/src/item/talent/talent.ts

23 lines
589 B
TypeScript

// SPDX-FileCopyrightText: 2022 Johannes Loher
//
// SPDX-License-Identifier: MIT
import { DS4Item } from "../item";
export class DS4Talent extends DS4Item {
/** @override */
prepareDerivedData(): void {
super.prepareDerivedData();
const data = this.data.data;
data.rank.total = data.rank.base + data.rank.mod;
}
/** @override */
get activeEffectFactor(): number | undefined {
return this.data.data.rank.total;
}
}
export interface DS4Talent {
data: foundry.data.ItemData & { type: "talent"; _source: { type: "talent" } };
}