From 5ec92457243da24bdac032c3f14112679f8f7be3 Mon Sep 17 00:00:00 2001 From: dploog Date: Tue, 22 Sep 2009 01:43:53 +0000 Subject: New portal vault: Trove by Jude. There is one issue: gold should never be part of the loot but I don't know how to get rid of it. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10770 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/dat/trove.des | 583 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 583 insertions(+) create mode 100644 crawl-ref/source/dat/trove.des (limited to 'crawl-ref/source/dat/trove.des') diff --git a/crawl-ref/source/dat/trove.des b/crawl-ref/source/dat/trove.des new file mode 100644 index 0000000000..efc53dd4d5 --- /dev/null +++ b/crawl-ref/source/dat/trove.des @@ -0,0 +1,583 @@ +############################################################################## +# +# Treasure Trove (by due) +# +# Troves are once-only (tolled) and timed portals to a treasure chamber, most +# of which are weighted acquirement-esque towards your skills. Of course, +# there's a chance that you'll get rubbish (casters in an weapon/armour room +# and melee fighters in a library), but that's kind of the point. +# +# Two Trove portals are 'nasty': one features vampires behind (diggable) glass, +# and the other features two wandering shining eyes. Have a nice time! +# +############################################################################## +{{ + +function trove_portal(e) + local d = crawl.roll_dice + local entry_fee = 5 * math.floor(200 + d(3,200) / 3 + d(10) * d(10) * d(10)) + local desc_long = [[ Once upon a time, an enterprising thief and wizard, terrified of being caught committing an act of burglary, created a system of portals leading into the secret treasure troves and chambers of the rich. Too scared to loot them himself, he instead charged an extortionate fee for entry to anyone who wanted to rifle through them. + +The secrets of the gateways died with him when his fellow thieves, disgusted at his betrayal of their 'ideals', had him murdered. +]] + local timeout_turns = crawl.random_range(1600, 2800) + local messager = + timed_msg { + visible = true, + -- $F{xxx} will be substituted with the 'entity' property of the timed + -- marker, or with the desc property (if entity is not set). + messages = time_messages(timeout_turns, + "$F{The} hums gently.", + "$F{The} dims slightly, then brightens again.", + "$F{The} flickers between here and not.", + "$F{The} flickers urgently, almost stroboscopically.") + } + + local function stair () + return timed_marker { + amount = entry_fee, + entity = "portal", + toll_desc = "portal to enter a treasure trove", + desc = "portal to a secret trove of treasure", + desc_long = desc_long, + overmap = "Trove", + overmap_note = "" .. entry_fee .. " gp (slowly fading away)", + dst = "trove", + dstorigin = "in a treasure trove", + turns = timeout_turns, + msg = messager, + floor = "floor", + disappear = "The portal fades slowly, and then, between one blink and the next, disappears completely." + } + end + e.lua_marker("O", stair) + e.kfeat("O = enter_portal_vault") + e.colour("O = blue") +end + +-- Use the following line in destination maps after all SUBSTs +-- : trove_setup_features(_G) +-- Note that the function also defines < to be the exit portal. +function trove_setup_features(e) + e.kfeat("< = exit_portal_vault") + e.colour("< = blue") + e.lrockcol("blue") + e.lfloorcol("darkgrey") + e.lrocktile("wall_vault") + e.lfloortile("floor_vault") + crawl.mark_milestone("br.enter", "entered a treasure trove.") +end + +-- "any scroll good_item" still gets you 'scroll of noise', 'scroll of curse weapon', etc +-- so let's limit it to the enchant/recharge scrolls, tloc scrolls, identify scrolls, +-- mapping scrolls with a low chance of silence, vulnerability or acquirement (lowest) +function good_scroll (e) + e.item([[scroll of enchant weapon i / scroll of enchant weapon ii / + scroll of enchant weapon iii w:5 / scroll of vorpalise weapon w:3 / + scroll of enchant armour / scroll of identify w:20 / + scroll of magic mapping w:5 / scroll of blinking / scroll of silence w:2 / + scroll of recharging / scroll of acquirement w:1 / scroll of teleportation w:20 / + scroll of vulnerability w:2 / scroll of holy word w:8 / scroll of fog w:8]]) +end + +function place_fog(e, type, strength) + e.lua_marker("m", fog_machine { pow_max = strength, cloud_type = type, + delay_min = 50, delay_max = 300, size = 12, + start_clouds = 1 } ) +end +}} + +default-depth: D:7-, Elf:1-, Vault:1- + +############################################################################## +# +# Relevant entry portals. +# +############################################################################## + +NAME: enter_trove_0 +TAGS: uniq_trove no_monster_gen trowel_portal +: trove_portal(_G) +MAP +O +ENDMAP + +NAME: enter_trove_1 +TAGS: uniq_trove no_monster_gen +: trove_portal(_G) +COLOUR: . = blue +MAP +... +.O. +... +ENDMAP + +NAME: enter_trove_2 +TAGS: uniq_trove no_monster_gen +: trove_portal(_G) +COLOUR: . = blue +COLOUR: G = blue +MAP + G + G.G +G.O.G + G.G + G +ENDMAP + +NAME: enter_trove_3 +TAGS: uniq_trove no_monster_gen no_wall_fixup +: trove_portal(_G) +COLOUR: . = blue +COLOUR: c = blue +COLOUR: x = blue +SUBST: x = c:20 =:6 +MAP +cxxxc +x...x +x.O.x +x...x +cxxxc +ENDMAP + +# Of course, not everyone is willing for you to take their treasure... +NAME: enter_trove_5 +TAGS: uniq_trove no_monster_gen +: trove_portal(_G) +COLOUR: . = blue +COLOUR: c = blue +: if you.xl() <= 7 then +# A pack of gnolls want the treasure more than you do! +KMONS: e = gnoll +KMONS: l = gnoll / nothing w:5 +: elseif you.xl() <= 15 then +# Got drafted in from Vaults:8, while the mages try and close the portal down. +KMONS: e = vault guard +: elseif you.xl() <= 20 then +# And this time he brought some friends... +KMONS: e = vault guard +KMONS: l = vault guard +: end +KFEAT: e = . +COLOUR: e = blue +KFEAT: l = . +COLOUR: l = blue +MAP +ccccc +c...c +c.O.c +c...c +cc+cc +cl.lc +c.e.c +cl.lc +cc+cc + @ +ENDMAP + +# Someone left some gold behind for you! +NAME: enter_trove_6 +TAGS: uniq_trove no_monster_gen no_wall_fixup +: trove_portal(_G) +MARKER: X = lua: props_marker { connected_exclude="true" } +SUBST: X = = +COLOUR: = = blue +MAP +ccccccc +c$$$$$c +c$XXX$c +c$XOX$c +c$XXX$c +c$$$$$c +ccc+ccc + @ +ENDMAP + +############################################################################## +# +# The portal vaults: +# +# Most of the vaults have 16 items of loot. Usually weighted 'd', 'e', 'f', from +# good to "worse". Some vaults have more than 16 items: the hunter vault has 15, +# and the two 'nasty' vaults have 24 and 28 items respectively. +# +############################################################################## + +NAME: trove_simple +WEIGHT: 60 +ORIENT: encompass +TAGS: trove no_item_gen no_monster_gen allow_dup +# Loot: 16 items. +ITEM: any good_item +ITEM: acquire jewellery / any good_item w:2 +ITEM: acquire weapon / acquire armour / any good_item w:2 +: trove_setup_features(_G) +MAP +xxxxxx +xddddx +xfeedx +xefedx +xdefdx +xx++xx +xx..xx +xx..xx +xx..xx +x....x +x.