int rod_effect(OBJECT_SUBTYPE_VALUE sval, DIRECTION dir, bool *use_charge, bool powerful, bool magic)
{
int ident = FALSE;
- int lev = powerful ? p_ptr->lev * 2 : p_ptr->lev;
- int detect_rad = powerful ? DETECT_RAD_DEFAULT * 3 / 2 : DETECT_RAD_DEFAULT;
+ PLAYER_LEVEL lev = powerful ? p_ptr->lev * 2 : p_ptr->lev;
+ POSITION detect_rad = powerful ? DETECT_RAD_DEFAULT * 3 / 2 : DETECT_RAD_DEFAULT;
POSITION rad = powerful ? 3 : 2;
/* Unused */
case SV_ROD_RECALL:
{
- if (!word_of_recall()) *use_charge = FALSE;
+ if (!recall_player(p_ptr, randint0(21) + 15)) *use_charge = FALSE;
ident = TRUE;
break;
}
}
- /* Take a turn */
p_ptr->energy_use = 100;
/* Extract the item level */
if (use_charge) o_ptr->timeout += k_ptr->pval;
/* Combine / Reorder the pack (later) */
- p_ptr->notice |= (PN_COMBINE | PN_REORDER);
+ p_ptr->update |= (PU_COMBINE | PU_REORDER);
if (!(object_is_aware(o_ptr)))
{
gain_exp((lev + (p_ptr->lev >> 1)) / p_ptr->lev);
}
- /* Window stuff */
p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
}
void do_cmd_zap_rod(void)
{
OBJECT_IDX item;
- cptr q, s;
+ concptr q, s;
+
+ if (p_ptr->wild_mode)
+ {
+ return;
+ }
+
+ if (p_ptr->inside_arena)
+ {
+ msg_print(_("アリーナが魔法を吸収した!", "The arena absorbs all attempted magic!"));
+ msg_print(NULL);
+ return;
+ }
if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
{
/* Restrict choices to rods */
item_tester_tval = TV_ROD;
- /* Get an item */
q = _("どのロッドを振りますか? ", "Zap which rod? ");
s = _("使えるロッドがない。", "You have no rod to zap.");
- if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
+ if (!choose_object(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
/* Zap the rod */
do_cmd_zap_rod_aux(item);