OSDN Git Service

[Refactor] #38862 Moved spells-* to spell/
[hengband/hengband.git] / src / market / building.c
index 3c002d3..1367f1c 100644 (file)
  * Changed for ZAngband by Robert Ruehlmann
 */
 
-#include "angband.h"
+#include "system/angband.h"
 #include "util.h"
 #include "main/music-definitions-table.h"
 #include "gameterm.h"
 
-#include "core.h"
+#include "system/system-variables.h" // 暫定、init_flags のため。後で消すかも.
+#include "core/stuff-handler.h"
 #include "core/show-file.h"
+#include "core/special-internal-keys.h"
 #include "cmd/cmd-dump.h"
 #include "cmd/cmd-inn.h"
-#include "floor.h"
-#include "floor-events.h"
-#include "floor-save.h"
+#include "floor/floor.h"
+#include "floor/floor-events.h"
+#include "floor/floor-save.h"
 #include "autopick/autopick.h"
 #include "object/object-kind.h"
-#include "object-boost.h"
-#include "object-flavor.h"
-#include "object-hook.h"
-#include "monster.h"
-#include "monsterrace-hook.h"
+#include "object/object-boost.h"
+#include "object/object-flavor.h"
+#include "object/object-hook.h"
+#include "monster/monster.h"
+#include "monster/monsterrace-hook.h"
 #include "melee.h"
 #include "wild.h"
-#include "world.h"
+#include "world/world.h"
 #include "sort.h"
 
 #include "avatar.h"
 #include "market/building.h"
-#include "dungeon.h"
-#include "mutation.h"
+#include "dungeon/dungeon.h"
+#include "mutation/mutation.h"
 #include "quest.h"
 #include "artifact.h"
 #include "cmd-spell.h"
-#include "spells.h"
-#include "spells-object.h"
-#include "spells-status.h"
+#include "spell/spells3.h"
+#include "spell/spells-object.h"
+#include "spell/spells-status.h"
 #include "realm/realm-hex.h"
-#include "dungeon-file.h"
+#include "dungeon/dungeon-file.h"
 
 #include "files.h"
-#include "player-status.h"
-#include "player-effects.h"
-#include "player-class.h"
-#include "player-personality.h"
+#include "player/player-status.h"
+#include "player/player-effects.h"
+#include "player/player-class.h"
+#include "player/player-personality.h"
 #include "player-inventory.h"
 #include "scores.h"
 #include "shoot.h"
 #include "view/display-main-window.h"
-#include "monsterrace.h"
+#include "monster/monsterrace.h"
 #include "autopick/autopick.h"
 
 #include "market/poker.h"
@@ -1846,7 +1848,7 @@ static int repair_broken_weapon(player_type *player_ptr, PRICE bcost)
  * @param to_ac ACをアップさせる量
  * @return 実際に行ったらTRUE
  */
-static bool enchant_item(player_type *player_ptr, PRICE cost, HIT_PROB to_hit, HIT_POINT to_dam, ARMOUR_CLASS to_ac)
+static bool enchant_item(player_type *player_ptr, PRICE cost, HIT_PROB to_hit, HIT_POINT to_dam, ARMOUR_CLASS to_ac, OBJECT_TYPE_VALUE item_tester_tval)
 {
        clear_bldg(4, 18);
        int maxenchant = (player_ptr->lev / 5);
@@ -2449,7 +2451,7 @@ static void bldg_process_command(player_type *player_ptr, building_type *bldg, i
                /* Do nothing */
                break;
        case BACT_RESEARCH_ITEM:
-               paid = identify_fully(player_ptr, FALSE);
+               paid = identify_fully(player_ptr, FALSE, 0);
                break;
        case BACT_TOWN_HISTORY:
                town_history(player_ptr);
@@ -2492,11 +2494,11 @@ static void bldg_process_command(player_type *player_ptr, building_type *bldg, i
                break;
        case BACT_ENCHANT_WEAPON:
                item_tester_hook = object_allow_enchant_melee_weapon;
-               enchant_item(player_ptr, bcost, 1, 1, 0);
+               enchant_item(player_ptr, bcost, 1, 1, 0, 0);
                break;
        case BACT_ENCHANT_ARMOR:
                item_tester_hook = object_is_armour;
-               enchant_item(player_ptr, bcost, 0, 0, 1);
+               enchant_item(player_ptr, bcost, 0, 0, 1, 0);
                break;
        case BACT_RECHARGE:
                building_recharge(player_ptr);
@@ -2511,7 +2513,7 @@ static void bldg_process_command(player_type *player_ptr, building_type *bldg, i
                paid = TRUE;
                break;
        case BACT_IDENT_ONE:
-               paid = ident_spell(player_ptr, FALSE);
+               paid = ident_spell(player_ptr, FALSE, 0);
                break;
        case BACT_LEARN:
                do_cmd_study(player_ptr);
@@ -2524,11 +2526,10 @@ static void bldg_process_command(player_type *player_ptr, building_type *bldg, i
                break;
        case BACT_ENCHANT_ARROWS:
                item_tester_hook = item_tester_hook_ammo;
-               enchant_item(player_ptr, bcost, 1, 1, 0);
+               enchant_item(player_ptr, bcost, 1, 1, 0, 0);
                break;
        case BACT_ENCHANT_BOW:
-               item_tester_tval = TV_BOW;
-               enchant_item(player_ptr, bcost, 1, 1, 0);
+               enchant_item(player_ptr, bcost, 1, 1, 0, TV_BOW);
                break;
 
        case BACT_RECALL: