diff --git a/src/enemies.cc b/src/enemies.cc index a6b3d75..1665f1a 100644 --- a/src/enemies.cc +++ b/src/enemies.cc @@ -79,6 +79,10 @@ void new_enemy(RNG *rng, std::unique_ptr &p, p = make_unique(rng, enabled_features, pos, which_room); break; + case rhalfling: + p = make_unique(rng, enabled_features, pos, which_room); + break; + default: break; } diff --git a/src/input/file_input.cc b/src/input/file_input.cc index 2e6bb0c..a694637 100644 --- a/src/input/file_input.cc +++ b/src/input/file_input.cc @@ -31,7 +31,7 @@ game_command file_input::get_command() { return (game_command)((tmp = get_direction(cmd)) == game_command_panic - ? tmp : tmp - move_north + + ? tmp : tmp + (use ? apply_north : attack_north)); } else if (cmd == "yes") { return game_command::enter; diff --git a/src/player.cc b/src/player.cc index f94b32d..f09a12b 100644 --- a/src/player.cc +++ b/src/player.cc @@ -122,7 +122,7 @@ long_result player_base::interpret_command(level *lvl, game_command cmd) { lvl->get_elist()); auto res = attack((character *)tmp); - if (tmp->is_dead()) + if (tmp != nullptr && tmp->is_dead()) tmp->dies(lvl, this); return res;