From: Deskull Date: Mon, 17 Sep 2018 22:41:26 +0000 (+0900) Subject: [Fix] #33232 射線(Projectable)と視界(LoS)フラグ表示チートオプションを追加。 X-Git-Url: http://git.osdn.net/view?p=hengband%2Fhengband.git;a=commitdiff_plain;h=66abb5c6692a4ff7fa162842c87d4824e67ceae4 [Fix] #33232 射線(Projectable)と視界(LoS)フラグ表示チートオプションを追加。 Add cheat_sight option. --- diff --git a/src/defines.h b/src/defines.h index 56093e9c1..1cf2681e7 100644 --- a/src/defines.h +++ b/src/defines.h @@ -5618,6 +5618,6 @@ extern int PlayerUID; #define COMMAND_ARG_REST_FULL_HEALING -1 /*!<休憩コマンド引数 … HPとMPが全回復するまで */ /*! -* チートオプションの最大数 / Number of cheating options -*/ -#define CHEAT_MAX 9 + * チートオプションの最大数 / Number of cheating options + */ +#define CHEAT_MAX 10 diff --git a/src/externs.h b/src/externs.h index b8bba28ae..4dab2696d 100644 --- a/src/externs.h +++ b/src/externs.h @@ -385,6 +385,7 @@ extern bool cheat_live; extern bool cheat_save; extern bool cheat_diary_output; extern bool cheat_turn; +extern bool cheat_sight; extern char record_o_name[MAX_NLEN]; extern s32b record_turn; diff --git a/src/gameoption.c b/src/gameoption.c index 127b5ce41..0efa4b68f 100644 --- a/src/gameoption.c +++ b/src/gameoption.c @@ -427,6 +427,10 @@ const option_type cheat_info[CHEAT_MAX] = { &cheat_turn, FALSE, 255, 0x81, 0x00, "cheat_turn", _("ƒQ[ƒ€ƒƒbƒZ[ƒW‚Ƀ^[ƒ“•\Ž¦‚ðs‚¤", "Put turn to game message.") + }, + + { &cheat_sight, FALSE, 255, 0x82, 0x00, + "cheat_sight", _("uŒ©‚évƒRƒ}ƒ“ƒh‚ðŠg’£‚·‚éB", "Expand \"L\"ook command.") } }; diff --git a/src/gameoption.h b/src/gameoption.h index 2c1dcc295..2c306e042 100644 --- a/src/gameoption.h +++ b/src/gameoption.h @@ -181,6 +181,7 @@ bool cheat_live; /* Allow player to avoid death */ bool cheat_save; /* Ask for saving death */ bool cheat_diary_output; /* Detailed info to diary */ bool cheat_turn; /* Peek turn */ +bool cheat_sight; /* Special options */ diff --git a/src/xtra2.c b/src/xtra2.c index 5f6ce9039..2a42800b4 100644 --- a/src/xtra2.c +++ b/src/xtra2.c @@ -3640,6 +3640,15 @@ bool target_set(BIT_FLAGS mode) { strcpy(info, _("qæ­¢ p自 o現 +次 -前", "q,p,o,+,-,")); } + + if (cheat_sight) + { + char cheatinfo[30]; + sprintf(cheatinfo, " LOS:%d, PROJECTABLE:%d", + los(p_ptr->y, p_ptr->x, y, x), + projectable(p_ptr->y, p_ptr->x, y, x)); + strcat(info, cheatinfo); + } /* Describe and Prompt */ while (TRUE){ @@ -3879,6 +3888,15 @@ bool target_set(BIT_FLAGS mode) /* Default prompt */ strcpy(info, _("qæ­¢ t決 p自 m近 +次 -前", "q,t,p,m,+,-,")); + if (cheat_sight) + { + char cheatinfo[30]; + sprintf(cheatinfo, " LOS:%d, PROJECTABLE:%d", + los(p_ptr->y, p_ptr->x, y, x), + projectable(p_ptr->y, p_ptr->x, y, x)); + strcat(info, cheatinfo); + } + /* Describe and Prompt (enable "TARGET_LOOK") */ while ((query = target_set_aux(y, x, mode | TARGET_LOOK, info)) == 0);