]> jfr.im git - irc/gameservirc.git/blame - gameserv/player.h
Made significant advances in the do_identify function. A new function:
[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
85ce9d3e 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?
e3c5fe46 32 bool started; // True/False: has this player started? -Possibly deprecated
85ce9d3e 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
e3c5fe46 36 char *password; // Player's encrypted password
37
85ce9d3e 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
44struct monster_ {
45 char *name; // The monster's name
46 char *weapon; // A name for their weapon. Doesn't have to be in weapons[]
47 int strength; // Their strength
48 int gold; // The gold you get when you kill them
49 int exp; // The experience you get when you kill them
50 int hp; // Their remaining hitpoints
51 int maxhp; // Their max hitpoints
52 char *death; // What is said when they die
53};
54
55#endif