92 lines
2.1 KiB
TypeScript
92 lines
2.1 KiB
TypeScript
export interface DS4ActorDataType {
|
|
attributes: DS4ActorDataAttributes;
|
|
traits: DS4ActorDataTraits;
|
|
combatValues: DS4ActorDataCombatValues;
|
|
baseInfo: DS4ActorDataBaseInfo;
|
|
progression: DS4ActorDataProgression;
|
|
language: DS4ActorDataLanguage;
|
|
profile: DS4ActorDataProfile;
|
|
currency: DS4ActorDataCurrency;
|
|
}
|
|
|
|
interface DS4ActorDataAttributes {
|
|
body: BodyAttribute;
|
|
mobility: ModifiableData<number>;
|
|
mind: ModifiableData<number>;
|
|
}
|
|
|
|
export interface ModifiableData<T> {
|
|
base: T;
|
|
mod: T;
|
|
total?: T;
|
|
}
|
|
|
|
interface UsableResource<T> {
|
|
total: T;
|
|
used: T;
|
|
}
|
|
|
|
interface ResourceData<T> extends ModifiableData<T> {
|
|
value: T;
|
|
max?: T;
|
|
}
|
|
|
|
// Blueprint in case we need more detailed differentiation
|
|
type BodyAttribute = ModifiableData<number>;
|
|
|
|
interface DS4ActorDataTraits {
|
|
strength: ModifiableData<number>;
|
|
constitution: ModifiableData<number>;
|
|
agility: ModifiableData<number>;
|
|
dexterity: ModifiableData<number>;
|
|
intellect: ModifiableData<number>;
|
|
aura: ModifiableData<number>;
|
|
}
|
|
|
|
interface DS4ActorDataCombatValues {
|
|
hitPoints: ResourceData<number>;
|
|
defense: ModifiableData<number>;
|
|
initiative: ModifiableData<number>;
|
|
movement: ModifiableData<number>;
|
|
meleeAttack: ModifiableData<number>;
|
|
rangedAttack: ModifiableData<number>;
|
|
spellcasting: ModifiableData<number>;
|
|
targetedSpellcasting: ModifiableData<number>;
|
|
}
|
|
|
|
interface DS4ActorDataBaseInfo {
|
|
race: string;
|
|
class: string;
|
|
heroClass: string;
|
|
culture: string;
|
|
}
|
|
|
|
interface DS4ActorDataProgression {
|
|
level: number;
|
|
experiencePoints: number;
|
|
talentPoints: UsableResource<number>;
|
|
progressPoints: UsableResource<number>;
|
|
}
|
|
|
|
interface DS4ActorDataLanguage {
|
|
languages: string;
|
|
alphabets: string;
|
|
}
|
|
|
|
interface DS4ActorDataProfile {
|
|
gender: string;
|
|
birthday: string;
|
|
birthplace: string;
|
|
age: number;
|
|
height: number;
|
|
hairColor: string;
|
|
weight: number;
|
|
eyeColor: string;
|
|
specialCharacteristics: string;
|
|
}
|
|
|
|
interface DS4ActorDataCurrency {
|
|
gold: number;
|
|
silver: number;
|
|
copper: number;
|
|
}
|