OSDN Git Service

[Refactor] #37353 コメント整理。 / Refactor comments.
authorDeskull <deskull@users.sourceforge.jp>
Tue, 8 Jan 2019 03:58:36 +0000 (12:58 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Tue, 8 Jan 2019 03:58:36 +0000 (12:58 +0900)
src/cmd2.c
src/dungeon.c
src/effects.c
src/object2.c
src/realm-hex.c
src/realm-song.c
src/spells3.c
src/wizard2.c

index 4101bfd..17a2bdc 100644 (file)
@@ -2189,8 +2189,6 @@ void do_cmd_rest(void)
        /* Save the rest code */
        resting = command_arg;
        p_ptr->action = ACTION_REST;
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Redraw the state */
index 4eeab50..ccf4590 100644 (file)
@@ -1200,8 +1200,6 @@ static void check_music(void)
                        INTERUPTING_SONG_EFFECT(p_ptr) = MUSIC_NONE;
                        msg_print(_("歌を再開した。", "You restart singing."));
                        p_ptr->action = ACTION_SING;
-
-                       /* Recalculate bonuses */
                        p_ptr->update |= (PU_BONUS | PU_HP);
 
                        /* Redraw map and status bar */
index 7920613..853c3a2 100644 (file)
@@ -116,8 +116,6 @@ void set_action(ACTION_IDX typ)
                        break;
                }
        }
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Redraw the state */
@@ -271,8 +269,6 @@ void dispel_player(void)
                SINGING_SONG_EFFECT(p_ptr) = MUSIC_NONE;
                msg_format(_("%sが途切れた。", "Your %s is interrupted."), str);
                p_ptr->action = ACTION_NONE;
-
-               /* Recalculate bonuses */
                p_ptr->update |= (PU_BONUS | PU_HP);
 
                p_ptr->redraw |= (PR_MAP | PR_STATUS | PR_STATE);
@@ -340,8 +336,6 @@ bool set_mimic(TIME_EFFECT v, IDX p, bool do_dec)
 
        /* Redraw title */
        p_ptr->redraw |= (PR_BASIC | PR_STATUS);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS | PU_HP);
 
        handle_stuff();
