feat: add Stats and StatModifiers types to shared

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-03-07 14:14:26 +00:00
parent 349f8ef286
commit 1351708c7b
+28
View File
@@ -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