ds4/src/module/actor/actor-data.ts

98 lines
2.6 KiB
TypeScript

import { ModifiableData, ResourceData, UsableResource } from "../common/common-data";
export type DS4ActorDataType = DS4ActorDataCharacter | DS4ActorDataCreature;
interface DS4ActorDataBase {
attributes: DS4ActorDataAttributes;
traits: DS4ActorDataTraits;
combatValues: DS4ActorDataCombatValues;
}
interface DS4ActorDataAttributes {
body: ModifiableData<number>;
mobility: ModifiableData<number>;
mind: 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 DS4ActorDataCharacter extends DS4ActorDataBase {
baseInfo: DS4ActorDataCharacterBaseInfo;
progression: DS4ActorDataCharacterProgression;
language: DS4ActorDataCharacterLanguage;
profile: DS4ActorDataCharacterProfile;
currency: DS4ActorDataCharacterCurrency;
}
interface DS4ActorDataCharacterBaseInfo {
race: string;
class: string;
heroClass: string;
culture: string;
}
interface DS4ActorDataCharacterProgression {
level: number;
experiencePoints: number;
talentPoints: UsableResource<number>;
progressPoints: UsableResource<number>;
}
interface DS4ActorDataCharacterLanguage {
languages: string;
alphabets: string;
}
interface DS4ActorDataCharacterProfile {
biography: string;
gender: string;
birthday: string;
birthplace: string;
age: number;
height: number;
hairColor: string;
weight: number;
eyeColor: string;
specialCharacteristics: string;
}
interface DS4ActorDataCharacterCurrency {
gold: number;
silver: number;
copper: number;
}
interface DS4ActorDataCreature extends DS4ActorDataBase {
baseInfo: DS4ActorDataCreatureBaseInfo;
}
type CreatureType = "animal" | "construct" | "humanoid" | "magicalEntity" | "plantBeing" | "undead";
type SizeCategory = "tiny" | "small" | "normal" | "large" | "huge" | "colossal";
interface DS4ActorDataCreatureBaseInfo {
loot: string;
foeFactor: number;
creatureType: CreatureType;
sizeCategory: SizeCategory;
experiencePoints: number;
description: string;
}