OSDN Git Service

[Refactor] #1469 Renamed class methods to proper ones
authorHourier <grapefox.whitelucifer.0408@gmail.com>
Mon, 6 Sep 2021 11:42:22 +0000 (20:42 +0900)
committerHourier <grapefox.whitelucifer.0408@gmail.com>
Tue, 7 Sep 2021 09:11:18 +0000 (18:11 +0900)
34 files changed:
src/action/activation-execution.cpp
src/cmd-action/cmd-move.cpp
src/cmd-action/cmd-spell.cpp
src/cmd-item/cmd-eat.cpp
src/cmd-item/cmd-quaff.cpp
src/combat/aura-counterattack.cpp
src/combat/slaying.cpp
src/core/player-processor.cpp
src/effect/effect-player.cpp
src/floor/wild.cpp
src/market/building-craft-weapon.cpp
src/monster-attack/monster-attack-player.cpp
src/mspell/mspell-dispel.cpp
src/mutation/mutation-processor.cpp
src/object-activation/activation-breath.cpp
src/object-activation/activation-others.cpp
src/object-use/quaff-execution.cpp
src/object-use/read-execution.cpp
src/player-ability/player-constitution.cpp
src/player-ability/player-dexterity.cpp
src/player-ability/player-strength.cpp
src/player-attack/attack-chaos-effect.cpp
src/player-attack/blood-sucking-processor.cpp
src/player-attack/player-attack.cpp
src/player-status/player-speed.cpp
src/player-status/player-stealth.cpp
src/player/player-status-flags.cpp
src/player/player-status.cpp
src/racial/racial-switcher.cpp
src/spell-realm/spells-hex.cpp
src/spell-realm/spells-hex.h
src/status/action-setter.cpp
src/status/bad-status-setter.cpp
src/window/main-window-stat-poster.cpp

index 60a9dfc..ff62a3c 100644 (file)
@@ -184,8 +184,8 @@ static bool activate_whistle(player_type *user_ptr, ae_type *ae_ptr)
     if (music_singing_any(user_ptr))
         stop_singing(user_ptr);
 
