ds4/src/module/item/item.ts
2021-02-07 11:51:36 +01:00

21 lines
454 B
TypeScript

import { DS4ItemData } from "./item-data";
/**
* The Item class for DS4
*/
export class DS4Item extends Item<DS4ItemData> {
/**
* @override
*/
prepareData(): void {
super.prepareData();
this.prepareDerivedData();
}
prepareDerivedData(): void {
if (this.data.type === "talent") {
const data = this.data.data;
data.rank.total = data.rank.base + data.rank.mod;
}
}
}