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