#define PLAYER_H
#include <string>
-#include "aClient.h"
-#include "pouch.h"
using namespace std;
class aClient; // forward declaration
+class item; // forward declaration
+class weapon; // forward declaration
+class armor; // forward declaration
+class potion; // forward declaration
+class pouch; // forward declaration
+
class Player {
public:
Player();
- Player(aClient *);
Player(char *);
Player(string);
~Player();
void setData(Player *);
+ void setPassword(const char *p);
void reset();
long int getFlags() { return flags; }; // Returns the Client's current flags
long int remFlag(long int); // Removes a flag from the client's current flags
+ item *getWeapon() { return w; };
+ item *getArmor() { return a; };
+
+ void setWeapon (item &); // Set a player's weapon to some item
+ void setArmor (item &); // Set a player's weapon to some item
+
string name; // Player's Name
int level; // Player's level (1-12)
long int exp; // Player's experience
int maxhp; // Maximum Hit Points
int strength; // Player's Strength
int defense; // Player's defensive strength
- int armor; // Number for the player's armor
- int weapon; // Number for the player's weapon
int forest_fights; // Amount of forest fights left today
int player_fights; // Amount of player<->player fights for today
string password; // Player's encrypted password
- Pouch inventory; // This contains their potions, etc.
+ pouch *inventory; // This contains everything you're holding
long int lastcommand; // timestamp for the last command typed
long int lastlogin; // timestamp for the last login
private:
long int flags; // Player's current flags
+ item *w; // Player's weapon
+ item *a; // Player's armor
};
struct monster_ {
monster_(monster_ *);
monster_(monster_ &);
~monster_();
- string name; // The monster's name
- string weapon; // A name for their weapon. Doesn't have to be in weapons[]
- int strength; // Their strength
- int gold; // The gold you get when you kill them
- int exp; // The experience you get when you kill them
- int hp; // Their remaining hitpoints
- int maxhp; // Their max hitpoints
- string death; // What is said when they die
+ string name; // The monster's name
+ string weapon; // A name for their weapon. Doesn't have to be in weapons[]
+ int strength; // Their strength
+ int gold; // The gold you get when you kill them
+ int exp; // The experience you get when you kill them
+ int hp; // Their remaining hitpoints
+ int maxhp; // Their max hitpoints
+ int defense; // Only used seldomly
+ string death; // What is said when they die
};
#endif