3 /* Purpose: Inventory commands */
6 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
8 * This software may be copied and distributed for educational, research,
9 * and not for profit purposes provided that this copyright and statement
10 * are included in all such copies. Other copyrights may also apply.
20 void do_cmd_inven(void)
25 /* Note that we are in "inventory" mode */
28 #ifdef ALLOW_EASY_FLOOR
30 /* Note that we are in "inventory" mode */
31 if (easy_floor) command_wrk = (USE_INVEN);
33 #endif /* ALLOW_EASY_FLOOR */
38 /* Hack -- show empty slots */
39 item_tester_full = TRUE;
41 /* Display the inventory */
44 /* Hack -- hide empty slots */
45 item_tester_full = FALSE;
48 sprintf(out_val, "»ý¤Áʪ¡§ ¹ç·× %3d.%1d kg (¸Â³¦¤Î%ld%%) ¥³¥Þ¥ó¥É: ",
49 lbtokg1(p_ptr->total_weight) , lbtokg2(p_ptr->total_weight) ,
50 (p_ptr->total_weight * 100) / ((adj_str_wgt[p_ptr->stat_ind[A_STR]] * (p_ptr->pclass == CLASS_BERSERKER ? 150 : 100))
53 sprintf(out_val, "Inventory: carrying %d.%d pounds (%ld%% of capacity). Command: ",
54 (int)(p_ptr->total_weight / 10), (int)(p_ptr->total_weight % 10),
55 (p_ptr->total_weight * 100) / ((adj_str_wgt[p_ptr->stat_ind[A_STR]] * (p_ptr->pclass == CLASS_BERSERKER ? 150 : 100)) / 2));
62 /* Get a new command */
63 command_new = inkey();
69 /* Process "Escape" */
70 if (command_new == ESCAPE)
75 Term_get_size(&wid, &hgt);
79 command_gap = wid - 30;
82 /* Process normal keys */
85 /* Hack -- Use "display" mode */
94 void do_cmd_equip(void)
99 /* Note that we are in "equipment" mode */
102 #ifdef ALLOW_EASY_FLOOR
104 /* Note that we are in "equipment" mode */
105 if (easy_floor) command_wrk = (USE_EQUIP);
107 #endif /* ALLOW_EASY_FLOOR */
109 /* Save the screen */
112 /* Hack -- show empty slots */
113 item_tester_full = TRUE;
115 /* Display the equipment */
118 /* Hack -- undo the hack above */
119 item_tester_full = FALSE;
123 sprintf(out_val, "ÁõÈ÷¡§ ¹ç·× %3d.%1d kg (¸Â³¦¤Î%ld%%) ¥³¥Þ¥ó¥É: ",
124 lbtokg1(p_ptr->total_weight) , lbtokg2(p_ptr->total_weight) ,
125 (p_ptr->total_weight * 100) / ((adj_str_wgt[p_ptr->stat_ind[A_STR]] * (p_ptr->pclass == CLASS_BERSERKER ? 150 : 100))
128 sprintf(out_val, "Equipment: carrying %d.%d pounds (%ld%% of capacity). Command: ",
129 (int)(p_ptr->total_weight / 10), (int)(p_ptr->total_weight % 10),
130 (p_ptr->total_weight * 100) / ((adj_str_wgt[p_ptr->stat_ind[A_STR]] * (p_ptr->pclass == CLASS_BERSERKER ? 150 : 100)) / 2));
137 /* Get a new command */
138 command_new = inkey();
140 /* Restore the screen */
144 /* Process "Escape" */
145 if (command_new == ESCAPE)
150 Term_get_size(&wid, &hgt);
154 command_gap = wid - 30;
157 /* Process normal keys */
160 /* Enter "display" mode */
167 * The "wearable" tester
169 static bool item_tester_hook_wear(object_type *o_ptr)
171 if ((o_ptr->tval == TV_SOFT_ARMOR) && (o_ptr->sval == SV_ABUNAI_MIZUGI))
172 if (p_ptr->psex == SEX_MALE) return FALSE;
174 /* Check for a usable slot */
175 if (wield_slot(o_ptr) >= INVEN_RARM) return (TRUE);
177 /* Assume not wearable */
182 static bool item_tester_hook_mochikae(object_type *o_ptr)
184 /* Check for a usable slot */
185 if (((o_ptr->tval >= TV_DIGGING) && (o_ptr->tval <= TV_SWORD)) ||
186 (o_ptr->tval == TV_SHIELD) || (o_ptr->tval == TV_CAPTURE) ||
187 (o_ptr->tval == TV_CARD)) return (TRUE);
189 /* Assume not wearable */
194 static bool item_tester_hook_melee_weapon(object_type *o_ptr)
196 /* Check for a usable slot */
197 if ((o_ptr->tval >= TV_DIGGING) && (o_ptr->tval <= TV_SWORD))return (TRUE);
199 /* Assume not wearable */
205 * Wield or wear a single item from the pack or floor
207 void do_cmd_wield(void)
218 char o_name[MAX_NLEN];
222 if (p_ptr->special_defense & KATA_MUSOU)
224 set_action(ACTION_NONE);
227 /* Restrict the choices */
228 item_tester_hook = item_tester_hook_wear;
232 q = "¤É¤ì¤òÁõÈ÷¤·¤Þ¤¹¤«? ";
233 s = "ÁõÈ÷²Äǽ¤Ê¥¢¥¤¥Æ¥à¤¬¤Ê¤¤¡£";
235 q = "Wear/Wield which item? ";
236 s = "You have nothing you can wear or wield.";
239 if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
241 /* Get the item (in the pack) */
244 o_ptr = &inventory[item];
247 /* Get the item (on the floor) */
250 o_ptr = &o_list[0 - item];
255 slot = wield_slot(o_ptr);
259 /* Shields and some misc. items */
263 if (buki_motteruka(INVEN_RARM) && buki_motteruka(INVEN_LARM))
265 /* Restrict the choices */
266 item_tester_hook = item_tester_hook_melee_weapon;
267 item_tester_no_ryoute = TRUE;
269 /* Choose a weapon from the equipment only */
271 q = "¤É¤Á¤é¤ÎÉð´ï¤È¼è¤êÂؤ¨¤Þ¤¹¤«?";
274 q = "Replace which weapon? ";
278 if (!get_item(&slot, q, s, (USE_EQUIP))) return;
279 if ((slot == INVEN_RARM) && !cursed_p(&inventory[INVEN_RARM]))
281 object_type *or_ptr = &inventory[INVEN_RARM];
282 object_type *ol_ptr = &inventory[INVEN_LARM];
283 object_type object_tmp;
284 object_type *otmp_ptr = &object_tmp;
285 char ol_name[MAX_NLEN];
287 object_desc(ol_name, ol_ptr, FALSE, 0);
289 object_copy(otmp_ptr, ol_ptr);
290 object_copy(ol_ptr, or_ptr);
291 object_copy(or_ptr, otmp_ptr);
293 msg_format("%s¤ò%s¤Ë¹½¤¨¤Ê¤ª¤·¤¿¡£", ol_name, left_hander ? "º¸¼ê" : "±¦¼ê");
295 msg_format("You wield %s at %s hand.", ol_name, left_hander ? "left" : "right");
308 /* Asking for dual wielding */
309 if (slot == INVEN_LARM)
312 if (!get_check("ÆóÅáή¤ÇÀ襤¤Þ¤¹¤«¡©")) slot = INVEN_RARM;
314 if (!get_check("Dual wielding? ")) slot = INVEN_RARM;
318 /* Both arms are already used */
319 else if (inventory[INVEN_LARM].k_idx && inventory[INVEN_RARM].k_idx)
321 /* Restrict the choices */
322 item_tester_hook = item_tester_hook_mochikae;
326 q = "¤É¤Á¤é¤Î¼ê¤ËÁõÈ÷¤·¤Þ¤¹¤«?";
329 q = "Equip which hand? ";
333 if (!get_item(&slot, q, s, (USE_EQUIP))) return;
339 if (inventory[INVEN_LEFT].k_idx && inventory[INVEN_RIGHT].k_idx)
341 /* Restrict the choices */
342 item_tester_tval = TV_RING;
343 item_tester_no_ryoute = TRUE;
345 /* Choose a ring from the equipment only */
347 q = "¤É¤Á¤é¤Î»ØÎؤȼè¤êÂؤ¨¤Þ¤¹¤«?";
350 q = "Replace which ring? ";
354 if (!get_item(&slot, q, s, (USE_EQUIP))) return;
359 /* Prevent wielding into a cursed slot */
360 if (cursed_p(&inventory[slot]))
363 object_desc(o_name, &inventory[slot], FALSE, 0);
367 msg_format("%s%s¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¤è¤¦¤À¡£",
368 describe_use(slot) , o_name );
370 msg_format("The %s you are %s appears to be cursed.",
371 o_name, describe_use(slot));
374 /* Cancel the command */
378 if (cursed_p(o_ptr) && confirm_wear &&
379 (object_known_p(o_ptr) || (o_ptr->ident & IDENT_SENSE)))
381 char dummy[MAX_NLEN+80];
384 object_desc(o_name, o_ptr, FALSE, 0);
387 sprintf(dummy, "ËÜÅö¤Ë%s{¼ö¤ï¤ì¤Æ¤¤¤ë}¤ò»È¤¤¤Þ¤¹¤«¡©", o_name);
389 sprintf(dummy, "Really use the %s {cursed}? ", o_name);
392 if (!get_check(dummy)) return;
395 if ((o_ptr->name1 == ART_STONEMASK) && object_known_p(o_ptr) && (p_ptr->prace != RACE_VAMPIRE) && (p_ptr->prace != RACE_ANDROID))
397 char dummy[MAX_NLEN+80];
400 object_desc(o_name, o_ptr, FALSE, 0);
403 sprintf(dummy, "%s¤òÁõÈ÷¤¹¤ë¤ÈµÛ·ìµ´¤Ë¤Ê¤ê¤Þ¤¹¡£¤è¤í¤·¤¤¤Ç¤¹¤«¡©", o_name);
405 msg_format("%s will transforms you into a vampire permanently when equiped.", o_name);
406 sprintf(dummy, "Do you become a vampire?");
409 if (!get_check(dummy)) return;
412 /* Check if completed a quest */
413 for (i = 0; i < max_quests; i++)
415 if ((quest[i].type == QUEST_TYPE_FIND_ARTIFACT) &&
416 (quest[i].status == QUEST_STATUS_TAKEN) &&
417 (quest[i].k_idx == o_ptr->name1))
419 if (record_fix_quest) do_cmd_write_nikki(NIKKI_FIX_QUEST_C, i, NULL);
420 quest[i].status = QUEST_STATUS_COMPLETED;
421 quest[i].complev = (byte)p_ptr->lev;
423 msg_print("¥¯¥¨¥¹¥È¤òãÀ®¤·¤¿¡ª");
425 msg_print("You completed the quest!");
432 if (p_ptr->pseikaku == SEIKAKU_MUNCHKIN)
434 identify_item(o_ptr);
436 /* Auto-inscription */
437 auto_do_item(item, FALSE);
443 /* Get local object */
446 /* Obtain local object */
447 object_copy(q_ptr, o_ptr);
449 /* Modify quantity */
452 /* Decrease the item (from the pack) */
455 inven_item_increase(item, -1);
456 inven_item_optimize(item);
459 /* Decrease the item (from the floor) */
462 floor_item_increase(0 - item, -1);
463 floor_item_optimize(0 - item);
466 /* Access the wield slot */
467 o_ptr = &inventory[slot];
469 /* Take off existing item */
472 /* Take off existing item */
473 (void)inven_takeoff(slot, 255);
476 /* Wear the new stuff */
477 object_copy(o_ptr, q_ptr);
479 /* Increase the weight */
480 p_ptr->total_weight += q_ptr->weight;
482 /* Increment the equip counter by hand */
485 /* Where is the item now */
489 if ((o_ptr->tval != TV_SHIELD) && (o_ptr->tval != TV_CAPTURE) && (o_ptr->tval != TV_CARD) && (empty_hands(FALSE) & EMPTY_HAND_LARM) && ((o_ptr->weight > 99) || (o_ptr->tval == TV_POLEARM)) && (!p_ptr->riding || (p_ptr->pet_extra_flags & PF_RYOUTE)))
491 act = "%s(%c)¤òξ¼ê¤Ç¹½¤¨¤¿¡£";
493 act = "You are wielding %s (%c) with both hands.";
497 act = (left_hander ? "%s(%c)¤òº¸¼ê¤ËÁõÈ÷¤·¤¿¡£" : "%s(%c)¤ò±¦¼ê¤ËÁõÈ÷¤·¤¿¡£");
499 act = (left_hander ? "You are wielding %s (%c) on left hand." : "You are wielding %s (%c) on right hand.");
505 act = (left_hander ? "%s(%c)¤ò±¦¼ê¤ËÁõÈ÷¤·¤¿¡£" : "%s(%c)¤òº¸¼ê¤ËÁõÈ÷¤·¤¿¡£");
507 act = (left_hander ? "You are wielding %s (%c) on right hand." : "You are wielding %s (%c) on left hand.");
513 act = "%s(%c)¤ò¼Í·âÍѤËÁõÈ÷¤·¤¿¡£";
515 act = "You are shooting with %s (%c).";
521 act = "%s(%c)¤ò¸÷¸»¤Ë¤·¤¿¡£";
523 act = "Your light source is %s (%c).";
529 act = "%s(%c)¤òÁõÈ÷¤·¤¿¡£";
531 act = "You are wearing %s (%c).";
536 /* Describe the result */
537 object_desc(o_name, o_ptr, TRUE, 3);
540 msg_format(act, o_name, index_to_label(slot));
546 /* Warn the player */
548 msg_print("¤¦¤ï¡ª ¤¹¤µ¤Þ¤¸¤¯Î䤿¤¤¡ª");
550 msg_print("Oops! It feels deathly cold!");
554 chg_virtue(V_HARMONY, -1);
557 o_ptr->ident |= (IDENT_SENSE);
560 /* The Stone Mask make the player turn into a vampire! */
561 if ((o_ptr->name1 == ART_STONEMASK) && (p_ptr->prace != RACE_VAMPIRE) && (p_ptr->prace != RACE_ANDROID))
563 /* Turn into a vampire */
564 change_race(RACE_VAMPIRE, "");
567 /* Recalculate bonuses */
568 p_ptr->update |= (PU_BONUS);
570 /* Recalculate torch */
571 p_ptr->update |= (PU_TORCH);
573 /* Recalculate mana */
574 p_ptr->update |= (PU_MANA);
576 p_ptr->redraw |= (PR_EQUIPPY);
579 p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
585 void kamaenaoshi(int item)
587 object_type *o_ptr, *o2_ptr;
588 char o_name[MAX_NLEN];
590 if ((item == INVEN_RARM) && buki_motteruka(INVEN_LARM))
592 o_ptr = &inventory[INVEN_RARM];
593 o2_ptr = &inventory[INVEN_LARM];
594 object_copy(o_ptr, o2_ptr);
595 p_ptr->total_weight += o2_ptr->weight;
596 inven_item_increase(INVEN_LARM,-1);
597 inven_item_optimize(INVEN_LARM);
598 object_desc(o_name, o_ptr, TRUE, 3);
599 if (((o_ptr->weight > 99) || (o_ptr->tval == TV_POLEARM)) && (!p_ptr->riding || (p_ptr->pet_extra_flags & PF_RYOUTE)))
601 msg_format("%s¤òξ¼ê¤Ç¹½¤¨¤¿¡£", o_name );
603 msg_format("You are wielding %s with both hands.", o_name );
607 msg_format("%s¤ò%s¤Ç¹½¤¨¤¿¡£", o_name, (left_hander ? "º¸¼ê" : "±¦¼ê"));
609 msg_format("You are wielding %s on %s hand.", o_name, (left_hander ? "left":"right") );
612 else if (item == INVEN_LARM)
614 if (buki_motteruka(INVEN_RARM))
616 o_ptr = &inventory[INVEN_RARM];
617 object_desc(o_name, o_ptr, TRUE, 3);
618 if (((o_ptr->weight > 99) || (o_ptr->tval == TV_POLEARM)) && (!p_ptr->riding || (p_ptr->pet_extra_flags & PF_RYOUTE)))
620 msg_format("%s¤òξ¼ê¤Ç¹½¤¨¤¿¡£", o_name );
622 msg_format("You are wielding %s with both hands.", o_name );
625 else if (!(empty_hands(FALSE) & EMPTY_HAND_RARM))
627 o_ptr = &inventory[INVEN_LARM];
628 o2_ptr = &inventory[INVEN_RARM];
629 object_copy(o_ptr, o2_ptr);
630 p_ptr->total_weight += o2_ptr->weight;
631 inven_item_increase(INVEN_RARM,-1);
632 inven_item_optimize(INVEN_RARM);
633 object_desc(o_name, o_ptr, TRUE, 3);
635 msg_format("%s¤ò»ý¤ÁÂؤ¨¤¿¡£", o_name);
637 msg_format("You switched hand of %s.", o_name);
647 void do_cmd_takeoff(void)
655 if (p_ptr->special_defense & KATA_MUSOU)
657 set_action(ACTION_NONE);
660 item_tester_no_ryoute = TRUE;
663 q = "¤É¤ì¤òÁõÈ÷¤«¤é¤Ï¤º¤·¤Þ¤¹¤«? ";
664 s = "¤Ï¤º¤»¤ëÁõÈ÷¤¬¤Ê¤¤¡£";
666 q = "Take off which item? ";
667 s = "You are not wearing anything to take off.";
670 if (!get_item(&item, q, s, (USE_EQUIP))) return;
672 /* Get the item (in the pack) */
675 o_ptr = &inventory[item];
678 /* Get the item (on the floor) */
681 o_ptr = &o_list[0 - item];
688 if ((o_ptr->curse_flags & TRC_PERMA_CURSE) || (p_ptr->pclass != CLASS_BERSERKER))
692 msg_print("¤Õ¡¼¤à¡¢¤É¤¦¤ä¤é¼ö¤ï¤ì¤Æ¤¤¤ë¤è¤¦¤À¡£");
694 msg_print("Hmmm, it seems to be cursed.");
701 if (((o_ptr->curse_flags & TRC_HEAVY_CURSE) && one_in_(7)) || one_in_(4))
704 msg_print("¼ö¤ï¤ì¤¿ÁõÈ÷¤òÎϤŤ¯¤ÇÇí¤¬¤·¤¿¡ª");
706 msg_print("You teared a cursed equipment off by sheer strength!");
709 /* Hack -- Assume felt */
710 o_ptr->ident |= (IDENT_SENSE);
712 o_ptr->curse_flags = 0L;
715 o_ptr->feeling = FEEL_NONE;
717 /* Recalculate the bonuses */
718 p_ptr->update |= (PU_BONUS);
721 p_ptr->window |= (PW_EQUIP);
724 msg_print("¼ö¤¤¤òÂǤÁÇˤä¿¡£");
726 msg_print("You break the curse.");
732 msg_print("ÁõÈ÷¤ò³°¤»¤Ê¤«¤Ã¤¿¡£");
734 msg_print("You couldn't remove the equipment.");
741 /* Take a partial turn */
744 /* Take off the item */
745 (void)inven_takeoff(item, 255);
751 p_ptr->redraw |= (PR_EQUIPPY);
758 void do_cmd_drop(void)
766 if (p_ptr->special_defense & KATA_MUSOU)
768 set_action(ACTION_NONE);
771 item_tester_no_ryoute = TRUE;
774 q = "¤É¤Î¥¢¥¤¥Æ¥à¤òÍî¤È¤·¤Þ¤¹¤«? ";
775 s = "Íî¤È¤»¤ë¥¢¥¤¥Æ¥à¤ò»ý¤Ã¤Æ¤¤¤Ê¤¤¡£";
777 q = "Drop which item? ";
778 s = "You have nothing to drop.";
781 if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN))) return;
783 /* Get the item (in the pack) */
786 o_ptr = &inventory[item];
789 /* Get the item (on the floor) */
792 o_ptr = &o_list[0 - item];
796 /* Hack -- Cannot remove cursed items */
797 if ((item >= INVEN_RARM) && cursed_p(o_ptr))
801 msg_print("¤Õ¡¼¤à¡¢¤É¤¦¤ä¤é¼ö¤ï¤ì¤Æ¤¤¤ë¤è¤¦¤À¡£");
803 msg_print("Hmmm, it seems to be cursed.");
812 /* See how many items */
813 if (o_ptr->number > 1)
816 amt = get_quantity(NULL, o_ptr->number);
818 /* Allow user abort */
819 if (amt <= 0) return;
823 /* Take a partial turn */
826 /* Drop (some of) the item */
827 inven_drop(item, amt);
829 if ((item == INVEN_RARM) || (item == INVEN_LARM)) kamaenaoshi(item);
831 if (item >= INVEN_RARM) calc_android_exp();
833 p_ptr->redraw |= (PR_EQUIPPY);
837 static bool high_level_book(object_type *o_ptr)
839 if ((o_ptr->tval == TV_LIFE_BOOK) ||
840 (o_ptr->tval == TV_SORCERY_BOOK) ||
841 (o_ptr->tval == TV_NATURE_BOOK) ||
842 (o_ptr->tval == TV_CHAOS_BOOK) ||
843 (o_ptr->tval == TV_DEATH_BOOK) ||
844 (o_ptr->tval == TV_TRUMP_BOOK) ||
845 (o_ptr->tval == TV_ENCHANT_BOOK) ||
846 (o_ptr->tval == TV_DAEMON_BOOK) ||
847 (o_ptr->tval == TV_CRUSADE_BOOK) ||
848 (o_ptr->tval == TV_MUSIC_BOOK))
863 void do_cmd_destroy(void)
872 object_type *q_ptr = &forge;
874 char o_name[MAX_NLEN];
876 char out_val[MAX_NLEN+40];
880 if (p_ptr->special_defense & KATA_MUSOU)
882 set_action(ACTION_NONE);
885 /* Hack -- force destruction */
886 if (command_arg > 0) force = TRUE;
891 q = "¤É¤Î¥¢¥¤¥Æ¥à¤ò²õ¤·¤Þ¤¹¤«? ";
892 s = "²õ¤»¤ë¥¢¥¤¥Æ¥à¤ò»ý¤Ã¤Æ¤¤¤Ê¤¤¡£";
894 q = "Destroy which item? ";
895 s = "You have nothing to destroy.";
898 if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
900 /* Get the item (in the pack) */
903 o_ptr = &inventory[item];
906 /* Get the item (on the floor) */
909 o_ptr = &o_list[0 - item];
913 /* See how many items */
914 if (o_ptr->number > 1)
917 amt = get_quantity(NULL, o_ptr->number);
919 /* Allow user abort */
920 if (amt <= 0) return;
924 /* Describe the object */
925 old_number = o_ptr->number;
927 object_desc(o_name, o_ptr, TRUE, 3);
928 o_ptr->number = old_number;
930 /* Verify unless quantity given */
931 if (!force && (confirm_destroy || (object_value(o_ptr) > 0)))
933 /* Make a verification */
936 "ËÜÅö¤Ë%s¤ò²õ¤·¤Þ¤¹¤«? [y/n/Auto]",
938 "Really destroy %s? [y/n/Auto]",
944 /* HACK : Add the line to message buffer */
945 message_add(out_val);
946 p_ptr->window |= (PW_MESSAGE);
949 /* Get an acceptable answer */
959 /* Erase the prompt */
963 if (i == 'y' || i == 'Y')
967 if (i == ESCAPE || i == 'n' || i == 'N')
972 if (i == 'a' || i == 'A')
974 /* Add an auto-destroy preference line */
975 if (add_auto_register(o_ptr))
977 /* Auto-destroy it */
978 auto_do_item(item, TRUE);
981 /* The object is already destroyed. */
990 /* Artifacts cannot be destroyed */
991 if (!can_player_destroy_object(o_ptr))
997 msg_format("%s¤ÏÇ˲õÉÔ²Äǽ¤À¡£", o_name);
999 msg_format("You cannot destroy %s.", o_name);
1006 object_copy(q_ptr, o_ptr);
1010 msg_format("%s¤ò²õ¤·¤¿¡£", o_name);
1012 msg_format("You destroy %s.", o_name);
1015 sound(SOUND_DESTITEM);
1017 /* Reduce the charges of rods/wands */
1018 reduce_charges(o_ptr, amt);
1020 /* Eliminate the item (from the pack) */
1023 inven_item_increase(item, -amt);
1024 inven_item_describe(item);
1025 inven_item_optimize(item);
1028 /* Eliminate the item (from the floor) */
1031 floor_item_increase(0 - item, -amt);
1032 floor_item_describe(0 - item);
1033 floor_item_optimize(0 - item);
1036 if (high_level_book(q_ptr))
1038 bool gain_expr = FALSE;
1040 if (p_ptr->prace == RACE_ANDROID)
1043 else if ((p_ptr->pclass == CLASS_WARRIOR) || (p_ptr->pclass == CLASS_BERSERKER))
1047 else if (p_ptr->pclass == CLASS_PALADIN)
1049 if (is_good_realm(p_ptr->realm1))
1051 if (!is_good_realm(tval2realm(q_ptr->tval))) gain_expr = TRUE;
1055 if (is_good_realm(tval2realm(q_ptr->tval))) gain_expr = TRUE;
1059 if (gain_expr && (p_ptr->exp < PY_MAX_EXP))
1061 s32b tester_exp = p_ptr->max_exp / 20;
1062 if (tester_exp > 10000) tester_exp = 10000;
1063 if (q_ptr->sval < 3) tester_exp /= 4;
1064 if (tester_exp<1) tester_exp = 1;
1067 msg_print("¹¹¤Ë·Ð¸³¤òÀѤó¤À¤è¤¦¤Êµ¤¤¬¤¹¤ë¡£");
1069 msg_print("You feel more experienced.");
1072 gain_exp(tester_exp * amt);
1074 if (high_level_book(q_ptr) && q_ptr->tval == TV_LIFE_BOOK)
1076 chg_virtue(V_UNLIFE, 1);
1077 chg_virtue(V_VITALITY, -1);
1079 else if (high_level_book(q_ptr) && q_ptr->tval == TV_DEATH_BOOK)
1081 chg_virtue(V_UNLIFE, -1);
1082 chg_virtue(V_VITALITY, 1);
1085 if (q_ptr->to_a || q_ptr->to_h || q_ptr->to_d)
1086 chg_virtue(V_ENCHANT, -1);
1088 if (object_value_real(q_ptr) > 30000)
1089 chg_virtue(V_SACRIFICE, 2);
1091 else if (object_value_real(q_ptr) > 10000)
1092 chg_virtue(V_SACRIFICE, 1);
1095 if (q_ptr->to_a != 0 || q_ptr->to_d != 0 || q_ptr->to_h != 0)
1096 chg_virtue(V_HARMONY, 1);
1098 if (item >= INVEN_RARM) calc_android_exp();
1103 * Observe an item which has been *identify*-ed
1105 void do_cmd_observe(void)
1111 char o_name[MAX_NLEN];
1115 item_tester_no_ryoute = TRUE;
1118 q = "¤É¤Î¥¢¥¤¥Æ¥à¤òÄ´¤Ù¤Þ¤¹¤«? ";
1119 s = "Ä´¤Ù¤é¤ì¤ë¥¢¥¤¥Æ¥à¤¬¤Ê¤¤¡£";
1121 q = "Examine which item? ";
1122 s = "You have nothing to examine.";
1125 if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR))) return;
1127 /* Get the item (in the pack) */
1130 o_ptr = &inventory[item];
1133 /* Get the item (on the floor) */
1136 o_ptr = &o_list[0 - item];
1140 /* Require full knowledge */
1141 if (!(o_ptr->ident & IDENT_MENTAL))
1144 msg_print("¤³¤Î¥¢¥¤¥Æ¥à¤Ë¤Ä¤¤¤ÆÆäËÃΤäƤ¤¤ë¤³¤È¤Ï¤Ê¤¤¡£");
1146 msg_print("You have no special knowledge about that item.");
1154 object_desc(o_name, o_ptr, TRUE, 3);
1158 msg_format("%s¤òÄ´¤Ù¤Æ¤¤¤ë...", o_name);
1160 msg_format("Examining %s...", o_name);
1163 /* Describe it fully */
1165 if (!screen_object(o_ptr, TRUE)) msg_print("ÆäËÊѤï¤Ã¤¿¤È¤³¤í¤Ï¤Ê¤¤¤è¤¦¤À¡£");
1167 if (!screen_object(o_ptr, TRUE)) msg_print("You see nothing special.");
1175 * Remove the inscription from an object
1176 * XXX Mention item (when done)?
1178 void do_cmd_uninscribe(void)
1186 item_tester_no_ryoute = TRUE;
1189 q = "¤É¤Î¥¢¥¤¥Æ¥à¤ÎÌäò¾Ã¤·¤Þ¤¹¤«? ";
1190 s = "Ìäò¾Ã¤»¤ë¥¢¥¤¥Æ¥à¤¬¤Ê¤¤¡£";
1192 q = "Un-inscribe which item? ";
1193 s = "You have nothing to un-inscribe.";
1196 if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR))) return;
1198 /* Get the item (in the pack) */
1201 o_ptr = &inventory[item];
1204 /* Get the item (on the floor) */
1207 o_ptr = &o_list[0 - item];
1210 /* Nothing to remove */
1211 if (!o_ptr->inscription)
1214 msg_print("¤³¤Î¥¢¥¤¥Æ¥à¤Ë¤Ï¾Ã¤¹¤Ù¤Ì䬤ʤ¤¡£");
1216 msg_print("That item had no inscription to remove.");
1224 msg_print("Ìäò¾Ã¤·¤¿¡£");
1226 msg_print("Inscription removed.");
1230 /* Remove the incription */
1231 o_ptr->inscription = 0;
1233 /* Combine the pack */
1234 p_ptr->notice |= (PN_COMBINE);
1237 p_ptr->window |= (PW_INVEN | PW_EQUIP);
1239 /* .¤ä$¤Î´Ø·¸¤Ç, ºÆ·×»»¤¬É¬ÍפʤϤº -- henkma */
1240 p_ptr->update |= (PU_BONUS);
1246 * Inscribe an object with a comment
1248 void do_cmd_inscribe(void)
1254 char o_name[MAX_NLEN];
1260 item_tester_no_ryoute = TRUE;
1263 q = "¤É¤Î¥¢¥¤¥Æ¥à¤ËÌäò¹ï¤ß¤Þ¤¹¤«? ";
1264 s = "Ìäò¹ï¤á¤ë¥¢¥¤¥Æ¥à¤¬¤Ê¤¤¡£";
1266 q = "Inscribe which item? ";
1267 s = "You have nothing to inscribe.";
1270 if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR))) return;
1272 /* Get the item (in the pack) */
1275 o_ptr = &inventory[item];
1278 /* Get the item (on the floor) */
1281 o_ptr = &o_list[0 - item];
1284 /* Describe the activity */
1285 object_desc(o_name, o_ptr, TRUE, 2);
1289 msg_format("%s¤ËÌäò¹ï¤à¡£", o_name);
1291 msg_format("Inscribing %s.", o_name);
1296 /* Start with nothing */
1297 strcpy(out_val, "");
1299 /* Use old inscription */
1300 if (o_ptr->inscription)
1302 /* Start with the old inscription */
1303 strcpy(out_val, quark_str(o_ptr->inscription));
1306 /* Get a new inscription (possibly empty) */
1308 if (get_string("ÌÃ: ", out_val, 80))
1310 if (get_string("Inscription: ", out_val, 80))
1313 /* Save the inscription */
1314 o_ptr->inscription = quark_add(out_val);
1316 /* Combine the pack */
1317 p_ptr->notice |= (PN_COMBINE);
1320 p_ptr->window |= (PW_INVEN | PW_EQUIP);
1322 /* .¤ä$¤Î´Ø·¸¤Ç, ºÆ·×»»¤¬É¬ÍפʤϤº -- henkma */
1323 p_ptr->update |= (PU_BONUS);
1330 * An "item_tester_hook" for refilling lanterns
1332 static bool item_tester_refill_lantern(object_type *o_ptr)
1334 /* Flasks of oil are okay */
1335 if (o_ptr->tval == TV_FLASK) return (TRUE);
1337 /* Laterns are okay */
1338 if ((o_ptr->tval == TV_LITE) &&
1339 (o_ptr->sval == SV_LITE_LANTERN)) return (TRUE);
1341 /* Assume not okay */
1347 * Refill the players lamp (from the pack or floor)
1349 static void do_cmd_refill_lamp(void)
1359 /* Restrict the choices */
1360 item_tester_hook = item_tester_refill_lantern;
1364 q = "¤É¤ÎÌý¤Ä¤Ü¤«¤éÃí¤®¤Þ¤¹¤«? ";
1365 s = "Ìý¤Ä¤Ü¤¬¤Ê¤¤¡£";
1367 q = "Refill with which flask? ";
1368 s = "You have no flasks of oil.";
1371 if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
1373 /* Get the item (in the pack) */
1376 o_ptr = &inventory[item];
1379 /* Get the item (on the floor) */
1382 o_ptr = &o_list[0 - item];
1386 /* Take a partial turn */
1389 /* Access the lantern */
1390 j_ptr = &inventory[INVEN_LITE];
1393 j_ptr->xtra4 += o_ptr->xtra4;
1397 msg_print("¥é¥ó¥×¤ËÌý¤òÃí¤¤¤À¡£");
1399 msg_print("You fuel your lamp.");
1403 if ((o_ptr->name2 == EGO_LITE_DARKNESS) && (j_ptr->xtra4 > 0))
1407 msg_print("¥é¥ó¥×¤¬¾Ã¤¨¤Æ¤·¤Þ¤Ã¤¿¡ª");
1409 msg_print("Your lamp has gone out!");
1412 else if ((o_ptr->name2 == EGO_LITE_DARKNESS) || (j_ptr->name2 == EGO_LITE_DARKNESS))
1416 msg_print("¤·¤«¤·¥é¥ó¥×¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£");
1418 msg_print("Curiously, your lamp doesn't light.");
1421 else if (j_ptr->xtra4 >= FUEL_LAMP)
1423 j_ptr->xtra4 = FUEL_LAMP;
1425 msg_print("¥é¥ó¥×¤ÎÌý¤Ï°ìÇÕ¤À¡£");
1427 msg_print("Your lamp is full.");
1432 /* Decrease the item (from the pack) */
1435 inven_item_increase(item, -1);
1436 inven_item_describe(item);
1437 inven_item_optimize(item);
1440 /* Decrease the item (from the floor) */
1443 floor_item_increase(0 - item, -1);
1444 floor_item_describe(0 - item);
1445 floor_item_optimize(0 - item);
1448 /* Recalculate torch */
1449 p_ptr->update |= (PU_TORCH);
1454 * An "item_tester_hook" for refilling torches
1456 static bool item_tester_refill_torch(object_type *o_ptr)
1458 /* Torches are okay */
1459 if ((o_ptr->tval == TV_LITE) &&
1460 (o_ptr->sval == SV_LITE_TORCH)) return (TRUE);
1462 /* Assume not okay */
1468 * Refuel the players torch (from the pack or floor)
1470 static void do_cmd_refill_torch(void)
1480 /* Restrict the choices */
1481 item_tester_hook = item_tester_refill_torch;
1485 q = "¤É¤Î¾¾ÌÀ¤ÇÌÀ¤«¤ê¤ò¶¯¤á¤Þ¤¹¤«? ";
1486 s = "¾¤Ë¾¾ÌÀ¤¬¤Ê¤¤¡£";
1488 q = "Refuel with which torch? ";
1489 s = "You have no extra torches.";
1492 if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
1494 /* Get the item (in the pack) */
1497 o_ptr = &inventory[item];
1500 /* Get the item (on the floor) */
1503 o_ptr = &o_list[0 - item];
1507 /* Take a partial turn */
1510 /* Access the primary torch */
1511 j_ptr = &inventory[INVEN_LITE];
1514 j_ptr->xtra4 += o_ptr->xtra4 + 5;
1518 msg_print("¾¾ÌÀ¤ò·ë¹ç¤·¤¿¡£");
1520 msg_print("You combine the torches.");
1525 if ((o_ptr->name2 == EGO_LITE_DARKNESS) && (j_ptr->xtra4 > 0))
1529 msg_print("¾¾ÌÀ¤¬¾Ã¤¨¤Æ¤·¤Þ¤Ã¤¿¡ª");
1531 msg_print("Your torch has gone out!");
1534 else if ((o_ptr->name2 == EGO_LITE_DARKNESS) || (j_ptr->name2 == EGO_LITE_DARKNESS))
1538 msg_print("¤·¤«¤·¾¾ÌÀ¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£");
1540 msg_print("Curiously, your torche don't light.");
1543 /* Over-fuel message */
1544 else if (j_ptr->xtra4 >= FUEL_TORCH)
1546 j_ptr->xtra4 = FUEL_TORCH;
1548 msg_print("¾¾ÌÀ¤Î¼÷Ì¿¤Ï½½Ê¬¤À¡£");
1550 msg_print("Your torch is fully fueled.");
1555 /* Refuel message */
1559 msg_print("¾¾ÌÀ¤Ï¤¤¤Ã¤½¤¦ÌÀ¤ë¤¯µ±¤¤¤¿¡£");
1561 msg_print("Your torch glows more brightly.");
1566 /* Decrease the item (from the pack) */
1569 inven_item_increase(item, -1);
1570 inven_item_describe(item);
1571 inven_item_optimize(item);
1574 /* Decrease the item (from the floor) */
1577 floor_item_increase(0 - item, -1);
1578 floor_item_describe(0 - item);
1579 floor_item_optimize(0 - item);
1582 /* Recalculate torch */
1583 p_ptr->update |= (PU_TORCH);
1588 * Refill the players lamp, or restock his torches
1590 void do_cmd_refill(void)
1595 o_ptr = &inventory[INVEN_LITE];
1597 if (p_ptr->special_defense & KATA_MUSOU)
1599 set_action(ACTION_NONE);
1603 if (o_ptr->tval != TV_LITE)
1606 msg_print("¸÷¸»¤òÁõÈ÷¤·¤Æ¤¤¤Ê¤¤¡£");
1608 msg_print("You are not wielding a light.");
1614 else if (o_ptr->sval == SV_LITE_LANTERN)
1616 do_cmd_refill_lamp();
1620 else if (o_ptr->sval == SV_LITE_TORCH)
1622 do_cmd_refill_torch();
1625 /* No torch to refill */
1629 msg_print("¤³¤Î¸÷¸»¤Ï¼÷Ì¿¤ò±ä¤Ð¤»¤Ê¤¤¡£");
1631 msg_print("Your light cannot be refilled.");
1641 void do_cmd_target(void)
1644 if (target_set(TARGET_KILL))
1647 msg_print("¥¿¡¼¥²¥Ã¥È·èÄê¡£");
1649 msg_print("Target Selected.");
1654 /* Target aborted */
1658 msg_print("¥¿¡¼¥²¥Ã¥È²ò½ü¡£");
1660 msg_print("Target Aborted.");
1671 void do_cmd_look(void)
1674 if (target_set(TARGET_LOOK))
1677 msg_print("¥¿¡¼¥²¥Ã¥È·èÄê¡£");
1679 msg_print("Target Selected.");
1688 * Allow the player to examine other sectors on the map
1690 void do_cmd_locate(void)
1692 int dir, y1, x1, y2, x2;
1701 get_screen_size(&wid, &hgt);
1704 /* Start at current panel */
1705 y2 = y1 = panel_row_min;
1706 x2 = x1 = panel_col_min;
1708 /* Show panels until done */
1711 /* Describe the location */
1712 if ((y2 == y1) && (x2 == x1))
1715 strcpy(tmp_val, "¿¿¾å");
1724 sprintf(tmp_val, "%s%s",
1725 ((y2 < y1) ? "ËÌ" : (y2 > y1) ? "Æî" : ""),
1726 ((x2 < x1) ? "À¾" : (x2 > x1) ? "Åì" : ""));
1728 sprintf(tmp_val, "%s%s of",
1729 ((y2 < y1) ? " North" : (y2 > y1) ? " South" : ""),
1730 ((x2 < x1) ? " West" : (x2 > x1) ? " East" : ""));
1735 /* Prepare to ask which way to look */
1738 "¥Þ¥Ã¥×°ÌÃÖ [%d(%02d),%d(%02d)] (¥×¥ì¥¤¥ä¡¼¤Î%s) Êý¸þ?",
1740 "Map sector [%d(%02d),%d(%02d)], which is%s your sector. Direction?",
1743 y2 / (hgt / 2), y2 % (hgt / 2),
1744 x2 / (wid / 2), x2 % (wid / 2), tmp_val);
1746 /* Assume no direction */
1749 /* Get a direction */
1754 /* Get a command (or Cancel) */
1755 if (!get_com(out_val, &command, TRUE)) break;
1757 /* Extract the action (if any) */
1758 dir = get_keymap_dir(command);
1767 /* Apply the motion */
1768 if (change_panel(ddy[dir], ddx[dir]))
1776 /* Recenter the map around the player */
1780 p_ptr->update |= (PU_MONSTERS);
1783 p_ptr->redraw |= (PR_MAP);
1786 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
1795 * Sorting hook -- Comp function -- see below
1797 * We use "u" to point to array of monster indexes,
1798 * and "v" to select the type of sorting to perform on "u".
1800 bool ang_sort_comp_hook(vptr u, vptr v, int a, int b)
1802 u16b *who = (u16b*)(u);
1804 u16b *why = (u16b*)(v);
1811 /* Sort by player kills */
1814 /* Extract player kills */
1815 z1 = r_info[w1].r_pkills;
1816 z2 = r_info[w2].r_pkills;
1818 /* Compare player kills */
1819 if (z1 < z2) return (TRUE);
1820 if (z1 > z2) return (FALSE);
1824 /* Sort by total kills */
1827 /* Extract total kills */
1828 z1 = r_info[w1].r_tkills;
1829 z2 = r_info[w2].r_tkills;
1831 /* Compare total kills */
1832 if (z1 < z2) return (TRUE);
1833 if (z1 > z2) return (FALSE);
1837 /* Sort by monster level */
1840 /* Extract levels */
1841 z1 = r_info[w1].level;
1842 z2 = r_info[w2].level;
1844 /* Compare levels */
1845 if (z1 < z2) return (TRUE);
1846 if (z1 > z2) return (FALSE);
1850 /* Sort by monster experience */
1853 /* Extract experience */
1854 z1 = r_info[w1].mexp;
1855 z2 = r_info[w2].mexp;
1857 /* Compare experience */
1858 if (z1 < z2) return (TRUE);
1859 if (z1 > z2) return (FALSE);
1863 /* Compare indexes */
1869 * Sorting hook -- Swap function -- see below
1871 * We use "u" to point to array of monster indexes,
1872 * and "v" to select the type of sorting to perform.
1874 void ang_sort_swap_hook(vptr u, vptr v, int a, int b)
1876 u16b *who = (u16b*)(u);
1892 * Identify a character, allow recall of monsters
1894 * Several "special" responses recall "multiple" monsters:
1896 * ^U (all unique monsters)
1897 * ^N (all non-unique monsters)
1899 * The responses may be sorted in several ways, see below.
1901 * Note that the player ghosts are ignored. XXX XXX XXX
1903 void do_cmd_query_symbol(void)
1915 bool recall = FALSE;
1920 /* Get a character, or abort */
1922 if (!get_com("ÃΤꤿ¤¤Ê¸»ú¤òÆþÎϤ·¤Æ²¼¤µ¤¤(µ¹æ or ^AÁ´,^U¥æ,^NÈó¥æ,^R¾èÇÏ,^M̾Á°): ", &sym, FALSE)) return;
1924 if (!get_com("Enter character to be identified(^A:All,^U:Uniqs,^N:Non uniqs,^M:Name): ", &sym, FALSE)) return;
1927 /* Find that character info, and describe it */
1928 for (i = 0; ident_info[i]; ++i)
1930 if (sym == ident_info[i][0]) break;
1934 if (sym == KTRL('A'))
1938 strcpy(buf, "Á´¥â¥ó¥¹¥¿¡¼¤Î¥ê¥¹¥È");
1940 strcpy(buf, "Full monster list.");
1943 else if (sym == KTRL('U'))
1947 strcpy(buf, "¥æ¥Ë¡¼¥¯¡¦¥â¥ó¥¹¥¿¡¼¤Î¥ê¥¹¥È");
1949 strcpy(buf, "Unique monster list.");
1952 else if (sym == KTRL('N'))
1956 strcpy(buf, "¥æ¥Ë¡¼¥¯³°¥â¥ó¥¹¥¿¡¼¤Î¥ê¥¹¥È");
1958 strcpy(buf, "Non-unique monster list.");
1961 else if (sym == KTRL('R'))
1965 strcpy(buf, "¾èÇϲÄǽ¥â¥ó¥¹¥¿¡¼¤Î¥ê¥¹¥È");
1967 strcpy(buf, "Ridable monster list.");
1970 /* XTRA HACK WHATSEARCH */
1971 else if (sym == KTRL('M'))
1975 if (!get_string("̾Á°(±Ñ¸ì¤Î¾ì¹ç¾®Ê¸»ú¤Ç²Ä)",temp, 70))
1977 if (!get_string("Enter name:",temp, 70))
1984 sprintf(buf, "̾Á°:%s¤Ë¥Þ¥Ã¥Á",temp);
1986 sprintf(buf, "Monsters with a name \"%s\"",temp);
1989 else if (ident_info[i])
1991 sprintf(buf, "%c - %s.", sym, ident_info[i] + 2);
1996 sprintf(buf, "%c - %s", sym, "̵¸ú¤Êʸ»ú");
1998 sprintf(buf, "%c - %s.", sym, "Unknown Symbol");
2002 /* Display the result */
2005 /* Allocate the "who" array */
2006 C_MAKE(who, max_r_idx, u16b);
2008 /* Collect matching monsters */
2009 for (n = 0, i = 1; i < max_r_idx; i++)
2011 monster_race *r_ptr = &r_info[i];
2013 /* Nothing to recall */
2014 if (!cheat_know && !r_ptr->r_sights) continue;
2016 /* Require non-unique monsters if needed */
2017 if (norm && (r_ptr->flags1 & (RF1_UNIQUE))) continue;
2019 /* Require unique monsters if needed */
2020 if (uniq && !(r_ptr->flags1 & (RF1_UNIQUE))) continue;
2022 /* Require ridable monsters if needed */
2023 if (ride && !(r_ptr->flags7 & (RF7_RIDING))) continue;
2025 /* XTRA HACK WHATSEARCH */
2031 for (xx=0; temp[xx] && xx<80; xx++)
2034 if (iskanji( temp[xx])) { xx++; continue; }
2036 if (isupper(temp[xx])) temp[xx]=tolower(temp[xx]);
2040 strcpy(temp2, r_name+r_ptr->E_name);
2042 strcpy(temp2, r_name+r_ptr->name);
2044 for (xx=0; temp2[xx] && xx<80; xx++)
2045 if (isupper(temp2[xx])) temp2[xx]=tolower(temp2[xx]);
2048 if (strstr(temp2, temp) || strstr_j(r_name + r_ptr->name, temp) )
2050 if (strstr(temp2, temp))
2055 /* Collect "appropriate" monsters */
2056 else if (all || (r_ptr->d_char == sym)) who[n++] = i;
2059 /* Nothing to recall */
2062 /* Free the "who" array */
2063 C_KILL(who, max_r_idx, u16b);
2069 /* Prompt XXX XXX XXX */
2071 put_str("»×¤¤½Ð¤ò¸«¤Þ¤¹¤«? (k:»¦³²½ç/y/n): ", 0, 36);
2073 put_str("Recall details? (k/y/n): ", 0, 40);
2085 /* Select the sort method */
2086 ang_sort_comp = ang_sort_comp_hook;
2087 ang_sort_swap = ang_sort_swap_hook;
2089 /* Sort the array */
2090 ang_sort(who, &why, n);
2092 /* Sort by kills (and level) */
2099 /* Catch "escape" */
2102 /* Free the "who" array */
2103 C_KILL(who, max_r_idx, u16b);
2108 /* Sort if needed */
2111 /* Select the sort method */
2112 ang_sort_comp = ang_sort_comp_hook;
2113 ang_sort_swap = ang_sort_swap_hook;
2115 /* Sort the array */
2116 ang_sort(who, &why, n);
2120 /* Start at the end */
2123 /* Scan the monster memory */
2126 /* Extract a race */
2129 /* Hack -- Auto-recall */
2130 monster_race_track(r_idx);
2132 /* Hack -- Handle stuff */
2141 /* Save the screen */
2144 /* Recall on screen */
2145 screen_roff(who[i], 0);
2148 /* Hack -- Begin the prompt */
2151 /* Hack -- Complete the prompt */
2153 Term_addstr(-1, TERM_WHITE, " ['r'»×¤¤½Ð, ESC]");
2155 Term_addstr(-1, TERM_WHITE, " [(r)ecall, ESC]");
2168 /* Normal commands */
2169 if (query != 'r') break;
2176 if (query == ESCAPE) break;
2178 /* Move to "prev" monster */
2184 if (!expand_list) break;
2188 /* Move to "next" monster */
2194 if (!expand_list) break;
2199 /* Free the "who" array */
2200 C_KILL(who, max_r_idx, u16b);
2202 /* Re-display the identity */