}
}
-
-bool select_the_force = FALSE;
-
/*!
* @brief 領域魔法の閲覧、学習、使用選択するインターフェイス処理
* Allow user to choose a spell/prayer from the given book.
confirm_use_force(TRUE);
return;
}
- select_the_force = TRUE;
}
/* Restrict choices to "useful" books */
q = _("どの本を読みますか? ", "Browse which book? ");
s = _("読める本がない。", "You have no books that you can read.");
- o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_FLOOR));
+ o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_FLOOR | (p_ptr->pclass == CLASS_FORCETRAINER ? USE_FORCE : 0)));
if (!o_ptr)
{
if (item == INVEN_FORCE) /* the_force */
do_cmd_mind_browse();
return;
}
- select_the_force = FALSE;
return;
}
- select_the_force = FALSE;
/* Access the item's sval */
sval = o_ptr->sval;
confirm_use_force(FALSE);
return;
}
- select_the_force = TRUE;
}
prayer = spell_category_name(mp_ptr->spell_book);
q = _("どの呪文書を使いますか? ", "Use which book? ");
s = _("呪文書がない!", "You have no spell books!");
- o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_FLOOR));
+ o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_FLOOR | (p_ptr->pclass == CLASS_FORCETRAINER ? USE_FORCE : 0)));
if (!o_ptr)
{
if (item == INVEN_FORCE) /* the_force */
do_cmd_mind();
return;
}
- select_the_force = FALSE;
return;
}
- select_the_force = FALSE;
/* Access the item's sval */
sval = o_ptr->sval;
char tmp_val[160];
char out_val[160];
- /* See cmd5.c */
- extern bool select_the_force;
-
int menu_line = (use_menu ? 1 : 0);
int max_inven = 0;
int max_equip = 0;
if (repeat_pull(cp))
{
/* the_force */
- if (select_the_force && (*cp == INVEN_FORCE))
+ if (mode & USE_FORCE && (*cp == INVEN_FORCE))
{
item_tester_tval = 0;
item_tester_hook = NULL;
{
/* Cancel p_ptr->command_see */
command_see = FALSE;
-
oops = TRUE;
-
done = TRUE;
- if (select_the_force) {
+ if (mode & USE_FORCE) {
*cp = INVEN_FORCE;
item = TRUE;
}
/* Indicate legality of the "floor" item */
if (allow_floor) strcat(out_val, _(" '-'床上,", " - for floor,"));
- if (select_the_force) strcat(out_val, _(" 'w'練気術,", " w for the Force,"));
+ if (mode & USE_FORCE) strcat(out_val, _(" 'w'練気術,", " w for the Force,"));
/* Finish the prompt */
strcat(out_val, " ESC");
}
case 'w':
{
- if (select_the_force) {
+ if (mode & USE_FORCE) {
*cp = INVEN_FORCE;
item = TRUE;
done = TRUE;
case 'w':
{
- if (select_the_force) {
+ if (mode & USE_FORCE) {
*cp = INVEN_FORCE;
item = TRUE;
done = TRUE;
bool equip = (mode & USE_EQUIP) ? TRUE : FALSE;
bool inven = (mode & USE_INVEN) ? TRUE : FALSE;
bool floor = (mode & USE_FLOOR) ? TRUE : FALSE;
+ bool force = (mode & USE_FORCE) ? TRUE : FALSE;
bool allow_equip = FALSE;
bool allow_inven = FALSE;
int floor_top = 0;
TERM_LEN min_width = 0;
- extern bool select_the_force;
-
int menu_line = (use_menu ? 1 : 0);
int max_inven = 0;
int max_equip = 0;
if (repeat_pull(cp))
{
/* the_force */
- if (select_the_force && (*cp == INVEN_FORCE))
+ if (force && (*cp == INVEN_FORCE))
{
item_tester_tval = 0;
item_tester_hook = NULL;
{
/* Cancel p_ptr->command_see */
command_see = FALSE;
-
oops = TRUE;
-
done = TRUE;
- if (select_the_force) {
+ if (force) {
*cp = INVEN_FORCE;
item = TRUE;
}
}
/* Append */
- if (select_the_force) strcat(out_val, _(" 'w'練気術,", " w for the Force,"));
+ if (force) strcat(out_val, _(" 'w'練気術,", " w for the Force,"));
/* Finish the prompt */
strcat(out_val, " ESC");
}
case 'w':
{
- if (select_the_force) {
+ if (force) {
*cp = INVEN_FORCE;
item = TRUE;
done = TRUE;
case 'w':
{
- if (select_the_force) {
+ if (force) {
*cp = INVEN_FORCE;
item = TRUE;
done = TRUE;