*/
void teleport_player_level(void)
{
+ bool go_up;
+
/* No effect in arena or quest */
if (p_ptr->inside_arena || (p_ptr->inside_quest && !random_quest_number(dun_level)) ||
(quest_number(dun_level) && (dun_level > 1) && ironman_downward))
return;
}
+ /* Choose up or down */
+ if (randint0(100) < 50) go_up = TRUE;
+ else go_up = FALSE;
+
+ if (p_ptr->wizard)
+ {
+ if (get_check("Force to go up? ")) go_up = TRUE;
+ else if (get_check("Force to go down? ")) go_up = FALSE;
+ }
+
+ /* Down only */
if (ironman_downward || (dun_level <= d_info[dungeon_type].mindepth))
{
#ifdef JP
if (!dun_level)
{
dun_level = d_info[dungeon_type].mindepth;
+ prepare_change_floor_mode(CFM_RAND_PLACE | CFM_CLEAR_ALL);
}
else
{
- dun_level++;
+ prepare_change_floor_mode(CFM_DOWN | CFM_RAND_PLACE | CFM_RAND_CONNECT);
}
/* Leaving */
p_ptr->leaving = TRUE;
}
+
+ /* Up only */
else if (quest_number(dun_level) || (dun_level >= d_info[dungeon_type].maxdepth))
{
#ifdef JP
if (autosave_l) do_cmd_save_game(TRUE);
- dun_level--;
-
- if (!dun_level) dungeon_type = 0;
+ prepare_change_floor_mode(CFM_UP | CFM_RAND_PLACE | CFM_RAND_CONNECT);
leave_quest_check();
p_ptr->inside_quest = 0;
p_ptr->leaving = TRUE;
}
- else if (randint0(100) < 50)
+ else if (go_up)
{
#ifdef JP
msg_print("¤¢¤Ê¤¿¤ÏÅ·°æ¤òÆͤÇˤäÆÃè¤ØÉ⤤¤Æ¤¤¤¯¡£");
if (autosave_l) do_cmd_save_game(TRUE);
- dun_level--;
-
- if (!dun_level) dungeon_type = 0;
+ prepare_change_floor_mode(CFM_UP | CFM_RAND_PLACE | CFM_RAND_CONNECT);
/* Leaving */
p_ptr->leaving = TRUE;
msg_print("You sink through the floor.");
#endif
- if (!dun_level) dungeon_type = p_ptr->recall_dungeon;
+ /* Never reach this code on the surface */
+ /* if (!dun_level) dungeon_type = p_ptr->recall_dungeon; */
if (record_stair) do_cmd_write_nikki(NIKKI_TELE_LEV, 1, NULL);
if (autosave_l) do_cmd_save_game(TRUE);
- dun_level++;
+ prepare_change_floor_mode(CFM_DOWN | CFM_RAND_PLACE | CFM_RAND_CONNECT);
/* Leaving */
p_ptr->leaving = TRUE;
}
- if (!dun_level && dungeon_type)
- {
- p_ptr->leaving_dungeon = TRUE;
- p_ptr->wilderness_y = d_info[dungeon_type].dy;
- p_ptr->wilderness_x = d_info[dungeon_type].dx;
- p_ptr->recall_dungeon = dungeon_type;
- }
-
- if (!dun_level) dungeon_type = 0;
-
/* Sound */
sound(SOUND_TPLEVEL);
}
#ifdef JP
act = "¤Ï¿Í´Ö¤Î·ì¤òµá¤á¤Æ¤¤¤ë¡ª";
#else
- act = "seems looking for human!";
+ act = "seems to be looking for humans!";
#endif
o_ptr->name2 = EGO_SLAY_HUMAN;
#ifdef JP
act = "¤ÏÅÅ·â¤Ëʤ¤ï¤ì¤¿¡ª";
#else
- act = "coverd with lightning!";
+ act = "covered with lightning!";
#endif
o_ptr->name2 = EGO_BRAND_ELEC;
#ifdef JP
act = "¤Ï¼Ù°¤Ê¤ë²øʪ¤òµá¤á¤Æ¤¤¤ë¡ª";
#else
- act = "seems looking for evil monster!";
+ act = "seems to be looking for evil monsters!";
#endif
o_ptr->name2 = EGO_SLAY_EVIL;
#ifdef JP
act = "¤Ï°ÛÀ¤³¦¤Î½»¿Í¤ÎÆùÂΤòµá¤á¤Æ¤¤¤ë¡ª";
#else
- act = "seems looking for demon!";
+ act = "seems to be looking for demons!";
#endif
o_ptr->name2 = EGO_SLAY_DEMON;
#ifdef JP
act = "¤Ï»Ó¤òµá¤á¤Æ¤¤¤ë¡ª";
#else
- act = "seems looking for undead!";
+ act = "seems to be looking for undead!";
#endif
o_ptr->name2 = EGO_SLAY_UNDEAD;
#ifdef JP
act = "¤Ïưʪ¤Î·ì¤òµá¤á¤Æ¤¤¤ë¡ª";
#else
- act = "seems looking for animal!";
+ act = "seems to be looking for animals!";
#endif
o_ptr->name2 = EGO_SLAY_ANIMAL;
#ifdef JP
act = "¤Ï¥É¥é¥´¥ó¤Î·ì¤òµá¤á¤Æ¤¤¤ë¡ª";
#else
- act = "seems looking for dragon!";
+ act = "seems to be looking for dragons!";
#endif
o_ptr->name2 = EGO_SLAY_DRAGON;
#ifdef JP
act = "¤Ï¥È¥í¥ë¤Î·ì¤òµá¤á¤Æ¤¤¤ë¡ª";
#else
- act = "seems looking for troll!";
+ act = "seems to be looking for troll!s";
#endif
o_ptr->name2 = EGO_SLAY_TROLL;
#ifdef JP
act = "¤Ï¥ª¡¼¥¯¤Î·ì¤òµá¤á¤Æ¤¤¤ë¡ª";
#else
- act = "seems looking for orc!";
+ act = "seems to be looking for orcs!";
#endif
o_ptr->name2 = EGO_SLAY_ORC;
#ifdef JP
act = "¤Ïµð¿Í¤Î·ì¤òµá¤á¤Æ¤¤¤ë¡ª";
#else
- act = "seems looking for giant!";
+ act = "seems to be looking for giants!";
#endif
o_ptr->name2 = EGO_SLAY_GIANT;
void alter_reality(void)
{
- if (!quest_number(dun_level) && dun_level)
+ /* Ironman option */
+ if (p_ptr->inside_arena || ironman_downward)
{
#ifdef JP
-msg_print("À¤³¦¤¬ÊѤï¤Ã¤¿¡ª");
+ msg_print("²¿¤âµ¯¤³¤é¤Ê¤«¤Ã¤¿¡£");
#else
- msg_print("The world changes!");
+ msg_print("Nothing happens.");
#endif
+ return;
+ }
+ if (!p_ptr->alter_reality)
+ {
+ int turns = randint0(21) + 15;
- if (autosave_l) do_cmd_save_game(TRUE);
+ p_ptr->alter_reality = turns;
+#ifdef JP
+ msg_print("²ó¤ê¤Î·Ê¿§¤¬ÊѤï¤ê»Ï¤á¤¿...");
+#else
+ msg_print("The view around you begins to change...");
+#endif
- /* Leaving */
- p_ptr->leaving = TRUE;
+ p_ptr->redraw |= (PR_STATUS);
}
else
{
+ p_ptr->alter_reality = 0;
#ifdef JP
-msg_print("À¤³¦¤¬¾¯¤·¤Î´ÖÊѲ½¤·¤¿¤è¤¦¤À¡£");
+ msg_print("·Ê¿§¤¬¸µ¤ËÌá¤Ã¤¿...");
#else
- msg_print("The world seems to change for a moment!");
+ msg_print("The view around you got back...");
#endif
+ p_ptr->redraw |= (PR_STATUS);
}
+ return;
}
}
-/*
- * Create stairs at the player location
- */
-void stair_creation(void)
-{
- /* XXX XXX XXX */
- if (!cave_valid_bold(py, px))
- {
-#ifdef JP
-msg_print("¾²¾å¤Î¥¢¥¤¥Æ¥à¤¬¼öʸ¤òÄ·¤ÍÊÖ¤·¤¿¡£");
-#else
- msg_print("The object resists the spell.");
-#endif
-
- return;
- }
-
- /* XXX XXX XXX */
- delete_object(py, px);
-
- /* Create a staircase */
- if (p_ptr->inside_arena || (p_ptr->inside_quest && (p_ptr->inside_quest < MIN_RANDOM_QUEST)) || p_ptr->inside_battle || !dun_level)
- {
- /* arena or quest */
-#ifdef JP
-msg_print("¸ú²Ì¤¬¤¢¤ê¤Þ¤»¤ó¡ª");
-#else
- msg_print("There is no effect!");
-#endif
-
- }
- else if (ironman_downward)
- {
- /* Town/wilderness or Ironman */
- cave_set_feat(py, px, FEAT_MORE);
- }
- else if (quest_number(dun_level) || (dun_level >= d_info[dungeon_type].maxdepth))
- {
- /* Quest level */
- cave_set_feat(py, px, FEAT_LESS);
- }
- else if (randint0(100) < 50)
- {
- cave_set_feat(py, px, FEAT_MORE);
- }
- else
- {
- cave_set_feat(py, px, FEAT_LESS);
- }
-}
-
/*
* Hook to specify "weapon"
}
/* Describe it fully */
- (void)identify_fully_aux(o_ptr);
+ (void)screen_object(o_ptr, TRUE);
/* Auto-inscription/destroy */
idx = is_autopick(o_ptr);
#endif
/* Reduce rod stack maximum timeout, drain wands. */
- if (o_ptr->tval == TV_ROD) o_ptr->timeout -= k_ptr->pval;
- if (o_ptr->tval == TV_WAND) o_ptr->pval = o_ptr->pval * (o_ptr->number - 1) / o_ptr->number;
+ if (o_ptr->tval == TV_ROD) o_ptr->timeout = MIN(o_ptr->timeout, k_ptr->pval * (o_ptr->number - 1));
+ else if (o_ptr->tval == TV_WAND) o_ptr->pval = o_ptr->pval * (o_ptr->number - 1) / o_ptr->number;
}
else