OSDN Git Service

[Refactor] struct player_type を class PlayerType に置換。
[hengbandforosx/hengbandosx.git] / src / mspell / mspell-attack.cpp
index ba0c8ec..682ef1f 100644 (file)
@@ -51,7 +51,7 @@ static void set_no_magic_mask(msa_type *msa_ptr)
     msa_ptr->ability_flags.reset(RF_ABILITY_NOMAGIC_MASK);
 }
 
-static void check_mspell_stupid(player_type *player_ptr, msa_type *msa_ptr)
+static void check_mspell_stupid(PlayerType *player_ptr, msa_type *msa_ptr)
 {
     floor_type *floor_ptr = player_ptr->current_floor_ptr;
     msa_ptr->in_no_magic_dungeon = d_info[player_ptr->dungeon_idx].flags.has(DungeonFeatureType::NO_MAGIC) && floor_ptr->dun_level
@@ -62,7 +62,7 @@ static void check_mspell_stupid(player_type *player_ptr, msa_type *msa_ptr)
     msa_ptr->ability_flags &= RF_ABILITY_NOMAGIC_MASK;
 }
 
-static void check_mspell_smart(player_type *player_ptr, msa_type *msa_ptr)
+static void check_mspell_smart(PlayerType *player_ptr, msa_type *msa_ptr)
 {
     if ((msa_ptr->r_ptr->flags2 & RF2_SMART) == 0)
         return;
@@ -76,7 +76,7 @@ static void check_mspell_smart(player_type *player_ptr, msa_type *msa_ptr)
     }
 }
 
-static void check_mspell_arena(player_type *player_ptr, msa_type *msa_ptr)
+static void check_mspell_arena(PlayerType *player_ptr, msa_type *msa_ptr)
 {
     if (!player_ptr->current_floor_ptr->inside_arena && !player_ptr->phase_out)
         return;
@@ -87,7 +87,7 @@ static void check_mspell_arena(player_type *player_ptr, msa_type *msa_ptr)
         msa_ptr->ability_flags.reset(MonsterAbilityType::SPECIAL);
 }
 
-static bool check_mspell_non_stupid(player_type *player_ptr, msa_type *msa_ptr)
+static bool check_mspell_non_stupid(PlayerType *player_ptr, msa_type *msa_ptr)
 {
     if ((msa_ptr->r_ptr->flags2 & RF2_STUPID) != 0)
         return true;
@@ -119,7 +119,7 @@ static void set_mspell_list(msa_type *msa_ptr)
     EnumClassFlagGroup<MonsterAbilityType>::get_flags(msa_ptr->ability_flags, std::back_inserter(msa_ptr->mspells));
 }
 
-static void describe_mspell_monster(player_type *player_ptr, msa_type *msa_ptr)
+static void describe_mspell_monster(PlayerType *player_ptr, msa_type *msa_ptr)
 {
     monster_desc(player_ptr, msa_ptr->m_name, msa_ptr->m_ptr, 0x00);
 
@@ -131,7 +131,7 @@ static void describe_mspell_monster(player_type *player_ptr, msa_type *msa_ptr)
 #endif
 }
 
-static bool switch_do_spell(player_type *player_ptr, msa_type *msa_ptr)
+static bool switch_do_spell(PlayerType *player_ptr, msa_type *msa_ptr)
 {
     switch (msa_ptr->do_spell) {
     case DO_SPELL_NONE: {
@@ -158,7 +158,7 @@ static bool switch_do_spell(player_type *player_ptr, msa_type *msa_ptr)
     }
 }
 
-static bool check_mspell_continuation(player_type *player_ptr, msa_type *msa_ptr)
+static bool check_mspell_continuation(PlayerType *player_ptr, msa_type *msa_ptr)
 {
     if (msa_ptr->ability_flags.none())
         return false;
@@ -179,7 +179,7 @@ static bool check_mspell_continuation(player_type *player_ptr, msa_type *msa_ptr
     return true;
 }
 
-static bool check_mspell_unexploded(player_type *player_ptr, msa_type *msa_ptr)
+static bool check_mspell_unexploded(PlayerType *player_ptr, msa_type *msa_ptr)
 {
     PERCENTAGE fail_rate = 25 - (msa_ptr->rlev + 3) / 4;
     if (msa_ptr->r_ptr->flags2 & RF2_STUPID)
@@ -205,7 +205,7 @@ static bool check_mspell_unexploded(player_type *player_ptr, msa_type *msa_ptr)
  *
  * ターゲット (msa_ptr->y, msa_ptr->x) は設定済みとする。
  */
-static bool check_thrown_mspell(player_type *player_ptr, msa_type *msa_ptr)
+static bool check_thrown_mspell(PlayerType *player_ptr, msa_type *msa_ptr)
 {
     // プレイヤーがモンスターを正しく視認できていれば思い出に残る。
     // FIXME: ここで処理するのはおかしいような?
@@ -256,7 +256,7 @@ static bool check_thrown_mspell(player_type *player_ptr, msa_type *msa_ptr)
     }
 }
 
-static void check_mspell_imitation(player_type *player_ptr, msa_type *msa_ptr)
+static void check_mspell_imitation(PlayerType *player_ptr, msa_type *msa_ptr)
 {
     bool seen = (!player_ptr->blind && msa_ptr->m_ptr->ml);
     bool can_imitate = player_has_los_bold(player_ptr, msa_ptr->m_ptr->fy, msa_ptr->m_ptr->fx);
@@ -295,7 +295,7 @@ static void remember_mspell(msa_type *msa_ptr)
  * @param m_idx モンスター構造体配列のID
  * @return 実際に特殊技能を利用したらTRUEを返す
  */
-bool make_attack_spell(player_type *player_ptr, MONSTER_IDX m_idx)
+bool make_attack_spell(PlayerType *player_ptr, MONSTER_IDX m_idx)
 {
     msa_type tmp_msa;
     msa_type *msa_ptr = initialize_msa_type(player_ptr, &tmp_msa, m_idx);