2021-06-26 22:02:00 +02:00
|
|
|
// SPDX-FileCopyrightText: 2021 Johannes Loher
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
2021-03-22 09:04:45 +01:00
|
|
|
import { HasTotal } from "../common/common-data";
|
|
|
|
import {
|
|
|
|
DS4AlphabetDataData,
|
|
|
|
DS4ArmorDataData,
|
|
|
|
DS4EquipmentDataData,
|
|
|
|
DS4ItemDataHelper,
|
|
|
|
DS4LanguageDataData,
|
|
|
|
DS4LootDataData,
|
|
|
|
DS4RacialAbilityDataData,
|
|
|
|
DS4ShieldDataData,
|
|
|
|
DS4SpecialCreatureAbilityDataData,
|
|
|
|
DS4SpellDataData,
|
|
|
|
DS4TalentDataData,
|
|
|
|
DS4TalentRank,
|
|
|
|
DS4WeaponDataData,
|
|
|
|
} from "./item-data";
|
|
|
|
|
|
|
|
export type DS4ItemPreparedData =
|
|
|
|
| DS4WeaponPreparedData
|
|
|
|
| DS4ArmorPreparedData
|
|
|
|
| DS4ShieldPreparedData
|
|
|
|
| DS4SpellPreparedData
|
|
|
|
| DS4EquipmentPreparedData
|
|
|
|
| DS4LootPreparedData
|
|
|
|
| DS4TalentPreparedData
|
|
|
|
| DS4RacialAbilityPreparedData
|
|
|
|
| DS4LanguagePreparedData
|
|
|
|
| DS4AlphabetPreparedData
|
|
|
|
| DS4SpecialCreatureAbilityPreparedData;
|
|
|
|
|
2021-06-26 11:42:50 +02:00
|
|
|
export type DS4WeaponPreparedData = DS4ItemDataHelper<DS4WeaponPreparedDataData, "weapon">;
|
|
|
|
export type DS4ArmorPreparedData = DS4ItemDataHelper<DS4ArmorPreparedDataData, "armor">;
|
|
|
|
export type DS4ShieldPreparedData = DS4ItemDataHelper<DS4ShieldPreparedDataData, "shield">;
|
|
|
|
export type DS4SpellPreparedData = DS4ItemDataHelper<DS4SpellPreparedDataData, "spell">;
|
|
|
|
export type DS4EquipmentPreparedData = DS4ItemDataHelper<DS4EquipmentPreparedDataData, "equipment">;
|
|
|
|
export type DS4LootPreparedData = DS4ItemDataHelper<DS4LootPreparedDataData, "loot">;
|
|
|
|
export type DS4TalentPreparedData = DS4ItemDataHelper<DS4TalentPreparedDataData, "talent">;
|
|
|
|
export type DS4RacialAbilityPreparedData = DS4ItemDataHelper<DS4RacialAbilityPreparedDataData, "racialAbility">;
|
|
|
|
export type DS4LanguagePreparedData = DS4ItemDataHelper<DS4LanguagePreparedDataData, "language">;
|
|
|
|
export type DS4AlphabetPreparedData = DS4ItemDataHelper<DS4AlphabetPreparedDataData, "alphabet">;
|
|
|
|
export type DS4SpecialCreatureAbilityPreparedData = DS4ItemDataHelper<
|
2021-03-22 09:04:45 +01:00
|
|
|
DS4SpecialCreatureAbilityPreparedDataData,
|
|
|
|
"specialCreatureAbility"
|
|
|
|
>;
|
|
|
|
|
2021-03-22 10:18:43 +01:00
|
|
|
// templates
|
|
|
|
|
|
|
|
interface DS4ItemPreparedDataDataRollable {
|
|
|
|
rollable: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
//types
|
|
|
|
|
2021-03-22 09:04:45 +01:00
|
|
|
interface DS4WeaponPreparedDataData extends DS4WeaponDataData, DS4ItemPreparedDataDataRollable {}
|
|
|
|
|
|
|
|
interface DS4ArmorPreparedDataData extends DS4ArmorDataData, DS4ItemPreparedDataDataRollable {}
|
|
|
|
|
|
|
|
interface DS4ShieldPreparedDataData extends DS4ShieldDataData, DS4ItemPreparedDataDataRollable {}
|
|
|
|
|
2021-05-13 19:59:44 +02:00
|
|
|
interface DS4SpellPreparedDataData extends DS4SpellDataData, DS4ItemPreparedDataDataRollable {
|
|
|
|
price: number | null;
|
|
|
|
}
|
2021-03-22 09:04:45 +01:00
|
|
|
|
|
|
|
interface DS4EquipmentPreparedDataData extends DS4EquipmentDataData, DS4ItemPreparedDataDataRollable {}
|
|
|
|
|
|
|
|
interface DS4LootPreparedDataData extends DS4LootDataData, DS4ItemPreparedDataDataRollable {}
|
|
|
|
|
|
|
|
interface DS4TalentPreparedDataData extends DS4TalentDataData, DS4ItemPreparedDataDataRollable {
|
|
|
|
rank: DS4TalentPreparedRank;
|
|
|
|
}
|
|
|
|
|
2021-03-22 10:18:43 +01:00
|
|
|
interface DS4TalentPreparedRank extends DS4TalentRank, HasTotal<number> {}
|
2021-03-22 09:04:45 +01:00
|
|
|
|
|
|
|
interface DS4RacialAbilityPreparedDataData extends DS4RacialAbilityDataData, DS4ItemPreparedDataDataRollable {}
|
|
|
|
|
|
|
|
interface DS4LanguagePreparedDataData extends DS4LanguageDataData, DS4ItemPreparedDataDataRollable {}
|
|
|
|
|
|
|
|
interface DS4AlphabetPreparedDataData extends DS4AlphabetDataData, DS4ItemPreparedDataDataRollable {}
|
|
|
|
|
|
|
|
interface DS4SpecialCreatureAbilityPreparedDataData
|
|
|
|
extends DS4SpecialCreatureAbilityDataData,
|
|
|
|
DS4ItemPreparedDataDataRollable {}
|