<ClCompile Include="..\..\src\spell-kind\spells-fetcher.c" />\r
<ClCompile Include="..\..\src\spell-realm\spells-craft.c" />\r
<ClCompile Include="..\..\src\spell-realm\spells-demon.c" />\r
+ <ClCompile Include="..\..\src\spell-realm\spells-sorcery.c" />\r
<ClCompile Include="..\..\src\status\bad-status-setter.c" />\r
<ClCompile Include="..\..\src\status\base-status.c" />\r
<ClCompile Include="..\..\src\status\body-improvement.c" />\r
<ClInclude Include="..\..\src\spell-kind\spells-fetcher.h" />\r
<ClInclude Include="..\..\src\spell-realm\spells-craft.h" />\r
<ClInclude Include="..\..\src\spell-realm\spells-demon.h" />\r
+ <ClInclude Include="..\..\src\spell-realm\spells-sorcery.h" />\r
<ClInclude Include="..\..\src\status\bad-status-setter.h" />\r
<ClInclude Include="..\..\src\status\base-status.h" />\r
<ClInclude Include="..\..\src\status\body-improvement.h" />\r
<ClCompile Include="..\..\src\spell-kind\spells-fetcher.c">
<Filter>spell-kind</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\spell-realm\spells-sorcery.c">
+ <Filter>spell-realm</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\cmd\cmd-basic.h">
<ClInclude Include="..\..\src\spell-kind\spells-fetcher.h">
<Filter>spell-kind</Filter>
</ClInclude>
+ <ClInclude Include="..\..\src\spell-realm\spells-sorcery.h">
+ <Filter>spell-realm</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\wall.bmp" />
spell-realm/spells-demon.c spell-realm/spells-demon.h \
spell-realm/spells-hex.c spell-realm/spells-hex.h \
spell-realm/spells-song.c spell-realm/spells-song.h \
+ spell-realm/spells-sorcery.c spell-realm/spells-sorcery.h \
spell-realm/spells-trump.c spell-realm/spells-trump.h \
\
status/action-setter.c status/action-setter.h \
#include "spell-kind/spells-specific-bolt.h"
#include "spell-kind/spells-teleport.h"
#include "spell-realm/spells-hex.h"
+#include "spell-realm/spells-sorcery.h"
#include "spell/process-effect.h"
#include "spell/spells-object.h"
#include "spell/spells-status.h"
#include "spell-kind/spells-recall.h"
#include "spell-kind/spells-sight.h"
#include "spell-kind/spells-teleport.h"
+#include "spell-realm/spells-sorcery.h"
#include "spell/spells-status.h"
#include "spell/spells-summon.h"
#include "spell/spell-types.h"
#include "spell-kind/spells-recall.h"
#include "spell-kind/spells-sight.h"
#include "spell-kind/spells-teleport.h"
+#include "spell-realm/spells-sorcery.h"
#include "spell/spells-status.h"
#include "spell/spell-types.h"
#include "spell/spells3.h"
--- /dev/null
+#include "spell-realm/spells-sorcery.h"
+#include "core/asking-player.h"
+#include "floor/floor-object.h"
+#include "game-option/input-options.h"
+#include "inventory/inventory-object.h"
+#include "io/input-key-requester.h"
+#include "object-hook/hook-expendable.h"
+#include "object/item-use-flags.h"
+#include "object/object-flavor.h"
+#include "object/object-value.h"
+#include "system/object-type-definition.h"
+#include "view/display-messages.h"
+
+/*!
+ * @brief アイテムの価値に応じた錬金術処理 /
+ * Turns an object into gold, gain some of its value in a shop
+ * @param caster_ptr プレーヤーへの参照ポインタ
+ * @return 処理が実際に行われたらTRUEを返す
+ */
+bool alchemy(player_type *caster_ptr)
+{
+ bool force = FALSE;
+ if (command_arg > 0)
+ force = TRUE;
+
+ concptr q = _("どのアイテムを金に変えますか?", "Turn which item to gold? ");
+ concptr s = _("金に変えられる物がありません。", "You have nothing to turn to gold.");
+ OBJECT_IDX item;
+ object_type *o_ptr;
+ o_ptr = choose_object(caster_ptr, &item, q, s, (USE_INVEN | USE_FLOOR), 0);
+ if (!o_ptr)
+ return FALSE;
+
+ int amt = 1;
+ if (o_ptr->number > 1) {
+ amt = get_quantity(NULL, o_ptr->number);
+ if (amt <= 0)
+ return FALSE;
+ }
+
+ ITEM_NUMBER old_number = o_ptr->number;
+ o_ptr->number = amt;
+ GAME_TEXT o_name[MAX_NLEN];
+ object_desc(caster_ptr, o_name, o_ptr, 0);
+ o_ptr->number = old_number;
+
+ if (!force) {
+ if (confirm_destroy || (object_value(caster_ptr, o_ptr) > 0)) {
+ char out_val[MAX_NLEN + 40];
+ sprintf(out_val, _("本当に%sを金に変えますか?", "Really turn %s to gold? "), o_name);
+ if (!get_check(out_val))
+ return FALSE;
+ }
+ }
+
+ if (!can_player_destroy_object(caster_ptr, o_ptr)) {
+ msg_format(_("%sを金に変えることに失敗した。", "You fail to turn %s to gold!"), o_name);
+ return FALSE;
+ }
+
+ PRICE price = object_value_real(caster_ptr, o_ptr);
+ if (price <= 0) {
+ msg_format(_("%sをニセの金に変えた。", "You turn %s to fool's gold."), o_name);
+ vary_item(caster_ptr, item, -amt);
+ return TRUE;
+ }
+
+ price /= 3;
+
+ if (amt > 1)
+ price *= amt;
+
+ if (price > 30000)
+ price = 30000;
+ msg_format(_("%sを$%d の金に変えた。", "You turn %s to %ld coins worth of gold."), o_name, price);
+
+ caster_ptr->au += price;
+ caster_ptr->redraw |= PR_GOLD;
+ caster_ptr->window |= PW_PLAYER;
+ vary_item(caster_ptr, item, -amt);
+ return TRUE;
+}
--- /dev/null
+#pragma once
+
+#include "system/angband.h"
+
+bool alchemy(player_type *caster_ptr);
}
/*!
- * @brief アイテムの価値に応じた錬金術処理 /
- * Turns an object into gold, gain some of its value in a shop
- * @param caster_ptr プレーヤーへの参照ポインタ
- * @return 処理が実際に行われたらTRUEを返す
- */
-bool alchemy(player_type *caster_ptr)
-{
- bool force = FALSE;
- if (command_arg > 0)
- force = TRUE;
-
- concptr q = _("どのアイテムを金に変えますか?", "Turn which item to gold? ");
- concptr s = _("金に変えられる物がありません。", "You have nothing to turn to gold.");
- OBJECT_IDX item;
- object_type *o_ptr;
- o_ptr = choose_object(caster_ptr, &item, q, s, (USE_INVEN | USE_FLOOR), 0);
- if (!o_ptr)
- return FALSE;
-
- int amt = 1;
- if (o_ptr->number > 1) {
- amt = get_quantity(NULL, o_ptr->number);
- if (amt <= 0)
- return FALSE;
- }
-
- ITEM_NUMBER old_number = o_ptr->number;
- o_ptr->number = amt;
- GAME_TEXT o_name[MAX_NLEN];
- object_desc(caster_ptr, o_name, o_ptr, 0);
- o_ptr->number = old_number;
-
- if (!force) {
- if (confirm_destroy || (object_value(caster_ptr, o_ptr) > 0)) {
- char out_val[MAX_NLEN + 40];
- sprintf(out_val, _("本当に%sを金に変えますか?", "Really turn %s to gold? "), o_name);
- if (!get_check(out_val))
- return FALSE;
- }
- }
-
- if (!can_player_destroy_object(caster_ptr, o_ptr)) {
- msg_format(_("%sを金に変えることに失敗した。", "You fail to turn %s to gold!"), o_name);
- return FALSE;
- }
-
- PRICE price = object_value_real(caster_ptr, o_ptr);
- if (price <= 0) {
- msg_format(_("%sをニセの金に変えた。", "You turn %s to fool's gold."), o_name);
- vary_item(caster_ptr, item, -amt);
- return TRUE;
- }
-
- price /= 3;
-
- if (amt > 1)
- price *= amt;
-
- if (price > 30000)
- price = 30000;
- msg_format(_("%sを$%d の金に変えた。", "You turn %s to %ld coins worth of gold."), o_name, price);
-
- caster_ptr->au += price;
- caster_ptr->redraw |= PR_GOLD;
- caster_ptr->window |= PW_PLAYER;
- vary_item(caster_ptr, item, -amt);
- return TRUE;
-}
-
-/*!
* @brief アーティファクト生成の巻物処理 /
* @param caster_ptr プレーヤーへの参照ポインタ
* @return 生成が実際に試みられたらTRUEを返す
bool apply_disenchant(player_type* target_ptr, BIT_FLAGS mode);
void reserve_alter_reality(player_type* caster_ptr);
-bool alchemy(player_type* caster_ptr);
bool artifact_scroll(player_type* caster_ptr);
bool mundane_spell(player_type* ownner_ptr, bool only_equip);
bool recharge(player_type* caster_ptr, int power);