cheat_xtra = FALSE;
cheat_know = FALSE;
cheat_live = FALSE;
+ cheat_save = FALSE;
/* Assume no winning game */
p_ptr->total_winner = FALSE;
#endif
- /*** Quick Start ***/
-
- if (previous_char.quick_ok)
- {
- bool do_quick_start = FALSE;
-
- /* Extra info */
-#ifdef JP
- put_str("¥¯¥¤¥Ã¥¯¡¦¥¹¥¿¡¼¥È¤ò»È¤¦¤È°ÊÁ°¤ÈÁ´¤¯Æ±¤¸¥¥ã¥é¥¯¥¿¡¼¤Ç»Ï¤á¤é¤ì¤Þ¤¹¡£", 11, 5);
-#else
- put_str("Do you want to use the quick start function(same character as your last one).", 11, 2);
-#endif
-
- /* Choose */
- while (1)
- {
-#ifdef JP
- put_str("¥¯¥¤¥Ã¥¯¡¦¥¹¥¿¡¼¥È¤ò»È¤¤¤Þ¤¹¤«¡©[y/n]", 14, 10);
-#else
- put_str("Use quick start? [y/n]", 14, 10);
-#endif
- c = inkey();
- if (c == 'Q') quit(NULL);
- else if (c == 'S') return (FALSE);
- else if (c == '?')
- {
-#ifdef JP
- show_help("jbirth.txt#QuickStart");
-#else
- show_help("birth.txt#QuickStart");
-#endif
- }
- else if ((c == 'y') || (c == 'Y'))
- {
- do_quick_start = TRUE;
- break;
- }
- else
- {
- do_quick_start = FALSE;
- break;
- }
- }
-
- if (do_quick_start)
- {
- load_prev_data(FALSE);
- init_dungeon_quests(previous_char.quests);
- init_turn();
-
- sp_ptr = &sex_info[p_ptr->psex];
- rp_ptr = &race_info[p_ptr->prace];
- cp_ptr = &class_info[p_ptr->pclass];
- mp_ptr = &m_info[p_ptr->pclass];
- ap_ptr = &seikaku_info[p_ptr->pseikaku];
-
- /* Calc hitdie, but don't roll */
- get_extra(FALSE);
-
- /* Calculate the bonuses and hitpoints */
- p_ptr->update |= (PU_BONUS | PU_HP);
-
- /* Update stuff */
- update_stuff();
-
- /* Fully healed */
- p_ptr->chp = p_ptr->mhp;
-
- /* Fully rested */
- p_ptr->csp = p_ptr->msp;
-
- /* Process the player name */
- process_player_name(FALSE);
-
- return TRUE;
- }
-
- /* Clean up */
- clear_from(10);
- }
-
-
/*** Player sex ***/
/* Extra info */
/*
+ * Ask whether the player use Quick Start or not.
+ */
+static bool ask_quick_start(void)
+{
+ /* Doesn't have previous data */
+ if (!previous_char.quick_ok) return FALSE;
+
+
+ /* Clear screen */
+ Term_clear();
+
+ /* Extra info */
+#ifdef JP
+ put_str("¥¯¥¤¥Ã¥¯¡¦¥¹¥¿¡¼¥È¤ò»È¤¦¤È°ÊÁ°¤ÈÁ´¤¯Æ±¤¸¥¥ã¥é¥¯¥¿¡¼¤Ç»Ï¤á¤é¤ì¤Þ¤¹¡£", 11, 5);
+#else
+ put_str("Do you want to use the quick start function(same character as your last one).", 11, 2);
+#endif
+
+ /* Choose */
+ while (1)
+ {
+ char c;
+
+#ifdef JP
+ put_str("¥¯¥¤¥Ã¥¯¡¦¥¹¥¿¡¼¥È¤ò»È¤¤¤Þ¤¹¤«¡©[y/n]", 14, 10);
+#else
+ put_str("Use quick start? [y/n]", 14, 10);
+#endif
+ c = inkey();
+
+ if (c == 'Q') quit(NULL);
+ else if (c == 'S') return (FALSE);
+ else if (c == '?')
+ {
+#ifdef JP
+ show_help("jbirth.txt#QuickStart");
+#else
+ show_help("birth.txt#QuickStart");
+#endif
+ }
+ else if ((c == 'y') || (c == 'Y'))
+ {
+ /* Yes */
+ break;
+ }
+ else
+ {
+ /* No */
+ return FALSE;
+ }
+ }
+
+ load_prev_data(FALSE);
+ init_dungeon_quests(previous_char.quests);
+ init_turn();
+
+ sp_ptr = &sex_info[p_ptr->psex];
+ rp_ptr = &race_info[p_ptr->prace];
+ cp_ptr = &class_info[p_ptr->pclass];
+ mp_ptr = &m_info[p_ptr->pclass];
+ ap_ptr = &seikaku_info[p_ptr->pseikaku];
+
+ /* Calc hitdie, but don't roll */
+ get_extra(FALSE);
+
+ /* Calculate the bonuses and hitpoints */
+ p_ptr->update |= (PU_BONUS | PU_HP);
+
+ /* Update stuff */
+ update_stuff();
+
+ /* Fully healed */
+ p_ptr->chp = p_ptr->mhp;
+
+ /* Fully rested */
+ p_ptr->csp = p_ptr->msp;
+
+ /* Process the player name */
+ process_player_name(FALSE);
+
+ return TRUE;
+}
+
+
+/*
* Create a new character.
*
* Note that we may be called with "junk" leftover in the various
*/
wipe_m_list();
+ /* Wipe the player */
+ player_wipe();
+
/* Create a new character */
- while (1)
- {
- /* Wipe the player */
- player_wipe();
- /* Roll up a new character */
- if (player_birth_aux()) break;
- }
+ /* Quick start? */
+ if (!ask_quick_start())
+ {
+ /* No, normal start */
+ while (1)
+ {
+ /* Roll up a new character */
+ if (player_birth_aux()) break;
+
+ /* Wipe the player */
+ player_wipe();
+ }
+ }
/* Note player birth in the message recall */
message_add(" ");
/*
* Number of cheating options
*/
-#define CHEAT_MAX 6
+#define CHEAT_MAX 7
/*
* Cheating options
#else
"cheat_live", "Allow player to avoid death"
#endif
+ },
+
+ { &cheat_save, FALSE, 255, 0x40, 0x00,
+#ifdef JP
+ "cheat_save", "»à¤ó¤À»þ¥»¡¼¥Ö¤¹¤ë¤«³Îǧ¤¹¤ë"
+#else
+ "cheat_save", "Ask for saving death"
+#endif
}
};
prt("(A) ¼«Æ°¥»¡¼¥Ö ¥ª¥×¥·¥ç¥ó", 14, 5);
/* Window flags */
prt("(W) ¥¦¥¤¥ó¥É¥¦¥Õ¥é¥°", 15, 5);
- /* Cheating */
- prt("(C) º¾µ½ ¥ª¥×¥·¥ç¥ó", 16, 5);
#else
prt("(1) Input Options", 4, 5);
prt("(2) Output Options", 5, 5);
/* Window flags */
prt("(W) Window Flags", 15, 5);
+#endif
- /* Cheating */
- prt("(C) Cheating Options", 16, 5);
+ if (p_ptr->noscore || allow_debug_opts)
+ {
+ /* Cheating */
+#ifdef JP
+ prt("(C) º¾µ½ ¥ª¥×¥·¥ç¥ó", 16, 5);
+#else
+ prt("(C) Cheating Options", 16, 5);
#endif
+ }
/* Prompt */
/* Cheating Options */
case 'C':
{
+ if (!p_ptr->noscore && !allow_debug_opts)
+ {
+ /* Cheat options are not permitted */
+ bell();
+ break;
+ }
+
/* Spawn */
#ifdef JP
do_cmd_options_cheat("º¾µ½»Õ¤Ï·è¤·¤Æ¾¡Íø¤Ç¤¤Ê¤¤¡ª");
/* Ask first time */
if (!p_ptr->noscore)
{
+ /* Wizard mode is not permitted */
+ if (!allow_debug_opts)
+ {
+#ifdef JP
+ msg_print("¥¦¥£¥¶¡¼¥É¥â¡¼¥É¤Ïµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£ ");
+#else
+ msg_print("Wizard mode is not permitted.");
+#endif
+ return FALSE;
+ }
+
/* Mention effects */
#ifdef JP
msg_print("¥¦¥£¥¶¡¼¥É¥â¡¼¥É¤Ï¥Ç¥Ð¥°¤È¼Â¸³¤Î¤¿¤á¤Î¥â¡¼¥É¤Ç¤¹¡£ ");
/* Ask first time */
if (!p_ptr->noscore)
{
+ /* Debug mode is not permitted */
+ if (!allow_debug_opts)
+ {
+#ifdef JP
+ msg_print("¥Ç¥Ð¥Ã¥°¥³¥Þ¥ó¥É¤Ïµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£ ");
+#else
+ msg_print("Use of debug command is not permitted.");
+#endif
+ return FALSE;
+ }
+
/* Mention effects */
#ifdef JP
msg_print("¥Ç¥Ð¥°¡¦¥³¥Þ¥ó¥É¤Ï¥Ç¥Ð¥°¤È¼Â¸³¤Î¤¿¤á¤Î¥³¥Þ¥ó¥É¤Ç¤¹¡£ ");
bool android = (p_ptr->prace == RACE_ANDROID ? TRUE : FALSE);
#ifdef JP /* »à¤ó¤À»þ¤Ë¶¯À©½ªÎ»¤·¤Æ»à¤ò²óÈò¤Ç¤¤Ê¤¯¤·¤Æ¤ß¤¿ by Habu */
- if (!munchkin_death)
+ if (!cheat_save)
if(!save_player()) msg_print("¥»¡¼¥Ö¼ºÇÔ¡ª");
#endif
extern bool powerup_home;
extern bool change_numeral;
extern bool send_score;
+extern bool allow_debug_opts; /* Allow use of debug/cheat options */
extern bool display_mutations; /* Skip mutations screen in 'C'haracter display */
extern bool plain_descriptions;
extern bool cheat_xtra;
extern bool cheat_know;
extern bool cheat_live;
+extern bool cheat_save;
extern bool last_words; /* Zangband options */
extern bool over_exert;
extern bool small_levels;
extern bool lite_town;
extern bool ironman_empty_levels;
extern bool terrain_streams;
-extern bool munchkin_death;
extern bool ironman_rooms;
extern bool ironman_nightmare;
extern bool left_hander;
#endif
- if (munchkin_death)
-#ifdef JP
-fprintf(fff, "\n ¤¢¤Ê¤¿¤Ï»à¤ò²óÈò¤¹¤ë¥¤¥ó¥Á¥¤ÊÎϤò»ý¤Ã¤Æ¤¤¤Þ¤¹¡£");
-#else
- fprintf(fff, "\n You possess munchkinish power over death.");
-#endif
-
fprintf(fff,"\n");
/* Monsters slain */
/* Save memories */
#ifdef JP
- if (!munchkin_death || get_check("»à¤ó¤À¥Ç¡¼¥¿¤ò¥»¡¼¥Ö¤·¤Þ¤¹¤«¡© "))
+ if (!cheat_save || get_check("»à¤ó¤À¥Ç¡¼¥¿¤ò¥»¡¼¥Ö¤·¤Þ¤¹¤«¡© "))
#else
- if (!munchkin_death || get_check("Save death? "))
+ if (!cheat_save || get_check("Save death? "))
#endif
{
cheat_xtra = (c & 0x0800) ? TRUE : FALSE;
cheat_know = (c & 0x1000) ? TRUE : FALSE;
cheat_live = (c & 0x2000) ? TRUE : FALSE;
+ cheat_save = (c & 0x4000) ? TRUE : FALSE;
rd_byte((byte *)&autosave_l);
rd_byte((byte *)&autosave_t);
if (arg_fiddle) note("Loaded Option Flags");
#endif
- /*
- * Munchkin players are marked
- *
- * XXX - should be replaced with a better method,
- * after the new scorefile-handling is implemented.
- */
- if (munchkin_death)
- {
- /* Mark savefile */
- p_ptr->noscore |= 0x0001;
- }
-
/* Then the "messages" */
rd_messages();
#ifdef JP
if (cheat_xtra) c |= 0x0800;
if (cheat_know) c |= 0x1000;
if (cheat_live) c |= 0x2000;
+ if (cheat_save) c |= 0x4000;
wr_u16b(c);
wr_byte(previous_char.quests);
/* No quick start after using debug mode or cheat options */
- if (p_ptr->noscore || munchkin_death) previous_char.quick_ok = FALSE;
+ if (p_ptr->noscore) previous_char.quick_ok = FALSE;
wr_byte((byte)previous_char.quick_ok);
}
#endif
+#ifdef JP
+ { &allow_debug_opts, FALSE, 3, 6, 11,
+ "allow_debug_opts", "¥Ç¥Ð¥Ã¥°/º¾µ½¥ª¥×¥·¥ç¥ó¤òµö²Ä¤¹¤ë" },
+#else
+ { &allow_debug_opts, FALSE, 3, 6, 11,
+ "allow_debug_opts", "Allow use of debug/cheat options" },
+#endif
+
+
+
+
/*** Disturbance ***/
#ifdef JP
#ifdef JP
- { &munchkin_death, FALSE, 6, 6, 11,
- "munchkin_death", "¡Ê¤¤¤ó¤Á¤¡Ë»à¤ó¤À»þ¥»¡¼¥Ö¤¹¤ë¤«³Îǧ¤¹¤ë(*)" },
-#else
- { &munchkin_death, FALSE, 6, 6, 11,
- "munchkin_death", "(Cheating) Ask for death saves (*)" },
-#endif
-
-
-#ifdef JP
{ &ironman_rooms, FALSE, 6, 6, 12,
"ironman_rooms", "¡ÊÅ´¿ÍÍѡ˾ï¤ËÉáÄ̤Ǥʤ¤Éô²°¤òÀ¸À®¤¹¤ë(*)" },
#else
bool powerup_home;
bool change_numeral;
bool send_score;
+bool allow_debug_opts; /* Allow use of debug/cheat options */
/* Cheating options */
bool cheat_xtra; /* Peek into something else */
bool cheat_know; /* Know complete monster info */
bool cheat_live; /* Allow player to avoid death */
+bool cheat_save; /* Ask for saving death */
/* Special options */
bool lite_town; /* Use "lite" town without wilderness */
bool ironman_empty_levels; /* Always create empty 'arena' levels */
bool terrain_streams; /* Create terrain 'streamers' in the dungeon */
-bool munchkin_death; /* Ask for saving death */
bool ironman_rooms; /* Always generate very unusual rooms */
bool ironman_nightmare; /* Play the game in Nightmare mode */
bool left_hander;