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