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