OSDN Git Service

[Refactor] #37353 コメント整理。 / Refactor comments.
authorDeskull <deskull@users.sourceforge.jp>
Wed, 2 Jan 2019 03:01:38 +0000 (12:01 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Wed, 2 Jan 2019 03:01:38 +0000 (12:01 +0900)
src/birth.c
src/cmd-item.c
src/cmd2.c
src/monster-process.c
src/monster2.c
src/spells1.c
src/spells2.c
src/spells3.c
src/store.c

index cce13cf..5b01a92 100644 (file)
@@ -2012,11 +2012,8 @@ static void wield_all(void)
                if (slot == INVEN_LITE) continue; /* Does not wield toaches because buys a lantern soon */
                if (inventory[slot].k_idx) continue; 
  
-               /* Get local object */ 
                i_ptr = &object_type_body; 
                object_copy(i_ptr, o_ptr); 
-               /* Modify quantity */ 
                i_ptr->number = 1; 
  
                /* Decrease the item (from the pack) */ 
@@ -2033,14 +2030,9 @@ static void wield_all(void)
                        floor_item_optimize(0 - item); 
                } 
  
-               /* Get the wield slot */ 
                o_ptr = &inventory[slot]; 
-               /* Wear the new stuff */ 
-               object_copy(o_ptr, i_ptr); 
-               /* Increase the weight */ 
-               p_ptr->total_weight += i_ptr->weight; 
+               object_copy(o_ptr, i_ptr); 
+               p_ptr->total_weight += i_ptr->weight; 
  
                /* Increment the equip counter by hand */ 
                equip_cnt++;
index 6551a87..30bf250 100644 (file)
@@ -449,14 +449,12 @@ void do_cmd_wield(void)
                break;
        }
 
-       /* Describe the result */
        object_desc(o_name, o_ptr, 0);
        msg_format(act, o_name, index_to_label(slot));
 
        /* Cursed! */
        if (object_is_cursed(o_ptr))
        {
-               /* Warn the player */
                msg_print(_("うわ! すさまじく冷たい!", "Oops! It feels deathly cold!"));
                chg_virtue(V_HARMONY, -1);
 
@@ -471,17 +469,8 @@ void do_cmd_wield(void)
                change_race(RACE_VAMPIRE, "");
        }
 
-       /* Recalculate bonuses */
-       p_ptr->update |= (PU_BONUS);
-
-       /* Recalculate torch */
-       p_ptr->update |= (PU_TORCH);
-
-       /* Recalculate mana */
-       p_ptr->update |= (PU_MANA);
-
+       p_ptr->update |= (PU_BONUS | PU_TORCH | PU_MANA);
        p_ptr->redraw |= (PR_EQUIPPY);
-
        p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
 
        calc_android_exp();
@@ -513,9 +502,9 @@ void kamaenaoshi(INVENTORY_IDX item)
                                inven_item_optimize(INVEN_LARM);
                                if (object_allow_two_hands_wielding(o_ptr) && CAN_TWO_HANDS_WIELDING())
                                        msg_format(_("%sを両手で構えた。", "You are wielding %s with both hands."), o_name);
