summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dat/bazaar.des
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-27 17:26:00 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-27 17:26:00 +0000
commit9b909453a2e070df3ac33277d0a7f07deb6e9132 (patch)
tree531e033aec96fd1e97e797659a3d8790daad5eae /crawl-ref/source/dat/bazaar.des
parente3698852a27d5565ba1381bd600776f5080ab9c9 (diff)
downloadcrawl-ref-9b909453a2e070df3ac33277d0a7f07deb6e9132.tar.gz
crawl-ref-9b909453a2e070df3ac33277d0a7f07deb6e9132.zip
Reworked Bazaars as a special case of portal vaults. The level-type is now
called portal vault. The dungeon builder bases its behaviour on the level_type_name, which must be set as the "dst" property on the portal leading to the bazaar/portal vault. Added WELCOME: directive to .des files to allow maps to specify a welcome message when the player enters the level (only relevant to encompass maps). Readjusted kenku flight speed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1941 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/dat/bazaar.des')
-rw-r--r--crawl-ref/source/dat/bazaar.des46
1 files changed, 30 insertions, 16 deletions
diff --git a/crawl-ref/source/dat/bazaar.des b/crawl-ref/source/dat/bazaar.des
index cc1cb17d0b..65bd852aa1 100644
--- a/crawl-ref/source/dat/bazaar.des
+++ b/crawl-ref/source/dat/bazaar.des
@@ -8,17 +8,26 @@
# Utility functions
lua {{
- function check_expire_marker(e)
- e.messager =
- bell_clock_msg { initmsg="You hear coins being counted." }
- if not crawl.one_chance_in(3) then
- e.marker( [[ O = lua: timed_marker {
- low=1000, high=1500, msg=messager }
- ]] )
- else
- e.marker("O = lua: one_way_stair()")
- end
- end
+
+function bazaar_portal()
+ local messager = bell_clock_msg { initmsg="You hear coins being counted." }
+ if not crawl.one_chance_in(3) then
+ local pdesc = 'flickering gateway to a bazaar'
+ return timed_marker {
+ low=1000, high=1500, msg=messager,
+ disappear='The gate to the bazaar disappears!',
+ props = { desc=pdesc, dst='bazaar' }
+ }
+ else
+ return one_way_stair { desc = 'gateway to a bazaar',
+ dst = 'bazaar' }
+ end
+end
+
+function bazaar_message(e)
+ e.welcome("You enter an inter-dimensional bazaar!")
+end
+
}}
default-depth: D:10-27
@@ -29,7 +38,7 @@ default-depth: D:10-27
NAME: bzr_entry_dummy
TAGS: bzr_entry transparent
ORIENT: float
-: check_expire_marker(_G)
+MARKER: O = lua:bazaar_portal()
MAP
O
ENDMAP
@@ -40,7 +49,7 @@ NAME: bzr_entry_001
TAGS: bzr_entry no_pool_fixup
ORIENT: float
SHUFFLE: wwl
-: check_expire_marker(_G)
+MARKER: O = lua:bazaar_portal()
MAP
www
w.w.w
@@ -55,7 +64,7 @@ NAME: bzr_entry_002
TAGS: bzr_entry
ORIENT: float
SUBST: $=$.
-: check_expire_marker(_G)
+MARKER: O = lua:bazaar_portal()
MAP
xx.xx
x$$$x
@@ -72,7 +81,7 @@ ORIENT: float
MONS: human, orc, goblin, kobold
SUBST: . = .:210 1
SHUFFLE: 1234
-: check_expire_marker(_G)
+MARKER: O = lua:bazaar_portal()
MAP
.....
.......
@@ -91,13 +100,15 @@ ENDMAP
# Every encompass bazaar level must have at least one downstair, which will be
# replaced with an exit from the bazaar. It's a good idea to also provide an
# upstair, which will be converted into a stone arch (and on which the player
-# will be placed when entering the bazaar).
+# will be placed when entering the bazaar). If there's no upstair, the player
+# will arrive on a random square.
NAME: bazaar_general_marketplace
TAGS: bazaar
ORIENT: encompass
KFEAT: A = any shop
CHANCE: 30
+: bazaar_message(_G)
MAP
xxxxxxxxx
xxxx>xxxx
@@ -120,6 +131,7 @@ KFEAT: B = antique weapon shop / weapon shop
KFEAT: C = antique armour shop / armour shop
ITEM: any weapon / w:2 good_item any weapon
ITEM: any armour / w:2 good_item any armour
+: bazaar_message(_G)
MAP
xxxxxxxxx
xxxx>xxxx
@@ -141,6 +153,7 @@ KFEAT: B = jewellery shop
ITEM: any jewelry / good_item any jewelry
ITEM: any book / good_item any book, any staff
SUBST: w:w.l, x:b, c:., v=bl, d=.d, e=.e, f=.f
+: bazaar_message(_G)
MAP
xxxxxxxxxxxxx
xxxxxxxwwwxxx
@@ -156,6 +169,7 @@ TAGS: bazaar
ORIENT: encompass
KFEAT: A = wand shop
ITEM: any wand
+: bazaar_message(_G)
MAP
xxxxxxxxxxx
xx...>...xx