*/
#include "angband.h"
+#include "io/signal-handlers.h"
#include "util.h"
+#include "main/music-definitions-table.h"
+#include "main/sound-definitions-table.h"
#include "core.h"
#include "inet.h"
-#include "term.h"
+#include "gameterm.h"
+#include "chuukei.h"
#include "creature.h"
#include "birth.h"
-#include "bldg.h"
-#include "cmd-activate.h"
-#include "cmd-dump.h"
-#include "cmd-eat.h"
-#include "cmd-hissatsu.h"
-#include "cmd-item.h"
-#include "cmd-magiceat.h"
-#include "cmd-mane.h"
-#include "cmd-quaff.h"
-#include "cmd-read.h"
-#include "cmd-smith.h"
-#include "cmd-usestaff.h"
-#include "cmd-zaprod.h"
-#include "cmd-zapwand.h"
-#include "cmd-pet.h"
-#include "cmd-basic.h"
+#include "market/building.h"
+#include "io/write-diary.h"
+#include "cmd/cmd-activate.h"
+#include "cmd/cmd-autopick.h"
+#include "cmd/cmd-diary.h"
+#include "cmd/cmd-draw.h"
+#include "cmd/cmd-dump.h"
+#include "cmd/cmd-process-screen.h"
+#include "cmd/cmd-eat.h"
+#include "cmd/cmd-help.h"
+#include "cmd/cmd-hissatsu.h"
+#include "cmd/cmd-item.h"
+#include "cmd/cmd-knowledge.h"
+#include "cmd/cmd-magiceat.h"
+#include "cmd/cmd-mane.h"
+#include "cmd/cmd-macro.h"
+#include "cmd/cmd-quaff.h"
+#include "cmd/cmd-read.h"
+#include "cmd/cmd-save.h"
+#include "cmd/cmd-smith.h"
+#include "cmd/cmd-usestaff.h"
+#include "cmd/cmd-zaprod.h"
+#include "cmd/cmd-zapwand.h"
+#include "cmd/cmd-pet.h"
+#include "cmd/cmd-basic.h"
+#include "cmd/cmd-visuals.h"
#include "racial.h"
#include "snipe.h"
#include "dungeon.h"
#include "object-ego.h"
#include "object-curse.h"
#include "object-flavor.h"
-#include "store.h"
-#include "spells.h"
+#include "knowledge/knowledge-autopick.h"
+#include "knowledge/knowledge-quests.h"
+#include "market/store.h"
+#include "spell/technic-info-table.h"
#include "spells-summon.h"
#include "spells-object.h"
#include "spells-status.h"
#include "mind.h"
#include "world.h"
#include "mutation.h"
+#include "market/arena-info-table.h"
+#include "market/store-util.h"
#include "quest.h"
#include "artifact.h"
#include "avatar.h"
+#include "view/display-player.h"
+#include "player/process-name.h"
#include "player-move.h"
#include "player-status.h"
#include "player-class.h"
#include "player-damage.h"
#include "player-effects.h"
#include "cmd-spell.h"
-#include "realm-hex.h"
-#include "objectkind.h"
+#include "realm/realm-hex.h"
+#include "object/object-kind.h"
#include "object-hook.h"
#include "wild.h"
#include "monster-process.h"
#include "player-skill.h"
#include "player-inventory.h"
-#include "view-mainwindow.h"
+#include "view/display-main-window.h"
#include "dungeon-file.h"
+#include "io/uid-checker.h"
+#include "player/process-death.h"
+#include "io/read-pref-file.h"
#include "files.h"
#include "scores.h"
-#include "autopick.h"
+#include "autopick/autopick.h"
+#include "autopick/autopick-pref-processor.h"
+#include "autopick/autopick-reader-writer.h"
#include "save.h"
-#include "realm.h"
-#include "realm-song.h"
+#include "realm/realm.h"
+#include "realm/realm-song.h"
#include "targeting.h"
+#include "spell/spells-util.h"
+#include "spell/spells-execution.h"
/*!
* コピーライト情報 /
}
+/*!
+ * @brief 10ゲームターンが進行するごとにプレイヤーの空腹状態を飢餓方向に向かわせる
+ * @param creature_ptr プレーヤーへの参照ポインタ
+ * @return なし
+ */
static void process_world_aux_digestion(player_type *creature_ptr)
{
- if (!creature_ptr->phase_out)
+ if (creature_ptr->phase_out) return;
+
+ if (creature_ptr->food >= PY_FOOD_MAX)
{
- if (creature_ptr->food >= PY_FOOD_MAX)
- {
- (void)set_food(creature_ptr, creature_ptr->food - 100);
- }
- else if (!(current_world_ptr->game_turn % (TURNS_PER_TICK * 5)))
- {
- int digestion = SPEED_TO_ENERGY(creature_ptr->pspeed);
- if (creature_ptr->regenerate)
- digestion += 20;
- if (creature_ptr->special_defense & (KAMAE_MASK | KATA_MASK))
- digestion += 20;
- if (creature_ptr->cursed & TRC_FAST_DIGEST)
- digestion += 30;
+ (void)set_food(creature_ptr, creature_ptr->food - 100);
+ }
+ else if (!(current_world_ptr->game_turn % (TURNS_PER_TICK * 5)))
+ {
+ int digestion = SPEED_TO_ENERGY(creature_ptr->pspeed);
+ if (creature_ptr->regenerate)
+ digestion += 20;
+ if (creature_ptr->special_defense & (KAMAE_MASK | KATA_MASK))
+ digestion += 20;
+ if (creature_ptr->cursed & TRC_FAST_DIGEST)
+ digestion += 30;
- if (creature_ptr->slow_digest)
- digestion -= 5;
+ if (creature_ptr->slow_digest)
+ digestion -= 5;
- if (digestion < 1) digestion = 1;
- if (digestion > 100) digestion = 100;
+ if (digestion < 1) digestion = 1;
+ if (digestion > 100) digestion = 100;
- (void)set_food(creature_ptr, creature_ptr->food - digestion);
- }
+ (void)set_food(creature_ptr, creature_ptr->food - digestion);
+ }
- if ((creature_ptr->food < PY_FOOD_FAINT))
- {
- if (!creature_ptr->paralyzed && (randint0(100) < 10))
- {
- msg_print(_("あまりにも空腹で気絶してしまった。", "You faint from the lack of food."));
- disturb(creature_ptr, TRUE, TRUE);
- (void)set_paralyzed(creature_ptr, creature_ptr->paralyzed + 1 + randint0(5));
- }
+ if ((creature_ptr->food >= PY_FOOD_FAINT)) return;
- if (creature_ptr->food < PY_FOOD_STARVE)
- {
- HIT_POINT dam = (PY_FOOD_STARVE - creature_ptr->food) / 10;
- if (!IS_INVULN(creature_ptr)) take_hit(creature_ptr, DAMAGE_LOSELIFE, dam, _("空腹", "starvation"), -1);
- }
- }
+ if (!creature_ptr->paralyzed && (randint0(100) < 10))
+ {
+ msg_print(_("あまりにも空腹で気絶してしまった。", "You faint from the lack of food."));
+ disturb(creature_ptr, TRUE, TRUE);
+ (void)set_paralyzed(creature_ptr, creature_ptr->paralyzed + 1 + randint0(5));
+ }
+
+ if (creature_ptr->food < PY_FOOD_STARVE)
+ {
+ HIT_POINT dam = (PY_FOOD_STARVE - creature_ptr->food) / 10;
+ if (!IS_INVULN(creature_ptr)) take_hit(creature_ptr, DAMAGE_LOSELIFE, dam, _("空腹", "starvation"), -1);
}
}
if ((creature_ptr->muta2 & MUT2_DISARM) && one_in_(10000))
{
- INVENTORY_IDX slot = 0;
- object_type *o_ptr = NULL;
-
disturb(creature_ptr, FALSE, TRUE);
msg_print(_("足がもつれて転んだ!", "You trip over your own feet!"));
take_hit(creature_ptr, DAMAGE_NOESCAPE, randint1(creature_ptr->wt / 6), _("転倒", "tripping"), -1);
-
- msg_print(NULL);
- if (has_melee_weapon(creature_ptr, INVEN_RARM))
- {
- slot = INVEN_RARM;
- o_ptr = &creature_ptr->inventory_list[INVEN_RARM];
-
- if (has_melee_weapon(creature_ptr, INVEN_LARM) && one_in_(2))
- {
- o_ptr = &creature_ptr->inventory_list[INVEN_LARM];
- slot = INVEN_LARM;
- }
- }
- else if (has_melee_weapon(creature_ptr, INVEN_LARM))
- {
- o_ptr = &creature_ptr->inventory_list[INVEN_LARM];
- slot = INVEN_LARM;
- }
- if (slot && !object_is_cursed(o_ptr))
- {
- msg_print(_("武器を落としてしまった!", "You drop your weapon!"));
- drop_from_inventory(creature_ptr, slot, 1);
- }
+ drop_weapons(creature_ptr);
}
}
return FALSE;
}
- exe_write_diary(player_ptr, DIARY_DESCRIPTION, 0, _("ウィザードモードに突入してスコアを残せなくなった。", "give up recording score to enter wizard mode."));
+ exe_write_diary(player_ptr, DIARY_DESCRIPTION, 0, _("ウィザードモードに突入してスコアを残せなくなった。", "gave up recording score to enter wizard mode."));
current_world_ptr->noscore |= 0x0002;
}
return FALSE;
}
- exe_write_diary(player_ptr, DIARY_DESCRIPTION, 0, _("デバッグモードに突入してスコアを残せなくなった。", "give up sending score to use debug commands."));
+ exe_write_diary(player_ptr, DIARY_DESCRIPTION, 0, _("デバッグモードに突入してスコアを残せなくなった。", "gave up sending score to use debug commands."));
current_world_ptr->noscore |= 0x0008;
}
}
case '@':
{
- do_cmd_macros(creature_ptr);
+ do_cmd_macros(creature_ptr, process_autopick_file_command);
break;
}
case '%':
{
- do_cmd_visuals(creature_ptr);
+ do_cmd_visuals(creature_ptr, process_autopick_file_command);
do_cmd_redraw(creature_ptr);
break;
}
case '&':
{
- do_cmd_colors(creature_ptr);
+ do_cmd_colors(creature_ptr, process_autopick_file_command);
do_cmd_redraw(creature_ptr);
break;
}
}
case ')':
{
- do_cmd_save_screen(creature_ptr);
+ do_cmd_save_screen(creature_ptr, handle_stuff, process_autopick_file_command);
break;
}
case ']':
MONRACE_IDX r_idx;
bool success = FALSE;
get_mon_num_prep(creature_ptr, monster_is_fishing_target, NULL);
- r_idx = get_mon_num(creature_ptr, creature_ptr->current_floor_ptr->dun_level ? creature_ptr->current_floor_ptr->dun_level : wilderness[creature_ptr->wilderness_y][creature_ptr->wilderness_x].level);
+ r_idx = get_mon_num(creature_ptr, creature_ptr->current_floor_ptr->dun_level ? creature_ptr->current_floor_ptr->dun_level : wilderness[creature_ptr->wilderness_y][creature_ptr->wilderness_x].level, 0);
msg_print(NULL);
if (r_idx && one_in_(2))
{
{
char buf[1024];
sprintf(buf, "user.prf");
- process_pref_file(player_ptr, buf);
+ process_pref_file(player_ptr, buf, process_autopick_file_command);
sprintf(buf, "user-%s.prf", ANGBAND_SYS);
- process_pref_file(player_ptr, buf);
+ process_pref_file(player_ptr, buf, process_autopick_file_command);
sprintf(buf, "%s.prf", rp_ptr->title);
- process_pref_file(player_ptr, buf);
+ process_pref_file(player_ptr, buf, process_autopick_file_command);
sprintf(buf, "%s.prf", cp_ptr->title);
- process_pref_file(player_ptr, buf);
+ process_pref_file(player_ptr, buf, process_autopick_file_command);
sprintf(buf, "%s.prf", player_ptr->base_name);
- process_pref_file(player_ptr, buf);
+ process_pref_file(player_ptr, buf, process_autopick_file_command);
if (player_ptr->realm1 != REALM_NONE)
{
sprintf(buf, "%s.prf", realm_names[player_ptr->realm1]);
- process_pref_file(player_ptr, buf);
+ process_pref_file(player_ptr, buf, process_autopick_file_command);
}
if (player_ptr->realm2 != REALM_NONE)
{
sprintf(buf, "%s.prf", realm_names[player_ptr->realm2]);
- process_pref_file(player_ptr, buf);
+ process_pref_file(player_ptr, buf, process_autopick_file_command);
}
autopick_load_pref(player_ptr, FALSE);
#ifdef CHUUKEI
if (chuukei_client)
{
- reset_visuals();
+ reset_visuals(player_ptr, process_autopick_file_command);
browse_chuukei();
return;
}
if (browsing_movie)
{
- reset_visuals(player_ptr);
+ reset_visuals(player_ptr, process_autopick_file_command);
browse_movie();
return;
}
/* 町名消失バグ対策(#38205)のためここで世界マップ情報を読み出す */
process_dungeon_file(player_ptr, "w_info.txt", 0, 0, current_world_ptr->max_wild_y, current_world_ptr->max_wild_x);
- success = send_world_score(player_ptr, TRUE);
+ success = send_world_score(player_ptr, TRUE, update_playtime, display_player, map_name);
if (!success && !get_check_strict(_("スコア登録を諦めますか?", "Do you give up score registration? "), CHECK_NO_HISTORY))
{
current_world_ptr->seed_flavor = randint0(0x10000000);
current_world_ptr->seed_town = randint0(0x10000000);
- player_birth(player_ptr);
+ player_birth(player_ptr, process_autopick_file_command);
counts_write(player_ptr, 2, 0);
player_ptr->count = 0;
load = FALSE;
write_level = FALSE;
exe_write_diary(player_ptr, DIARY_GAMESTART, 1,
_(" ----ゲーム再開----",
- " ---- Restart Game ----"));
+ " --- Restarted Game ---"));
/*
* todo もう2.2.Xなので互換性は打ち切ってもいいのでは?
if (new_game)
{
char buf[80];
- sprintf(buf, _("%sに降り立った。", "You are standing in the %s."), map_name(player_ptr));
+ sprintf(buf, _("%sに降り立った。", "arrived in %s."), map_name(player_ptr));
exe_write_diary(player_ptr, DIARY_DESCRIPTION, 0, buf);
}
player_ptr->playing = TRUE;
- reset_visuals(player_ptr);
+ reset_visuals(player_ptr, process_autopick_file_command);
load_all_pref_files(player_ptr);
if (new_game)
{
{
for (int j = 0; j < MAX_STORES; j++)
{
- store_type *st_ptr = &town_info[i].store[j];
+ store_type *store_ptr = &town_info[i].store[j];
- if (st_ptr->last_visit > -10L * TURNS_PER_TICK * STORE_TICKS)
+ if (store_ptr->last_visit > -10L * TURNS_PER_TICK * STORE_TICKS)
{
- st_ptr->last_visit -= rollback_turns;
- if (st_ptr->last_visit < -10L * TURNS_PER_TICK * STORE_TICKS) st_ptr->last_visit = -10L * TURNS_PER_TICK * STORE_TICKS;
+ store_ptr->last_visit -= rollback_turns;
+ if (store_ptr->last_visit < -10L * TURNS_PER_TICK * STORE_TICKS) store_ptr->last_visit = -10L * TURNS_PER_TICK * STORE_TICKS;
}
- if (st_ptr->store_open)
+ if (store_ptr->store_open)
{
- st_ptr->store_open -= rollback_turns;
- if (st_ptr->store_open < 1) st_ptr->store_open = 1;
+ store_ptr->store_open -= rollback_turns;
+ if (store_ptr->store_open < 1) store_ptr->store_open = 1;
}
}
}
print_tomb(player_ptr);
flush();
- show_info(player_ptr);
+ show_info(player_ptr, handle_stuff, update_playtime, display_player, map_name);
Term_clear();
if (check_score(player_ptr))
{
- if ((!send_world_score(player_ptr, do_send)))
+ if ((!send_world_score(player_ptr, do_send, update_playtime, display_player, map_name)))
{
if (get_check_strict(_("後でスコアを登録するために待機しますか?", "Stand by for later score registration? "),
(CHECK_NO_ESCAPE | CHECK_NO_HISTORY)))