OSDN Git Service

[Refactor] #37353 minus_ac() を acid_minus_ac()に改名、処理時メッセージを修正。 / Rename minus_ac...
authorDeskull <deskull@users.sourceforge.jp>
Sun, 13 Jan 2019 09:40:13 +0000 (18:40 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Sun, 13 Jan 2019 09:40:13 +0000 (18:40 +0900)
src/player-damage.c
src/spells3.c

index 993f16c..58ef5d2 100644 (file)
@@ -329,12 +329,12 @@ int inven_damage(inven_func typ, int perc)
 /*!
 * @brief 酸攻撃による装備のAC劣化処理 /
 * Acid has hit the player, attempt to affect some armor.
-* @return è£\85å\82\99ã\81\8cé\85¸ã\82\92æµ´ã\81³たならTRUEを返す
+* @return è£\85å\82\99ã\81«ã\82\88ã\82\8b軽æ¸\9bã\81\8cã\81\82ã\81£たならTRUEを返す
 * @details
 * Note that the "base armor" of an object never changes.
 * If any armor is damaged (or resists), the player takes less damage.
 */
-static bool minus_ac(void)
+static bool acid_minus_ac(void)
 {
        object_type *o_ptr = NULL;
        BIT_FLAGS flgs[TR_FLAG_SIZE];
@@ -352,13 +352,15 @@ static bool minus_ac(void)
        case 7: o_ptr = &inventory[INVEN_FEET]; break;
        }
 
-       /* Nothing to damage */
        if (!o_ptr->k_idx) return (FALSE);
-
        if (!object_is_armour(o_ptr)) return (FALSE);
 
        /* No damage left to be done */
-       if (o_ptr->ac + o_ptr->to_a <= 0) return (FALSE);
+       if (o_ptr->ac + o_ptr->to_a <= 0)
+       {
+               msg_format(_("%sは既にボロボロだ!", "Your %s is already crumble!"), o_name);
+               return (FALSE);
+       }
        object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
        object_flags(o_ptr, flgs);
 
@@ -369,7 +371,7 @@ static bool minus_ac(void)
                return (TRUE);
        }
 
-       msg_format(_("%sがダメージを受けた!", "Your %s is damaged!"), o_name);
+       msg_format(_("%sが酸で腐食した!", "Your %s is corroded!"), o_name);
 
        /* Damage the item */
        o_ptr->to_a--;
@@ -422,7 +424,7 @@ HIT_POINT acid_dam(HIT_POINT dam, concptr kb_str, int monspell, bool aura)
                        (void)do_dec_stat(A_CHR);
 
                /* If any armor gets hit, defend the player */
-               if (minus_ac()) dam = (dam + 1) / 2;
+               if (acid_minus_ac()) dam = (dam + 1) / 2;
        }
 
        get_damage = take_hit(aura ? DAMAGE_NOESCAPE : DAMAGE_ATTACK, dam, kb_str, monspell);
index cad01ec..1f5706b 100644 (file)
@@ -1010,22 +1010,17 @@ bool apply_disenchant(BIT_FLAGS mode)
                return (FALSE);
        }
 
-
        object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
 
-
        /* Artifacts have 71% chance to resist */
        if (object_is_artifact(o_ptr) && (randint0(100) < 71))
        {
 #ifdef JP
-msg_format("%s(%c)は劣化を跳ね返した!",o_name, index_to_label(t) );
+               msg_format("%s(%c)は劣化を跳ね返した!",o_name, index_to_label(t) );
 #else
-               msg_format("Your %s (%c) resist%s disenchantment!",
-                          o_name, index_to_label(t),
-                          ((o_ptr->number != 1) ? "" : "s"));
+               msg_format("Your %s (%c) resist%s disenchantment!", o_name, index_to_label(t),
+                       ((o_ptr->number != 1) ? "" : "s"));
 #endif
-
-
                return (TRUE);
        }
 
@@ -1056,18 +1051,15 @@ msg_format("%s(%c)は劣化を跳ね返した!",o_name, index_to_label(t) );
            (to_a != o_ptr->to_a) || (pval != o_ptr->pval))
        {
 #ifdef JP
-               msg_format("%s(%c)は劣化してしまった!",
-                          o_name, index_to_label(t) );
+               msg_format("%s(%c)は劣化してしまった!", o_name, index_to_label(t) );
 #else
-               msg_format("Your %s (%c) %s disenchanted!",
-                          o_name, index_to_label(t),
-                          ((o_ptr->number != 1) ? "were" : "was"));
+               msg_format("Your %s (%c) %s disenchanted!", o_name, index_to_label(t),
+                       ((o_ptr->number != 1) ? "were" : "was"));
 #endif
 
                chg_virtue(V_HARMONY, 1);
                chg_virtue(V_ENCHANT, -2);
                p_ptr->update |= (PU_BONUS);
-
                p_ptr->window |= (PW_EQUIP | PW_PLAYER);
 
                calc_android_exp();