finished the bulk of game
This commit is contained in:
38
src/player.h
Normal file
38
src/player.h
Normal file
@ -0,0 +1,38 @@
|
||||
#ifndef __PLAYER_H__
|
||||
#define __PLAYER_H__
|
||||
|
||||
#include "characters.h"
|
||||
|
||||
enum game_command : int;
|
||||
|
||||
class player_base: public character {
|
||||
protected:
|
||||
int gold_cnt;
|
||||
potion_list potions;
|
||||
public:
|
||||
player_base(RNG *rng, const feature enabled_features,
|
||||
const enum race &nrace);
|
||||
virtual long_result move(level *lvl,
|
||||
const position &p) override;
|
||||
|
||||
virtual long_result apply(potion *p);
|
||||
|
||||
virtual long_result attack(character *ch) override;
|
||||
virtual long_result get_hit(character *ch, const int tATK,
|
||||
const fraction &hit_rate) override;
|
||||
|
||||
virtual void add_gold(int amount);
|
||||
|
||||
void print(display *out) override;
|
||||
|
||||
std::string get_abbrev() const override;
|
||||
|
||||
long_result interpret_command(level *lvl, game_command cmd);
|
||||
|
||||
int get_gold() const;
|
||||
int get_ATK() const;
|
||||
int get_DEF() const;
|
||||
int get_HP() const;
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user