From b5646e8a6f505c0f1fe3112c15b59ed780bb8f9f Mon Sep 17 00:00:00 2001 From: Hourier Date: Thu, 11 Jun 2020 23:04:48 +0900 Subject: [PATCH] [Refactor] #40414 Separated display_monster_alignment() from process_monster_lore(); such as lawful, neutral and chaos...no, good, neutral and evil --- src/lore/monster-lore.c | 19 +------------------ src/view/display-monster-lore.c | 21 +++++++++++++++++++++ src/view/display-monster-lore.h | 1 + 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/src/lore/monster-lore.c b/src/lore/monster-lore.c index 53ac327ab..b07f3f52b 100644 --- a/src/lore/monster-lore.c +++ b/src/lore/monster-lore.c @@ -319,24 +319,7 @@ void process_monster_lore(player_type *player_ptr, MONRACE_IDX r_idx, BIT_FLAGS } #endif - if (lore_ptr->flags2 & RF2_ELDRITCH_HORROR) - hook_c_roff(TERM_VIOLET, _("狂気を誘う", " sanity-blasting")); - - if (lore_ptr->flags3 & RF3_ANIMAL) - hook_c_roff(TERM_L_GREEN, _("自然界の", " natural")); - - if (lore_ptr->flags3 & RF3_EVIL) - hook_c_roff(TERM_L_DARK, _("邪悪なる", " evil")); - - if (lore_ptr->flags3 & RF3_GOOD) - hook_c_roff(TERM_YELLOW, _("善良な", " good")); - - if (lore_ptr->flags3 & RF3_UNDEAD) - hook_c_roff(TERM_VIOLET, _("アンデッドの", " undead")); - - if (lore_ptr->flags3 & RF3_AMBERITE) - hook_c_roff(TERM_VIOLET, _("アンバーの王族の", " Amberite")); - + display_monster_alignment(lore_ptr); display_monster_kind(lore_ptr); #ifdef JP hooked_roff("を倒すことは"); diff --git a/src/view/display-monster-lore.c b/src/view/display-monster-lore.c index 8def5e771..1f25f02f5 100644 --- a/src/view/display-monster-lore.c +++ b/src/view/display-monster-lore.c @@ -313,3 +313,24 @@ void display_monster_kind(lore_type *lore_ptr) if (lore_ptr->flags3 & RF3_ANGEL) hook_c_roff(TERM_YELLOW, _("天使", " angel")); } + +void display_monster_alignment(lore_type *lore_ptr) +{ + if (lore_ptr->flags2 & RF2_ELDRITCH_HORROR) + hook_c_roff(TERM_VIOLET, _("狂気を誘う", " sanity-blasting")); + + if (lore_ptr->flags3 & RF3_ANIMAL) + hook_c_roff(TERM_L_GREEN, _("自然界の", " natural")); + + if (lore_ptr->flags3 & RF3_EVIL) + hook_c_roff(TERM_L_DARK, _("邪悪なる", " evil")); + + if (lore_ptr->flags3 & RF3_GOOD) + hook_c_roff(TERM_YELLOW, _("善良な", " good")); + + if (lore_ptr->flags3 & RF3_UNDEAD) + hook_c_roff(TERM_VIOLET, _("アンデッドの", " undead")); + + if (lore_ptr->flags3 & RF3_AMBERITE) + hook_c_roff(TERM_VIOLET, _("アンバーの王族の", " Amberite")); +} diff --git a/src/view/display-monster-lore.h b/src/view/display-monster-lore.h index 004be96f3..019cc386b 100644 --- a/src/view/display-monster-lore.h +++ b/src/view/display-monster-lore.h @@ -13,3 +13,4 @@ void display_random_move(lore_type *lore_ptr); void display_monster_move(lore_type *lore_ptr); void display_monster_never_move(lore_type *lore_ptr); void display_monster_kind(lore_type *lore_ptr); +void display_monster_alignment(lore_type *lore_ptr); -- 2.11.0