/* Create stairs down */
- cave_set_feat(y, x, FEAT_MORE);
+ cave_set_feat(y, x, feat_down_stair);
/* Remember to update everything */
p_ptr->update |= (PU_FLOW);
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;
/* Drop a dead corpse? */
if (one_in_(r_ptr->flags1 & RF1_UNIQUE ? 1 : 4) &&
- ((r_ptr->flags9 & RF9_DROP_CORPSE) ||
- (r_ptr->flags9 & RF9_DROP_SKELETON)) &&
+ (r_ptr->flags9 & (RF9_DROP_CORPSE | RF9_DROP_SKELETON)) &&
!(p_ptr->inside_arena || p_ptr->inside_battle || cloned || ((m_ptr->r_idx == today_mon) && is_pet(m_ptr))))
{
/* Assume skeleton */
*/
if (!(r_ptr->flags9 & RF9_DROP_SKELETON))
corpse = TRUE;
- else if ((r_ptr->flags9 & RF9_DROP_CORPSE) && (r_ptr->flags1 && RF1_UNIQUE))
+ else if ((r_ptr->flags9 & RF9_DROP_CORPSE) && (r_ptr->flags1 & RF1_UNIQUE))
corpse = TRUE;
/* Else, a corpse is more likely unless we did a "lot" of damage */
if (p_ptr->pseikaku == SEIKAKU_NAMAKE)
{
int a_idx = 0;
+ artifact_type *a_ptr = NULL;
if (!drop_chosen_item) break;
a_idx = ART_NAMAKE_ARMOR;
break;
}
+
+ a_ptr = &a_info[a_idx];
}
- while (a_info[a_idx].cur_num);
+ while (a_ptr->cur_num);
- if (a_info[a_idx].cur_num == 0)
+ /* Create the artifact */
+ if (create_named_art(a_idx, y, x))
{
- /* Create the artifact */
- create_named_art(a_idx, y, x);
- a_info[a_idx].cur_num = 1;
+ a_ptr->cur_num = 1;
+
+ /* Hack -- Memorize location of artifact in saved floors */
+ if (character_dungeon) a_ptr->floor_id = p_ptr->floor_id;
}
+ else if (!preserve_mode) a_ptr->cur_num = 1;
}
break;
case MON_A_GOLD:
case MON_A_SILVER:
if (drop_chosen_item && ((m_ptr->r_idx == MON_A_GOLD) ||
- ((m_ptr->r_idx == MON_A_SILVER) && (r_ptr->r_pkills % 5 == 0))))
+ ((m_ptr->r_idx == MON_A_SILVER) && (r_ptr->r_akills % 5 == 0))))
{
/* Get local object */
q_ptr = &forge;
/* Activate restriction */
get_obj_num_hook = kind_is_hafted;
- /* Make a poleweapon */
+ /* Make a hafted weapon */
make_object(q_ptr, mo_mode);
/* Drop it in the dungeon */
if ((a_idx > 0) && ((randint0(100) < chance) || p_ptr->wizard))
{
- if (a_info[a_idx].cur_num == 0)
+ artifact_type *a_ptr = &a_info[a_idx];
+
+ if (!a_ptr->cur_num)
{
/* Create the artifact */
- create_named_art(a_idx, y, x);
- a_info[a_idx].cur_num = 1;
+ if (create_named_art(a_idx, y, x))
+ {
+ a_ptr->cur_num = 1;
+
+ /* Hack -- Memorize location of artifact in saved floors */
+ if (character_dungeon) a_ptr->floor_id = p_ptr->floor_id;
+ }
+ else if (!preserve_mode) a_ptr->cur_num = 1;
}
}
if (d_info[dungeon_type].final_artifact)
{
int a_idx = d_info[dungeon_type].final_artifact;
- if (!a_info[a_idx].cur_num)
+ artifact_type *a_ptr = &a_info[a_idx];
+
+ if (!a_ptr->cur_num)
{
/* Create the artifact */
- create_named_art(a_idx, y, x);
- a_info[a_idx].cur_num = 1;
+ if (create_named_art(a_idx, y, x))
+ {
+ a_ptr->cur_num = 1;
+
+ /* Hack -- Memorize location of artifact in saved floors */
+ if (character_dungeon) a_ptr->floor_id = p_ptr->floor_id;
+ }
+ else if (!preserve_mode) a_ptr->cur_num = 1;
/* Prevent rewarding both artifact and "default" object */
if (!d_info[dungeon_type].final_object) k_idx = 0;
/* 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)))
/* Special penalty for mutiply-monster */
if ((r_ptr->flags2 & RF2_MULTIPLY) || (m_ptr->r_idx == MON_DAWN))
{
- int monnum_penarty = r_ptr->r_pkills / 400;
+ int monnum_penarty = r_ptr->r_akills / 400;
if (monnum_penarty > 8) monnum_penarty = 8;
while (monnum_penarty--)
{
r_info[MON_BANORLUPART].max_num = 0;
r_info[MON_BANORLUPART].r_pkills++;
+ r_info[MON_BANORLUPART].r_akills++;
if (r_info[MON_BANORLUPART].r_tkills < MAX_SHORT) r_info[MON_BANORLUPART].r_tkills++;
}
else if (m_ptr->r_idx == MON_BANORLUPART)
{
r_info[MON_BANOR].max_num = 0;
r_info[MON_BANOR].r_pkills++;
+ r_info[MON_BANOR].r_akills++;
if (r_info[MON_BANOR].r_tkills < MAX_SHORT) r_info[MON_BANOR].r_tkills++;
r_info[MON_LUPART].max_num = 0;
r_info[MON_LUPART].r_pkills++;
+ r_info[MON_LUPART].r_akills++;
if (r_info[MON_LUPART].r_tkills < MAX_SHORT) r_info[MON_LUPART].r_tkills++;
}
}
else if (r_ptr->flags7 & RF7_NAZGUL) r_ptr->max_num--;
}
+ /* Count all monsters killed */
+ 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++;
chg_virtue(V_HONOUR, 1);
}
}
- if ((r_ptr->flags2 & RF2_MULTIPLY) && (r_ptr->r_pkills > 1000) && one_in_(10))
+ if ((r_ptr->flags2 & RF2_MULTIPLY) && (r_ptr->r_akills > 1000) && one_in_(10))
{
chg_virtue(V_VALOUR, -1);
}
/* Special note at death */
if (explode)
#ifdef JP
-msg_format("%s¤ÏÇúȯ¤·¤ÆÊ´¡¹¤Ë¤Ê¤Ã¤¿¡£", m_name);
+ msg_format("%s¤ÏÇúȯ¤·¤ÆÊ´¡¹¤Ë¤Ê¤Ã¤¿¡£", m_name);
#else
- msg_format("%s explodes into tiny shreds.", m_name);
+ msg_format("%^s explodes into tiny shreds.", m_name);
#endif
else
{
monster_type *ma_ptr = &m_list[ca_ptr->m_idx];
monster_type *mb_ptr = &m_list[cb_ptr->m_idx];
monster_race *ap_ra_ptr, *ap_rb_ptr;
- int la, lb;
/* The player grid */
if (y[a] == py && x[a] == px) return TRUE;
}
+bool show_gold_on_floor = FALSE;
+
/*
* Examine a grid, return a keypress.
*
screen_save();
/* Display */
+ show_gold_on_floor = TRUE;
(void)show_floor(0, y, x, &min_width);
+ show_gold_on_floor = FALSE;
/* Prompt */
#ifdef JP
if (!(c_ptr->info & CAVE_MARK) && !player_can_see_bold(y, x))
{
/* Forget feature */
- feat = FEAT_NONE;
+ feat = feat_none;
}
f_ptr = &f_info[feat];
{
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->power].name;
+ name = building[f_ptr->subtype].name;
}
else if (have_flag(f_ptr->flags, FF_ENTRANCE))
{
{
name = town[c_ptr->special].name;
}
- else if (p_ptr->wild_mode && (feat == FEAT_FLOOR))
+ else if (p_ptr->wild_mode && (feat == feat_floor))
{
#ifdef JP
name = "ƻ";
/* 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))
{