94 lines
1.3 KiB
C
94 lines
1.3 KiB
C
#ifndef ENTITY_H
|
|
# define ENTITY_H
|
|
|
|
#include <core.h>
|
|
|
|
typedef enum {
|
|
ACT_IDLE,
|
|
ACT_WORKING,
|
|
ACT_FIGHTING,
|
|
ACT_FLEEING,
|
|
ACT_UNCONSCIOUS,
|
|
ACT_DEAD,
|
|
} ACTIVITY_STATE;
|
|
|
|
typedef enum {
|
|
STATS_STRENGHT,
|
|
STATS_DEXTERITY,
|
|
STATS_WITHDOM,
|
|
STATS_INTELLIGENCE,
|
|
STATS_
|
|
} STATS_TYPE;
|
|
|
|
typedef enum {
|
|
LIMB_ARM,
|
|
LIMB_LEG,
|
|
LIMB_HAND,
|
|
LIMB_FOOT,
|
|
LIMB_HEAD,
|
|
LIMB_NECK,
|
|
} LIMB_TYPE;
|
|
|
|
typedef enum {
|
|
LIMB_DAMAGED,
|
|
LIMB_PARALIZED,
|
|
LIMB_CUT,
|
|
LIMB_MISSING,
|
|
LIMB_SEVERE,
|
|
LIMB_INTACT,
|
|
LIMB_OK,
|
|
LIMB_INVINCIBLE,
|
|
} LIMB_STATE;
|
|
|
|
typedef enum {
|
|
ENTITY_DEAD,
|
|
ENTITY_ALIVE,
|
|
ENTITY_UNCONCIOUS,
|
|
} ENTITY_STATE;
|
|
|
|
typedef struct {
|
|
int strenght;
|
|
int agility;
|
|
int toughness;
|
|
int proprioception;
|
|
int earing;
|
|
int touch;
|
|
int eyesight;
|
|
} BodyStats;
|
|
|
|
typedef struct {
|
|
int intellect;
|
|
int fortitude;
|
|
int charisma;
|
|
int eloquence;
|
|
int perception;
|
|
} MentalStats;
|
|
|
|
typedef struct {
|
|
LIMB_TYPE type;
|
|
LIMB_STATE state;
|
|
} Limb;
|
|
|
|
typedef struct {
|
|
Limb limbs[10];
|
|
BodyStats body_stats;
|
|
MentalStats mental_stats;
|
|
int mass;
|
|
Vector3 pos;
|
|
Vector3 velocity;
|
|
int health;
|
|
} Body;
|
|
|
|
typedef struct {
|
|
Body body;
|
|
int faction;
|
|
ENTITY_STATE state;//can be multiple flag
|
|
} Entity;
|
|
|
|
typedef struct {
|
|
Entity entity;
|
|
void (*ai)(void);
|
|
} Mob;
|
|
|
|
#endif
|