import { ModifiableData, 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; interface DS4ActorDataHelper extends Actor.Data { type: U; } type DS4CharacterData = DS4ActorDataHelper; type DS4CreatureData = DS4ActorDataHelper; interface DS4ActorDataDataBase { attributes: DS4ActorDataDataAttributes; traits: DS4ActorDataDataTraits; combatValues: DS4ActorDataDataCombatValues; } interface DS4ActorDataDataAttributes { body: ModifiableData; mobility: ModifiableData; mind: ModifiableData; } interface DS4ActorDataDataTraits { strength: ModifiableData; constitution: ModifiableData; agility: ModifiableData; dexterity: ModifiableData; intellect: ModifiableData; aura: ModifiableData; } interface DS4ActorDataDataCombatValues { hitPoints: ResourceData; defense: ModifiableData; initiative: ModifiableData; movement: ModifiableData; meleeAttack: ModifiableData; rangedAttack: ModifiableData; spellcasting: ModifiableData; targetedSpellcasting: ModifiableData; } interface DS4CharacterDataData extends DS4ActorDataDataBase { baseInfo: DS4CharacterDataDataBaseInfo; progression: DS4CharacterDataDataProgression; language: DS4CharacterDataDataLanguage; profile: DS4CharacterDataDataProfile; currency: DS4CharacterDataDataCurrency; } interface DS4CharacterDataDataBaseInfo { race: string; class: string; heroClass: string; culture: string; } interface DS4CharacterDataDataProgression { level: number; experiencePoints: number; talentPoints: UsableResource; progressPoints: UsableResource; } interface DS4CharacterDataDataLanguage { languages: string; alphabets: string; } interface DS4CharacterDataDataProfile { biography: string; gender: string; birthday: string; birthplace: string; age: number; height: number; hairColor: string; weight: number; eyeColor: string; specialCharacteristics: string; } interface DS4CharacterDataDataCurrency { gold: number; silver: number; copper: number; } interface DS4CreatureDataData extends DS4ActorDataDataBase { baseInfo: DS4CreatureDataDataBaseInfo; } type CreatureType = "animal" | "construct" | "humanoid" | "magicalEntity" | "plantBeing" | "undead"; type SizeCategory = "tiny" | "small" | "normal" | "large" | "huge" | "colossal"; interface DS4CreatureDataDataBaseInfo { loot: string; foeFactor: number; creatureType: CreatureType; sizeCategory: SizeCategory; experiencePoints: number; description: string; }