• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision76bc97f30bf55a3c70fd5de087306953d1d089b2 (tree)
Time2018-12-03 23:39:49
AuthorDeskull <deskull@user...>
CommiterDeskull

Log Message

[Refactor] #37353 コメント整理 / Refactor comments.

Change Summary

Incremental Difference

--- a/src/melee1.c
+++ b/src/melee1.c
@@ -2072,7 +2072,6 @@ bool make_attack_normal(MONSTER_IDX m_idx)
20722072
20732073 /* Combine / Reorder the pack */
20742074 p_ptr->notice |= (PN_COMBINE | PN_REORDER);
2075-
20762075 p_ptr->window |= (PW_INVEN);
20772076
20782077 break;
@@ -2161,9 +2160,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
21612160
21622161 /* Occasional "blink" anyway */
21632162 blinked = TRUE;
2164-
21652163 obvious = TRUE;
2166-
21672164 break;
21682165 }
21692166
@@ -2321,18 +2318,10 @@ bool make_attack_normal(MONSTER_IDX m_idx)
23212318 {
23222319 if (explode) break;
23232320 obvious = TRUE;
2324-
23252321 msg_print(_("酸を浴びせられた!", "You are covered in acid!"));
2326-
2327- /* Special damage */
23282322 get_damage += acid_dam(damage, ddesc, -1, FALSE);
2329-
2330- /* Hack -- Update AC */
23312323 update_stuff();
2332-
2333- /* Learn about the player */
23342324 update_smart_learn(m_idx, DRS_ACID);
2335-
23362325 break;
23372326 }
23382327
@@ -2340,15 +2329,9 @@ bool make_attack_normal(MONSTER_IDX m_idx)
23402329 {
23412330 if (explode) break;
23422331 obvious = TRUE;
2343-
23442332 msg_print(_("電撃を浴びせられた!", "You are struck by electricity!"));
2345-
2346- /* Special damage */
23472333 get_damage += elec_dam(damage, ddesc, -1, FALSE);
2348-
2349- /* Learn about the player */
23502334 update_smart_learn(m_idx, DRS_ELEC);
2351-
23522335 break;
23532336 }
23542337
@@ -2356,15 +2339,9 @@ bool make_attack_normal(MONSTER_IDX m_idx)
23562339 {
23572340 if (explode) break;
23582341 obvious = TRUE;
2359-
23602342 msg_print(_("全身が炎に包まれた!", "You are enveloped in flames!"));
2361-
2362- /* Special damage */
23632343 get_damage += fire_dam(damage, ddesc, -1, FALSE);
2364-
2365- /* Learn about the player */
23662344 update_smart_learn(m_idx, DRS_FIRE);
2367-
23682345 break;
23692346 }
23702347
@@ -2372,22 +2349,15 @@ bool make_attack_normal(MONSTER_IDX m_idx)
23722349 {
23732350 if (explode) break;
23742351 obvious = TRUE;
2375-
23762352 msg_print(_("全身が冷気で覆われた!", "You are covered with frost!"));
2377-
2378- /* Special damage */
23792353 get_damage += cold_dam(damage, ddesc, -1, FALSE);
2380-
2381- /* Learn about the player */
23822354 update_smart_learn(m_idx, DRS_COLD);
2383-
23842355 break;
23852356 }
23862357
23872358 case RBE_BLIND:
23882359 {
23892360 get_damage += take_hit(DAMAGE_ATTACK, damage, ddesc, -1);
2390-
23912361 if (p_ptr->is_dead) break;
23922362
23932363 /* Increase "blind" */
--- a/src/monster-process.c
+++ b/src/monster-process.c
@@ -212,7 +212,6 @@ void mon_take_hit_mon(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note, I
212212 if (p_ptr->riding == m_idx) p_ptr->redraw |= (PR_UHEALTH);
213213 }
214214
215- /* Wake it up */
216215 (void)set_monster_csleep(m_idx, 0);
217216
218217 if (p_ptr->riding && (m_idx == p_ptr->riding)) disturb(TRUE, TRUE);
@@ -1508,7 +1507,6 @@ static bool monst_attack_monst(MONSTER_IDX m_idx, MONSTER_IDX t_idx)
15081507 /* Monster hits */
15091508 if (!effect || check_hit2(power, rlev, ac, MON_STUNNED(m_ptr)))
15101509 {
1511- /* Wake it up */
15121510 (void)set_monster_csleep(t_idx, 0);
15131511
15141512 if (t_ptr->ml)
@@ -1962,7 +1960,6 @@ static bool monst_attack_monst(MONSTER_IDX m_idx, MONSTER_IDX t_idx)
19621960 case RBM_ENGULF:
19631961 case RBM_CHARGE:
19641962 {
1965- /* Wake it up */
19661963 (void)set_monster_csleep(t_idx, 0);
19671964
19681965 /* Visible monsters */
--- a/src/xtra2.c
+++ b/src/xtra2.c
@@ -1552,15 +1552,14 @@ static void get_exp_from_mon(HIT_POINT dam, monster_type *m_ptr)
15521552 */
15531553 bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note)
15541554 {
1555- monster_type *m_ptr = &m_list[m_idx];
1556- monster_race *r_ptr = &r_info[m_ptr->r_idx];
1557-
1558- monster_type exp_mon;
1555+ monster_type *m_ptr = &m_list[m_idx];
1556+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
1557+ monster_type exp_mon;
15591558
15601559 /* Innocent until proven otherwise */
1561- bool innocent = TRUE, thief = FALSE;
1562- int i;
1563- int expdam;
1560+ bool innocent = TRUE, thief = FALSE;
1561+ int i;
1562+ HIT_POINT expdam;
15641563
15651564 (void)COPY(&exp_mon, m_ptr, monster_type);
15661565
@@ -1575,7 +1574,6 @@ bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note)
15751574 if (p_ptr->health_who == m_idx) p_ptr->redraw |= (PR_HEALTH);
15761575 if (p_ptr->riding == m_idx) p_ptr->redraw |= (PR_UHEALTH);
15771576
1578- /* Wake it up */
15791577 (void)set_monster_csleep(m_idx, 0);
15801578
15811579 /* Hack - Cancel any special player stealth magics. -LM- */
@@ -1587,15 +1585,14 @@ bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note)
15871585 /* Genocided by chaos patron */
15881586 if (!m_idx) return TRUE;
15891587
1590- /* Hurt it */
15911588 m_ptr->hp -= dam;
1592-
15931589 m_ptr->dealt_damage += dam;
1590+
15941591 if(m_ptr->dealt_damage > m_ptr->max_maxhp * 100) m_ptr->dealt_damage = m_ptr->max_maxhp * 100;
1592+
15951593 if (p_ptr->wizard)
15961594 {
1597- msg_format( _("合計%d/%dのダメージを与えた。","You do %d (out of %d) damage."),
1598- m_ptr->dealt_damage, m_ptr->maxhp);
1595+ msg_format( _("合計%d/%dのダメージを与えた。","You do %d (out of %d) damage."), m_ptr->dealt_damage, m_ptr->maxhp);
15991596 }
16001597
16011598 /* It is dead now */
@@ -1694,8 +1691,9 @@ bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note)
16941691
16951692 /* Dump a message */
16961693 if (!get_rnd_line(_("mondeath_j.txt", "mondeath.txt"), m_ptr->r_idx, line_got))
1697-
1694+ {
16981695 msg_format("%^s %s", m_name, line_got);
1696+ }
16991697
17001698 #ifdef WORLD_SCORE
17011699 if (m_ptr->r_idx == MON_SERPENT)
@@ -1743,8 +1741,7 @@ bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note)
17431741 chg_virtue(V_COMPASSION, -1);
17441742 }
17451743
1746- if ((r_ptr->flags3 & RF3_GOOD) &&
1747- ((r_ptr->level) / 10 + (3 * dun_level) >= randint1(100)))
1744+ if ((r_ptr->flags3 & RF3_GOOD) && ((r_ptr->level) / 10 + (3 * dun_level) >= randint1(100)))
17481745 chg_virtue(V_UNLIFE, 1);
17491746
17501747 if (r_ptr->d_char == 'A')
@@ -1801,8 +1798,7 @@ bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note)
18011798 {
18021799 if (r_ptr->flags1 & RF1_UNIQUE)
18031800 chg_virtue(V_JUSTICE, 3);
1804- else if (1+((r_ptr->level) / 10 + (2 * dun_level))
1805- >= randint1(100))
1801+ else if (1+((r_ptr->level) / 10 + (2 * dun_level)) >= randint1(100))
18061802 chg_virtue(V_JUSTICE, 1);
18071803 }
18081804 else if (innocent)
@@ -1818,11 +1814,7 @@ bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note)
18181814 if ((r_ptr->flags1 & RF1_UNIQUE) && record_destroy_uniq)
18191815 {
18201816 char note_buf[160];
1821-#ifdef JP
1822- sprintf(note_buf, "%s%s", r_name + r_ptr->name, (m_ptr->smart & SM_CLONED) ? "(クローン)" : "");
1823-#else
1824- sprintf(note_buf, "%s%s", r_name + r_ptr->name, (m_ptr->smart & SM_CLONED) ? "(Clone)" : "");
1825-#endif
1817+ sprintf(note_buf, "%s%s", r_name + r_ptr->name, (m_ptr->smart & SM_CLONED) ? _("(クローン)", "(Clone)") : "");
18261818 do_cmd_write_nikki(NIKKI_UNIQUE, 0, note_buf);
18271819 }
18281820
--- a/src/z-form.c
+++ b/src/z-form.c
@@ -11,7 +11,6 @@
1111 /* Purpose: Low level text formatting -BEN- */
1212
1313 #include "z-form.h"
14-
1514 #include "z-util.h"
1615 #include "z-virt.h"
1716
Show on old repository browser