k2
This commit is contained in:
parent
f6f5333007
commit
44f0399239
@ -54,7 +54,6 @@ typedef struct {
|
|||||||
//army
|
//army
|
||||||
//team
|
//team
|
||||||
|
|
||||||
|
|
||||||
//typedef struct {
|
//typedef struct {
|
||||||
// EVENT_TYPE trigger;
|
// EVENT_TYPE trigger;
|
||||||
// ACTIVITY_STATE required_state;
|
// ACTIVITY_STATE required_state;
|
||||||
|
|||||||
@ -2,6 +2,8 @@
|
|||||||
# define ENTITY_H
|
# define ENTITY_H
|
||||||
|
|
||||||
#include <core.h>
|
#include <core.h>
|
||||||
|
#include <item.h>
|
||||||
|
#include <skill.h>
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
ACT_IDLE,
|
ACT_IDLE,
|
||||||
@ -70,13 +72,13 @@ typedef struct {
|
|||||||
} Limb;
|
} Limb;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
int mass;
|
||||||
|
int health;
|
||||||
|
Vector3 pos;
|
||||||
|
Vector3 velocity;
|
||||||
Limb limbs[10];
|
Limb limbs[10];
|
||||||
BodyStats body_stats;
|
BodyStats body_stats;
|
||||||
MentalStats mental_stats;
|
MentalStats mental_stats;
|
||||||
int mass;
|
|
||||||
Vector3 pos;
|
|
||||||
Vector3 velocity;
|
|
||||||
int health;
|
|
||||||
} Body;
|
} Body;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -86,8 +88,45 @@ typedef struct {
|
|||||||
} Entity;
|
} Entity;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
Entity entity;
|
char gender;//m/n/f
|
||||||
void (*ai)(void);
|
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;
|
} 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
|
#endif
|
||||||
|
|||||||
@ -10,10 +10,23 @@ typedef enum {
|
|||||||
ITEM_QUEST,
|
ITEM_QUEST,
|
||||||
} ITEM_FLAGS;
|
} ITEM_FLAGS;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
TRANSLOCATOR,
|
||||||
|
} ITEM_LIST;
|
||||||
|
|
||||||
|
#define ITEM_NUMBER 1
|
||||||
|
|
||||||
|
const char *ITEM_NAME[ITEM_NUMBER] = {
|
||||||
|
"Translocator",
|
||||||
|
};
|
||||||
|
|
||||||
|
const char *ITEM_DESC[ITEM_NUMBER] = {
|
||||||
|
"Used to access the void network",
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
ITEM_LIST id;
|
||||||
int number;
|
int number;
|
||||||
int description;//ref to item description table
|
|
||||||
int name;//ref to item name table
|
|
||||||
int rarity;
|
int rarity;
|
||||||
int flags;
|
int flags;
|
||||||
int stack;
|
int stack;
|
||||||
@ -31,5 +44,9 @@ typedef struct {
|
|||||||
Item storage[100];
|
Item storage[100];
|
||||||
} Inventory;
|
} Inventory;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
int *loot;
|
||||||
|
int *proba;
|
||||||
|
} LootTable;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -1,38 +1,6 @@
|
|||||||
#ifndef PLAYER_H
|
#ifndef PLAYER_H
|
||||||
# define PLAYER_H
|
# define PLAYER_H
|
||||||
|
|
||||||
#include <core.h>
|
|
||||||
#include <item.h>
|
|
||||||
#include <entity.h>
|
#include <entity.h>
|
||||||
#include <skill.h>
|
|
||||||
|
|
||||||
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 {
|
|
||||||
char *name;
|
|
||||||
char *gender;
|
|
||||||
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;
|
|
||||||
Skill skills[10];
|
|
||||||
Inventory inventory;
|
|
||||||
} Player;
|
|
||||||
//give more enphasis on the character than the item used (~60% ,~30%)
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user