diff options
author | Stefan O'Rear <stefanor@cox.net> | 2009-11-15 00:04:52 -0800 |
---|---|---|
committer | Stefan O'Rear <stefanor@cox.net> | 2009-11-15 00:04:52 -0800 |
commit | 05010f1d267b268e68821223680f34545c443f5c (patch) | |
tree | 967466e274aa990271509d232af4a6c1fd0ad1a5 /crawl-ref/source/acr.cc | |
parent | dd56050f2d05db6ed7ff5bc99acd1032707c27fd (diff) | |
parent | 5bba7e89fd395a2cde9cbf596208785508e22331 (diff) | |
download | crawl-ref-05010f1d267b268e68821223680f34545c443f5c.tar.gz crawl-ref-05010f1d267b268e68821223680f34545c443f5c.zip |
Merge Johnny Shelley's arcane marksman patch
Diffstat (limited to 'crawl-ref/source/acr.cc')
-rw-r--r-- | crawl-ref/source/acr.cc | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index ca2006a7e2..b39b0109f4 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -28,12 +28,6 @@ #include <sstream> #include <iostream> -#ifdef TARGET_OS_DOS -#include <dos.h> -#include <conio.h> -#include <file.h> -#endif - #ifdef USE_UNIX_SIGNALS #include <signal.h> #endif @@ -1215,6 +1209,22 @@ static bool _marker_vetoes_stair() return marker_vetoes_operation("veto_stair"); } +// Maybe prompt to enter a portal, return true if we should enter the +// portal, false if the user said no at the prompt. +static bool _prompt_dangerous_portal(dungeon_feature_type ftype) +{ + switch(ftype) + { + case DNGN_ENTER_PANDEMONIUM: + case DNGN_ENTER_ABYSS: + return yesno("If you enter this portal you will not be able to return " + "immediately. Continue?", false, 'n'); + + default: + return (true); + } +} + static void _go_downstairs(); static void _go_upstairs() { @@ -1263,6 +1273,9 @@ static void _go_upstairs() return; } + if (!_prompt_dangerous_portal(ygrd)) + return; + // Does the next level have a warning annotation? if (!check_annotation_exclusion_warning()) return; @@ -1333,6 +1346,9 @@ static void _go_downstairs() return; } + if (!_prompt_dangerous_portal(ygrd)) + return; + // Does the next level have a warning annotation? // Also checks for entering a labyrinth with teleportitis. if (!check_annotation_exclusion_warning()) @@ -4412,12 +4428,12 @@ static void _compile_time_asserts() { // Check that the numbering comments in enum.h haven't been // disturbed accidentally. - COMPILE_CHECK(SK_UNARMED_COMBAT == 19 , c1); - COMPILE_CHECK(SK_EVOCATIONS == 39 , c2); + COMPILE_CHECK(SK_UNARMED_COMBAT == 18 , c1); + COMPILE_CHECK(SK_EVOCATIONS == 38 , c2); COMPILE_CHECK(SP_VAMPIRE == 30 , c3); COMPILE_CHECK(SPELL_DEBUGGING_RAY == 103 , c4); COMPILE_CHECK(SPELL_RETURNING_AMMUNITION == 162 , c5); - COMPILE_CHECK(NUM_SPELLS == 207 , c6); + COMPILE_CHECK(NUM_SPELLS == 211 , c6); //jmf: NEW ASSERTS: we ought to do a *lot* of these COMPILE_CHECK(NUM_SPECIES < SP_UNKNOWN , c7); |