-                                else
-                               msg_format(_("%sを%sで構えた。", "You are wielding %s in your %s hand."), o_name, 
-                                                       (left_hander ? _("左手", "left") : _("右手", "right")));
+                               else
+                                       msg_format(_("%sを%sで構えた。", "You are wielding %s in your %s hand."), o_name, 
+                                               (left_hander ? _("左手", "left") : _("右手", "right")));
                        }
                        else
                        {
@@ -596,17 +585,11 @@ void do_cmd_takeoff(void)
                {
                        msg_print(_("呪われた装備を力づくで剥がした!", "You teared a cursed equipment off by sheer strength!"));
 
-                       /* Hack -- Assume felt */
                        o_ptr->ident |= (IDENT_SENSE);
-
                        o_ptr->curse_flags = 0L;
-
-                       /* Take note */
                        o_ptr->feeling = FEEL_NONE;
 
-                       /* Recalculate the bonuses */
                        p_ptr->update |= (PU_BONUS);
-
                        p_ptr->window |= (PW_EQUIP);
 
                        msg_print(_("呪いを打ち破った。", "You break the curse."));
index 65fd886..804fc50 100644 (file)
@@ -3087,16 +3087,11 @@ void do_cmd_fire_aux(INVENTORY_IDX item, object_type *j_ptr)
                                        /* Anger the monster */
                                        if (tdam > 0) anger_monster(m_ptr);
 
-                                       /* Take note */
                                        if (fear && m_ptr->ml)
                                        {
                                                char m_name[80];
-
                                                sound(SOUND_FLEE);
-
-                                               /* Get the monster name (or "it") */
                                                monster_desc(m_name, m_ptr, 0);
-
                                                msg_format(_("%^sは恐怖して逃げ出した!", "%^s flees in terror!"), m_name);
                                        }
 
@@ -3658,12 +3653,9 @@ bool do_cmd_throw(int mult, bool boomerang, OBJECT_IDX shuriken)
                                        if ((tdam > 0) && !object_is_potion(q_ptr))
                                                anger_monster(m_ptr);
 
-                                       /* Take note */
                                        if (fear && m_ptr->ml)
                                        {
                                                sound(SOUND_FLEE);
-
-                                               /* Get the monster name (or "it") */
                                                char m_name[80];
                                                monster_desc(m_name, m_ptr, 0);
                                                msg_format(_("%^sは恐怖して逃げ出した!", "%^s flees in terror!"), m_name);
index 7541332..97718f2 100644 (file)
@@ -3125,7 +3125,6 @@ void process_monster(MONSTER_IDX m_idx)
                                                /* Only give a message for "take_item" */
                                                if (do_take && (r_ptr->flags2 & RF2_STUPID))
                                                {
-                                                       /* Take note */
                                                        did_take_item = TRUE;
 
                                                        /* Describe observable situations */
@@ -3139,7 +3138,6 @@ void process_monster(MONSTER_IDX m_idx)
                                        /* Pick up the item */
                                        else if (do_take)
                                        {
-                                               /* Take note */
                                                did_take_item = TRUE;
 
                                                /* Describe observable situations */
@@ -3170,7 +3168,6 @@ void process_monster(MONSTER_IDX m_idx)
                                        /* Destroy the item if not a pet */
                                        else if (!is_pet(m_ptr))
                                        {
-                                               /* Take note */
                                                did_kill_item = TRUE;
 
                                                /* Describe observable situations */
index 1dbb5a2..b7d81a4 100644 (file)
@@ -2473,7 +2473,6 @@ void update_monster(MONSTER_IDX m_idx, bool full)
                                /* Handle "cold blooded" monsters */
                                if ((r_ptr->flags2 & (RF2_COLD_BLOOD | RF2_AURA_FIRE)) == RF2_COLD_BLOOD)
                                {
-                                       /* Take note */
                                        do_cold_blood = TRUE;
                                }
 
@@ -2491,7 +2490,6 @@ void update_monster(MONSTER_IDX m_idx, bool full)
                                /* Handle "invisible" monsters */
                                if (r_ptr->flags2 & (RF2_INVISIBLE))
                                {
-                                       /* Take note */
                                        do_invisible = TRUE;
 
                                        /* See invisible */
index 41d8e48..1ef3de9 100644 (file)
@@ -4901,11 +4901,9 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                        if (((dam > 0) || get_angry) && !do_sleep)
                                anger_monster(m_ptr);
 
-                       /* Take note */
                        if ((fear || do_fear) && seen)
                        {
                                sound(SOUND_FLEE);
-
                                msg_format(_("%^sは恐怖して逃げ出した!", "%^s flees in terror!"), m_name);
                        }
 
index 1d55577..c04df22 100644 (file)
@@ -1102,7 +1102,6 @@ bool symbol_genocide(int power, bool player_cast)
                /* Skip "wrong" monsters */
                if (r_ptr->d_char != typ) continue;
 
-               /* Take note */
                result |= genocide_aux(i, power, player_cast, 4, _("抹殺", "Genocide"));
        }
 
index e69cb77..4767bc1 100644 (file)
@@ -1872,12 +1872,9 @@ static int remove_curse_aux(int all)
                /* Hack -- Assume felt */
                o_ptr->ident |= (IDENT_SENSE);
 
-               /* Take note */
                o_ptr->feeling = FEEL_NONE;
 
-               /* Recalculate the bonuses */
                p_ptr->update |= (PU_BONUS);
-
                p_ptr->window |= (PW_EQUIP);
 
                /* Count the uncursings */
@@ -3022,12 +3019,10 @@ bool bless_weapon(void)
                /* Hack -- Assume felt */
                o_ptr->ident |= (IDENT_SENSE);
 
-               /* Take note */
                o_ptr->feeling = FEEL_NONE;
 
                /* Recalculate the bonuses */
                p_ptr->update |= (PU_BONUS);
-
                p_ptr->window |= (PW_EQUIP);
        }
 
index 3145191..a4ac28f 100644 (file)
@@ -1625,7 +1625,6 @@ bool combine_and_reorder_home(int store_num)
 
                                        /* Take note */
                                        combined = TRUE;
-
                                        break;
                                }
                        }