#include "angband.h"
#include "chest.h"
+#include "trap.h"
#include "floor.h"
#include "melee.h"
#include "object-hook.h"
#include "wild.h"
#include "grid.h"
#include "feature.h"
+#include "player-move.h"
+#include "object-broken.h"
/*!
* @brief フロア脱出時に出戻りが不可能だった場合に警告を加える処理
return FALSE;
}
+bool cmd_limit_image(player_type *creature_ptr)
+{
+ if (creature_ptr->image)
+ {
+ msg_print(_("幻覚が見えて集中できない!", "You are too hallucinated!"));
+ return TRUE;
+ }
+ return FALSE;
+}
+
+bool cmd_limit_stun(player_type *creature_ptr)
+{
+ if (creature_ptr->stun)
+ {
+ msg_print(_("頭が朦朧としていて集中できない!", "You are too stuned!"));
+ return TRUE;
+ }
+ return FALSE;
+}
+
bool cmd_limit_arena(player_type *creature_ptr)
{
if (creature_ptr->inside_arena)
{
current_floor_ptr->dun_level = 0;
}
-
- /* Leaving */
p_ptr->leaving = TRUE;
p_ptr->oldpx = 0;
msg_print(_("地上に戻った。", "You go back to the surface."));
else
msg_print(_("階段を上って新たなる迷宮へと足を踏み入れた。", "You enter a maze of up staircases."));
-
- /* Leaving */
p_ptr->leaving = TRUE;
}
{
current_floor_ptr->dun_level = 0;
}
-
- /* Leaving */
p_ptr->leaving = TRUE;
p_ptr->oldpx = 0;
p_ptr->oldpy = 0;
}
}
-
- /* Leaving */
p_ptr->leaving = TRUE;
if (fall_trap)
/* Remove the feature */
cave_alter_feat(y, x, FF_TUNNEL);
-
- /* Update some things */
p_ptr->update |= (PU_FLOW);
}
else
}
}
-
- /* Paranoia */
if (command_arg > 9999) command_arg = 9999;
if (p_ptr->special_defense & NINJA_S_STEALTH) set_superstealth(FALSE);
chg_virtue(V_DILIGENCE, -1);
/* Save the rest code */
- resting = command_arg;
+ p_ptr->resting = command_arg;
p_ptr->action = ACTION_REST;
p_ptr->update |= (PU_BONUS);
update_creature(p_ptr);
* @brief 射撃処理のメインルーチン
* @return なし
*/
-void do_cmd_fire(void)
+void do_cmd_fire(SPELL_IDX snipe_type)
{
OBJECT_IDX item;
object_type *j_ptr, *ammo_ptr;
}
/* Fire the item */
- exe_fire(item, j_ptr);
+ exe_fire(item, j_ptr, snipe_type);
if (!is_fired || p_ptr->pclass != CLASS_SNIPER) return;
if (hit_body) torch_lost_fuel(q_ptr);
/* Chance of breakage (during attacks) */
- j = (hit_body ? breakage_chance(q_ptr) : 0);
+ j = (hit_body ? breakage_chance(q_ptr, 0) : 0);
/* Figurines transform */
if ((q_ptr->tval == TV_FIGURINE) && !(p_ptr->inside_arena))
/* Increment the equip counter by hand */
equip_cnt++;
- /* Recalculate torch */
p_ptr->update |= (PU_BONUS | PU_TORCH | PU_MANA);
p_ptr->window |= (PW_EQUIP);
}
return TRUE;
}
+
+/*!
+ * @brief 自殺するコマンドのメインルーチン
+ * Hack -- commit suicide
+ * @return なし
+ * @details
+ */
+void do_cmd_suicide(void)
+{
+ int i;
+
+ /* Flush input */
+ flush();
+
+ /* Verify Retirement */
+ if (p_ptr->total_winner)
+ {
+ /* Verify */
+ if (!get_check_strict(_("引退しますか? ", "Do you want to retire? "), CHECK_NO_HISTORY)) return;
+ }
+
+ /* Verify Suicide */
+ else
+ {
+ /* Verify */
+ if (!get_check(_("本当に自殺しますか?", "Do you really want to commit suicide? "))) return;
+ }
+
+
+ if (!p_ptr->noscore)
+ {
+ /* Special Verification for suicide */
+ prt(_("確認のため '@' を押して下さい。", "Please verify SUICIDE by typing the '@' sign: "), 0, 0);
+
+ flush();
+ i = inkey();
+ prt("", 0, 0);
+ if (i != '@') return;
+
+ play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_GAMEOVER);
+ }
+
+ /* Initialize "last message" buffer */
+ if (p_ptr->last_message) string_free(p_ptr->last_message);
+ p_ptr->last_message = NULL;
+
+ /* Hack -- Note *winning* message */
+ if (p_ptr->total_winner && last_words)
+ {
+ char buf[1024] = "";
+ play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_WINNER);
+ do
+ {
+ while (!get_string(_("*勝利*メッセージ: ", "*Winning* message: "), buf, sizeof buf));
+ } while (!get_check_strict(_("よろしいですか?", "Are you sure? "), CHECK_NO_HISTORY));
+
+ if (buf[0])
+ {
+ p_ptr->last_message = string_make(buf);
+ msg_print(p_ptr->last_message);
+ }
+ }
+
+ /* Stop playing */
+ p_ptr->playing = FALSE;
+
+ /* Kill the player */
+ p_ptr->is_dead = TRUE;
+ p_ptr->leaving = TRUE;
+
+ if (!p_ptr->total_winner)
+ {
+ do_cmd_write_nikki(NIKKI_BUNSHOU, 0, _("ダンジョンの探索に絶望して自殺した。", "give up all hope to commit suicide."));
+ do_cmd_write_nikki(NIKKI_GAMESTART, 1, _("-------- ゲームオーバー --------", "-------- Game Over --------"));
+ do_cmd_write_nikki(NIKKI_BUNSHOU, 1, "\n\n\n\n");
+ }
+
+ /* Cause of death */
+ (void)strcpy(p_ptr->died_from, _("途中終了", "Quitting"));
+}