return true;
}
-/*!
- * @brief 鏡設置処理
- * @return 実際に設置が行われた場合TRUEを返す
- */
-bool place_mirror(PlayerType *player_ptr)
-{
- if (!cave_clean_bold(player_ptr->current_floor_ptr, player_ptr->y, player_ptr->x)) {
- msg_print(_("床上のアイテムが呪文を跳ね返した。", "The object resists the spell."));
- return false;
- }
-
- /* Create a mirror */
- player_ptr->current_floor_ptr->grid_array[player_ptr->y][player_ptr->x].info |= CAVE_OBJECT;
- player_ptr->current_floor_ptr->grid_array[player_ptr->y][player_ptr->x].mimic = feat_mirror;
-
- /* Turn on the light */
- player_ptr->current_floor_ptr->grid_array[player_ptr->y][player_ptr->x].info |= CAVE_GLOW;
-
- note_spot(player_ptr, player_ptr->y, player_ptr->x);
- lite_spot(player_ptr, player_ptr->y, player_ptr->x);
- update_local_illumination(player_ptr, player_ptr->y, player_ptr->x);
-
- return true;
-}
-
/*
* Set "multishadow", notice observable changes
*/
break;
case MAKE_MIRROR:
if (number_of_mirrors(player_ptr->current_floor_ptr) < 4 + plev / 10) {
- place_mirror(player_ptr);
+ SpellsMirrorMaster(player_ptr).place_mirror();
} else {
msg_format(_("これ以上鏡は制御できない!", "There are too many mirrors to control!"));
}
bool binding_field(PlayerType *player_ptr, int dam);
void seal_of_mirror(PlayerType *player_ptr, int dam);
bool confusing_light(PlayerType *player_ptr);
-bool place_mirror(PlayerType *player_ptr);
bool set_multishadow(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
bool set_dustrobe(PlayerType *player_ptr, TIME_EFFECT v, bool do_dec);
#include "effect/attribute-types.h"
#include "effect/effect-characteristics.h"
#include "effect/effect-processor.h"
+#include "floor/cave.h"
#include "game-option/map-screen-options.h"
+#include "grid/feature.h"
#include "grid/grid.h"
#include "monster/monster-update.h"
#include "spell-kind/spells-teleport.h"
msg_print(_("鏡の世界をうまく通れなかった!", "You could not enter the mirror!"));
return true;
}
+
+/*!
+ * @brief 鏡設置処理
+ * @return 実際に設置が行われた場合TRUEを返す
+ */
+bool SpellsMirrorMaster::place_mirror()
+{
+ auto y = this->player_ptr->y;
+ auto x = this->player_ptr->x;
+ if (!cave_clean_bold(this->player_ptr->current_floor_ptr, y, x)) {
+ msg_print(_("床上のアイテムが呪文を跳ね返した。", "The object resists the spell."));
+ return false;
+ }
+
+ /* Create a mirror */
+ this->player_ptr->current_floor_ptr->grid_array[y][x].info |= CAVE_OBJECT;
+ this->player_ptr->current_floor_ptr->grid_array[y][x].mimic = feat_mirror;
+
+ /* Turn on the light */
+ this->player_ptr->current_floor_ptr->grid_array[y][x].info |= CAVE_GLOW;
+
+ note_spot(this->player_ptr, y, x);
+ lite_spot(this->player_ptr, y, x);
+ update_local_illumination(this->player_ptr, y, x);
+ return true;
+}
void remove_all_mirrors(bool explode);
void remove_mirror(int y, int x);
bool mirror_tunnel();
+ bool place_mirror();
private:
PlayerType *player_ptr;