debug mode monster creation [trunk only]
Allow '*' with control-g to create a random monster species, or several different monster species if a multi count was specified on the control-g command.
This commit is contained in:
@@ -80,6 +80,7 @@ the following actions can now be continued after save/restore: digging,
|
|||||||
hero-created and monster-created ice will eventually melt away
|
hero-created and monster-created ice will eventually melt away
|
||||||
extend Warning to include ice danger
|
extend Warning to include ice danger
|
||||||
wishing for particular variety of tin contents (deep fried, broiled, etc.)
|
wishing for particular variety of tin contents (deep fried, broiled, etc.)
|
||||||
|
debug-mode wishing for random monster(s) via '*'
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific New Features
|
Platform- and/or Interface-Specific New Features
|
||||||
|
|||||||
+13
-2
@@ -1847,6 +1847,7 @@ create_particular()
|
|||||||
struct monst *mtmp;
|
struct monst *mtmp;
|
||||||
boolean madeany = FALSE;
|
boolean madeany = FALSE;
|
||||||
boolean maketame, makepeaceful, makehostile;
|
boolean maketame, makepeaceful, makehostile;
|
||||||
|
boolean randmonst = FALSE;
|
||||||
|
|
||||||
tries = 0;
|
tries = 0;
|
||||||
do {
|
do {
|
||||||
@@ -1869,6 +1870,12 @@ create_particular()
|
|||||||
}
|
}
|
||||||
/* decide whether a valid monster was chosen */
|
/* decide whether a valid monster was chosen */
|
||||||
if (strlen(bufp) == 1) {
|
if (strlen(bufp) == 1) {
|
||||||
|
#ifdef WIZARD
|
||||||
|
if (wizard && *bufp == '*') {
|
||||||
|
randmonst = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
monclass = def_char_to_monclass(*bufp);
|
monclass = def_char_to_monclass(*bufp);
|
||||||
if (monclass != MAXMCLASSES) break; /* got one */
|
if (monclass != MAXMCLASSES) break; /* got one */
|
||||||
} else {
|
} else {
|
||||||
@@ -1882,9 +1889,13 @@ create_particular()
|
|||||||
if (tries == 5) {
|
if (tries == 5) {
|
||||||
pline(thats_enough_tries);
|
pline(thats_enough_tries);
|
||||||
} else {
|
} else {
|
||||||
(void) cant_create(&which, FALSE);
|
if (!randmonst) {
|
||||||
whichpm = &mons[which];
|
(void) cant_create(&which, FALSE);
|
||||||
|
whichpm = &mons[which];
|
||||||
|
}
|
||||||
for (i = 0; i <= multi; i++) {
|
for (i = 0; i <= multi; i++) {
|
||||||
|
if (randmonst)
|
||||||
|
whichpm = rndmonst();
|
||||||
if (monclass != MAXMCLASSES)
|
if (monclass != MAXMCLASSES)
|
||||||
whichpm = mkclass(monclass, 0);
|
whichpm = mkclass(monclass, 0);
|
||||||
if (maketame) {
|
if (maketame) {
|
||||||
|
|||||||
Reference in New Issue
Block a user