From cf2e82c004c829573f7e10c91a6c1d0181ca40d8 Mon Sep 17 00:00:00 2001 From: deskull Date: Wed, 4 Dec 2013 12:02:51 +0000 Subject: [PATCH] Add 'special' process to acquirement() and debug command 'S' (special acquirement). --- src/cmd6.c | 4 ++-- src/externs.h | 4 ++-- src/object2.c | 5 ++--- src/wizard2.c | 10 ++++++++-- src/xtra2.c | 8 ++++---- 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/cmd6.c b/src/cmd6.c index 64052934a..0aecc8ac5 100644 --- a/src/cmd6.c +++ b/src/cmd6.c @@ -2016,14 +2016,14 @@ msg_print(" case SV_SCROLL_ACQUIREMENT: { - acquirement(py, px, 1, TRUE, FALSE); + acquirement(py, px, 1, TRUE, FALSE, FALSE); ident = TRUE; break; } case SV_SCROLL_STAR_ACQUIREMENT: { - acquirement(py, px, randint1(2) + 1, TRUE, FALSE); + acquirement(py, px, randint1(2) + 1, TRUE, FALSE, FALSE); ident = TRUE; break; } diff --git a/src/externs.h b/src/externs.h index f56b1b386..a2857e612 100644 --- a/src/externs.h +++ b/src/externs.h @@ -28,7 +28,7 @@ extern cptr macro_trigger_name[MAX_MACRO_TRIG]; extern cptr macro_trigger_keycode[2][MAX_MACRO_TRIG]; -/* ÆüËܸìÈǵ¡Ç½ÄɲäǻȤ¦ */ +/* ƁEܸEǵ¡Ç½ÄɲäǻȤ¦ */ extern int level_up; /* @@ -1052,7 +1052,7 @@ extern void place_object(int y, int x, u32b mode); extern bool make_gold(object_type *j_ptr); extern void place_gold(int y, int x); extern s16b drop_near(object_type *o_ptr, int chance, int y, int x); -extern void acquirement(int y1, int x1, int num, bool great, bool known); +extern void acquirement(int y1, int x1, int num, bool great, bool special, bool known); extern void amusement(int y1, int x1, int num, bool known); extern void init_normal_traps(void); extern s16b choose_random_trap(void); diff --git a/src/object2.c b/src/object2.c index f4168d4fb..cedb3b23e 100644 --- a/src/object2.c +++ b/src/object2.c @@ -5384,11 +5384,11 @@ s16b drop_near(object_type *j_ptr, int chance, int y, int x) /* * Scatter some "great" objects near the player */ -void acquirement(int y1, int x1, int num, bool great, bool known) +void acquirement(int y1, int x1, int num, bool great, bool special, bool known) { object_type *i_ptr; object_type object_type_body; - u32b mode = AM_GOOD | (great ? AM_GREAT : 0L); + u32b mode = AM_GOOD | (great || special ? AM_GREAT : 0L) | (special ? AM_SPECIAL : 0L) ; /* Acquirement */ while (num--) @@ -5413,7 +5413,6 @@ void acquirement(int y1, int x1, int num, bool great, bool known) } } - /* * Scatter some "amusing" objects near the player */ diff --git a/src/wizard2.c b/src/wizard2.c index 27fa4b1a9..2b3d708f1 100644 --- a/src/wizard2.c +++ b/src/wizard2.c @@ -2011,7 +2011,7 @@ void do_cmd_debug(void) /* Good Objects */ case 'g': if (command_arg <= 0) command_arg = 1; - acquirement(py, px, command_arg, FALSE, TRUE); + acquirement(py, px, command_arg, FALSE, FALSE, TRUE); break; /* Hitpoint rerating */ @@ -2129,6 +2129,12 @@ void do_cmd_debug(void) do_cmd_wiz_summon(command_arg); break; + /* Special(Random Artifact) Objects */ + case 'S': + if (command_arg <= 0) command_arg = 1; + acquirement(py, px, command_arg, TRUE, TRUE, TRUE); + break; + /* Teleport */ case 't': teleport_player(100, 0L); @@ -2137,7 +2143,7 @@ void do_cmd_debug(void) /* Very Good Objects */ case 'v': if (command_arg <= 0) command_arg = 1; - acquirement(py, px, command_arg, TRUE, TRUE); + acquirement(py, px, command_arg, TRUE, FALSE, TRUE); break; /* Wizard Light the Level */ diff --git a/src/xtra2.c b/src/xtra2.c index e0fd7cb60..4cd0789ec 100644 --- a/src/xtra2.c +++ b/src/xtra2.c @@ -4945,7 +4945,7 @@ msg_print(" msg_print("'Use my gift wisely.'"); #endif - acquirement(py, px, 1, FALSE, FALSE); + acquirement(py, px, 1, FALSE, FALSE, FALSE); #ifdef JP reward = "¾å¼Á¤Ê¥¢¥¤¥Æ¥à¤ò¼ê¤ËÆþ¤ì¤¿¡£"; #else @@ -4967,7 +4967,7 @@ msg_print(" msg_print("'Use my gift wisely.'"); #endif - acquirement(py, px, 1, TRUE, FALSE); + acquirement(py, px, 1, TRUE, FALSE, FALSE); #ifdef JP reward = "¹âµéÉʤΥ¢¥¤¥Æ¥à¤ò¼ê¤ËÆþ¤ì¤¿¡£"; #else @@ -5108,7 +5108,7 @@ msg_print(" msg_print("'Thy deed hath earned thee a worthy reward.'"); #endif - acquirement(py, px, randint1(2) + 1, FALSE, FALSE); + acquirement(py, px, randint1(2) + 1, FALSE, FALSE, FALSE); #ifdef JP reward = "¾å¼Á¤Ê¥¢¥¤¥Æ¥à¤ò¼ê¤ËÆþ¤ì¤¿¡£"; #else @@ -5130,7 +5130,7 @@ msg_print(" msg_print("'Behold, mortal, how generously I reward thy loyalty.'"); #endif - acquirement(py, px, randint1(2) + 1, TRUE, FALSE); + acquirement(py, px, randint1(2) + 1, TRUE, FALSE, FALSE); #ifdef JP reward = "¹âµéÉʤΥ¢¥¤¥Æ¥à¤ò¼ê¤ËÆþ¤ì¤¿¡£"; #else -- 2.11.0