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

99 lines
2.6 KiB
TypeScript
Raw Normal View History

import { ModifiableData, ResourceData, UsableResource } from "../common/common-data";
export type DS4ActorDataType = DS4ActorDataCharacter | DS4ActorDataCreature;
interface DS4ActorDataBase {
attributes: DS4ActorDataAttributes;
traits: DS4ActorDataTraits;
combatValues: DS4ActorDataCombatValues;
2020-12-28 15:51:00 +01:00
}
interface DS4ActorDataAttributes {
body: ModifiableData<number>;
mobility: ModifiableData<number>;
mind: ModifiableData<number>;
2020-12-28 15:51:00 +01:00
}
interface DS4ActorDataTraits {
strength: ModifiableData<number>;
constitution: ModifiableData<number>;
agility: ModifiableData<number>;
dexterity: ModifiableData<number>;
intellect: ModifiableData<number>;
aura: ModifiableData<number>;
}
interface DS4ActorDataCombatValues {
2021-01-07 12:47:38 +01:00
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;
2021-01-03 20:37:30 +01:00
culture: string;
}
interface DS4ActorDataCharacterProgression {
level: number;
experiencePoints: number;
2020-12-30 21:34:12 +01:00
talentPoints: UsableResource<number>;
progressPoints: UsableResource<number>;
2020-12-28 15:51:00 +01:00
}
2021-01-03 20:37:30 +01:00
interface DS4ActorDataCharacterLanguage {
2021-01-03 20:37:30 +01:00
languages: string;
alphabets: string;
}
interface DS4ActorDataCharacterProfile {
2021-01-10 02:05:30 +01:00
biography: string;
2021-01-03 20:37:30 +01:00
gender: string;
birthday: string;
birthplace: string;
age: number;
height: number;
hairColor: string;
weight: number;
eyeColor: string;
specialCharacteristics: string;
}
2021-01-10 19:32:10 +01:00
interface DS4ActorDataCharacterCurrency {
2021-01-10 19:32:10 +01:00
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;
2021-01-10 02:05:30 +01:00
description: string;
}