]> jfr.im git - irc/gameservirc.git/blame - gameserv/player.h
Working on doing the identify/register scheme. Right now, there are problems with...
[irc/gameservirc.git] / gameserv / player.h
CommitLineData
85ce9d3e 1#ifndef PLAYER_H
2#define PLAYER_H
3
4#include <string.h>
5#include <iostream.h>
6#include "aClient.h"
7
8typedef struct monster_ Monster;
9
10class aClient; // forward declaration
11
12class Player {
13public:
14 Player(aClient *user = NULL);
15 Player(char *);
16 ~Player();
17 void setData(Player *);
e3c5fe46 18 void reset();
85ce9d3e 19
20 const Player &operator=(const Player &);
21 char *name; // Player's Name
22 int level; // Player's level (1-12)
23 long int exp; // Player's experience
24 long int gold; // Gold on hand
25 long int bank; // Gold in the bank
26 int hp; // Current Hit Points (health)
27 int maxhp; // Maximum Hit Points
28 int strength; // Player's Strength
29 int defense; // Player's defensive strength
30 int armor; // Number for the player's armor
31 int weapon; // Number for the player's weapon
32 bool alive; // True/False: is the player alive?
e3c5fe46 33 bool started; // True/False: has this player started? -Possibly deprecated
85ce9d3e 34 bool yourturn; // True/False: is it your turn in battle?
35 int forest_fights; // Amount of forest fights left today
36 int player_fights; // Amount of player<->player fights for today
e3c5fe46 37 char *password; // Player's encrypted password
38
85ce9d3e 39 aClient *user; // Pointer to the aClient this player is from
40 Monster *fight; // Pointer to the monster the player is currently fighting
41 Monster *master; // Pointer to the master the player is currently fighting
42 aClient *battle; // Pointer to the player this player is currently fighting
43};
44
45struct monster_ {
46 char *name; // The monster's name
47 char *weapon; // A name for their weapon. Doesn't have to be in weapons[]
48 int strength; // Their strength
49 int gold; // The gold you get when you kill them
50 int exp; // The experience you get when you kill them
51 int hp; // Their remaining hitpoints
52 int maxhp; // Their max hitpoints
53 char *death; // What is said when they die
54};
55
56#endif