summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2009-10-22 17:59:56 +1000
committerAdam Borowski <kilobyte@angband.pl>2009-10-22 09:59:34 +0200
commitc866e0c71f5d4c1ee2c179f0c2de640504127696 (patch)
treea2401e2b151d913b3b98d7bc487dd4a2f8177d2b /crawl-ref
parent22d680f23c527a3287d7c3a40cad57b705e8b08c (diff)
downloadcrawl-ref-c866e0c71f5d4c1ee2c179f0c2de640504127696.tar.gz
crawl-ref-c866e0c71f5d4c1ee2c179f0c2de640504127696.zip
Updated levdes.vim for KPROP. NO_RTELE_INTO property.
NO_RTELE_INTO restricts random teleport from choosing a specific grid square marked with this. This does not stop controlled teleport onto specific grid squares; controlled teleport is completely unrestricted. Updated documentation for new property. Do not apply to branch ends/Orb chamber yet, please!
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/docs/develop/level_design.txt2
-rw-r--r--crawl-ref/source/dat/levdes.vim2
-rw-r--r--crawl-ref/source/enum.h3
-rw-r--r--crawl-ref/source/initfile.cc2
-rw-r--r--crawl-ref/source/spells3.cc3
5 files changed, 9 insertions, 3 deletions
diff --git a/crawl-ref/docs/develop/level_design.txt b/crawl-ref/docs/develop/level_design.txt
index 8f30bb9526..ce574e7908 100644
--- a/crawl-ref/docs/develop/level_design.txt
+++ b/crawl-ref/docs/develop/level_design.txt
@@ -939,6 +939,8 @@ KPROP: x = bloody
* "no_cloud_gen": Prevents clouds from being generated over this
feature (usually lava). Does not stop fog generators or clouds
entering from nearby squares.
+ * "no_rtele_into": Prevents random teleport from chosing to use this
+ square. Should be used sparingly.
KITEM: ? = potion of healing / potion of restore abilities
KITEM: places the specified item at all occurrences of the
diff --git a/crawl-ref/source/dat/levdes.vim b/crawl-ref/source/dat/levdes.vim
index b8bc023ef4..b46c67d2b7 100644
--- a/crawl-ref/source/dat/levdes.vim
+++ b/crawl-ref/source/dat/levdes.vim
@@ -51,7 +51,7 @@ syn region desNsubst start=/^NSUBST:\s*/ end=/$/ contains=desNsubstDec,desSubstA
syn region desShuffle start=/^SHUFFLE:\s*/ end=/$/ contains=desShuffleDec,desMapFrag keepend
-syn keyword desDeclarator NAME: ORIENT: DEPTH: PLACE: MONS: FLAGS: default-depth: TAGS: CHANCE: WEIGHT: ITEM: KFEAT: KMONS: KITEM: COLOUR: KMASK: MARKER: LFLAGS: BFLAGS: LROCKCOL: LFLOORCOL: LFLOORTILE: LROCKTILE: FTILE: RTILE:
+syn keyword desDeclarator NAME: ORIENT: DEPTH: PLACE: MONS: FLAGS: default-depth: TAGS: CHANCE: WEIGHT: ITEM: KFEAT: KMONS: KITEM: COLOUR: KMASK: KPROP: MARKER: LFLAGS: BFLAGS: LROCKCOL: LFLOORCOL: LFLOORTILE: LROCKTILE: FTILE: RTILE:
syn keyword desOrientation encompass north south east west northeast northwest southeast southwest float
syn keyword desOrientation no_hmirror no_vmirror no_rotate
syn keyword desOrientation entry pan lab bazaar allow_dup dummy mini_float minotaur
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 4acb673342..819d383ede 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -919,7 +919,8 @@ enum feature_property_type
FPROP_HIGHLIGHT = (1 << 5), // Highlight grids on the X map for debugging.
// NOTE: Bloody floor and sanctuary are exclusive.
FPROP_FORCE_EXCLUDE = (1 << 6),
- FPROP_NO_CLOUD_GEN = (1 << 7)
+ FPROP_NO_CLOUD_GEN = (1 << 7),
+ FPROP_NO_RTELE_INTO = (1 << 8)
};
// NOTE: The order of these is very important to their usage!
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index 76547cabe1..75879e062e 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -331,6 +331,8 @@ int str_to_fprop ( const std::string &str)
return (FPROP_FORCE_EXCLUDE);
if (str == "no_cloud_gen")
return (FPROP_NO_CLOUD_GEN);
+ if (str == "no_rtele_into")
+ return (FPROP_NO_RTELE_INTO);
return (FPROP_NONE);
}
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index e9b0e6cc40..a7c00c9481 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -1576,7 +1576,8 @@ static bool _teleport_player(bool allow_control, bool new_abyss_area)
|| grd(newpos) != DNGN_DEEP_WATER)
|| monster_at(newpos)
|| env.cgrid(newpos) != EMPTY_CLOUD
- || need_distance_check && (newpos - centre).abs() < 34*34);
+ || need_distance_check && (newpos - centre).abs() < 34*34
+ || testbits(env.map(newpos).property, FPROP_NO_RTELE_INTO));
if ( newpos == you.pos() )
mpr("Your surroundings flicker for a moment.");