]>
Commit | Line | Data |
---|---|---|
85ce9d3e | 1 | #ifndef PLAYER_H |
2 | #define PLAYER_H | |
3 | ||
4 | #include <string.h> | |
85ce9d3e | 5 | #include "aClient.h" |
3662210f | 6 | #include "pouch.h" |
85ce9d3e | 7 | |
c8ada07e | 8 | typedef struct monster_ Monster; |
9d057db5 | 9 | |
85ce9d3e | 10 | class aClient; // forward declaration |
11 | ||
12 | class Player { | |
13 | public: | |
14 | Player(aClient *user = NULL); | |
15 | Player(char *); | |
16 | ~Player(); | |
17 | void setData(Player *); | |
e3c5fe46 | 18 | void reset(); |
85ce9d3e | 19 | |
1af35752 | 20 | long int getFlags() { return flags; }; // Returns the Client's current flags |
21 | // Functions also return the flags after modifying them | |
22 | long int setFlags(long int); // Sets the clients flags to a new value | |
23 | long int addFlag(long int); // Adds a flag to the client's flags | |
24 | long int remFlag(long int); // Removes a flag from the client's current flags | |
25 | ||
26 | ||
85ce9d3e | 27 | char *name; // Player's Name |
28 | int level; // Player's level (1-12) | |
29 | long int exp; // Player's experience | |
30 | long int gold; // Gold on hand | |
31 | long int bank; // Gold in the bank | |
32 | int hp; // Current Hit Points (health) | |
33 | int maxhp; // Maximum Hit Points | |
34 | int strength; // Player's Strength | |
35 | int defense; // Player's defensive strength | |
36 | int armor; // Number for the player's armor | |
37 | int weapon; // Number for the player's weapon | |
85ce9d3e | 38 | int forest_fights; // Amount of forest fights left today |
39 | int player_fights; // Amount of player<->player fights for today | |
e3c5fe46 | 40 | char *password; // Player's encrypted password |
3662210f | 41 | Pouch inventory; // This contains their potions, etc. |
e3c5fe46 | 42 | |
85ce9d3e | 43 | aClient *user; // Pointer to the aClient this player is from |
44 | Monster *fight; // Pointer to the monster the player is currently fighting | |
45 | Monster *master; // Pointer to the master the player is currently fighting | |
46 | aClient *battle; // Pointer to the player this player is currently fighting | |
3662210f | 47 | |
1af35752 | 48 | private: |
49 | long int flags; // Player's current flags | |
85ce9d3e | 50 | }; |
51 | ||
52 | struct monster_ { | |
c8ada07e | 53 | monster_(); |
54 | monster_(monster_ *); | |
55 | ~monster_(); | |
85ce9d3e | 56 | char *name; // The monster's name |
57 | char *weapon; // A name for their weapon. Doesn't have to be in weapons[] | |
58 | int strength; // Their strength | |
59 | int gold; // The gold you get when you kill them | |
60 | int exp; // The experience you get when you kill them | |
61 | int hp; // Their remaining hitpoints | |
62 | int maxhp; // Their max hitpoints | |
63 | char *death; // What is said when they die | |
64 | }; | |
65 | ||
66 | #endif |