#include "angband.h"
#include "chest.h"
+#include "trap.h"
#include "floor.h"
#include "melee.h"
#include "object-hook.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);
* @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;
{
grid_type *g_ptr = ¤t_floor_ptr->grid_array[y][x];
monster_type *m_ptr = ¤t_floor_ptr->m_list[g_ptr->m_idx];
+ GAME_TEXT m_name[MAX_NLEN];
+ monster_name(g_ptr->m_idx, m_name);
/* Check the visibility */
visible = m_ptr->ml;
/* Handle visible monster */
else
{
- GAME_TEXT m_name[MAX_NLEN];
- monster_desc(m_name, m_ptr, 0);
msg_format(_("%sが%sに命中した。", "The %s hits %s."), o_name, m_name);
if (m_ptr->ml)
if (fear && m_ptr->ml)
{
sound(SOUND_FLEE);
- GAME_TEXT m_name[MAX_NLEN];
- monster_desc(m_name, m_ptr, 0);
msg_format(_("%^sは恐怖して逃げ出した!", "%^s flees in terror!"), m_name);
}
}
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))
}
-
/* Potions smash open */
if (object_is_potion(q_ptr))
{
if (potion_smash_effect(0, y, x, q_ptr->k_idx))
{
monster_type *m_ptr = ¤t_floor_ptr->m_list[current_floor_ptr->grid_array[y][x].m_idx];
-
- /* ToDo (Robert): fix the invulnerability */
- if (current_floor_ptr->grid_array[y][x].m_idx &&
- is_friendly(¤t_floor_ptr->m_list[current_floor_ptr->grid_array[y][x].m_idx]) &&
- !MON_INVULNER(m_ptr))
+ if (current_floor_ptr->grid_array[y][x].m_idx && is_friendly(m_ptr) && !MON_INVULNER(m_ptr))
{
GAME_TEXT m_name[MAX_NLEN];
- monster_desc(m_name, ¤t_floor_ptr->m_list[current_floor_ptr->grid_array[y][x].m_idx], 0);
+ monster_desc(m_name, m_ptr, 0);
msg_format(_("%sは怒った!", "%^s gets angry!"), m_name);
set_hostile(¤t_floor_ptr->m_list[current_floor_ptr->grid_array[y][x].m_idx]);
}
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"));
+}