if ((o_ptr->tval == TV_CORPSE) && (o_ptr->pval == kubi_r_idx[j]))
{
char buf[MAX_NLEN+20];
- int num, k;
+ int num, k, item_new;
object_type forge;
object_desc(o_name, o_ptr, 0);
#endif
if (!get_check(buf)) continue;
-#if 0 /* Obsorated */
+#if 0 /* Obsoleted */
#ifdef JP
msg_format("¾Þ¶â %ld¡ð¤ò¼ê¤ËÆþ¤ì¤¿¡£", (r_info[kubi_r_idx[j]].level + 1) * 300 * o_ptr->number);
#else
kubi_r_idx[j] += 10000;
change = TRUE;
-#endif /* Obsorated */
+#endif /* Obsoleted */
/* Hand it first */
inven_item_increase(i, -o_ptr->number);
* Since a corpse is handed at first,
* there is at least one empty slot.
*/
- (void)inven_carry(&forge);
+ item_new = inven_carry(&forge);
/* Describe the object */
object_desc(o_name, &forge, 0);
#ifdef JP
- msg_format("%s ¤òÌã¤Ã¤¿¡£",o_name);
+ msg_format("%s(%c)¤òÌã¤Ã¤¿¡£", o_name, index_to_label(item_new));
#else
- msg_format("You get %s. ",o_name);
+ msg_format("You get %s (%c). ", o_name, index_to_label(item_new));
#endif
+ /* Auto-inscription */
+ autopick_alter_item(item_new, FALSE);
+
+ /* Handle stuff */
+ handle_stuff();
+
change = TRUE;
}
}
* the level of the item or the number of charges.
*/
/* The item must be "known" */
- if (!object_known_p(o_ptr))
+ if (!object_is_known(o_ptr))
{
#ifdef JP
msg_format("½¼Å¶¤¹¤ëÁ°¤Ë´ÕÄꤵ¤ì¤Æ¤¤¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡ª");
}
/* Extract the object "level" */
- lev = get_object_level(o_ptr);
+ lev = k_info[o_ptr->k_idx].level;
/* Price for a rod */
if (o_ptr->tval == TV_ROD)
else if (o_ptr->tval == TV_STAFF)
{
/* Price per charge ( = double the price paid by shopkeepers for the charge) */
- price = (get_object_cost(o_ptr) / 10) * o_ptr->number;
+ price = (k_info[o_ptr->k_idx].cost / 10) * o_ptr->number;
/* Pay at least 10 gold per charge */
price = MAX(10, price);
else
{
/* Price per charge ( = double the price paid by shopkeepers for the charge) */
- price = (get_object_cost(o_ptr) / 10);
+ price = (k_info[o_ptr->k_idx].cost / 10);
/* Pay at least 10 gold per charge */
price = MAX(10, price);
if (o_ptr->tval < TV_STAFF || o_ptr->tval > TV_ROD) continue;
/* need identified */
- if (!object_known_p(o_ptr)) total_cost += 50;
+ if (!object_is_known(o_ptr)) total_cost += 50;
/* Extract the object "level" */
- lev = get_object_level(o_ptr);
+ lev = k_info[o_ptr->k_idx].level;
k_ptr = &k_info[o_ptr->k_idx];
case TV_STAFF:
/* Price per charge ( = double the price paid by shopkeepers for the charge) */
- price = (get_object_cost(o_ptr) / 10) * o_ptr->number;
+ price = (k_info[o_ptr->k_idx].cost / 10) * o_ptr->number;
/* Pay at least 10 gold per charge */
price = MAX(10, price);
case TV_WAND:
/* Price per charge ( = double the price paid by shopkeepers for the charge) */
- price = (get_object_cost(o_ptr) / 10);
+ price = (k_info[o_ptr->k_idx].cost / 10);
/* Pay at least 10 gold per charge */
price = MAX(10, price);
if (o_ptr->tval < TV_STAFF || o_ptr->tval > TV_ROD) continue;
/* Identify it */
- if (!object_known_p(o_ptr))
+ if (!object_is_known(o_ptr))
{
identify_item(o_ptr);
paid = compare_weapons();
break;
case BACT_ENCHANT_WEAPON:
- item_tester_hook = item_tester_hook_melee_weapon;
+ item_tester_hook = object_allow_enchant_melee_weapon;
enchant_item(bcost, 1, 1, 0);
break;
case BACT_ENCHANT_ARMOR:
- item_tester_hook = item_tester_hook_armour;
+ item_tester_hook = object_is_armour;
enchant_item(bcost, 0, 0, 1);
break;
case BACT_RECHARGE:
p_ptr->word_recall = 1;
p_ptr->recall_dungeon = select_dungeon;
max_dlv[p_ptr->recall_dungeon] = ((amt > d_info[select_dungeon].maxdepth) ? d_info[select_dungeon].maxdepth : ((amt < d_info[select_dungeon].mindepth) ? d_info[select_dungeon].mindepth : amt));
- if (record_maxdeapth)
+ if (record_maxdepth)
#ifdef JP
do_cmd_write_nikki(NIKKI_TRUMP, select_dungeon, "¥È¥é¥ó¥×¥¿¥ï¡¼¤Ç");
#else
{
energy_use = 100;
- if (!have_flag(f_flags_bold(py, px), FF_QUEST_ENTER))
+ if (!cave_have_flag_bold(py, px, FF_QUEST_ENTER))
{
#ifdef JP
msg_print("¤³¤³¤Ë¤Ï¥¯¥¨¥¹¥È¤ÎÆþ¸ý¤Ï¤Ê¤¤¡£");
energy_use = 100;
- if (!have_flag(f_flags_bold(py, px), FF_BLDG))
+ if (!cave_have_flag_bold(py, px, FF_BLDG))
{
#ifdef JP
msg_print("¤³¤³¤Ë¤Ï·úʪ¤Ï¤Ê¤¤¡£");
return;
}
- which = f_info[cave[py][px].feat].power;
+ which = f_info[cave[py][px].feat].subtype;
bldg = &building[which];
if ((which == 2) && (p_ptr->arena_number < 0))
{
#ifdef JP
-msg_print("¡ÖÇÔ¼Ô¤ËÍѤϤʤ¤¡£¡×");
+ msg_print("¡ÖÇÔ¼Ô¤ËÍѤϤʤ¤¡£¡×");
#else
msg_print("'There's no place here for a LOSER like you!'");
#endif
return;
}
- else if ((which == 2) && p_ptr->inside_arena && !p_ptr->exit_bldg)
+ else if ((which == 2) && p_ptr->inside_arena)
{
+ if (!p_ptr->exit_bldg)
+ {
#ifdef JP
-prt("¥²¡¼¥È¤ÏÊĤޤäƤ¤¤ë¡£¥â¥ó¥¹¥¿¡¼¤¬¤¢¤Ê¤¿¤òÂԤäƤ¤¤ë¡ª",0,0);
+ prt("¥²¡¼¥È¤ÏÊĤޤäƤ¤¤ë¡£¥â¥ó¥¹¥¿¡¼¤¬¤¢¤Ê¤¿¤òÂԤäƤ¤¤ë¡ª", 0, 0);
#else
- prt("The gates are closed. The monster awaits!", 0, 0);
+ prt("The gates are closed. The monster awaits!", 0, 0);
#endif
+ }
+ else
+ {
+ /* Don't save the arena as saved floor */
+ prepare_change_floor_mode(CFM_SAVE_FLOORS | CFM_NO_RETURN);
- return;
- }
- else if ((which == 2) && p_ptr->inside_arena)
- {
- /* Don't save the arena as saved floor */
- prepare_change_floor_mode(CFM_SAVE_FLOORS | CFM_NO_RETURN);
-
- p_ptr->inside_arena = FALSE;
- p_ptr->leaving = TRUE;
+ p_ptr->inside_arena = FALSE;
+ p_ptr->leaving = TRUE;
- /* Re-enter the arena */
- command_new = SPECIAL_KEY_BUILDING;
+ /* Re-enter the arena */
+ command_new = SPECIAL_KEY_BUILDING;
- /* No energy needed to re-enter the arena */
- energy_use = 0;
+ /* No energy needed to re-enter the arena */
+ energy_use = 0;
+ }
return;
}