/* * Refill the players lamp, or restock his torches */ void do_cmd_refill(void) { int slot = equip_find_object(TV_LITE, SV_ANY); if (slot) { object_type *o_ptr = equip_obj(slot); if (p_ptr->special_defense & KATA_MUSOU) set_action(ACTION_NONE); switch (o_ptr->sval) { case SV_LITE_LANTERN: do_cmd_refill_lamp(o_ptr); break; case SV_LITE_TORCH: do_cmd_refill_torch(o_ptr); break; default: msg_print("Your light cannot be refilled."); } } else msg_print("You are not wielding a light."); }
/* * Refill the players lamp, or restock his torches */ void do_cmd_refill(void) { object_type *o_ptr; /* Get the light */ o_ptr = &inventory[INVEN_LIGHT]; /* It is nothing */ if (o_ptr->tval != TV_LIGHT) { msg_print("You are not wielding a light."); } /* It's a lamp */ else if (o_ptr->sval == SV_LIGHT_LANTERN) { do_cmd_refill_lamp(); } /* It's a torch */ else if (o_ptr->sval == SV_LIGHT_TORCH) { do_cmd_refill_torch(); } /* No torch to refill */ else { msg_print("Your light cannot be refilled."); } }
/* * Refill the players lamp, or restock his torches */ void do_cmd_refill(void) { object_type *o_ptr; /* Get the light */ o_ptr = &inventory[INVEN_LITE]; /* It is nothing */ if (o_ptr->tval != TV_LITE) { #ifdef JP msg_print("光源を装備していない。"); #else msg_print("You are not wielding a light."); #endif } /* It's a lamp */ else if (o_ptr->sval == SV_LITE_LANTERN) { do_cmd_refill_lamp(); } /* It's a torch */ else if (o_ptr->sval == SV_LITE_TORCH) { do_cmd_refill_torch(); } /* No torch to refill */ else { #ifdef JP msg_print("この光源は寿命を延ばせない。"); #else msg_print("Your light cannot be refilled."); #endif } }