OSDN Git Service

"strchr" -> "my_strchr".
[hengband/hengband.git] / src / xtra2.c
index 65b0bb5..ca129b2 100644 (file)
@@ -698,7 +698,7 @@ void monster_death(int m_idx, bool drop_item)
 
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
 
-       bool visible = (m_ptr->ml || (r_ptr->flags1 & RF1_UNIQUE));
+       bool visible = ((m_ptr->ml && !p_ptr->image) || (r_ptr->flags1 & RF1_UNIQUE));
 
        u32b mo_mode = 0L;
 
@@ -1649,9 +1649,9 @@ static void get_exp_from_mon(int dam, monster_type *m_ptr)
 
        /* Use (average maxhp * 2) as a denominator */
        if (!(r_ptr->flags1 & RF1_FORCE_MAXHP))
-               s64b_mul(&div_h, &div_l, 0, r_ptr->hdice * (r_ptr->hside + 1));
+               s64b_mul(&div_h, &div_l, 0, r_ptr->hdice * (ironman_nightmare ? 2 : 1) * (r_ptr->hside + 1));
        else
-               s64b_mul(&div_h, &div_l, 0, r_ptr->hdice * r_ptr->hside * 2);
+               s64b_mul(&div_h, &div_l, 0, r_ptr->hdice * (ironman_nightmare ? 2 : 1) * r_ptr->hside * 2);
 
        /* Special penalty in the wilderness */
        if (!dun_level && (!(r_ptr->flags8 & RF8_WILD_ONLY) || !(r_ptr->flags1 & RF1_UNIQUE)))
@@ -1803,7 +1803,7 @@ bool mon_take_hit(int m_idx, int dam, bool *fear, cptr note)
                if (r_ptr->r_akills < MAX_SHORT) r_ptr->r_akills++;
 
                /* Recall even invisible uniques or winners */
-               if (m_ptr->ml || (r_ptr->flags1 & RF1_UNIQUE))
+               if ((m_ptr->ml && !p_ptr->image) || (r_ptr->flags1 & RF1_UNIQUE))
                {
                        /* Count kills this life */
                        if ((m_ptr->mflag2 & MFLAG2_KAGE) && (r_info[MON_KAGE].r_pkills < MAX_SHORT)) r_info[MON_KAGE].r_pkills++;
@@ -3081,6 +3081,8 @@ static void evaluate_monster_exp(char *buf, monster_type *m_ptr)
 }
 
 
+bool show_gold_on_floor = FALSE;
+
 /*
  * Examine a grid, return a keypress.
  *
@@ -3432,7 +3434,9 @@ static int target_set_aux(int y, int x, int mode, cptr info)
                                screen_save();
 
                                /* Display */
+                               show_gold_on_floor = TRUE;
                                (void)show_floor(0, y, x, &min_width);
+                               show_gold_on_floor = FALSE;
 
                                /* Prompt */
 #ifdef JP
@@ -3567,8 +3571,36 @@ static int target_set_aux(int y, int x, int mode, cptr info)
        {
                cptr name;
 
+               /* Hack -- special handling for quest entrances */
+               if (have_flag(f_ptr->flags, FF_QUEST_ENTER))
+               {
+                       /* Set the quest number temporary */
+                       int old_quest = p_ptr->inside_quest;
+                       int j;
+
+                       /* Clear the text */
+                       for (j = 0; j < 10; j++) quest_text[j][0] = '\0';
+                       quest_text_line = 0;
+
+                       p_ptr->inside_quest = c_ptr->special;
+
+                       /* Get the quest text */
+                       init_flags = INIT_SHOW_TEXT;
+
+                       process_dungeon_file("q_info.txt", 0, 0, 0, 0);
+
+#ifdef JP
+                       name = format("¥¯¥¨¥¹¥È¡Ö%s¡×(%d³¬ÁêÅö)", quest[c_ptr->special].name, quest[c_ptr->special].level);
+#else
+                       name = format("the entrance to the quest '%s'(level %d)", quest[c_ptr->special].name, quest[c_ptr->special].level);
+#endif
+
+                       /* Reset the old quest number */
+                       p_ptr->inside_quest = old_quest;
+               }
+
                /* Hack -- special handling for building doors */
-               if (have_flag(f_ptr->flags, FF_BLDG) && !p_ptr->inside_arena)
+               else if (have_flag(f_ptr->flags, FF_BLDG) && !p_ptr->inside_arena)
                {
                        name = building[f_ptr->subtype].name;
                }
@@ -3613,6 +3645,7 @@ static int target_set_aux(int y, int x, int mode, cptr info)
 
                /* Hack -- special introduction for store & building doors -KMW- */
                if (have_flag(f_ptr->flags, FF_STORE) ||
+                   have_flag(f_ptr->flags, FF_QUEST_ENTER) ||
                    (have_flag(f_ptr->flags, FF_BLDG) && !p_ptr->inside_arena) ||
                    have_flag(f_ptr->flags, FF_ENTRANCE))
                {