-    if (RealmHex(user_ptr).hex_spelling_any()) {
-        (void)RealmHex(user_ptr).stop_hex_spell_all();
+    if (RealmHex(user_ptr).is_spelling_any()) {
+        (void)RealmHex(user_ptr).stop_all_spells();
     }
 
     MONSTER_IDX pet_ctr;
index d028b22..a38c454 100644 (file)
@@ -397,8 +397,8 @@ void do_cmd_rest(player_type *creature_ptr)
         stop_singing(creature_ptr);
 
     RealmHex realm_hex(creature_ptr);
-    if (realm_hex.hex_spelling_any()) {
-        (void)realm_hex.stop_hex_spell_all();
+    if (realm_hex.is_spelling_any()) {
+        (void)realm_hex.stop_all_spells();
     }
 
     if (command_arg <= 0) {
index d7ddc6f..fda1150 100644 (file)
@@ -1015,12 +1015,12 @@ bool do_cmd_cast(player_type *caster_ptr)
         return false;
 
     if (caster_ptr->realm1 == REALM_HEX) {
-        if (RealmHex(caster_ptr).hex_spell_fully()) {
+        if (RealmHex(caster_ptr).is_using_full_capacity()) {
             auto flag = false;
             msg_print(_("これ以上新しい呪文を詠唱することはできない。", "Can not cast more spells."));
             flush();
             if (caster_ptr->lev >= 35) {
-                flag = RealmHex(caster_ptr).stop_hex_spell();
+                flag = RealmHex(caster_ptr).stop_one_spell();
             }
 
             if (!flag) {
@@ -1092,7 +1092,7 @@ bool do_cmd_cast(player_type *caster_ptr)
 
     use_realm = tval2realm(o_ptr->tval);
     if (use_realm == REALM_HEX) {
-        if (RealmHex(caster_ptr).hex_spelling(spell)) {
+        if (RealmHex(caster_ptr).is_spelling_specific(spell)) {
             msg_print(_("その呪文はすでに詠唱中だ。", "You are already casting it."));
             return false;
         }
index a46669b..05038c3 100644 (file)
@@ -261,8 +261,8 @@ void exe_eat_food(player_type *creature_ptr, INVENTORY_IDX item)
         stop_singing(creature_ptr);
 
     RealmHex realm_hex(creature_ptr);
-    if (realm_hex.hex_spelling_any()) {
-        (void)realm_hex.stop_hex_spell_all();
+    if (realm_hex.is_spelling_any()) {
+        (void)realm_hex.stop_all_spells();
     }
 
     object_type *o_ptr = ref_item(creature_ptr, item);
index 2d47e17..42c8860 100644 (file)
@@ -27,7 +27,7 @@ void do_cmd_quaff_potion(player_type *creature_ptr)
     if (creature_ptr->wild_mode)
         return;
 
-    if (!RealmHex(creature_ptr).hex_spelling(HEX_INHAIL) && cmd_limit_arena(creature_ptr))
+    if (!RealmHex(creature_ptr).is_spelling_specific(HEX_INHAIL) && cmd_limit_arena(creature_ptr))
         return;
 
     if (creature_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
index 679af7e..6414e1d 100644 (file)
@@ -177,7 +177,7 @@ static void aura_force_by_monster_attack(player_type *target_ptr, monap_type *mo
 
 static void aura_shadow_by_monster_attack(player_type *target_ptr, monap_type *monap_ptr)
 {
-    if (!RealmHex(target_ptr).hex_spelling(HEX_SHADOW_CLOAK) || !monap_ptr->alive || target_ptr->is_dead)
+    if (!RealmHex(target_ptr).is_spelling_specific(HEX_SHADOW_CLOAK) || !monap_ptr->alive || target_ptr->is_dead)
         return;
 
     HIT_POINT dam = 1;
index f8894e5..6c7e2dc 100644 (file)
@@ -166,7 +166,7 @@ HIT_POINT calc_attack_damage_with_slay(player_type *attacker_ptr, object_type *o
             flgs.set(TR_BRAND_POIS);
     }
 
-    if (RealmHex(attacker_ptr).hex_spelling(HEX_RUNESWORD))
+    if (RealmHex(attacker_ptr).is_spelling_specific(HEX_RUNESWORD))
         flgs.set(TR_SLAY_GOOD);
 
     MULTIPLY mult = 10;
index 1339532..3214e99 100644 (file)
@@ -427,11 +427,11 @@ void process_upkeep_with_speed(player_type *creature_ptr)
 
         auto realm_hex = RealmHex(creature_ptr);
         if (!load) {
-            realm_hex.check_hex();
+            realm_hex.decrease_mana();
         }
 
         if (!load) {
-            realm_hex.revenge_spell();
+            realm_hex.continue_revenge();
         }
 
         creature_ptr->enchant_energy_need += ENERGY_NEED();
index e501e57..823e698 100644 (file)
@@ -308,8 +308,8 @@ bool affect_player(MONSTER_IDX who, player_type *target_ptr, concptr who_name, i
     describe_effect_source(target_ptr, ep_ptr, who_name);
     switch_effects_player(target_ptr, ep_ptr);
 
-    RealmHex(target_ptr).revenge_store(ep_ptr->get_damage);
-    if ((target_ptr->tim_eyeeye || RealmHex(target_ptr).hex_spelling(HEX_EYE_FOR_EYE)) && (ep_ptr->get_damage > 0) && !target_ptr->is_dead && (ep_ptr->who > 0)) {
+    RealmHex(target_ptr).store_vengeful_damage(ep_ptr->get_damage);
+    if ((target_ptr->tim_eyeeye || RealmHex(target_ptr).is_spelling_specific(HEX_EYE_FOR_EYE)) && (ep_ptr->get_damage > 0) && !target_ptr->is_dead && (ep_ptr->who > 0)) {
         GAME_TEXT m_name_self[MAX_MONSTER_NAME];
         monster_desc(target_ptr, m_name_self, ep_ptr->m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE | MD_OBJECTIVE);
         msg_format(_("攻撃が%s自身を傷つけた!", "The attack of %s has wounded %s!"), ep_ptr->m_name, m_name_self);
index 3ed1453..65d8c5b 100644 (file)
@@ -888,8 +888,8 @@ bool change_wild_mode(player_type *creature_ptr, bool encount)
     creature_ptr->oldpx = creature_ptr->x;
     creature_ptr->oldpy = creature_ptr->y;
     RealmHex realm_hex(creature_ptr);
-    if (realm_hex.hex_spelling_any()) {
-        realm_hex.stop_hex_spell_all();
+    if (realm_hex.is_spelling_any()) {
+        realm_hex.stop_all_spells();
     }
 
     set_action(creature_ptr, ACTION_NONE);
index d5df486..2568085 100644 (file)
@@ -141,7 +141,7 @@ static void compare_weapon_aux(player_type *owner_ptr, object_type *o_ptr, int c
     mindam = calc_expect_crit(owner_ptr, o_ptr->weight, o_ptr->to_h, mindice, owner_ptr->to_h[0], dokubari, impact);
     maxdam = calc_expect_crit(owner_ptr, o_ptr->weight, o_ptr->to_h, maxdice, owner_ptr->to_h[0], dokubari, impact);
     show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("会心:", "Critical:"), TERM_L_RED);
-    if ((flgs.has(TR_VORPAL) || RealmHex(owner_ptr).hex_spelling(HEX_RUNESWORD))) {
+    if ((flgs.has(TR_VORPAL) || RealmHex(owner_ptr).is_spelling_specific(HEX_RUNESWORD))) {
         if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD)) {
             vorpal_mult = 5;
             vorpal_div = 3;
index 0d202a9..aaf974d 100644 (file)
@@ -461,7 +461,7 @@ static bool process_monster_blows(player_type *target_ptr, monap_type *monap_ptr
  */
 static void eyes_on_eyes(player_type *target_ptr, monap_type *monap_ptr)
 {
-    if (((target_ptr->tim_eyeeye == 0) && !RealmHex(target_ptr).hex_spelling(HEX_EYE_FOR_EYE)) || (monap_ptr->get_damage == 0) || target_ptr->is_dead)
+    if (((target_ptr->tim_eyeeye == 0) && !RealmHex(target_ptr).is_spelling_specific(HEX_EYE_FOR_EYE)) || (monap_ptr->get_damage == 0) || target_ptr->is_dead)
         return;
 
 #ifdef JP
@@ -491,7 +491,7 @@ static void thief_teleport(player_type *target_ptr, monap_type *monap_ptr)
 
 static void postprocess_monster_blows(player_type *target_ptr, monap_type *monap_ptr)
 {
-    RealmHex(target_ptr).revenge_store(monap_ptr->get_damage);
+    RealmHex(target_ptr).store_vengeful_damage(monap_ptr->get_damage);
     eyes_on_eyes(target_ptr, monap_ptr);
     musou_counterattack(target_ptr, monap_ptr);
     thief_teleport(target_ptr, monap_ptr);
index 9b084aa..23229c7 100644 (file)
@@ -81,7 +81,7 @@ static void dispel_player(player_type *creature_ptr)
         msg_print(_("手の輝きがなくなった。", "Your hands stop glowing."));
     }
 
-    if (music_singing_any(creature_ptr) || RealmHex(creature_ptr).hex_spelling_any()) {
+    if (music_singing_any(creature_ptr) || RealmHex(creature_ptr).is_spelling_any()) {
         concptr str = (music_singing_any(creature_ptr)) ? _("歌", "singing") : _("呪文", "casting");
         set_interrupting_song_effect(creature_ptr, get_singing_song_effect(creature_ptr));
         set_singing_song_effect(creature_ptr, MUSIC_NONE);
index e54705e..b03b847 100644 (file)
@@ -395,8 +395,8 @@ void process_world_aux_mutation(player_type *creature_ptr)
             stop_singing(creature_ptr);
 
         RealmHex realm_hex(creature_ptr);
-        if (realm_hex.hex_spelling_any()) {
-            (void)realm_hex.stop_hex_spell_all();
+        if (realm_hex.is_spelling_any()) {
+            (void)realm_hex.stop_all_spells();
         }
     }
 
index 777b195..d56a5ac 100644 (file)
@@ -46,8 +46,8 @@ bool activate_dragon_breath(player_type *user_ptr, object_type *o_ptr)
     if (music_singing_any(user_ptr))
         stop_singing(user_ptr);
 
-    if (RealmHex(user_ptr).hex_spelling_any()) {
-        (void)RealmHex(user_ptr).stop_hex_spell_all();
+    if (RealmHex(user_ptr).is_spelling_any()) {
+        (void)RealmHex(user_ptr).stop_all_spells();
     }
 
     int t = randint0(n);
index 9261792..1a35cec 100644 (file)
@@ -89,8 +89,8 @@ bool activate_scare(player_type *user_ptr)
     if (music_singing_any(user_ptr))
         stop_singing(user_ptr);
 
-    if (RealmHex(user_ptr).hex_spelling_any()) {
-        (void)RealmHex(user_ptr).stop_hex_spell_all();
+    if (RealmHex(user_ptr).is_spelling_any()) {
+        (void)RealmHex(user_ptr).stop_all_spells();
     }
 
     msg_print(_("あなたは力強い突風を吹き鳴らした。周囲の敵が震え上っている!", "You wind a mighty blast; your enemies tremble!"));
index 6be480b..a11d7dd 100644 (file)
@@ -134,8 +134,8 @@ void exe_quaff_potion(player_type *creature_ptr, INVENTORY_IDX item)
         stop_singing(creature_ptr);
 
     RealmHex realm_hex(creature_ptr);
-    if (realm_hex.hex_spelling_any() && !realm_hex.hex_spelling(HEX_INHAIL)) {
-        (void)RealmHex(creature_ptr).stop_hex_spell_all();
+    if (realm_hex.is_spelling_any() && !realm_hex.is_spelling_specific(HEX_INHAIL)) {
+        (void)RealmHex(creature_ptr).stop_all_spells();
     }
 
     o_ptr = ref_item(creature_ptr, item);
index c86f111..f764ae4 100644 (file)
@@ -96,8 +96,8 @@ void exe_read(player_type *creature_ptr, INVENTORY_IDX item, bool known)
         stop_singing(creature_ptr);
 
     RealmHex realm_hex(creature_ptr);
-    if (realm_hex.hex_spelling_any() && ((creature_ptr->lev < 35) || realm_hex.hex_spell_fully())) {
-        (void)RealmHex(creature_ptr).stop_hex_spell_all();
+    if (realm_hex.is_spelling_any() && ((creature_ptr->lev < 35) || realm_hex.is_using_full_capacity())) {
+        (void)RealmHex(creature_ptr).stop_all_spells();
     }
 
     ident = false;
index 75bea1e..0dd0adf 100644 (file)
@@ -55,7 +55,7 @@ int16_t PlayerConstitution::time_effect_value()
     int16_t result = 0;
 
     if (this->owner_ptr->realm1 == REALM_HEX) {
-        if (RealmHex(this->owner_ptr).hex_spelling(HEX_BUILDING)) {
+        if (RealmHex(this->owner_ptr).is_spelling_specific(HEX_BUILDING)) {
             result += 4;
         }
     }
index 3a10247..b3841bf 100644 (file)
@@ -55,7 +55,7 @@ int16_t PlayerDexterity::time_effect_value()
     int16_t result = 0;
 
     if (this->owner_ptr->realm1 == REALM_HEX) {
-        if (RealmHex(this->owner_ptr).hex_spelling(HEX_BUILDING)) {
+        if (RealmHex(this->owner_ptr).is_spelling_specific(HEX_BUILDING)) {
             result += 4;
         }
     }
index 161c704..a4d963a 100644 (file)
@@ -58,10 +58,10 @@ int16_t PlayerStrength::time_effect_value()
 
     if (this->owner_ptr->realm1 == REALM_HEX) {
         RealmHex realm_hex(this->owner_ptr);
-        if (realm_hex.hex_spelling(HEX_XTRA_MIGHT)) {
+        if (realm_hex.is_spelling_specific(HEX_XTRA_MIGHT)) {
             result += 4;
         }
-        if (realm_hex.hex_spelling(HEX_BUILDING)) {
+        if (realm_hex.is_spelling_specific(HEX_BUILDING)) {
             result += 4;
         }
     }
index f7077b2..db8eace 100644 (file)
@@ -269,7 +269,7 @@ void change_monster_stat(player_type *attacker_ptr, player_attack_type *pa_ptr,
     object_type *o_ptr = &attacker_ptr->inventory_list[INVEN_MAIN_HAND + pa_ptr->hand];
 
     if (any_bits(attacker_ptr->special_attack, ATTACK_CONFUSE) || pa_ptr->chaos_effect == CE_CONFUSION || pa_ptr->mode == HISSATSU_CONF
-        || RealmHex(attacker_ptr).hex_spelling(HEX_CONFUSION))
+        || RealmHex(attacker_ptr).is_spelling_specific(HEX_CONFUSION))
         attack_confuse(attacker_ptr, pa_ptr);
 
     if (pa_ptr->magical_effect == MagicalBrandEffect::STUN)
index bac9e59..7e167f8 100644 (file)
@@ -30,7 +30,7 @@ void decide_blood_sucking(player_type *attacker_ptr, player_attack_type *pa_ptr)
     bool is_blood_sucker = pa_ptr->flags.has(TR_VAMPIRIC);
     is_blood_sucker |= pa_ptr->chaos_effect == CE_VAMPIRIC;
     is_blood_sucker |= pa_ptr->mode == HISSATSU_DRAIN;
-    is_blood_sucker |= RealmHex(attacker_ptr).hex_spelling(HEX_VAMP_BLADE);
+    is_blood_sucker |= RealmHex(attacker_ptr).is_spelling_specific(HEX_VAMP_BLADE);
     if (!is_blood_sucker)
         return;
 
@@ -103,7 +103,7 @@ static void drain_result(player_type *attacker_ptr, player_attack_type *pa_ptr,
 
     int drain_heal = damroll(2, pa_ptr->drain_result / 6);
 
-    if (RealmHex(attacker_ptr).hex_spelling(HEX_VAMP_BLADE))
+    if (RealmHex(attacker_ptr).is_spelling_specific(HEX_VAMP_BLADE))
         drain_heal *= 2;
 
     if (cheat_xtra) {
index bee787d..df8f7f0 100644 (file)
@@ -487,8 +487,8 @@ static void apply_actual_attack(
     pa_ptr->magical_effect = select_magical_brand_effect(attacker_ptr, pa_ptr);
     decide_blood_sucking(attacker_ptr, pa_ptr);
 
-    // process_monk_attackの中でplayer_type->magic_num1[0] を書き換えているので、ここでhex_spelling() の判定をしないとダメ.
-    bool vorpal_cut = (pa_ptr->flags.has(TR_VORPAL) || RealmHex(attacker_ptr).hex_spelling(HEX_RUNESWORD)) && (randint1(vorpal_chance * 3 / 2) == 1)
+    // process_monk_attackの中でplayer_type->magic_num1[0] を書き換えているので、ここでis_spelling_specific() の判定をしないとダメ.
+    bool vorpal_cut = (pa_ptr->flags.has(TR_VORPAL) || RealmHex(attacker_ptr).is_spelling_specific(HEX_RUNESWORD)) && (randint1(vorpal_chance * 3 / 2) == 1)
         && !is_zantetsu_nullified;
     calc_attack_damage(attacker_ptr, pa_ptr, do_quake, vorpal_cut, vorpal_chance);
     apply_damage_bonus(attacker_ptr, pa_ptr);
index 78f6363..a7d50f4 100644 (file)
@@ -208,7 +208,7 @@ int16_t PlayerSpeed::time_effect_value()
     }
 
     if (this->owner_ptr->realm1 == REALM_HEX) {
-        if (RealmHex(this->owner_ptr).hex_spelling(HEX_SHOCK_CLOAK)) {
+        if (RealmHex(this->owner_ptr).is_spelling_specific(HEX_SHOCK_CLOAK)) {
             result += 3;
         }
     }
index c76c364..315d439 100644 (file)
@@ -113,7 +113,7 @@ int16_t PlayerStealth::time_effect_value()
 {
     int16_t result = 0;
     if (this->owner_ptr->realm1 == REALM_HEX) {
-        if (RealmHex(this->owner_ptr).hex_spelling_any())
+        if (RealmHex(this->owner_ptr).is_spelling_any())
             result -= (1 + casting_hex_num(this->owner_ptr));
     }
     if (is_shero(this->owner_ptr)) {
index 0e8d696..e2cb646 100644 (file)
@@ -494,7 +494,7 @@ BIT_FLAGS has_esp_evil(player_type *creature_ptr)
 {
     BIT_FLAGS result = 0L;
     if (creature_ptr->realm1 == REALM_HEX) {
-        if (RealmHex(creature_ptr).hex_spelling(HEX_DETECT_EVIL))
+        if (RealmHex(creature_ptr).is_spelling_specific(HEX_DETECT_EVIL))
             result |= FLAG_CAUSE_MAGIC_TIME_EFFECT;
     }
     result |= check_equipment_flags(creature_ptr, TR_ESP_EVIL);
@@ -801,7 +801,7 @@ BIT_FLAGS has_sh_fire(player_type *creature_ptr)
         result |= FLAG_CAUSE_BATTLE_FORM;
     }
 
-    if (RealmHex(creature_ptr).hex_spelling(HEX_DEMON_AURA) || creature_ptr->ult_res || creature_ptr->tim_sh_fire) {
+    if (RealmHex(creature_ptr).is_spelling_specific(HEX_DEMON_AURA) || creature_ptr->ult_res || creature_ptr->tim_sh_fire) {
         result |= FLAG_CAUSE_MAGIC_TIME_EFFECT;
     }
 
@@ -819,7 +819,7 @@ BIT_FLAGS has_sh_elec(player_type *creature_ptr)
     if (creature_ptr->muta.has(MUTA::ELEC_TOUC))
         result |= FLAG_CAUSE_MUTATION;
 
-    if (RealmHex(creature_ptr).hex_spelling(HEX_SHOCK_CLOAK) || creature_ptr->ult_res) {
+    if (RealmHex(creature_ptr).is_spelling_specific(HEX_SHOCK_CLOAK) || creature_ptr->ult_res) {
         result |= FLAG_CAUSE_MAGIC_TIME_EFFECT;
     }
 
@@ -842,7 +842,7 @@ BIT_FLAGS has_sh_cold(player_type *creature_ptr)
         result |= FLAG_CAUSE_BATTLE_FORM;
     }
 
-    if (creature_ptr->ult_res || RealmHex(creature_ptr).hex_spelling(HEX_ICE_ARMOR)) {
+    if (creature_ptr->ult_res || RealmHex(creature_ptr).is_spelling_specific(HEX_ICE_ARMOR)) {
         result |= FLAG_CAUSE_MAGIC_TIME_EFFECT;
     }
 
@@ -1167,7 +1167,7 @@ BIT_FLAGS has_regenerate(player_type *creature_ptr)
         result |= FLAG_CAUSE_BATTLE_FORM;
     }
 
-    if (RealmHex(creature_ptr).hex_spelling(HEX_DEMON_AURA) || creature_ptr->ult_res || creature_ptr->tim_regen) {
+    if (RealmHex(creature_ptr).is_spelling_specific(HEX_DEMON_AURA) || creature_ptr->ult_res || creature_ptr->tim_regen) {
         result |= FLAG_CAUSE_MAGIC_TIME_EFFECT;
     }
 
index 92c162d..e27c46e 100644 (file)
@@ -491,9 +491,9 @@ static void update_max_hitpoints(player_type *creature_ptr)
         mhp += 30;
     if (creature_ptr->tsuyoshi)
         mhp += 50;
-    if (RealmHex(creature_ptr).hex_spelling(HEX_XTRA_MIGHT))
+    if (RealmHex(creature_ptr).is_spelling_specific(HEX_XTRA_MIGHT))
         mhp += 15;
-    if (RealmHex(creature_ptr).hex_spelling(HEX_BUILDING))
+    if (RealmHex(creature_ptr).is_spelling_specific(HEX_BUILDING))
         mhp += 60;
     if (creature_ptr->mhp == mhp)
         return;
@@ -1442,7 +1442,7 @@ static int16_t calc_num_blow(player_type *creature_ptr, int i)
                 mul = 4;
             }
 
-            if (RealmHex(creature_ptr).hex_spelling(HEX_XTRA_MIGHT) || RealmHex(creature_ptr).hex_spelling(HEX_BUILDING)) {
+            if (RealmHex(creature_ptr).is_spelling_specific(HEX_XTRA_MIGHT) || RealmHex(creature_ptr).is_spelling_specific(HEX_BUILDING)) {
                 num++;
                 wgt /= 2;
                 mul += 2;
@@ -1710,7 +1710,7 @@ static ARMOUR_CLASS calc_to_ac(player_type *creature_ptr, bool is_real_value)
     }
 
     if (creature_ptr->realm1 == REALM_HEX) {
-        if (RealmHex(creature_ptr).hex_spelling(HEX_ICE_ARMOR)) {
+        if (RealmHex(creature_ptr).is_spelling_specific(HEX_ICE_ARMOR)) {
             ac += 30;
         }
 
@@ -1995,7 +1995,7 @@ static int16_t calc_to_damage(player_type *creature_ptr, INVENTORY_IDX slot, boo
     }
 
     if ((creature_ptr->realm1 == REALM_HEX) && o_ptr->is_cursed()) {
-        if (RealmHex(creature_ptr).hex_spelling(HEX_RUNESWORD)) {
+        if (RealmHex(creature_ptr).is_spelling_specific(HEX_RUNESWORD)) {
             if (o_ptr->curse_flags.has(TRC::CURSED)) {
                 damage += 5;
             }
@@ -2937,7 +2937,7 @@ long calc_score(player_type *creature_ptr)
  */
 bool is_blessed(player_type *creature_ptr)
 {
-    return creature_ptr->blessed || music_singing(creature_ptr, MUSIC_BLESS) || RealmHex(creature_ptr).hex_spelling(HEX_BLESS);
+    return creature_ptr->blessed || music_singing(creature_ptr, MUSIC_BLESS) || RealmHex(creature_ptr).is_spelling_specific(HEX_BLESS);
 }
 
 bool is_tim_esp(player_type *creature_ptr)
@@ -2969,8 +2969,8 @@ void stop_mouth(player_type *caster_ptr)
     if (music_singing_any(caster_ptr))
         stop_singing(caster_ptr);
 
-    if (RealmHex(caster_ptr).hex_spelling_any()) {
-        (void)RealmHex(caster_ptr).stop_hex_spell_all();
+    if (RealmHex(caster_ptr).is_spelling_any()) {
+        (void)RealmHex(caster_ptr).stop_all_spells();
     }
 }
 
index 116d189..b0b81ea 100644 (file)
@@ -92,7 +92,7 @@ bool switch_class_racial_execution(player_type *creature_ptr, const int32_t comm
         return sword_dancing(creature_ptr);
     case CLASS_HIGH_MAGE:
         if (creature_ptr->realm1 == REALM_HEX) {
-            auto retval = RealmHex(creature_ptr).stop_hex_spell();
+            auto retval = RealmHex(creature_ptr).stop_one_spell();
             if (retval) {
                 PlayerEnergy(creature_ptr).set_player_turn_energy(10);
             }
index efc2291..0870bb5 100644 (file)
@@ -31,10 +31,10 @@ RealmHex::RealmHex(player_type *caster_ptr)
 /*!
  * @brief プレイヤーが詠唱中の全呪術を停止する
  */
-bool RealmHex::stop_hex_spell_all()
+bool RealmHex::stop_all_spells()
 {
     for (auto i = 0; i < 32; i++) {
-        if (this->hex_spelling(i)) {
+        if (this->is_spelling_specific(i)) {
             exe_spell(this->caster_ptr, REALM_HEX, i, SPELL_STOP);
         }
     }
@@ -53,15 +53,15 @@ bool RealmHex::stop_hex_spell_all()
 /*!
  * @brief プレイヤーが詠唱中の呪術から一つを選んで停止する
  */
-bool RealmHex::stop_hex_spell()
+bool RealmHex::stop_one_spell()
 {
-    if (!RealmHex(this->caster_ptr).hex_spelling_any()) {
+    if (!RealmHex(this->caster_ptr).is_spelling_any()) {
         msg_print(_("呪文を詠唱していません。", "You are not casting a spell."));
         return false;
     }
 
     if ((casting_hex_num(this->caster_ptr) == 1) || (this->caster_ptr->lev < 35)) {
-        return this->stop_hex_spell_all();
+        return this->stop_all_spells();
     }
 
     char out_val[160];
@@ -106,7 +106,7 @@ bool RealmHex::select_spell_stopping(std::vector<int> &sp, char *out_val, char *
         /* All */
         if (*choice == 'l') {
             screen_load();
-            return this->stop_hex_spell_all();
+            return this->stop_all_spells();
         }
 
         if ((*choice < I2A(0)) || (*choice > I2A(casting_hex_num(this->caster_ptr) - 1))) {
@@ -125,7 +125,7 @@ void RealmHex::display_spells_list(std::vector<int> &sp)
     term_erase(x, y, 255);
     prt(_("     名前", "     Name"), y, x + 5);
     for (auto spell = 0; spell < 32; spell++) {
-        if (this->hex_spelling(spell)) {
+        if (this->is_spelling_specific(spell)) {
             term_erase(x, y + n + 1, 255);
             put_str(format("%c)  %s", I2A(n), exe_spell(this->caster_ptr, REALM_HEX, spell, SPELL_NAME)), y + n + 1, x + 2);
             sp.at(n++) = spell;
@@ -136,7 +136,7 @@ void RealmHex::display_spells_list(std::vector<int> &sp)
 /*!
  * @brief 一定時間毎に呪術で消費するMPを処理する
  */
-void RealmHex::check_hex()
+void RealmHex::decrease_mana()
 {
     /* Spells spelled by player */
     if (this->caster_ptr->realm1 != REALM_HEX) {
@@ -149,7 +149,7 @@ void RealmHex::check_hex()
 
     auto need_restart = this->check_restart();
     if (this->caster_ptr->anti_magic) {
-        this->stop_hex_spell_all();
+        this->stop_all_spells();
         return;
     }
 
@@ -158,7 +158,7 @@ void RealmHex::check_hex()
 
     /* Do any effects of continual spells */
     for (auto spell = 0; spell < 32; spell++) {
-        if (this->hex_spelling(spell)) {
+        if (this->is_spelling_specific(spell)) {
             exe_spell(this->caster_ptr, REALM_HEX, spell, SPELL_CONT);
         }
     }
@@ -173,7 +173,7 @@ void RealmHex::process_mana_cost(const bool need_restart)
 
     auto enough_mana = s64b_cmp(this->caster_ptr->csp, this->caster_ptr->csp_frac, need_mana, need_mana_frac) < 0;
     if (!enough_mana) {
-        this->stop_hex_spell_all();
+        this->stop_all_spells();
         return;
     }
 
@@ -206,7 +206,7 @@ int RealmHex::calc_need_mana()
 {
     auto need_mana = 0;
     for (auto spell = 0; spell < 32; spell++) {
-        if (this->hex_spelling(spell)) {
+        if (this->is_spelling_specific(spell)) {
             const auto *s_ptr = &technic_info[REALM_HEX - MIN_TECHNIC][spell];
             need_mana += mod_need_mana(this->caster_ptr, s_ptr->smana, spell, REALM_HEX);
         }
@@ -218,7 +218,7 @@ int RealmHex::calc_need_mana()
 void RealmHex::gain_exp_from_hex()
 {
     for (auto spell = 0; spell < 32; spell++) {
-        if (!this->hex_spelling(spell)) {
+        if (!this->is_spelling_specific(spell)) {
             continue;
         }
 
@@ -294,7 +294,7 @@ void RealmHex::gain_exp_master(const int spell)
  * @brief プレイヤーの呪術詠唱枠がすでに最大かどうかを返す
  * @return すでに全枠を利用しているならTRUEを返す
  */
-bool RealmHex::hex_spell_fully() const
+bool RealmHex::is_using_full_capacity() const
 {
     auto k_max = (this->caster_ptr->lev / 15) + 1;
     k_max = MIN(k_max, MAX_KEEP);
@@ -304,7 +304,7 @@ bool RealmHex::hex_spell_fully() const
 /*!
  * @brief 一定ゲームターン毎に復讐処理の残り期間の判定を行う
  */
-void RealmHex::revenge_spell()
+void RealmHex::continue_revenge()
 {
     if ((this->caster_ptr->realm1 != REALM_HEX) || (hex_revenge_turn(this->caster_ptr) <= 0)) {
         return;
@@ -326,7 +326,7 @@ void RealmHex::revenge_spell()
  * @brief 復讐ダメージの追加を行う
  * @param dam 蓄積されるダメージ量
  */
-void RealmHex::revenge_store(HIT_POINT dam)
+void RealmHex::store_vengeful_damage(HIT_POINT dam)
 {
     if ((this->caster_ptr->realm1 != REALM_HEX) || (hex_revenge_turn(this->caster_ptr) <= 0)) {
         return;
@@ -345,16 +345,16 @@ bool RealmHex::check_hex_barrier(MONSTER_IDX m_idx, realm_hex_type type) const
 {
     const auto *m_ptr = &this->caster_ptr->current_floor_ptr->m_list[m_idx];
     const auto *r_ptr = &r_info[m_ptr->r_idx];
-    return this->hex_spelling(type) && ((this->caster_ptr->lev * 3 / 2) >= randint1(r_ptr->level));
+    return this->is_spelling_specific(type) && ((this->caster_ptr->lev * 3 / 2) >= randint1(r_ptr->level));
 }
 
-bool RealmHex::hex_spelling(int hex) const
+bool RealmHex::is_spelling_specific(int hex) const
 {
     auto check = static_cast<uint32_t>(this->caster_ptr->magic_num1[0]);
     return (this->caster_ptr->realm1 == REALM_HEX) && any_bits(check, 1U << hex);
 }
 
-bool RealmHex::hex_spelling_any() const
+bool RealmHex::is_spelling_any() const
 {
     return (caster_ptr->realm1 == REALM_HEX) && (caster_ptr->magic_num1[0] != 0);
 }
index f8f0ca8..e9a2036 100644 (file)
@@ -10,15 +10,15 @@ public:
     RealmHex(player_type *caster_ptr);
     virtual ~RealmHex() = default;
 
-    bool stop_hex_spell();
-    void check_hex();
-    bool stop_hex_spell_all();
-    bool hex_spell_fully() const;
-    void revenge_spell();
-    void revenge_store(HIT_POINT dam);
+    bool stop_one_spell();
+    void decrease_mana();
+    bool stop_all_spells();
+    bool is_using_full_capacity() const;
+    void continue_revenge();
+    void store_vengeful_damage(HIT_POINT dam);
     bool check_hex_barrier(MONSTER_IDX m_idx, realm_hex_type type) const;
-    bool hex_spelling(int hex) const;
-    bool hex_spelling_any() const;
+    bool is_spelling_specific(int hex) const;
+    bool is_spelling_any() const;
 
 private:
     player_type *caster_ptr;
index ab3e7c1..369c9be 100644 (file)
@@ -84,7 +84,7 @@ void set_action(player_type *creature_ptr, uint8_t typ)
         stop_singing(creature_ptr);
 
     if (prev_typ == ACTION_SPELL) {
-        (void)RealmHex(creature_ptr).stop_hex_spell();
+        (void)RealmHex(creature_ptr).stop_one_spell();
     }
 
     switch (creature_ptr->action) {
index 8c9c04d..3a2b0f6 100644 (file)
@@ -120,8 +120,8 @@ bool set_confused(player_type *creature_ptr, TIME_EFFECT v)
                 reset_concentration(creature_ptr, true);
 
             RealmHex realm_hex(creature_ptr);
-            if (realm_hex.hex_spelling_any()) {
-                (void)realm_hex.stop_hex_spell_all();
+            if (realm_hex.is_spelling_any()) {
+                (void)realm_hex.stop_all_spells();
             }
 
             notice = true;
@@ -255,8 +255,8 @@ bool set_paralyzed(player_type *creature_ptr, TIME_EFFECT v)
                 reset_concentration(creature_ptr, true);
 
             RealmHex realm_hex(creature_ptr);
-            if (realm_hex.hex_spelling_any()) {
-                (void)realm_hex.stop_hex_spell_all();
+            if (realm_hex.is_spelling_any()) {
+                (void)realm_hex.stop_all_spells();
             }
 
             creature_ptr->counter = false;
@@ -454,8 +454,8 @@ bool set_stun(player_type *creature_ptr, TIME_EFFECT v)
             reset_concentration(creature_ptr, true);
 
         RealmHex realm_hex(creature_ptr);
-        if (realm_hex.hex_spelling_any()) {
-            (void)realm_hex.stop_hex_spell_all();
+        if (realm_hex.is_spelling_any()) {
+            (void)realm_hex.stop_all_spells();
         }
 
         notice = true;
index fe2628b..b57a2fd 100644 (file)
@@ -538,39 +538,39 @@ void print_status(player_type *creature_ptr)
         ADD_BAR_FLAG(BAR_EYEEYE);
 
     if (creature_ptr->realm1 == REALM_HEX) {
-        if (RealmHex(creature_ptr).hex_spelling(HEX_BLESS))
+        if (RealmHex(creature_ptr).is_spelling_specific(HEX_BLESS))
             ADD_BAR_FLAG(BAR_BLESSED);
-        if (RealmHex(creature_ptr).hex_spelling(HEX_DEMON_AURA)) {
+        if (RealmHex(creature_ptr).is_spelling_specific(HEX_DEMON_AURA)) {
             ADD_BAR_FLAG(BAR_SHFIRE);
             ADD_BAR_FLAG(BAR_REGENERATION);
         }
-        if (RealmHex(creature_ptr).hex_spelling(HEX_XTRA_MIGHT))
+        if (RealmHex(creature_ptr).is_spelling_specific(HEX_XTRA_MIGHT))
             ADD_BAR_FLAG(BAR_MIGHT);
-        if (RealmHex(creature_ptr).hex_spelling(HEX_DETECT_EVIL))
+        if (RealmHex(creature_ptr).is_spelling_specific(HEX_DETECT_EVIL))
             ADD_BAR_FLAG(BAR_ESP_EVIL);
-        if (RealmHex(creature_ptr).hex_spelling(HEX_ICE_ARMOR))
+        if (RealmHex(creature_ptr).is_spelling_specific(HEX_ICE_ARMOR))
             ADD_BAR_FLAG(BAR_SHCOLD);
-        if (RealmHex(creature_ptr).hex_spelling(HEX_RUNESWORD))
+        if (RealmHex(creature_ptr).is_spelling_specific(HEX_RUNESWORD))
             ADD_BAR_FLAG(BAR_RUNESWORD);
-        if (RealmHex(creature_ptr).hex_spelling(HEX_BUILDING))
+        if (RealmHex(creature_ptr).is_spelling_specific(HEX_BUILDING))
             ADD_BAR_FLAG(BAR_BUILD);
-        if (RealmHex(creature_ptr).hex_spelling(HEX_ANTI_TELE))
+        if (RealmHex(creature_ptr).is_spelling_specific(HEX_ANTI_TELE))
             ADD_BAR_FLAG(BAR_ANTITELE);
-        if (RealmHex(creature_ptr).hex_spelling(HEX_SHOCK_CLOAK))
+        if (RealmHex(creature_ptr).is_spelling_specific(HEX_SHOCK_CLOAK))
             ADD_BAR_FLAG(BAR_SHELEC);
-        if (RealmHex(creature_ptr).hex_spelling(HEX_SHADOW_CLOAK))
+        if (RealmHex(creature_ptr).is_spelling_specific(HEX_SHADOW_CLOAK))
             ADD_BAR_FLAG(BAR_SHSHADOW);
-        if (RealmHex(creature_ptr).hex_spelling(HEX_CONFUSION))
+        if (RealmHex(creature_ptr).is_spelling_specific(HEX_CONFUSION))
             ADD_BAR_FLAG(BAR_ATTKCONF);
-        if (RealmHex(creature_ptr).hex_spelling(HEX_EYE_FOR_EYE))
+        if (RealmHex(creature_ptr).is_spelling_specific(HEX_EYE_FOR_EYE))
             ADD_BAR_FLAG(BAR_EYEEYE);
-        if (RealmHex(creature_ptr).hex_spelling(HEX_ANTI_MULTI))
+        if (RealmHex(creature_ptr).is_spelling_specific(HEX_ANTI_MULTI))
             ADD_BAR_FLAG(BAR_ANTIMULTI);
-        if (RealmHex(creature_ptr).hex_spelling(HEX_VAMP_BLADE))
+        if (RealmHex(creature_ptr).is_spelling_specific(HEX_VAMP_BLADE))
             ADD_BAR_FLAG(BAR_VAMPILIC);
-        if (RealmHex(creature_ptr).hex_spelling(HEX_ANTI_MAGIC))
+        if (RealmHex(creature_ptr).is_spelling_specific(HEX_ANTI_MAGIC))
             ADD_BAR_FLAG(BAR_ANTIMAGIC);
-        if (RealmHex(creature_ptr).hex_spelling(HEX_CURE_LIGHT) || RealmHex(creature_ptr).hex_spelling(HEX_CURE_SERIOUS) || RealmHex(creature_ptr).hex_spelling(HEX_CURE_CRITICAL))
+        if (RealmHex(creature_ptr).is_spelling_specific(HEX_CURE_LIGHT) || RealmHex(creature_ptr).is_spelling_specific(HEX_CURE_SERIOUS) || RealmHex(creature_ptr).is_spelling_specific(HEX_CURE_CRITICAL))
             ADD_BAR_FLAG(BAR_CURE);
 
         if (hex_revenge_turn(creature_ptr)) {