fixed potions not working properly

need to test: vampire draining
This commit is contained in:
2024-07-15 10:35:28 -04:00
parent a97e30c8a7
commit 8e52309626
9 changed files with 12 additions and 10 deletions

View File

@ -110,7 +110,10 @@ long_result player_base::interpret_command(level *lvl, game_command cmd) {
if (cmd == game_command_terminate) {
return {result::terminate, ""};
} else if (cmd >= move_north && cmd <= move_southwest) {
return move(lvl, pos + MOVE[cmd - move_north]);
auto res = move(lvl, pos + MOVE[cmd - move_north]);
gold g = get_gold_at(pos, lvl->get_glist());
gold_cnt += g.amount;
return res;
} else if (cmd >= apply_north && cmd <= apply_southwest) {
return apply(get_potion_at(pos + MOVE[cmd - apply_north],
lvl->get_plist()));