lore_type *initialize_lore_type(lore_type *lore_ptr, MONRACE_IDX r_idx, BIT_FLAGS mode)
{
+#ifdef JP
+#else
+ lore_ptr->sin = FALSE;
+#endif
lore_ptr->r_idx = r_idx;
lore_ptr->nightmare = ironman_nightmare && !(mode & 0x02);
lore_ptr->r_ptr = &r_info[r_idx];
#ifdef JP
char jverb_buf[64];
#else
- bool sin = FALSE;
+ bool sin;
#endif
bool nightmare;
monster_race *r_ptr;
char tmp_msg[96][96];
bool breath;
bool magic;
+ int drop_quantity;
+ concptr drop_quality;
} lore_type;
typedef void (*hook_c_roff_pf)(TERM_COLOR attr, concptr str);
#include "view/display-lore-status.h"
#include "view/display-lore.h"
-/*!
- * 英語の複数系記述用マクロ / Pluralizer. Args(count, singular, plural)
- */
-#define plural(c, s, p) (((c) == 1) ? (s) : (p))
-
static void set_msex_flags(lore_type *lore_ptr)
{
lore_ptr->msex = MSEX_NONE;
lore_ptr->sin = FALSE;
#endif
- display_monster_drop_numbers(lore_ptr);
- concptr p;
- if (lore_ptr->flags1 & RF1_DROP_GREAT) {
- p = _("特別な", " exceptional");
- } else if (lore_ptr->flags1 & RF1_DROP_GOOD) {
- p = _("上質な", " good");
-#ifdef JP
-#else
- lore_ptr->sin = FALSE;
-#endif
- } else {
- p = NULL;
- }
-
+ display_monster_drop_quantity(lore_ptr);
+ display_monster_drop_quality(lore_ptr);
if (lore_ptr->drop_item) {
#ifdef JP
#else
lore_ptr->sin = FALSE;
#endif
- if (p)
- hooked_roff(p);
+ if (lore_ptr->drop_quality != NULL)
+ hooked_roff(lore_ptr->drop_quality);
+
hooked_roff(_("アイテム", " object"));
#ifdef JP
#else
- if (n != 1)
+ if (lore_ptr->drop_quantity != 1)
hooked_roff("s");
#endif
- p = _("や", " or");
+ lore_ptr->drop_quality = _("や", " or");
}
if (lore_ptr->drop_gold) {
#ifdef JP
#else
- if (!p)
+ if (lore_ptr->drop_quality == NULL)
lore_ptr->sin = FALSE;
if (lore_ptr->sin)
lore_ptr->sin = FALSE;
#endif
- if (p)
- hooked_roff(p);
+ if (lore_ptr->drop_quality != NULL)
+ hooked_roff(lore_ptr->drop_quality);
+
hooked_roff(_("財宝", " treasure"));
#ifdef JP
#else
- if (n != 1)
+ if (lore_ptr->drop_quantity != 1)
hooked_roff("s");
#endif
}
#include "view/display-lore-drops.h"
+#include "monster-race/race-flags1.h"
-void display_monster_drop_numbers(lore_type *lore_ptr)
+void display_monster_drop_quantity(lore_type *lore_ptr)
{
- int n = MAX(lore_ptr->drop_gold, lore_ptr->drop_item);
- if (n == 1) {
+ lore_ptr->drop_quantity = MAX(lore_ptr->drop_gold, lore_ptr->drop_item);
+ if (lore_ptr->drop_quantity == 1) {
hooked_roff(_("一つの", " a"));
#ifdef JP
#else
lore_ptr->sin = TRUE;
#endif
- } else if (n == 2) {
+ } else if (lore_ptr->drop_quantity == 2) {
hooked_roff(_("一つか二つの", " one or two"));
} else {
- hooked_roff(format(_(" %d 個までの", " up to %d"), n));
+ hooked_roff(format(_(" %d 個までの", " up to %d"), lore_ptr->drop_quantity));
+ }
+}
+
+void display_monster_drop_quality(lore_type* lore_ptr)
+{
+ if (lore_ptr->flags1 & RF1_DROP_GREAT) {
+ lore_ptr->drop_quality = _("特別な", " exceptional");
+ } else if (lore_ptr->flags1 & RF1_DROP_GOOD) {
+ lore_ptr->drop_quality = _("上質な", " good");
+#ifdef JP
+#else
+ lore_ptr->sin = FALSE;
+#endif
+ } else {
+ lore_ptr->drop_quality = NULL;
}
}
#include "system/angband.h"
#include "lore/lore-util.h"
-void display_monster_drop_numbers(lore_type *lore_ptr);
+void display_monster_drop_quantity(lore_type *lore_ptr);
+void display_monster_drop_quality(lore_type *lore_ptr);
*/
#include "view/display-lore.h"
+#include "locale/english.h"
#include "locale/japanese.h"
#include "lore/lore-calculator.h"
#include "lore/monster-lore.h"
#include "world/world.h"
/*!
+ * 英語の複数系記述用マクロ / Pluralizer. Args(count, singular, plural)
+ */
+#define plural(c, s, p) (((c) == 1) ? (s) : (p))
+
+/*!
* @brief モンスター情報のヘッダを記述する
* Hack -- Display the "name" and "attr/chars" of a monster race
* @param r_idx モンスターの種族ID