summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/initfile.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-31 08:41:27 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-31 08:41:27 +0000
commit86d488e3efa0b1d8ec12223527235e3ef3a5fec2 (patch)
tree88b3d97a6f74ea6eb21405b3072e1e1a9c6830b0 /crawl-ref/source/initfile.cc
parent496a1b4c58651aa28878db51bb1d5f3534d8a0a5 (diff)
downloadcrawl-ref-86d488e3efa0b1d8ec12223527235e3ef3a5fec2.tar.gz
crawl-ref-86d488e3efa0b1d8ec12223527235e3ef3a5fec2.zip
Add arena mode, activated on the command-line by 'crawl -arena "monster v monster"' (eg: crawl -arena "Sigmund v Jessica") to let monsters fight each other undisturbed by the player. Good to examine monster AI and monster behaviour when the player is AWOL.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8059 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/initfile.cc')
-rw-r--r--crawl-ref/source/initfile.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index 5032753e8b..7cfcbe5c3e 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -710,6 +710,8 @@ void game_options::reset_options()
travel_delay = 20;
travel_stair_cost = 500;
+ arena_delay = 600;
+
// Sort only pickup menus by default.
sort_menus.clear();
set_menu_sort("pickup: true");
@@ -3280,6 +3282,7 @@ enum commandline_option_type {
CLO_MORGUE,
CLO_MACRO,
CLO_MAPSTAT,
+ CLO_ARENA,
CLO_NOPS
};
@@ -3287,7 +3290,7 @@ enum commandline_option_type {
static const char *cmd_ops[] = {
"scores", "name", "race", "class", "pizza", "plain", "dir", "rc",
"rcdir", "tscores", "vscores", "scorefile", "morgue", "macro",
- "mapstat"
+ "mapstat", "arena"
};
const int num_cmd_ops = CLO_NOPS;
@@ -3421,6 +3424,15 @@ bool parse_args( int argc, char **argv, bool rc_only )
SysEnv.map_gen_iters = 100;
break;
+ case CLO_ARENA:
+ crawl_state.arena = true;
+ if (next_is_param)
+ {
+ SysEnv.arena_teams = next_arg;
+ nextUsed = true;
+ }
+ break;
+
case CLO_MACRO:
if (!next_is_param)
return (false);