*/
#include "angband.h"
-#include "core.h"
+#include "core/stuff-handler.h"
#include "util.h"
#include "main/sound-definitions-table.h"
#include "cmd/cmd-spell.h"
#include "io/write-diary.h"
#include "cmd/cmd-dump.h"
#include "selfinfo.h"
-#include "spells.h"
+#include "spell/technic-info-table.h"
+#include "spell/spells2.h"
+#include "spell/spells3.h"
#include "spells-summon.h"
-#include "realm-hex.h"
+#include "realm/realm-hex.h"
#include "mind.h"
#include "avatar.h"
#include "player-damage.h"
#include "object-hook.h"
#include "cmd-basic.h"
#include "view/display-main-window.h"
-#include "floor.h"
+#include "floor/floor.h"
#include "autopick/autopick-reader-writer.h"
#include "japanese.h"
+#include "spell/spells-util.h"
+#include "spell/spells-execution.h"
/*!
* 魔法領域フラグ管理テーブル /
object_type *o_ptr;
concptr q, s;
+ OBJECT_TYPE_VALUE tval = 0;
/* Warriors are illiterate */
if (!(caster_ptr->realm1 || caster_ptr->realm2) && (caster_ptr->pclass != CLASS_SORCERER) && (caster_ptr->pclass != CLASS_RED_MAGE))
}
/* Restrict choices to "useful" books */
- if (caster_ptr->realm2 == REALM_NONE) item_tester_tval = mp_ptr->spell_book;
+ if (caster_ptr->realm2 == REALM_NONE) tval = mp_ptr->spell_book;
else item_tester_hook = item_tester_learn_spell;
q = _("どの本を読みますか? ", "Browse which book? ");
s = _("読める本がない。", "You have no books that you can read.");
- o_ptr = choose_object(caster_ptr, &item, q, s, (USE_INVEN | USE_FLOOR | (caster_ptr->pclass == CLASS_FORCETRAINER ? USE_FORCE : 0)), item_tester_tval);
+ o_ptr = choose_object(caster_ptr, &item, q, s, (USE_INVEN | USE_FLOOR | (caster_ptr->pclass == CLASS_FORCETRAINER ? USE_FORCE : 0)), tval);
+
+ item_tester_hook = NULL;
if (!o_ptr)
{
if (item == INVEN_FORCE) /* the_force */
concptr p = spell_category_name(mp_ptr->spell_book);
object_type *o_ptr;
concptr q, s;
+ OBJECT_TYPE_VALUE tval = 0;
+
if (!caster_ptr->realm1)
{
/* Restrict choices to "useful" books */
- if (caster_ptr->realm2 == REALM_NONE) item_tester_tval = mp_ptr->spell_book;
+ if (caster_ptr->realm2 == REALM_NONE) tval = mp_ptr->spell_book;
else item_tester_hook = item_tester_learn_spell;
q = _("どの本から学びますか? ", "Study which book? ");
s = _("読める本がない。", "You have no books that you can read.");
- o_ptr = choose_object(caster_ptr, &item, q, s, (USE_INVEN | USE_FLOOR), item_tester_tval);
+ o_ptr = choose_object(caster_ptr, &item, q, s, (USE_INVEN | USE_FLOOR), tval);
- item_tester_tval = 0;
if (!o_ptr) return;
/* Access the item's sval */