cheat_save = FALSE;
cheat_diary_output = FALSE;
cheat_turn = FALSE;
+ cheat_immortal = FALSE;
current_world_ptr->total_winner = FALSE;
creature_ptr->timewalk = FALSE;
player_outfit(player_ptr);
init_io(player_ptr);
- if (player_ptr->chp < 0)
+ if (player_ptr->chp < 0 && !cheat_immortal)
player_ptr->is_dead = TRUE;
if (player_ptr->prace == RACE_ANDROID)
#include "floor/wild.h"
#include "game-option/disturbance-options.h"
#include "game-option/map-screen-options.h"
+#include "game-option/cheat-options.h"
#include "grid/grid.h"
#include "inventory/pack-overflow.h"
#include "io/cursor.h"
move_cursor_relative(creature_ptr->y, creature_ptr->x);
command_cmd = SPECIAL_KEY_BUILDING;
process_command(creature_ptr);
- } else if (creature_ptr->paralyzed || (creature_ptr->stun >= 100)) {
+ } else if ((creature_ptr->paralyzed || creature_ptr->stun >= 100) && !cheat_immortal) {
take_turn(creature_ptr, 100);
} else if (creature_ptr->action == ACTION_REST) {
if (creature_ptr->resting > 0) {
#include "floor/floor-save.h"
#include "game-option/map-screen-options.h"
#include "game-option/play-record-options.h"
+#include "game-option/cheat-options.h"
#include "io/cursor.h"
#include "io/input-key-requester.h"
#include "io/write-diary.h"
bool cheat_diary_output; /* Detailed info to diary */
bool cheat_turn; /* Peek turn */
bool cheat_sight;
+bool cheat_immortal;
extern bool cheat_diary_output;
extern bool cheat_turn;
extern bool cheat_sight;
+extern bool cheat_immortal;
{ &cheat_turn, FALSE, 255, 0x81, 0x00, "cheat_turn", _("ゲームメッセージにターン表示を行う", "Put turn in game messages.") },
- { &cheat_sight, FALSE, 255, 0x82, 0x00, "cheat_sight", _("「見る」コマンドを拡張する。", "Expand \"L\"ook command.") } };
+ { &cheat_sight, FALSE, 255, 0x82, 0x00, "cheat_sight", _("「見る」コマンドを拡張する。", "Expand \"L\"ook command.") },
+
+ { &cheat_immortal, FALSE, 255, 0x83, 0x00, "cheat_immortal", _("完全な不滅状態になる。", "Completely immortal.") } };
+
+
/*!
* 自動セーブオプションテーブル
};
#define MAX_OPTION_INFO 125
-#define MAX_CHEAT_OPTIONS 10
+#define MAX_CHEAT_OPTIONS 11
#define MAX_AUTOSAVE_INFO 2
extern const std::array<const option_type, MAX_OPTION_INFO> option_info;
#include "floor/floor-events.h"
#include "io/write-diary.h"
#include "monster-floor/monster-lite.h"
+#include "game-option/cheat-options.h"
#include "save/save.h"
#include "system/system-variables.h"
#include "term/term-color-types.h"
forget_view(p_ptr->current_floor_ptr);
clear_mon_lite(p_ptr->current_floor_ptr);
p_ptr->playing = FALSE;
- p_ptr->is_dead = TRUE;
+ if (!cheat_immortal)
+ p_ptr->is_dead = TRUE;
p_ptr->leaving = TRUE;
close_game(p_ptr);
quit(_("強制終了", "interrupt"));
cheat_diary_output = (c & 0x8000) ? TRUE : FALSE;
cheat_turn = (c & 0x0080) ? TRUE : FALSE;
cheat_sight = (c & 0x0040) ? TRUE : FALSE;
+ cheat_immortal = (c & 0x0020) ? TRUE : FALSE;
rd_byte((byte *)&autosave_l);
rd_byte((byte *)&autosave_t);
}
creature_ptr->chp -= damage;
+ if (creature_ptr->chp < -9999)
+ creature_ptr->chp = -9999;
if (damage_type == DAMAGE_GENO && creature_ptr->chp < 0) {
damage += creature_ptr->chp;
creature_ptr->chp = 0;
chg_virtue(creature_ptr, V_CHANCE, 2);
}
- if (creature_ptr->chp < 0) {
+ if (creature_ptr->chp < 0 && !cheat_immortal) {
bool android = (creature_ptr->prace == RACE_ANDROID ? TRUE : FALSE);
#ifdef JP
chg_virtue(creature_ptr, V_SACRIFICE, 10);
handle_stuff(creature_ptr);
creature_ptr->leaving = TRUE;
- creature_ptr->is_dead = TRUE;
+ if(!cheat_immortal) creature_ptr->is_dead = TRUE;
if (creature_ptr->current_floor_ptr->inside_arena) {
concptr m_name = r_info[arena_info[creature_ptr->arena_number].r_idx].name.c_str();
msg_format(_("あなたは%sの前に敗れ去った。", "You are beaten by %s."), m_name);
if (cheat_diary_output)
c |= 0x8000;
+ if (cheat_immortal)
+ c |= 0x0020;
+
if (type == SAVE_TYPE_DEBUG)
c |= 0xFFFF;