finished the bulk of game

This commit is contained in:
2024-07-14 21:32:41 -04:00
parent b3475b7530
commit af8bc4112c
110 changed files with 1876 additions and 1481 deletions

38
src/player.h Normal file
View 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