OSDN Git Service

[WIP] [Refactor] #1787 オーラフラグをガワだけmonster_type/lore_type::aura_flags に分離した (このコミットでは動...
authorHourier <66951241+Hourier@users.noreply.github.com>
Fri, 15 Oct 2021 11:58:24 +0000 (20:58 +0900)
committerHourier <66951241+Hourier@users.noreply.github.com>
Sat, 16 Oct 2021 02:20:33 +0000 (11:20 +0900)
13 files changed:
src/action/movement-execution.cpp
src/hpmp/hp-mp-processor.cpp
src/info-reader/race-info-tokens-table.cpp
src/info-reader/race-info-tokens-table.h
src/melee/monster-attack-monster.cpp
src/monster-race/monster-race-hook.cpp
src/monster-race/race-flags2.h
src/monster-race/race-flags3.h
src/monster/monster-info.cpp
src/monster/monster-update.cpp
src/player/player-damage.cpp
src/system/monster-race-definition.h
src/view/display-lore.cpp

index b57c3ad..77494e6 100644 (file)
@@ -216,7 +216,7 @@ void exe_movement(player_type *player_ptr, DIRECTION dir, bool do_pickup, bool b
         } else if (f_ptr->flags.has(FF::CAN_SWIM) && (riding_r_ptr->flags7 & RF7_CAN_SWIM)) {
             /* Allow moving */
         } else if (f_ptr->flags.has(FF::WATER) && !(riding_r_ptr->flags7 & RF7_AQUATIC)
-            && (f_ptr->flags.has(FF::DEEP) || (riding_r_ptr->flags2 & RF2_AURA_FIRE))) {
+            && (f_ptr->flags.has(FF::DEEP) || (riding_r_ptr->flags2 & RF2_XX14))) {
             msg_format(_("%sの上に行けない。", "Can't swim."), f_info[g_ptr->get_feat_mimic()].name.c_str());
             energy.reset_player_turn();
             can_move = false;
index af4e785..2eb0918 100644 (file)
@@ -210,7 +210,7 @@ void process_player_hp_mp(player_type *player_ptr)
 
     if (player_ptr->riding) {
         HIT_POINT damage;
-        if ((r_info[player_ptr->current_floor_ptr->m_list[player_ptr->riding].r_idx].flags2 & RF2_AURA_FIRE) && !has_immune_fire(player_ptr)) {
+        if ((r_info[player_ptr->current_floor_ptr->m_list[player_ptr->riding].r_idx].flags2 & RF2_XX14) && !has_immune_fire(player_ptr)) {
             damage = r_info[player_ptr->current_floor_ptr->m_list[player_ptr->riding].r_idx].level / 2;
             if (race.tr_flags().has(TR_VUL_FIRE))
                 damage += damage / 3;
@@ -221,7 +221,7 @@ void process_player_hp_mp(player_type *player_ptr)
             msg_print(_("熱い!", "It's hot!"));
             take_hit(player_ptr, DAMAGE_NOESCAPE, damage, _("炎のオーラ", "Fire aura"));
         }
-        if ((r_info[player_ptr->current_floor_ptr->m_list[player_ptr->riding].r_idx].flags2 & RF2_AURA_ELEC) && !has_immune_elec(player_ptr)) {
+        if ((r_info[player_ptr->current_floor_ptr->m_list[player_ptr->riding].r_idx].flags2 & RF2_XX15) && !has_immune_elec(player_ptr)) {
             damage = r_info[player_ptr->current_floor_ptr->m_list[player_ptr->riding].r_idx].level / 2;
             if (race.tr_flags().has(TR_VUL_ELEC))
                 damage += damage / 3;
@@ -232,7 +232,7 @@ void process_player_hp_mp(player_type *player_ptr)
             msg_print(_("痛い!", "It hurts!"));
             take_hit(player_ptr, DAMAGE_NOESCAPE, damage, _("電気のオーラ", "Elec aura"));
         }
-        if ((r_info[player_ptr->current_floor_ptr->m_list[player_ptr->riding].r_idx].flags3 & RF3_AURA_COLD) && !has_immune_cold(player_ptr)) {
+        if ((r_info[player_ptr->current_floor_ptr->m_list[player_ptr->riding].r_idx].flags3 & RF3_XX10) && !has_immune_cold(player_ptr)) {
             damage = r_info[player_ptr->current_floor_ptr->m_list[player_ptr->riding].r_idx].level / 2;
             if (race.tr_flags().has(TR_VUL_COLD))
                 damage += damage / 3;
index de334f2..020c8ee 100644 (file)
@@ -135,8 +135,8 @@ const std::unordered_map<std::string_view, race_flags2> r_info_flags2 = {
        { "ATTR_ANY", RF2_ATTR_ANY },
        { "POWERFUL", RF2_POWERFUL },
        { "ELDRITCH_HORROR", RF2_ELDRITCH_HORROR },
-       { "AURA_FIRE", RF2_AURA_FIRE },
-       { "AURA_ELEC", RF2_AURA_ELEC },
+       { "FLAGS2_XX14", RF2_XX14 },
+       { "FLAGS2_XX15", RF2_XX15 },
        { "OPEN_DOOR", RF2_OPEN_DOOR },
        { "BASH_DOOR", RF2_BASH_DOOR },
        { "PASS_WALL", RF2_PASS_WALL },
@@ -164,7 +164,7 @@ const std::unordered_map<std::string_view, race_flags3> r_info_flags3 = {
        { "ANIMAL", RF3_ANIMAL },
        { "AMBERITE", RF3_AMBERITE },
        { "GOOD", RF3_GOOD },
-       { "AURA_COLD", RF3_AURA_COLD },
+       { "FLAGS3_XX10", RF3_XX10 },
        { "NONLIVING", RF3_NONLIVING },
        { "HURT_LITE", RF3_HURT_LITE },
        { "HURT_ROCK", RF3_HURT_ROCK },
@@ -396,3 +396,30 @@ const std::unordered_map<std::string_view, race_flags_resistance> r_info_flagsr
        { "RES_ALL", RFR_RES_ALL },
        { "RES_TELE", RFR_RES_TELE },
 };
+
+const std::unordered_map<std::string_view, MonsterAuraType> r_info_flags_aura = {
+    { "AURA_FIRE", MonsterAuraType::FIRE },
+    { "AURA_COLD", MonsterAuraType::COLD },
+    { "AURA_ELEC", MonsterAuraType::ELEC },
+    { "AURA_ACID", MonsterAuraType::ACID },
+    { "AURA_POISON", MonsterAuraType::POISON },
+    { "AURA_NUKE", MonsterAuraType::NUKE },
+    { "AURA_PLASMA", MonsterAuraType::PLASMA },
+    { "AURA_WATER", MonsterAuraType::WATER },
+    { "AURA_ICEE", MonsterAuraType::ICEE },
+    { "AURA_LITE", MonsterAuraType::LITE },
+    { "AURA_DARK", MonsterAuraType::DARK },
+    { "AURA_SHARDS", MonsterAuraType::SHARDS },
+    { "AURA_FORCE", MonsterAuraType::FORCE },
+    { "AURA_MANA", MonsterAuraType::MANA },
+    { "AURA_METEOR", MonsterAuraType::METEOR },
+    { "AURA_CHAOS", MonsterAuraType::CHAOS },
+    { "AURA_HOLINESS", MonsterAuraType::HOLINESS },
+    { "AURA_NETHER", MonsterAuraType::NETHER },
+    { "AURA_DISENCHANT", MonsterAuraType::DISENCHANT },
+    { "AURA_NEXUS", MonsterAuraType::NEXUS },
+    { "AURA_TIME", MonsterAuraType::TIME },
+    { "AURA_GRAVITY", MonsterAuraType::GRAVITY },
+    { "AURA_VOIDS", MonsterAuraType::VOIDS },
+    { "AURA_ABYSS", MonsterAuraType::ABYSS },
+};
index 4e0cc78..3e10149 100644 (file)
@@ -2,6 +2,7 @@
 
 #include "monster-attack/monster-attack-effect.h"
 #include "monster-attack/monster-attack-types.h"
+#include "monster-race/monster-aura-types.h"
 #include "monster-race/race-ability-flags.h"
 #include "monster-race/race-flags1.h"
 #include "monster-race/race-flags2.h"
@@ -27,3 +28,5 @@ extern const std::unordered_map<std::string_view, race_flags7> r_info_flags7;
 extern const std::unordered_map<std::string_view, race_flags8> r_info_flags8;
 extern const std::unordered_map<std::string_view, race_flags9> r_info_flags9;
 extern const std::unordered_map<std::string_view, race_flags_resistance> r_info_flagsr;
+extern const std::unordered_map<std::string_view, MonsterAuraType> r_info_flags_aura;
+
index 0b4bb8a..604430b 100644 (file)
@@ -79,7 +79,7 @@ static void aura_fire_by_melee(player_type *player_ptr, mam_type *mam_ptr)
 {
     monster_race *r_ptr = &r_info[mam_ptr->m_ptr->r_idx];
     monster_race *tr_ptr = &r_info[mam_ptr->t_ptr->r_idx];
-    if (((tr_ptr->flags2 & RF2_AURA_FIRE) == 0) || (mam_ptr->m_ptr->r_idx == 0))
+    if (((tr_ptr->flags2 & RF2_XX14) == 0) || (mam_ptr->m_ptr->r_idx == 0))
         return;
 
     if (((r_ptr->flagsr & RFR_EFF_IM_FIRE_MASK) != 0) && is_original_ap_and_seen(player_ptr, mam_ptr->m_ptr)) {
@@ -91,7 +91,7 @@ static void aura_fire_by_melee(player_type *player_ptr, mam_type *mam_ptr)
         msg_format(_("%^sは突然熱くなった!", "%^s is suddenly very hot!"), mam_ptr->m_name);
 
     if (mam_ptr->m_ptr->ml && is_original_ap_and_seen(player_ptr, mam_ptr->t_ptr))
-        tr_ptr->r_flags2 |= RF2_AURA_FIRE;
+        tr_ptr->r_flags2 |= RF2_XX14;
 
     project(player_ptr, mam_ptr->t_idx, 0, mam_ptr->m_ptr->fy, mam_ptr->m_ptr->fx, damroll(1 + ((tr_ptr->level) / 26), 1 + ((tr_ptr->level) / 17)), GF_FIRE,
         PROJECT_KILL | PROJECT_STOP | PROJECT_AIMED);
@@ -101,7 +101,7 @@ static void aura_cold_by_melee(player_type *player_ptr, mam_type *mam_ptr)
 {
     monster_race *r_ptr = &r_info[mam_ptr->m_ptr->r_idx];
     monster_race *tr_ptr = &r_info[mam_ptr->t_ptr->r_idx];
-    if (((tr_ptr->flags3 & RF3_AURA_COLD) == 0) || (mam_ptr->m_ptr->r_idx == 0))
+    if (((tr_ptr->flags3 & RF3_XX10) == 0) || (mam_ptr->m_ptr->r_idx == 0))
         return;
 
     if (((r_ptr->flagsr & RFR_EFF_IM_COLD_MASK) != 0) && is_original_ap_and_seen(player_ptr, mam_ptr->m_ptr)) {
@@ -113,7 +113,7 @@ static void aura_cold_by_melee(player_type *player_ptr, mam_type *mam_ptr)
         msg_format(_("%^sは突然寒くなった!", "%^s is suddenly very cold!"), mam_ptr->m_name);
 
     if (mam_ptr->m_ptr->ml && is_original_ap_and_seen(player_ptr, mam_ptr->t_ptr))
-        tr_ptr->r_flags3 |= RF3_AURA_COLD;
+        tr_ptr->r_flags3 |= RF3_XX10;
 
     project(player_ptr, mam_ptr->t_idx, 0, mam_ptr->m_ptr->fy, mam_ptr->m_ptr->fx, damroll(1 + ((tr_ptr->level) / 26), 1 + ((tr_ptr->level) / 17)), GF_COLD,
         PROJECT_KILL | PROJECT_STOP | PROJECT_AIMED);
@@ -123,7 +123,7 @@ static void aura_elec_by_melee(player_type *player_ptr, mam_type *mam_ptr)
 {
     monster_race *r_ptr = &r_info[mam_ptr->m_ptr->r_idx];
     monster_race *tr_ptr = &r_info[mam_ptr->t_ptr->r_idx];
-    if (((tr_ptr->flags2 & RF2_AURA_ELEC) == 0) || (mam_ptr->m_ptr->r_idx == 0))
+    if (((tr_ptr->flags2 & RF2_XX15) == 0) || (mam_ptr->m_ptr->r_idx == 0))
         return;
 
     if (((r_ptr->flagsr & RFR_EFF_IM_ELEC_MASK) != 0) && is_original_ap_and_seen(player_ptr, mam_ptr->m_ptr)) {
@@ -135,7 +135,7 @@ static void aura_elec_by_melee(player_type *player_ptr, mam_type *mam_ptr)
         msg_format(_("%^sは電撃を食らった!", "%^s gets zapped!"), mam_ptr->m_name);
 
     if (mam_ptr->m_ptr->ml && is_original_ap_and_seen(player_ptr, mam_ptr->t_ptr))
-        tr_ptr->r_flags2 |= RF2_AURA_ELEC;
+        tr_ptr->r_flags2 |= RF2_XX15;
 
     project(player_ptr, mam_ptr->t_idx, 0, mam_ptr->m_ptr->fy, mam_ptr->m_ptr->fx, damroll(1 + ((tr_ptr->level) / 26), 1 + ((tr_ptr->level) / 17)), GF_ELEC,
         PROJECT_KILL | PROJECT_STOP | PROJECT_AIMED);
index 5dc2d3b..5e9ba36 100644 (file)
@@ -277,7 +277,7 @@ bool mon_hook_shallow_water(player_type *player_ptr, MONRACE_IDX r_idx)
     if (!mon_hook_dungeon(player_ptr, r_idx))
         return false;
 
-    return none_bits(r_ptr->flags2, RF2_AURA_FIRE);
+    return none_bits(r_ptr->flags2, RF2_XX14);
 }
 
 /*!
@@ -291,7 +291,7 @@ bool mon_hook_lava(player_type *player_ptr, MONRACE_IDX r_idx)
     if (!mon_hook_dungeon(player_ptr, r_idx))
         return false;
 
-    return (any_bits(r_ptr->flagsr, RFR_EFF_IM_FIRE_MASK) || any_bits(r_ptr->flags7, RF7_CAN_FLY)) && none_bits(r_ptr->flags3, RF3_AURA_COLD);
+    return (any_bits(r_ptr->flagsr, RFR_EFF_IM_FIRE_MASK) || any_bits(r_ptr->flags7, RF7_CAN_FLY)) && none_bits(r_ptr->flags3, RF3_XX10);
 }
 
 /*!
index 8b809c3..2df07f1 100644 (file)
@@ -15,8 +15,8 @@ enum race_flags2 {
     RF2_ATTR_ANY = 0x00000800, /*!< モンスター特性: ATTR_MULTIの色数が増える / TY: Attr_any */
     RF2_POWERFUL = 0x00001000, /*!< モンスター特性: 強力に魔法をあやつる / Monster has strong breath */
     RF2_ELDRITCH_HORROR = 0x00002000, /*!< モンスター特性: 狂気を呼び起こす / Sanity-blasting horror    */
-    RF2_AURA_FIRE = 0x00004000, /*!< モンスター特性: 火炎のオーラを持つ / Burns in melee */
-    RF2_AURA_ELEC = 0x00008000, /*!< モンスター特性: 電撃のオーラを持つ / Shocks in melee */
+    RF2_XX14 = 0x00004000, /*!< 予約領域。元火炎オーラ */
+    RF2_XX15 = 0x00008000, /*!< 予約領域。元電撃オーラ */
     RF2_OPEN_DOOR = 0x00010000, /*!< モンスター特性: ドアを開けることができる / Monster can open doors */
     RF2_BASH_DOOR = 0x00020000, /*!< モンスター特性: ドアを破壊することができる / Monster can bash doors */
     RF2_PASS_WALL = 0x00040000, /*!< モンスター特性: 壁を抜けることができる / Monster can pass walls */
index f14d6e8..d246ad9 100644 (file)
@@ -11,7 +11,7 @@ enum race_flags3 {
     RF3_ANIMAL = 0x00000080, /*!< モンスター特性: 動物 / Animal */
     RF3_AMBERITE = 0x00000100, /*!< モンスター特性: アンバーの血族 / TY: Amberite */
     RF3_GOOD = 0x00000200, /*!< モンスター特性: 善良 / Good */
-    RF3_AURA_COLD = 0x00000400, /*!< モンスター特性: 冷気オーラ / Freezes in melee */
+    RF3_XX10 = 0x00000400, /*!< モンスター特性: 冷気オーラ / Freezes in melee */
     RF3_NONLIVING = 0x00000800, /*!< モンスター特性: 無生物 / TY: Non-Living (?) */
     RF3_HURT_LITE = 0x00001000, /*!< モンスター特性: 通常の光(GF_WEAK_LITE)でダメージを受ける / Hurt by lite */
     RF3_HURT_ROCK = 0x00002000, /*!< モンスター特性: 岩石溶解(GF_KILL_WALL)でダメージを受ける / Hurt by rock remover */
index 14eceff..a0885da 100644 (file)
@@ -82,7 +82,7 @@ bool monster_can_cross_terrain(player_type *player_ptr, FEAT_IDX feat, monster_r
         if (!(r_ptr->flags7 & RF7_AQUATIC)) {
             if (f_ptr->flags.has(FF::DEEP))
                 return false;
-            else if (r_ptr->flags2 & RF2_AURA_FIRE)
+            else if (r_ptr->flags2 & RF2_XX14)
                 return false;
         }
     } else if (r_ptr->flags7 & RF7_AQUATIC)
index a5634e9..7a4d6c2 100644 (file)
@@ -355,7 +355,7 @@ static bool check_cold_blood(player_type *player_ptr, um_type *um_ptr, const POS
         return false;
 
     monster_race *r_ptr = &r_info[um_ptr->m_ptr->r_idx];
-    if ((r_ptr->flags2 & (RF2_COLD_BLOOD | RF2_AURA_FIRE)) == RF2_COLD_BLOOD)
+    if ((r_ptr->flags2 & (RF2_COLD_BLOOD | RF2_XX14)) == RF2_COLD_BLOOD)
         return false;
 
     um_ptr->easy = true;
index 6bacae7..c40a77f 100644 (file)
@@ -581,10 +581,10 @@ static void process_aura_damage(monster_type *m_ptr, player_type *player_ptr, bo
  */
 void touch_zap_player(monster_type *m_ptr, player_type *player_ptr)
 {
-    process_aura_damage(m_ptr, player_ptr, (bool)has_immune_fire(player_ptr), offsetof(monster_race, flags2), offsetof(monster_race, r_flags2), RF2_AURA_FIRE,
+    process_aura_damage(m_ptr, player_ptr, (bool)has_immune_fire(player_ptr), offsetof(monster_race, flags2), offsetof(monster_race, r_flags2), RF2_XX14,
         fire_dam, _("突然とても熱くなった!", "You are suddenly very hot!"));
-    process_aura_damage(m_ptr, player_ptr, (bool)has_immune_cold(player_ptr), offsetof(monster_race, flags3), offsetof(monster_race, r_flags3), RF3_AURA_COLD,
+    process_aura_damage(m_ptr, player_ptr, (bool)has_immune_cold(player_ptr), offsetof(monster_race, flags3), offsetof(monster_race, r_flags3), RF3_XX10,
         cold_dam, _("突然とても寒くなった!", "You are suddenly very cold!"));
-    process_aura_damage(m_ptr, player_ptr, (bool)has_immune_elec(player_ptr), offsetof(monster_race, flags2), offsetof(monster_race, r_flags2), RF2_AURA_ELEC,
+    process_aura_damage(m_ptr, player_ptr, (bool)has_immune_elec(player_ptr), offsetof(monster_race, flags2), offsetof(monster_race, r_flags2), RF2_XX15,
         elec_dam, _("電撃をくらった!", "You get zapped!"));
 }
index 85c6bb0..7337ee2 100644 (file)
@@ -2,28 +2,21 @@
 
 #include "monster-attack/monster-attack-effect.h"
 #include "monster-attack/monster-attack-types.h"
+#include "monster-race/monster-aura-types.h"
 #include "monster-race/race-ability-flags.h"
 #include "util/flag-group.h"
 #include "system/angband.h"
 #include <string>
 
 /*! モンスターが1ターンに攻撃する最大回数 (射撃を含む) / The maximum number of times a monster can attack in a turn (including SHOOT) */
-#define MAX_NUM_BLOWS 4
+constexpr int MAX_NUM_BLOWS = 4;
 
-/*
- * Monster blow structure
- *
- *     - Method (RBM_*)
- *     - Effect (RBE_*)
- *     - Damage Dice
- *     - Damage Sides
- */
-typedef struct monster_blow {
+struct monster_blow {
     rbm_type method{};
     rbe_type effect{};
     DICE_NUMBER d_dice{};
     DICE_SID d_side{};
-} monster_blow;
+};
 
 /*!
  * @brief モンスター種族の定義構造体
@@ -70,6 +63,7 @@ struct monster_race {
     BIT_FLAGS flags9{}; //!< Flags 9 (drops info)
     BIT_FLAGS flagsr{}; //!< 耐性フラグ / Flags R (resistances info)
     EnumClassFlagGroup<RF_ABILITY> ability_flags; //!< 能力フラグ(魔法/ブレス) / Ability Flags
+    EnumClassFlagGroup<MonsterAuraType> aura_flags; //!< オーラフラグ / Aura Flags
     monster_blow blow[MAX_NUM_BLOWS]{}; //!< 打撃能力定義 / Up to four blows per round
     MONRACE_IDX reinforce_id[6]{}; //!< 指定護衛モンスター種族ID(6種まで)
     DICE_NUMBER reinforce_dd[6]{}; //!< 指定護衛数ダイス数
@@ -107,6 +101,7 @@ struct monster_race {
     uint32_t r_flags3{}; //!< Observed racial flags
     uint32_t r_flagsr{}; //!< 見た耐性フラグ / Observed racial resistance flags
     EnumClassFlagGroup<RF_ABILITY> r_ability_flags; //!< 見た能力フラグ(魔法/ブレス) / Observed racial ability flags
+    EnumClassFlagGroup<MonsterAuraType> r_aura_flags; //!< 見た能力フラグ(オーラ) / Observed aura flags
     PLAYER_LEVEL defeat_level{}; //!< 倒したレベル(ユニーク用) / player level at which defeated this race
     REAL_TIME defeat_time{}; //!< 倒した時間(ユニーク用) / time at which defeated this race
 };
index a0345e1..3b752ea 100644 (file)
@@ -455,20 +455,20 @@ void display_monster_exp(player_type *player_ptr, lore_type *lore_ptr)
 
 void display_monster_aura(lore_type *lore_ptr)
 {
-    if ((lore_ptr->flags2 & RF2_AURA_FIRE) && (lore_ptr->flags2 & RF2_AURA_ELEC) && (lore_ptr->flags3 & RF3_AURA_COLD))
+    if ((lore_ptr->flags2 & RF2_XX14) && (lore_ptr->flags2 & RF2_XX15) && (lore_ptr->flags3 & RF3_XX10))
         hook_c_roff(
             TERM_VIOLET, format(_("%^sは炎と氷とスパークに包まれている。", "%^s is surrounded by flames, ice and electricity.  "), Who::who(lore_ptr->msex)));
-    else if ((lore_ptr->flags2 & RF2_AURA_FIRE) && (lore_ptr->flags2 & RF2_AURA_ELEC))
+    else if ((lore_ptr->flags2 & RF2_XX14) && (lore_ptr->flags2 & RF2_XX15))
         hook_c_roff(TERM_L_RED, format(_("%^sは炎とスパークに包まれている。", "%^s is surrounded by flames and electricity.  "), Who::who(lore_ptr->msex)));
-    else if ((lore_ptr->flags2 & RF2_AURA_FIRE) && (lore_ptr->flags3 & RF3_AURA_COLD))
+    else if ((lore_ptr->flags2 & RF2_XX14) && (lore_ptr->flags3 & RF3_XX10))
         hook_c_roff(TERM_BLUE, format(_("%^sは炎と氷に包まれている。", "%^s is surrounded by flames and ice.  "), Who::who(lore_ptr->msex)));
-    else if ((lore_ptr->flags3 & RF3_AURA_COLD) && (lore_ptr->flags2 & RF2_AURA_ELEC))
+    else if ((lore_ptr->flags3 & RF3_XX10) && (lore_ptr->flags2 & RF2_XX15))
         hook_c_roff(TERM_L_GREEN, format(_("%^sは氷とスパークに包まれている。", "%^s is surrounded by ice and electricity.  "), Who::who(lore_ptr->msex)));
-    else if (lore_ptr->flags2 & RF2_AURA_FIRE)
+    else if (lore_ptr->flags2 & RF2_XX14)
         hook_c_roff(TERM_RED, format(_("%^sは炎に包まれている。", "%^s is surrounded by flames.  "), Who::who(lore_ptr->msex)));
-    else if (lore_ptr->flags3 & RF3_AURA_COLD)
+    else if (lore_ptr->flags3 & RF3_XX10)
         hook_c_roff(TERM_BLUE, format(_("%^sは氷に包まれている。", "%^s is surrounded by ice.  "), Who::who(lore_ptr->msex)));
-    else if (lore_ptr->flags2 & RF2_AURA_ELEC)
+    else if (lore_ptr->flags2 & RF2_XX15)
         hook_c_roff(TERM_L_BLUE, format(_("%^sはスパークに包まれている。", "%^s is surrounded by electricity.  "), Who::who(lore_ptr->msex)));
 }