diff options
Diffstat (limited to 'crawl-ref/source/dat/bazaar.des')
-rw-r--r-- | crawl-ref/source/dat/bazaar.des | 65 |
1 files changed, 52 insertions, 13 deletions
diff --git a/crawl-ref/source/dat/bazaar.des b/crawl-ref/source/dat/bazaar.des index c833208cdf..4f0fa92174 100644 --- a/crawl-ref/source/dat/bazaar.des +++ b/crawl-ref/source/dat/bazaar.des @@ -28,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 @@ -169,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 @@ -248,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 @@ -279,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 @@ -332,11 +365,13 @@ KFEAT: R = stone_arch KFEAT: S = 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 # @@ -654,8 +689,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 # @@ -778,10 +815,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 |