Emilia(SleepeeSoftware) 44f0399239 k2
2026-02-21 20:45:44 +01:00

133 lines
2.3 KiB
C

#ifndef ENTITY_H
# define ENTITY_H
#include <core.h>
#include <item.h>
#include <skill.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 {
int mass;
int health;
Vector3 pos;
Vector3 velocity;
Limb limbs[10];
BodyStats body_stats;
MentalStats mental_stats;
} Body;
typedef struct {
Body body;
int faction;
ENTITY_STATE state;//can be multiple flag
} Entity;
typedef struct {
char gender;//m/n/f
int prefix;
int suffix;
char *name;//player/zombie/etcetc
char *nickname;//can be changed, what npc refers to when talking to you, also npc do not know you until you interact with them
} Identity;
typedef struct {
Entity *entity;
Identity *identity;
void (*ai)(void);
} Mob;
//player can level up trhough action his physics attribute
//but need other source to level up skill
//and for his mental attribute, either on character creation, or maybe through a experience tree with point given through acomplishement
typedef enum {
ACTION_FORWARD,
ACTION_BACKWARD,
ACTION_LEFT,
ACTION_RIGHT,
ACTION_PRIMARY,
ACTION_SECONDARY,
ACTION_USE,
ACTION_GRAB,
ACTION_JUMP,
ACTION_DASH,
ACTION_SKILL1,
ACTION_TOOLBAR1,
} PLAYER_ACTION;
typedef struct {
Entity entity;
Identity identity;
Skill skills[10];
Inventory inventory;
} Player;
//give more enphasis on the character than the item used (~60% ,~30%)
#endif