21 lines
454 B
TypeScript
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;
|
|
}
|
|
}
|
|
}
|