From: Deskull Date: Wed, 2 Jan 2019 03:01:38 +0000 (+0900) Subject: [Refactor] #37353 コメント整理。 / Refactor comments. X-Git-Url: http://git.osdn.net/view?p=hengband%2Fhengband.git;a=commitdiff_plain;h=4a5654d1dcca170329f6980363a8f7dd4142f051 [Refactor] #37353 コメント整理。 / Refactor comments. --- diff --git a/src/birth.c b/src/birth.c index cce13cf36..5b01a9277 100644 --- a/src/birth.c +++ b/src/birth.c @@ -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++; diff --git a/src/cmd-item.c b/src/cmd-item.c index 6551a8739..30bf250f5 100644 --- a/src/cmd-item.c +++ b/src/cmd-item.c @@ -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.")); diff --git a/src/cmd2.c b/src/cmd2.c index 65fd88633..804fc50b4 100644 --- a/src/cmd2.c +++ b/src/cmd2.c @@ -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); diff --git a/src/monster-process.c b/src/monster-process.c index 75413327c..97718f22d 100644 --- a/src/monster-process.c +++ b/src/monster-process.c @@ -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 */ diff --git a/src/monster2.c b/src/monster2.c index 1dbb5a257..b7d81a474 100644 --- a/src/monster2.c +++ b/src/monster2.c @@ -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 */ diff --git a/src/spells1.c b/src/spells1.c index 41d8e4834..1ef3de9ce 100644 --- a/src/spells1.c +++ b/src/spells1.c @@ -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); } diff --git a/src/spells2.c b/src/spells2.c index 1d55577f9..c04df2295 100644 --- a/src/spells2.c +++ b/src/spells2.c @@ -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")); } diff --git a/src/spells3.c b/src/spells3.c index e69cb77ce..4767bc1d7 100644 --- a/src/spells3.c +++ b/src/spells3.c @@ -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); } diff --git a/src/store.c b/src/store.c index 314519114..a4ac28fcf 100644 --- a/src/store.c +++ b/src/store.c @@ -1625,7 +1625,6 @@ bool combine_and_reorder_home(int store_num) /* Take note */ combined = TRUE; - break; } }