#include "system/item-entity.h"
#include "system/monster-entity.h"
#include "system/player-type-definition.h"
+#include "system/redrawing-flags-updater.h"
#include "target/target-getter.h"
#include "timed-effect/player-acceleration.h"
#include "timed-effect/player-cut.h"
msg_print(nullptr);
player_ptr->energy_need -= 1000 + (100 + player_ptr->csp - 50) * TURNS_PER_TICK / 10;
+ auto &rfu = RedrawingFlagsUpdater::get_instance();
player_ptr->redraw |= (PR_MAP);
- player_ptr->update |= (PU_MONSTER_STATUSES);
+ rfu.set_flag(StatusRedrawingFlag::MONSTER_STATUSES);
player_ptr->window_flags |= (PW_OVERHEAD | PW_DUNGEON);
handle_stuff(player_ptr);
return true;
player_ptr->knowledge &= ~(KNOW_HPRATE);
auto percent = (player_ptr->player_hp[PY_MAX_LEVEL - 1] * 200) / (2 * player_ptr->hitdie + ((PY_MAX_LEVEL - 1 + 3) * (player_ptr->hitdie + 1)));
-
- /* Update and redraw hitpoints */
- player_ptr->update |= (PU_HP);
+ auto &rfu = RedrawingFlagsUpdater::get_instance();
+ rfu.set_flag(StatusRedrawingFlag::HP);
player_ptr->redraw |= (PR_HP);
player_ptr->window_flags |= (PW_PLAYER);
POSITION y = player_ptr->y + ddy[dir];
POSITION x = player_ptr->x + ddx[dir];
player_ptr->fishing_dir = dir;
- if (!cave_has_flag_bold(player_ptr->current_floor_ptr, y, x, TerrainCharacteristics::WATER)) {
+ auto *floor_ptr = player_ptr->current_floor_ptr;
+ if (!cave_has_flag_bold(floor_ptr, y, x, TerrainCharacteristics::WATER)) {
msg_print(_("そこは水辺ではない。", "You can't fish here."));
return false;
}
- if (player_ptr->current_floor_ptr->grid_array[y][x].m_idx) {
- const auto m_name = monster_desc(player_ptr, &player_ptr->current_floor_ptr->m_list[player_ptr->current_floor_ptr->grid_array[y][x].m_idx], 0);
+ if (floor_ptr->grid_array[y][x].m_idx) {
+ const auto m_name = monster_desc(player_ptr, &floor_ptr->m_list[floor_ptr->grid_array[y][x].m_idx], 0);
msg_format(_("%sが邪魔だ!", "%s^ is standing in your way."), m_name.data());
PlayerEnergy(player_ptr).reset_player_turn();
return false;
}
}
- player_ptr->update |= PU_BONUS;
+ RedrawingFlagsUpdater::get_instance().set_flag(StatusRedrawingFlag::BONUS);
}