OSDN Git Service

[Fix] #33232 射線(Projectable)と視界(LoS)フラグ表示チートオプションを追加。
authorDeskull <deskull@users.sourceforge.jp>
Mon, 17 Sep 2018 22:41:26 +0000 (07:41 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Mon, 17 Sep 2018 22:41:26 +0000 (07:41 +0900)
Add cheat_sight option.

src/defines.h
src/externs.h
src/gameoption.c
src/gameoption.h
src/xtra2.c

index 56093e9..1cf2681 100644 (file)
@@ -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
index b8bba28..4dab269 100644 (file)
@@ -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;
index 127b5ce..0efa4b6 100644 (file)
@@ -427,6 +427,10 @@ const option_type cheat_info[CHEAT_MAX] =
 \r
        { &cheat_turn,  FALSE,  255,    0x81, 0x00,\r
        "cheat_turn",   _("\83Q\81[\83\80\83\81\83b\83Z\81[\83W\82É\83^\81[\83\93\95\\8e¦\82ð\8ds\82¤", "Put turn to game message.")\r
+       },\r
+\r
+       { &cheat_sight, FALSE,  255,    0x82, 0x00,\r
+       "cheat_sight",  _("\81u\8c©\82é\81v\83R\83}\83\93\83h\82ð\8ag\92£\82·\82é\81B", "Expand \"L\"ook command.")\r
        }\r
 };\r
 \r
index 2c1dcc2..2c306e0 100644 (file)
@@ -181,6 +181,7 @@ bool cheat_live;    /* Allow player to avoid death */
 bool cheat_save;       /* Ask for saving death */\r
 bool cheat_diary_output; /* Detailed info to diary */\r
 bool cheat_turn;       /* Peek turn */\r
+bool cheat_sight;\r
 \r
 \r
 /* Special options */\r
index 5f6ce90..2a42800 100644 (file)
@@ -3640,6 +3640,15 @@ bool target_set(BIT_FLAGS mode)
                        {
                                strcpy(info, _("q止 p自 o現 +次 -前", "q,p,o,+,-,<dir>"));
                        }
+
+                       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,+,-,<dir>"));
 
+                       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);