}
/*!
- * 静水
- * @param player_ptr プレイヤーへの参照ポインタ
- * @return ペットを操っている場合を除きTRUE
- */
-bool mirror_concentration(PlayerType *player_ptr)
-{
- if (total_friends) {
- msg_print(_("今はペットを操ることに集中していないと。", "Your pets demand all of your attention."));
- return false;
- }
-
- if (!player_ptr->current_floor_ptr->grid_array[player_ptr->y][player_ptr->x].is_mirror()) {
- msg_print(_("鏡の上でないと集中できない!", "There's no mirror here!"));
- return true;
- }
-
- msg_print(_("少し頭がハッキリした。", "You feel your head clear a little."));
-
- player_ptr->csp += (5 + player_ptr->lev * player_ptr->lev / 100);
- if (player_ptr->csp >= player_ptr->msp) {
- player_ptr->csp = player_ptr->msp;
- player_ptr->csp_frac = 0;
- }
-
- player_ptr->redraw |= PR_MANA;
- return true;
-}
-
-/*!
* @brief 鏡魔法「封魔結界」の効果処理
* @param dam ダメージ量
* @return 効果があったらTRUEを返す
class PlayerType;
bool check_multishadow(PlayerType *player_ptr);
-bool mirror_concentration(PlayerType *player_ptr);
bool binding_field(PlayerType *player_ptr, int dam);
void seal_of_mirror(PlayerType *player_ptr, int dam);
bool confusing_light(PlayerType *player_ptr);
}
return identify_fully(player_ptr, true);
- case PlayerClassType::MIRROR_MASTER:
+ case PlayerClassType::MIRROR_MASTER: {
+ SpellsMirrorMaster smm(player_ptr);
if (command == -3) {
- SpellsMirrorMaster(player_ptr).remove_all_mirrors(true);
+ smm.remove_all_mirrors(true);
return true;
}
if (command == -4) {
- return mirror_concentration(player_ptr);
+ return smm.mirror_concentration();
}
return true;
+ }
case PlayerClassType::NINJA:
return hayagake(player_ptr);
case PlayerClassType::ELEMENTALIST:
#include "spell-class/spells-mirror-master.h"
+#include "core/player-redraw-types.h"
#include "dungeon/dungeon-flag-types.h"
#include "dungeon/dungeon.h"
#include "effect/attribute-types.h"
#include "grid/feature.h"
#include "grid/grid.h"
#include "monster/monster-update.h"
+#include "pet/pet-util.h"
#include "spell-kind/spells-teleport.h"
#include "system/floor-type-definition.h"
#include "system/grid-type-definition.h"
update_local_illumination(this->player_ptr, y, x);
return true;
}
+
+/*!
+ * @brief 静水
+ * @param player_ptr プレイヤーへの参照ポインタ
+ * @return ペットを操っている場合を除きTRUE
+ */
+bool SpellsMirrorMaster::mirror_concentration()
+{
+ if (total_friends) {
+ msg_print(_("今はペットを操ることに集中していないと。", "Your pets demand all of your attention."));
+ return false;
+ }
+
+ if (!this->player_ptr->current_floor_ptr->grid_array[this->player_ptr->y][this->player_ptr->x].is_mirror()) {
+ msg_print(_("鏡の上でないと集中できない!", "There's no mirror here!"));
+ return true;
+ }
+
+ msg_print(_("少し頭がハッキリした。", "You feel your head clear a little."));
+ this->player_ptr->csp += (5 + this->player_ptr->lev * this->player_ptr->lev / 100);
+ if (this->player_ptr->csp >= this->player_ptr->msp) {
+ this->player_ptr->csp = this->player_ptr->msp;
+ this->player_ptr->csp_frac = 0;
+ }
+
+ this->player_ptr->redraw |= PR_MANA;
+ return true;
+}
void remove_mirror(int y, int x);
bool mirror_tunnel();
bool place_mirror();
+ bool mirror_concentration();
private:
PlayerType *player_ptr;