|
@ -3,9 +3,13 @@ |
|
|
|
|
|
|
|
|
typedef struct { |
|
|
typedef struct { |
|
|
int strength,dexterity,intelligence,healthPoints,manaPoints,level,exp,maxExp; |
|
|
int strength,dexterity,intelligence,healthPoints,manaPoints,level,exp,maxExp; |
|
|
int attack,armor,maxHealthPoints,gold; |
|
|
|
|
|
|
|
|
int attack,armor,maxHealthPoints,gold,items[10]; |
|
|
char name [50]; |
|
|
char name [50]; |
|
|
} Character; |
|
|
} Character; |
|
|
|
|
|
typedef struct { |
|
|
|
|
|
int attack,durability; |
|
|
|
|
|
char name [50]; |
|
|
|
|
|
} Weapon; |
|
|
|
|
|
|
|
|
enum { |
|
|
enum { |
|
|
STRENGTH = 1, DEXTERITY = 2, INTELLIGENCE = 3, HEALTHPOINTS = 4, MANAPOINTS = 5, LEVEL = 6, EXP = 7, MAXEXP = 8 |
|
|
STRENGTH = 1, DEXTERITY = 2, INTELLIGENCE = 3, HEALTHPOINTS = 4, MANAPOINTS = 5, LEVEL = 6, EXP = 7, MAXEXP = 8 |
|
@ -65,4 +69,12 @@ void setCharacterName (Character *character, char newName[]); |
|
|
|
|
|
|
|
|
char* getCharacterName (Character *character); |
|
|
char* getCharacterName (Character *character); |
|
|
|
|
|
|
|
|
|
|
|
int getWaponAttack (Weapon *weapon); |
|
|
|
|
|
|
|
|
|
|
|
void setWeaponAttack (Weapon *weapon, int newAttack); |
|
|
|
|
|
|
|
|
|
|
|
int getWeaponDurability (Weapon *weapon); |
|
|
|
|
|
|
|
|
|
|
|
int setWeaponDurability (Weapon *weapon, int newDurability); |
|
|
|
|
|
|
|
|
#endif |
|
|
#endif |