import { ModifiableData, ModifiableDataBase, ResourceData, UsableResource } from "../common/common-data"; import { DS4 } from "../config"; import { DS4ItemData } from "../item/item-data"; export type DS4ActorData = DS4CharacterData | DS4CreatureData; type ActorType = keyof typeof DS4.i18n.actorTypes; export interface DS4ActorDataHelper extends Actor.Data { type: U; } type DS4CharacterData = DS4ActorDataHelper; type DS4CreatureData = DS4ActorDataHelper; // templates interface DS4ActorDataDataBase { attributes: DS4ActorDataDataAttributes; traits: DS4ActorDataDataTraits; combatValues: DS4ActorDataDataCombatValues; } interface DS4ActorDataDataAttributes { body: ModifiableDataBase; mobility: ModifiableDataBase; mind: ModifiableDataBase; } interface DS4ActorDataDataTraits { strength: ModifiableDataBase; constitution: ModifiableDataBase; agility: ModifiableDataBase; dexterity: ModifiableDataBase; intellect: ModifiableDataBase; aura: ModifiableDataBase; } interface DS4ActorDataDataCombatValues { hitPoints: ResourceData; defense: ModifiableData; initiative: ModifiableData; movement: ModifiableData; meleeAttack: ModifiableData; rangedAttack: ModifiableData; spellcasting: ModifiableData; targetedSpellcasting: ModifiableData; } // types interface DS4CharacterDataData extends DS4ActorDataDataBase { baseInfo: DS4CharacterDataDataBaseInfo; progression: DS4CharacterDataDataProgression; language: DS4CharacterDataDataLanguage; profile: DS4CharacterDataDataProfile; currency: DS4CharacterDataDataCurrency; slayerPoints: DS4CharacterDataDataSlayerPoints; } export interface DS4CharacterDataDataBaseInfo { race: string; class: string; heroClass: string; culture: string; } export interface DS4CharacterDataDataProgression { level: number; experiencePoints: number; talentPoints: UsableResource; progressPoints: UsableResource; } export interface DS4CharacterDataDataLanguage { languages: string; alphabets: string; } export interface DS4CharacterDataDataProfile { biography: string; gender: string; birthday: string; birthplace: string; age: number; height: number; hairColor: string; weight: number; eyeColor: string; specialCharacteristics: string; } export interface DS4CharacterDataDataCurrency { gold: number; silver: number; copper: number; } export interface DS4CharacterDataDataSlayerPoints { value: number; } interface DS4CreatureDataData extends DS4ActorDataDataBase { baseInfo: DS4CreatureDataDataBaseInfo; } export interface DS4CreatureDataDataBaseInfo { loot: string; foeFactor: number; creatureType: CreatureType; sizeCategory: SizeCategory; experiencePoints: number; description: string; } type CreatureType = "animal" | "construct" | "humanoid" | "magicalEntity" | "plantBeing" | "undead"; type SizeCategory = "tiny" | "small" | "normal" | "large" | "huge" | "colossal";