removed character::move

This commit is contained in:
2024-07-15 16:54:19 -04:00
parent fb026e36a8
commit e29b26303d
3 changed files with 1 additions and 15 deletions

View File

@ -75,17 +75,6 @@ void character::discard_level_effects() {
std::swap(tmp, effects); std::swap(tmp, effects);
} }
// IMPORTANT: remember to check if player is on the stairs
long_result character::move(level *lvl,
const position &p) {
if (lvl->is_available(p)) {
pos = p;
return {result::moved, ""};
}
return {result::fine, ""};
}
int calc_dmg(const int ATK, const int DEF) { int calc_dmg(const int ATK, const int DEF) {
return ceil((100.0f / (100.0f + DEF)) * ATK); return ceil((100.0f / (100.0f + DEF)) * ATK);
} }

View File

@ -22,8 +22,6 @@ public:
character(RNG *rng, const feature enabled_features, character(RNG *rng, const feature enabled_features,
const race &nrace, const position &pos); // fills out the starting stats const race &nrace, const position &pos); // fills out the starting stats
virtual long_result move(level *lvl, const position &p);
virtual long_result attack(character *ch) = 0; virtual long_result attack(character *ch) = 0;
virtual long_result get_hit(character *ch, const int tATK, virtual long_result get_hit(character *ch, const int tATK,
const fraction &hit_rate) = 0; const fraction &hit_rate) = 0;

View File

@ -12,8 +12,7 @@ protected:
public: public:
player_base(RNG *rng, const feature enabled_features, player_base(RNG *rng, const feature enabled_features,
const enum race &nrace); const enum race &nrace);
virtual long_result move(level *lvl, virtual long_result move(level *lvl, const position &p);
const position &p) override;
virtual long_result apply(potion *p); virtual long_result apply(potion *p);