summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dat/bazaar.des
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-28 16:18:11 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-28 16:18:11 +0000
commitfe84ffe6b34c1ccc69e4ab4334d63c893d231f3a (patch)
treeb5e5c286d85280e4e42bddfebe2c28ec89f7268e /crawl-ref/source/dat/bazaar.des
parent9357fd185f60e255c8b876b305f3f31e3b279975 (diff)
downloadcrawl-ref-fe84ffe6b34c1ccc69e4ab4334d63c893d231f3a.tar.gz
crawl-ref-fe84ffe6b34c1ccc69e4ab4334d63c893d231f3a.zip
Repairing levels for trunk. Whoops...
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2642 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/dat/bazaar.des')
-rw-r--r--crawl-ref/source/dat/bazaar.des81
1 files changed, 58 insertions, 23 deletions
diff --git a/crawl-ref/source/dat/bazaar.des b/crawl-ref/source/dat/bazaar.des
index deb057bff8..1d77eb5648 100644
--- a/crawl-ref/source/dat/bazaar.des
+++ b/crawl-ref/source/dat/bazaar.des
@@ -5,11 +5,6 @@
###############################################################################
# Bazaar entries
-# What is still missing:
-# The timer should be more generous for lower levels.
-# Bazaars would also make sense outside of the dungeon (at least in the Vaults,
-# Orc, and Elf).
-
# Utility functions
lua {{
@@ -33,6 +28,32 @@ function bazaar_message(e)
e.welcome("You enter an inter-dimensional bazaar!")
end
+function random_bazaar_colour()
+ local colours = {"blue", "red", "lightblue", "magenta", "green"}
+
+ crawl.mpr("#colours = " .. #colours)
+
+ local ret = colours[crawl.random2(#colours) + 1]
+
+ crawl.mpr("ret = " .. ret)
+
+ return ret
+end
+
+function fixup_bazaar()
+ dgn.fixup_stairs("stone_arch", "exit_portal_vault")
+ dgn.floor_halo("enter_shop", "yellow")
+
+ if (dgn.get_floor_colour() == "black") then
+ dgn.change_floor_colour(random_bazaar_colour())
+ end
+
+ if (dgn.get_rock_colour() == "black") then
+ dgn.change_rock_colour("yellow")
+ end
+end
+
+dgn.set_lt_callback("bazaar", "fixup_bazaar")
}}
default-depth: D:10-27
@@ -174,7 +195,10 @@ ENDMAP
# upstair, which will be converted into a stone arch (and on which the player
# will be placed when entering the bazaar). If there's no upstair, the player
# will arrive on a random square.
-
+#
+# You can force a particular colour for the rock walls or floor using
+# ROCKCOL and FLOORCOL directives.
+#
NAME: bazaar_general_marketplace
TAGS: bazaar allow_dup
FLAGS: no_rotate
@@ -253,10 +277,12 @@ ITEM: any jewellery / good_item any jewellery
ITEM: any book / good_item any book, any staff
SUBST: d=.d, e=.e, f=.f
# special cases for blue/red floor
-: if you.bazaar_floor() == "red" then
+: local colour = random_bazaar_colour()
+: _G.floor_colour(colour)
+: if colour == "red" then
SUBST: l = w
: else
-: if you.bazaar_floor() == "blue" then
+: if colour == "blue" then
SUBST: w = l
: end
: end
@@ -284,10 +310,12 @@ KFEAT: B = distillery shop
ITEM: any wand, ring of levitation
SHUFFLE: leAB/wdBA
# special cases for blue/red floor
-: if you.bazaar_floor() == "red" then
+: local colour = random_bazaar_colour()
+: _G.floor_colour(colour)
+: if colour == "red" then
SUBST: l = w
: else
-: if you.bazaar_floor() == "blue" then
+: if colour == "blue" then
SUBST: w = l
: end
: end
@@ -338,11 +366,13 @@ SUBST: y=z, r=z, s=z, z=V, Y=Z, R=Z, S=Z
KFEAT: Z = stone_arch
SHUFFLE: lw
# special cases for blue/red floor
-: if you.bazaar_floor() == "red" then
-SUBST: l : wWx
+: local colour = random_bazaar_colour()
+: _G.floor_colour(colour)
+: if colour == "red" then
+SUBST: l = w
: else
-: if you.bazaar_floor() == "blue" then
-SUBST: w : Wx
+: if colour == "blue" then
+SUBST: w = l
: end
: end
#
@@ -379,11 +409,13 @@ KFEAT: Z = stone_arch
SUBST: a=T, z=V
SHUFFLE: lw
# special cases for blue/red floor
-: if you.bazaar_floor() == "red" then
-SUBST: l : wWx
+: local colour = random_bazaar_colour()
+: _G.floor_colour(colour)
+: if colour == "red" then
+SUBST: l = w
: else
-: if you.bazaar_floor() == "blue" then
-SUBST: w : Wx
+: if colour == "blue" then
+SUBST: w = l
: end
: end
#
@@ -404,7 +436,6 @@ ENDMAP
#######################################
# circle bazaar
#
-
NAME: bazaar_circle_1
CHANCE: 2
TAGS: bazaar allow_dup
@@ -705,8 +736,10 @@ KFEAT: D = antique weapon shop
KFEAT: E = antique armour shop
KFEAT: F = scroll shop / distillery shop
: bazaar_message(_G)
-# special case for floor
-: if you.bazaar_floor() == "blue" then
+# special cases for blue floor
+: local colour = random_bazaar_colour()
+: _G.floor_colour(colour)
+: if colour == "blue" then
SUBST: w = W
: end
#
@@ -829,10 +862,12 @@ SHUFFLE: zZ
SUBST: z = ., Z = w
SHUFFLE: wl, ABCD
# special cases for blue/red floor
-: if you.bazaar_floor() == "red" then
+: local colour = random_bazaar_colour()
+: _G.floor_colour(colour)
+: if colour == "red" then
SUBST: l = w
: else
-: if you.bazaar_floor() == "blue" then
+: if colour == "blue" then
SUBST: w = l
: end
: end