corrected colors
This commit is contained in:
@ -13,9 +13,9 @@ void character::start_turn() {
|
|||||||
base_hit_rate = {1, 1};
|
base_hit_rate = {1, 1};
|
||||||
}
|
}
|
||||||
|
|
||||||
void character::print(display *out, bool color, bool player) {
|
void character::print(display *out, bool player) {
|
||||||
out->print_char(pos, player ? '@' : CHARACTER_REP[race],
|
out->print_char(pos, player ? '@' : CHARACTER_REP[race],
|
||||||
COLOR_PAIR(COLOR_BLACK_ON_WHITE));
|
player ? COLOR_PAIR(COLOR_BLUE) : COLOR_PAIR(COLOR_RED));
|
||||||
}
|
}
|
||||||
|
|
||||||
enum race character::get_race() const {
|
enum race character::get_race() const {
|
||||||
|
@ -40,7 +40,7 @@ public:
|
|||||||
const fraction hitrate) = 0;
|
const fraction hitrate) = 0;
|
||||||
|
|
||||||
// overload for different races
|
// overload for different races
|
||||||
virtual void print(display *out, bool color = false, bool player = false);
|
virtual void print(display *out, bool player = false);
|
||||||
|
|
||||||
result apply_effects();
|
result apply_effects();
|
||||||
void discard_level_effects();
|
void discard_level_effects();
|
||||||
|
@ -18,7 +18,6 @@ private:
|
|||||||
logger *log;
|
logger *log;
|
||||||
RNG *rng;
|
RNG *rng;
|
||||||
|
|
||||||
// IMPORTANT: during player generation,
|
|
||||||
std::unique_ptr<character> player;
|
std::unique_ptr<character> player;
|
||||||
public:
|
public:
|
||||||
game(const feature enabled_features,
|
game(const feature enabled_features,
|
||||||
@ -28,7 +27,6 @@ public:
|
|||||||
RNG *new_rng);
|
RNG *new_rng);
|
||||||
game_status run();
|
game_status run();
|
||||||
private:
|
private:
|
||||||
int getcmd() const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -96,11 +96,6 @@ private:
|
|||||||
room &room2);
|
room &room2);
|
||||||
bool overlap_y(room &room1,
|
bool overlap_y(room &room1,
|
||||||
room &room2);
|
room &room2);
|
||||||
// has anything between the two
|
|
||||||
bool between_x(room &room1,
|
|
||||||
room &room2);
|
|
||||||
bool between_y(room &room1,
|
|
||||||
room &room2);
|
|
||||||
|
|
||||||
void jitter(RNG *rng, std::vector<room> &rooms);
|
void jitter(RNG *rng, std::vector<room> &rooms);
|
||||||
|
|
||||||
|
@ -41,6 +41,6 @@ potion &potion::operator=(potion &&p) {
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
void potion::print(display *out, bool color) {
|
void potion::print(display *out) {
|
||||||
out->print_char(pos, 'P');
|
out->print_char(pos, 'P', COLOR_PAIR(COLOR_GREEN));
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ public:
|
|||||||
position get_pos() const;
|
position get_pos() const;
|
||||||
void set_pos(const position &npos);
|
void set_pos(const position &npos);
|
||||||
|
|
||||||
virtual void print(display *out, bool color = false);
|
virtual void print(display *out);
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::vector<potion *> potion_list;
|
typedef std::vector<potion *> potion_list;
|
||||||
|
@ -2,9 +2,8 @@
|
|||||||
#define __VAMPIRE_H__
|
#define __VAMPIRE_H__
|
||||||
#include "characters.h"
|
#include "characters.h"
|
||||||
|
|
||||||
const int GAIN_HP = 5;
|
|
||||||
|
|
||||||
class vampire final: public character {
|
class vampire final: public character {
|
||||||
|
static const int GAIN_HP = 5;
|
||||||
public:
|
public:
|
||||||
vampire(RNG *rng, const position &pos);
|
vampire(RNG *rng, const position &pos);
|
||||||
virtual result attack(const direction dir,
|
virtual result attack(const direction dir,
|
||||||
|
Reference in New Issue
Block a user