<ClCompile Include="..\..\src\autopick.c" />\r
<ClCompile Include="..\..\src\avatar.c" />\r
<ClCompile Include="..\..\src\birth.c" />\r
- <ClCompile Include="..\..\src\bldg.c" />\r
+ <ClCompile Include="..\..\src\market\building.c" />\r
<ClCompile Include="..\..\src\character-dump.c" />\r
<ClCompile Include="..\..\src\chest.c" />\r
<ClCompile Include="..\..\src\chuukei.c" />\r
<ClInclude Include="..\..\src\autopick.h" />\r
<ClInclude Include="..\..\src\avatar.h" />\r
<ClInclude Include="..\..\src\birth.h" />\r
- <ClInclude Include="..\..\src\bldg.h" />\r
+ <ClInclude Include="..\..\src\market\building.h" />\r
<ClInclude Include="..\..\src\character-dump.h" />\r
<ClInclude Include="..\..\src\chest.h" />\r
<ClInclude Include="..\..\src\chuukei.h" />\r
<ClCompile Include="..\..\src\store.c">
<Filter>market</Filter>
</ClCompile>
- <ClCompile Include="..\..\src\bldg.c">
- <Filter>market</Filter>
- </ClCompile>
<ClCompile Include="..\..\src\rumor.c">
<Filter>market</Filter>
</ClCompile>
<ClCompile Include="..\..\src\cmd\cmd-inn.c">
<Filter>cmd</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\market\building.c">
+ <Filter>market</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\gamevalue.h" />
<ClInclude Include="..\..\src\store.h">
<Filter>market</Filter>
</ClInclude>
- <ClInclude Include="..\..\src\bldg.h">
- <Filter>market</Filter>
- </ClInclude>
<ClInclude Include="..\..\src\rumor.h">
<Filter>market</Filter>
</ClInclude>
<ClInclude Include="..\..\src\cmd\cmd-inn.h">
<Filter>cmd</Filter>
</ClInclude>
+ <ClInclude Include="..\..\src\market\building.h">
+ <Filter>market</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\wall.bmp" />
market/say-comments.c market/say-comments.h \
market/store-util.c market/store-util.h \
market/gold-magnification-table.c market/gold-magnification-table.h \
- store.c store.h bldg.c bldg.h chest.c chest.h chuukei.c chuukei.h \
+ store.c store.h building.c building.h chest.c chest.h chuukei.c chuukei.h \
\
view/display-characteristic.c view/display-characteristic.h \
view/display-fruit.c view/display-fruit.h \
#include "angband.h"
#include "util.h"
-#include "bldg.h"
+#include "market/building.h"
#include "core.h"
#include "core/show-file.h"
#include "io/read-pref-file.h"
/*!
+ * @brief 宿屋への宿泊実行処理
+ * @param customer_ptr プレーヤーへの参照ポインタ
+ * @return 泊まれたらTRUE
+ */
+static bool stay_inn(player_type *customer_ptr)
+{
+ if (!is_healthy_stay(customer_ptr)) return FALSE;
+
+ int prev_day, prev_hour, prev_min;
+ extract_day_hour_min(customer_ptr, &prev_day, &prev_hour, &prev_min);
+ write_diary_stay_inn(customer_ptr, prev_hour);
+
+ pass_game_turn_by_stay();
+ prevent_turn_overflow(customer_ptr);
+
+ if ((prev_hour >= 18) && (prev_hour <= 23))
+ exe_write_diary(customer_ptr, DIARY_DIALY, 0, NULL);
+
+ customer_ptr->chp = customer_ptr->mhp;
+ if (have_a_nightmare(customer_ptr)) return TRUE;
+
+ back_to_health(customer_ptr);
+ charge_magic_eating_energy(customer_ptr);
+
+ display_stay_result(customer_ptr, prev_hour);
+ return TRUE;
+}
+
+
+/*!
* todo 悪夢を見る前後に全回復しているが、何か意図がある?
* @brief 宿屋を利用する
* @param customer_ptr プレーヤーへの参照ポインタ
{
case BACT_FOOD:
return buy_food(customer_ptr);
- case BACT_REST: /* Rest for the night */
- {
- if (!is_healthy_stay(customer_ptr)) return FALSE;
-
- int prev_day, prev_hour, prev_min;
- extract_day_hour_min(customer_ptr, &prev_day, &prev_hour, &prev_min);
- write_diary_stay_inn(customer_ptr, prev_hour);
-
- pass_game_turn_by_stay();
- prevent_turn_overflow(customer_ptr);
-
- if ((prev_hour >= 18) && (prev_hour <= 23))
- exe_write_diary(customer_ptr, DIARY_DIALY, 0, NULL);
-
- customer_ptr->chp = customer_ptr->mhp;
- if (have_a_nightmare(customer_ptr)) return TRUE;
-
- back_to_health(customer_ptr);
- charge_magic_eating_energy(customer_ptr);
-
- display_stay_result(customer_ptr);
- return TRUE;
- }
- case BACT_RUMORS: /* Listen for rumors */
+ case BACT_REST:
+ return stay_inn(customer_ptr);
+ case BACT_RUMORS:
display_rumor(customer_ptr, TRUE);
return TRUE;
default:
#include "creature.h"
#include "birth.h"
-#include "bldg.h"
+#include "market/building.h"
#include "io/write-diary.h"
#include "cmd/cmd-activate.h"
#include "cmd/cmd-diary.h"
#include "player-race.h"
#include "dungeon.h"
#include "floor.h"
-#include "bldg.h"
+#include "market/building.h"
#include "world.h"
#include "rooms-vault.h"
#include "objectkind.h"
#include "angband.h"
#include "util.h"
#include "core.h"
-#include "bldg.h"
+#include "market/building.h"
#include "io/write-diary.h"
#include "cmd/cmd-dump.h"
*/
#include "angband.h"
-#include "bldg.h"
+#include "market/building.h"
#include "core.h"
#include "load.h"
#include "util.h"
#include "term.h"
#include "artifact.h"
-#include "bldg.h"
+#include "market/building.h"
#include "init.h"
#include "quest.h"
#include "trap.h"
#include "core.h"
#include "load.h"
-#include "bldg.h"
+#include "market/building.h"
#include "report.h"
#include "dungeon.h"
/*!
- @file bldg.c
- @brief 町の施設処理 / Building commands
- @date 2013/12/23
- @author
- Created by Ken Wigle for Kangband - a variant of Angband 2.8.3
- -KMW-
-
- Rewritten for Kangband 2.8.3i using Kamband's version of
- bldg.c as written by Ivan Tkatchev
-
- Changed for ZAngband by Robert Ruehlmann
+ * @file building.c
+ * @brief 町の施設処理 / Building commands
+ * @date 2013/12/23
+ * @author
+ * Created by Ken Wigle for Kangband - a variant of Angband 2.8.3
+ * -KMW-
+ *
+ * Rewritten for Kangband 2.8.3i using Kamband's version of
+ * building.c as written by Ivan Tkatchev
+ *
+ * Changed for ZAngband by Robert Ruehlmann
*/
#include "angband.h"
#include "sort.h"
#include "avatar.h"
-#include "bldg.h"
+#include "market/building.h"
#include "dungeon.h"
#include "mutation.h"
#include "quest.h"
*/
static void arena_comm(player_type *player_ptr, int cmd)
{
- monster_race *r_ptr;
- concptr name;
-
switch (cmd)
{
case BACT_ARENA:
player_ptr->leave_bldg = TRUE;
break;
case BACT_POSTER:
+ {
if (player_ptr->arena_number == MAX_ARENA_MONS)
{
msg_print(_("あなたは勝利者だ。 アリーナでのセレモニーに参加しなさい。",
break;
}
+ monster_race *r_ptr;
r_ptr = &r_info[arena_info[player_ptr->arena_number].r_idx];
- name = (r_name + r_ptr->name);
+ concptr name = (r_name + r_ptr->name);
msg_format(_("%s に挑戦するものはいないか?", "Do I hear any challenges against: %s"), name);
player_ptr->monster_race_idx = arena_info[player_ptr->arena_number].r_idx;
player_ptr->window |= (PW_MONSTER);
handle_stuff(player_ptr);
break;
+ }
case BACT_ARENA_RULES:
screen_save();
#include "io/write-diary.h"
#include "cmd/cmd-dump.h"
-#include "bldg.h"
+#include "market/building.h"
#include "cmd-pet.h"
#include "floor.h"
#include "objectkind-hook.h"
#include "term.h"
#include "avatar.h"
-#include "bldg.h"
+#include "market/building.h"
#include "io/write-diary.h"
#include "cmd/cmd-dump.h"
#include "market/arena-info-table.h"
#include "artifact.h"
#include "cmd-dump.h"
#include "floor.h"
-#include "bldg.h"
+#include "market/building.h"
#include "birth.h"
#include "grid.h"
#include "mutation.h"
#include "core.h"
#include "util.h"
-#include "bldg.h"
+#include "market/building.h"
#include "quest.h"
#include "player-move.h"
#include "player-status.h"
#pragma once
-#include "bldg.h"
+#include "market/building.h"
struct floor_type;
typedef struct floor_type floor_type;
#include "objectkind.h"
#include "monsterrace.h"
#include "birth.h"
-#include "bldg.h"
+#include "market/building.h"
#include "view-mainwindow.h"
/*
*/
#include "angband.h"
-#include "bldg.h"
+#include "market/building.h"
#include "core.h"
#include "term.h"
#include "util.h"
#include "term.h"
#include "targeting.h"
-#include "bldg.h"
+#include "market/building.h"
#include "cmd-pet.h"
#include "dungeon-file.h"
#include "object-curse.h"
#include "autopick.h"
#include "term.h"
-#include "bldg.h"
+#include "market/building.h"
#include "core.h"
#include "files.h"
#include "world.h"
#include "dungeon-file.h"
#include "files.h"
#include "monster-spell.h"
-#include "bldg.h"
+#include "market/building.h"
#include "objectkind.h"
#include "targeting.h"
#include "view-mainwindow.h"