@@ -793,8 +787,6 @@ bool set_fast(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
        handle_stuff();
        return (TRUE);
@@ -850,8 +842,6 @@ bool set_lightspeed(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
        handle_stuff();
        return (TRUE);
@@ -903,8 +893,6 @@ bool set_slow(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
        handle_stuff();
        return (TRUE);
@@ -960,8 +948,6 @@ bool set_shield(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
        handle_stuff();
        return (TRUE);
@@ -1017,8 +1003,6 @@ bool set_tsubureru(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
        handle_stuff();
        return (TRUE);
@@ -1074,8 +1058,6 @@ bool set_magicdef(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
        handle_stuff();
        return (TRUE);
@@ -1130,8 +1112,6 @@ bool set_blessed(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
        handle_stuff();
        return (TRUE);
@@ -1187,8 +1167,6 @@ bool set_hero(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Recalculate hitpoints */
@@ -1247,8 +1225,6 @@ bool set_shero(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Recalculate hitpoints */
@@ -1373,8 +1349,6 @@ bool set_wraith_form(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
        handle_stuff();
        return (TRUE);
@@ -1447,8 +1421,6 @@ bool set_invuln(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
        handle_stuff();
        return (TRUE);
@@ -1503,8 +1475,6 @@ bool set_tim_esp(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
        p_ptr->update |= (PU_MONSTERS);
        handle_stuff();
@@ -1560,8 +1530,6 @@ bool set_tim_invis(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Update the monsters */
@@ -1619,8 +1587,6 @@ bool set_tim_infra(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Update the monsters */
@@ -1678,8 +1644,6 @@ bool set_tim_regen(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
        handle_stuff();
        return (TRUE);
@@ -1734,8 +1698,6 @@ bool set_tim_stealth(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
        handle_stuff();
        return (TRUE);
@@ -1847,8 +1809,6 @@ bool set_tim_levitation(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
        handle_stuff();
        return (TRUE);
@@ -1956,8 +1916,6 @@ bool set_tim_sh_fire(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
        handle_stuff();
        return (TRUE);
@@ -2012,8 +1970,6 @@ bool set_tim_sh_holy(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
        handle_stuff();
        return (TRUE);
@@ -2068,8 +2024,6 @@ bool set_tim_eyeeye(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
        handle_stuff();
        return (TRUE);
@@ -2125,8 +2079,6 @@ bool set_resist_magic(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
        handle_stuff();
        return (TRUE);
@@ -2181,8 +2133,6 @@ bool set_tim_reflect(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
        handle_stuff();
        return (TRUE);
@@ -2235,8 +2185,6 @@ bool set_multishadow(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
        handle_stuff();
        return (TRUE);
@@ -2291,8 +2239,6 @@ bool set_dustrobe(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
        handle_stuff();
        return (TRUE);
@@ -2347,8 +2293,6 @@ bool set_kabenuke(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
        handle_stuff();
        return (TRUE);
@@ -2409,8 +2353,6 @@ bool set_tsuyoshi(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Recalculate hitpoints */
@@ -2986,8 +2928,6 @@ bool set_stun(TIME_EFFECT v)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Redraw the "stun" */
@@ -3181,8 +3121,6 @@ bool set_cut(TIME_EFFECT v)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Redraw the "cut" */
@@ -3377,8 +3315,6 @@ bool set_food(TIME_EFFECT v)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Redraw hunger */
@@ -3442,8 +3378,6 @@ bool inc_stat(int stat)
                {
                        p_ptr->stat_max[stat] = value;
                }
-
-               /* Recalculate bonuses */
                p_ptr->update |= (PU_BONUS);
 
                /* Success */
@@ -3577,8 +3511,6 @@ bool dec_stat(int stat, int amount, int permanent)
 
                /* Redisplay the stats later */
                p_ptr->redraw |= (PR_STATS);
-
-               /* Recalculate bonuses */
                p_ptr->update |= (PU_BONUS);
        }
 
@@ -3598,8 +3530,6 @@ bool res_stat(int stat)
        {
                /* Restore */
                p_ptr->stat_cur[stat] = p_ptr->stat_max[stat];
-
-               /* Recalculate bonuses */
                p_ptr->update |= (PU_BONUS);
 
                /* Redisplay the stats later */
@@ -3868,8 +3798,6 @@ bool lose_all_info(void)
                /* Hack -- Clear the "felt" flag */
                o_ptr->ident &= ~(IDENT_SENSE);
        }
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Combine / Reorder the pack (later) */
@@ -4684,8 +4612,6 @@ bool set_ultimate_res(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
        handle_stuff();
        return (TRUE);
@@ -4734,8 +4660,6 @@ bool set_tim_res_nether(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
        handle_stuff();
        return (TRUE);
@@ -4784,8 +4708,6 @@ bool set_tim_res_time(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
        handle_stuff();
        return (TRUE);
index daad1a4..9c7e981 100644 (file)
@@ -5653,8 +5653,6 @@ void inven_item_increase(INVENTORY_IDX item, ITEM_NUMBER num)
 
                /* Add the weight */
                p_ptr->total_weight += (num * o_ptr->weight);
-
-               /* Recalculate bonuses */
                p_ptr->update |= (PU_BONUS);
 
                /* Recalculate mana XXX */
@@ -5725,8 +5723,6 @@ void inven_item_optimize(INVENTORY_IDX item)
 
                /* Erase the empty slot */
                object_wipe(&inventory[item]);
-
-               /* Recalculate bonuses */
                p_ptr->update |= (PU_BONUS);
 
                /* Recalculate torch */
@@ -6022,8 +6018,6 @@ s16b inven_carry(object_type *o_ptr)
 
                        /* Increase the weight */
                        p_ptr->total_weight += (o_ptr->number * o_ptr->weight);
-
-                       /* Recalculate bonuses */
                        p_ptr->update |= (PU_BONUS);
 
                        p_ptr->window |= (PW_INVEN);
@@ -6100,8 +6094,6 @@ s16b inven_carry(object_type *o_ptr)
 
        /* Count the items */
        inven_cnt++;
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Combine and Reorder pack */
index 83169c5..9fd9e8f 100644 (file)
@@ -884,8 +884,6 @@ cptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                                        if (p_ptr->stat_cur[i] > p_ptr->stat_max[i])
                                                p_ptr->stat_cur[i] = p_ptr->stat_max[i];
-
-                                       /* Recalculate bonuses */
                                        p_ptr->update |= (PU_BONUS);
 
                                        flag = TRUE;
index 724a4f6..a479e92 100644 (file)
@@ -19,8 +19,6 @@ static void start_singing(SPELL_IDX spell, MAGIC_NUM1 song)
        /* Now the player is singing */
        set_action(ACTION_SING);
 
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Redraw status bar */
@@ -54,8 +52,6 @@ void stop_singing(void)
 
        SINGING_SONG_EFFECT(p_ptr) = MUSIC_NONE;
        SINGING_SONG_ID(p_ptr) = 0;
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Redraw status bar */
index e074f74..200a3b5 100644 (file)
@@ -1037,8 +1037,6 @@ msg_format("%s(%c)は劣化を跳ね返した!",o_name, index_to_label(t) );
 
                chg_virtue(V_HARMONY, 1);
                chg_virtue(V_ENCHANT, -2);
-
-               /* Recalculate bonuses */
                p_ptr->update |= (PU_BONUS);
 
                p_ptr->window |= (PW_EQUIP | PW_PLAYER);
@@ -2127,8 +2125,6 @@ bool enchant(object_type *o_ptr, int n, int eflag)
 
        /* Failure */
        if (!res) return (FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Combine / Reorder the pack (later) */
@@ -2281,8 +2277,7 @@ bool artifact_scroll(void)
 #ifdef JP
                msg_format("%sは既に強化されています!", o_name );
 #else
-               msg_format("The %s %s already %s!",
-                   o_name, ((o_ptr->number > 1) ? "are" : "is"),
+               msg_format("The %s %s already %s!", o_name, ((o_ptr->number > 1) ? "are" : "is"),
                    ((o_ptr->number > 1) ? "customized items" : "a customized item"));
 #endif
        }
@@ -2291,7 +2286,7 @@ bool artifact_scroll(void)
        {
                if (o_ptr->number > 1)
                {
-                       msg_print(_("複数のアイテムに魔法をかけるだけのエネルギーはありません!", "Not enough enough energy to enchant more than one object!"));
+                       msg_print(_("複数のアイテムに魔法をかけるだけのエネルギーはありません!", "Not enough energy to enchant more than one object!"));
 #ifdef JP
                        msg_format("%d 個の%sが壊れた!",(o_ptr->number)-1, o_name);
 #else
@@ -2362,8 +2357,6 @@ bool identify_item(object_type *o_ptr)
 
        /* Player touches it */
        o_ptr->marked |= OM_TOUCHED;
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Combine / Reorder the pack (later) */
@@ -3069,8 +3062,6 @@ msg_format("%s は劣化した!",
 
                }
        }
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        p_ptr->window |= (PW_EQUIP | PW_PLAYER);
@@ -4086,8 +4077,6 @@ msg_format("%sが%sを包み込もうとしたが、%sはそれを跳ね返し
 
                /* Break it */
                o_ptr->ident |= (IDENT_BROKEN);
-
-               /* Recalculate bonuses */
                p_ptr->update |= (PU_BONUS);
 
                /* Recalculate mana */
@@ -4152,8 +4141,6 @@ bool curse_weapon_object(bool force, object_type *o_ptr)
 
                /* Break it */
                o_ptr->ident |= (IDENT_BROKEN);
-
-               /* Recalculate bonuses */
                p_ptr->update |= (PU_BONUS);
 
                /* Recalculate mana */
index ec5724b..d005000 100644 (file)
@@ -985,8 +985,6 @@ static void wiz_reroll_item(object_type *o_ptr)
        {
                /* Apply changes */
                object_copy(o_ptr, q_ptr);
-
-               /* Recalculate bonuses */
                p_ptr->update |= (PU_BONUS);
 
                /* Combine / Reorder the pack (later) */
@@ -1341,8 +1339,6 @@ static void do_cmd_wiz_play(void)
                /* Change */
                object_copy(o_ptr, q_ptr);
 
-
-               /* Recalculate bonuses */
                p_ptr->update |= (PU_BONUS);
 
                /* Combine / Reorder the pack (later) */