add new #wizkill command
Add a way to get rid of specific monsters in wizard mode without fighting, zapping, &c. #wizkill command lets you kill creatures by picking them with getpos(). You can pick multiple monsters by targetting them one after another. You don't have to be able to see or sense them but if you target a spot that has no monster, the command ends. By default, the hero gets credit or blame as if having killed the targets but #wizkill can be preceded by 'm' prefix to treat their deaths as if they had been caused by a monster.
This commit is contained in:
@@ -136,6 +136,8 @@ getpos_help(boolean force, const char *goal)
|
||||
visctrl(g.Cmd.spkeys[NHKF_GETPOS_MON_PREV]),
|
||||
GLOC_MONS);
|
||||
}
|
||||
if (goal && !strcmp(goal, "a monster"))
|
||||
goto skip_non_mons;
|
||||
if (!iflags.terrainmode || (iflags.terrainmode & TER_OBJ) != 0) {
|
||||
getpos_help_keyxhelp(tmpwin,
|
||||
visctrl(g.Cmd.spkeys[NHKF_GETPOS_OBJ_NEXT]),
|
||||
@@ -195,6 +197,7 @@ getpos_help(boolean force, const char *goal)
|
||||
: "(Reset 'whatis_coord' option to omit coordinates from '%s' text.)",
|
||||
visctrl(g.Cmd.spkeys[NHKF_GETPOS_AUTODESC]));
|
||||
}
|
||||
skip_non_mons:
|
||||
/* disgusting hack; the alternate selection characters work for any
|
||||
getpos call, but only matter for dowhatis (and doquickwhatis) */
|
||||
doing_what_is = (goal == what_is_an_unknown_object);
|
||||
|
||||
Reference in New Issue
Block a user