feat: add Stats and StatModifiers types to shared
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,33 @@ export interface Needs {
|
||||
energy: number; // 0-100
|
||||
}
|
||||
|
||||
export interface Stats {
|
||||
// Physical
|
||||
strength: number;
|
||||
dexterity: number;
|
||||
constitution: number;
|
||||
intelligence: number;
|
||||
perception: number;
|
||||
// Personality
|
||||
sociability: number;
|
||||
courage: number;
|
||||
curiosity: number;
|
||||
empathy: number;
|
||||
temperament: number;
|
||||
}
|
||||
|
||||
export type StatName = keyof Stats;
|
||||
|
||||
export interface StatModifier {
|
||||
stat: StatName;
|
||||
value: number;
|
||||
remaining: number; // ticks remaining, -1 = permanent (needs-based, replaced each tick)
|
||||
}
|
||||
|
||||
export interface StatModifiers {
|
||||
modifiers: StatModifier[];
|
||||
}
|
||||
|
||||
export type MovementState = 'idle' | 'walking';
|
||||
export type GoalType = 'wander' | 'eat' | 'rest';
|
||||
|
||||
@@ -65,6 +92,7 @@ export interface EntityState {
|
||||
movement: Movement;
|
||||
appearance: Appearance;
|
||||
needs?: Needs;
|
||||
stats?: Stats;
|
||||
npcBrain?: NPCBrain;
|
||||
playerControlled?: PlayerControlled;
|
||||
name?: string; // NPC display name
|
||||
|
||||
Reference in New Issue
Block a user