From d35b18cd77aba15cec93ddf6e0eed8ae293fa9a7 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Fri, 27 Nov 2009 10:35:02 +1000 Subject: Store in-progress Wizard's Laboratory Portal Vault. It currently requires a lot of work, and there are a lot of maps that still need doing. Current maps mostly by me, though dpeg's map needs to be added in when I find the email. --- crawl-ref/source/dat/wizlab.des | 342 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 342 insertions(+) create mode 100644 crawl-ref/source/dat/wizlab.des diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des new file mode 100644 index 0000000000..d513c2cbe7 --- /dev/null +++ b/crawl-ref/source/dat/wizlab.des @@ -0,0 +1,342 @@ +### +# +# "Wizard"-themed portals. +# +# PLANNING AREA: +# +# Alistair's Brewery: mutated wizards, mephitic cloud generators, +# cupboards full of potions, confused monsters. +# Borgnjor's Mortuary: liches, miasma clouds, potions of decay, slaves that are +# having their life forces drained, vampire (knights, mages). +# Cigotuvi's Chambers: "laboratory-esque", mutagenic fog machines, pulsating +# lumps and shining eyes in cages, ugly things in cages, degeneration. +# Erinya's Formal Garden: trees, centaurs, fountains, flowers, oklobs, and +# crumbling stone walls. +# Iskenderun's Mystic Tower: purple draconians, purple wizards with mystic +# blast, naga mages with mystic blast, purple fog and smoke outside windows, +# robes and cloaks of magic resistance as the loot. +# Lee's Rapid Deconstructor: golems and "monk" or otherwise unarmed creatures, +# exploding features and exploding corpses. It's a timed vault, so you have +# to get to the loot quickly and avoid the hordes of monsters. +# Lehudib's Crystal Cave: crystal walls and crystal golems, crystal monsters, +# spear throwers (statues with crystal spear), possibly the unrand as the +# loot. +# Maxwell's Forge: Maxwell employs a bunch of angels to churn out weapons; +# stashes of hammers, flame clouds, other "smithy" styled themes, with black +# smoke. +# Olgreb's Toxic Laboratory: poisonous clouds, a toxic radiance effect, +# poisonous monsters, possibly even a "poison" effect that bypasses rPois, +# potions of poison and potions dropped converting into potions of poison. +# Ozocubu's Refrigerator: simulacra, refrigeration effect, a solid stone room +# inside of an "ice cave", freezing clouds. +# Doroklohe's Tomb: lots of small tombs with loot and monsters inside. +# Tukima's Studio: dancing weapons, dancing weapon machine, tukima's book and a +# scroll of acquirement, statue guards, mirrors. +# Cekugob's Oubliette: a randomised maze (though not a labyrinth) with skeletal +# guards, and with occasionally hidden. Cekugob's amulet as the loot, +# possibly. +# Zonguldrok's Mausoleum: regenerating zombie monsters, sword as the loot. +# Random named Wizard portals. +# +# TO-DO: +# +# We've currently got working vaults for Tukima and Erinya, and dpeg has a +# working vault for Doroklohe (needs to be added to this file and +# portal-vaultified). The flavour messages for the portal vault require flavour, +# while the actual portals themselves could do with an overhaul and some new +# ones. +# +## + +{{ +function wizlab_portal (e) + -- Flavour could use some improvement. + local desc_long = "This portal has been left open by a careless wizard." .. + "It might lead to their secret laboratory, but beware!" .. + " Surely it will be guarded by magical traps and " .. + "terrible monsters." + local timeout_turns = crawl.random_range(1200, 1700) + 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} shimmers.", + "$F{The} vibrates and hums gently.", + "$F{The} is slightly opaque.", + "$F{The} is almost invisible now.") + } + + e.lua_marker('O', + timed_marker { + disappear = "The portal disappears completely.", + desc = "magical portal", + desc_long = desc_long, + entity = 'portal', + dst = 'WizLab', + dstname_abbrev = "WizLab", + dstorigin = "in a Wizard's Laboratory", + overmap = "magical portal", + turns = timeout_turns, + floor = "stone_arch", + msg = messager }) + e.kfeat("O = enter_portal_vault") +end + +function wizlab_feat_descs() + dgn.set_feature_desc_short("gate leading back to the Dungeon", + "portal leading out of here") + dgn.set_feature_desc_short("empty arch of ancient stone", + "empty arch of stone") +end + +dgn.set_lt_callback("wizlab", "wizlab_feat_descs") + +-- Destinations: +function wizlab_setup (e, wizlab_desc) + e.kfeat("< = exit_portal_vault") + -- This is so that the note shows up properly. + dgn.set_level_type_origin("in " .. wizlab_desc) + crawl.mark_milestone("br.enter", "entered " .. wizlab_desc .. ".") +end +}} + +############################################################################### +# Portal entrances. +# +# Todo: more, and better. +NAME: enter_wizlab_1 +TAGS: uniq_wizlab +ORIENT: float +: wizlab_portal(_G) +MAP + wwwww + wwwwwww + wwxmxmxww + wwxx...xxww +wwxm..O..mxww + wwxx...xxww + wwxx+xxww + www.www + w.@.w +ENDMAP +# +# +############################################################################### + +default-depth: + +############################################################################### +# And arrivals! +############################################################################### +# Firstly, we have Tukima's Studio. +# +# Todo: clean up the code +NAME: wizlab_tukima +ORIENT: encompass +TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +MONS: dancing weapon +KFEAT: M = granite_statue +MARKER: M = lua:props_marker {veto_fragmentation="veto", veto_disintegrate="veto", \ + slaved_to="tukima"} +{{ +function tukima_machine (data, triggerable, triggerer, marker, ev) + if triggerer.type ~= "turn" or triggerer.sub_type ~= "countdown" then + return + end + + local x, y = marker:pos() + local you_x, you_y = you.pos() + + if data.weapon_count >= 5 then + if you.see_cell(x, y) then + crawl.mpr("The machine makes a dull noise.") + else + crawl.mpr("You hear a distant, dull noise.") + end + return + end + + if (you_x == x and you_y == y) then return end + if dgn.mons_at(x, y) then return end + + dgn.apply_area_cloud(x, y, 1, 6, 1, 10, "black smoke", "other", -1) + + if (not dgn.create_monster(x, y, "generate_awake dancing weapon")) then + return + end + + data.weapon_count = data.weapon_count + 1 + + if you.see_cell(x, y) then + crawl.mpr("The machine hisses, and spits out a dancing weapon!") + else + crawl.mpr("You hear a distant hissing noise.") + end +end + +local tukima_marker = TriggerableFunction:new { + func = tukima_machine, + repeated = true, + data = {weapon_count=0}, +} + +tukima_marker:add_triggerer(DgnTriggerer:new { + type="turn", + delay_min=500, + delay_max=800 +}) + +lua_marker('?', tukima_marker) + +if crawl.coinflip() then + subst("Y = =") + subst("y = .") + subst("Rr = c") +else + subst("Y = c") + subst("y = m") + subst("R = .") + subst("r = =") +end + +if crawl.coinflip() then + subst("X = =") + subst("x = .") + subst("Ll = c") +else + subst("X = c") + subst("x = m") + subst("L = .") + subst("l = =") +end +}} +SUBST: ? = . +COLOUR: c = darkgrey +COLOUR: = = darkgrey +COLOUR: mMV = silver +KMONS: 8 = ice statue col:silver spells:blink_other;blink_other;blink_other;\ + blink_other;blink_other;major_healing name:strange_machine \ + name_replace name_descriptor +KITEM: 8 = book of tukima +KMONS: 9 = ice statue col:silver spells:blink_other;blink_other;blink_other;\ + blink_other;blink_other;major_healing name:strange_machine \ + name_replace name_descriptor +KITEM: 9 = scroll of acquirement +: local mquote = '"The machine had stood there a long time. It was several ' +: .. "hundred feet long and could run on a thimbleful of earth or" +: .. " water. It had been working seven and a half million years." +: .. '"\n -Sweet Their Blood and Sticky, Albert Teichner' +MARKER: 8 = lua:MonPropsMarker:new {description="A glistening silver machine.\n",\ + quote=mquote} +MARKER: 9 = lua:MonPropsMarker:new {description="A glistening silver machine.\n",\ + quote=mquote} +: dgn.set_feature_desc_short("translucent rock wall", +: "crystal clear mirror") +: dgn.set_feature_desc_long("translucent rock wall", +: "A glistening mirror, reflecting everything around it.\n") +: dgn.set_feature_desc_short("granite statue", "strange machine") +: dgn.set_feature_desc_long("granite statue", "A mechanical contraption," .. +: " all hisses and pops.\n") +: dgn.set_feature_desc_short("dry fountain", "glistening fountain") +: dgn.set_feature_desc_long("dry fountain", "A pristine fountain. " .. +: "The only thing it lacks is water.\n") +: dgn.set_feature_quote("A granite statue", mquote) +: wizlab_setup(_G, "Tukima's Studio") +MAP + ccccccc + ccmmmcc + cccccm...mccccc + cc...+.A.<.+...cc + cc..cccm...mccc..cc + cc+cccccm.mccccc+cc + cc.cccccc+cccccc.cc + cc...cccc...cccc...cc + cm...mcm..1..mcm...mc + cm...mcm.....mcm...mc + cm.V.mcm.....mcm.V.mc + cm...mcm.....mcm...mc + cm...mcm..1..mcm...mc + cc...cccc...cccc...cc + ccc.cccccc+cccccc.ccc + cc+ccccm...mcccc+cc + ccm.mccm.....mccm.mcc + cm.1..+...V...+..1.mc + ccXm.mccm.....mccm.mYcc + cccxccmlcccm...mcccrmccycc + ccm.mcccLcccm.mcccRcccm.mcc + ccm...mLLcccm...mcccRRm...mcc + ccm..$..mcccm..?..mcccm..$..mcc + cm..$8$..mcm...M...mcm..$9$..mc + ccm..$..mcccm.....mcccm..$..mcc + ccm...mcc ccm...mcc ccm...mcc + ccmmmcc ccmmmcc ccmmmcc + ccccc ccccc ccccc +ENDMAP + +############################################################################### +# Erinya's Garden +# +# Todo: arrival can be next to the centaurs, fix this somewhere. +# flowers should be able to grow randomly in LOS (hell effect) +NAME: wizlab_erinya +ORIENT: encompass +TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +MONS: centaur col:green, centaur warrior col:lightgreen +MONS: oklob plant +MONS: stone golem name:vine_covered name_adjective +MONS: toadstool col:any name:flowers name_replace name_descriptor \ + name_definite +SUBST: y = ct +COLOUR: G = yellow +KFEAT: / = stone_arch +KFEAT: _ = altar_fedhas +: set_border_fill_type("stone_wall") +: wizlab_setup(_G, "Erinya's Garden") +: dgn.set_feature_desc_short("empty arch of ancient stone", +: "rose-covered archway") +: dgn.set_feature_desc_short("granite statue", "vine-covered statue") +: dgn.set_feature_desc_long("granite statue", "It looks almost like a " .. +: "monster made entirely from vines.\n") +MAP +ccccccccccccccccccccccccccccccccccccccccccccc +ctttttttttttttttttttttttttttttttttttttttttttc +ctttttttt...........................ttttttttc +ctttt.....tttttttttttt.tttttttttttt.....ttttc +cttt..tt.tttttttttt.......tttttttttt.tt..tttc +ct.1.tGt............<.T.A............tGt.1.tc +cttt..tt.tttttttttt.......tttttttttt.tt..tttc +ctttt.....tttttttttttt.tttttttttttt.....ttttc +ctttttttt...........................ttttttttc +cttttttttttttttttttttt.tttttttttttttttttttttc +ctttttttttyyyttttttty...ytttttttyyytttttttttc +ctttttttty...yttttty.....yttttty...yttttttttc +cttttttt..111.........T.........111..tttttttc +ctttttt...121.tttttc.....cttttt.121...ttttttc +cttttt.tty...yttttttcc=cctttttty...ytt.tttttc +ctttt.tttty.yttttttt.....ttttttty.ytttt.ttttc +cttt.tttttt.tttttt...2.2...tttttt.tttttt.tttc +cttt.tttttt..tttt.....3.....tttt..tttttt.tttc +ctttt.tttttt..tttt.........tttt..tttttt.ttttc +cttttt.tttttt..ttttttttttttttt..tttttt.tttttc +ctttttt.tttttt..tttttcccttttt..tttttt.ttttttc +cttttyyy/yyyttt..ttty...yttt..tttyyy/yyyttttc +cttty...1...yttt..ty..1..yt..ttty...1...ytttc +ctty...1T1...yttt....1T1....ttty...1T1...yttc +cttty...1...yttt..ty..2..yt..ttty...1...ytttc +cttttyyy/yyyttt..ttty...yttt..tttyyy/yyyttttc +ctttttt.tttttt..tttttcccttttt..tttttt.ttttttc +cttttt.tttttt..ttttttttttttttt..tttttt.tttttc +ctttt.tttttt..ttttt.ww4ww.ttttt..tttttt.ttttc +cttt.tttttt..ttttt.wwG_Gww.ttttt..tttttt.tttc +cttt.ttttt..ttttt.....4.....ttttt..ttttt.tttc +ctttt.ttty/ytttt....cc=cc....tttty/yttt.ttttc +cttttt.ty...yttttttcc...cctttttty...yt.tttttc +ctttttt./.1./.ttttcc..2..cctttt./.1./.ttttttc +cttttttty...yt...../.1T1../....ty...ytttttttc +cttttttttyyyttttttty.....ytttttttyyyttttttttc +ctttttttttttttttttttyytyytttttttttttttttttttc +ccccccccccccccccccccccccccccccccccccccccccccc +ENDMAP + -- cgit v1.2.3-54-g00ecf From d829dcb142bf96b30e6797af7d6bba5593257cab Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Fri, 27 Nov 2009 21:52:37 +1000 Subject: Updates to Erinya's Formal Garden. --- crawl-ref/source/dat/wizlab.des | 82 +++++++++++++++++++++++++++++++++++------ 1 file changed, 71 insertions(+), 11 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index d513c2cbe7..1ccfb87d8d 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -85,10 +85,6 @@ function wizlab_portal (e) end function wizlab_feat_descs() - dgn.set_feature_desc_short("gate leading back to the Dungeon", - "portal leading out of here") - dgn.set_feature_desc_short("empty arch of ancient stone", - "empty arch of stone") end dgn.set_lt_callback("wizlab", "wizlab_feat_descs") @@ -99,6 +95,12 @@ function wizlab_setup (e, wizlab_desc) -- This is so that the note shows up properly. dgn.set_level_type_origin("in " .. wizlab_desc) crawl.mark_milestone("br.enter", "entered " .. wizlab_desc .. ".") + dgn.set_feature_desc_short("gate leading back to the Dungeon", + "portal leading out of here") + if wizlab_desc ~= "Erinya's Formal Garden" then + dgn.set_feature_desc_short("empty arch of ancient stone", + "empty arch of stone") + end end }} @@ -278,27 +280,85 @@ ENDMAP ############################################################################### # Erinya's Garden # -# Todo: arrival can be next to the centaurs, fix this somewhere. -# flowers should be able to grow randomly in LOS (hell effect) +# Map was based on this image: http://upload.wikimedia.org/wikipedia/commons/5 +# /58/Plan_du_ch%C3%A2teau_et_des_jardins_de_Clagny_dessin%C3%A9_par_ +# Maraine_XVIIe_si%C3%A8cle.jpg (concat it back together to get the +# full link). +# Todo: +# loot? NAME: wizlab_erinya ORIENT: encompass TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup MONS: centaur col:green, centaur warrior col:lightgreen MONS: oklob plant MONS: stone golem name:vine_covered name_adjective -MONS: toadstool col:any name:flowers name_replace name_descriptor \ - name_definite +MONS: toadstool col:any name:flowers n_rpl n_des n_the SUBST: y = ct COLOUR: G = yellow KFEAT: / = stone_arch KFEAT: _ = altar_fedhas +MARKER: A = feat:stone_arch +{{ + +function grow (data, triggerable, triggerer, marker, ev) + if triggerer.type ~= "turn" or triggerer.sub_type ~= "countdown" then + return + end + + local count = 0 + local flowdesc = "A rather pretty cluster of flowers." + if you.can_smell then + flowdesc = flowdesc .. " They smell sweet." + end + + if crawl.one_chance_in(10) then + -- Fruit! + for spot in iter.adjacent_iterator() do + if not feat.is_solid(spot:xy()) and not feat.destroys_items(spot:xy()) + and crawl.one_chance_in(3) then + -- Do nothing. + dgn.create_item(spot.x, spot.y, "pear / apple / choko / apricot / orange" + .. "/ banana / strawberry q:10 / lemon / rambutan " + .. "/ grape q:10 / sultana q:10 / lychee") + count = count + 1 + end + end + if count > 0 then + crawl.mpr("Fruit sprouts up around you!") + end + else + -- Flowers! + for spot in iter.adjacent_iterator() do + if not feat.is_solid(spot:xy()) and not feat.destroys_items(spot:xy()) + and not crawl.one_chance_in(3) then + dgn.create_monster(spot.x, spot.y, "toadstool col:any name:flowers " .. + "name_replace name_descriptor name_definite") + dgn.mons_at(spot.x, spot.y).set_prop("description", flowdesc .. "\n") + count = count + 1 + end + end + if count > 0 then + crawl.mpr("Flowers sprout up around you!") + end + end +end + +local grow_marker = TriggerableFunction:new { func = grow, repeated = true } + +grow_marker:add_triggerer(DgnTriggerer:new { type="turn", + delay_min=500, delay_max=800, }) + +lua_marker("_", grow_marker) +}} : set_border_fill_type("stone_wall") -: wizlab_setup(_G, "Erinya's Garden") -: dgn.set_feature_desc_short("empty arch of ancient stone", -: "rose-covered archway") +: wizlab_setup(_G, "Erinya's Formal Garden") +: dgn.set_feature_desc_short("empty arch of ancient stone", +: "rose-covered archway") : dgn.set_feature_desc_short("granite statue", "vine-covered statue") : dgn.set_feature_desc_long("granite statue", "It looks almost like a " .. : "monster made entirely from vines.\n") +: dgn.set_feature_desc_short("stone wall", "crumbing stone wall") +: dgn.set_feature_desc_long("stone wall", "It looks ancient.") MAP ccccccccccccccccccccccccccccccccccccccccccccc ctttttttttttttttttttttttttttttttttttttttttttc -- cgit v1.2.3-54-g00ecf From 9f174bb4dde0241c7d50b2f9ca0ca7d494307515 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Fri, 27 Nov 2009 22:04:15 +1000 Subject: Give Erinya's Garden loot, finalise a few things. --- crawl-ref/source/dat/wizlab.des | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 1ccfb87d8d..81ff1e1be3 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -284,8 +284,6 @@ ENDMAP # /58/Plan_du_ch%C3%A2teau_et_des_jardins_de_Clagny_dessin%C3%A9_par_ # Maraine_XVIIe_si%C3%A8cle.jpg (concat it back together to get the # full link). -# Todo: -# loot? NAME: wizlab_erinya ORIENT: encompass TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup @@ -298,6 +296,7 @@ COLOUR: G = yellow KFEAT: / = stone_arch KFEAT: _ = altar_fedhas MARKER: A = feat:stone_arch +ITEM: any fixed theme book, any fixed level book, any staff {{ function grow (data, triggerable, triggerer, marker, ev) @@ -376,9 +375,9 @@ cttttttt..111.........T.........111..tttttttc ctttttt...121.tttttc.....cttttt.121...ttttttc cttttt.tty...yttttttcc=cctttttty...ytt.tttttc ctttt.tttty.yttttttt.....ttttttty.ytttt.ttttc -cttt.tttttt.tttttt...2.2...tttttt.tttttt.tttc -cttt.tttttt..tttt.....3.....tttt..tttttt.tttc -ctttt.tttttt..tttt.........tttt..tttttt.ttttc +cttt.tttttt.ttttttty.232.yttttttt.tttttt.tttc +cttt.tttttt..tttttttydefyttttttt..tttttt.tttc +ctttt.tttttt..tttttttytyttttttt..tttttt.ttttc cttttt.tttttt..ttttttttttttttt..tttttt.tttttc ctttttt.tttttt..tttttcccttttt..tttttt.ttttttc cttttyyy/yyyttt..ttty...yttt..tttyyy/yyyttttc @@ -388,9 +387,9 @@ cttty...1...yttt..ty..2..yt..ttty...1...ytttc cttttyyy/yyyttt..ttty...yttt..tttyyy/yyyttttc ctttttt.tttttt..tttttcccttttt..tttttt.ttttttc cttttt.tttttt..ttttttttttttttt..tttttt.tttttc -ctttt.tttttt..ttttt.ww4ww.ttttt..tttttt.ttttc +ctttt.tttttt..ttttt.wwWww.ttttt..tttttt.ttttc cttt.tttttt..ttttt.wwG_Gww.ttttt..tttttt.tttc -cttt.ttttt..ttttt.....4.....ttttt..ttttt.tttc +cttt.ttttt..ttttt....4.4....ttttt..ttttt.tttc ctttt.ttty/ytttt....cc=cc....tttty/yttt.ttttc cttttt.ty...yttttttcc...cctttttty...yt.tttttc ctttttt./.1./.ttttcc..2..cctttt./.1./.ttttttc -- cgit v1.2.3-54-g00ecf From 285fe6789cdb221caef23e7efb6c243befe34783 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Fri, 27 Nov 2009 23:10:11 +1000 Subject: Take advantage of "hp" and "hd" tags in Tukima's Studio. This makes the strange machines in the loot vaults slightly more of a threat, though it does mean that the EXP loot is also increased slightly. --- crawl-ref/source/dat/wizlab.des | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 81ff1e1be3..3b56460e3a 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -220,11 +220,11 @@ COLOUR: = = darkgrey COLOUR: mMV = silver KMONS: 8 = ice statue col:silver spells:blink_other;blink_other;blink_other;\ blink_other;blink_other;major_healing name:strange_machine \ - name_replace name_descriptor + name_replace name_descriptor hd:13 hp:120 KITEM: 8 = book of tukima KMONS: 9 = ice statue col:silver spells:blink_other;blink_other;blink_other;\ blink_other;blink_other;major_healing name:strange_machine \ - name_replace name_descriptor + name_replace name_descriptor hd:13 hp:120 KITEM: 9 = scroll of acquirement : local mquote = '"The machine had stood there a long time. It was several ' : .. "hundred feet long and could run on a thimbleful of earth or" -- cgit v1.2.3-54-g00ecf From e845ff9fa55bb9028a92b4558bb0ceb2f1cbf215 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Sat, 28 Nov 2009 08:59:46 +1000 Subject: Add Doroklohe's Tomb. (dpeg) Put dpeg out of his misery! It requires a bit more customisation to work thematically with the rest of the WizLabs, and it needs a lot more colour, but it is an excellent start. --- crawl-ref/source/dat/wizlab.des | 153 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 3b56460e3a..a6e688b7a0 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -399,3 +399,156 @@ ctttttttttttttttttttyytyytttttttttttttttttttc ccccccccccccccccccccccccccccccccccccccccccccc ENDMAP + + +############################################################################### +# Doroklohe's Tomb +# Todo: +# Better loot. I was sloppy. +# Better monsters? +# I guess the starting area could be better. Traps? +# The vault is slightly spoiling prone: the spoiler player will dig immediately to +# the centre, in order to take out the nasty monsters one on one. +# Creepy messages, every 40-50 turns perhaps. +# After 300-400 turns, remove all the (intact!) boxes. This is best done by using +# box_glyph(..., '!') +# in all places except for the broken boxes. Then give the ! their marker. +# Dorokhloe's home. Seems as if he practised box casting. Wonder what that's good for. +# Vault by dpeg. Thanks to Enne for box_glyph and to due for triggers. +# +# A bleach sun settles in the smog-stained sky +# Dismembered bodies stray in disarray +# Breakfast is served in the Manchester Morgue +# The beginning of a horrifying day +# Impetigo 1992 +NAME: wizlab_doroklohe +ORIENT: encompass +TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +{{ + function make_box(cenx, ceny, gly) + for ox = -1, 1 do + for oy = -1, 1 do + local x = cenx + ox + local y = ceny + oy + if (x >= 1 and y >= 1 and x <= width() and y <= height()) then + if (ox ~= 0 or oy ~= 0) then + mapgrd[x][y] = gly; + end + end + end + end + end +-- + function box_glyph(findgly, boxgly) + local glyphs = {gly_points(findgly)} + for i = 1, #glyphs, 2 do + -- This is ugly. gly_points should return 1-indexed coordinates. + make_box(glyphs[i] + 1, glyphs[i+1] + 1, boxgly) + end + end +}} +# There are two layouts: round and grid. +# Round has 19 boxes: 12 + and 6 " and 1 * +# Grid has 21 boxes: b-u and * +# Layout for grid can be regular or random. +# +: local layout = crawl.random2(13) +: if layout < 3 then +# Preparation for the rare regular grid layout. +SUBST: b=., c=., d=., e=., f=., g=., h=., i=., j=., k=. +SUBST: l=., m=., n=., o=., p=., q=., r=., s=., t=., u=. +SUBST: B=b, C=c, D=d, E=e, F=f, G=g, H=h, I=i, J=j, K=k +SUBST: L=l, M=m, N=n, O=o, P=p, Q=q, R=r, S=s, T=t, U=u +: end +: if layout > 9 then +# First the round layout... +SUBST: _ = x +SUBST: b=., c=., d=., e=., f=., g=., h=., i=., j=., k=. +SUBST: l=., m=., n=., o=., p=., q=., r=., s=., t=., u=. +SUBST: B=., C=., D=., E=., F=., G=., H=., I=., J=., K=. +SUBST: L=., M=., N=., O=., P=., Q=., R=., S=., T=., U=. +: else +# ...and now the grid layout. +SUBST: _ = . +SUBST: "=., +=. +SUBST: B=b, C=c, D=d, E=e, F=f, G=g, H=h, I=i, J=j, K=k +SUBST: L=l, M=m, N=n, O=o, P=p, Q=q, R=r, S=s, T=t, U=u +NSUBST: b = 1:b / *:. +NSUBST: c = 1:c / *:. +NSUBST: d = 1:d / *:. +NSUBST: e = 1:e / *:. +NSUBST: f = 1:f / *:. +NSUBST: g = 1:g / *:. +NSUBST: h = 1:h / *:. +NSUBST: i = 1:i / *:. +NSUBST: j = 1:j / *:. +NSUBST: k = 1:k / *:. +NSUBST: l = 1:l / *:. +NSUBST: m = 1:m / *:. +NSUBST: n = 1:n / *:. +NSUBST: o = 1:o / *:. +NSUBST: p = 1:p / *:. +NSUBST: q = 1:q / *:. +NSUBST: r = 1:r / *:. +NSUBST: s = 1:s / *:. +NSUBST: t = 1:t / *:. +NSUBST: u = 1:u / *:. +# Of the outer boxes, three are damaged. +SHUFFLE: bcdefghijklm +: box_glyph('b', 'X') +: box_glyph('c', 'Y') +: box_glyph('d', 'Z') +SUBST: b = . +SUBST: c = . +SUBST: d = . +NSUBST: X = 1=. / *=x:20 .:1 +NSUBST: Y = 1=. / *=x:30 .:1 +NSUBST: Z = 1=. / *=x:50 .:1 +# +# For the other boxes, prepare same setup as for the round layout. +SHUFFLE: nqru +SUBST: e=+, f=+, g=+, h=+, j=+, k=+, l=+, m=+, n=+, q=+ +SUBST: o=", p=", r=", s=", t=", u=" +: end +# +# Monsters and loot. +: box_glyph('+', 'x') +KITEM: + = any scroll / any scroll q:2 w:5 / any scroll q:3 w:1 / nothing w:8 +KMONS: + = place:D:20 zombie / guardian mummy +: box_glyph('"', 'x') +KITEM: " = any +KMONS: " = balrug / cacodemon / greater mummy / lich +: box_glyph('*', 'x') +KITEM: * = any good_item book, any good_item scroll q:2 +KMONS: * = executioner / ancient lich +: wizlab_setup(_G, "Doroklohe's Forbidden Tomb") +# Intentionally colouring the floor glyphs of the central room only. +# The squares beneath the boxes and outside of the room to be uncoloured. +COLOUR: . : darkgrey / lightgrey w:3 / yellow w:1 +MAP +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +x________________...........________________x +x____________...................____________x +x_________........................._________x +x_______b....cc......d+d......ee....f_______x +x_____bB.....cC+.....dDd.....+Ee.....Ff_____x +x____bb...............................ff____x +x___.....................................___x +x__........+......o"....."p......+........__x +x__.......nnN....oO.......Pp....Qqq.......__x +x_........................................._x +x_...mm...............................gg..._x +x_...mM..+......".....*....."......+..Gg..._x +x_...mm...............................gg..._x +x_........................................._x +x__.......uuU....tT.......Ss....Rrr.......__x +x__........+......t"....."s......+........__x +x___.....................................___x +x____ll...............................hh____x +x_____lL.....kK+.....jjj.....+Ii.....Hh_____x +x_______l....kk......j+j......ii....h_______x +x_________........................._________x +x____________...................____________x +x________________...<.A.....________________x +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +ENDMAP -- cgit v1.2.3-54-g00ecf From 584fc18bb7c6b7c76ef94cbea07dc9e939ff44b3 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Sat, 28 Nov 2009 17:42:07 +1000 Subject: Added new possible WizLabs. Wucad Mu's Monastery, Botono's Bayou, Ukta's Hut and The Alchemist's Tower, all themed after the relevant unrand (Bear Spirit hat for Ukta). --- crawl-ref/source/dat/wizlab.des | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index a6e688b7a0..ab8041d56b 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -4,6 +4,8 @@ # # PLANNING AREA: # +# From spells: +# # Alistair's Brewery: mutated wizards, mephitic cloud generators, # cupboards full of potions, confused monsters. # Borgnjor's Mortuary: liches, miasma clouds, potions of decay, slaves that are @@ -32,10 +34,23 @@ # Doroklohe's Tomb: lots of small tombs with loot and monsters inside. # Tukima's Studio: dancing weapons, dancing weapon machine, tukima's book and a # scroll of acquirement, statue guards, mirrors. +# +# From unrands: +# # Cekugob's Oubliette: a randomised maze (though not a labyrinth) with skeletal # guards, and with occasionally hidden. Cekugob's amulet as the loot, # possibly. # Zonguldrok's Mausoleum: regenerating zombie monsters, sword as the loot. +# Wucad Mu's Monastery: a sprawling complex of rooms, set to appear something a +# Wu Xia kung fu monastery; unarmed human threats, everything appears to be +# "dark"; some humans may wield quarterstaves. Wucad Mu as loot! Orange +# crystal statues. +# Botono's Bayou: A bay-like area with small huts, dark coloured wizards that +# cast negative-related spells, black draconians, rebranded swamp worms. +# Ukta's Hut: phantoms, other "ghosts", ogre mages and ogres, druidic style, +# wooden walls set in a forest (more "earthy" than Erinya's Garden) +# The Alchemist's Tower: gold turned into things, things turned into gold. +# # Random named Wizard portals. # # TO-DO: -- cgit v1.2.3-54-g00ecf From e5fd9990b9bf1d2069d16288437b45e18e1ae4a3 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Sat, 28 Nov 2009 17:59:14 +1000 Subject: Remove Robe of Clouds' equip message. This function would appear to only work for melee items and not for body armours. It was flavour anyway. --- crawl-ref/source/art-func.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/crawl-ref/source/art-func.h b/crawl-ref/source/art-func.h index 0ab242d932..719faf7e58 100644 --- a/crawl-ref/source/art-func.h +++ b/crawl-ref/source/art-func.h @@ -529,9 +529,3 @@ static void _RCLOUDS_world_reacts(item_def *item) place_cloud( cloud, *ri, random2(10), KC_OTHER, 1); } } - -static void _RCLOUDS_equip(item_def *item, bool *show_msgs, bool unmeld) -{ - _equip_mpr(show_msgs, "A thin mist springs up around you!"); -} - -- cgit v1.2.3-54-g00ecf From b4640f22973fd83ebcf91eaed7592d659da78bdf Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Sat, 28 Nov 2009 20:05:40 +1000 Subject: Update dpeg's Doroklohe map. It now has colour, though it still requires an entrance hall. The monsters need to be more solidly balanced (it varies between 10k EXP and 30k EXP). I am quite happy with the colour, now. The boxes also fall away after a certain number of turns (can be increased it not enough). Coming along nicely! --- crawl-ref/source/dat/wizlab.des | 124 ++++++++++++++++++++++++++++------------ 1 file changed, 87 insertions(+), 37 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index ab8041d56b..816c6fcd8b 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -414,8 +414,6 @@ ctttttttttttttttttttyytyytttttttttttttttttttc ccccccccccccccccccccccccccccccccccccccccccccc ENDMAP - - ############################################################################### # Doroklohe's Tomb # Todo: @@ -439,6 +437,8 @@ ENDMAP NAME: wizlab_doroklohe ORIENT: encompass TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +LROCKCOL: yellow +KFEAT: ! = x {{ function make_box(cenx, ceny, gly) for ox = -1, 1 do @@ -477,7 +477,8 @@ SUBST: L=l, M=m, N=n, O=o, P=p, Q=q, R=r, S=s, T=t, U=u : end : if layout > 9 then # First the round layout... -SUBST: _ = x +COLOUR: _ = darkgrey +KFEAT: _ = stone_wall SUBST: b=., c=., d=., e=., f=., g=., h=., i=., j=., k=. SUBST: l=., m=., n=., o=., p=., q=., r=., s=., t=., u=. SUBST: B=., C=., D=., E=., F=., G=., H=., I=., J=., K=. @@ -516,54 +517,103 @@ SHUFFLE: bcdefghijklm SUBST: b = . SUBST: c = . SUBST: d = . -NSUBST: X = 1=. / *=x:20 .:1 -NSUBST: Y = 1=. / *=x:30 .:1 -NSUBST: Z = 1=. / *=x:50 .:1 -# +NSUBST: X = 1=. / *=!:20 .:1 +NSUBST: Y = 1=. / *=!:30 .:1 +NSUBST: Z = 1=. / *=!:50 .:1 # For the other boxes, prepare same setup as for the round layout. SHUFFLE: nqru SUBST: e=+, f=+, g=+, h=+, j=+, k=+, l=+, m=+, n=+, q=+ SUBST: o=", p=", r=", s=", t=", u=" : end -# # Monsters and loot. -: box_glyph('+', 'x') +: box_glyph('+', '!') KITEM: + = any scroll / any scroll q:2 w:5 / any scroll q:3 w:1 / nothing w:8 KMONS: + = place:D:20 zombie / guardian mummy -: box_glyph('"', 'x') +: box_glyph('"', '!') KITEM: " = any KMONS: " = balrug / cacodemon / greater mummy / lich -: box_glyph('*', 'x') +: box_glyph('*', '!') KITEM: * = any good_item book, any good_item scroll q:2 KMONS: * = executioner / ancient lich : wizlab_setup(_G, "Doroklohe's Forbidden Tomb") # Intentionally colouring the floor glyphs of the central room only. # The squares beneath the boxes and outside of the room to be uncoloured. -COLOUR: . : darkgrey / lightgrey w:3 / yellow w:1 +COLOUR: )^ = darkgrey +KFEAT: )^ = stone_wall +COLOUR: . = darkgrey / blue w:3 / yellow w:1 +MARKER: ! = lua:portal_desc {wall_drop=1} +{{ + +function convert_boxes (data, triggerable, triggerer, marker, ev) + if triggerer.type ~= "turn" or triggerer.sub_type ~= "countdown" then + return + end + + if data.phase == 1 then + data.phase = data.phase + 1 + if you.silenced() then + crawl.mpr("The ground shakes.", "warning") + else + crawl.mpr("There is a faint hissing noise.", "warning") + end + return + elseif data.phase == 2 then + data.phase = data.phase + 1 + if you.silenced() then + crawl.mpr("The ground shakes.", "warning") + else + crawl.mpr("There is a loud grinding noise.", "warning") + end + return + elseif data.phase == 3 then + data.phase = data.phase + 1 + if you.silenced() then + crawl.mpr("The ground shakes.", "warning") + else + crawl.mpr("You hear a far off scream of machinery.", "warning") + end + crawl.mpr("The walls fall away!", "warning") + for _, i in ipairs(dgn.find_marker_positions_by_prop("wall_drop", 1)) do + dgn.terrain_changed(i.x, i.y, "floor", false, false, false) + dgn.place_cloud(i.x, i.y, "black smoke", 2) + end + return + else + return + end +end + +local box_marker = TriggerableFunction:new { func = convert_boxes, repeated = true, data = {phase=1} } + +box_marker:add_triggerer(DgnTriggerer:new { type="turn", delay_min=500, delay_max=1000}) + +lua_marker(")", box_marker) +}} MAP -xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -x________________...........________________x -x____________...................____________x -x_________........................._________x -x_______b....cc......d+d......ee....f_______x -x_____bB.....cC+.....dDd.....+Ee.....Ff_____x -x____bb...............................ff____x -x___.....................................___x -x__........+......o"....."p......+........__x -x__.......nnN....oO.......Pp....Qqq.......__x -x_........................................._x -x_...mm...............................gg..._x -x_...mM..+......".....*....."......+..Gg..._x -x_...mm...............................gg..._x -x_........................................._x -x__.......uuU....tT.......Ss....Rrr.......__x -x__........+......t"....."s......+........__x -x___.....................................___x -x____ll...............................hh____x -x_____lL.....kK+.....jjj.....+Ii.....Hh_____x -x_______l....kk......j+j......ii....h_______x -x_________........................._________x -x____________...................____________x -x________________...<.A.....________________x -xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +^________________...........________________^ +^____________...................____________^ +^_________........................._________^ +^_______b....cc......d+d......ee....f_______^ +^_____bB.....cC+.....dDd.....+Ee.....Ff_____^ +^____bb...............................ff____^ +^___.....................................___^ +^__........+......o"....."p......+........__^ +^__.......nnN....oO.......Pp....Qqq.......__^ +^_........................................._^ +^_...mm...............................gg..._^ +^_...mM..+......".....*....."......+..Gg..._^ +^_...mm...............................gg..._^ +^_........................................._^ +^__.......uuU....tT.......Ss....Rrr.......__^ +^__........+......t"....."s......+........__^ +^___.....................................___^ +^____ll...............................hh____^ +^_____lL.....kK+.....jjj.....+Ii.....Hh_____^ +^_______l....kk......j+j......ii....h_______^ +^_________........................._________^ +^____________...................____________^ +^________________...<.A.....________________^ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ) ENDMAP -- cgit v1.2.3-54-g00ecf From d7694dcce0f20a79daee12add342f4e353cdd1da Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Sun, 29 Nov 2009 13:57:29 +1000 Subject: Give the Doroklohe vault an entry chamber, tweak colours slightly. --- crawl-ref/source/dat/wizlab.des | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 816c6fcd8b..96b613459a 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -538,10 +538,12 @@ KMONS: * = executioner / ancient lich : wizlab_setup(_G, "Doroklohe's Forbidden Tomb") # Intentionally colouring the floor glyphs of the central room only. # The squares beneath the boxes and outside of the room to be uncoloured. -COLOUR: )^ = darkgrey -KFEAT: )^ = stone_wall -COLOUR: . = darkgrey / blue w:3 / yellow w:1 +COLOUR: ^ = darkgrey +COLOUR: = = yellow +KFEAT: ^ = stone_wall +COLOUR: . = darkgrey / blue w:3 / cyan w:1 MARKER: ! = lua:portal_desc {wall_drop=1} +MARKER: = = lua:portal_desc {wall_drop=1} {{ function convert_boxes (data, triggerable, triggerer, marker, ev) @@ -587,7 +589,7 @@ local box_marker = TriggerableFunction:new { func = convert_boxes, repeated = tr box_marker:add_triggerer(DgnTriggerer:new { type="turn", delay_min=500, delay_max=1000}) -lua_marker(")", box_marker) +lua_marker("A", box_marker) }} MAP ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -613,7 +615,14 @@ MAP ^_______l....kk......j+j......ii....h_______^ ^_________........................._________^ ^____________...................____________^ -^________________...<.A.....________________^ -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - ) +^________________...........________________^ +^^^^^^^^^^^^^^^^^^^^^^.^^^^^^^^^^^^^^^^^^^^^^ + ^____...____^ + ^__.......__^ + ^_...!=!..._^ + ^_.<.=A=.<._^ + ^_...!=!..._^ + ^__.......__^ + ^____...____^ + ^^^^^^^^^^^^^ ENDMAP -- cgit v1.2.3-54-g00ecf From c6f75d72f4d5d25dddd7f1e9116c40f4224fc3c6 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Sun, 29 Nov 2009 18:18:27 +1000 Subject: Resolve Tukima secret door issue (dpeg). Hopefully this at least gives an indication of there being a secret treasure room. It doesn't actually tell you where to look, but it's a hint. --- crawl-ref/source/dat/wizlab.des | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 96b613459a..9956a14eae 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -285,7 +285,7 @@ MAP ccm.mcccLcccm.mcccRcccm.mcc ccm...mLLcccm...mcccRRm...mcc ccm..$..mcccm..?..mcccm..$..mcc - cm..$8$..mcm...M...mcm..$9$..mc + cm..$8$..m+m...M...m+m..$9$..mc ccm..$..mcccm.....mcccm..$..mcc ccm...mcc ccm...mcc ccm...mcc ccmmmcc ccmmmcc ccmmmcc -- cgit v1.2.3-54-g00ecf From 26131411a69d769cb581f8a8002559a2dd04894d Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Sun, 29 Nov 2009 19:26:44 +1000 Subject: Commit some changes to the Doroklohe vault for dpeg. As an aside, we need a document explaining how to set up for pushing and pulling new branches, as it is usually unclear when you start new ones. Unless this information is already in Darshan's email... --- crawl-ref/source/dat/wizlab.des | 143 +++++++++++++++++++++++++--------------- 1 file changed, 91 insertions(+), 52 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 9956a14eae..03675c1ff1 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -2,6 +2,30 @@ # # "Wizard"-themed portals. # +# Tukima's Studio +# threat: 6 dancing weapons, dancing weapon machine generating up to 5 more +# loot: the weapons, tukima's book and a scroll of acquirement +# xp: ??? +# layout: mirrors; grey and white +# +# Erinya's Formal Garden +# crumbling stone walls. +# threat: centaurs, oklobs +# loot: +# xp: +# layout: formal (French) garden, flowers, crumbling stone walls +# +# Doroklohe's Tomb +# threat: either Tomb set or demons or golems +# loot: either scrolls or armours or random items +# xp: +# layout: lots of tombs with loot and monsters inside +# colour: yellow tombs, rest is dark, floor is randomised +# +### + +## +# # PLANNING AREA: # # From spells: @@ -12,8 +36,6 @@ # having their life forces drained, vampire (knights, mages). # Cigotuvi's Chambers: "laboratory-esque", mutagenic fog machines, pulsating # lumps and shining eyes in cages, ugly things in cages, degeneration. -# Erinya's Formal Garden: trees, centaurs, fountains, flowers, oklobs, and -# crumbling stone walls. # Iskenderun's Mystic Tower: purple draconians, purple wizards with mystic # blast, naga mages with mystic blast, purple fog and smoke outside windows, # robes and cloaks of magic resistance as the loot. @@ -31,9 +53,6 @@ # potions of poison and potions dropped converting into potions of poison. # Ozocubu's Refrigerator: simulacra, refrigeration effect, a solid stone room # inside of an "ice cave", freezing clouds. -# Doroklohe's Tomb: lots of small tombs with loot and monsters inside. -# Tukima's Studio: dancing weapons, dancing weapon machine, tukima's book and a -# scroll of acquirement, statue guards, mirrors. # # From unrands: # @@ -55,11 +74,9 @@ # # TO-DO: # -# We've currently got working vaults for Tukima and Erinya, and dpeg has a -# working vault for Doroklohe (needs to be added to this file and -# portal-vaultified). The flavour messages for the portal vault require flavour, -# while the actual portals themselves could do with an overhaul and some new -# ones. +# We've currently got working vaults for Tukima and Erinya and Doroklohe. +# The flavour messages for the portal vault require flavour, while the actual +# portals themselves could do with an overhaul and some new ones. # ## @@ -332,8 +349,8 @@ function grow (data, triggerable, triggerer, marker, ev) and crawl.one_chance_in(3) then -- Do nothing. dgn.create_item(spot.x, spot.y, "pear / apple / choko / apricot / orange" - .. "/ banana / strawberry q:10 / lemon / rambutan " - .. "/ grape q:10 / sultana q:10 / lychee") + .. "/ banana / strawberry q:4 / lemon / rambutan " + .. "/ grape q:7 / sultana q:9 / lychee") count = count + 1 end end @@ -416,18 +433,9 @@ ENDMAP ############################################################################### # Doroklohe's Tomb -# Todo: -# Better loot. I was sloppy. -# Better monsters? -# I guess the starting area could be better. Traps? -# The vault is slightly spoiling prone: the spoiler player will dig immediately to -# the centre, in order to take out the nasty monsters one on one. -# Creepy messages, every 40-50 turns perhaps. -# After 300-400 turns, remove all the (intact!) boxes. This is best done by using -# box_glyph(..., '!') -# in all places except for the broken boxes. Then give the ! their marker. -# Dorokhloe's home. Seems as if he practised box casting. Wonder what that's good for. -# Vault by dpeg. Thanks to Enne for box_glyph and to due for triggers. +# +# It seems as if he practised box casting. I wonder what that's good for. +# Vault by dpeg. Thanks to Enne for box_glyph and to Jude for triggers. # # A bleach sun settles in the smog-stained sky # Dismembered bodies stray in disarray @@ -463,8 +471,8 @@ KFEAT: ! = x end }} # There are two layouts: round and grid. -# Round has 19 boxes: 12 + and 6 " and 1 * -# Grid has 21 boxes: b-u and * +# Round has 19 boxes: 12 % and 6 * and 1 | +# Grid has 21 boxes: b-u and | # Layout for grid can be regular or random. # : local layout = crawl.random2(13) @@ -486,7 +494,7 @@ SUBST: L=., M=., N=., O=., P=., Q=., R=., S=., T=., U=. : else # ...and now the grid layout. SUBST: _ = . -SUBST: "=., +=. +SUBST: *=., %=. SUBST: B=b, C=c, D=d, E=e, F=f, G=g, H=h, I=i, J=j, K=k SUBST: L=l, M=m, N=n, O=o, P=p, Q=q, R=r, S=s, T=t, U=u NSUBST: b = 1:b / *:. @@ -520,21 +528,56 @@ SUBST: d = . NSUBST: X = 1=. / *=!:20 .:1 NSUBST: Y = 1=. / *=!:30 .:1 NSUBST: Z = 1=. / *=!:50 .:1 -# For the other boxes, prepare same setup as for the round layout. +# For the other boxes, prepare same setup as for the round layout (i.e. six *'s) SHUFFLE: nqru -SUBST: e=+, f=+, g=+, h=+, j=+, k=+, l=+, m=+, n=+, q=+ -SUBST: o=", p=", r=", s=", t=", u=" +SUBST: e=%, f=%, g=%, h=%, i=%, j=%, k=%, l=%, m=%, n=% +SUBST: o=*, p=*, q=%, r=*, s=*, t=*, u=* : end -# Monsters and loot. -: box_glyph('+', '!') -KITEM: + = any scroll / any scroll q:2 w:5 / any scroll q:3 w:1 / nothing w:8 -KMONS: + = place:D:20 zombie / guardian mummy -: box_glyph('"', '!') -KITEM: " = any -KMONS: " = balrug / cacodemon / greater mummy / lich +# +# Monsters +# 0 Tomb set: zombies, mummies +# 1 Demons (if demons are added or reclassified, please change this set!) +# 2 Golems +# 3 Holy set (for later) +: local mrnd = crawl.random2(4) +: if mrnd == 0 then +KMONS: % = clay golem / wood golem / toenail golem w:2 +KMONS: * = stone golem / crystal golem / iron golem +KMONS: | = electric golem +: elseif mrnd == 1 then +KMONS: % = blue devil / iron devil / ynoxinul / neqoxec / hellion / chaos spawn /\ + demonic crawler / hellwing / orange demon / shadow demon / tormentor +KMONS: * = lorocyproca / reaper / soul eater / ice devil / sun demon +KMONS: | = blue death / green death / pit fiend / fiend / shadow fiend / ice fiend /\ + executioner / balrug / cacodemon +: else +KMONS: % = place:D:15 zombie / guardian mummy w:2 +KMONS: * = place:D:27 zombie / greater mummy w:5 +KMONS: | = ancient lich +: end +# +# Loot. +# 0 = scrolls. 1 = armours. 2 = mixed. +: local lrnd = crawl.random2(3) +: if lrnd == 0 then +KITEM: % = any scroll / any scroll q:2 w:3 / any scroll q:3 w:1 +: kitem("* = " .. dgn.good_scrolls) +KITEM: | = scroll of acquirement / scroll of enchant weapon III q:2 /\ + scroll of blinking q:2, scroll of fog q:2, scroll of holy word q:2 +: elseif lrnd == 1 then +KITEM: % = any armour +KITEM: * = any good_item armour +KITEM: | = cursed robe ego:resistance / cursed gold dragon armour +: else +KITEM: % = any / star_item w:2 +KITEM: * = star_item / superb_item w:2 +KITEM: | = superb_item +: end +# +# Boxification: +: box_glyph('%', '!') : box_glyph('*', '!') -KITEM: * = any good_item book, any good_item scroll q:2 -KMONS: * = executioner / ancient lich +: box_glyph('|', '!') : wizlab_setup(_G, "Doroklohe's Forbidden Tomb") # Intentionally colouring the floor glyphs of the central room only. # The squares beneath the boxes and outside of the room to be uncoloured. @@ -569,12 +612,7 @@ function convert_boxes (data, triggerable, triggerer, marker, ev) return elseif data.phase == 3 then data.phase = data.phase + 1 - if you.silenced() then - crawl.mpr("The ground shakes.", "warning") - else - crawl.mpr("You hear a far off scream of machinery.", "warning") - end - crawl.mpr("The walls fall away!", "warning") + crawl.mpr("The walls fall away. The entombed are set free!", "warning") for _, i in ipairs(dgn.find_marker_positions_by_prop("wall_drop", 1)) do dgn.terrain_changed(i.x, i.y, "floor", false, false, false) dgn.place_cloud(i.x, i.y, "black smoke", 2) @@ -596,23 +634,23 @@ MAP ^________________...........________________^ ^____________...................____________^ ^_________........................._________^ -^_______b....cc......d+d......ee....f_______^ -^_____bB.....cC+.....dDd.....+Ee.....Ff_____^ +^_______b....cc......d%d......ee....f_______^ +^_____bB.....cC%.....dDd.....%Ee.....Ff_____^ ^____bb...............................ff____^ ^___.....................................___^ -^__........+......o"....."p......+........__^ +^__........%......o*.....*p......%........__^ ^__.......nnN....oO.......Pp....Qqq.......__^ ^_........................................._^ ^_...mm...............................gg..._^ -^_...mM..+......".....*....."......+..Gg..._^ +^_...mM..%......*.....|.....*......%..Gg..._^ ^_...mm...............................gg..._^ ^_........................................._^ ^__.......uuU....tT.......Ss....Rrr.......__^ -^__........+......t"....."s......+........__^ +^__........%......t*.....*s......%........__^ ^___.....................................___^ ^____ll...............................hh____^ -^_____lL.....kK+.....jjj.....+Ii.....Hh_____^ -^_______l....kk......j+j......ii....h_______^ +^_____lL.....kK%.....jJj.....%Ii.....Hh_____^ +^_______l....kk......j%j......ii....h_______^ ^_________........................._________^ ^____________...................____________^ ^________________...........________________^ @@ -626,3 +664,4 @@ MAP ^____...____^ ^^^^^^^^^^^^^ ENDMAP + -- cgit v1.2.3-54-g00ecf From c2c52e296b87254243881ee260ee09fdc9047345 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Mon, 30 Nov 2009 09:39:55 +1000 Subject: A quick bit of cleanup with the Doroklohe vault. --- crawl-ref/source/dat/wizlab.des | 298 +++++++++++++++++++++------------------- 1 file changed, 157 insertions(+), 141 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 03675c1ff1..0acfc94a00 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -5,20 +5,20 @@ # Tukima's Studio # threat: 6 dancing weapons, dancing weapon machine generating up to 5 more # loot: the weapons, tukima's book and a scroll of acquirement -# xp: ??? +# xp: 14400 or so # layout: mirrors; grey and white # # Erinya's Formal Garden # crumbling stone walls. # threat: centaurs, oklobs -# loot: -# xp: +# loot: a staff and four spellbooks +# xp: 10500 or so # layout: formal (French) garden, flowers, crumbling stone walls # # Doroklohe's Tomb # threat: either Tomb set or demons or golems # loot: either scrolls or armours or random items -# xp: +# xp: 10000+ # layout: lots of tombs with loot and monsters inside # colour: yellow tombs, rest is dark, floor is randomised # @@ -64,8 +64,8 @@ # Wu Xia kung fu monastery; unarmed human threats, everything appears to be # "dark"; some humans may wield quarterstaves. Wucad Mu as loot! Orange # crystal statues. -# Botono's Bayou: A bay-like area with small huts, dark coloured wizards that -# cast negative-related spells, black draconians, rebranded swamp worms. +# Botono's Bayou: A bay-like area with small huts, wizards that cast negative +# related spells, shadow dragons, rebranded swamp worms, wraiths, spectrals. # Ukta's Hut: phantoms, other "ghosts", ogre mages and ogres, druidic style, # wooden walls set in a forest (more "earthy" than Erinya's Garden) # The Alchemist's Tower: gold turned into things, things turned into gold. @@ -164,7 +164,7 @@ default-depth: ############################################################################### # And arrivals! ############################################################################### -# Firstly, we have Tukima's Studio. +# Firstly, we have Tukima's Dance Studio. # # Todo: clean up the code NAME: wizlab_tukima @@ -310,7 +310,7 @@ MAP ENDMAP ############################################################################### -# Erinya's Garden +# Erinya's Formal Garden # # Map was based on this image: http://upload.wikimedia.org/wikipedia/commons/5 # /58/Plan_du_ch%C3%A2teau_et_des_jardins_de_Clagny_dessin%C3%A9_par_ @@ -407,7 +407,7 @@ cttttttt..111.........T.........111..tttttttc ctttttt...121.tttttc.....cttttt.121...ttttttc cttttt.tty...yttttttcc=cctttttty...ytt.tttttc ctttt.tttty.yttttttt.....ttttttty.ytttt.ttttc -cttt.tttttt.ttttttty.232.yttttttt.tttttt.tttc +cttt.tttttt.tttttttyd232eyttttttt.tttttt.tttc cttt.tttttt..tttttttydefyttttttt..tttttt.tttc ctttt.tttttt..tttttttytyttttttt..tttttt.ttttc cttttt.tttttt..ttttttttttttttt..tttttt.tttttc @@ -432,7 +432,7 @@ ccccccccccccccccccccccccccccccccccccccccccccc ENDMAP ############################################################################### -# Doroklohe's Tomb +# Doroklohe's Forbidden Tomb # # It seems as if he practised box casting. I wonder what that's good for. # Vault by dpeg. Thanks to Enne for box_glyph and to Jude for triggers. @@ -448,139 +448,137 @@ TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup LROCKCOL: yellow KFEAT: ! = x {{ - function make_box(cenx, ceny, gly) - for ox = -1, 1 do - for oy = -1, 1 do - local x = cenx + ox - local y = ceny + oy - if (x >= 1 and y >= 1 and x <= width() and y <= height()) then - if (ox ~= 0 or oy ~= 0) then - mapgrd[x][y] = gly; - end - end - end - end - end --- - function box_glyph(findgly, boxgly) - local glyphs = {gly_points(findgly)} - for i = 1, #glyphs, 2 do - -- This is ugly. gly_points should return 1-indexed coordinates. - make_box(glyphs[i] + 1, glyphs[i+1] + 1, boxgly) +function make_box(cenx, ceny, gly) + for ox = -1, 1 do + for oy = -1, 1 do + local x = cenx + ox + local y = ceny + oy + if (x >= 1 and y >= 1 and x <= width() and y <= height()) then + if (ox ~= 0 or oy ~= 0) then + mapgrd[x][y] = gly; end + end end + end +end + +function box_glyph(findgly, boxgly) + local glyphs = {gly_points(findgly)} + for i = 1, #glyphs, 2 do + -- This is ugly. gly_points should return 1-indexed coordinates. + make_box(glyphs[i] + 1, glyphs[i+1] + 1, boxgly) + end +end }} -# There are two layouts: round and grid. -# Round has 19 boxes: 12 % and 6 * and 1 | -# Grid has 21 boxes: b-u and | -# Layout for grid can be regular or random. -# -: local layout = crawl.random2(13) -: if layout < 3 then -# Preparation for the rare regular grid layout. -SUBST: b=., c=., d=., e=., f=., g=., h=., i=., j=., k=. -SUBST: l=., m=., n=., o=., p=., q=., r=., s=., t=., u=. -SUBST: B=b, C=c, D=d, E=e, F=f, G=g, H=h, I=i, J=j, K=k -SUBST: L=l, M=m, N=n, O=o, P=p, Q=q, R=r, S=s, T=t, U=u -: end -: if layout > 9 then -# First the round layout... -COLOUR: _ = darkgrey -KFEAT: _ = stone_wall -SUBST: b=., c=., d=., e=., f=., g=., h=., i=., j=., k=. -SUBST: l=., m=., n=., o=., p=., q=., r=., s=., t=., u=. -SUBST: B=., C=., D=., E=., F=., G=., H=., I=., J=., K=. -SUBST: L=., M=., N=., O=., P=., Q=., R=., S=., T=., U=. -: else -# ...and now the grid layout. -SUBST: _ = . -SUBST: *=., %=. -SUBST: B=b, C=c, D=d, E=e, F=f, G=g, H=h, I=i, J=j, K=k -SUBST: L=l, M=m, N=n, O=o, P=p, Q=q, R=r, S=s, T=t, U=u -NSUBST: b = 1:b / *:. -NSUBST: c = 1:c / *:. -NSUBST: d = 1:d / *:. -NSUBST: e = 1:e / *:. -NSUBST: f = 1:f / *:. -NSUBST: g = 1:g / *:. -NSUBST: h = 1:h / *:. -NSUBST: i = 1:i / *:. -NSUBST: j = 1:j / *:. -NSUBST: k = 1:k / *:. -NSUBST: l = 1:l / *:. -NSUBST: m = 1:m / *:. -NSUBST: n = 1:n / *:. -NSUBST: o = 1:o / *:. -NSUBST: p = 1:p / *:. -NSUBST: q = 1:q / *:. -NSUBST: r = 1:r / *:. -NSUBST: s = 1:s / *:. -NSUBST: t = 1:t / *:. -NSUBST: u = 1:u / *:. -# Of the outer boxes, three are damaged. -SHUFFLE: bcdefghijklm -: box_glyph('b', 'X') -: box_glyph('c', 'Y') -: box_glyph('d', 'Z') -SUBST: b = . -SUBST: c = . -SUBST: d = . -NSUBST: X = 1=. / *=!:20 .:1 -NSUBST: Y = 1=. / *=!:30 .:1 -NSUBST: Z = 1=. / *=!:50 .:1 -# For the other boxes, prepare same setup as for the round layout (i.e. six *'s) -SHUFFLE: nqru -SUBST: e=%, f=%, g=%, h=%, i=%, j=%, k=%, l=%, m=%, n=% -SUBST: o=*, p=*, q=%, r=*, s=*, t=*, u=* -: end +# There are two layouts: round and grid. +# Round has 19 boxes: 12 % and 6 * and 1 | +# Grid has 21 boxes: b-u and | +# Layout for grid can be regular or random. # -# Monsters -# 0 Tomb set: zombies, mummies -# 1 Demons (if demons are added or reclassified, please change this set!) -# 2 Golems -# 3 Holy set (for later) -: local mrnd = crawl.random2(4) -: if mrnd == 0 then -KMONS: % = clay golem / wood golem / toenail golem w:2 -KMONS: * = stone golem / crystal golem / iron golem -KMONS: | = electric golem -: elseif mrnd == 1 then -KMONS: % = blue devil / iron devil / ynoxinul / neqoxec / hellion / chaos spawn /\ - demonic crawler / hellwing / orange demon / shadow demon / tormentor -KMONS: * = lorocyproca / reaper / soul eater / ice devil / sun demon -KMONS: | = blue death / green death / pit fiend / fiend / shadow fiend / ice fiend /\ - executioner / balrug / cacodemon -: else -KMONS: % = place:D:15 zombie / guardian mummy w:2 -KMONS: * = place:D:27 zombie / greater mummy w:5 -KMONS: | = ancient lich -: end -# -# Loot. -# 0 = scrolls. 1 = armours. 2 = mixed. -: local lrnd = crawl.random2(3) -: if lrnd == 0 then -KITEM: % = any scroll / any scroll q:2 w:3 / any scroll q:3 w:1 -: kitem("* = " .. dgn.good_scrolls) -KITEM: | = scroll of acquirement / scroll of enchant weapon III q:2 /\ - scroll of blinking q:2, scroll of fog q:2, scroll of holy word q:2 -: elseif lrnd == 1 then -KITEM: % = any armour -KITEM: * = any good_item armour -KITEM: | = cursed robe ego:resistance / cursed gold dragon armour -: else -KITEM: % = any / star_item w:2 -KITEM: * = star_item / superb_item w:2 -KITEM: | = superb_item -: end -# -# Boxification: -: box_glyph('%', '!') -: box_glyph('*', '!') -: box_glyph('|', '!') -: wizlab_setup(_G, "Doroklohe's Forbidden Tomb") -# Intentionally colouring the floor glyphs of the central room only. -# The squares beneath the boxes and outside of the room to be uncoloured. +: local layout = crawl.random2(13) +: if layout < 3 then +# Preparation for the rare regular grid layout. +SUBST: b=., c=., d=., e=., f=., g=., h=., i=., j=., k=. +SUBST: l=., m=., n=., o=., p=., q=., r=., s=., t=., u=. +SUBST: B=b, C=c, D=d, E=e, F=f, G=g, H=h, I=i, J=j, K=k +SUBST: L=l, M=m, N=n, O=o, P=p, Q=q, R=r, S=s, T=t, U=u +: end +: if layout > 9 then +# First the round layout... +COLOUR: _ = darkgrey +KFEAT: _ = stone_wall +SUBST: b=., c=., d=., e=., f=., g=., h=., i=., j=., k=. +SUBST: l=., m=., n=., o=., p=., q=., r=., s=., t=., u=. +SUBST: B=., C=., D=., E=., F=., G=., H=., I=., J=., K=. +SUBST: L=., M=., N=., O=., P=., Q=., R=., S=., T=., U=. +: else +# ...and now the grid layout. +SUBST: _ = . +SUBST: *=., %=. +SUBST: B=b, C=c, D=d, E=e, F=f, G=g, H=h, I=i, J=j, K=k +SUBST: L=l, M=m, N=n, O=o, P=p, Q=q, R=r, S=s, T=t, U=u +NSUBST: b = 1:b / *:. +NSUBST: c = 1:c / *:. +NSUBST: d = 1:d / *:. +NSUBST: e = 1:e / *:. +NSUBST: f = 1:f / *:. +NSUBST: g = 1:g / *:. +NSUBST: h = 1:h / *:. +NSUBST: i = 1:i / *:. +NSUBST: j = 1:j / *:. +NSUBST: k = 1:k / *:. +NSUBST: l = 1:l / *:. +NSUBST: m = 1:m / *:. +NSUBST: n = 1:n / *:. +NSUBST: o = 1:o / *:. +NSUBST: p = 1:p / *:. +NSUBST: q = 1:q / *:. +NSUBST: r = 1:r / *:. +NSUBST: s = 1:s / *:. +NSUBST: t = 1:t / *:. +NSUBST: u = 1:u / *:. +# Of the outer boxes, three are damaged. +SHUFFLE: bcdefghijklm +: box_glyph('b', 'X') +: box_glyph('c', 'Y') +: box_glyph('d', 'Z') +SUBST: b = . +SUBST: c = . +SUBST: d = . +NSUBST: X = 1=. / *=!:20 .:1 +NSUBST: Y = 1=. / *=!:30 .:1 +NSUBST: Z = 1=. / *=!:50 .:1 +# For the other boxes, prepare same setup as for the +# round layout (i.e. six *'s) +SHUFFLE: nqru +SUBST: e=%, f=%, g=%, h=%, i=%, j=%, k=%, l=%, m=%, n=% +SUBST: o=*, p=*, q=%, r=*, s=*, t=*, u=* +: end +# Monsters +# 0 Tomb set: zombies, mummies +# 1 Demons (if demons are added or reclassified, please change!) +# 2 Golems +# 3 Holy set (for later) +: local mrnd = crawl.random2(4) +: if mrnd == 0 then +KMONS: % = clay golem / wood golem / toenail golem w:2 +KMONS: * = stone golem / crystal golem / iron golem +KMONS: | = electric golem +: elseif mrnd == 1 then +KMONS: % = blue devil / iron devil / ynoxinul / neqoxec / hellion /\ + / chaos spawn / demonic crawler / hellwing / orange demon /\ + shadow demon / tormentor +KMONS: * = lorocyproca / reaper / soul eater / ice devil / sun demon +KMONS: | = blue death / green death / pit fiend / fiend / shadow fiend /\ + ice fiend / executioner / balrug / cacodemon +: else +KMONS: % = place:D:15 zombie / guardian mummy w:2 +KMONS: * = place:D:27 zombie / greater mummy w:5 +KMONS: | = ancient lich +: end +# Loot. +# 0 = scrolls. 1 = armours. 2 = mixed. +: local lrnd = crawl.random2(3) +: if lrnd == 0 then +KITEM: % = any scroll / any scroll q:2 w:3 / any scroll q:3 w:1 +: kitem("* = " .. dgn.good_scrolls) +KITEM: | = scroll of acquirement / scroll of enchant weapon III q:2 /\ + scroll of blinking q:2, scroll of fog q:2, scroll of holy word q:2 +: elseif lrnd == 1 then +KITEM: % = any armour +KITEM: * = any good_item armour +KITEM: | = cursed robe ego:resistance / cursed gold dragon armour +: else +KITEM: % = any / star_item w:2 +KITEM: * = star_item / superb_item w:2 +KITEM: | = superb_item +: end +# Boxification: +: box_glyph('%', '!') +: box_glyph('*', '!') +: box_glyph('|', '!') +# Intentionally colouring the floor glyphs of the central room only. +# The squares beneath the boxes are to remain uncoloured. COLOUR: ^ = darkgrey COLOUR: = = yellow KFEAT: ^ = stone_wall @@ -623,12 +621,21 @@ function convert_boxes (data, triggerable, triggerer, marker, ev) end end -local box_marker = TriggerableFunction:new { func = convert_boxes, repeated = true, data = {phase=1} } +local box_marker = TriggerableFunction:new {func=convert_boxes, + repeated=true, data={phase=1} } -box_marker:add_triggerer(DgnTriggerer:new { type="turn", delay_min=500, delay_max=1000}) +box_marker:add_triggerer(DgnTriggerer:new { type="turn", + delay_min=500, delay_max=1000}) lua_marker("A", box_marker) }} +: dgn.set_feature_desc_short("rock wall", "strange rock wall") +: dgn.set_feature_desc_long("rock wall", "It is decorated with " +: .. "images you might see in a tomb.") +: dgn.set_feature_desc_short("stone wall", "highly decorated stone") +: dgn.set_feature_desc_long("stone wall", "It is covered with amazing" +: .. " images and art.") +: wizlab_setup(_G, "Doroklohe's Forbidden Tomb") MAP ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^________________...........________________^ @@ -665,3 +672,12 @@ MAP ^^^^^^^^^^^^^ ENDMAP +############################################################################### +# Wucad Mu's Monastery +# +NAME: wizlab_wucad +ORIENT: encompass +TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +: wizlab_setup(_G, "Wucad Mu's Monastery") +MAP +ENDMAP -- cgit v1.2.3-54-g00ecf From 0b44e07ef4126220062ad3b978a2121d62202a18 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Mon, 30 Nov 2009 09:48:06 +1000 Subject: Fixed box_glyph being adjusted for 0-indexed. As mapgrd is now 0-indexed like everything else, it causes issues to be adjusting these value! --- crawl-ref/source/dat/wizlab.des | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 0acfc94a00..0ae91c784d 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -466,7 +466,8 @@ function box_glyph(findgly, boxgly) local glyphs = {gly_points(findgly)} for i = 1, #glyphs, 2 do -- This is ugly. gly_points should return 1-indexed coordinates. - make_box(glyphs[i] + 1, glyphs[i+1] + 1, boxgly) + -- No longer ugly, as mapgrd is 0-indexed, like gly points. + make_box(glyphs[i], glyphs[i+1], boxgly) end end }} -- cgit v1.2.3-54-g00ecf From f38cf4bbb408feb9944e7555aed3e0a4485dbe79 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Tue, 1 Dec 2009 13:24:39 +1000 Subject: Add placeholders for future Wizlabs. --- crawl-ref/source/dat/wizlab.des | 150 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 0ae91c784d..ed5f0f93f2 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -673,6 +673,126 @@ MAP ^^^^^^^^^^^^^ ENDMAP +############################################################################### +# Alistair's Brewery +# +NAME: wizlab_alistair +ORIENT: encompass +TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +: wizlab_setup(_G, "Alistair's Brewery") +MAP +ENDMAP + +############################################################################### +# Borgnjor's Mortuary +# +NAME: wizlab_alistair +ORIENT: encompass +TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +: wizlab_setup(_G, "Borgnjor's Mortuary") +MAP +ENDMAP + +############################################################################### +# Cigotuvi's Chambers +# +NAME: wizlab_cigotuvi +ORIENT: encompass +TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +: wizlab_setup(_G, "Cigotuvi's Chambers") +MAP +ENDMAP + +############################################################################### +# Iskenderun's Mystic Tower +# +NAME: wizlab_iskenderun +ORIENT: encompass +TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +: wizlab_setup(_G, "Iskenderun's Mystic Tower") +MAP +ENDMAP + +############################################################################### +# Lee's Rapid Deconstructor +# +NAME: wizlab_lee +ORIENT: encompass +TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +: wizlab_setup(_G, "Lee's Rapid Deconstructor") +MAP +ENDMAP + +############################################################################### +# Lehudib's Crystal Cave +# +NAME: wizlab_lehudib +ORIENT: encompass +TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +: wizlab_setup(_G, "Lehudib's Crystal Caave") +MAP +ENDMAP + +############################################################################### +# Maxwell's Forge +# +NAME: wizlab_maxwell +ORIENT: encompass +TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +: wizlab_setup(_G, "Maxwell's Forge") +MAP +ENDMAP + +############################################################################### +# Olgreb's Toxic Laboratory +# +NAME: wizlab_olgreb +ORIENT: encompass +TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +: wizlab_setup(_G, "Olgreb's Toxic Laboratory") +MAP +ENDMAP + +############################################################################### +# Ozocubu's Refrigerator +# +NAME: wizlab_ozocubu +ORIENT: encompass +TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +: wizlab_setup(_G, "Ozocubu's Refrigerator") +MAP +ENDMAP + +############################################################################### +# Ozocubu's Refrigerator +# +NAME: wizlab_ozocubu +ORIENT: encompass +TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +: wizlab_setup(_G, "Ozocubu's Refrigerator") +MAP +ENDMAP + +############################################################################### +# Cekugob's Oubliette +# +NAME: wizlab_cekugob +ORIENT: encompass +TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +: wizlab_setup(_G, "Cekugob's Oubliette") +MAP +ENDMAP + +############################################################################### +# Zonguldrok's Shrine +# +NAME: wizlab_zonguldrok +ORIENT: encompass +TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +: wizlab_setup(_G, "Zonguldrok's Shrine") +MAP +ENDMAP + ############################################################################### # Wucad Mu's Monastery # @@ -682,3 +802,33 @@ TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup : wizlab_setup(_G, "Wucad Mu's Monastery") MAP ENDMAP + +############################################################################### +# Boton's Bayou +# +NAME: wizlab_botono +ORIENT: encompass +TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +: wizlab_setup(_G, "Botono's Bayou") +MAP +ENDMAP + +############################################################################### +# Ukta's Hut +# +NAME: wizlab_ukta +ORIENT: encompass +TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +: wizlab_setup(_G, "Ukta's Hut") +MAP +ENDMAP + +############################################################################### +# The Alchemist's Tower +# +NAME: wizlab_alchemist +ORIENT: encompass +TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +: wizlab_setup(_G, "The Alchemist's Tower") +MAP +ENDMAP -- cgit v1.2.3-54-g00ecf From b0da6a4f48a38aaeae410ad582d82af0d2a21453 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Tue, 1 Dec 2009 13:39:47 +1000 Subject: Fix placeholder issues. --- crawl-ref/source/dat/wizlab.des | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index ed5f0f93f2..8a94f75dc0 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -686,7 +686,7 @@ ENDMAP ############################################################################### # Borgnjor's Mortuary # -NAME: wizlab_alistair +NAME: wizlab_borgnjor ORIENT: encompass TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup : wizlab_setup(_G, "Borgnjor's Mortuary") @@ -724,12 +724,12 @@ MAP ENDMAP ############################################################################### -# Lehudib's Crystal Cave +# Lehudib's Crystal Spire # NAME: wizlab_lehudib ORIENT: encompass TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup -: wizlab_setup(_G, "Lehudib's Crystal Caave") +: wizlab_setup(_G, "Lehudib's Crystal Spire") MAP ENDMAP -- cgit v1.2.3-54-g00ecf From 3d7ddfb14af9ac9dc12a601f138c6ad85a7c4e21 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Tue, 1 Dec 2009 18:25:10 +1000 Subject: Wucad Mu's Monastery: basic layout and colouring. Still not sure if I like it. --- crawl-ref/source/dat/wizlab.des | 54 +++++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 10 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 8a94f75dc0..3270a5d414 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -763,16 +763,6 @@ TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup MAP ENDMAP -############################################################################### -# Ozocubu's Refrigerator -# -NAME: wizlab_ozocubu -ORIENT: encompass -TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup -: wizlab_setup(_G, "Ozocubu's Refrigerator") -MAP -ENDMAP - ############################################################################### # Cekugob's Oubliette # @@ -799,8 +789,52 @@ ENDMAP NAME: wizlab_wucad ORIENT: encompass TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +SUBST: T = t. +MONS: human name:monk n_adj ; nothing, troll name:monk n_adj +MONS: draconian monk +KMONS: 8 = orange crystal statue name:Statue_of_Wucad_Mu n_rpl n_the +COLOUR: =c = darkgrey +COLOUR: t = lightred / red w:3 +COLOUR: A = red +COLOUR: < = lightred +LROCKCOL: darkgrey +LFLOORCOL: white : wizlab_setup(_G, "Wucad Mu's Monastery") MAP +tttttttttttttttttttttttttttttttttttttttt +tttttttttttttttttttttttttttttttttttttttt +ttttttttttttttTTTTTTTttttttttttttttttttt +ttttttTTTTTTTT.......TTTTTTTTTTTTttttttt +tttttT.........ccccc.............Ttttttt +ttttT.........cc...cc.............Tttttt +tttT.......cccc.....cccc...........Ttttt +ttT.......cc..cc...cc..cc...........Tttt +ttT......cc....cc+cc....cc...........Ttt +ttT.....Tc....G.....G....cT..........Ttt +ttT.....ccG.............Gcc..........Ttt +ttT......+.......8.......+...........Ttt +ttT.....ccG.............Gcc..........Ttt +ttT.....Tc....G.....G....cT..........Ttt +ttT.c..cTcc.............cccT.........Ttt +ttTcc++ccccccc.......ccccccc+cc......Ttt +ttcc....ccc..ccc+++ccc..ccc...cc.....Ttt +ttc......c...............c.....c....Tttt +ttc......cc.............cc.....cc..ctttt +ttc......ccccccccccccccccccc+cccc++ccttt +ttcc....=cc.............ccc...cc....cctt +tttcccccc=...............+.....+.....ctt +ttttttttccc..ccc+++ccc..ccc...cc....cctt +tttttttttcccccTT...Ttccccccccccccccccttt +ttttttttttttttT.....Tttttttttttttttttttt +tttttttttttT.........TTTTTTttttttttttttt +tttccccctttT..............Ttcccccttttttt +ttcc...cctT..............Ttcc...cctttttt +ttc..A..+..................+..<..ctttttt +ttcc...cctT.....TTTT.....Ttcc...cctttttt +tttccccctttT...TTttTT....Tttcccccttttttt +ttttttttttttTTTTttttTTTTTttttttttttttttt +tttttttttttttttttttttttttttttttttttttttt +tttttttttttttttttttttttttttttttttttttttt ENDMAP ############################################################################### -- cgit v1.2.3-54-g00ecf From 945d7c4c94debff0206ba7a0dbbee59f0acd93eb Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Tue, 1 Dec 2009 20:58:05 +1000 Subject: Further tweaks to Wucad's map. --- crawl-ref/source/dat/wizlab.des | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 3270a5d414..c0deea7d94 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -790,13 +790,17 @@ NAME: wizlab_wucad ORIENT: encompass TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup SUBST: T = t. -MONS: human name:monk n_adj ; nothing, troll name:monk n_adj -MONS: draconian monk -KMONS: 8 = orange crystal statue name:Statue_of_Wucad_Mu n_rpl n_the +MONS: human name:monk n_suf col:white hd:10 ; robe good_item \ + . quarterstaff good_item +MONS: rock troll name:monk n_suf +MONS: iron troll name:monk n_suf col:white +KMONS: 8 = orange crystal statue name:Statue_of_Wucad_Mu n_rpl n_the hd:20 hp:300 +KITEM: 8 = quarterstaff unrand:staff_of_wucad_mu, book of enchantments COLOUR: =c = darkgrey COLOUR: t = lightred / red w:3 -COLOUR: A = red +COLOUR: AG = red COLOUR: < = lightred +KFEAT: ' = open_door LROCKCOL: darkgrey LFLOORCOL: white : wizlab_setup(_G, "Wucad Mu's Monastery") @@ -807,29 +811,29 @@ ttttttttttttttTTTTTTTttttttttttttttttttt ttttttTTTTTTTT.......TTTTTTTTTTTTttttttt tttttT.........ccccc.............Ttttttt ttttT.........cc...cc.............Tttttt -tttT.......cccc.....cccc...........Ttttt -ttT.......cc..cc...cc..cc...........Tttt -ttT......cc....cc+cc....cc...........Ttt -ttT.....Tc....G.....G....cT..........Ttt -ttT.....ccG.............Gcc..........Ttt -ttT......+.......8.......+...........Ttt -ttT.....ccG.............Gcc..........Ttt +tttT.......cccc..3..cccc...........Ttttt +ttT.......cc..cc...cc..cc......ccc..Tttt +ttT......cc....cc=cc....cc....cc1cc..Ttt +ttT.....Tc....G.....G....cT..cc1U1cc.Ttt +ttT.....ccG......2......Gcc...cc1cc..Ttt +ttT......+......181......+.....c+c...Ttt +ttT.....ccG......3......Gcc..........Ttt ttT.....Tc....G.....G....cT..........Ttt ttT.c..cTcc.............cccT.........Ttt ttTcc++ccccccc.......ccccccc+cc......Ttt -ttcc....ccc..ccc+++ccc..ccc...cc.....Ttt -ttc......c...............c.....c....Tttt -ttc......cc.............cc.....cc..ctttt +ttcc....ccc32ccc===ccc23ccc...cc.....Ttt +ttc..12..c...............c..2..c....Tttt +ttc..23..cc.............cc.....cc..ctttt ttc......ccccccccccccccccccc+cccc++ccttt -ttcc....=cc.............ccc...cc....cctt -tttcccccc=...............+.....+.....ctt +ttcc....ccc.............ccc...cc....cctt +tttccccccc......212......+..2..+.22..ctt ttttttttccc..ccc+++ccc..ccc...cc....cctt tttttttttcccccTT...Ttccccccccccccccccttt ttttttttttttttT.....Tttttttttttttttttttt tttttttttttT.........TTTTTTttttttttttttt -tttccccctttT..............Ttcccccttttttt +tttccccctttT.....G........Ttcccccttttttt ttcc...cctT..............Ttcc...cctttttt -ttc..A..+..................+..<..ctttttt +ttc..A..'..................'..<..ctttttt ttcc...cctT.....TTTT.....Ttcc...cctttttt tttccccctttT...TTttTT....Tttcccccttttttt ttttttttttttTTTTttttTTTTTttttttttttttttt -- cgit v1.2.3-54-g00ecf From b006adb45bf194fdce2a83107246164ecc1050ab Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Fri, 4 Dec 2009 10:50:38 +1000 Subject: Tweak header. --- crawl-ref/source/dat/wizlab.des | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index c0deea7d94..734a14d544 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -22,6 +22,13 @@ # layout: lots of tombs with loot and monsters inside # colour: yellow tombs, rest is dark, floor is randomised # +# Wucad Mu's Monastery +# threat: "monks", OCS +# loot: books, staff of wucad mu +# xp: 9000= +# layout: temple-esque! +# colour: dark walls, red and orangge. +# ### ## @@ -60,10 +67,6 @@ # guards, and with occasionally hidden. Cekugob's amulet as the loot, # possibly. # Zonguldrok's Mausoleum: regenerating zombie monsters, sword as the loot. -# Wucad Mu's Monastery: a sprawling complex of rooms, set to appear something a -# Wu Xia kung fu monastery; unarmed human threats, everything appears to be -# "dark"; some humans may wield quarterstaves. Wucad Mu as loot! Orange -# crystal statues. # Botono's Bayou: A bay-like area with small huts, wizards that cast negative # related spells, shadow dragons, rebranded swamp worms, wraiths, spectrals. # Ukta's Hut: phantoms, other "ghosts", ogre mages and ogres, druidic style, -- cgit v1.2.3-54-g00ecf From 4775fdbf3a923fe217ee28f1fb60df77f2accd03 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Fri, 4 Dec 2009 11:02:31 +1000 Subject: Add Zaba's Alistair map. --- crawl-ref/source/dat/wizlab.des | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 734a14d544..806f213698 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -683,7 +683,43 @@ NAME: wizlab_alistair ORIENT: encompass TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup : wizlab_setup(_G, "Alistair's Brewery") +SHUFFLE: CYHB +KFEAT: CYHB = . +KPROP: B = bloody / nothing +KMONS: CYH = swamp drake name:mutated_drake n_des n_rpl col:magenta w:30 \ + spells:mephitic_cloud;mephitic_cloud;blink;mephitic_cloud;\ + mephitic_cloud;blink / wizard name:mutated name_adjective \ + col:lightmagenta w:10 / nothing w:130 +COLOUR: c = magenta, w = poison, n = blue +LFLOORCOL: white +: dgn.set_feature_desc_short("deep water", "toxic goo") +: dgn.set_feature_desc_long("deep water", "It stinks. Drinking it " +: .. "might seem to be a good idea after a bottle or two.") +ITEM: potion of confusion w:20 / any potion MAP + ccccccc + c.....c + ccccccc..A..ccccccc + cCCCCC+.....cBBBBBc + cCCCCCc..<..cBBBBBc + cCCCCCc.....cBBBBBc + cCCCCCcccncccBBBBBc + cCCCCCc.....+BBBBBc +ccccc+ccc.....ccccc+ccc +c.....c...ccc.. Date: Fri, 4 Dec 2009 11:53:13 +1000 Subject: Further Alistair tweaks. --- crawl-ref/source/dat/wizlab.des | 50 +++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 806f213698..fe754dadc9 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -679,6 +679,7 @@ ENDMAP ############################################################################### # Alistair's Brewery # +# Todo: work out what happens next??? NAME: wizlab_alistair ORIENT: encompass TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup @@ -690,36 +691,36 @@ KMONS: CYH = swamp drake name:mutated_drake n_des n_rpl col:magenta w:30 \ spells:mephitic_cloud;mephitic_cloud;blink;mephitic_cloud;\ mephitic_cloud;blink / wizard name:mutated name_adjective \ col:lightmagenta w:10 / nothing w:130 -COLOUR: c = magenta, w = poison, n = blue +COLOUR: =c = magenta, w = poison, n = blue LFLOORCOL: white : dgn.set_feature_desc_short("deep water", "toxic goo") : dgn.set_feature_desc_long("deep water", "It stinks. Drinking it " : .. "might seem to be a good idea after a bottle or two.") ITEM: potion of confusion w:20 / any potion MAP - ccccccc - c.....c - ccccccc..A..ccccccc - cCCCCC+.....cBBBBBc - cCCCCCc..<..cBBBBBc - cCCCCCc.....cBBBBBc - cCCCCCcccncccBBBBBc - cCCCCCc.....+BBBBBc -ccccc+ccc.....ccccc+ccc -c.....c...ccc.. Date: Fri, 4 Dec 2009 22:20:38 +1000 Subject: Tweak Wucad Mu much further. --- crawl-ref/source/dat/wizlab.des | 129 +++++++++++++++++++++++++++++++++------- 1 file changed, 108 insertions(+), 21 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index fe754dadc9..54ae3e87c7 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -25,7 +25,7 @@ # Wucad Mu's Monastery # threat: "monks", OCS # loot: books, staff of wucad mu -# xp: 9000= +# xp: 9000+ # layout: temple-esque! # colour: dark walls, red and orangge. # @@ -831,10 +831,6 @@ NAME: wizlab_wucad ORIENT: encompass TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup SUBST: T = t. -MONS: human name:monk n_suf col:white hd:10 ; robe good_item \ - . quarterstaff good_item -MONS: rock troll name:monk n_suf -MONS: iron troll name:monk n_suf col:white KMONS: 8 = orange crystal statue name:Statue_of_Wucad_Mu n_rpl n_the hd:20 hp:300 KITEM: 8 = quarterstaff unrand:staff_of_wucad_mu, book of enchantments COLOUR: =c = darkgrey @@ -842,8 +838,99 @@ COLOUR: t = lightred / red w:3 COLOUR: AG = red COLOUR: < = lightred KFEAT: ' = open_door +KFEAT: 1234567 = . +KMONS: 1234567 = nothing LROCKCOL: darkgrey LFLOORCOL: white +{{ +local msp = "human name:monk n_suf col:white hd:10 ; robe good_item " .. + ". quarterstaff good_item / rock troll name:monk n_suf /" .. + "iron troll name:monk n_suf col:white" + +local function msgfn (data, triggerable, triggerer, marker, ev) + if data.trig == true then + return + end + + if data.spot == 1 then + crawl.mpr("Strange, shadowy figures dance through the air in front of you.") + data.trig = true + elseif data.spot == 2 then + crawl.mpr("This room is filled with shadowy figures, quietly meditating.") + data.trig = true + elseif data.spot == 3 then + crawl.mpr("Here, spectral monks perform complicated, martial routines; they fade quickly.") + data.trig = true + elseif data.spot == 4 then + if you.silenced() then + return + end + crawl.mpr("Faint laughter comes from somewhere. Too faint to be real.") + data.trig = true + elseif data.spot == 5 then + if you.silenced() then + return + end + crawl.mpr("There is a faint scream of pain from a crouched figure. This too fades quickly.") + data.trig = true + elseif data.spot == 6 then + crawl.mpr("Grey monks gather around the fountain. They do not speak, nor look at each other.") + data.trig = true + elseif data.spot == 7 then + crawl.mpr("A figure sits in silent meditation. It spots you, gestures wildly, and disappears.") + data.trig = true + end +end + +local function trigfn (spot) + return Triggerable.synchronized_markers(function_at_spot(msgfn, + { spot=spot, trig = false}, true, { only_at_slave = true, + listen_to_slaves = true })) +end + +lua_marker('1', trigfn(1)) +lua_marker('2', trigfn(2)) +lua_marker('3', trigfn(3)) +lua_marker('4', trigfn(4)) +lua_marker('5', trigfn(5)) +lua_marker('6', trigfn(6)) +lua_marker('7', trigfn(7)) + +local function summon_monks (data, triggerable, triggerer, marker, ev) + if triggerer.type ~= "turn" or triggerer.sub_type ~= "countdown" then + return + end + + local count = 0 + for point in iter.circle_iterator(3) do + if crawl.one_chance_in(12) then + if feat.is_solid(point.x, point.y) or feat.destroys_items(point.x, point.y) then + else + local mon = dgn.create_monster(point.x, point.y, msp) + mon.mark_summoned(3) + count = count + 1 + end + end + end + + crawl.redraw_view() + + if count == 1 then + crawl.mpr("One of the shadowy figures appears more solid!") + elseif count > 1 then + crawl.mpr("The shadowy figures no longer seem so shadowy.") + end +end + +local summon_marker = TriggerableFunction:new ({ func=summon_monks, + repeated=true }) + +summon_marker:add_triggerer(DgnTriggerer:new {type="turn", delay_min=500, + delay_max=800 }) + +lua_marker('A', summon_marker) + +}} : wizlab_setup(_G, "Wucad Mu's Monastery") MAP tttttttttttttttttttttttttttttttttttttttt @@ -851,25 +938,25 @@ tttttttttttttttttttttttttttttttttttttttt ttttttttttttttTTTTTTTttttttttttttttttttt ttttttTTTTTTTT.......TTTTTTTTTTTTttttttt tttttT.........ccccc.............Ttttttt -ttttT.........cc...cc.............Tttttt -tttT.......cccc..3..cccc...........Ttttt -ttT.......cc..cc...cc..cc......ccc..Tttt -ttT......cc....cc=cc....cc....cc1cc..Ttt -ttT.....Tc....G.....G....cT..cc1U1cc.Ttt -ttT.....ccG......2......Gcc...cc1cc..Ttt -ttT......+......181......+.....c+c...Ttt -ttT.....ccG......3......Gcc..........Ttt +ttttT.........cc777cc.............Tttttt +tttT.......cccc77777cccc...........Ttttt +ttT.......cc..cc777cc..cc......ccc..Tttt +ttT......cc....cc=cc....cc....cc6cc..Ttt +ttT.....Tc....G.....G....cT..cc6U6cc.Ttt +ttT.....ccG.............Gcc...cc6cc..Ttt +ttT......+.......8.......+.....c+c...Ttt +ttT.....ccG.............Gcc..........Ttt ttT.....Tc....G.....G....cT..........Ttt ttT.c..cTcc.............cccT.........Ttt ttTcc++ccccccc.......ccccccc+cc......Ttt -ttcc....ccc32ccc===ccc23ccc...cc.....Ttt -ttc..12..c...............c..2..c....Tttt -ttc..23..cc.............cc.....cc..ctttt -ttc......ccccccccccccccccccc+cccc++ccttt -ttcc....ccc.............ccc...cc....cctt -tttccccccc......212......+..2..+.22..ctt -ttttttttccc..ccc+++ccc..ccc...cc....cctt -tttttttttcccccTT...Ttccccccccccccccccttt +ttcc5555ccc..ccc===ccc..ccc444cc.....Ttt +ttc555555c...............c44444c....Tttt +ttc555555cc.............cc44444cc..ctttt +ttc555555ccccccccccccccccccc+cccc++ccttt +ttcc5555ccc.............ccc222cc3333cctt +tttccccccc...............+22222+33333ctt +ttttttttccc..ccc+++ccc..ccc222cc3333cctt +tttttttttcccccTT111Ttccccccccccccccccttt ttttttttttttttT.....Tttttttttttttttttttt tttttttttttT.........TTTTTTttttttttttttt tttccccctttT.....G........Ttcccccttttttt -- cgit v1.2.3-54-g00ecf From 4d10fb107c57039ec8ec7bf96b4c9d91d9e73980 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Sat, 5 Dec 2009 14:45:41 +1000 Subject: Alistair and Wucad tweaks. --- crawl-ref/source/dat/wizlab.des | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 54ae3e87c7..9d2478662a 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -109,7 +109,7 @@ function wizlab_portal (e) desc = "magical portal", desc_long = desc_long, entity = 'portal', - dst = 'WizLab', + dst = 'wizlab', dstname_abbrev = "WizLab", dstorigin = "in a Wizard's Laboratory", overmap = "magical portal", @@ -701,11 +701,11 @@ MAP ccccccc c.....c ccccccc..A..ccccccc -cccccCCCCC+.....cBBBBBccccc -c...cCCCCCc..<..cBBBBBc...c -c...=CCCCCc.....cBBBBB=...c -c...cCCCCCcccncccBBBBBc...c -cccccCCCCCc.....+BBBBBccccc + cCCCCC+.....cBBBBBc + cCCCCCc..<..cBBBBBc + cCCCCCc.....cBBBBBc + cCCCCCcccncccBBBBBc + cCCCCCc.....+BBBBBc ccccc+ccc.....ccccc+ccc c.....c...ccc.. Date: Sat, 5 Dec 2009 19:39:05 +1000 Subject: Further tweaks to Wucad. It's starting to take proper shape, now! --- crawl-ref/source/dat/wizlab.des | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 9d2478662a..385cfc2140 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -825,8 +825,6 @@ ENDMAP ############################################################################### # Wucad Mu's Monastery -# -# Todo: it isn't really *that* interesting. NAME: wizlab_wucad ORIENT: encompass TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup @@ -841,6 +839,10 @@ KFEAT: ' = open_door KFEAT: 1234567 = . KMONS: 1234567 = nothing LROCKCOL: darkgrey +ITEM: potion of experience, manual of fighting / manual of armour / manual of \ + spellcasting, manual of staves / manual of fighting / manual of dodging,\ + potion of gain dexterity / potion of gain strength / potion of gain \ + intelligence LFLOORCOL: white {{ local function msgfn (data, triggerable, triggerer, marker, ev) @@ -848,6 +850,10 @@ local function msgfn (data, triggerable, triggerer, marker, ev) return end + if crawl.one_chance_in(3) then + return + end + if data.spot == 1 then crawl.mpr("Strange, shadowy figures dance through the air in front of you.") data.trig = true @@ -897,15 +903,15 @@ local function summon_monks (data, triggerable, triggerer, marker, ev) return end - local msp = "human name:monk n_suf col:white hd:10 dur:6 sum:shadow_creatures" .. - " nas:old_memories seen / rock troll name:monk n_suf dur:6 seen " .. + local msp = "human name:monk n_suf col:white hd:10 dur:2 sum:shadow_creatures" .. + " nas:old_memories seen / rock troll name:monk n_suf dur:2 seen " .. " sum:shadow_creatures nas:old_memories" .. - " / iron troll name:monk n_suf col:white dur:6 sum:shadow_creatures " .. + " / iron troll name:monk n_suf col:white dur:2 sum:shadow_creatures " .. " nas:old_memories seen" local count = 0 for point in iter.circle_iterator(3) do - if crawl.one_chance_in(12) then + if crawl.one_chance_in(11) then if feat.is_solid(point.x, point.y) or feat.destroys_items(point.x, point.y) then else local mon = dgn.create_monster(point.x, point.y, msp) @@ -919,15 +925,15 @@ local function summon_monks (data, triggerable, triggerer, marker, ev) if count == 1 then crawl.mpr("One of the shadowy figures appears more solid!") elseif count > 1 then - crawl.mpr("The shadowy figures no longer seem so shadowy.") + crawl.mpr("Shadows coalesce into solid form.") end end local summon_marker = TriggerableFunction:new ({ func=summon_monks, repeated=true }) -summon_marker:add_triggerer(DgnTriggerer:new {type="turn", delay_min=500, - delay_max=800 }) +summon_marker:add_triggerer(DgnTriggerer:new {type="turn", delay_min=50, + delay_max=290 }) lua_marker('A', summon_marker) @@ -942,7 +948,7 @@ tttttT.........ccccc.............Ttttttt ttttT.........cc777cc.............Tttttt tttT.......cccc77777cccc...........Ttttt ttT.......cc..cc777cc..cc......ccc..Tttt -ttT......cc....cc=cc....cc....cc6cc..Ttt +ttT......cc....cc+cc....cc....cc6cc..Ttt ttT.....Tc....G.....G....cT..cc6U6cc.Ttt ttT.....ccG.............Gcc...cc6cc..Ttt ttT......+.......8.......+.....c+c...Ttt @@ -950,15 +956,15 @@ ttT.....ccG.............Gcc..........Ttt ttT.....Tc....G.....G....cT..........Ttt ttT.c..cTcc.............cccT.........Ttt ttTcc++ccccccc.......ccccccc+cc......Ttt -ttcc5555ccc..ccc===ccc..ccc444cc.....Ttt -ttc555555c...............c44444c....Tttt +ttcc5555cccdeccc===cccfgccc444cc.....Ttt +ttc555555c....c.....c....c44444c....Tttt ttc555555cc.............cc44444cc..ctttt ttc555555ccccccccccccccccccc+cccc++ccttt ttcc5555ccc.............ccc222cc3333cctt tttccccccc...............+22222+33333ctt ttttttttccc..ccc+++ccc..ccc222cc3333cctt tttttttttcccccTT111Ttccccccccccccccccttt -ttttttttttttttT.....Tttttttttttttttttttt +ttttttttttttttT11111Tttttttttttttttttttt tttttttttttT.........TTTTTTttttttttttttt tttccccctttT.....G........Ttcccccttttttt ttcc...cctT..............Ttcc...cctttttt -- cgit v1.2.3-54-g00ecf From 64da16906727f1206a1ec0a3bcf7d55535c8938f Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Sun, 6 Dec 2009 11:08:49 +1000 Subject: New Wizlab: Cigotuvi's Fleshworks, by Mu. --- crawl-ref/source/dat/wizlab.des | 156 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 154 insertions(+), 2 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 385cfc2140..e91d2f1ffb 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -29,6 +29,14 @@ # layout: temple-esque! # colour: dark walls, red and orangge. # +# Cigotuvi's Fleshworks +# threat: lumps, uglies, abominations +# loot: tmut. potions, books, rMut, ?oSumm, \oDeath +# xp: about 9000 +# layout: organic, irregular, twisty, NO SQUARES, NO HARD CORNERS, +# NOTHING THAT LOOKS PRETTY +# colour: lightred walls, red doors, magenta floor, yellow 'glass' +# ### ## @@ -733,14 +741,158 @@ TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup MAP ENDMAP +# NOTES +### +# +# +# ~ +# +# Cigotuvi has mastered the art of manipulating flesh, and his lab is a +# living testament to this fact, seeming like the interior of some +# ghastly beast. The walls and floor are slick and membranous, pulsing to an +# unheard heartbeat and oozing thick, green ichor from every inch. +# +# The bulk of Cigotuvi's Fleshworks is devoted to cells that house test +# subjects in various stages of degeneration. Most are sickly humanoids; the +# others are ugly things, pulsating lumps and abominations. +# +# The central, circular chamber houses Cigotuvi's flesh golem. +# The Eastern half of his lab is dominated by a snaking passageway filled with +# pulsating lumps and the occasional ugly thing. +# The western half of his lab is full of abominations, including the terrible +# "Cigotuvi's Monster". +# +# ~ +# + + ############################################################################### -# Cigotuvi's Chambers +# Cigotuvi's Fleshworks (by Mu.) # NAME: wizlab_cigotuvi ORIENT: encompass TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup -: wizlab_setup(_G, "Cigotuvi's Chambers") +KPROP: . = w:1 bloody / w:15 nothing +KPROP: ' = bloody / w:5 nothing +KMONS: a = human name:sickly name_adjective / \ + human name:monstrous name_adjective / human name:deformed \ + name_adjective / human name:twisted name_adjective / \ + human name:grotesque name_adjective / human name:hideous \ + name_adjective / human name:febrile name_adjective +KMONS: b = elf name:sickly name_adjective / \ + elf name:monstrous name_adjective / elf name:deformed \ + name_adjective / elf name:twisted name_adjective / \ + elf name:grotesque name_adjective / elf name:hideous \ + name_adjective / elf name:febrile name_adjective +KMONS: d = orc name:sickly name_adjective / \ + orc name:monstrous name_adjective / orc name:deformed \ + name_adjective / orc name:twisted name_adjective / \ + orc name:grotesque name_adjective / orc name:hideous \ + name_adjective / orc name:febrile name_adjective +KMONS: u = ugly thing / w:2 very ugly thing +KMONS: J = pulsating lump +KMONS: x = small abomination +KMONS: X = large abomination +KMONS: e = giant eyeball +SUBST: " = J:1 / .:6 +KMONS: 8 = col:red clay golem name:flesh_golem name_replace +KMONS: M = col:mutagenic tentacled monstrosity name:Cigotuvi's_Monster \ + name_replace +MARKER: M = lua:MonPropsMarker:new {description="This terrifying creation " \ + .. "looks to have been constructed from the bodyparts of every monstrous " \ + .. "creature imaginable.\n"} +MARKER: M = lua:MonPropsMarker:new {quote='\"I beheld the wretch -- the ' \ + .. 'miserable monster whom I had created. He held up the curtain ' \ + .. 'of the bed; and his eyes, if eyes they may be called, were ' \ + .. 'fixed on me. His jaws opened, and he muttered some inarticulate ' \ + .. 'sounds, while a grin wrinkled his cheeks."\n -Frankenstein, Mary Shelley.'} +MARKER: 8 = lua:MonPropsMarker:new {description="An animated mound of misshapen flesh.\n"} +: local sickdesc = "This poor creature looks hideously deformed.\n" +MARKER: a = lua:MonPropsMarker:new {description=sickdesc} +MARKER: b = lua:MonPropsMarker:new {description=sickdesc} +MARKER: d = lua:MonPropsMarker:new {description=sickdesc} +MARKER: ! = lua:fog_machine { \ + pow_max = 15, delay_min = 10, delay_max = 40, \ + size = 1, size_buildup_amnt = 20, \ + size_buildup_time = 500, cloud_type = "mutagenic fog" \ + } +MARKER: ? = lua:fog_machine { \ + pow_max = 20, delay_min = 10, delay_max = 40, \ + size = 5, size_buildup_amnt = 10, \ + size_buildup_time = 25, cloud_type = "mutagenic fog" \ + } +LFLOORCOL: magenta +COLOUR: m = yellow +COLOUR: c+ = lightred +COLOUR: W = green +: dgn.set_feature_desc_short("Some shallow water", "Viscous fluid") +: dgn.set_feature_desc_long("Some shallow water", "This sticky " +: .. "fluid seems to be secreted by the nearby walls.\n") +: dgn.set_feature_desc_short("stone wall", "sinewy wall") +: dgn.set_feature_desc_long("stone wall", "These walls look" +: .. " strangely organic, but incredibly tough and durable.\n") +: dgn.set_feature_desc_short("translucent rock wall", "thin membrane") +: dgn.set_feature_desc_long("translucent rock wall", "This strange" +: .. " membrane is thin enough to see through.\n") +: dgn.set_feature_desc_short("Floor", "Pulsating floor") +: dgn.set_feature_desc_long("Floor", "This slick floor seems to pulse" +: .. " to an unknown beat.\n") +# Changing door descriptions like this currently doesn't work, needs fixing. +MARKER: + = lua:props_marker { \ + door_description_prefix="warning scrawled " \ + } +: dgn.set_feature_desc_long("closed door", "A fleshy door.\n") +: dgn.set_feature_desc_long("open door", "A fleshy doorway.\n") +: wizlab_setup(_G, "Cigotuvi's Fleshworks") +KITEM: $ = potion of degeneration / potion of decay / \ + potion of mutation / w:3 potion of strong poison / \ + w:2 potion of poison / w:5 potion of healing / \ + w:3 potion of heal wounds / w:1 potion of cure mutation +KITEM: * = gold +KITEM: % = amulet of resist mutation +KITEM: : = any book / acquire book +KITEM: | = staff of death +KITEM: l = scroll of summoning +NSUBST: L = 1:| / *:l MAP +ccccccccccccccccccccccccccccccccccccccccccccc +ccLLLcccc.cccccccccccAccccccccccccWWWW.u:cccc +c.....c.....ccc...ccc+cccccccccccW......u:ccc +c.X.........cc.u...m...m..ccccccW........u:cc +c.M........cc...b..m.x.m.a.cccccW..........cc +c.X........cc...d..m...m.u..ccccW.........Wcc +c..........cc.cccccm...mc...ccccc........Wccc +c.....ccc+ccccc..cccc+cccccccccccc......Wcccc +ccLLLccc..ccccuuu.cm...m..d..ccccc+cccccccccc +cccccccc..ccc..!...m.x.m.a..cccccc""ccccccccc +cc$$cccc..ccc.uuu..m...m...ccccccc""cc**%**cc +c$$$$cc...cccc....cm...m.cccWccccc""c.e.c.e.c +c$$$$+...cccccc..cccc+cccc...Wcccc""c...c...c +c$$$$c...ccccccccc.m...m.xx...Wccc""cmm+c+mmc +cc$ccccc+cccccccc..m.x.m...u..Wccc""c.......c +ccccccc...cccc...a.m...m....x.cc.c""c.......c +cccc.........c..b..m...mc....cc..c""c...!...c +c.xJ...ccc...cc..cccc+cccc..cc...c""c......cc +c...ccccccc+cccccc.m.....ccccJJJJc""+.....ccc +cc...ccccc'''cccc..m.....uccJJJJJc""ccccccccc +cc...ccc''''''cc.!.m..... Date: Sun, 6 Dec 2009 11:23:44 +1000 Subject: Speech and speech keys for Mu's Cigotuvi lab. --- crawl-ref/source/dat/database/monspeak.txt | 27 +++++++++++++++++++++++++++ crawl-ref/source/dat/wizlab.des | 6 +++--- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/crawl-ref/source/dat/database/monspeak.txt b/crawl-ref/source/dat/database/monspeak.txt index a81f7240f6..43f37082e7 100644 --- a/crawl-ref/source/dat/database/monspeak.txt +++ b/crawl-ref/source/dat/database/monspeak.txt @@ -4372,3 +4372,30 @@ launches into embarks on %%%% +############################################################################### +# Speech keys used *specifically* in (portal) vaults. +# +############################################################################### +Cigotuvi_creatures + +VISUAL:@The_monster@ howls in pain. + +VISUAL:@The_monster@ wails in agony. + +VISUAL:@The_monster@ weeps. + +VISUAL:@The_monster@ sobs. + +@The_monster@ screams, "The pain, the pain!" + +@The_monster@ yells, "Please, just kill me!" + +VISUAL:@The_monster@ stares vacantly at hideously deformed hands. + +@The_monster@ asks, "What has happened to me?" + +@The_monster@ asks, "What has been done to me?" + +VISUAL:@The_monster@ prays for aid. + +VISUAL:@The_monster@ begins coughing up blood. diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index e91d2f1ffb..7646ed375d 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -808,9 +808,9 @@ MARKER: M = lua:MonPropsMarker:new {quote='\"I beheld the wretch -- the ' \ .. 'sounds, while a grin wrinkled his cheeks."\n -Frankenstein, Mary Shelley.'} MARKER: 8 = lua:MonPropsMarker:new {description="An animated mound of misshapen flesh.\n"} : local sickdesc = "This poor creature looks hideously deformed.\n" -MARKER: a = lua:MonPropsMarker:new {description=sickdesc} -MARKER: b = lua:MonPropsMarker:new {description=sickdesc} -MARKER: d = lua:MonPropsMarker:new {description=sickdesc} +MARKER: a = lua:MonPropsMarker:new {description=sickdesc, speech_key="Cigotuvi_creatures"} +MARKER: b = lua:MonPropsMarker:new {description=sickdesc, speech_key="Cigotuvi_creatures"} +MARKER: d = lua:MonPropsMarker:new {description=sickdesc, speech_key="Cigotuvi_creatures"} MARKER: ! = lua:fog_machine { \ pow_max = 15, delay_min = 10, delay_max = 40, \ size = 1, size_buildup_amnt = 20, \ -- cgit v1.2.3-54-g00ecf From d2b57e934701793701cdf01681053f6120cd59e4 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Sun, 6 Dec 2009 11:47:56 +1000 Subject: Change the door description to "fleshy". --- crawl-ref/source/dat/wizlab.des | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 7646ed375d..4674eb3cb9 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -839,7 +839,7 @@ COLOUR: W = green : .. " to an unknown beat.\n") # Changing door descriptions like this currently doesn't work, needs fixing. MARKER: + = lua:props_marker { \ - door_description_prefix="warning scrawled " \ + door_description_noun="fleshy orifice", \ } : dgn.set_feature_desc_long("closed door", "A fleshy door.\n") : dgn.set_feature_desc_long("open door", "A fleshy doorway.\n") -- cgit v1.2.3-54-g00ecf From cce2486a3cbfadf3d3bb537a9578ac8f0cffb061 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Sun, 6 Dec 2009 13:23:07 +1000 Subject: Add props for door stages. --- crawl-ref/source/dat/wizlab.des | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 4674eb3cb9..510fd9a866 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -838,11 +838,18 @@ COLOUR: W = green : dgn.set_feature_desc_long("Floor", "This slick floor seems to pulse" : .. " to an unknown beat.\n") # Changing door descriptions like this currently doesn't work, needs fixing. -MARKER: + = lua:props_marker { \ - door_description_noun="fleshy orifice", \ - } -: dgn.set_feature_desc_long("closed door", "A fleshy door.\n") -: dgn.set_feature_desc_long("open door", "A fleshy doorway.\n") +: lua_marker('+', props_marker { +: door_description_noun="fleshy orifice", +: door_berserk_verb_open="You part the %s%s", +: door_berserk_adjective="with a squelch!", +: door_berserk_verb_close="You squeeze the %s%s closed", +: door_noisy_verb_open="You part the %s%s with a squelch!", +: door_noisy_verb_close="You squeeze the %s%s closed with a squelch!", +: door_airborne_verb_open="You reach down and part the %s%s.", +: door_airborne_verb_close="You reach down and squeeze the %s%s closed.", +: door_verb_open="You part the %s%s.", +: door_verb_close="You squeeze the %s%s shut." +: }) : wizlab_setup(_G, "Cigotuvi's Fleshworks") KITEM: $ = potion of degeneration / potion of decay / \ potion of mutation / w:3 potion of strong poison / \ -- cgit v1.2.3-54-g00ecf From 68e4aa61490e42dddb18f58b87b9abc1406820be Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Sun, 6 Dec 2009 13:31:17 +1000 Subject: Remove "Preservation" and "Conservation" from randart names. This is extremely misleading. These can be applied too armour types that do not have this brand (the leather armour of Conservation, etc) and confuse people. --- crawl-ref/source/dat/database/rand_arm.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/crawl-ref/source/dat/database/rand_arm.txt b/crawl-ref/source/dat/database/rand_arm.txt index 0c78510388..f4dd8a7127 100644 --- a/crawl-ref/source/dat/database/rand_arm.txt +++ b/crawl-ref/source/dat/database/rand_arm.txt @@ -216,10 +216,6 @@ Exclusion Repulsion -Preservation - -Conservation - Inviolability %%%% # other armour properties (beside protection) -- cgit v1.2.3-54-g00ecf From 3bde341201dc40a45cb44fbce3c4ed8ae4bcb8a4 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Sun, 6 Dec 2009 16:15:26 +1000 Subject: Add further flavour to vaults, comments, tweaks. --- crawl-ref/source/dat/wizlab.des | 58 ++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 510fd9a866..94dbdf8977 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -32,8 +32,8 @@ # Cigotuvi's Fleshworks # threat: lumps, uglies, abominations # loot: tmut. potions, books, rMut, ?oSumm, \oDeath -# xp: about 9000 -# layout: organic, irregular, twisty, NO SQUARES, NO HARD CORNERS, +# xp: 16000+ +# layout: organic, irregular, twisty, NO SQUARES, NO HARD CORNERS, # NOTHING THAT LOOKS PRETTY # colour: lightred walls, red doors, magenta floor, yellow 'glass' # @@ -49,8 +49,6 @@ # cupboards full of potions, confused monsters. # Borgnjor's Mortuary: liches, miasma clouds, potions of decay, slaves that are # having their life forces drained, vampire (knights, mages). -# Cigotuvi's Chambers: "laboratory-esque", mutagenic fog machines, pulsating -# lumps and shining eyes in cages, ugly things in cages, degeneration. # Iskenderun's Mystic Tower: purple draconians, purple wizards with mystic # blast, naga mages with mystic blast, purple fog and smoke outside windows, # robes and cloaks of magic resistance as the loot. @@ -89,6 +87,8 @@ # The flavour messages for the portal vault require flavour, while the actual # portals themselves could do with an overhaul and some new ones. # +# *MUST* make these look awesome in tiles, too. +# ## {{ @@ -287,6 +287,12 @@ MARKER: 9 = lua:MonPropsMarker:new {description="A glistening silver machine : dgn.set_feature_desc_short("dry fountain", "glistening fountain") : dgn.set_feature_desc_long("dry fountain", "A pristine fountain. " .. : "The only thing it lacks is water.\n") +: dgn.set_feature_desc_short("stone wall", "black marble wall") +: dgn.set_feature_desc_long("stone wall", "The marble glistens and shines. It certainly " .. +: "is beautiful!\n") +: dgn.set_feature_desc_short("Floor", "marble floor") +: dgn.set_feature_desc_long("Floor", "Where the walls are black marble, the floor is " .. +: "a white and silver, with shades of pink here and there.\n") : dgn.set_feature_quote("A granite statue", mquote) : wizlab_setup(_G, "Tukima's Studio") MAP @@ -396,11 +402,16 @@ lua_marker("_", grow_marker) : wizlab_setup(_G, "Erinya's Formal Garden") : dgn.set_feature_desc_short("empty arch of ancient stone", : "rose-covered archway") +: dgn.set_feature_desc_long("empty arch of ancient stone", +: "The roses look beautiful!\n") : dgn.set_feature_desc_short("granite statue", "vine-covered statue") : dgn.set_feature_desc_long("granite statue", "It looks almost like a " .. : "monster made entirely from vines.\n") : dgn.set_feature_desc_short("stone wall", "crumbing stone wall") -: dgn.set_feature_desc_long("stone wall", "It looks ancient.") +: dgn.set_feature_desc_long("stone wall", "It looks ancient.\n") +: dgn.set_feature_desc_short("Floor", "grass-covered ground") +: dgn.set_feature_desc_long("Floor", "Strewn with leaves and twigs that" .. +: "crunch loudly underfoot, the grass is crisp and fresh.\n") MAP ccccccccccccccccccccccccccccccccccccccccccccc ctttttttttttttttttttttttttttttttttttttttttttc @@ -643,11 +654,13 @@ lua_marker("A", box_marker) }} : dgn.set_feature_desc_short("rock wall", "strange rock wall") : dgn.set_feature_desc_long("rock wall", "It is decorated with " -: .. "images you might see in a tomb.") -: dgn.set_feature_desc_short("stone wall", "highly decorated stone") -: dgn.set_feature_desc_long("stone wall", "It is covered with amazing" -: .. " images and art.") -: wizlab_setup(_G, "Doroklohe's Forbidden Tomb") +: .. "images you might see in a tomb.\n") +: dgn.set_feature_desc_short("stone wall", "highly decorated stone wall") +: dgn.set_feature_desc_long("stone wall", "It is covered with disturbing" +: .. ", horrifying images.\n") +: dgn.set_feature_desc_short("Floor", "rough-hewn floor") +: dgn.set_feature_desc_long("Floor", "It is rough and uneven in places.\n") +: wizlab_setup(_G, "Doroklohe's Tomb") MAP ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^________________...........________________^ @@ -703,7 +716,7 @@ COLOUR: =c = magenta, w = poison, n = blue LFLOORCOL: white : dgn.set_feature_desc_short("deep water", "toxic goo") : dgn.set_feature_desc_long("deep water", "It stinks. Drinking it " -: .. "might seem to be a good idea after a bottle or two.") +: .. "might seem to be a good idea after a bottle or two.\n") ITEM: potion of confusion w:20 / any potion MAP ccccccc @@ -741,11 +754,8 @@ TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup MAP ENDMAP -# NOTES -### -# -# -# ~ +############################################################################## +# Cigotuvi's Fleshworks (by Mu.) # # Cigotuvi has mastered the art of manipulating flesh, and his lab is a # living testament to this fact, seeming like the interior of some @@ -761,14 +771,6 @@ ENDMAP # pulsating lumps and the occasional ugly thing. # The western half of his lab is full of abominations, including the terrible # "Cigotuvi's Monster". -# -# ~ -# - - -############################################################################### -# Cigotuvi's Fleshworks (by Mu.) -# NAME: wizlab_cigotuvi ORIENT: encompass TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup @@ -834,7 +836,7 @@ COLOUR: W = green : dgn.set_feature_desc_short("translucent rock wall", "thin membrane") : dgn.set_feature_desc_long("translucent rock wall", "This strange" : .. " membrane is thin enough to see through.\n") -: dgn.set_feature_desc_short("Floor", "Pulsating floor") +: dgn.set_feature_desc_short("Floor", "pulsating floor") : dgn.set_feature_desc_long("Floor", "This slick floor seems to pulse" : .. " to an unknown beat.\n") # Changing door descriptions like this currently doesn't work, needs fixing. @@ -850,9 +852,8 @@ COLOUR: W = green : door_verb_open="You part the %s%s.", : door_verb_close="You squeeze the %s%s shut." : }) -: wizlab_setup(_G, "Cigotuvi's Fleshworks") KITEM: $ = potion of degeneration / potion of decay / \ - potion of mutation / w:3 potion of strong poison / \ + potion of mutation / w:3 potion of strong poison / \ w:2 potion of poison / w:5 potion of healing / \ w:3 potion of heal wounds / w:1 potion of cure mutation KITEM: * = gold @@ -861,6 +862,7 @@ KITEM: : = any book / acquire book KITEM: | = staff of death KITEM: l = scroll of summoning NSUBST: L = 1:| / *:l +: wizlab_setup(_G, "Cigotuvi's Fleshworks") MAP ccccccccccccccccccccccccccccccccccccccccccccc ccLLLcccc.cccccccccccAccccccccccccWWWW.u:cccc @@ -984,6 +986,8 @@ ENDMAP ############################################################################### # Wucad Mu's Monastery +# +# TODO: Rebrand everything properly! NAME: wizlab_wucad ORIENT: encompass TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup -- cgit v1.2.3-54-g00ecf From db5889abbac5afa1afb0a43277b435c4fcc078ce Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Tue, 8 Dec 2009 23:43:06 +1000 Subject: Tweak Cigotuvi's loot. --- crawl-ref/source/dat/wizlab.des | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 94dbdf8977..f63c49120f 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -858,7 +858,10 @@ KITEM: $ = potion of degeneration / potion of decay / \ w:3 potion of heal wounds / w:1 potion of cure mutation KITEM: * = gold KITEM: % = amulet of resist mutation -KITEM: : = any book / acquire book +KITEM: : = randbook disc:transmutation owner:Cigotuvi / any book / \ + acquire book +KITEM: ^ = book of morphology / randbook disc:transmutation \ + owner:Cigotuvi spell:cigotuvi's_degeneration KITEM: | = staff of death KITEM: l = scroll of summoning NSUBST: L = 1:| / *:l @@ -866,7 +869,7 @@ NSUBST: L = 1:| / *:l MAP ccccccccccccccccccccccccccccccccccccccccccccc ccLLLcccc.cccccccccccAccccccccccccWWWW.u:cccc -c.....c.....ccc...ccc+cccccccccccW......u:ccc +c.....c.....ccc...ccc+cccccccccccW......u^ccc c.X.........cc.u...m...m..ccccccW........u:cc c.M........cc...b..m.x.m.a.cccccW..........cc c.X........cc...d..m...m.u..ccccW.........Wcc -- cgit v1.2.3-54-g00ecf From 0300c8a132b2d5a3c48fb7cab4870d60facad53c Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Thu, 10 Dec 2009 15:10:17 +1000 Subject: Give Cigotuvi's map fleshy walls. --- crawl-ref/source/dat/wizlab.des | 1 + 1 file changed, 1 insertion(+) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index f63c49120f..1c81bde5c9 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -824,6 +824,7 @@ MARKER: ? = lua:fog_machine { \ size_buildup_time = 25, cloud_type = "mutagenic fog" \ } LFLOORCOL: magenta +TILE: c = wall_flesh COLOUR: m = yellow COLOUR: c+ = lightred COLOUR: W = green -- cgit v1.2.3-54-g00ecf From 0a718b7a41cdd0161ef904dd87a7de73a0d519ee Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Thu, 10 Dec 2009 20:57:43 +1000 Subject: A start on the Ozocubu vault. --- crawl-ref/source/dat/wizlab.des | 42 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 1c81bde5c9..b8645341e1 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -49,13 +49,13 @@ # cupboards full of potions, confused monsters. # Borgnjor's Mortuary: liches, miasma clouds, potions of decay, slaves that are # having their life forces drained, vampire (knights, mages). -# Iskenderun's Mystic Tower: purple draconians, purple wizards with mystic +# Iskenderun's Mystic Bastion: purple draconians, purple wizards with mystic # blast, naga mages with mystic blast, purple fog and smoke outside windows, # robes and cloaks of magic resistance as the loot. # Lee's Rapid Deconstructor: golems and "monk" or otherwise unarmed creatures, # exploding features and exploding corpses. It's a timed vault, so you have # to get to the loot quickly and avoid the hordes of monsters. -# Lehudib's Crystal Cave: crystal walls and crystal golems, crystal monsters, +# Lehudib's Crystal Spire: crystal walls and crystal golems, crystal monsters, # spear throwers (statues with crystal spear), possibly the unrand as the # loot. # Maxwell's Forge: Maxwell employs a bunch of angels to churn out weapons; @@ -965,7 +965,45 @@ NAME: wizlab_ozocubu ORIENT: encompass TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup : wizlab_setup(_G, "Ozocubu's Refrigerator") +LROCKCOL: white +LFLOORCOL: lightblue +LROCKTILE: wall_ice +LFLOORTILE: floor_ice +KFEAT: X = rock_wall +KFEAT: R = closed_door +COLOUR: =c = darkgrey +{{ +smear_map({iterations=20, smear='x', onto='.xx', boxy=false}) +smear_map({iterations=40, smear='x', onto='.xx', boxy=false}) +}} +validate {{ return glyphs_connected('A', 'R') }} MAP + xxxx + xxx..xxx + xxx.....xx + xx........xx xxxx xxx + xx....A.....xx xx..xx xxx.xx xxx + xx...........xxx....xxxx....xx xx.xx + xx..........................xxx...xx + xxx................c...........c..xx + xx..............cccccccRccccccc..xx + xx..............c....c.c....c....xx + xx.............c....c.c....c.....xx + xx..............c....c.c....c....xx + xx.............c.c....c.c....c.c...xx + xx.............cccc+cccc+cccc+cccc.xx + xx.............c...c.......c...c.xx cccc + xxx.....xxx....c...c...<...c...c.xx cccxxx + xxx.xxx xx...c...c.......c...c..xxcccxxx.xx + xxx x...cc+ccccc+ccccc+cc...xccxx....xx + xx...c...c.......c...c..xxcccxx....x + xx....c...c.......c...c.xxccccxxx..xx + xxx..cc...c.......c...ccxccxxxx...xx + xxccccc+ccccc+ccccc+cccccxx.....xx + c.......c.....c.......cx.......xx + c.......+.....+.......=.xxx.....xx + c.......c.....c.......cxx xxx.xxx + cccccccccccccccccccccccxx xxx ENDMAP ############################################################################### -- cgit v1.2.3-54-g00ecf From 630655e6f0b21126c76a7208316da0811845951f Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Fri, 11 Dec 2009 20:21:23 +1000 Subject: Add tiles for Wucad Mu's ghosts, descriptions. --- crawl-ref/source/dat/wizlab.des | 9 ++++++--- crawl-ref/source/rltiles/dc-mon.txt | 5 +++++ crawl-ref/source/rltiles/dc-mon/human_monk_ghost.png | Bin 0 -> 596 bytes .../source/rltiles/dc-mon/iron_troll_monk_ghost.png | Bin 0 -> 1126 bytes .../source/rltiles/dc-mon/rock_troll_monk_ghost.png | Bin 0 -> 1024 bytes 5 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 crawl-ref/source/rltiles/dc-mon/human_monk_ghost.png create mode 100644 crawl-ref/source/rltiles/dc-mon/iron_troll_monk_ghost.png create mode 100644 crawl-ref/source/rltiles/dc-mon/rock_troll_monk_ghost.png diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index b8645341e1..a00d93f5c9 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -1109,10 +1109,10 @@ local function summon_monks (data, triggerable, triggerer, marker, ev) end local msp = "human name:monk n_suf col:white hd:10 dur:2 sum:shadow_creatures" .. - " nas:old_memories seen / rock troll name:monk n_suf dur:2 seen " .. - " sum:shadow_creatures nas:old_memories" .. + " nas:old_memories tile:human_monk seen / rock troll name:monk n_suf".. + " dur:2 seen sum:shadow_creatures nas:old_memories tile:rock_troll_monk" .. " / iron troll name:monk n_suf col:white dur:2 sum:shadow_creatures " .. - " nas:old_memories seen" + " nas:old_memories seen tile:iron_troll_monk" local count = 0 for point in iter.circle_iterator(3) do @@ -1120,6 +1120,8 @@ local function summon_monks (data, triggerable, triggerer, marker, ev) if feat.is_solid(point.x, point.y) or feat.destroys_items(point.x, point.y) then else local mon = dgn.create_monster(point.x, point.y, msp) + mon.set_prop("description", "It seems a flimsy representation of a monk;" + .. " nothing more than a half-formed memory.\n") count = count + 1 end end @@ -1144,6 +1146,7 @@ lua_marker('A', summon_marker) }} : wizlab_setup(_G, "Wucad Mu's Monastery") +: set_border_fill_type("trees") MAP tttttttttttttttttttttttttttttttttttttttt tttttttttttttttttttttttttttttttttttttttt diff --git a/crawl-ref/source/rltiles/dc-mon.txt b/crawl-ref/source/rltiles/dc-mon.txt index 3da868aa54..0b1d2f1a80 100644 --- a/crawl-ref/source/rltiles/dc-mon.txt +++ b/crawl-ref/source/rltiles/dc-mon.txt @@ -326,6 +326,8 @@ vault_guard MONS_VAULT_GUARD shapeshifter MONS_SHAPESHIFTER glowing_shapeshifter MONS_GLOWING_SHAPESHIFTER killer_klown MONS_KILLER_KLOWN +## From the Wucad Mu wizlab +human_monk_ghost MONS_HUMAN_MONK ## Angels ('A') angel MONS_ANGEL @@ -464,6 +466,9 @@ troll MONS_TROLL rock_troll MONS_ROCK_TROLL iron_troll MONS_IRON_TROLL deep_troll MONS_DEEP_TROLL +## From the Wucad Mu wizard laboratory +rock_troll_monk_ghost MONS_ROCK_TROLL_MONK +iron_troll_monk_ghost MONS_IRON_TROLL_MONK ## Vampires ('V') vampire MONS_VAMPIRE diff --git a/crawl-ref/source/rltiles/dc-mon/human_monk_ghost.png b/crawl-ref/source/rltiles/dc-mon/human_monk_ghost.png new file mode 100644 index 0000000000..911281db34 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/human_monk_ghost.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/iron_troll_monk_ghost.png b/crawl-ref/source/rltiles/dc-mon/iron_troll_monk_ghost.png new file mode 100644 index 0000000000..c6e65c7c35 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/iron_troll_monk_ghost.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/rock_troll_monk_ghost.png b/crawl-ref/source/rltiles/dc-mon/rock_troll_monk_ghost.png new file mode 100644 index 0000000000..9a40dccc8a Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/rock_troll_monk_ghost.png differ -- cgit v1.2.3-54-g00ecf From 563c49bab4f18add0f6fec7e857451c65f1c7c1f Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Thu, 17 Dec 2009 15:57:12 +1000 Subject: Add more tiles for Cigotuvi WizLab. This includes deformed human (sickly green, with a single wing), a deformed elf (horrible fleshy grey colour with a hole in the middle), and a deformed orc (missing an arm and part of its face). Also, add a tile for "flesh golem". This is basically a reworked stone golem, using some colours from the wall_flesh series of tiles. Might be a bit dark, but it looks okay at the minute. --- crawl-ref/source/rltiles/dc-mon.txt | 7 +++++++ crawl-ref/source/rltiles/dc-mon/deformed_elf.png | Bin 0 -> 1282 bytes crawl-ref/source/rltiles/dc-mon/deformed_human.png | Bin 0 -> 1363 bytes crawl-ref/source/rltiles/dc-mon/deformed_orc.png | Bin 0 -> 1166 bytes crawl-ref/source/rltiles/dc-mon/flesh_golem.png | Bin 0 -> 2405 bytes 5 files changed, 7 insertions(+) create mode 100644 crawl-ref/source/rltiles/dc-mon/deformed_elf.png create mode 100644 crawl-ref/source/rltiles/dc-mon/deformed_human.png create mode 100644 crawl-ref/source/rltiles/dc-mon/deformed_orc.png create mode 100644 crawl-ref/source/rltiles/dc-mon/flesh_golem.png diff --git a/crawl-ref/source/rltiles/dc-mon.txt b/crawl-ref/source/rltiles/dc-mon.txt index b162e9ad2a..7a6867737b 100644 --- a/crawl-ref/source/rltiles/dc-mon.txt +++ b/crawl-ref/source/rltiles/dc-mon.txt @@ -274,6 +274,8 @@ iron_golem MONS_IRON_GOLEM stone_golem MONS_STONE_GOLEM toenail_golem MONS_TOENAIL_GOLEM wood_golem MONS_WOOD_GOLEM +# For the Cigotuvi WizLab +flesh_golem MONS_FLESH_GOLEM ## Statues (also '8') %sdir dc-mon/unique @@ -329,6 +331,8 @@ glowing_shapeshifter MONS_GLOWING_SHAPESHIFTER killer_klown MONS_KILLER_KLOWN ## From the Wucad Mu wizlab human_monk_ghost MONS_HUMAN_MONK +## From the Cigotuvi wizlab +deformed_human MONS_DEFORMED_HUMAN ## Angels ('A') angel MONS_ANGEL @@ -523,6 +527,8 @@ deep_elf_priest MONS_DEEP_ELF_PRIEST deep_elf_high_priest MONS_DEEP_ELF_HIGH_PRIEST deep_elf_blademaster MONS_DEEP_ELF_BLADEMASTER deep_elf_master_archer MONS_DEEP_ELF_MASTER_ARCHER +## From the Cigotuvi wizlab +deformed_elf MONS_DEFORMED_ELF ## Fungi ('f') fungus MONS_TOADSTOOL @@ -571,6 +577,7 @@ orc_knight MONS_ORC_KNIGHT orc_warlord MONS_ORC_WARLORD orc_sorcerer MONS_ORC_SORCERER orc_high_priest MONS_ORC_HIGH_PRIEST +deformed_orc MONS_DEFORMED_ORC ## Ghosts ('p') %rim 0 diff --git a/crawl-ref/source/rltiles/dc-mon/deformed_elf.png b/crawl-ref/source/rltiles/dc-mon/deformed_elf.png new file mode 100644 index 0000000000..df09452448 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/deformed_elf.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/deformed_human.png b/crawl-ref/source/rltiles/dc-mon/deformed_human.png new file mode 100644 index 0000000000..78d8225146 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/deformed_human.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/deformed_orc.png b/crawl-ref/source/rltiles/dc-mon/deformed_orc.png new file mode 100644 index 0000000000..4d62be9385 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/deformed_orc.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/flesh_golem.png b/crawl-ref/source/rltiles/dc-mon/flesh_golem.png new file mode 100644 index 0000000000..d763855dd6 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/flesh_golem.png differ -- cgit v1.2.3-54-g00ecf From 70c76ef768295142e2a90715e0d59bfc49cf7f6c Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Thu, 17 Dec 2009 16:23:41 +1000 Subject: Actually use previous added tiles. --- crawl-ref/source/dat/wizlab.des | 50 +++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index a00d93f5c9..ebeee7732c 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -776,38 +776,44 @@ ORIENT: encompass TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup KPROP: . = w:1 bloody / w:15 nothing KPROP: ' = bloody / w:5 nothing -KMONS: a = human name:sickly name_adjective / \ - human name:monstrous name_adjective / human name:deformed \ - name_adjective / human name:twisted name_adjective / \ - human name:grotesque name_adjective / human name:hideous \ - name_adjective / human name:febrile name_adjective -KMONS: b = elf name:sickly name_adjective / \ - elf name:monstrous name_adjective / elf name:deformed \ - name_adjective / elf name:twisted name_adjective / \ - elf name:grotesque name_adjective / elf name:hideous \ - name_adjective / elf name:febrile name_adjective -KMONS: d = orc name:sickly name_adjective / \ - orc name:monstrous name_adjective / orc name:deformed \ - name_adjective / orc name:twisted name_adjective / \ - orc name:grotesque name_adjective / orc name:hideous \ - name_adjective / orc name:febrile name_adjective +KMONS: a = human name:sickly name_adjective tile:mons_deformed_human / \ + human name:monstrous name_adjective tile:mons_deformed_human / \ + human name:deformed name_adjective tile:mons_deformed_human / \ + human name:twisted name_adjective tile:mons_deformed_human / \ + human name:grotesque name_adjective tile:mons_deformed_human / \ + human name:hideous name_adjective tile:mons_deformed_human / \ + human name:febrile name_adjective tile:mons_deformed_human +KMONS: b = elf name:sickly name_adjective tile:mons_deformed_elf / \ + elf name:monstrous name_adjective tile:mons_deformed_elf / \ + elf name:deformed name_adjective tile:mons_deformed_elf / \ + elf name:twisted name_adjective tile:mons_deformed_elf / \ + elf name:grotesque name_adjective tile:mons_deformed_elf / \ + elf name:hideous name_adjective tile:mons_deformed_elf / \ + elf name:febrile name_adjective tile:mons_deformed_elf +KMONS: d = orc name:sickly name_adjective tile:mons_deformed_orc / \ + orc name:monstrous name_adjective tile:mons_deformed_orc / \ + orc name:deformed name_adjective tile:mons_deformed_orc / \ + orc name:twisted name_adjective tile:mons_deformed_orc / \ + orc name:grotesque name_adjective tile:mons_deformed_orc / \ + orc name:hideous name_adjective tile:mons_deformed_orc / \ + orc name:febrile name_adjective tile:mons_deformed_orc KMONS: u = ugly thing / w:2 very ugly thing KMONS: J = pulsating lump KMONS: x = small abomination KMONS: X = large abomination KMONS: e = giant eyeball SUBST: " = J:1 / .:6 -KMONS: 8 = col:red clay golem name:flesh_golem name_replace +KMONS: 8 = col:red clay golem name:flesh_golem name_replace \ + tile:mons_flesh_golem name_descriptor KMONS: M = col:mutagenic tentacled monstrosity name:Cigotuvi's_Monster \ name_replace MARKER: M = lua:MonPropsMarker:new {description="This terrifying creation " \ .. "looks to have been constructed from the bodyparts of every monstrous " \ - .. "creature imaginable.\n"} -MARKER: M = lua:MonPropsMarker:new {quote='\"I beheld the wretch -- the ' \ - .. 'miserable monster whom I had created. He held up the curtain ' \ - .. 'of the bed; and his eyes, if eyes they may be called, were ' \ - .. 'fixed on me. His jaws opened, and he muttered some inarticulate ' \ - .. 'sounds, while a grin wrinkled his cheeks."\n -Frankenstein, Mary Shelley.'} + .. "creature imaginable.\n", quote="\"I beheld the wretch -- the " \ + .. "miserable monster whom I had created. He held up the curtain " \ + .. "of the bed; and his eyes, if eyes they may be called, were " \ + .. "fixed on me. His jaws opened, and he muttered some inarticulate " \ + .. "sounds, while a grin wrinkled his cheeks.\"\n -Frankenstein, Mary Shelley."} MARKER: 8 = lua:MonPropsMarker:new {description="An animated mound of misshapen flesh.\n"} : local sickdesc = "This poor creature looks hideously deformed.\n" MARKER: a = lua:MonPropsMarker:new {description=sickdesc, speech_key="Cigotuvi_creatures"} -- cgit v1.2.3-54-g00ecf From d218309c4779c497fac29703d2262ad2bb7080c9 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Sat, 19 Dec 2009 16:29:24 +1000 Subject: Add fleshy doors and (temporary) transparent flesh walls for Cigotuvi's. --- crawl-ref/source/dat/wizlab.des | 4 ++++ crawl-ref/source/rltiles/dc-dngn.txt | 9 +++++++++ .../rltiles/dc-dngn/gateways/fleshy_orifice_closed.png | Bin 0 -> 1251 bytes .../rltiles/dc-dngn/gateways/fleshy_orifice_open.png | Bin 0 -> 1874 bytes .../source/rltiles/dc-dngn/wall/transparent_flesh.png | Bin 0 -> 1205 bytes 5 files changed, 13 insertions(+) create mode 100644 crawl-ref/source/rltiles/dc-dngn/gateways/fleshy_orifice_closed.png create mode 100644 crawl-ref/source/rltiles/dc-dngn/gateways/fleshy_orifice_open.png create mode 100644 crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh.png diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index ebeee7732c..00002ca8dc 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -830,7 +830,11 @@ MARKER: ? = lua:fog_machine { \ size_buildup_time = 25, cloud_type = "mutagenic fog" \ } LFLOORCOL: magenta +LFLOORTILE: floor_nerves +LROCKTILE: wall_flesh TILE: c = wall_flesh +TILE: m = wall_transparent_flesh +TILE: + = no_random dngn_fleshy_orifice COLOUR: m = yellow COLOUR: c+ = lightred COLOUR: W = green diff --git a/crawl-ref/source/rltiles/dc-dngn.txt b/crawl-ref/source/rltiles/dc-dngn.txt index bd555197b7..37937cb390 100644 --- a/crawl-ref/source/rltiles/dc-dngn.txt +++ b/crawl-ref/source/rltiles/dc-dngn.txt @@ -160,6 +160,7 @@ wall/wall_flesh3 wall/wall_flesh4 wall/wall_flesh5 wall/wall_flesh6 +wall/transparent_flesh WALL_TRANSPARENT_FLESH wall/wall_vines0 WALL_VINES wall/wall_vines1 @@ -341,6 +342,14 @@ gate_open_left DNGN_GATE_OPEN_LEFT gate_open_middle DNGN_GATE_OPEN_MIDDLE gate_open_right DNGN_GATE_OPEN_RIGHT +## Alternate doors for vaults, etc. Should be in the order listed above for +## doors which also provide gateways; otherwise detected, closed, open, or +## closed, open. +%sdir dc-dngn/gateways +fleshy_orifice_closed DNGN_FLESHY_ORIFICE +fleshy_orifice_open +%sdir dc-dngn + dngn_orcish_idol DNGN_ORCISH_IDOL dngn_granite_statue DNGN_GRANITE_STATUE diff --git a/crawl-ref/source/rltiles/dc-dngn/gateways/fleshy_orifice_closed.png b/crawl-ref/source/rltiles/dc-dngn/gateways/fleshy_orifice_closed.png new file mode 100644 index 0000000000..fcf1893994 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/gateways/fleshy_orifice_closed.png differ diff --git a/crawl-ref/source/rltiles/dc-dngn/gateways/fleshy_orifice_open.png b/crawl-ref/source/rltiles/dc-dngn/gateways/fleshy_orifice_open.png new file mode 100644 index 0000000000..6ce8d1f29e Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/gateways/fleshy_orifice_open.png differ diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh.png b/crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh.png new file mode 100644 index 0000000000..2437acebb2 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh.png differ -- cgit v1.2.3-54-g00ecf From 123e41762d8db75f5b28d51a032a4ba6bc3a928c Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Tue, 22 Dec 2009 18:34:36 +1000 Subject: Vine-covered golem tile for Erinya's Garden (purge). --- crawl-ref/source/dat/wizlab.des | 3 ++- crawl-ref/source/rltiles/dc-mon.txt | 2 ++ crawl-ref/source/rltiles/dc-mon/vine-covered_golem.png | Bin 0 -> 4523 bytes 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 crawl-ref/source/rltiles/dc-mon/vine-covered_golem.png diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 00002ca8dc..9bf96d528b 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -338,7 +338,8 @@ ORIENT: encompass TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup MONS: centaur col:green, centaur warrior col:lightgreen MONS: oklob plant -MONS: stone golem name:vine_covered name_adjective +MONS: stone golem name:vine_covered name_adjective col:lightgreen \ + tile:mons_vine_golem MONS: toadstool col:any name:flowers n_rpl n_des n_the SUBST: y = ct COLOUR: G = yellow diff --git a/crawl-ref/source/rltiles/dc-mon.txt b/crawl-ref/source/rltiles/dc-mon.txt index e87d129684..261076e9f2 100644 --- a/crawl-ref/source/rltiles/dc-mon.txt +++ b/crawl-ref/source/rltiles/dc-mon.txt @@ -276,6 +276,8 @@ toenail_golem MONS_TOENAIL_GOLEM wood_golem MONS_WOOD_GOLEM # For the Cigotuvi WizLab flesh_golem MONS_FLESH_GOLEM +# For the Erinya WizLab +vine-covered_golem MONS_VINE_GOLEM ## Statues (also '8') %sdir dc-mon/unique diff --git a/crawl-ref/source/rltiles/dc-mon/vine-covered_golem.png b/crawl-ref/source/rltiles/dc-mon/vine-covered_golem.png new file mode 100644 index 0000000000..d8f604671b Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/vine-covered_golem.png differ -- cgit v1.2.3-54-g00ecf From 243d8f82f9ac13a98d491f4f9d03b2abf85834b5 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Fri, 25 Dec 2009 11:37:39 +1000 Subject: Add another missing include. --- crawl-ref/source/rltiles/tool/tile_colour.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/crawl-ref/source/rltiles/tool/tile_colour.cc b/crawl-ref/source/rltiles/tool/tile_colour.cc index 2f098b387b..b5569ee073 100644 --- a/crawl-ref/source/rltiles/tool/tile_colour.cc +++ b/crawl-ref/source/rltiles/tool/tile_colour.cc @@ -1,4 +1,5 @@ #include "tile_colour.h" +#include #include #include #include -- cgit v1.2.3-54-g00ecf From f7c91af1f8d85ded86f017b777b0ab2bd3786c24 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Fri, 25 Dec 2009 12:05:06 +1000 Subject: Add Purge's transparent flesh tiles. --- .../source/rltiles/UNUSED/other/transparent_flesh.png | Bin 0 -> 1205 bytes crawl-ref/source/rltiles/dc-dngn.txt | 7 ++++++- .../source/rltiles/dc-dngn/wall/transparent_flesh.png | Bin 1205 -> 0 bytes .../source/rltiles/dc-dngn/wall/transparent_flesh1.png | Bin 0 -> 4496 bytes .../source/rltiles/dc-dngn/wall/transparent_flesh2.png | Bin 0 -> 4641 bytes .../source/rltiles/dc-dngn/wall/transparent_flesh3.png | Bin 0 -> 4314 bytes .../source/rltiles/dc-dngn/wall/transparent_flesh4.png | Bin 0 -> 4602 bytes .../source/rltiles/dc-dngn/wall/transparent_flesh5.png | Bin 0 -> 4535 bytes .../source/rltiles/dc-dngn/wall/transparent_flesh6.png | Bin 0 -> 4668 bytes 9 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 crawl-ref/source/rltiles/UNUSED/other/transparent_flesh.png delete mode 100644 crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh.png create mode 100644 crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh1.png create mode 100644 crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh2.png create mode 100644 crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh3.png create mode 100644 crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh4.png create mode 100644 crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh5.png create mode 100644 crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh6.png diff --git a/crawl-ref/source/rltiles/UNUSED/other/transparent_flesh.png b/crawl-ref/source/rltiles/UNUSED/other/transparent_flesh.png new file mode 100644 index 0000000000..2437acebb2 Binary files /dev/null and b/crawl-ref/source/rltiles/UNUSED/other/transparent_flesh.png differ diff --git a/crawl-ref/source/rltiles/dc-dngn.txt b/crawl-ref/source/rltiles/dc-dngn.txt index 053c487f86..5f428e7bb1 100644 --- a/crawl-ref/source/rltiles/dc-dngn.txt +++ b/crawl-ref/source/rltiles/dc-dngn.txt @@ -418,7 +418,12 @@ wall/wall_flesh3 wall/wall_flesh4 wall/wall_flesh5 wall/wall_flesh6 -wall/transparent_flesh WALL_TRANSPARENT_FLESH +wall/transparent_flesh1 WALL_TRANSPARENT_FLESH +wall/transparent_flesh2 +wall/transparent_flesh3 +wall/transparent_flesh4 +wall/transparent_flesh5 +wall/transparent_flesh6 wall/wall_vines0 WALL_VINES wall/wall_vines1 diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh.png b/crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh.png deleted file mode 100644 index 2437acebb2..0000000000 Binary files a/crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh.png and /dev/null differ diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh1.png b/crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh1.png new file mode 100644 index 0000000000..664f187d47 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh1.png differ diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh2.png b/crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh2.png new file mode 100644 index 0000000000..a602714196 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh2.png differ diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh3.png b/crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh3.png new file mode 100644 index 0000000000..9a12e349bd Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh3.png differ diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh4.png b/crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh4.png new file mode 100644 index 0000000000..712bc83793 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh4.png differ diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh5.png b/crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh5.png new file mode 100644 index 0000000000..74fd01c736 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh5.png differ diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh6.png b/crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh6.png new file mode 100644 index 0000000000..b9da8247fb Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/wall/transparent_flesh6.png differ -- cgit v1.2.3-54-g00ecf From f6b7d89042d46fd6baa890f3fd7084a5dc0f6bd6 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Fri, 25 Dec 2009 13:22:12 +1000 Subject: Fill Ozocubu's disconnected areas. --- crawl-ref/source/dat/wizlab.des | 1 + 1 file changed, 1 insertion(+) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 9bf96d528b..ab0a0f12cd 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -986,6 +986,7 @@ COLOUR: =c = darkgrey {{ smear_map({iterations=20, smear='x', onto='.xx', boxy=false}) smear_map({iterations=40, smear='x', onto='.xx', boxy=false}) +fill_disconnected({wanted='.'}) }} validate {{ return glyphs_connected('A', 'R') }} MAP -- cgit v1.2.3-54-g00ecf From 6f1c1d411eafdf99552c1de588fae951dfcee467 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Fri, 25 Dec 2009 23:41:32 +1000 Subject: Further tweaks to Ozocubu's. --- crawl-ref/source/dat/wizlab.des | 95 +++++++++++++++++++++++++++++++---------- 1 file changed, 73 insertions(+), 22 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index ab0a0f12cd..9a7c9e4807 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -975,47 +975,98 @@ ENDMAP NAME: wizlab_ozocubu ORIENT: encompass TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup -: wizlab_setup(_G, "Ozocubu's Refrigerator") +MONS: skeletal warrior patrolling col:lightblue ; any weapon good_item \ + . ice dragon armour +MONS: ice statue spells:ice_storm col:darkgrey name:black name_adjective +MONS: polar bear, white imp / wraith / freezing wraith, ice beast +MONS: ice dragon, nothing +SHUFFLE: BC +: local int = crawl.random2(3) +: if int == 0 then +SUBST: B = 3 +SUBST: C = 4 +: elseif int == 1 then +SUBST: B = 4 +SUBST: C = 5 +: elseif int == 2 then +SUBST: B = 3 +SUBST: C = 5 +: end LROCKCOL: white LFLOORCOL: lightblue LROCKTILE: wall_ice LFLOORTILE: floor_ice -KFEAT: X = rock_wall +KFEAT: XQ = rock_wall KFEAT: R = closed_door COLOUR: =c = darkgrey +MARKER: U = lua:fog_machine { \ + pow_max = 10, delay_min = 30, delay_max = 40, \ + size = 6, cloud_type = "freezing vapour" \ + } {{ +-- Map prettyfication smear_map({iterations=20, smear='x', onto='.xx', boxy=false}) smear_map({iterations=40, smear='x', onto='.xx', boxy=false}) -fill_disconnected({wanted='.'}) +--fill_disconnected({fill='x'}) + +function fridge (data, triggerable, triggerer, marker, ev) + if triggerer.type ~= "turn" or triggerer.sub_type ~= "countdown" then + return + end + + local loudlines = {'A voice screams, "Out, out, out!"', + 'There is a horrible grinding noise.', + 'There is a sudden noise, like that of ice cracking.', + 'A voice screams, "Freeze!"'} + + local speechlines = {'You feel a sudden draft.', + 'Snow coalesces in the air in front of you.', + 'You feel a sudden chill.', + 'The air becomes thick with cold.'} + + if not (you.silenced()) then + speechlines = util.append(speechlines, loudlines) + end + crawl.mpr(util.random_from(speechlines), "warning") + spells.refrigeration(crawl.random2avg(40, 6)) +end + +local fridge_marker = TriggerableFunction:new { func = fridge, repeated = true } + +fridge_marker:add_triggerer(DgnTriggerer:new { type="turn", + delay_min=500, delay_max=800, }) + +lua_marker("Q", fridge_marker) }} -validate {{ return glyphs_connected('A', 'R') }} +validate {{ return glyphs_connected('A', 'R') and glyphs_connected('A', '<')}} +: wizlab_setup(_G, "Ozocubu's Refrigerator") MAP xxxx xxx..xxx xxx.....xx xx........xx xxxx xxx xx....A.....xx xx..xx xxx.xx xxx - xx...........xxx....xxxx....xx xx.xx + xx...<.......xxx....xxxx....xx xx.xx xx..........................xxx...xx xxx................c...........c..xx xx..............cccccccRccccccc..xx - xx..............c....c.c....c....xx - xx.............c....c.c....c.....xx - xx..............c....c.c....c....xx - xx.............c.c....c.c....c.c...xx - xx.............cccc+cccc+cccc+cccc.xx - xx.............c...c.......c...c.xx cccc - xxx.....xxx....c...c...<...c...c.xx cccxxx - xxx.xxx xx...c...c.......c...c..xxcccxxx.xx - xxx x...cc+ccccc+ccccc+cc...xccxx....xx - xx...c...c.......c...c..xxcccxx....x - xx....c...c.......c...c.xxccccxxx..xx - xxx..cc...c.......c...ccxccxxxx...xx - xxccccc+ccccc+ccccc+cccccxx.....xx - c.......c.....c.......cx.......xx - c.......+.....+.......=.xxx.....xx - c.......c.....c.......cxx xxx.xxx - cccccccccccccccccccccccxx xxx + xx..............cBBBBc.cCCCCc....xx + xx.............cBBBBc.cCCCCc.....xx + xx..............cBBBBc.cCCCCc....xx + xx.............c.cBBBBc.cCCCCc.c...xx + xx.............2ccc=cccc+cccc=cccc.xx + xx.....www.....c...c.......c...c.xx cccc + xxx...wwxww....c.1.c...<...c.1.c.xx cccxxx + xxx.xxxwxx...c...c.......c...c..xxcccxxx$xx + xxxxwwwx...cc+ccccc+ccccc+cc...xccxx$$$$xx + Qxxwwxx...c...c.......c...c..xxcccxx$$$$x + xxxxxwwxx....c.1.c...U...c.1.c.xxccccxxx$$xx + xx.xxwwwxxx..cc...c.......c...ccxccxxxx333xx + xx...x.wwwxxccccc+ccccc+ccccc+cccccxx.....xx + x..6..xwwwwxc.......c.....c.......cx.......xx + xx...xxxwwww+.1.....+..1..+.....1.=.xxx.....xx + xx.xxxxxwxxc.......c.....c.......cxx xxx.xxx + xxxx xxxxxcccccccccccccccccccccccxx xxx ENDMAP ############################################################################### -- cgit v1.2.3-54-g00ecf From 88efeae8329b9c14c32e12756808f2fb4056b3ae Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Sun, 27 Dec 2009 18:01:05 +1000 Subject: More excellent maps from Mu. --- crawl-ref/source/dat/wizlab.des | 472 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 472 insertions(+) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 9a7c9e4807..b51e00c35a 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -166,6 +166,139 @@ wwxm..O..mxww www.www w.@.w ENDMAP + +############################################################################### +# Basic Entrance 2 (by Mu.) +# +NAME: enter_wizlab_2 +TAGS: uniq_wizlab no_item_gen no_monster_gen +ORIENT: float +SUBST: x = b +SHUFFLE: tU +: wizlab_portal(_G) +MAP +................. +.xxxxxxxmxxxxxxx. +.xx...x...x...xx. +.n..U...O...U..n. +.xx...x...x...xx. +.xxxxxxx+xxxxxxx. +..xx...x.x...xx.. +..n..t.....t..n.. +..xx...x.x...xx.. +..xxxxxx+xxxxxx.. +................. +......c...c...... +.....ccc.ccc..... +................. +ENDMAP + + +############################################################################### +# Basic Entrance 3 (by Mu.) +# +NAME: enter_wizlab_3 +TAGS: uniq_wizlab no_item_gen no_monster_gen +ORIENT: float +: wizlab_portal(_G) +MARKER: ! = lua:fog_machine { \ + pow_max = 10, delay_min = 10, delay_max = 40, \ + size = 1, size_buildup_amnt = 5, \ + size_buildup_time = 25, cloud_type = "flame" \ + } +MARKER: ? = lua:fog_machine { \ + pow_max = 10, delay_min = 10, delay_max = 40, \ + size = 1, size_buildup_amnt = 5, \ + size_buildup_time = 25, cloud_type = "freezing vapour" \ + } +SUBST: n = cn +COLOUR: . = red / blue +KPROP: .?! = no_rtele_into +MAP + ccccccccc +cc..!.?..cc +c?.......!c +c..nnnnn..c +c..n...n..c +c..n.O.n..c +c.?n...n!.c +c..nn.nn..c +c..nn.nn..c +cc!n.n.n?cc + ccnn.nncc + cc.n.cc + cc.cc + c@c +ENDMAP + +############################################################################### +# Basic Entrance 4 (by Mu.) +# +NAME: enter_wizlab_4 +TAGS: uniq_wizlab no_item_gen no_monster_gen +ORIENT: float +: wizlab_portal(_G) +MAP + xxxxx + w...x + ww.O.x + www...x + www..www +www..www +ww..www +w..www +@.www +@www +ENDMAP + +############################################################################### +# Basic Entrance 5 (by Mu.) +# +NAME: enter_wizlab_5 +TAGS: uniq_wizlab no_item_gen no_monster_gen +ORIENT: float +SUBST: x = b +COLOUR: U = random +COLOUR: W = mutagenic +KFEAT: o = granite_statue +: wizlab_portal(_G) +MAP +xxxxxxxxxxx +xxxx...xxxx +xWWU.O.UWWx +xWxx...xxWx +xWWWW.WWWWx +xxxxW.Wxxxx +xxxxW.Wxxxx +xxxxW.Wxxxx +xxxxW.Wxxxx +xxxxo.oxxxx +xxxx...xxxx + @ +ENDMAP + +############################################################################### +# Basic Entrance 6 (by Mu.) +# +NAME: enter_wizlab_6 +TAGS: uniq_wizlab no_item_gen no_monster_gen +ORIENT: float +SUBST: x = mc. +: wizlab_portal(_G) +MAP +c.c.ccccccc +x.x.x.x..Oc +.x.x.x.x..c +x.x.x.x.x.c +.x.x.x.x.xc +x.x.x.x.x.c +.x.x.x.x.xc +x.x.x.x.x.. +.x.x.x.x.xc +x.x.x.x.x.. +.x.x.x.x.xc +ENDMAP + # # ############################################################################### @@ -1276,3 +1409,342 @@ TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup : wizlab_setup(_G, "The Alchemist's Tower") MAP ENDMAP + +############################################################################### +# Random and semi-random Wizard vaults +############################################################################### + +############################################################################### +# Chambers of the Cloud Mage +# +NAME: wizlab_cloud +ORIENT: encompass +TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +KMONS: 1 = col:silver patrolling wizard name:Cloud_Mage name_replace \ + name_definite spells:mephitic_cloud;freezing_cloud;poisonous_cloud;\ + airstrike;blink_range;blink_range hd:20 hp:150 ; \ + longbow . arrow q:30 +KMONS: * = vapour / air elemental +SUBST: . = .:120 * +MARKER: ! = lua:fog_machine { \ + pow_max = 10, delay_min = 10, delay_max = 40, \ + size = 1, size_buildup_amnt = 5, \ + size_buildup_time = 25, cloud_type = "steam" \ + } +KITEM: % = w:20 potion of levitation / w:20 potion of water / \ + potion of magic / potion of speed / potion of resistance / \ + gold / potion of agility / potion of brilliance +KITEM: ? = randbook disc:air +KITEM: $ = wand of lightning / staff of air / ring of levitation /\ + gold / scroll of silence / ring of teleport control / \ + amulet of controlled flight / quick blade / ring of evasion /\ + ring of see invisible +NSUBST: $ = 1:? / *:$ +SUBST: $ = $% +: wizlab_setup(_G, "The Cloud Mage's Chambers") +MAP +cccccccccccccccccccccccccccccccccccccccccccc +cccccccc............................cccccccc +cccccc...wwwwwwwwwwwwwwwwwwwwwwwwww...cccccc +cccc...wwwwwwwccccccccccccccccccccwww...cccc +ccc..wwwwwwwccccccccccccccccccccccwwwww..ccc +ccc.wwwwwwcccccccc..c..c..c..c..ccwwwwww.ccc +cc..wwwwwcc.....c.!............!.cwwwwww..cc +cc.wwwwwwcc.$$$.c................cwwwwwww.cc +c..wwwwwccc.$$$.c................cWWWWWWW..c +c..wwwwwccc.$$$.+...1............+.........c +c..wwwwwccc.$$$.c................cWWWWWWW..c +cc.wwwwwwcc.$$$.c................cwwwwwww.cc +cc..wwwwwcc.....c.!............!.cwwwwww..cc +ccc.wwwwwwcccccccc..c..c..c..c..ccwwwwww.ccc +ccc..wwwwwwwccccccccccccccccccccccwwwww..ccc +cccc...wwwwwwwccccccccccccccccccccwww...cccc +cccccc...wwwwwwwwwwwwwwwwwwwwwwwwww...cccccc +cccccccc............................cccccccc +cccccccccc.......ccccccccccccccccccccccccccc +ccccccccc.......cccccccccccccccccccccccccccc +cccccccc.......ccccccccc.ccccccccccccccccccc +ccccccc.......ccccccccc.!.cccccccccccccccccc +cccccc!.....!ccccccccc.....ccccccccccccccccc +cccccccc.......cccccc........ccccccccccccccc +cccccccccc.......ccc..........cccccccccccccc +cccccccccccc!.....ccc..........ccccccccccccc +ccccccccccc.....!ccccc+cc......ccccccccccccc +cccccccccccc......ccc...cc!.....cccccccccccc +ccccccccccc......ccc.....cc.....cccccccccccc +cccccccccccc......c.......c......ccccccccccc +cccccccccc.!.....cc.<.A.<.c......ccccccccccc +cccccccccc.c......c.......cc...!cccccccccccc +cccccccccc.cc.....cc.....cc......ccccccccccc +cccccccccc+cccc....cc...cc!.....cccccccccccc +cccccccccc....cc...!ccccc......ccccccccccccc +cccccccccc.%%.cc.............ccccccccccccccc +cccccccccc.%%.ccc...........cccccccccccccccc +cccccccccc....ccc..........!...+....cccccccc +cccccccccccccccccc........cccccc.%%.cccccccc +ccccccccccccccccccc......ccccccc.%%.cccccccc +cccccccccccccccccccc.!..cccccccc....cccccccc +cccccccccccccccccccccccccccccccccccccccccccc +ENDMAP + +############################################################################### +# Random wizlab (death theme) (by Mu.) +# +NAME: wizlab_random1 +ORIENT: encompass +TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +LFLOORCOL: darkgrey +COLOUR: =c = white +COLOUR: " = red +KMONS: a = slave +KMONS: b = human +KMONS: d = troll +NSUBST: b = 3:d / *:b +KMONS: p = vampire knight / w:5 vampire +KMONS: V = vampire mage +KMONS: L = patrolling lich / w:5 patrolling ancient lich +KMONS: u = patrolling mummy / w:2 patrolling guardian mummy +KMONS: M = patrolling mummy priest / w:2 patrolling greater mummy +MARKER: u = lua:fog_machine { \ + pow_max = 10, delay_min = 10, delay_max = 40, \ + size = 1, size_buildup_amnt = 5, \ + size_buildup_time = 25, cloud_type = "foul pestilence" \ + } +MARKER: M = lua:fog_machine { \ + pow_max = 10, delay_min = 10, delay_max = 40, \ + size = 1, size_buildup_amnt = 5, \ + size_buildup_time = 25, cloud_type = "foul pestilence" \ + } +KITEM: $ = potion of healing / potion of heal wounds / potion of decay / \ + scroll of torment / potion of blood / w:20 gold +KITEM: | = ring of regeneration / ring of life protection / amulet of warding / \ + wand of draining / wand of healing / any book / acquire book / \ + staff of death / potion of healing / potion of heal wounds / \ + potion of decay / potion of blood +SUBST: | = |$ +: wizlab_setup(_G, "Random1") +MAP +cccccccccccccccccccccccccccccccccccccccccccccc +ccc....LccccccccccccucM.cucccccccccccccccccccc +ccc.....c...c$$$cccc.c..c.cccccccccccccc.....c +ccc.....+.<..$$$cccc.c..c.c..................c +ccc.....c...c$$$cccc+c++c+c.cccccccccccc.....c +ccc.....cccccccccccc......c+cccccccccccc.....c +cccc.ccccccccccc...c......c....ccccccccc....Lc +cccc.ccccccc.......+......+........ccccccc+ccc +cccc.ccccc.........c......c......p...cccc...cc +cccc.cccc....nnnnnncccccccc...........ccc.<.cc +cccc.ccc.p..nna.aaccc|||||ccc..........cc...cc +cccc.ccc....n..cccc...nnn...ccccnnnnn..ccc.ccc +cccc.cc....nnacc......nbn......ccaaan...c$$$cc +cccc.cc....n..c..nnn..nnn..nnn..c..an...c$$$cc +cccc.cc....nacc..nbn..."...nbn..cca.n...c$$$cc +cccc..+....n.c...nnn..."...nnn...cccc+cccccccc +ccccccccc+cccc......"..".."......cc......+..uc +ccu..+......c|......."V"V".......|c......ccccc +cccccc......c|.nnn...V"""V...nnn.|c......+..Mc +ccM..+......c|.nbn"""""Y"""""nbn.|c......+...c +cc...+......c|.nnn...V"""V...nnn.|c......ccccc +cccccc......c|.......".".".......|c......+..uc +ccu..+......cc......"..".."......cccc+cccccccc +ccccccccc+cccc...nnn..."...nnn...c.n....+...cc +cc...cc...n.acc..nbn..."...nbn..cc.n....ccc.cc +cc.A.cc...n.a.c..nnn..nnn..nnn..c.an....ccc.cc +cc...cc...na..cc......nbn......cc.nn....ccc.cc +ccc.cccc..nnnnncccc...nnn...cccc.an....cccc.cc +cc...ccc..........ccc.....ccca...nn....cccc.cc +cc.<.cccc...........ccc+ccccnnnnnn..p.ccccc.cc +cc...ccccc....p.....c......c.........cccccc.cc +ccc+cccccccc........c......+.......cccccccc.cc +c.....cccccccccc....c......c...cccccccccccc.cc +c.aaa.ccccccccccccc+c......ccccccccccccc.....c +c..p..ccccccccccccc.c+c++c+ccccc$$$c...c.....c +c..p................c.c..c.ccccc$$$..<.+.....c +c.....ccccccccccccccc.c..c.ccccc$$$c...c.....c +cccccccccccccccccccccuc.McucccccccccccccL....c +cccccccccccccccccccccccccccccccccccccccccccccc +ENDMAP + +############################################################################### +# Random wizard (Death theme) (by Mu.) +# +NAME: wizlab_random2 +ORIENT: encompass +TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +LFLOORCOL: darkgrey +COLOUR: =c = white +COLOUR: " = red +KFEAT: _ = altar_kikubaaqudgha +KMONS: s = slave +NSUBST: ' = 1:= / *:c +NSUBST: ; = 1:= / *:c +KMONS: V = vampire / vampire knight / vampire mage +KMONS: a = patrolling vampire +KMONS: z = skeletal warrior +KMONS: p = shadow +### statue needs a description still +### This statue really needs vampiric draining as a monster spell! +KMONS: 8 = ice statue col:darkgrey spells:pain;bolt_of_draining;pain;\ + pain;pain;major_healing name:black_statue \ + name_replace name_descriptor hd:15 hp:150 +KMONS: L = patrolling lich / w:5 patrolling ancient lich +KMONS: u = patrolling mummy / w:2 patrolling guardian mummy +KMONS: M = patrolling mummy priest / w:2 patrolling greater mummy +MARKER: u = lua:fog_machine { \ + pow_max = 10, delay_min = 10, delay_max = 40, \ + size = 1, size_buildup_amnt = 5, \ + size_buildup_time = 25, cloud_type = "foul pestilence" \ + } +MARKER: M = lua:fog_machine { \ + pow_max = 10, delay_min = 10, delay_max = 40, \ + size = 1, size_buildup_amnt = 5, \ + size_buildup_time = 25, cloud_type = "foul pestilence" \ + } +MARKER: ! = lua:fog_machine { \ + pow_max = 10, delay_min = 10, delay_max = 40, \ + size = 1, size_buildup_amnt = 5, \ + size_buildup_time = 25, cloud_type = "foul pestilence" \ + } +KFEAT: ! = granite_statue +KITEM: * = book of unlife +KITEM: % = dagger unrand:morg / demon blade unrand:leech / dagger unrand:vampires_tooth +KITEM: $ = potion of healing / potion of heal wounds / potion of decay / \ + scroll of torment / potion of blood / w:20 gold +KITEM: ^ = potion of healing / potion of heal wounds / potion of decay / \ + scroll of torment / potion of blood / w:20 gold +KFEAT: ^ = alarm trap +KITEM: | = ring of life protection / amulet of warding / \ + wand of draining / wand of healing / any book / acquire book / \ + staff of death / potion of healing / potion of heal wounds / \ + potion of decay / potion of blood +SUBST: B = $$|.. +: wizlab_setup(_G, "Random") +MAP +cccccccccccccccccccccccccccccccccccccccccccccc +cccccccccccccccccccccc|*|ccccccccccccccccccccc +ccccccccccccccccccccc|...|cccccccccccccccccccc +cccccccccccccccccccc.......ccccccccccccccccccc +cccccccc$$$c...c...c..._...c...c...c$$$ccccccc +cccccccc$$$+.L.+.!.+.......+.!.+.L.+$$$ccccccc +cccccccc$$$c...c...c.......c...c...c$$$ccccccc +cccccccccccccccccccc.......ccccccccccccccccccc +ccccccccccccccccccccccc+cccccccccccccccccccccc +cccccccccccccccccccccc...ccccccccccccccccccccc +cccccccccccccccccccc.......ccccccccccccccccccc +cccccccccccccccccc.....c.....ccccccccccccccccc +ccccccccccccccccc......c......cccccccccccccccc +cccccccccccccccc.......c.......ccccccccccccccc +cccccccccccccccc.......c.......cccccccc..ccccc +cccccccccccccccc.......c.......ccccccc....cccc +cccccccccccccccc.szs...cnnn....cccccc..cc..ccc +cccccccccccccccc.sss.G.cnsn....ccccc..cccc..cc +cc............cc.......cnnn....cccc..ccccc..cc +cc............cc.......c.".....ccc..ccccc..ccc +cc.ccccccccc..cc.......c.".....cc..ccccc..cccc +cc.cG$....|c..cc.......c.".....c..ccccc..ccccc +cc.c$L.....c..cc.......c.".....c..ccc...cccccc +cc.c.......c..cc.....G.c.Y.V.V.+.ccn...ccccccc +cc.c.......c..cc.......c.".....cccsn....cccccc +cc.c.......c..cc.......c.".....ccs.n...ccccccc +cc.c.......+..cc.......c.".....ccc.n....cccccc +cc.c%......+..cc.......c.".....ccccn.....ncccc +cc.ccccccccccccc.......cnnn....cccsn..p..nsccc +cc.............+.....G.cnsn....cc..n.ppp.n.scc +cccccccccccccccc.......cnnn....cccsn.p8p.n..cc +cccccccccccccccc.......c.......cccccpppppncccc +cccccccccccccccc.......c.......ccccccccccccccc +cccBBBBBBBBBBccc.......c.......ccccacacacacccc +cccBBBBBBBBBBccc.......cnnn....cccc+c+c+c+cccc +cccBBBc''cBBBccc.....G.cnsn....ccc.........ccc +ccc'c'cM.c'ccccc.......cnnn....ccc.........+ac +cccucuc..cuccccc.......c.".....ccc.........ccc +ccc.c.c..c.ccccc.......c.".....cc..........+ac +ccc+c+c++c+ccccc.......c.".....cc..........ccc +cc.............c.......c.".....c.....^^^...+ac +cc.T...........+.....G.c.Y.....+.....^Y^...ccc +cc.............c.......c.".....c.....^^^...+ac +ccc+c+c+c++ccccc.......c.".....cc..........ccc +ccc.c.c.c..ccccc.......c.".....cc..........+ac +cccucucuc..ccccc.......c.".....ccc.........ccc +ccc;c;c;c.Mccccc.szs...cnnn....ccc.........+ac +cccBBBBBc;;ccccc.sss.G.cnsnV.V.ccc.........ccc +cccBBBBBBBBBcccc.......cnnn....cccc+c+c+c+cccc +cccBBBBBBBBBcccc.......c.......ccccacacacacccc +cccccccccccccccc.......c.......ccccccccccccccc +cccccccccccccccc.......c.......ccccccccccccccc +cccccccccccccccc.......c.......ccccccccccccccc +cccccccccccccccc.....ccccc.....ccccccccccccccc +cccccccccccccccc...ccc...ccc...ccccccccccccccc +ccccccccccccccccc+cc.......cc+cccccccccccccccc +cccccccccccccccc...............ccccccccccccccc +cccccccccccccccc.....<.A.<.....ccccccccccccccc +cccccccccccccccc...............ccccccccccccccc +cccccccccccccccccccccccccccccccccccccccccccccc +ENDMAP + +NAME: wizlab_random3 +ORIENT: encompass +TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +MAP +cccccccccccccccccccccccccccccccvvvvvvvvvvvvvvv +ccccccccccccccclllllll.........+.v.!.v......%v +ccccccccccccclllllllllll.......+.v.v.v.v...8%v +ccccccccccclllllllllllllll.....v.!.v.!.v....%v +cccccccccclllllllllllllllll....vvvvvvvvv.8.1%v +ccccccccclllllllllllllllllll...vcccccccc%%%%%v +ccccccccclllllll....llllllll...vcccccccccccccv +cccccccclllllll......llllllll..vvvvvvvvvvvvvvv +cccccccclllllll..18..........................c +cccccccllllllll..22..........................c +cccccccllllllll......lllllllllvv+vvvvvvvvvvvvv +ccccccclllllllll....llllllllllv.......+......v +cccccccllllllllll..lllllllllllv.......v.....2v +cccccccllllllllll..lllllllllllv.......v.....2v +cccccccllllllllll..lllllllllllv|||||||v.....2v +cccccccllllllllll..lllllllllllvvvvvvvvv.....2v +cccccccclllllllll..llllllllllllcccccccv......v +cccccccclllllllll..lllllllllllccccccccv......v +cccccccccllllllll..lllllllllllllccccccv......v +cccccccccllllllll..llllllllllllllccccvv+vvv+vv +cccccccccccclllll..llllllllllllllccccv%%%v%%%v +cccccvvvvvvvvvvll..lllllllllllllcllccv%%%v%%%v +cccccvll......v.....llllllllllllllcccv%%%v%%%v +cccccvl1......v......llllllllllllllllvvAvvvBvv +cccccvcc......+.......vlllllllllllllllvavcv.vc +cccccvll......v.......vclclllllllllllcvavcvbvc +cccccvl1......v.......vvvvlllllllllcccvavcvbvc +cccccvcl......v...........llllllllllllvavcvbvc +cccccvlllll.lllll.lllllllllllllllllllcvavcvbvc +cccccvcl......v.......vvvvvvlllllllllcvavcvbvc +cccccvll......v.......vccclllllllllllcvavcvbvc +cccccvl1......vvvvvv+vvcccllllllllllccvavvvbvc +cccccvcc......v.......vccccllllllllllcvaa.bbvc +cccccvll......v8..2..8vcccclllllllllccvvv+vvvc +cccccvl1......v.......vccccclllllllllllcv.vccc +cccccvvvvvvvvvv.......vccccllllllllllllcv.vccc +ccccccccccccccv.......vcccllllllllllllccv.vccc +cvvvvvvvccccccvvvv++vvvc....lllllllcllccv.vccc +cv.....vccccc....o..o........lllllllllccv.vccc +cv. Date: Sun, 27 Dec 2009 21:23:53 +0300 Subject: Make item_is_mundane a method of item_def. --- crawl-ref/source/artefact.cc | 2 +- crawl-ref/source/externs.h | 3 +++ crawl-ref/source/itemprop.cc | 27 --------------------------- crawl-ref/source/itemprop.h | 3 --- crawl-ref/source/items.cc | 27 +++++++++++++++++++++++++++ crawl-ref/source/makeitem.cc | 8 ++++---- 6 files changed, 35 insertions(+), 35 deletions(-) diff --git a/crawl-ref/source/artefact.cc b/crawl-ref/source/artefact.cc index 9b2cc6feed..71ae7b27cd 100644 --- a/crawl-ref/source/artefact.cc +++ b/crawl-ref/source/artefact.cc @@ -1923,7 +1923,7 @@ bool make_item_randart( item_def &item, bool force_mundane ) if (item.flags & ISFLAG_UNRANDART) return (false); - if (item_is_mundane(item) && !one_chance_in(5) && !force_mundane) + if (item.is_mundane() && !one_chance_in(5) && !force_mundane) return (false); ASSERT(!item.props.exists(KNOWN_PROPS_KEY)); diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index cf2b98d8d0..5f4f5e7e40 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -536,6 +536,9 @@ public: // Returns true if this item should be preserved as far as possible. bool is_critical() const; + // Returns true if this item should not normally be enchanted. + bool is_mundane() const; + private: std::string name_aux(description_level_type desc, bool terse, bool ident, diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index ea2f8bd7b3..bf47f3ab96 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -562,33 +562,6 @@ bool item_ident( const item_def &item, unsigned long flags ) return ((item.flags & flags) == flags); } -// Is item something that no one would usually bother enchanting? -bool item_is_mundane(const item_def &item) -{ - switch (item.base_type) - { - case OBJ_WEAPONS: - if (item.sub_type == WPN_CLUB - || item.sub_type == WPN_GIANT_CLUB - || item.sub_type == WPN_GIANT_SPIKED_CLUB - || item.sub_type == WPN_KNIFE) - { - return (true); - } - break; - - case OBJ_ARMOUR: - if (item.sub_type == ARM_ANIMAL_SKIN) - return (true); - break; - - default: - break; - } - - return (false); -} - void set_ident_flags( item_def &item, unsigned long flags ) { preserve_quiver_slots p; diff --git a/crawl-ref/source/itemprop.h b/crawl-ref/source/itemprop.h index 99c861da67..5604d352f5 100644 --- a/crawl-ref/source/itemprop.h +++ b/crawl-ref/source/itemprop.h @@ -14,9 +14,6 @@ struct bolt; void init_properties(void); -// Returns true if this item should not normally be enchanted. -bool item_is_mundane(const item_def &item); - // cursed: bool item_known_cursed( const item_def &item ); bool item_known_uncursed( const item_def &item ); diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 7543da8ea5..29b25a021b 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -2934,6 +2934,33 @@ bool item_def::is_critical() const && plus != RUNE_ABYSSAL); } +// Is item something that no one would usually bother enchanting? +bool item_def::is_mundane() const +{ + switch (base_type) + { + case OBJ_WEAPONS: + if (sub_type == WPN_CLUB + || sub_type == WPN_GIANT_CLUB + || sub_type == WPN_GIANT_SPIKED_CLUB + || sub_type == WPN_KNIFE) + { + return (true); + } + break; + + case OBJ_ARMOUR: + if (sub_type == ARM_ANIMAL_SKIN) + return (true); + break; + + default: + break; + } + + return (false); +} + static void _rune_from_specs(const char* _specs, item_def &item) { char specs[80]; diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc index 977198929d..442b500112 100644 --- a/crawl-ref/source/makeitem.cc +++ b/crawl-ref/source/makeitem.cc @@ -1699,7 +1699,7 @@ brand_ok: } else if ((force_good || is_demonic(item) || forced_ego || x_chance_in_y(51 + item_level, 200)) - && (!item_is_mundane(item) || force_good)) + && (!item.is_mundane() || force_good)) { // Make a better item (possibly ego). if (!no_brand) @@ -2399,7 +2399,7 @@ static void _generate_armour_item(item_def& item, bool allow_uniques, } else if ((force_good || forced_ego || item.sub_type == ARM_WIZARD_HAT || x_chance_in_y(51 + item_level, 250)) - && (!item_is_mundane(item) || force_good)) + && (!item.is_mundane() || force_good)) { // Make a good item... item.plus += random2(3); @@ -3233,7 +3233,7 @@ static bool _weapon_is_visibly_special(const item_def &item) if (visibly_branded || is_artefact(item)) return (true); - if (item_is_mundane(item)) + if (item.is_mundane()) return (false); if ((item.plus || item.plus2) @@ -3256,7 +3256,7 @@ static bool _armour_is_visibly_special(const item_def &item) if (visibly_branded || is_artefact(item)) return (true); - if (item_is_mundane(item)) + if (item.is_mundane()) return (false); if (item.plus && !one_chance_in(3)) -- cgit v1.2.3-54-g00ecf From 56c839b54f62141c2ae92dc0a8a92c58323bdbd7 Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Mon, 28 Dec 2009 03:56:44 +0530 Subject: Shoals tides do not fill in features when the tide is receding. Sunlight-dried squares will stay dry until reached by a rising tide. --- crawl-ref/source/dgn-shoals.cc | 51 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/crawl-ref/source/dgn-shoals.cc b/crawl-ref/source/dgn-shoals.cc index 201f3f4690..c4f51753da 100644 --- a/crawl-ref/source/dgn-shoals.cc +++ b/crawl-ref/source/dgn-shoals.cc @@ -48,6 +48,14 @@ enum shoals_height_thresholds SHT_SHALLOW_WATER = -14 }; +enum tide_direction +{ + TIDE_RISING, + TIDE_FALLING +}; + +static tide_direction _shoals_tide_direction; + static double _to_radians(int degrees) { return degrees * M_PI / 180; @@ -541,6 +549,33 @@ static void _shoals_apply_tide_feature_at(coord_def c, dungeon_terrain_changed(c, feat, true, false, true); } +static int _shoals_feature_height(dungeon_feature_type feat) +{ + switch (feat) + { + case DNGN_FLOOR: + return SHT_FLOOR; + case DNGN_SHALLOW_WATER: + return SHT_SHALLOW_WATER; + case DNGN_DEEP_WATER: + return SHT_SHALLOW_WATER - 1; + default: + return 0; + } +} + +// Determines if the +static tide_direction _shoals_feature_tide_height_change( + dungeon_feature_type oldfeat, + dungeon_feature_type newfeat) +{ + const int height_delta = + _shoals_feature_height(newfeat) - _shoals_feature_height(oldfeat); + // If the apparent height of the new feature is greater (floor vs water), + // the tide is receding. + return height_delta < 0? TIDE_RISING : TIDE_FALLING; +} + static void _shoals_apply_tide_at(coord_def c, int tide) { const int effective_height = shoals_heights(c) - tide; @@ -549,6 +584,14 @@ static void _shoals_apply_tide_at(coord_def c, int tide) // Make sure we're not sprouting new walls. if (feat_is_wall(newfeat)) newfeat = DNGN_FLOOR; + const dungeon_feature_type oldfeat = grd(c); + + if (oldfeat == newfeat + || (_shoals_feature_tide_height_change(oldfeat, newfeat) != + _shoals_tide_direction)) + { + return; + } _shoals_apply_tide_feature_at(c, newfeat); } @@ -630,9 +673,15 @@ void shoals_apply_tides(int turns_elapsed) _shoals_init_tide(); int tide = env.properties[ENVP_SHOALS_TIDE_KEY].get_short(); int acc = env.properties[ENVP_SHOALS_TIDE_VEL].get_short(); + const int old_tide = tide; while (turns_elapsed-- > 0) _shoals_run_tide(tide, acc); env.properties[ENVP_SHOALS_TIDE_KEY] = short(tide); env.properties[ENVP_SHOALS_TIDE_VEL] = short(acc); - _shoals_apply_tide(tide / TIDE_MULTIPLIER); + if (old_tide / TIDE_MULTIPLIER != tide / TIDE_MULTIPLIER) + { + _shoals_tide_direction = + tide > old_tide ? TIDE_RISING : TIDE_FALLING; + _shoals_apply_tide(tide / TIDE_MULTIPLIER); + } } -- cgit v1.2.3-54-g00ecf From d333f654e907b79612b62581f8131d6edaff8191 Mon Sep 17 00:00:00 2001 From: David Ploog Date: Sun, 27 Dec 2009 23:30:40 +0100 Subject: Minor modifications of cavernous ossuary (Lordsloth). --- crawl-ref/source/dat/ossuary.des | 44 ++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/crawl-ref/source/dat/ossuary.des b/crawl-ref/source/dat/ossuary.des index f0e5e18580..89d9465766 100644 --- a/crawl-ref/source/dat/ossuary.des +++ b/crawl-ref/source/dat/ossuary.des @@ -476,11 +476,21 @@ TAGS: ossuary no_item_gen no_monster_gen ITEM: any scroll / any potion MONS: kobold skeleton / goblin skeleton / gnoll skeleton / \ orc skeleton +MONS: mummy # Loot: 10-19 +# Some random content. +SHUFFLE: Bb/Zz, Dd/Ww, Ee/Vv +SUBST: Z=c, z=c, W=c, w=c, V=c, v=c +SUBST: B=X, D=X, E=X +NSUBST: b = 1:= / c +NSUBST: d = 1:= / c +NSUBST: e = 1:= / c +SUBST: X = x2 # Guaranteed 10 items and 10 mummies, two in hidden rooms. # 50/50 chance of loot for each of the eleven rats in the rat room. KITEM: x = any scroll / any potion KMONS: x = mummy +NSUBST: ' = 10:^ / *:. KFEAT: ^ = dart trap / arrow trap KITEM: y = any scroll w:5 / any potion w:5 / nothing w:10 KMONS: y = rat skeleton @@ -489,23 +499,23 @@ KMONS: y = rat skeleton MAP ccc cccxccccc - ccc....+.^c cccccc - cc.1.ccccc.c cc.+^.cc - cc..ccc cc+cc cc..cc..cc - cc.^cc cc...ccccc..cccc.1ccc -ccc cc+cc c+.x.+...1.cc cc...cc -cAccc...cc cc...cccxccc ccc.cc -c..+.^1.+c cc+cc ccc ccc cc+cc -c Date: Sun, 27 Dec 2009 22:01:19 +0100 Subject: A few spacing changes. --- crawl-ref/source/traps.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crawl-ref/source/traps.cc b/crawl-ref/source/traps.cc index 9083576b6e..b7ca9f2dec 100644 --- a/crawl-ref/source/traps.cc +++ b/crawl-ref/source/traps.cc @@ -686,18 +686,18 @@ int trap_def::max_damage(const actor& act) // players -- this choice prevents traps from easily killing // large monsters fairly deep within the dungeon. if (act.atype() == ACT_MONSTER) - level = 0; + level = 0; switch (this->type) { - case TRAP_NEEDLE: return 0; + case TRAP_NEEDLE: return 0; case TRAP_DART: return 4 + level/2; case TRAP_ARROW: return 7 + level; case TRAP_SPEAR: return 10 + level; case TRAP_BOLT: return 13 + level; case TRAP_AXE: return 15 + level; - default: return 0; - case TRAP_BLADE: return (level ? level*2 : 10) + 28; + case TRAP_BLADE: return (level ? 2*level : 10) + 28; + default: return 0; } return (0); @@ -762,7 +762,7 @@ static bool _disarm_is_deadly(trap_def& trap) if (trap.type == TRAP_NEEDLE && you.res_poison() <= 0) dam += 15; // arbitrary - return you.hp <= dam; + return (you.hp <= dam); } // where *must* point to a valid, discovered trap. -- cgit v1.2.3-54-g00ecf From 4e6820b10db6edf0d821e785df046bcbcfa165e1 Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Mon, 28 Dec 2009 06:05:48 +0530 Subject: Make _build_vaults check for collisions by default, should fix minivaults appearing in encompass vaults. --- crawl-ref/source/dbg-util.cc | 15 ++++++++------- crawl-ref/source/dungeon.cc | 14 ++++++++++++-- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/crawl-ref/source/dbg-util.cc b/crawl-ref/source/dbg-util.cc index 57bf3b1b37..84e0f87a0e 100644 --- a/crawl-ref/source/dbg-util.cc +++ b/crawl-ref/source/dbg-util.cc @@ -129,12 +129,15 @@ void debug_dump_levgen() else { const CrawlHashTable &vaults = props[TEMP_VAULTS_KEY].get_table(); - CrawlHashTable::const_iterator i = vaults.begin(); - - for (; i != vaults.end(); ++i) + if (!vaults.empty()) { - mprf(" %s: %s", i->first.c_str(), - i->second.get_string().c_str()); + CrawlHashTable::const_iterator i = vaults.begin(); + + for (; i != vaults.end(); ++i) + { + mprf(" %s: %s", i->first.c_str(), + i->second.get_string().c_str()); + } } } mpr(""); @@ -413,5 +416,3 @@ int debug_cap_stat(int stat) stat > 127 ? 127 : stat); } - - diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 61b09b2717..37ecb28ef6 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -202,7 +202,7 @@ static bool _build_secondary_vault(int level_number, const map_def *vault, static bool _build_vaults(int level_number, const map_def *vault, int rune_subst = -1, bool build_only = false, - bool check_collisions = false, + bool check_collisions = true, bool make_no_exits = false, const coord_def &where = coord_def(-1, -1)); static void _vault_grid(vault_placement &, @@ -823,7 +823,17 @@ void dgn_register_place(const vault_placement &place, bool register_vault) dgn_register_vault(place.map); if (!place.map.has_tag("layout")) - _mask_vault(place, MMT_VAULT | MMT_NO_DOOR); + { + if (place.map.orient == MAP_ENCOMPASS) + { + for (rectangle_iterator ri(0); ri; ++ri) + dgn_Map_Mask(*ri) |= MMT_VAULT | MMT_NO_DOOR; + } + else + { + _mask_vault(place, MMT_VAULT | MMT_NO_DOOR); + } + } if (place.map.has_tag("no_monster_gen")) _mask_vault(place, MMT_NO_MONS); -- cgit v1.2.3-54-g00ecf From 892714e8a99eb74424a3a06ad69f45f84ac9e4ca Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Mon, 28 Dec 2009 06:10:16 +0530 Subject: Fix shoals builder dying if an island is placed too close to map edge. --- crawl-ref/source/dgn-shoals.cc | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/crawl-ref/source/dgn-shoals.cc b/crawl-ref/source/dgn-shoals.cc index c4f51753da..da0070239e 100644 --- a/crawl-ref/source/dgn-shoals.cc +++ b/crawl-ref/source/dgn-shoals.cc @@ -94,7 +94,9 @@ static coord_def _random_point_from(const coord_def &c, int radius, { const double directed_radians( directed_angle == -1? 0.0 : _to_radians(directed_angle)); - while (true) { + int attempts = 70; + while (attempts-- > 0) + { const double angle = directed_angle == -1? _to_radians(random2(360)) : ((coinflip()? directed_radians : -directed_radians) @@ -107,9 +109,11 @@ static coord_def _random_point_from(const coord_def &c, int radius, return res; } } + return coord_def(); } -static coord_def _random_point(int offset = 0) { +static coord_def _random_point(int offset = 0) +{ return coord_def(random_range(offset, GXM - offset - 1), random_range(offset, GYM - offset - 1)); } @@ -119,7 +123,8 @@ static void _shoals_island_center(const coord_def &c, int n_perturb, int radius, { for (int i = 0; i < n_perturb; ++i) { coord_def p = _random_point_from(c, random2(1 + radius)); - shoals_heights(p) += random_range(bounce_low, bounce_high); + if (!p.origin()) + shoals_heights(p) += random_range(bounce_low, bounce_high); } } @@ -160,12 +165,12 @@ static void _shoals_build_island() const int addition_offset = random_range(2, 10); coord_def offsetC = _random_point_from(c, addition_offset); - - _shoals_island_center(offsetC, random_range(N_PERTURB_OFFSET_LOW, - N_PERTURB_OFFSET_HIGH), - random_range(PERTURB_OFFSET_RADIUS_LOW, - PERTURB_OFFSET_RADIUS_HIGH), - 25, 35); + if (!offsetC.origin()) + _shoals_island_center(offsetC, random_range(N_PERTURB_OFFSET_LOW, + N_PERTURB_OFFSET_HIGH), + random_range(PERTURB_OFFSET_RADIUS_LOW, + PERTURB_OFFSET_RADIUS_HIGH), + 25, 35); } } -- cgit v1.2.3-54-g00ecf From 585dab9ccd0db72c6b76bddc3003f6f504fe9c3a Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 27 Dec 2009 18:45:11 -0600 Subject: remove mpr message length limitation --- crawl-ref/source/message.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc index 6a3d36c487..a6adba6847 100644 --- a/crawl-ref/source/message.cc +++ b/crawl-ref/source/message.cc @@ -413,12 +413,17 @@ int channel_to_colour( msg_channel_type channel, int param ) static void do_message_print( msg_channel_type channel, int param, const char *format, va_list argp ) { - // Is this limit intentional? char buff[200]; - vsnprintf( buff, sizeof( buff ), format, argp ); - buff[199] = 0; - - mpr(buff, channel, param); + size_t len = vsnprintf( buff, sizeof( buff ), format, argp ); + if (len < sizeof( buff )) { + mpr( buff, channel, param ); + } + else { + char *heapbuf = (char*)malloc( len + 1 ); + vsnprintf( heapbuf, len + 1, format, argp ); + mpr( heapbuf, channel, param ); + free( heapbuf ); + } } void mprf( msg_channel_type channel, int param, const char *format, ... ) -- cgit v1.2.3-54-g00ecf From 608eec96965d630ced67178319351c2a6b40be05 Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Mon, 28 Dec 2009 06:25:39 +0530 Subject: Fix map masks not being checked correctly for collisions. --- crawl-ref/source/dungeon.cc | 2 +- crawl-ref/source/maps.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 37ecb28ef6..18ae2d498b 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -202,7 +202,7 @@ static bool _build_secondary_vault(int level_number, const map_def *vault, static bool _build_vaults(int level_number, const map_def *vault, int rune_subst = -1, bool build_only = false, - bool check_collisions = true, + bool check_collisions = false, bool make_no_exits = false, const coord_def &where = coord_def(-1, -1)); static void _vault_grid(vault_placement &, diff --git a/crawl-ref/source/maps.cc b/crawl-ref/source/maps.cc index 07da121e02..072b7c8557 100644 --- a/crawl-ref/source/maps.cc +++ b/crawl-ref/source/maps.cc @@ -337,7 +337,7 @@ static bool _safe_vault_place(const map_def &map, if (lines[dp.y][dp.x] == ' ') continue; - if (dgn_Map_Mask[cp.x][cp.y] == MMT_VAULT) + if (dgn_Map_Mask[cp.x][cp.y] & MMT_VAULT) return (false); const dungeon_feature_type dfeat = grd(cp); -- cgit v1.2.3-54-g00ecf From 5f928a55ffa589e57045eb99c7427621e63f2a50 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Mon, 28 Dec 2009 10:39:13 +1000 Subject: Mark spec'd items for summoned monsters as summoned. --- crawl-ref/source/dungeon.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 18ae2d498b..89e643a68b 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -4533,6 +4533,11 @@ static void _dgn_give_mon_spec_items(mons_spec &mspec, if (item_made != NON_ITEM && item_made != -1) { item_def &item(mitm[item_made]); + + // Mark items on summoned monsters as such. + if (mspec.abjuration_duration != 0) + item.flags |= ISFLAG_SUMMONED; + if (!mon.pickup_item(item, 0, true)) destroy_item(item_made, true); } -- cgit v1.2.3-54-g00ecf From b29345dd9d85fb18ec21ad19db53636a7bbf68e2 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Mon, 28 Dec 2009 11:01:51 +1000 Subject: Move and tweak Mislead code. Newly placed monsters during the mislead status are also given a mislead_as monster type. --- crawl-ref/source/makefile.obj | 1 + crawl-ref/source/mislead.cc | 127 ++++++++++++++++++++++++++++++++++++++++++ crawl-ref/source/mislead.h | 8 +++ crawl-ref/source/mon-cast.cc | 103 +--------------------------------- crawl-ref/source/mon-place.cc | 4 ++ 5 files changed, 141 insertions(+), 102 deletions(-) create mode 100644 crawl-ref/source/mislead.cc create mode 100644 crawl-ref/source/mislead.h diff --git a/crawl-ref/source/makefile.obj b/crawl-ref/source/makefile.obj index 926b9d5e50..1b1d038f31 100644 --- a/crawl-ref/source/makefile.obj +++ b/crawl-ref/source/makefile.obj @@ -102,6 +102,7 @@ menu.o \ message.o \ mgen_data.o \ misc.o \ +mislead.o \ mon-abil.o \ mon-act.o \ mon-behv.o \ diff --git a/crawl-ref/source/mislead.cc b/crawl-ref/source/mislead.cc new file mode 100644 index 0000000000..64c574d97a --- /dev/null +++ b/crawl-ref/source/mislead.cc @@ -0,0 +1,127 @@ +/* File: mislead.cc + * Summary: Handling of the Mislead spell and stats + */ + +#include "AppHdr.h" +#include "mislead.h" + +#include "enum.h" +#include "env.h" +#include "message.h" +#include "monster.h" +#include "mon-iter.h" +#include "mon-util.h" +#include "view.h" +#include "random.h" +#include "tutorial.h" +#include "xom.h" + +bool unsuitable_misled_monster(monster_type mons) +{ + return (mons_is_unique(mons) || mons_is_mimic(mons) + || mons_class_is_stationary(mons) || mons_genus(mons) == MONS_DRACONIAN + || mons == MONS_DANCING_WEAPON || mons == MONS_UGLY_THING + || mons == MONS_VERY_UGLY_THING || mons == MONS_ZOMBIE_SMALL + || mons == MONS_ZOMBIE_LARGE || mons == MONS_SKELETON_SMALL + || mons == MONS_SKELETON_LARGE || mons == MONS_SIMULACRUM_SMALL + || mons == MONS_SIMULACRUM_LARGE || mons == MONS_SPECTRAL_THING + || mons == MONS_SLIME_CREATURE || mons == MONS_BALLISTOMYCETE + || mons == MONS_HYDRA || mons == MONS_PLAYER_GHOST + || mons == MONS_SHAPESHIFTER || mons == MONS_PANDEMONIUM_DEMON + || mons == MONS_KILLER_KLOWN || mons == MONS_KRAKEN + || mons == MONS_KRAKEN_TENTACLE + || mons == MONS_GLOWING_SHAPESHIFTER + || mons == MONS_GIANT_BAT); +} + +monster_type get_misled_monster (monsters *monster) +{ + monster_type mons = random_monster_at_grid(monster->pos()); + if (unsuitable_misled_monster(mons)) + mons = random_monster_at_grid(monster->pos()); + + if (unsuitable_misled_monster(mons)) + return (MONS_GIANT_BAT); + + return mons; +} + +bool update_mislead_monster(monsters* monster) +{ + // Don't affect uniques, named monsters, and monsters with special tiles. + if (mons_is_unique(monster->type) || !monster->mname.empty() + || monster->props.exists("monster_tile") + || monster->props.exists("mislead_as")) + { + return (false); + } + + short misled_as = get_misled_monster(monster); + monster->props["mislead_as"] = misled_as; + + if (misled_as == MONS_GIANT_BAT) + return (false); + + return (true); +} + +int update_mislead_monsters(monsters* caster) +{ + int count = 0; + + for (monster_iterator mi; mi; ++mi) + if (*mi != caster && update_mislead_monster(*mi)) + count++; + + return count; +} + +void mons_cast_mislead(monsters *monster) +{ + // This really only affects the player; it causes confusion when cast on + // non-player foes, but that is dealt with inside ye-great-Switch-of-Doom. + if (monster->foe != MHITYOU) + return; + + // Prevents Mislead spam by Mara and co. {due} + if (you.duration[DUR_MISLED] > 10 && one_chance_in(3)) + return; + + if (wearing_amulet(AMU_CLARITY)) + { + mpr("Your vision blurs momentarily."); + return; + } + + update_mislead_monsters(monster); + + const int old_value = you.duration[DUR_MISLED]; + you.increase_duration(DUR_MISLED, monster->hit_dice * 12 / 3, 50); + if (you.duration[DUR_MISLED] > old_value) + { + you.check_awaken(500); + + if (old_value <= 0) + { + mpr("But for a moment, strange images dance in front of your eyes.", MSGCH_WARN); +#ifdef USE_TILE + tiles.add_overlay(you.pos(), tileidx_zap(MAGENTA)); + update_screen(); +#else + flash_view(MAGENTA); +#endif + more(); + } + else + mpr("You are even more misled!", MSGCH_WARN); + + learned_something_new(TUT_YOU_ENCHANTED); + + xom_is_stimulated((you.duration[DUR_MISLED] - old_value) + / BASELINE_DELAY); + } + + return; +} + + diff --git a/crawl-ref/source/mislead.h b/crawl-ref/source/mislead.h new file mode 100644 index 0000000000..540ffea9b1 --- /dev/null +++ b/crawl-ref/source/mislead.h @@ -0,0 +1,8 @@ +/* File: mislead.h + * Summary: Handling of the Mislead spell and stats + */ + +bool unsuitable_misled_monster(monster_type mons); +monster_type get_misled_monster (monsters *monster); +int update_mislead_monsters(monsters* caster); +bool update_mislead_monster(monsters* monster); diff --git a/crawl-ref/source/mon-cast.cc b/crawl-ref/source/mon-cast.cc index 761521f7ab..7bbbd77862 100644 --- a/crawl-ref/source/mon-cast.cc +++ b/crawl-ref/source/mon-cast.cc @@ -24,6 +24,7 @@ #include "mon-place.h" #include "terrain.h" #include "tutorial.h" +#include "mislead.h" #include "mgen_data.h" #include "coord.h" #include "mon-speak.h" @@ -1564,108 +1565,6 @@ int _count_mara_fakes() return count; } -bool _unsuitable_misled_monster(monster_type mons) -{ - return (mons_is_unique(mons) || mons_is_mimic(mons) - || mons_class_is_stationary(mons) || mons_genus(mons) == MONS_DRACONIAN - || mons == MONS_DANCING_WEAPON || mons == MONS_UGLY_THING - || mons == MONS_VERY_UGLY_THING || mons == MONS_ZOMBIE_SMALL - || mons == MONS_ZOMBIE_LARGE || mons == MONS_SKELETON_SMALL - || mons == MONS_SKELETON_LARGE || mons == MONS_SIMULACRUM_SMALL - || mons == MONS_SIMULACRUM_LARGE || mons == MONS_SPECTRAL_THING - || mons == MONS_SLIME_CREATURE || mons == MONS_BALLISTOMYCETE - || mons == MONS_HYDRA || mons == MONS_PLAYER_GHOST - || mons == MONS_SHAPESHIFTER || mons == MONS_PANDEMONIUM_DEMON - || mons == MONS_KILLER_KLOWN || mons == MONS_KRAKEN - || mons == MONS_KRAKEN_TENTACLE - || mons == MONS_GLOWING_SHAPESHIFTER); -} - -monster_type _get_misled_monster (monsters *monster) -{ - monster_type mons = random_monster_at_grid(monster->pos()); - if (_unsuitable_misled_monster(mons)) - mons = random_monster_at_grid(monster->pos()); - - if (_unsuitable_misled_monster(mons)) - return (MONS_GIANT_BAT); - - return mons; -} - -int _update_mislead_monsters(monsters* monster) -{ - int count = 0; - - for (monster_iterator mi; mi; ++mi) - { - if (*mi == monster) - continue; - - // Don't affect uniques, named monsters, and monsters with special tiles. - if (mons_is_unique(mi->type) || !mi->mname.empty() - || mi->props.exists("monster_tile") || mi->props.exists("mislead_as")) - { - continue; - } - else - { - mi->props["mislead_as"] = short(_get_misled_monster(*mi)); - count++; - } - } - - return count; -} - -void mons_cast_mislead(monsters *monster) -{ - // This really only affects the player; it causes confusion when cast on - // non-player foes, but that is dealt with inside ye-great-Switch-of-Doom. - if (monster->foe != MHITYOU) - return; - - // Prevents Mislead spam by Mara and co. {due} - if (you.duration[DUR_MISLED] > 10 && one_chance_in(3)) - return; - - if (wearing_amulet(AMU_CLARITY)) - { - mpr("Your vision blurs momentarily."); - return; - } - - _update_mislead_monsters(monster); - - const int old_value = you.duration[DUR_MISLED]; - you.increase_duration(DUR_MISLED, monster->hit_dice * 12 / 3, 50); - if (you.duration[DUR_MISLED] > old_value) - { - you.check_awaken(500); - - if (old_value <= 0) - { - mpr("But for a moment, strange images dance in front of your eyes.", MSGCH_WARN); -#ifdef USE_TILE - tiles.add_overlay(you.pos(), tileidx_zap(MAGENTA)); - update_screen(); -#else - flash_view(MAGENTA); -#endif - more(); - } - else - mpr("You are even more misled!", MSGCH_WARN); - - learned_something_new(TUT_YOU_ENCHANTED); - - xom_is_stimulated((you.duration[DUR_MISLED] - old_value) - / BASELINE_DELAY); - } - - return; -} - bool _find_players_ghost () { bool found = false; diff --git a/crawl-ref/source/mon-place.cc b/crawl-ref/source/mon-place.cc index 9faa371cb8..3a88d27774 100644 --- a/crawl-ref/source/mon-place.cc +++ b/crawl-ref/source/mon-place.cc @@ -24,6 +24,7 @@ #include "lev-pand.h" #include "makeitem.h" #include "message.h" +#include "mislead.h" #include "mon-behv.h" #include "mon-gear.h" #include "mon-iter.h" @@ -1242,6 +1243,9 @@ static int _place_monster_aux(const mgen_data &mg, mon->add_ench(ENCH_SLOWLY_DYING); } + if (!crawl_state.arena && you.misled()) + update_mislead_monster(mon); + if (monster_can_submerge(mon, grd(fpos)) && !one_chance_in(5)) mon->add_ench(ENCH_SUBMERGED); -- cgit v1.2.3-54-g00ecf From 79dc4f1a099e5f60eaf1dd99d848604e82c77529 Mon Sep 17 00:00:00 2001 From: David Ploog Date: Mon, 28 Dec 2009 02:39:42 +0100 Subject: Ensure that Vault:8 has a loot rich quadrant. --- crawl-ref/source/dat/vaults.des | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/crawl-ref/source/dat/vaults.des b/crawl-ref/source/dat/vaults.des index 274a32e4df..18f7bfe94f 100644 --- a/crawl-ref/source/dat/vaults.des +++ b/crawl-ref/source/dat/vaults.des @@ -362,7 +362,9 @@ ENDMAP # example), which will be used to orient that corner towards the middle of # the map. Each quadrant must be capable of generating a rune, which # should be done by placing an 'O' glyph and calling vault8_rune(_G). - +# +# There is a lot of variance among the possible quadrants but we do ensure +# that (exactly) one quadrant with rich loot is generated. ############################################################################### # The main vault for Vault:8. @@ -371,7 +373,7 @@ NAME: vaults_vault PLACE: Vault:8 ORIENT: encompass TAGS: no_rotate no_dump -SUBVAULT: A : vault8_quadrant +SUBVAULT: A : vault8_quadrant_prize SUBVAULT: B : vault8_quadrant SUBVAULT: C : vault8_quadrant SUBVAULT: D : vault8_quadrant @@ -491,7 +493,7 @@ ENDMAP # # about 24 | NAME: vault8_rooms -TAGS: vault8_quadrant uniq_vault8_prize +TAGS: vault8_quadrant_prize SHUFFLE: AC/BD, EG/FH, IKN/MJL SUBST: A=., B=xx=, C=+, D=x, E=+, F=xx=, G=., H=x SUBST: I=., M=xx=, J=x, K=+, N=+, L=xx= @@ -764,7 +766,7 @@ ENDMAP # Vault:8 - Triangles Quadrant (by Mu.) # about 19 | NAME: vault8_triangles -TAGS: vault8_quadrant uniq_vault8_prize +TAGS: vault8_quadrant_prize SUBST: Q = 8 9 .:20 NSUBST: ? = 1:O / *:| SUBST: " = =:1 x:99 @@ -882,7 +884,7 @@ ENDMAP # Vault:8 - Corners Quadrant (by Mu.) # about 25 | NAME: vault8_corners -TAGS: vault8_quadrant uniq_vault8_prize +TAGS: vault8_quadrant_prize SUBST: Q = 8 9 .:10 NSUBST: $ = 1:O / *:$ SUBST: $ = | *:20 $ @@ -919,7 +921,7 @@ ENDMAP # Vault:8 - Flips Quadrant (by Mu.) # about 21 | NAME: vault8_flips -TAGS: vault8_quadrant uniq_vault8_prize +TAGS: vault8_quadrant_prize NSUBST: ; = 3:l / 3:z / 3:a / *:. SUBST: Q = 8 9 SUBST: $ = | * $ @@ -960,7 +962,7 @@ ENDMAP # Vault:8 - Construction Quadrant (by Mu.) # about 21 | NAME: vault8_construction -TAGS: vault8_quadrant uniq_vault8_prize +TAGS: vault8_quadrant_prize SUBST: Q = 8 9 . NSUBST: $ = 1:O / *:$ SUBST: $ = |*$. -- cgit v1.2.3-54-g00ecf From cf6032ded2e8af81e604b455a26e0f2976611d6d Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Mon, 28 Dec 2009 13:15:05 +1000 Subject: Further tweaks to Mu's cloud wizard vault. --- crawl-ref/source/dat/wizlab.des | 116 ++++++++++++++++++++++++---------------- 1 file changed, 71 insertions(+), 45 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index b51e00c35a..bbe1921297 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -1423,13 +1423,16 @@ TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup KMONS: 1 = col:silver patrolling wizard name:Cloud_Mage name_replace \ name_definite spells:mephitic_cloud;freezing_cloud;poisonous_cloud;\ airstrike;blink_range;blink_range hd:20 hp:150 ; \ - longbow . arrow q:30 -KMONS: * = vapour / air elemental + robe unrand:robe_of_clouds . quick blade ego:electrocution | \ + quick blade ego:freezing | dagger ego:speed | dagger ego:electrocution \ + | dagger ego:freezing +KMONS: * = w:5 vapour / w:20 air elemental SUBST: . = .:120 * MARKER: ! = lua:fog_machine { \ pow_max = 10, delay_min = 10, delay_max = 40, \ size = 1, size_buildup_amnt = 5, \ - size_buildup_time = 25, cloud_type = "steam" \ + size_buildup_time = 25, cloud_type = "grey smoke", \ + colour = "white", name = "white smoke" \ } KITEM: % = w:20 potion of levitation / w:20 potion of water / \ potion of magic / potion of speed / potion of resistance / \ @@ -1439,52 +1442,75 @@ KITEM: $ = wand of lightning / staff of air / ring of levitation /\ gold / scroll of silence / ring of teleport control / \ amulet of controlled flight / quick blade / ring of evasion /\ ring of see invisible +KFEAT: # = deep_water NSUBST: $ = 1:? / *:$ SUBST: $ = $% +COLOUR: .+ Date: Mon, 28 Dec 2009 10:39:13 +1000 Subject: Mark spec'd items for summoned monsters as summoned. --- crawl-ref/source/dungeon.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 18ae2d498b..89e643a68b 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -4533,6 +4533,11 @@ static void _dgn_give_mon_spec_items(mons_spec &mspec, if (item_made != NON_ITEM && item_made != -1) { item_def &item(mitm[item_made]); + + // Mark items on summoned monsters as such. + if (mspec.abjuration_duration != 0) + item.flags |= ISFLAG_SUMMONED; + if (!mon.pickup_item(item, 0, true)) destroy_item(item_made, true); } -- cgit v1.2.3-54-g00ecf From 3c1f575a5c99c03e72a30fe3d8ac91a7248c144e Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Mon, 28 Dec 2009 11:01:51 +1000 Subject: Move and tweak Mislead code. Newly placed monsters during the mislead status are also given a mislead_as monster type. --- crawl-ref/source/makefile.obj | 1 + crawl-ref/source/mislead.cc | 127 ++++++++++++++++++++++++++++++++++++++++++ crawl-ref/source/mislead.h | 8 +++ crawl-ref/source/mon-cast.cc | 103 +--------------------------------- crawl-ref/source/mon-place.cc | 4 ++ 5 files changed, 141 insertions(+), 102 deletions(-) create mode 100644 crawl-ref/source/mislead.cc create mode 100644 crawl-ref/source/mislead.h diff --git a/crawl-ref/source/makefile.obj b/crawl-ref/source/makefile.obj index 926b9d5e50..1b1d038f31 100644 --- a/crawl-ref/source/makefile.obj +++ b/crawl-ref/source/makefile.obj @@ -102,6 +102,7 @@ menu.o \ message.o \ mgen_data.o \ misc.o \ +mislead.o \ mon-abil.o \ mon-act.o \ mon-behv.o \ diff --git a/crawl-ref/source/mislead.cc b/crawl-ref/source/mislead.cc new file mode 100644 index 0000000000..64c574d97a --- /dev/null +++ b/crawl-ref/source/mislead.cc @@ -0,0 +1,127 @@ +/* File: mislead.cc + * Summary: Handling of the Mislead spell and stats + */ + +#include "AppHdr.h" +#include "mislead.h" + +#include "enum.h" +#include "env.h" +#include "message.h" +#include "monster.h" +#include "mon-iter.h" +#include "mon-util.h" +#include "view.h" +#include "random.h" +#include "tutorial.h" +#include "xom.h" + +bool unsuitable_misled_monster(monster_type mons) +{ + return (mons_is_unique(mons) || mons_is_mimic(mons) + || mons_class_is_stationary(mons) || mons_genus(mons) == MONS_DRACONIAN + || mons == MONS_DANCING_WEAPON || mons == MONS_UGLY_THING + || mons == MONS_VERY_UGLY_THING || mons == MONS_ZOMBIE_SMALL + || mons == MONS_ZOMBIE_LARGE || mons == MONS_SKELETON_SMALL + || mons == MONS_SKELETON_LARGE || mons == MONS_SIMULACRUM_SMALL + || mons == MONS_SIMULACRUM_LARGE || mons == MONS_SPECTRAL_THING + || mons == MONS_SLIME_CREATURE || mons == MONS_BALLISTOMYCETE + || mons == MONS_HYDRA || mons == MONS_PLAYER_GHOST + || mons == MONS_SHAPESHIFTER || mons == MONS_PANDEMONIUM_DEMON + || mons == MONS_KILLER_KLOWN || mons == MONS_KRAKEN + || mons == MONS_KRAKEN_TENTACLE + || mons == MONS_GLOWING_SHAPESHIFTER + || mons == MONS_GIANT_BAT); +} + +monster_type get_misled_monster (monsters *monster) +{ + monster_type mons = random_monster_at_grid(monster->pos()); + if (unsuitable_misled_monster(mons)) + mons = random_monster_at_grid(monster->pos()); + + if (unsuitable_misled_monster(mons)) + return (MONS_GIANT_BAT); + + return mons; +} + +bool update_mislead_monster(monsters* monster) +{ + // Don't affect uniques, named monsters, and monsters with special tiles. + if (mons_is_unique(monster->type) || !monster->mname.empty() + || monster->props.exists("monster_tile") + || monster->props.exists("mislead_as")) + { + return (false); + } + + short misled_as = get_misled_monster(monster); + monster->props["mislead_as"] = misled_as; + + if (misled_as == MONS_GIANT_BAT) + return (false); + + return (true); +} + +int update_mislead_monsters(monsters* caster) +{ + int count = 0; + + for (monster_iterator mi; mi; ++mi) + if (*mi != caster && update_mislead_monster(*mi)) + count++; + + return count; +} + +void mons_cast_mislead(monsters *monster) +{ + // This really only affects the player; it causes confusion when cast on + // non-player foes, but that is dealt with inside ye-great-Switch-of-Doom. + if (monster->foe != MHITYOU) + return; + + // Prevents Mislead spam by Mara and co. {due} + if (you.duration[DUR_MISLED] > 10 && one_chance_in(3)) + return; + + if (wearing_amulet(AMU_CLARITY)) + { + mpr("Your vision blurs momentarily."); + return; + } + + update_mislead_monsters(monster); + + const int old_value = you.duration[DUR_MISLED]; + you.increase_duration(DUR_MISLED, monster->hit_dice * 12 / 3, 50); + if (you.duration[DUR_MISLED] > old_value) + { + you.check_awaken(500); + + if (old_value <= 0) + { + mpr("But for a moment, strange images dance in front of your eyes.", MSGCH_WARN); +#ifdef USE_TILE + tiles.add_overlay(you.pos(), tileidx_zap(MAGENTA)); + update_screen(); +#else + flash_view(MAGENTA); +#endif + more(); + } + else + mpr("You are even more misled!", MSGCH_WARN); + + learned_something_new(TUT_YOU_ENCHANTED); + + xom_is_stimulated((you.duration[DUR_MISLED] - old_value) + / BASELINE_DELAY); + } + + return; +} + + diff --git a/crawl-ref/source/mislead.h b/crawl-ref/source/mislead.h new file mode 100644 index 0000000000..540ffea9b1 --- /dev/null +++ b/crawl-ref/source/mislead.h @@ -0,0 +1,8 @@ +/* File: mislead.h + * Summary: Handling of the Mislead spell and stats + */ + +bool unsuitable_misled_monster(monster_type mons); +monster_type get_misled_monster (monsters *monster); +int update_mislead_monsters(monsters* caster); +bool update_mislead_monster(monsters* monster); diff --git a/crawl-ref/source/mon-cast.cc b/crawl-ref/source/mon-cast.cc index 761521f7ab..7bbbd77862 100644 --- a/crawl-ref/source/mon-cast.cc +++ b/crawl-ref/source/mon-cast.cc @@ -24,6 +24,7 @@ #include "mon-place.h" #include "terrain.h" #include "tutorial.h" +#include "mislead.h" #include "mgen_data.h" #include "coord.h" #include "mon-speak.h" @@ -1564,108 +1565,6 @@ int _count_mara_fakes() return count; } -bool _unsuitable_misled_monster(monster_type mons) -{ - return (mons_is_unique(mons) || mons_is_mimic(mons) - || mons_class_is_stationary(mons) || mons_genus(mons) == MONS_DRACONIAN - || mons == MONS_DANCING_WEAPON || mons == MONS_UGLY_THING - || mons == MONS_VERY_UGLY_THING || mons == MONS_ZOMBIE_SMALL - || mons == MONS_ZOMBIE_LARGE || mons == MONS_SKELETON_SMALL - || mons == MONS_SKELETON_LARGE || mons == MONS_SIMULACRUM_SMALL - || mons == MONS_SIMULACRUM_LARGE || mons == MONS_SPECTRAL_THING - || mons == MONS_SLIME_CREATURE || mons == MONS_BALLISTOMYCETE - || mons == MONS_HYDRA || mons == MONS_PLAYER_GHOST - || mons == MONS_SHAPESHIFTER || mons == MONS_PANDEMONIUM_DEMON - || mons == MONS_KILLER_KLOWN || mons == MONS_KRAKEN - || mons == MONS_KRAKEN_TENTACLE - || mons == MONS_GLOWING_SHAPESHIFTER); -} - -monster_type _get_misled_monster (monsters *monster) -{ - monster_type mons = random_monster_at_grid(monster->pos()); - if (_unsuitable_misled_monster(mons)) - mons = random_monster_at_grid(monster->pos()); - - if (_unsuitable_misled_monster(mons)) - return (MONS_GIANT_BAT); - - return mons; -} - -int _update_mislead_monsters(monsters* monster) -{ - int count = 0; - - for (monster_iterator mi; mi; ++mi) - { - if (*mi == monster) - continue; - - // Don't affect uniques, named monsters, and monsters with special tiles. - if (mons_is_unique(mi->type) || !mi->mname.empty() - || mi->props.exists("monster_tile") || mi->props.exists("mislead_as")) - { - continue; - } - else - { - mi->props["mislead_as"] = short(_get_misled_monster(*mi)); - count++; - } - } - - return count; -} - -void mons_cast_mislead(monsters *monster) -{ - // This really only affects the player; it causes confusion when cast on - // non-player foes, but that is dealt with inside ye-great-Switch-of-Doom. - if (monster->foe != MHITYOU) - return; - - // Prevents Mislead spam by Mara and co. {due} - if (you.duration[DUR_MISLED] > 10 && one_chance_in(3)) - return; - - if (wearing_amulet(AMU_CLARITY)) - { - mpr("Your vision blurs momentarily."); - return; - } - - _update_mislead_monsters(monster); - - const int old_value = you.duration[DUR_MISLED]; - you.increase_duration(DUR_MISLED, monster->hit_dice * 12 / 3, 50); - if (you.duration[DUR_MISLED] > old_value) - { - you.check_awaken(500); - - if (old_value <= 0) - { - mpr("But for a moment, strange images dance in front of your eyes.", MSGCH_WARN); -#ifdef USE_TILE - tiles.add_overlay(you.pos(), tileidx_zap(MAGENTA)); - update_screen(); -#else - flash_view(MAGENTA); -#endif - more(); - } - else - mpr("You are even more misled!", MSGCH_WARN); - - learned_something_new(TUT_YOU_ENCHANTED); - - xom_is_stimulated((you.duration[DUR_MISLED] - old_value) - / BASELINE_DELAY); - } - - return; -} - bool _find_players_ghost () { bool found = false; diff --git a/crawl-ref/source/mon-place.cc b/crawl-ref/source/mon-place.cc index 9faa371cb8..3a88d27774 100644 --- a/crawl-ref/source/mon-place.cc +++ b/crawl-ref/source/mon-place.cc @@ -24,6 +24,7 @@ #include "lev-pand.h" #include "makeitem.h" #include "message.h" +#include "mislead.h" #include "mon-behv.h" #include "mon-gear.h" #include "mon-iter.h" @@ -1242,6 +1243,9 @@ static int _place_monster_aux(const mgen_data &mg, mon->add_ench(ENCH_SLOWLY_DYING); } + if (!crawl_state.arena && you.misled()) + update_mislead_monster(mon); + if (monster_can_submerge(mon, grd(fpos)) && !one_chance_in(5)) mon->add_ench(ENCH_SUBMERGED); -- cgit v1.2.3-54-g00ecf From cc6a658772e7c26cf2dedceb7028601c9863268f Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Sun, 27 Dec 2009 22:18:44 -0800 Subject: Fix insane non-monotonic fulsome behavior, per Eronarn The following two coder's discretion choices were made: 1. "Lots of chunks" is 5+, as for a draconian 2. "Self affliction at low power" means less than 1dN-1 where N depends on the potion. --- crawl-ref/source/spells4.cc | 123 +++++++++++++++++++------------------------- crawl-ref/source/spl-data.h | 2 +- 2 files changed, 55 insertions(+), 70 deletions(-) diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc index 6fbb55f399..9d1c969ea6 100644 --- a/crawl-ref/source/spells4.cc +++ b/crawl-ref/source/spells4.cc @@ -1179,7 +1179,7 @@ bool cast_evaporate(int pow, bolt& beem, int pot_idx) // using up the corpse might also lead to game balance problems. - bwr void cast_fulsome_distillation(int pow) { - pow = std::min(50, pow); + pow = std::min(100, pow); int corpse = -1; @@ -1205,96 +1205,73 @@ void cast_fulsome_distillation(int pow) return; } - const bool rotten = food_is_rotten(mitm[corpse]); - const bool big_monster = (mons_type_hit_dice(mitm[corpse].plus) >= 5); - const bool power_up = (rotten && big_monster); - potion_type pot_type = POT_WATER; + int difficulty = 0; - switch (mitm[corpse].plus) + switch (mons_corpse_effect(mitm[corpse].plus)) { - case MONS_GIANT_BAT: // extracting batty behaviour : 1 - case MONS_GIANT_BLOWFLY: // extracting batty behaviour : 5 - pot_type = POT_CONFUSION; + case CE_CLEAN: + pot_type = POT_WATER; + difficulty = 0; break; - case MONS_RED_WASP: // paralysis attack : 8 - case MONS_YELLOW_WASP: // paralysis attack : 4 - pot_type = POT_PARALYSIS; + case CE_CONTAMINATED: + pot_type = (mons_weight(mitm[corpse].plus) >= 900) + ? POT_DEGENERATION : POT_POISON; + difficulty = (pot_type == POT_DEGENERATION) ? 100 : 40; break; - case MONS_SNAKE: // clean meat, but poisonous attack : 2 - case MONS_GIANT_ANT: // clean meat, but poisonous attack : 3 - pot_type = (power_up ? POT_POISON : POT_CONFUSION); + case CE_POISONOUS: + pot_type = POT_POISON; + difficulty = 50; break; - case MONS_ORANGE_RAT: // poisonous meat, but draining attack : 3 - pot_type = (power_up ? POT_DECAY : POT_POISON); + case CE_MUTAGEN_RANDOM: + case CE_MUTAGEN_GOOD: // unused + case CE_RANDOM: // unused + pot_type = POT_MUTATION; + // this is a potentially good potion, so it never tries to get into you + difficulty = 0; break; - case MONS_SPINY_WORM: // 12 - pot_type = (power_up ? POT_DECAY : POT_STRONG_POISON); + case CE_MUTAGEN_BAD: // unused + case CE_ROTTEN: // actually this only occurs via mangling + case CE_HCL: // necrophage + pot_type = POT_DECAY; + difficulty = 100; break; + case CE_NOCORPSE: // shouldn't occur default: - switch (mons_corpse_effect(mitm[corpse].plus)) - { - case CE_CLEAN: - pot_type = (power_up ? POT_CONFUSION : POT_WATER); - break; - - case CE_CONTAMINATED: - pot_type = (power_up ? POT_DEGENERATION : POT_POISON); - break; - - case CE_POISONOUS: - pot_type = (power_up ? POT_STRONG_POISON : POT_POISON); - break; + break; + } - case CE_MUTAGEN_RANDOM: - case CE_MUTAGEN_GOOD: // unused - case CE_RANDOM: // unused - pot_type = POT_MUTATION; - break; + switch (mitm[corpse].plus) + { + case MONS_RED_WASP: // paralysis attack + pot_type = POT_PARALYSIS; + difficulty = 100; + break; - case CE_MUTAGEN_BAD: // unused - case CE_ROTTEN: // actually this only occurs via mangling - case CE_HCL: // necrophage - pot_type = (power_up ? POT_DECAY : POT_STRONG_POISON); - break; + case MONS_YELLOW_WASP: // slowing attack + pot_type = POT_SLOWING; + difficulty = 50; + break; - case CE_NOCORPSE: // shouldn't occur - default: - break; - } + default: break; } - // If not powerful enough, we downgrade the potion. - if (random2(50) > pow + 10 * rotten) + struct monsterentry* smc = get_monster_data(mitm[corpse].plus); + + for (int nattk = 0; nattk < 4; ++nattk) { - switch (pot_type) + if (smc->attack[nattk].flavour == AF_POISON_MEDIUM || + smc->attack[nattk].flavour == AF_POISON_STRONG || + smc->attack[nattk].flavour == AF_POISON_STR) { - case POT_DECAY: - case POT_DEGENERATION: - case POT_STRONG_POISON: - pot_type = POT_POISON; - break; - - case POT_MUTATION: - case POT_POISON: - pot_type = POT_CONFUSION; - break; - - case POT_PARALYSIS: - pot_type = POT_SLOWING; - break; - - case POT_CONFUSION: - case POT_SLOWING: - default: - pot_type = POT_WATER; - break; + pot_type = POT_STRONG_POISON; + difficulty = 75; } } @@ -1310,9 +1287,17 @@ void cast_fulsome_distillation(int pow) mitm[corpse].inscription.clear(); item_colour(mitm[corpse]); // sets special as well + set_ident_type(mitm[corpse], ID_KNOWN_TYPE); + mprf("You extract %s from the corpse.", mitm[corpse].name(DESC_NOCAP_A).c_str()); + if (random2(difficulty + 1) > pow) + { + mpr("Oops! You accidentally inhaled the fumes!"); + potion_effect(pot_type, 40); + } + // Try to move the potion to the player (for convenience). if (move_item_to_player(corpse, 1) != 1) mpr("Unfortunately, you can't carry it right now!"); diff --git a/crawl-ref/source/spl-data.h b/crawl-ref/source/spl-data.h index 3adc30d1d3..303306cc83 100644 --- a/crawl-ref/source/spl-data.h +++ b/crawl-ref/source/spl-data.h @@ -927,7 +927,7 @@ SPTYP_TRANSMUTATION | SPTYP_NECROMANCY, SPFLAG_NONE, 1, - 50, + 100, -1, -1, 0, NULL, -- cgit v1.2.3-54-g00ecf From 02962c9ca97ca896e2d7be0e891f800efbbd9368 Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Sun, 27 Dec 2009 23:41:17 -0800 Subject: Forms never lower weight cap I'm just building the bikeshed - somebody else needs to paint this stupid thing. --- crawl-ref/source/actor.cc | 4 ++-- crawl-ref/source/actor.h | 2 +- crawl-ref/source/monster.cc | 2 +- crawl-ref/source/monster.h | 2 +- crawl-ref/source/player.cc | 13 ++++++++++--- crawl-ref/source/player.h | 2 +- 6 files changed, 16 insertions(+), 9 deletions(-) diff --git a/crawl-ref/source/actor.cc b/crawl-ref/source/actor.cc index 3cdeeb9c50..62a8d87cf6 100644 --- a/crawl-ref/source/actor.cc +++ b/crawl-ref/source/actor.cc @@ -161,9 +161,9 @@ void actor::shield_block_succeeded(actor *foe) } } -int actor::body_weight() const +int actor::body_weight(bool base) const { - switch (body_size(PSIZE_BODY)) + switch (body_size(PSIZE_BODY, base)) { case SIZE_TINY: return (150); diff --git a/crawl-ref/source/actor.h b/crawl-ref/source/actor.h index b29e826307..a6d4899bbb 100644 --- a/crawl-ref/source/actor.h +++ b/crawl-ref/source/actor.h @@ -63,7 +63,7 @@ public: virtual size_type body_size(size_part_type psize = PSIZE_TORSO, bool base = false) const = 0; - virtual int body_weight() const; + virtual int body_weight(bool base = false) const; virtual int total_weight() const = 0; virtual int damage_brand(int which_attack = -1) = 0; diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index 5285da7795..862aa075c4 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -316,7 +316,7 @@ size_type monsters::body_size(size_part_type /* psize */, bool /* base */) const return (ret); } -int monsters::body_weight() const +int monsters::body_weight(bool /*base*/) const { int mclass = type; diff --git a/crawl-ref/source/monster.h b/crawl-ref/source/monster.h index 400ad01769..524c48b4d4 100644 --- a/crawl-ref/source/monster.h +++ b/crawl-ref/source/monster.h @@ -221,7 +221,7 @@ public: bool can_pass_through_feat(dungeon_feature_type grid) const; bool is_habitable_feat(dungeon_feature_type actual_grid) const; size_type body_size(size_part_type psize = PSIZE_TORSO, bool base = false) const; - int body_weight() const; + int body_weight(bool base = false) const; int total_weight() const; int damage_brand(int which_attack = -1); int damage_type(int which_attack = -1); diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 04c1498297..7ba87a20ff 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -2379,7 +2379,11 @@ int player_sust_abil(bool calc_unid) int carrying_capacity(burden_state_type bs) { - int cap = (2 * you.body_weight()) + (you.strength * 300) + // Yuck. We need this for gameplay - it nerfs small forms too much + // otherwise - but there's no good way to rationalize here... --sorear + int used_weight = std::max(you.body_weight(), you.body_weight(true)); + + int cap = (2 * used_weight) + (you.strength * 300) + (you.airborne() ? 1000 : 0); // We are nice to the lighter species in that strength adds absolutely // instead of relatively to body weight. --dpeg @@ -5593,9 +5597,12 @@ size_type player::body_size(size_part_type psize, bool base) const } } -int player::body_weight() const +int player::body_weight(bool base) const { - int weight = actor::body_weight(); + int weight = actor::body_weight(base); + + if (base) + return (weight); switch (attribute[ATTR_TRANSFORMATION]) { diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h index a02e5f5c4c..ee34bd703e 100644 --- a/crawl-ref/source/player.h +++ b/crawl-ref/source/player.h @@ -383,7 +383,7 @@ public: bool can_pass_through_feat(dungeon_feature_type grid) const; bool is_habitable_feat(dungeon_feature_type actual_grid) const; size_type body_size(size_part_type psize = PSIZE_TORSO, bool base = false) const; - int body_weight() const; + int body_weight(bool base = false) const; int total_weight() const; int damage_brand(int which_attack = -1); int damage_type(int which_attack = -1); -- cgit v1.2.3-54-g00ecf From e4e726475b5ffaafebe48a0eaf25991a2632ed11 Mon Sep 17 00:00:00 2001 From: Vsevolod Kozlov Date: Mon, 28 Dec 2009 12:44:41 +0300 Subject: Add the long description to ossuary.des. --- crawl-ref/source/dat/ossuary.des | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crawl-ref/source/dat/ossuary.des b/crawl-ref/source/dat/ossuary.des index 89d9465766..60c46d29dd 100644 --- a/crawl-ref/source/dat/ossuary.des +++ b/crawl-ref/source/dat/ossuary.des @@ -13,7 +13,13 @@ {{ function ossuary_portal(e) - local timeout_turns = crawl.random_range(1500, 2000) + local desc_long = +"You can make out a staircase leading downwards into a small tomb. Sand ".. +"surrounds the staircase and is continuously pouring onto it. Before long the ".. +"staircase will be gone. They say that some distant relatives of the pharaohs ".. +"were entombed here." + + local timeout_turns = crawl.random_range(1500, 2000) local messager = timed_msg { @@ -31,6 +37,7 @@ function ossuary_portal(e) timed_marker { disappear = "The staircase has disappeared completely beneath the sand.", desc = "A sand-covered staircase", + desc_long = desc_long, entity = 'staircase', dst = "ossuary", dstorigin = "in a tomb", -- cgit v1.2.3-54-g00ecf From 679e8fa7154cce598b7fe4946f1c7f7bbe0f72c9 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Mon, 28 Dec 2009 18:05:19 +1000 Subject: Item quantity adjustment wrappers for dLua. --- crawl-ref/source/l_item.cc | 49 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/crawl-ref/source/l_item.cc b/crawl-ref/source/l_item.cc index 80bbc88df9..e8dc23a2b1 100644 --- a/crawl-ref/source/l_item.cc +++ b/crawl-ref/source/l_item.cc @@ -686,6 +686,53 @@ static int l_item_do_destroy(lua_State *ls) return (1); } +static int l_item_do_dec_quantity(lua_State *ls) +{ + ASSERT_DLUA; + + LUA_ITEM(item, 1); + if (!item || !item->is_valid()) + { + lua_pushboolean(ls, false); + return (1); + } + + // The quantity to reduce by. + int quantity = luaL_checkint(ls, 2); + + bool destroyed = false; + + if (in_inventory(*item)) + destroyed = dec_inv_item_quantity(item->link, quantity); + else + destroyed = dec_mitm_item_quantity(item->index(), quantity); + + lua_pushboolean(ls, destroyed); + return (1); +} + +static int l_item_do_inc_quantity(lua_State *ls) +{ + ASSERT_DLUA; + + LUA_ITEM(item, 1); + if (!item || !item->is_valid()) + { + lua_pushboolean(ls, false); + return (1); + } + + // The quantity to increase by. + int quantity = luaL_checkint(ls, 2); + + if (in_inventory(*item)) + inc_inv_item_quantity(item->link, quantity); + else + inc_mitm_item_quantity(item->index(), quantity); + + return (0); +} + static const struct luaL_reg item_lib[] = { { "artefact", l_item_artefact }, @@ -717,6 +764,8 @@ static const struct luaL_reg item_lib[] = { "dropped", l_item_dropped }, { "can_cut_meat", l_item_can_cut_meat }, { "destroy", l_item_do_destroy }, + { "dec_quantity", l_item_do_dec_quantity }, + { "inc_quantity", l_item_do_inc_quantity }, { NULL, NULL }, }; -- cgit v1.2.3-54-g00ecf From 7c39d1c666a9cc984915bcf87e80e9dde98d215d Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Mon, 28 Dec 2009 18:05:40 +1000 Subject: Inventory and stash iterators for lua. --- crawl-ref/source/dat/clua/iter.lua | 72 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/crawl-ref/source/dat/clua/iter.lua b/crawl-ref/source/dat/clua/iter.lua index b7bf9bc0a0..d9496bdb3c 100644 --- a/crawl-ref/source/dat/clua/iter.lua +++ b/crawl-ref/source/dat/clua/iter.lua @@ -470,3 +470,75 @@ end function iter.slave_iterator (prop, value) return iter.point_iterator:new(dgn.find_marker_positions_by_prop(prop, value)) end + +------------------------------------------------------------------------------- +-- Inventory iterator +------------------------------------------------------------------------------- + +iter.invent_iterator = {} + +function iter.invent_iterator:_new () + local m = {} + setmetatable(m, self) + self.__index = self + return m +end + +function iter.invent_iterator:new (itable, filter, rv_instead) + if itable == nil then + error("itable cannot be nil for invent_iterator") + end + + local mt = iter.invent_iterator:_new() + mt.cur_p = 0 + mt.table = itable + mt.rvi = rv_instead or false + mt.filter = filter or nil + + return mt:iter() +end + +function iter.invent_iterator:next() + local point = nil + local q = 0 + repeat + q = q + 1 + self.cur_p = self.cur_p + 1 + point = self:check_filter(self.table[self.cur_p]) + until point or q == 10 + + return point +end + +function iter.invent_iterator:check_filter(item) + if self.filter ~= nil then + if self.filter(item) then + if self.rvi then + return self.filter(item) + else + return item + end + else + return nil + end + else + return item + end +end + +function iter.invent_iterator:iter () + return function() return self:next() end, nil, nil +end + +-- An easier and more posh way of interfacing with find_marker_positions_by_prop. +function iter.inventory_iterator () + return iter.invent_iterator:new(items.inventory()) +end + +function iter.stash_iterator (point, y) + if y == nil then + return iter.invent_iterator:new(dgn.items_at(point.x, point.y)) + else + return iter.invent_iterator:new(dgn.items_at(point, y)) + end +end -- cgit v1.2.3-54-g00ecf From 1f482e4025a81d46a44479d85c53daa503cb5a11 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Mon, 28 Dec 2009 18:22:47 +1000 Subject: Give Lua access to DESC_QUALNAME and DESC_BASENAME. These do not seem to leak any information. If so, they can be limited to dlua implementations of item->name. --- crawl-ref/source/libutil.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crawl-ref/source/libutil.cc b/crawl-ref/source/libutil.cc index ce7fcbb429..26243f405c 100644 --- a/crawl-ref/source/libutil.cc +++ b/crawl-ref/source/libutil.cc @@ -69,6 +69,10 @@ description_level_type description_type_by_name(const char *desc) return DESC_INVENTORY; else if (!strcmp("none", desc)) return DESC_NONE; + else if (!strcmp("base", desc)) + return DESC_BASENAME; + else if (!strcmp("qual", desc)) + return DESC_QUALNAME; return DESC_PLAIN; } -- cgit v1.2.3-54-g00ecf From 4bd11a2119ce0fd7f137233e16cd7f745c13a2dd Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Mon, 28 Dec 2009 01:52:41 -0800 Subject: Rename MF_CREATED_FRIENDLY to MF_NO_REWARD, since that's all it's used for these days. --- crawl-ref/source/attitude-change.cc | 2 +- crawl-ref/source/directn.cc | 4 ++-- crawl-ref/source/enum.h | 2 +- crawl-ref/source/godabil.cc | 4 ++-- crawl-ref/source/misc.cc | 2 +- crawl-ref/source/mon-place.cc | 4 ++-- crawl-ref/source/mon-stuff.cc | 4 ++-- crawl-ref/source/monster.cc | 2 +- crawl-ref/source/religion.cc | 6 +++--- crawl-ref/source/spl-cast.cc | 2 +- crawl-ref/source/tags.cc | 2 +- crawl-ref/source/wiz-mon.cc | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/crawl-ref/source/attitude-change.cc b/crawl-ref/source/attitude-change.cc index fcfcf2d2a9..ef5ef2fcef 100644 --- a/crawl-ref/source/attitude-change.cc +++ b/crawl-ref/source/attitude-change.cc @@ -864,7 +864,7 @@ void beogh_convert_orc(monsters *orc, bool emergency, // The monster is not really *created* friendly, but should it // become hostile later on, it won't count as a good kill. - orc->flags |= MF_CREATED_FRIENDLY; + orc->flags |= MF_NO_REWARD; // Prevent assertion if the orc was previously worshipping a // different god, rather than already worshipping Beogh or being an diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index 3b0a1262b3..047dcd3974 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -1498,7 +1498,7 @@ void direction(dist& moves, const targetting_type restricts, { case ATT_FRIENDLY: m->attitude = ATT_GOOD_NEUTRAL; - m->flags &= ~MF_CREATED_FRIENDLY; + m->flags &= ~MF_NO_REWARD; m->flags |= MF_WAS_NEUTRAL; break; case ATT_GOOD_NEUTRAL: @@ -1513,7 +1513,7 @@ void direction(dist& moves, const targetting_type restricts, break; case ATT_HOSTILE: m->attitude = ATT_FRIENDLY; - m->flags |= MF_CREATED_FRIENDLY; + m->flags |= MF_NO_REWARD; break; } diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index 61dbeb3b2f..48bcb16db5 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -2122,7 +2122,7 @@ enum mon_attitude_type // These are now saved in an unsigned long in the monsters struct. enum monster_flag_type { - MF_CREATED_FRIENDLY = 0x01, // no benefit from killing + MF_NO_REWARD = 0x01, // no benefit from killing MF_JUST_SUMMONED = 0x02, // monster skips next available action MF_TAKING_STAIRS = 0x04, // is following player through stairs MF_INTERESTING = 0x08, // Player finds monster interesting diff --git a/crawl-ref/source/godabil.cc b/crawl-ref/source/godabil.cc index f8b6ce9960..8888f868ab 100644 --- a/crawl-ref/source/godabil.cc +++ b/crawl-ref/source/godabil.cc @@ -279,7 +279,7 @@ void yred_make_enslaved_soul(monsters *mon, bool force_hostile, mon->colour = ETC_UNHOLY; - mon->flags |= MF_CREATED_FRIENDLY; + mon->flags |= MF_NO_REWARD; mon->flags |= MF_ENSLAVED_SOUL; if (twisted) @@ -1146,7 +1146,7 @@ bool evolve_flora() current_plant->upgrade_type(current_target.new_type, true, true); current_plant->god = GOD_FEDHAS; current_plant->attitude = ATT_FRIENDLY; - current_plant->flags |= MF_CREATED_FRIENDLY; + current_plant->flags |= MF_NO_REWARD; current_plant->flags |= MF_ATT_CHANGE_ATTEMPT; // Try to remove slowly dying in case we are upgrading a diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index b5c9e6bb40..2cc226f127 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -3219,7 +3219,7 @@ bool stop_attack_prompt(const monsters *mon, bool beam_attack, const bool isUnchivalric = is_unchivalric_attack(&you, mon); const bool isHoly = mon->is_holy() && (mon->attitude != ATT_HOSTILE - || testbits(mon->flags, MF_CREATED_FRIENDLY) + || testbits(mon->flags, MF_NO_REWARD) || testbits(mon->flags, MF_WAS_NEUTRAL)); if (isFriendly) diff --git a/crawl-ref/source/mon-place.cc b/crawl-ref/source/mon-place.cc index 3a88d27774..27b6c8fe20 100644 --- a/crawl-ref/source/mon-place.cc +++ b/crawl-ref/source/mon-place.cc @@ -1036,7 +1036,7 @@ int place_monster(mgen_data mg, bool force_pos) // Don't give XP for the slaves to discourage hunting. Pikel // has an artificially large XP modifier to compensate for // this. - menv[band_id].flags |= MF_CREATED_FRIENDLY; + menv[band_id].flags |= MF_NO_REWARD; menv[band_id].props["pikel_band"] = true; } } @@ -2578,7 +2578,7 @@ int mons_place(mgen_data mg) if (mg.behaviour > NUM_BEHAVIOURS) { if (mg.behaviour == BEH_FRIENDLY) - creation->flags |= MF_CREATED_FRIENDLY; + creation->flags |= MF_NO_REWARD; if (mg.behaviour == BEH_NEUTRAL || mg.behaviour == BEH_GOOD_NEUTRAL || mg.behaviour == BEH_STRICT_NEUTRAL) diff --git a/crawl-ref/source/mon-stuff.cc b/crawl-ref/source/mon-stuff.cc index 730fb54ef2..7a85194ea2 100644 --- a/crawl-ref/source/mon-stuff.cc +++ b/crawl-ref/source/mon-stuff.cc @@ -595,7 +595,7 @@ static void _give_adjusted_experience(monsters *monster, killer_type killer, const int experience = exper_value(monster); const bool created_friendly = - testbits(monster->flags, MF_CREATED_FRIENDLY); + testbits(monster->flags, MF_NO_REWARD); const bool was_neutral = testbits(monster->flags, MF_WAS_NEUTRAL); const bool no_xp = monster->has_ench(ENCH_ABJ) || !experience; const bool already_got_half_xp = testbits(monster->flags, MF_GOT_HALF_XP); @@ -1616,7 +1616,7 @@ int monster_die(monsters *monster, killer_type killer, && monster->visible_to(&you); const bool exploded = monster->flags & MF_EXPLODE_KILL; - const bool created_friendly = testbits(monster->flags, MF_CREATED_FRIENDLY); + const bool created_friendly = testbits(monster->flags, MF_NO_REWARD); bool anon = (killer_index == ANON_FRIENDLY_MONSTER); const mon_holy_type targ_holy = monster->holiness(); diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index 862aa075c4..f9d18c97d9 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -5955,7 +5955,7 @@ void monsters::react_to_damage(int damage, beam_type flavour, kill_category whos if (nmons != -1 && nmons != NON_MONSTER) { // Don't allow milking the royal jelly. - menv[nmons].flags |= MF_CREATED_FRIENDLY; + menv[nmons].flags |= MF_NO_REWARD; spawned++; } } diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 763f1c0709..3a0c43fb0f 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -2683,7 +2683,7 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known, } if (thing_done == DID_ATTACK_HOLY && victim - && !testbits(victim->flags, MF_CREATED_FRIENDLY) + && !testbits(victim->flags, MF_NO_REWARD) && !testbits(victim->flags, MF_WAS_NEUTRAL)) { break; @@ -3029,7 +3029,7 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known, case GOD_SHINING_ONE: case GOD_ELYVILON: if (victim - && !testbits(victim->flags, MF_CREATED_FRIENDLY) + && !testbits(victim->flags, MF_NO_REWARD) && !testbits(victim->flags, MF_WAS_NEUTRAL)) { break; @@ -3097,7 +3097,7 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known, case GOD_SHINING_ONE: case GOD_ELYVILON: if (victim - && !testbits(victim->flags, MF_CREATED_FRIENDLY) + && !testbits(victim->flags, MF_NO_REWARD) && !testbits(victim->flags, MF_WAS_NEUTRAL)) { break; diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index 7a65c84f2e..9f875c298f 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -1058,7 +1058,7 @@ static void _try_monster_cast(spell_type spell, int powc, mon->type = MONS_HUMAN; mon->behaviour = BEH_SEEK; mon->attitude = ATT_FRIENDLY; - mon->flags = (MF_CREATED_FRIENDLY | MF_JUST_SUMMONED | MF_SEEN + mon->flags = (MF_NO_REWARD | MF_JUST_SUMMONED | MF_SEEN | MF_WAS_IN_VIEW | MF_HARD_RESET); mon->hit_points = you.hp; mon->hit_dice = you.experience_level; diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc index 6d12c323ab..82a2f462ab 100644 --- a/crawl-ref/source/tags.cc +++ b/crawl-ref/source/tags.cc @@ -2426,7 +2426,7 @@ void tag_missing_level_attitude() if (menv[i].type < 0) continue; - is_friendly = testbits(menv[i].flags, MF_CREATED_FRIENDLY); + is_friendly = testbits(menv[i].flags, MF_NO_REWARD); menv[i].foe = MHITNOT; diff --git a/crawl-ref/source/wiz-mon.cc b/crawl-ref/source/wiz-mon.cc index d7270d082a..632b716b54 100644 --- a/crawl-ref/source/wiz-mon.cc +++ b/crawl-ref/source/wiz-mon.cc @@ -285,7 +285,7 @@ void debug_list_monsters() int exp = exper_value(*mi); total_exp += exp; - if ((mi->flags & (MF_WAS_NEUTRAL | MF_CREATED_FRIENDLY)) + if ((mi->flags & (MF_WAS_NEUTRAL | MF_NO_REWARD)) || mi->has_ench(ENCH_ABJ)) { continue; -- cgit v1.2.3-54-g00ecf From adcc6b42f200b5a4c7f75d5826884494684a587b Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Mon, 28 Dec 2009 18:56:12 +0530 Subject: Postprocess shoals levels to fix heightmap for vaults on the level so that the tide interacts reasonably with vaults. --- crawl-ref/source/dgn-shoals.cc | 90 ++++++++++++++++++++++++++++++++---------- crawl-ref/source/dgn-shoals.h | 1 + crawl-ref/source/dungeon.cc | 12 ++++++ 3 files changed, 83 insertions(+), 20 deletions(-) diff --git a/crawl-ref/source/dgn-shoals.cc b/crawl-ref/source/dgn-shoals.cc index da0070239e..0215afd81f 100644 --- a/crawl-ref/source/dgn-shoals.cc +++ b/crawl-ref/source/dgn-shoals.cc @@ -6,6 +6,7 @@ #include "dungeon.h" #include "dgn-shoals.h" #include "env.h" +#include "flood_find.h" #include "items.h" #include "maps.h" #include "mon-place.h" @@ -76,6 +77,40 @@ static dungeon_feature_type _shoals_feature_at(const coord_def &c) return _shoals_feature_by_height(height); } +static int _shoals_feature_height(dungeon_feature_type feat) +{ + switch (feat) + { + case DNGN_FLOOR: + return SHT_FLOOR; + case DNGN_SHALLOW_WATER: + return SHT_SHALLOW_WATER; + case DNGN_DEEP_WATER: + return SHT_SHALLOW_WATER - 1; + default: + return 0; + } +} + +// Returns true if the given feature can be affected by Shoals tides. +static bool _shoals_tide_susceptible_feat(dungeon_feature_type feat) +{ + return (feat_is_water(feat) || feat == DNGN_FLOOR); +} + +// Return true if tide effects can propagate through this square. +// NOTE: uses RNG! +static bool _shoals_tide_passable_feat(dungeon_feature_type feat) +{ + return (feat_is_watery(feat) + // The Shoals tide can sometimes lap past the doorways of rooms + // near the water. Note that the actual probability of the tide + // getting through a doorway is this probability * 0.5 -- + // see _shoals_apply_tide. + || (feat == DNGN_OPEN_DOOR && !one_chance_in(3)) + || (feat == DNGN_CLOSED_DOOR && one_chance_in(3))); +} + static void _shoals_init_heights() { env.heightmap.reset(new grid_heightmap); @@ -448,6 +483,31 @@ void prepare_shoals(int level_number) _shoals_furniture(_shoals_margin); } +// Search the map for vaults and set the terrain heights for features +// in the vault to reasonable levels. +void shoals_postprocess_level() +{ + if (!player_in_branch(BRANCH_SHOALS) || !env.heightmap.get()) + return; + + for (rectangle_iterator ri(1); ri; ++ri) + { + const coord_def c(*ri); + if (!(dgn_Map_Mask(c) & MMT_VAULT)) + continue; + + const dungeon_feature_type feat(grd(c)); + if (!_shoals_tide_susceptible_feat(feat)) + continue; + + const dungeon_feature_type expected_feat(_shoals_feature_at(c)); + // It would be nice to do actual height contours within + // vaults, but for now, keep it simple. + if (feat != expected_feat) + shoals_heights(c) = _shoals_feature_height(feat); + } +} + // The raw tide height / TIDE_MULTIPLIER is the actual tide height. The higher // the tide multiplier, the slower the tide advances and recedes. A multiplier // of X implies that the tide will advance visibly about once in X turns. @@ -554,22 +614,8 @@ static void _shoals_apply_tide_feature_at(coord_def c, dungeon_terrain_changed(c, feat, true, false, true); } -static int _shoals_feature_height(dungeon_feature_type feat) -{ - switch (feat) - { - case DNGN_FLOOR: - return SHT_FLOOR; - case DNGN_SHALLOW_WATER: - return SHT_SHALLOW_WATER; - case DNGN_DEEP_WATER: - return SHT_SHALLOW_WATER - 1; - default: - return 0; - } -} - -// Determines if the +// Determines if the tide is rising or falling based on before and +// after features at the same square. static tide_direction _shoals_feature_tide_height_change( dungeon_feature_type oldfeat, dungeon_feature_type newfeat) @@ -623,12 +669,16 @@ static void _shoals_apply_tide(int tide) for (int i = 0, size = cpage.size(); i < size; ++i) { coord_def c(cpage[i]); - const bool was_wet(feat_is_water(grd(c))); + const bool was_wet(_shoals_tide_passable_feat(grd(c))); seen_points(c) = true; _shoals_apply_tide_at(c, tide); - // Only wet squares can propagate the tide onwards. - if (was_wet) + const bool is_wet(feat_is_water(grd(c))); + // Only squares that were wet (before applying tide + // effects!) can propagate the tide onwards. If the tide is + // receding and just left the square dry, there's only a chance of + // it continuing past and draining other squares through this one. + if (was_wet && (is_wet || coinflip())) { for (adjacent_iterator ai(c); ai; ++ai) { @@ -638,7 +688,7 @@ static void _shoals_apply_tide(int tide) if (!seen_points(adj)) { const dungeon_feature_type feat = grd(adj); - if (feat_is_water(feat) || feat == DNGN_FLOOR) + if (_shoals_tide_susceptible_feat(feat)) { npage.push_back(adj); seen_points(adj) = true; diff --git a/crawl-ref/source/dgn-shoals.h b/crawl-ref/source/dgn-shoals.h index aae09ff653..f558f6606f 100644 --- a/crawl-ref/source/dgn-shoals.h +++ b/crawl-ref/source/dgn-shoals.h @@ -2,6 +2,7 @@ #define DGN_SHOALS_H void prepare_shoals(int level_number); +void shoals_postprocess_level(); void shoals_apply_tides(int turns_elapsed); #endif diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 89e643a68b..48268f2067 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -233,6 +233,8 @@ typedef std::list coord_list; static void _dgn_set_floor_colours(); static bool _fixup_interlevel_connectivity(); +void dgn_postprocess_level(); + ////////////////////////////////////////////////////////////////////////// // Static data @@ -374,6 +376,8 @@ bool builder(int level_number, int level_type) vault_names.push_back(you.level_type_name); } + dgn_postprocess_level(); + dgn_Layout_Type.clear(); Level_Unique_Maps.clear(); Level_Unique_Tags.clear(); @@ -398,6 +402,13 @@ bool builder(int level_number, int level_type) return (false); } +// Should be called after a level is constructed to perform any final +// fixups. +void dgn_postprocess_level() +{ + shoals_postprocess_level(); +} + void level_welcome_messages() { for (int i = 0, size = Level_Vaults.size(); i < size; ++i) @@ -4132,6 +4143,7 @@ bool dgn_place_map(const map_def *mdef, bool clobber, bool make_no_exits, } setup_environment_effects(); + dgn_postprocess_level(); } return (did_map); -- cgit v1.2.3-54-g00ecf From 87f499df5e027c60f0d9f217464dfafd190b0772 Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Mon, 28 Dec 2009 19:01:59 +0530 Subject: Fix shoals tides being arrested on squares with items that cannot be moved to an adjacent square. --- crawl-ref/source/dgn-shoals.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crawl-ref/source/dgn-shoals.cc b/crawl-ref/source/dgn-shoals.cc index 0215afd81f..a3a2b12ea9 100644 --- a/crawl-ref/source/dgn-shoals.cc +++ b/crawl-ref/source/dgn-shoals.cc @@ -561,10 +561,11 @@ static bool _shoals_tide_sweep_items_clear(coord_def c) return true; const coord_def target(_shoals_escape_place_from(c, false)); - if (target.origin()) - return false; - - move_item_stack_to_grid(c, target); + // Don't abort tide entry because of items. If we can't sweep the + // item clear here, let dungeon_terrain_changed teleport the item + // to the nearest safe square. + if (!target.origin()) + move_item_stack_to_grid(c, target); return true; } -- cgit v1.2.3-54-g00ecf From bad09911df71edf9399974fb619ff79e4797fa5e Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Mon, 28 Dec 2009 23:05:38 +0530 Subject: Place clumps of plants on Shoals levels. --- crawl-ref/source/dgn-shoals.cc | 338 ++++++++++++++++++++++++++++++++++++++++- crawl-ref/source/dungeon.cc | 24 +-- crawl-ref/source/dungeon.h | 3 + 3 files changed, 352 insertions(+), 13 deletions(-) diff --git a/crawl-ref/source/dgn-shoals.cc b/crawl-ref/source/dgn-shoals.cc index a3a2b12ea9..10b49fafb8 100644 --- a/crawl-ref/source/dgn-shoals.cc +++ b/crawl-ref/source/dgn-shoals.cc @@ -9,6 +9,7 @@ #include "flood_find.h" #include "items.h" #include "maps.h" +#include "mgen_data.h" #include "mon-place.h" #include "mon-util.h" #include "random.h" @@ -18,6 +19,9 @@ #include #include +typedef FixedArray grid_bool; +typedef FixedArray grid_short; + const char *ENVP_SHOALS_TIDE_KEY = "shoals-tide-height"; const char *ENVP_SHOALS_TIDE_VEL = "shoals-tide-velocity"; @@ -401,7 +405,8 @@ static void _shoals_furniture(int margin) const coord_def p = _pick_shoals_island_distant_from(c); // Place the rune const map_def *vault = random_map_for_tag("shoal_rune"); - dgn_place_map(vault, false, true, p); + dgn_ensure_vault_placed(dgn_place_map(vault, false, true, p), + false); const int nhuts = std::min(8, int(_shoals_islands.size())); for (int i = 2; i < nhuts; ++i) @@ -464,6 +469,334 @@ static void _shoals_deepen_edges() } } +static int _shoals_contiguous_feature_flood( + FixedArray &rmap, + coord_def c, + dungeon_feature_type feat, + int nregion, + int size_limit) +{ + std::vector visit; + visit.push_back(c); + int npoints = 1; + for (size_t i = 0; i < visit.size() && npoints < size_limit; ++i) + { + const coord_def p(visit[i]); + rmap(p) = nregion; + + if (npoints < size_limit) + { + for (adjacent_iterator ai(p); ai && npoints < size_limit; ++ai) + { + const coord_def adj(*ai); + if (in_bounds(adj) && !rmap(adj) && grd(adj) == feat + && unforbidden(adj, MMT_VAULT)) + { + rmap(adj) = nregion; + visit.push_back(adj); + ++npoints; + } + } + } + } + return npoints; +} + +static coord_def _shoals_region_center( + FixedArray &rmap, + coord_def c) +{ + const int nregion(rmap(c)); + int nseen = 0; + + double cx = 0.0, cy = 0.0; + std::vector visit; + visit.push_back(c); + FixedArray visited(false); + for (size_t i = 0; i < visit.size(); ++i) + { + const coord_def p(visit[i]); + visited(p) = true; + + ++nseen; + if (nseen == 1) + { + cx = p.x; + cy = p.y; + } + else + { + cx = (cx * (nseen - 1) + p.x) / nseen; + cy = (cy * (nseen - 1) + p.y) / nseen; + } + + for (adjacent_iterator ai(p); ai; ++ai) + { + const coord_def adj(*ai); + if (in_bounds(adj) && !visited(adj) && rmap(adj) == nregion) + { + visited(adj) = true; + visit.push_back(adj); + } + } + } + + const coord_def cgravity(cx, cy); + coord_def closest_to_center; + int closest_distance = 0; + for (int i = 0, size = visit.size(); i < size; ++i) + { + const coord_def p(visit[i]); + const int dist2 = (p - cgravity).abs(); + if (closest_to_center.origin() || closest_distance > dist2) + { + closest_to_center = p; + closest_distance = dist2; + } + } + return closest_to_center; +} + +struct weighted_region +{ + int weight; + coord_def pos; + + weighted_region(int _weight, coord_def _pos) : weight(_weight), pos(_pos) + { + } +}; + +static std::vector +_shoals_point_feat_cluster(dungeon_feature_type feat, + const int wanted_count, + grid_short ®ion_map) +{ + std::vector regions; + int region = 1; + for (rectangle_iterator ri(1); ri; ++ri) + { + coord_def c(*ri); + if (!region_map(c) && grd(c) == feat + && unforbidden(c, MMT_VAULT)) + { + const int featcount = + _shoals_contiguous_feature_flood(region_map, + c, + feat, + region++, + wanted_count * 3 / 2); + if (featcount >= wanted_count) + regions.push_back(weighted_region(featcount, c)); + } + } + return (regions); +} + +static coord_def _shoals_pick_region( + grid_short ®ion_map, + const std::vector ®ions) +{ + if (regions.empty()) + return coord_def(); + return _shoals_region_center(region_map, + regions[random2(regions.size())].pos); +} + +static void _shoals_make_plant_at(coord_def p) +{ + // [ds] Why is hostile_at() saddled with unnecessary parameters + // related to summoning? + mons_place(mgen_data::hostile_at(MONS_PLANT, "", false, 0, 0, p)); +} + +static bool _shoals_plantworthy_feat(dungeon_feature_type feat) +{ + return (feat == DNGN_SHALLOW_WATER || feat == DNGN_FLOOR); +} + +static void _shoals_make_plant_near(coord_def c, int radius, + dungeon_feature_type preferred_feat, + grid_bool *verboten) +{ + const int ntries = 5; + for (int i = 0; i < ntries; ++i) + { + const coord_def plant_place(_random_point_from(c, random2(1 + radius))); + if (!plant_place.origin() + && !monster_at(plant_place)) + { + const dungeon_feature_type feat(grd(plant_place)); + if (_shoals_plantworthy_feat(feat) + && (feat == preferred_feat || coinflip()) + && (!verboten || !(*verboten)(plant_place))) + { + _shoals_make_plant_at(plant_place); + return; + } + } + } +} + +static void _shoals_plant_cluster(coord_def c, int nplants, int radius, + dungeon_feature_type favoured_feat, + grid_bool *verboten) +{ + for (int i = 0; i < nplants; ++i) + _shoals_make_plant_near(c, radius, favoured_feat, verboten); +} + +static void _shoals_plant_supercluster(coord_def c, + dungeon_feature_type favoured_feat, + grid_bool *verboten = NULL) +{ + _shoals_plant_cluster(c, random_range(10, 25, 2), + random_range(3, 9), favoured_feat, + verboten); + + const int nadditional_clusters(std::max(0, random_range(-1, 4, 2))); + for (int i = 0; i < nadditional_clusters; ++i) + { + const coord_def satellite( + _random_point_from(c, random_range(2, 12))); + if (!satellite.origin()) + _shoals_plant_cluster(satellite, random_range(5, 23, 2), + random_range(2, 7), + favoured_feat, + verboten); + } +} + +static void _shoals_generate_water_plants(coord_def mangrove_central) +{ + if (!mangrove_central.origin()) + _shoals_plant_supercluster(mangrove_central, DNGN_SHALLOW_WATER); +} + +struct coord_dbl +{ + double x, y; + + coord_dbl(double _x, double _y) : x(_x), y(_y) { } + coord_dbl operator + (const coord_dbl &o) const + { + return coord_dbl(x + o.x, y + o.y); + } + coord_dbl &operator += (const coord_dbl &o) + { + x += o.x; + y += o.y; + return *this; + } +}; + +static coord_def _int_coord(const coord_dbl &c) +{ + return coord_def(c.x, c.y); +} + +static std::vector _shoals_windshadows(grid_bool &windy) +{ + const int wind_angle_degrees = random2(360); + const double wind_angle(_to_radians(wind_angle_degrees)); + const coord_dbl wi(cos(wind_angle), sin(wind_angle)); + const double epsilon = 1e-5; + + std::vector wind_points; + if (wi.x > epsilon || wi.x < -epsilon) + { + for (int y = 1; y < GYM - 1; ++y) + wind_points.push_back(coord_dbl(wi.x > epsilon ? 1 : GXM - 2, y)); + } + if (wi.y > epsilon || wi.y < -epsilon) + { + for (int x = 1; x < GXM - 1; ++x) + wind_points.push_back(coord_dbl(x, wi.y > epsilon ? 1 : GYM - 2)); + } + + for (size_t i = 0; i < wind_points.size(); ++i) + { + const coord_def here(_int_coord(wind_points[i])); + windy(here) = true; + + coord_dbl next = wind_points[i] + wi; + while (_int_coord(next) == here) + next += wi; + + const coord_def nextp(_int_coord(next)); + if (in_bounds(nextp) && !windy(nextp) && !feat_is_solid(grd(nextp))) + { + windy(nextp) = true; + wind_points.push_back(next); + } + } + + // To avoid plants cropping up inside vaults, mark everything inside + // vaults as "windy". + for (rectangle_iterator ri(1); ri; ++ri) + if (!unforbidden(*ri, MMT_VAULT)) + windy(*ri) = true; + + // Now we know the places in the wind shadow: + std::vector wind_shadows; + for (rectangle_iterator ri(1); ri; ++ri) + { + const coord_def p(*ri); + if (!windy(p) && grd(p) == DNGN_FLOOR + && (_has_adjacent_feat(p, DNGN_STONE_WALL) + || _has_adjacent_feat(p, DNGN_ROCK_WALL))) + wind_shadows.push_back(p); + } + return wind_shadows; +} + +static void _shoals_generate_wind_sheltered_plants( + std::vector &places, grid_bool &windy) +{ + if (places.empty()) + return; + + const int chosen = random2(places.size()); + const coord_def spot = places[random2(places.size())]; + places.erase(places.begin() + chosen); + + _shoals_plant_supercluster(spot, DNGN_FLOOR, &windy); +} + +static void _shoals_generate_flora() +{ + // Water clusters are groups of plants clustered near the water. + // Wind clusters are groups of plants clustered in wind shadow -- + // possibly because they can grow better without being exposed to the + // strong winds of the Shoals. + // + // Yeah, the strong winds aren't there yet, but they could be! + // + const int n_water_clusters = std::max(0, random_range(-1, 6, 2)); + const int n_wind_clusters = std::max(0, random_range(-2, 2, 2)); + + if (n_water_clusters) + { + grid_short region_map(0); + std::vector regions( + _shoals_point_feat_cluster(DNGN_SHALLOW_WATER, 6, region_map)); + + for (int i = 0; i < n_water_clusters; ++i) + { + const coord_def p(_shoals_pick_region(region_map, regions)); + _shoals_generate_water_plants(p); + } + } + + if (n_wind_clusters) + { + grid_bool windy(false); + std::vector wind_shadows = _shoals_windshadows(windy); + for (int i = 0; i < n_wind_clusters; ++i) + _shoals_generate_wind_sheltered_plants(wind_shadows, windy); + } +} + void prepare_shoals(int level_number) { dgn_Build_Method += make_stringf(" shoals+ [%d]", level_number); @@ -481,6 +814,9 @@ void prepare_shoals(int level_number) _shoals_deepen_edges(); _shoals_smooth_water(); _shoals_furniture(_shoals_margin); + + // This has to happen after placing shoal rune vault! + _shoals_generate_flora(); } // Search the map for vaults and set the terrain heights for features diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 48268f2067..04ce67e162 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -897,8 +897,8 @@ void dgn_register_place(const vault_placement &place, bool register_vault) #endif } -static bool _ensure_vault_placed(bool vault_success, - bool disable_further_vaults) +bool dgn_ensure_vault_placed(bool vault_success, + bool disable_further_vaults) { if (!vault_success) dgn_level_vetoed = true; @@ -909,9 +909,9 @@ static bool _ensure_vault_placed(bool vault_success, static bool _ensure_vault_placed_ex( bool vault_success, const map_def *vault ) { - return _ensure_vault_placed( vault_success, - (!vault->has_tag("extra") - && vault->orient == MAP_ENCOMPASS) ); + return dgn_ensure_vault_placed( vault_success, + (!vault->has_tag("extra") + && vault->orient == MAP_ENCOMPASS) ); } static coord_def _find_level_feature(int feat) @@ -1766,7 +1766,7 @@ static void _build_overflow_temples(int level_number) // find the overflow temple map, so don't veto the level. return; - if (!_ensure_vault_placed(_build_vaults(level_number, vault), false)) + if (!dgn_ensure_vault_placed(_build_vaults(level_number, vault), false)) { #ifdef DEBUG_TEMPLES mprf(MSGCH_DIAGNOSTICS, "Couldn't place overlfow temple '%s', " @@ -2245,7 +2245,7 @@ static builder_rc_type _builder_by_type(int level_number, char level_type) pandemon_level_names[which_demon]); } - _ensure_vault_placed( _build_vaults(level_number, vault), true ); + dgn_ensure_vault_placed( _build_vaults(level_number, vault), true ); } else { @@ -2322,7 +2322,7 @@ static void _portal_vault_level(int level_number) dgn_replace_area(0, 0, GXM-1, GYM-1, DNGN_ROCK_WALL, vault->border_fill_type); - _ensure_vault_placed( _build_vaults(level_number, vault), true ); + dgn_ensure_vault_placed( _build_vaults(level_number, vault), true ); } else { @@ -6002,7 +6002,7 @@ static bool _plan_1(int level_number) ASSERT(vault); bool success = _build_vaults(level_number, vault); - _ensure_vault_placed(success, false); + dgn_ensure_vault_placed(success, false); return false; } @@ -6016,7 +6016,7 @@ static bool _plan_2(int level_number) ASSERT(vault); bool success = _build_vaults(level_number, vault); - _ensure_vault_placed(success, false); + dgn_ensure_vault_placed(success, false); return false; } @@ -6030,7 +6030,7 @@ static bool _plan_3(int level_number) ASSERT(vault); bool success = _build_vaults(level_number, vault); - _ensure_vault_placed(success, false); + dgn_ensure_vault_placed(success, false); return true; } @@ -6174,7 +6174,7 @@ static bool _plan_6(int level_number) ASSERT(vault); bool success = _build_vaults(level_number, vault); - _ensure_vault_placed(success, false); + dgn_ensure_vault_placed(success, false); // This "back door" is often one of the easier ways to get out of // pandemonium... the easiest is to use the banish spell. diff --git a/crawl-ref/source/dungeon.h b/crawl-ref/source/dungeon.h index bc140c3f2e..f58c17355c 100644 --- a/crawl-ref/source/dungeon.h +++ b/crawl-ref/source/dungeon.h @@ -268,6 +268,9 @@ void dgn_replace_area(int sx, int sy, int ex, int ey, dungeon_feature_type feature, unsigned mmask = 0, bool needs_update = false); +bool dgn_ensure_vault_placed(bool vault_success, + bool disable_further_vaults); + inline int count_feature_in_box( const coord_def& p1, const coord_def& p2, dungeon_feature_type feat ) { -- cgit v1.2.3-54-g00ecf From e9017206fd30a9cb7981d42ee6f8f1809f2f2933 Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Tue, 29 Dec 2009 00:01:37 +0530 Subject: Experimental kraken adjustments. Boost kraken and tentacle damage. Force the tentacles to stay close to the body of the kraken to make the creature look more like a unit. Tentacles are now amphibious and can reach out onto land, although they cannot stray too far from the main body. --- crawl-ref/source/externs.h | 10 ++++++++++ crawl-ref/source/mon-act.cc | 22 ++++++++++++++++++++-- crawl-ref/source/mon-data.h | 8 ++++---- crawl-ref/source/mon-stuff.cc | 2 +- crawl-ref/source/monster.h | 2 ++ crawl-ref/source/stuff.h | 5 ----- 6 files changed, 37 insertions(+), 12 deletions(-) diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index 5f4f5e7e40..1c3a962d5d 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -92,6 +92,11 @@ class KillMaster; class ghost_demon; struct glyph; +template inline Z sgn(Z x) +{ + return (x < 0 ? -1 : (x > 0 ? 1 : 0)); +} + struct coord_def { int x; @@ -215,6 +220,11 @@ struct coord_def return (copy *= mul); } + coord_def sgn() const + { + return coord_def(::sgn(x), ::sgn(y)); + } + int abs() const { return (x * x + y * y); diff --git a/crawl-ref/source/mon-act.cc b/crawl-ref/source/mon-act.cc index 16c025e217..3fc1cea5a0 100644 --- a/crawl-ref/source/mon-act.cc +++ b/crawl-ref/source/mon-act.cc @@ -332,6 +332,24 @@ static void _maybe_set_patrol_route(monsters *monster) } } +// Keep kraken tentacles from wandering too far away from the boss monster. +static void _kraken_tentacle_movement_clamp(monsters *tentacle) +{ + if (tentacle->type != MONS_KRAKEN_TENTACLE) + return; + + const int kraken_idx = tentacle->number; + ASSERT(!invalid_monster_index(kraken_idx)); + + monsters *kraken = &menv[kraken_idx]; + const int distance_to_head = + grid_distance(tentacle->pos(), kraken->pos()); + // Beyond max distance, the only move the tentacle can make is + // back towards the head. + if (distance_to_head >= KRAKEN_TENTACLE_RANGE) + mmov = (kraken->pos() - tentacle->pos()).sgn(); +} + //--------------------------------------------------------------- // // handle_movement @@ -378,8 +396,7 @@ static void _handle_movement(monsters *monster) delta = monster->target - monster->pos(); // Move the monster. - mmov.x = (delta.x > 0) ? 1 : ((delta.x < 0) ? -1 : 0); - mmov.y = (delta.y > 0) ? 1 : ((delta.y < 0) ? -1 : 0); + mmov = delta.sgn(); if (mons_is_fleeing(monster) && monster->travel_target != MTRAV_WALL && (!monster->friendly() @@ -1849,6 +1866,7 @@ static void _handle_monster_move(monsters *monster) { // Calculates mmov based on monster target. _handle_movement(monster); + _kraken_tentacle_movement_clamp(monster); if (mons_is_confused(monster) || monster->type == MONS_AIR_ELEMENTAL diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index 5d42867f4d..ad3414acae 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -3303,7 +3303,7 @@ static monsterentry mondata[] = { M_COLD_BLOOD | M_SPELLCASTER, MR_NO_FLAGS, 1500, 20, MONS_KRAKEN, MONS_KRAKEN, MH_NATURAL, -3, - { {AT_BITE, AF_PLAIN, 15}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, + { {AT_BITE, AF_PLAIN, 65}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, { 20, 10, 10, 0 }, 20, 0, MST_KRAKEN, CE_NOCORPSE, Z_NOZOMBIE, S_SILENT, I_ANIMAL, HT_WATER, FL_NONE, 10, DEFAULT_ENERGY, @@ -3315,10 +3315,10 @@ static monsterentry mondata[] = { M_COLD_BLOOD | M_NO_EXP_GAIN, MR_RES_ASPHYX, 0, 10, MONS_KRAKEN_TENTACLE, MONS_KRAKEN_TENTACLE, MH_NATURAL, MAG_IMMUNE, - { {AT_TENTACLE_SLAP, AF_PLAIN, 15}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, - { 5, 3, 5, 0 }, + { {AT_TENTACLE_SLAP, AF_PLAIN, 29}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, + { 12, 3, 2, 0 }, 5, 7, MST_NO_SPELLS, CE_NOCORPSE, Z_NOZOMBIE, S_SILENT, - I_ANIMAL, HT_WATER, FL_NONE, 10, DEFAULT_ENERGY, + I_ANIMAL, HT_AMPHIBIOUS_WATER, FL_NONE, 10, DEFAULT_ENERGY, MONUSE_NOTHING, MONEAT_NOTHING, SIZE_LARGE }, diff --git a/crawl-ref/source/mon-stuff.cc b/crawl-ref/source/mon-stuff.cc index 7a85194ea2..3db902c13b 100644 --- a/crawl-ref/source/mon-stuff.cc +++ b/crawl-ref/source/mon-stuff.cc @@ -1323,7 +1323,7 @@ static int _tentacle_too_far(monsters *head, monsters *tentacle) // If this ever changes, we'd need to check if the head and tentacle // are still in the same pool. // XXX: Actually, using Fedhas's Sunlight power you can separate pools... - return grid_distance(head->pos(), tentacle->pos()) > LOS_RADIUS; + return grid_distance(head->pos(), tentacle->pos()) > KRAKEN_TENTACLE_RANGE; } void mons_relocated(monsters *monster) diff --git a/crawl-ref/source/monster.h b/crawl-ref/source/monster.h index 524c48b4d4..109dc876fb 100644 --- a/crawl-ref/source/monster.h +++ b/crawl-ref/source/monster.h @@ -3,6 +3,8 @@ #include "actor.h" +const int KRAKEN_TENTACLE_RANGE = 3; + class mon_enchant { public: diff --git a/crawl-ref/source/stuff.h b/crawl-ref/source/stuff.h index 89757eb99d..684df4175d 100644 --- a/crawl-ref/source/stuff.h +++ b/crawl-ref/source/stuff.h @@ -83,11 +83,6 @@ inline bool testbits(unsigned long flags, unsigned long test) return ((flags & test) == test); } -template inline Z sgn(Z x) -{ - return (x < 0 ? -1 : (x > 0 ? 1 : 0)); -} - bool is_trap_square(dungeon_feature_type grid); void zap_los_monsters(bool items_also); -- cgit v1.2.3-54-g00ecf From 1f325d8c00116cee89417c201127b5a9731e0d42 Mon Sep 17 00:00:00 2001 From: Johanna Ploog Date: Mon, 28 Dec 2009 22:49:23 +0100 Subject: Add purge's ballistomycete tiles, thanks! --- crawl-ref/source/mon-abil.cc | 2 -- crawl-ref/source/rltiles/dc-mon.txt | 2 ++ .../source/rltiles/dc-mon/active_ballistomycete.png | Bin 0 -> 3597 bytes crawl-ref/source/rltiles/dc-mon/ballistomycete.png | Bin 0 -> 3523 bytes crawl-ref/source/tilepick.cc | 4 +++- 5 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 crawl-ref/source/rltiles/dc-mon/active_ballistomycete.png create mode 100644 crawl-ref/source/rltiles/dc-mon/ballistomycete.png diff --git a/crawl-ref/source/mon-abil.cc b/crawl-ref/source/mon-abil.cc index 5325d3f27b..b64ffcf9b4 100644 --- a/crawl-ref/source/mon-abil.cc +++ b/crawl-ref/source/mon-abil.cc @@ -1499,7 +1499,5 @@ void activate_ballistomycetes( monsters * monster, const coord_def & origin) } if (you.see_cell(origin) && found_others) - { mprf("You feel the ballistomycetes will spawn a replacement spore."); - } } diff --git a/crawl-ref/source/rltiles/dc-mon.txt b/crawl-ref/source/rltiles/dc-mon.txt index 3a48f1307d..aba512e4b7 100644 --- a/crawl-ref/source/rltiles/dc-mon.txt +++ b/crawl-ref/source/rltiles/dc-mon.txt @@ -532,6 +532,8 @@ deep_elf_master_archer MONS_DEEP_ELF_MASTER_ARCHER ## Fungi ('f') fungus MONS_TOADSTOOL fungus MONS_FUNGUS +ballistomycete MONS_BALLISTOMYCETE_INACTIVE +active_ballistomycete MONS_BALLISTOMYCETE_ACTIVE wandering_mushroom MONS_WANDERING_MUSHROOM ## Goblins ('g') diff --git a/crawl-ref/source/rltiles/dc-mon/active_ballistomycete.png b/crawl-ref/source/rltiles/dc-mon/active_ballistomycete.png new file mode 100644 index 0000000000..bd01f0470c Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/active_ballistomycete.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/ballistomycete.png b/crawl-ref/source/rltiles/dc-mon/ballistomycete.png new file mode 100644 index 0000000000..69bff99afd Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/ballistomycete.png differ diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc index 34cbf7eb7f..28c94a04b0 100644 --- a/crawl-ref/source/tilepick.cc +++ b/crawl-ref/source/tilepick.cc @@ -199,7 +199,9 @@ int tileidx_monster_base(const monsters *mon, bool detected) // fungi ('f') case MONS_BALLISTOMYCETE: - return TILEP_MONS_FUNGUS; + if (!detected && mon->has_ench(ENCH_SPORE_PRODUCTION)) + return TILEP_MONS_BALLISTOMYCETE_ACTIVE; + return TILEP_MONS_BALLISTOMYCETE_INACTIVE; case MONS_TOADSTOOL: return TILEP_MONS_TOADSTOOL; case MONS_FUNGUS: -- cgit v1.2.3-54-g00ecf From de9c9716195ef407110fb99bdeed1c3b85e13385 Mon Sep 17 00:00:00 2001 From: Johanna Ploog Date: Mon, 28 Dec 2009 23:01:06 +0100 Subject: Move plant and fungi tiles into their own subdirectory. This seems sensible especially considering we'll also be adding tiles for the toadstool, bush, burning bush, and possibly more plants. That said, the folder could use some renaming itself. Not very creative right now. --- crawl-ref/source/rltiles/dc-mon.txt | 2 ++ .../source/rltiles/dc-mon/active_ballistomycete.png | Bin 3597 -> 0 bytes crawl-ref/source/rltiles/dc-mon/ballistomycete.png | Bin 3523 -> 0 bytes .../dc-mon/fungi_plants/active_ballistomycete.png | Bin 0 -> 3597 bytes .../rltiles/dc-mon/fungi_plants/ballistomycete.png | Bin 0 -> 3523 bytes crawl-ref/source/rltiles/dc-mon/fungi_plants/fungus.png | Bin 0 -> 828 bytes .../source/rltiles/dc-mon/fungi_plants/oklob_plant.png | Bin 0 -> 1037 bytes crawl-ref/source/rltiles/dc-mon/fungi_plants/plant.png | Bin 0 -> 673 bytes .../source/rltiles/dc-mon/fungi_plants/plant_crypt.png | Bin 0 -> 1539 bytes .../rltiles/dc-mon/fungi_plants/wandering_mushroom.png | Bin 0 -> 879 bytes crawl-ref/source/rltiles/dc-mon/fungus.png | Bin 828 -> 0 bytes crawl-ref/source/rltiles/dc-mon/oklob_plant.png | Bin 1037 -> 0 bytes crawl-ref/source/rltiles/dc-mon/plant.png | Bin 673 -> 0 bytes crawl-ref/source/rltiles/dc-mon/plant_crypt.png | Bin 1539 -> 0 bytes crawl-ref/source/rltiles/dc-mon/wandering_mushroom.png | Bin 879 -> 0 bytes 15 files changed, 2 insertions(+) delete mode 100644 crawl-ref/source/rltiles/dc-mon/active_ballistomycete.png delete mode 100644 crawl-ref/source/rltiles/dc-mon/ballistomycete.png create mode 100644 crawl-ref/source/rltiles/dc-mon/fungi_plants/active_ballistomycete.png create mode 100644 crawl-ref/source/rltiles/dc-mon/fungi_plants/ballistomycete.png create mode 100644 crawl-ref/source/rltiles/dc-mon/fungi_plants/fungus.png create mode 100644 crawl-ref/source/rltiles/dc-mon/fungi_plants/oklob_plant.png create mode 100644 crawl-ref/source/rltiles/dc-mon/fungi_plants/plant.png create mode 100644 crawl-ref/source/rltiles/dc-mon/fungi_plants/plant_crypt.png create mode 100644 crawl-ref/source/rltiles/dc-mon/fungi_plants/wandering_mushroom.png delete mode 100644 crawl-ref/source/rltiles/dc-mon/fungus.png delete mode 100644 crawl-ref/source/rltiles/dc-mon/oklob_plant.png delete mode 100644 crawl-ref/source/rltiles/dc-mon/plant.png delete mode 100644 crawl-ref/source/rltiles/dc-mon/plant_crypt.png delete mode 100644 crawl-ref/source/rltiles/dc-mon/wandering_mushroom.png diff --git a/crawl-ref/source/rltiles/dc-mon.txt b/crawl-ref/source/rltiles/dc-mon.txt index aba512e4b7..dba205a119 100644 --- a/crawl-ref/source/rltiles/dc-mon.txt +++ b/crawl-ref/source/rltiles/dc-mon.txt @@ -465,6 +465,7 @@ two_headed_ogre MONS_TWO_HEADED_OGRE ogre_mage MONS_OGRE_MAGE ## Plants ('P') +%sdir dc-mon/fungi_plants plant MONS_PLANT plant_crypt MONS_WITHERED_PLANT oklob_plant MONS_OKLOB_PLANT @@ -530,6 +531,7 @@ deep_elf_blademaster MONS_DEEP_ELF_BLADEMASTER deep_elf_master_archer MONS_DEEP_ELF_MASTER_ARCHER ## Fungi ('f') +%sdir dc-mon/fungi_plants fungus MONS_TOADSTOOL fungus MONS_FUNGUS ballistomycete MONS_BALLISTOMYCETE_INACTIVE diff --git a/crawl-ref/source/rltiles/dc-mon/active_ballistomycete.png b/crawl-ref/source/rltiles/dc-mon/active_ballistomycete.png deleted file mode 100644 index bd01f0470c..0000000000 Binary files a/crawl-ref/source/rltiles/dc-mon/active_ballistomycete.png and /dev/null differ diff --git a/crawl-ref/source/rltiles/dc-mon/ballistomycete.png b/crawl-ref/source/rltiles/dc-mon/ballistomycete.png deleted file mode 100644 index 69bff99afd..0000000000 Binary files a/crawl-ref/source/rltiles/dc-mon/ballistomycete.png and /dev/null differ diff --git a/crawl-ref/source/rltiles/dc-mon/fungi_plants/active_ballistomycete.png b/crawl-ref/source/rltiles/dc-mon/fungi_plants/active_ballistomycete.png new file mode 100644 index 0000000000..bd01f0470c Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/fungi_plants/active_ballistomycete.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/fungi_plants/ballistomycete.png b/crawl-ref/source/rltiles/dc-mon/fungi_plants/ballistomycete.png new file mode 100644 index 0000000000..69bff99afd Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/fungi_plants/ballistomycete.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/fungi_plants/fungus.png b/crawl-ref/source/rltiles/dc-mon/fungi_plants/fungus.png new file mode 100644 index 0000000000..75d0cd66ed Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/fungi_plants/fungus.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/fungi_plants/oklob_plant.png b/crawl-ref/source/rltiles/dc-mon/fungi_plants/oklob_plant.png new file mode 100644 index 0000000000..4f0f0da6b2 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/fungi_plants/oklob_plant.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/fungi_plants/plant.png b/crawl-ref/source/rltiles/dc-mon/fungi_plants/plant.png new file mode 100644 index 0000000000..b3124b5cae Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/fungi_plants/plant.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/fungi_plants/plant_crypt.png b/crawl-ref/source/rltiles/dc-mon/fungi_plants/plant_crypt.png new file mode 100644 index 0000000000..f17a501d4f Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/fungi_plants/plant_crypt.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/fungi_plants/wandering_mushroom.png b/crawl-ref/source/rltiles/dc-mon/fungi_plants/wandering_mushroom.png new file mode 100644 index 0000000000..e8cff68b06 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/fungi_plants/wandering_mushroom.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/fungus.png b/crawl-ref/source/rltiles/dc-mon/fungus.png deleted file mode 100644 index 75d0cd66ed..0000000000 Binary files a/crawl-ref/source/rltiles/dc-mon/fungus.png and /dev/null differ diff --git a/crawl-ref/source/rltiles/dc-mon/oklob_plant.png b/crawl-ref/source/rltiles/dc-mon/oklob_plant.png deleted file mode 100644 index 4f0f0da6b2..0000000000 Binary files a/crawl-ref/source/rltiles/dc-mon/oklob_plant.png and /dev/null differ diff --git a/crawl-ref/source/rltiles/dc-mon/plant.png b/crawl-ref/source/rltiles/dc-mon/plant.png deleted file mode 100644 index b3124b5cae..0000000000 Binary files a/crawl-ref/source/rltiles/dc-mon/plant.png and /dev/null differ diff --git a/crawl-ref/source/rltiles/dc-mon/plant_crypt.png b/crawl-ref/source/rltiles/dc-mon/plant_crypt.png deleted file mode 100644 index f17a501d4f..0000000000 Binary files a/crawl-ref/source/rltiles/dc-mon/plant_crypt.png and /dev/null differ diff --git a/crawl-ref/source/rltiles/dc-mon/wandering_mushroom.png b/crawl-ref/source/rltiles/dc-mon/wandering_mushroom.png deleted file mode 100644 index e8cff68b06..0000000000 Binary files a/crawl-ref/source/rltiles/dc-mon/wandering_mushroom.png and /dev/null differ -- cgit v1.2.3-54-g00ecf From 6af92e2651be67206e4f153f73adeaa1e16f0b40 Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Tue, 29 Dec 2009 03:59:18 +0530 Subject: Generalise shopping-list-disable-check to need_save; fixes crashes on arena. --- crawl-ref/source/shopping.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc index 8cb0dfa4be..2b5d582316 100644 --- a/crawl-ref/source/shopping.cc +++ b/crawl-ref/source/shopping.cc @@ -2430,7 +2430,7 @@ void ShoppingList::move_things(const coord_def &_src, const coord_def &_dst) void ShoppingList::forget_pos(const level_pos &pos) { - if (crawl_state.map_stat_gen || crawl_state.test) + if (!crawl_state.need_save) // Shopping list is unitialized and uneeded. return; -- cgit v1.2.3-54-g00ecf From 5fccd300ac36d6689cb864ec3f128e49427f170f Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Tue, 29 Dec 2009 04:00:08 +0530 Subject: Merfolk gladiators join the Shoals party. --- crawl-ref/source/enum.h | 4 ++++ crawl-ref/source/mon-data.h | 15 ++++++++++++++- crawl-ref/source/mon-gear.cc | 41 +++++++++++++++++++++++++++++++++++++++++ crawl-ref/source/mon-pick.cc | 2 ++ 4 files changed, 61 insertions(+), 1 deletion(-) diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index 48bcb16db5..9bc022522f 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -1818,6 +1818,10 @@ enum monster_type // (int) menv[].type MONS_TOADSTOOL, MONS_BUSH, MONS_BALLISTOMYCETE, // 200 + + // Shoals guardians + MONS_MERFOLK_GLADIATOR, + //jmf: end new monsters MONS_WHITE_IMP = 220, // 220 MONS_LEMURE, diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index ad3414acae..efbb63d0b0 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -1107,7 +1107,7 @@ static monsterentry mondata[] = { // merfolk ('m') { - MONS_MERFOLK, 'm', LIGHTBLUE, "merfolk", + MONS_MERFOLK, 'm', BLUE, "merfolk", M_WARM_BLOOD | M_SPEAKS, MR_NO_FLAGS, 500, 10, MONS_MERFOLK, MONS_MERFOLK, MH_NATURAL, -3, @@ -1118,6 +1118,19 @@ static monsterentry mondata[] = { MONUSE_WEAPONS_ARMOUR, MONEAT_NOTHING, SIZE_MEDIUM }, +{ + MONS_MERFOLK_GLADIATOR, 'm', LIGHTBLUE, "merfolk gladiator", + M_WARM_BLOOD, + MR_NO_FLAGS, + 500, 10, MONS_MERFOLK, MONS_MERFOLK, MH_NATURAL, -3, + { {AT_HIT, AF_PLAIN, 35}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, + { 14, 5, 3, 0 }, + // Gladiators prefer light armour, and are dodging experts. + 0, 16, MST_NO_SPELLS, CE_CONTAMINATED, Z_SMALL, S_SHOUT, + I_NORMAL, HT_AMPHIBIOUS_WATER, FL_NONE, 10, ATTACK_ENERGY(6), + MONUSE_WEAPONS_ARMOUR, MONEAT_NOTHING, SIZE_MEDIUM +}, + { MONS_MERMAID, 'm', CYAN, "mermaid", M_SPELLCASTER | M_WARM_BLOOD | M_SPEAKS, diff --git a/crawl-ref/source/mon-gear.cc b/crawl-ref/source/mon-gear.cc index 01edc35951..9f284736d2 100644 --- a/crawl-ref/source/mon-gear.cc +++ b/crawl-ref/source/mon-gear.cc @@ -582,6 +582,27 @@ static item_make_species_type _give_weapon(monsters *mon, int level, } break; + case MONS_MERFOLK_GLADIATOR: + item_race = MAKE_ITEM_NO_RACE; + item.base_type = OBJ_WEAPONS; + // Weapon types are not strictly sorted by quality. This is intentional. + item.sub_type = random_choose_weighted(100, WPN_TRIDENT, + 45, WPN_BARDICHE, + 15, WPN_DEMON_TRIDENT, + 15, WPN_HALBERD, + 0); + if (coinflip()) + level = MAKE_GOOD_ITEM; + else if (coinflip()) + { + // Per dpeg request :) + item.special = SPWPN_REACHING; + item.plus = random_range(-1, 6, 2); + item.plus2 = random_range(-1, 5, 2); + force_item = true; + } + break; + case MONS_MERFOLK: if (one_chance_in(3)) { @@ -1028,6 +1049,16 @@ static void _give_ammo(monsters *mon, int level, qty = random_range(4, 7); break; + case MONS_MERFOLK_GLADIATOR: + // Gladiators rarely get javelins. + if (one_chance_in(4)) + { + weap_class = OBJ_MISSILES; + weap_type = MI_JAVELIN; + qty = random_range(3, 8, 2); + } + break; + case MONS_MERFOLK: if (!one_chance_in(3)) { @@ -1342,6 +1373,16 @@ void give_armour(monsters *mon, int level) break; } + case MONS_MERFOLK_GLADIATOR: + item_race = MAKE_ITEM_NO_RACE; + item.base_type = OBJ_ARMOUR; + item.sub_type = random_choose_weighted(100, ARM_ROBE, + 60, ARM_LEATHER_ARMOUR, + 5, ARM_TROLL_LEATHER_ARMOUR, + 5, ARM_STEAM_DRAGON_ARMOUR, + 0); + break; + case MONS_ANGEL: case MONS_SIGMUND: case MONS_WIGHT: diff --git a/crawl-ref/source/mon-pick.cc b/crawl-ref/source/mon-pick.cc index 84d540d8c8..e1a429c91b 100644 --- a/crawl-ref/source/mon-pick.cc +++ b/crawl-ref/source/mon-pick.cc @@ -1721,6 +1721,7 @@ int mons_shoals_level(int mcls) case MONS_CYCLOPS: // will have a sheep band case MONS_SIREN: case MONS_HARPY: + case MONS_MERFOLK_GLADIATOR: mlev += 3; break; @@ -1754,6 +1755,7 @@ int mons_shoals_rare(int mcls) return 50; case MONS_MERMAID: + case MONS_MERFOLK_GLADIATOR: return 40; case MONS_HIPPOGRIFF: -- cgit v1.2.3-54-g00ecf From da206768a436941bf7acfc67f005a518fb90ca7e Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Tue, 29 Dec 2009 04:08:08 +0530 Subject: Boost harpy attack damage. --- crawl-ref/source/mon-data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index efbb63d0b0..b65b314b65 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -2432,7 +2432,7 @@ static monsterentry mondata[] = { M_WARM_BLOOD | M_BATTY, MR_RES_POISON, 1000, 12, MONS_HARPY, MONS_HARPY, MH_NATURAL, -3, - { {AT_CLAW, AF_PLAIN, 10}, {AT_CLAW, AF_STEAL_FOOD, 8}, + { {AT_CLAW, AF_PLAIN, 19}, {AT_CLAW, AF_STEAL_FOOD, 14}, AT_NO_ATK, AT_NO_ATK }, { 7, 3, 5, 0 }, 2, 10, MST_NO_SPELLS, CE_CONTAMINATED, Z_BIG, S_SCREECH, -- cgit v1.2.3-54-g00ecf From c3833168fc6d04fd6fc95e15e6fe7fca495710c7 Mon Sep 17 00:00:00 2001 From: Johanna Ploog Date: Tue, 29 Dec 2009 00:47:21 +0100 Subject: Add two placeholder tiles for trees. Crayon-style they're not strictly bad but I feel they don't fit the feel of the rest of the dungeon. Still, much better than error tiles. --- crawl-ref/source/rltiles/dc-dngn.txt | 3 +++ crawl-ref/source/rltiles/dc-dngn/wall/tree1.png | Bin 0 -> 827 bytes crawl-ref/source/rltiles/dc-dngn/wall/tree2.png | Bin 0 -> 870 bytes crawl-ref/source/tilepick.cc | 2 ++ 4 files changed, 5 insertions(+) create mode 100644 crawl-ref/source/rltiles/dc-dngn/wall/tree1.png create mode 100644 crawl-ref/source/rltiles/dc-dngn/wall/tree2.png diff --git a/crawl-ref/source/rltiles/dc-dngn.txt b/crawl-ref/source/rltiles/dc-dngn.txt index 53a5f1270a..6b0ca04184 100644 --- a/crawl-ref/source/rltiles/dc-dngn.txt +++ b/crawl-ref/source/rltiles/dc-dngn.txt @@ -875,6 +875,9 @@ wall/dngn_green_crystal_wall DNGN_GREEN_CRYSTAL_WALL DNGN_CRYSTAL DNGN_CRYSTAL_G %repeat DNGN_CRYSTAL DNGN_CRYSTAL_WHITE %resetcol +wall/tree1 DNGN_TREE +wall/tree2 + ## doors dngn_detected_secret_door DNGN_DETECTED_SECRET_DOOR dngn_closed_door DNGN_CLOSED_DOOR diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/tree1.png b/crawl-ref/source/rltiles/dc-dngn/wall/tree1.png new file mode 100644 index 0000000000..c5c69a2156 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/wall/tree1.png differ diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/tree2.png b/crawl-ref/source/rltiles/dc-dngn/wall/tree2.png new file mode 100644 index 0000000000..711742ee6b Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/wall/tree2.png differ diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc index 28c94a04b0..723dbc0d00 100644 --- a/crawl-ref/source/tilepick.cc +++ b/crawl-ref/source/tilepick.cc @@ -2474,6 +2474,8 @@ int tileidx_feature(dungeon_feature_type feat, int gx, int gy) return TILE_DNGN_ORCISH_IDOL; case DNGN_WAX_WALL: return TILE_DNGN_WAX_WALL; + case DNGN_TREES: + return TILE_DNGN_TREE; case DNGN_GRANITE_STATUE: return TILE_DNGN_GRANITE_STATUE; case DNGN_LAVA: -- cgit v1.2.3-54-g00ecf From 98949eaaf98a0980872a54fc3e565ba955e6d954 Mon Sep 17 00:00:00 2001 From: Johanna Ploog Date: Tue, 29 Dec 2009 00:48:35 +0100 Subject: Switch the order of trees and deep sea in enum.h, makes more sense. --- crawl-ref/source/enum.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index 48bcb16db5..2db6cbe37d 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -993,10 +993,10 @@ enum dungeon_feature_type // Highest grid value which can't be reached through. DNGN_MAX_NONREACH = DNGN_CLEAR_PERMAROCK_WALL, - DNGN_TREES, DNGN_OPEN_SEA, // Shoals equivalent for permarock // Can be seen through and reached past. + DNGN_TREES, DNGN_ORCISH_IDOL = 15, DNGN_GRANITE_STATUE = 21, // 21 DNGN_STATUE_RESERVED, -- cgit v1.2.3-54-g00ecf From 7bf522535b9a6f90f8272043cb7af97b7c7cc2bf Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Mon, 28 Dec 2009 15:45:19 -0800 Subject: Fulsome Distillation tweaks (dshaligram) Fulsome no longer uses power; the chance for self-affliction is removed. The typo which caused contaminated corpses to make poison is gone. --- crawl-ref/source/spells4.cc | 22 ++-------------------- crawl-ref/source/spl-data.h | 2 +- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc index 9d1c969ea6..7da3ee46af 100644 --- a/crawl-ref/source/spells4.cc +++ b/crawl-ref/source/spells4.cc @@ -1177,10 +1177,8 @@ bool cast_evaporate(int pow, bolt& beem, int pot_idx) // Producing helpful potions would break game balance here... // and producing more than one potion from a corpse, or not // using up the corpse might also lead to game balance problems. - bwr -void cast_fulsome_distillation(int pow) +void cast_fulsome_distillation(int /*pow*/) { - pow = std::min(100, pow); - int corpse = -1; // Search items at the player's location for corpses. @@ -1206,39 +1204,32 @@ void cast_fulsome_distillation(int pow) } potion_type pot_type = POT_WATER; - int difficulty = 0; switch (mons_corpse_effect(mitm[corpse].plus)) { case CE_CLEAN: pot_type = POT_WATER; - difficulty = 0; break; case CE_CONTAMINATED: pot_type = (mons_weight(mitm[corpse].plus) >= 900) - ? POT_DEGENERATION : POT_POISON; - difficulty = (pot_type == POT_DEGENERATION) ? 100 : 40; + ? POT_DEGENERATION : POT_CONFUSION; break; case CE_POISONOUS: pot_type = POT_POISON; - difficulty = 50; break; case CE_MUTAGEN_RANDOM: case CE_MUTAGEN_GOOD: // unused case CE_RANDOM: // unused pot_type = POT_MUTATION; - // this is a potentially good potion, so it never tries to get into you - difficulty = 0; break; case CE_MUTAGEN_BAD: // unused case CE_ROTTEN: // actually this only occurs via mangling case CE_HCL: // necrophage pot_type = POT_DECAY; - difficulty = 100; break; case CE_NOCORPSE: // shouldn't occur @@ -1250,12 +1241,10 @@ void cast_fulsome_distillation(int pow) { case MONS_RED_WASP: // paralysis attack pot_type = POT_PARALYSIS; - difficulty = 100; break; case MONS_YELLOW_WASP: // slowing attack pot_type = POT_SLOWING; - difficulty = 50; break; default: @@ -1271,7 +1260,6 @@ void cast_fulsome_distillation(int pow) smc->attack[nattk].flavour == AF_POISON_STR) { pot_type = POT_STRONG_POISON; - difficulty = 75; } } @@ -1292,12 +1280,6 @@ void cast_fulsome_distillation(int pow) mprf("You extract %s from the corpse.", mitm[corpse].name(DESC_NOCAP_A).c_str()); - if (random2(difficulty + 1) > pow) - { - mpr("Oops! You accidentally inhaled the fumes!"); - potion_effect(pot_type, 40); - } - // Try to move the potion to the player (for convenience). if (move_item_to_player(corpse, 1) != 1) mpr("Unfortunately, you can't carry it right now!"); diff --git a/crawl-ref/source/spl-data.h b/crawl-ref/source/spl-data.h index 303306cc83..61b544f635 100644 --- a/crawl-ref/source/spl-data.h +++ b/crawl-ref/source/spl-data.h @@ -927,7 +927,7 @@ SPTYP_TRANSMUTATION | SPTYP_NECROMANCY, SPFLAG_NONE, 1, - 100, + 0, -1, -1, 0, NULL, -- cgit v1.2.3-54-g00ecf From 468eddcb57d95046afb8fb35ac22172d1bf73c66 Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Mon, 28 Dec 2009 15:52:16 -0800 Subject: Update Fulsome description --- crawl-ref/source/dat/descript/spells.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crawl-ref/source/dat/descript/spells.txt b/crawl-ref/source/dat/descript/spells.txt index c79c9e1424..8e58527c87 100644 --- a/crawl-ref/source/dat/descript/spells.txt +++ b/crawl-ref/source/dat/descript/spells.txt @@ -280,7 +280,7 @@ This spell will freeze ammunition held by the caster. Such missiles will shatter %%%% Fulsome Distillation -This spell extracts the vile and poisonous essences from a corpse. A rotten corpse may produce a stronger potion. You probably don't want to drink the results. +This spell extracts the vile and poisonous essences from a corpse. You probably don't want to drink the results. The type of potion produced corresponds roughly to the effects of eating said corpse. %%%% Major Healing -- cgit v1.2.3-54-g00ecf From 22c9c1dd3fe93c8ccab01eec647fb002877018f8 Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Tue, 29 Dec 2009 08:26:24 +0530 Subject: Merfolk (water/ice) elementalists join the Shoals guard. --- crawl-ref/source/actor.h | 5 ++ crawl-ref/source/beam.cc | 191 ++++++++++++++++++++++++++++++++++------- crawl-ref/source/beam.h | 6 ++ crawl-ref/source/dgn-shoals.cc | 37 +------- crawl-ref/source/dungeon.cc | 41 +++++++++ crawl-ref/source/dungeon.h | 6 ++ crawl-ref/source/enum.h | 21 +++-- crawl-ref/source/fight.cc | 7 ++ crawl-ref/source/main.cc | 2 +- crawl-ref/source/mon-cast.cc | 18 +++- crawl-ref/source/mon-data.h | 16 +++- crawl-ref/source/mon-gear.cc | 9 ++ crawl-ref/source/mon-pick.cc | 2 + crawl-ref/source/mon-spll.h | 12 +++ crawl-ref/source/monster.cc | 21 ++++- crawl-ref/source/monster.h | 5 +- crawl-ref/source/ouch.cc | 7 ++ crawl-ref/source/player.cc | 13 +++ crawl-ref/source/player.h | 5 ++ crawl-ref/source/spl-cast.cc | 6 ++ crawl-ref/source/spl-data.h | 14 +++ crawl-ref/source/spl-util.cc | 2 + 22 files changed, 368 insertions(+), 78 deletions(-) diff --git a/crawl-ref/source/actor.h b/crawl-ref/source/actor.h index a6d4899bbb..e3b3ae4af6 100644 --- a/crawl-ref/source/actor.h +++ b/crawl-ref/source/actor.h @@ -37,6 +37,10 @@ public: // occupied. virtual bool move_to_pos(const coord_def &c) = 0; + virtual void apply_location_effects(const coord_def &oldpos, + killer_type killer = KILL_NONE, + int killernum = -1) = 0; + virtual void set_position(const coord_def &c); virtual const coord_def& pos() const { return position; } @@ -213,6 +217,7 @@ public: virtual int res_poison() const = 0; virtual int res_rotting() const = 0; virtual int res_asphyx() const = 0; + virtual int res_water_drowning() const = 0; virtual int res_sticky_flame() const = 0; virtual int res_holy_energy(const actor *attacker) const = 0; virtual int res_negative_energy() const = 0; diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 8b05a833d9..abe97ceb66 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -28,6 +28,7 @@ #include "coord.h" #include "coordit.h" #include "delay.h" +#include "dungeon.h" #include "dgnevent.h" #include "effects.h" #include "env.h" @@ -517,6 +518,22 @@ const zap_info zap_data[] = { 6 }, + { + ZAP_PRIMAL_WAVE, + "great wave of water", + 200, + new calcdice_calculator<4, 14, 3, 5>, + new tohit_calculator<10, 1, 25>, + LIGHTBLUE, + false, + BEAM_WATER, + DCHAR_WAVY, + true, + false, + false, + 6 + }, + { ZAP_CONFUSION, "0", @@ -1915,6 +1932,13 @@ coord_def bolt::pos() const return ray.pos(); } +bool bolt::need_regress() const +{ + return ((is_explosion && !in_explosion_phase) + || drop_item + || origin_spell == SPELL_PRIMAL_WAVE); +} + // Returns true if the beam ended due to hitting the wall. bool bolt::hit_wall() { @@ -1976,8 +2000,7 @@ bool bolt::hit_wall() { // Regress for explosions: blow up in an open grid (if regressing // makes any sense). Also regress when dropping items. - if (pos() != source - && ((is_explosion && !in_explosion_phase) || drop_item)) + if (pos() != source && need_regress()) { do ray.regress(); @@ -2315,6 +2338,17 @@ int mons_adjust_flavoured(monsters *monster, bolt &pbolt, int hurted, } break; + case BEAM_WATER: + hurted = resist_adjust_damage(monster, pbolt.flavour, + monster->res_asphyx(), + hurted, true); + if (doFlavouredEffects) + { + if (!hurted) + simple_monster_message(monster, " shrugs off the wave."); + } + break; + case BEAM_COLD: hurted = resist_adjust_damage(monster, pbolt.flavour, monster->res_cold(), @@ -2926,6 +2960,31 @@ void mimic_alert(monsters *mimic) mimic->flags |= MF_KNOWN_MIMIC; } +void create_feat_at(coord_def center, + dungeon_feature_type overwriteable, + dungeon_feature_type newfeat) +{ + if (grd(center) == overwriteable) + dungeon_terrain_changed(center, newfeat, true, false, true); +} + +void create_feat_splash(coord_def center, + dungeon_feature_type overwriteable, + dungeon_feature_type newfeat, + int radius, + int nattempts) +{ + // Always affect center. + create_feat_at(center, overwriteable, newfeat); + for (int i = 0; i < nattempts; ++i) + { + const coord_def newp(dgn_random_point_visible_from(center, radius)); + if (newp.origin() || grd(newp) != overwriteable) + continue; + create_feat_at(newp, overwriteable, newfeat); + } +} + bool bolt::is_bouncy(dungeon_feature_type feat) const { if (real_flavour == BEAM_CHAOS && feat_is_solid(feat)) @@ -3009,6 +3068,24 @@ void bolt::affect_endpoint() if (is_tracer) return; + if (origin_spell == SPELL_PRIMAL_WAVE) // &&coinflip() + { + if (you.see_cell(pos())) + { + mprf("The wave splashes down."); + noisy(25, pos()); + } + else + { + noisy(25, pos(), "You hear a splash."); + } + create_feat_splash(pos(), + DNGN_FLOOR, + DNGN_SHALLOW_WATER, + 2, + random_range(1, 9, 2)); + } + // FIXME: why don't these just have is_explosion set? // They don't explode in tracers: why not? if (name == "orb of electricity" @@ -4312,6 +4389,9 @@ void bolt::affect_player() internal_ouch(hurted); range_used += range_used_on_hit(&you); + + if (flavour == BEAM_WATER) + water_hits_actor(&you); } int bolt::beam_source_as_target() const @@ -4678,6 +4758,23 @@ void bolt::monster_post_hit(monsters* mon, int dmg) mimic_alert(mon); else if (dmg) beogh_follower_convert(mon, true); + + if (flavour == BEAM_WATER) + water_hits_actor(mon); +} + +void bolt::water_hits_actor(actor *act) +{ + const coord_def oldpos(act->pos()); + if (knockback_actor(act)) + { + if (you.can_see(act)) + mprf("%s %s knocked back by the %s.", + act->name(DESC_CAP_THE).c_str(), + act->conj_verb("are").c_str(), + this->name.c_str()); + act->apply_location_effects(oldpos, killer(), beam_source); + } } // Return true if the block succeeded (including reflections.) @@ -4989,21 +5086,24 @@ void bolt::affect_monster(monsters* mon) // Apply flavoured specials. mons_adjust_flavoured(mon, *this, postac, true); - // If the beam is an actual missile or of the MMISSILE type (Earth magic) - // we might bleed on the floor. - if (!engulfs - && (flavour == BEAM_MISSILE || flavour == BEAM_MMISSILE) - && !mon->is_summoned() && !mon->submerged()) + // mons_adjust_flavoured may kill the monster directly. + if (mon->alive()) { - // Using raw_damage instead of the flavoured one! - // assumes DVORP_PIERCING, factor: 0.5 - const int blood = std::min(postac/2, mon->hit_points); - bleed_onto_floor(mon->pos(), mon->type, blood, true); + // If the beam is an actual missile or of the MMISSILE type + // (Earth magic) we might bleed on the floor. + if (!engulfs + && (flavour == BEAM_MISSILE || flavour == BEAM_MMISSILE) + && !mon->is_summoned() && !mon->submerged()) + { + // Using raw_damage instead of the flavoured one! + // assumes DVORP_PIERCING, factor: 0.5 + const int blood = std::min(postac/2, mon->hit_points); + bleed_onto_floor(mon->pos(), mon->type, blood, true); + } + // Now hurt monster. + mon->hurt(agent(), final, flavour, false); } - // Now hurt monster. - mon->hurt(agent(), final, flavour, false); - int corpse = -1; monsters orig = *mon; @@ -5541,6 +5641,34 @@ int bolt::range_used_on_hit(const actor* victim) const return (used); } +// Checks whether the beam knocks back the supplied actor. The actor +// should have already failed their EV check, so the save is entirely +// body-mass-based. +bool bolt::knockback_actor(actor *act) +{ + ASSERT(ray.pos() == act->pos()); + + const coord_def oldpos(ray.pos()); + const ray_def ray_copy(ray); + ray.advance(); + + const coord_def newpos(ray.pos()); + if (newpos == oldpos || actor_at(newpos) || feat_is_solid(grd(newpos)) + || !act->can_pass_through(newpos) + // Save is based on target's body weight. + || random2(2500) < act->body_weight()) + { + ray = ray_copy; + return false; + } + + act->move_to_pos(newpos); + + // Knockback cannot ever kill the actor directly - caller must do + // apply_location_effects after messaging. + return true; +} + // Takes a bolt and refines it for use in the explosion function. // Explosions which do not follow from beams (e.g., scrolls of // immolation) bypass this function. @@ -5717,7 +5845,6 @@ static sweep_type _radial_sweep(int r) } #define MAX_EXPLOSION_RADIUS 9 - // Returns true if we saw something happening. bool bolt::explode(bool show_more, bool hole_in_the_middle) { @@ -6048,21 +6175,24 @@ bool bolt::nice_to(const monsters *mon) const // // TODO: Eventually it'd be nice to have a proper factory for these things // (extended from setup_mons_cast() and zapping() which act as limited ones). -bolt::bolt() : range(-2), type('*'), colour(BLACK), flavour(BEAM_MAGIC), - real_flavour(BEAM_MAGIC), drop_item(false), item(NULL), source(), target(), - damage(0, 0), ench_power(0), hit(0), thrower(KILL_MISC), ex_size(0), - beam_source(MHITNOT), source_name(), name(), short_name(), hit_verb(), - loudness(0), noise_msg(), is_beam(false), is_explosion(false), - is_big_cloud(false), aimed_at_spot(false), aux_source(), - affects_nothing(false), affects_items(true), effect_known(true), - draw_delay(15), special_explosion(NULL), range_funcs(), damage_funcs(), - hit_funcs(), aoe_funcs(), obvious_effect(false), seen(false), heard(false), - path_taken(), range_used(0), is_tracer(false), aimed_at_feet(false), - msg_generated(false), passed_target(false), in_explosion_phase(false), - smart_monster(false), can_see_invis(false), attitude(ATT_HOSTILE), - foe_ratio(0), chose_ray(false), beam_cancelled(false), - dont_stop_player(false), bounces(false), bounce_pos(), reflections(0), - reflector(-1), auto_hit(false) +bolt::bolt() : origin_spell(SPELL_NO_SPELL), + range(-2), type('*'), colour(BLACK), flavour(BEAM_MAGIC), + real_flavour(BEAM_MAGIC), drop_item(false), item(NULL), + source(), target(), damage(0, 0), ench_power(0), hit(0), + thrower(KILL_MISC), ex_size(0), beam_source(MHITNOT), + source_name(), name(), short_name(), hit_verb(), + loudness(0), noise_msg(), is_beam(false), is_explosion(false), + is_big_cloud(false), aimed_at_spot(false), aux_source(), + affects_nothing(false), affects_items(true), effect_known(true), + draw_delay(15), special_explosion(NULL), range_funcs(), + damage_funcs(), hit_funcs(), aoe_funcs(), obvious_effect(false), + seen(false), heard(false), path_taken(), range_used(0), + is_tracer(false), aimed_at_feet(false), msg_generated(false), + passed_target(false), in_explosion_phase(false), + smart_monster(false), can_see_invis(false), + attitude(ATT_HOSTILE), foe_ratio(0), chose_ray(false), + beam_cancelled(false), dont_stop_player(false), bounces(false), + bounce_pos(), reflections(0), reflector(-1), auto_hit(false) { } @@ -6191,6 +6321,7 @@ std::string beam_type_name(beam_type type) case BEAM_POTION_COLD: // fall through case BEAM_COLD: return ("cold"); + case BEAM_WATER: return ("water"); case BEAM_MAGIC: return ("magic"); case BEAM_ELECTRICITY: return ("electricity"); diff --git a/crawl-ref/source/beam.h b/crawl-ref/source/beam.h index 61f5640d07..7c60170f41 100644 --- a/crawl-ref/source/beam.h +++ b/crawl-ref/source/beam.h @@ -62,6 +62,8 @@ typedef bool (*explosion_aoe_func)(bolt& beam, const coord_def& target); struct bolt { // INPUT parameters set by caller + spell_type origin_spell; // may be SPELL_NO_SPELL for non-spell + // beams. int range; unsigned type; // missile gfx int colour; @@ -192,6 +194,7 @@ public: // Return whether any affected cell was seen. bool explode(bool show_more = true, bool hole_in_the_middle = false); + bool knockback_actor(actor *actor); private: void do_fire(); @@ -213,6 +216,7 @@ private: bool nasty_to(const monsters* mon) const; bool nice_to(const monsters* mon) const; bool found_player() const; + bool need_regress() const; int beam_source_as_target() const; int range_used_on_hit(const actor* victim) const; @@ -241,6 +245,8 @@ public: void affect_place_explosion_clouds(); void affect_endpoint(); + void water_hits_actor(actor *act); + // Stuff when a monster or player is hit. void affect_player_enchantment(); void tracer_affect_player(); diff --git a/crawl-ref/source/dgn-shoals.cc b/crawl-ref/source/dgn-shoals.cc index 10b49fafb8..c72cd41bf6 100644 --- a/crawl-ref/source/dgn-shoals.cc +++ b/crawl-ref/source/dgn-shoals.cc @@ -61,11 +61,6 @@ enum tide_direction static tide_direction _shoals_tide_direction; -static double _to_radians(int degrees) -{ - return degrees * M_PI / 180; -} - static dungeon_feature_type _shoals_feature_by_height(int height) { return height >= SHT_STONE ? DNGN_STONE_WALL : @@ -122,33 +117,9 @@ static void _shoals_init_heights() shoals_heights(*ri) = SHT_SHALLOW_WATER - 3; } -static double _angle_fuzz() -{ - double fuzz = _to_radians(random2(15)); - return coinflip()? fuzz : -fuzz; -} - -static coord_def _random_point_from(const coord_def &c, int radius, - int directed_angle = -1) +static coord_def _random_point_from(const coord_def &c, int radius) { - const double directed_radians( - directed_angle == -1? 0.0 : _to_radians(directed_angle)); - int attempts = 70; - while (attempts-- > 0) - { - const double angle = - directed_angle == -1? _to_radians(random2(360)) - : ((coinflip()? directed_radians : -directed_radians) - + _angle_fuzz()); - coord_def res = c + coord_def(radius * cos(angle), - radius * sin(angle)); - if (res.x >= _shoals_margin && res.x < GXM - _shoals_margin - && res.y >= _shoals_margin && res.y < GYM - _shoals_margin) - { - return res; - } - } - return coord_def(); + return dgn_random_point_from(c, radius, _shoals_margin); } static coord_def _random_point(int offset = 0) @@ -228,7 +199,7 @@ static void _shoals_build_cliff() if (in_bounds(cliffc)) { const int length = random_range(6, 15); - double angle = _to_radians(random2(360)); + double angle = dgn_degrees_to_radians(random2(360)); for (int i = 0; i < length; i += 3) { int distance = i - length / 2; @@ -698,7 +669,7 @@ static coord_def _int_coord(const coord_dbl &c) static std::vector _shoals_windshadows(grid_bool &windy) { const int wind_angle_degrees = random2(360); - const double wind_angle(_to_radians(wind_angle_degrees)); + const double wind_angle(dgn_degrees_to_radians(wind_angle_degrees)); const coord_dbl wi(cos(wind_angle), sin(wind_angle)); const double epsilon = 1e-5; diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 04ce67e162..1c1d27f642 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -13,6 +13,7 @@ #include #include #include +#include #include "abyss.h" #include "artefact.h" @@ -7619,6 +7620,46 @@ static coord_def _dgn_find_closest_to_stone_stairs(coord_def base_pos) return (np.nearest); } + +double dgn_degrees_to_radians(int degrees) +{ + return degrees * M_PI / 180; +} + +coord_def dgn_random_point_from(const coord_def &c, int radius, int margin) +{ + int attempts = 70; + while (attempts-- > 0) + { + const double angle = dgn_degrees_to_radians(random2(360)); + const coord_def res = c + coord_def(radius * cos(angle), + radius * sin(angle)); + if (res.x >= margin && res.x < GXM - margin + && res.y >= margin && res.y < GYM - margin) + { + return res; + } + } + return coord_def(); +} + +coord_def dgn_random_point_visible_from(const coord_def &c, + int radius, + int margin, + int tries) +{ + while (tries-- > 0) + { + const coord_def point = dgn_random_point_from(c, radius, margin); + if (point.origin()) + continue; + if (!cell_see_cell(c, point)) + continue; + return point; + } + return coord_def(); +} + coord_def dgn_find_feature_marker(dungeon_feature_type feat) { std::vector markers = env.markers.get_all(); diff --git a/crawl-ref/source/dungeon.h b/crawl-ref/source/dungeon.h index f58c17355c..ded9cea53a 100644 --- a/crawl-ref/source/dungeon.h +++ b/crawl-ref/source/dungeon.h @@ -179,6 +179,12 @@ bool builder(int level_number, int level_type); void dgn_flush_map_memory(); +double dgn_degrees_to_radians(int degrees); +coord_def dgn_random_point_from(const coord_def &c, int radius, int margin = 1); +coord_def dgn_random_point_visible_from(const coord_def &c, + int radius, + int margin = 1, + int tries = 5); coord_def dgn_find_feature_marker(dungeon_feature_type feat); // Set floor/wall colour based on the mons_alloc array. Used for diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index 9bc022522f..bf570798f1 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -199,23 +199,24 @@ enum beam_type // beam[].flavour BEAM_MMISSILE, // and similarly irresistible things BEAM_FIRE, BEAM_COLD, - BEAM_MAGIC, // 5 + BEAM_WATER, + BEAM_MAGIC, BEAM_ELECTRICITY, BEAM_POISON, BEAM_NEG, BEAM_ACID, - BEAM_MIASMA, // 10 + BEAM_MIASMA, BEAM_SPORE, BEAM_POISON_ARROW, BEAM_HELLFIRE, BEAM_NAPALM, - BEAM_STEAM, // 15 + BEAM_STEAM, BEAM_ENERGY, BEAM_HOLY, BEAM_FRAG, BEAM_LAVA, - BEAM_ICE, // 20 + BEAM_ICE, BEAM_NUKE, BEAM_RANDOM, // currently translates into FIRE..ACID BEAM_CHAOS, @@ -223,22 +224,22 @@ enum beam_type // beam[].flavour // Enchantments BEAM_SLOW, BEAM_FIRST_ENCHANTMENT = BEAM_SLOW, - BEAM_HASTE, // 25 + BEAM_HASTE, BEAM_MIGHT, BEAM_HEALING, BEAM_PARALYSIS, BEAM_CONFUSION, - BEAM_INVISIBILITY, // 30 + BEAM_INVISIBILITY, BEAM_DIGGING, BEAM_TELEPORT, BEAM_POLYMORPH, BEAM_CHARM, - BEAM_BANISH, // 35 + BEAM_BANISH, BEAM_DEGENERATE, BEAM_ENSLAVE_UNDEAD, BEAM_ENSLAVE_SOUL, BEAM_PAIN, - BEAM_DISPEL_UNDEAD, // 40 + BEAM_DISPEL_UNDEAD, BEAM_DISINTEGRATION, BEAM_ENSLAVE_DEMON, BEAM_BLINK, @@ -1821,6 +1822,7 @@ enum monster_type // (int) menv[].type // Shoals guardians MONS_MERFOLK_GLADIATOR, + MONS_MERFOLK_ELEMENTALIST, //jmf: end new monsters MONS_WHITE_IMP = 220, // 220 @@ -2323,6 +2325,7 @@ enum mon_spellbook_type MST_HAROLD, MST_MARA, MST_MARA_FAKE, + MST_MERFOLK_ELEMENTALIST, MST_TEST_SPAWNER = 200, NUM_MSTYPES, @@ -2925,6 +2928,7 @@ enum spell_type SPELL_FAKE_MARA_SUMMON, SPELL_SUMMON_RAKSHASA, SPELL_SUMMON_PLAYER_GHOST, + SPELL_PRIMAL_WAVE, NUM_SPELLS }; @@ -3115,6 +3119,7 @@ enum zap_type ZAP_PARALYSIS, ZAP_FIRE, ZAP_COLD, + ZAP_PRIMAL_WAVE, ZAP_CONFUSION, ZAP_INVISIBILITY, ZAP_DIGGING, diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index b2237a92cb..57254b012b 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -2158,6 +2158,8 @@ static bool is_boolean_resist(beam_type flavour) case BEAM_ELECTRICITY: case BEAM_MIASMA: // rotting case BEAM_NAPALM: + case BEAM_WATER: // water asphyxiation damage, + // bypassed by being water inhabitant. return (true); default: return (false); @@ -2170,6 +2172,11 @@ static inline int get_resistible_fraction(beam_type flavour) { switch (flavour) { + // Drowning damage from water is resistible by being a water thing, or + // otherwise asphyx resistant. + case BEAM_WATER: + return (40); + // Assume ice storm and throw icicle are mostly solid. case BEAM_ICE: return (25); diff --git a/crawl-ref/source/main.cc b/crawl-ref/source/main.cc index 9dcd774a00..7f3ccb2592 100644 --- a/crawl-ref/source/main.cc +++ b/crawl-ref/source/main.cc @@ -4631,7 +4631,7 @@ static void _compile_time_asserts() COMPILE_CHECK(SP_VAMPIRE == 30 , c3); COMPILE_CHECK(SPELL_DEBUGGING_RAY == 103 , c4); COMPILE_CHECK(SPELL_RETURNING_AMMUNITION == 162 , c5); - COMPILE_CHECK(NUM_SPELLS == 215 , c6); + COMPILE_CHECK(NUM_SPELLS == 216 , c6); //jmf: NEW ASSERTS: we ought to do a *lot* of these COMPILE_CHECK(NUM_SPECIES < SP_UNKNOWN , c7); diff --git a/crawl-ref/source/mon-cast.cc b/crawl-ref/source/mon-cast.cc index 7bbbd77862..42b7b52da5 100644 --- a/crawl-ref/source/mon-cast.cc +++ b/crawl-ref/source/mon-cast.cc @@ -217,6 +217,7 @@ bolt mons_spells( monsters *mons, spell_type spell_cast, int power, beam.type = dchar_glyph(DCHAR_FIRED_ZAP); // default beam.thrower = KILL_MON_MISSILE; + beam.origin_spell = real_spell; // FIXME: this should use the zap_data[] struct from beam.cc! switch (real_spell) @@ -361,6 +362,19 @@ bolt mons_spells( monsters *mons, spell_type spell_cast, int power, beam.is_beam = true; break; + case SPELL_PRIMAL_WAVE: + beam.name = "great wave of water"; + // Water attack is weaker than the pure elemental damage + // attacks, but also less resistible. + beam.damage = dice_def( 3, 6 + power / 12 ); + beam.colour = LIGHTBLUE; + beam.flavour = BEAM_WATER; + // Huge wave of water is hard to dodge. + beam.hit = 20 + power / 20; + beam.is_beam = false; + beam.type = dchar_glyph(DCHAR_WAVY); + break; + case SPELL_FREEZING_CLOUD: beam.name = "freezing blast"; beam.damage = dice_def( 2, 9 + power / 11 ); @@ -840,6 +854,8 @@ bool setup_mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast, bolt theBeam = mons_spells(monster, spell_cast, power); + // [ds] remind me again why we're doing this piecemeal copying? + pbolt.origin_spell = theBeam.origin_spell; pbolt.colour = theBeam.colour; pbolt.range = theBeam.range; pbolt.hit = theBeam.hit; @@ -1821,7 +1837,7 @@ void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast, if (created == -1) continue; - // Mara's clones are special; they have the same stats as him, and + // Mara's clones are special; they have the same stats as him, and // are exact clones, so they are created damaged if necessary, with // identical enchants and with the same items. monsters *new_fake = &menv[created]; diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index b65b314b65..574a1b916d 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -1124,13 +1124,25 @@ static monsterentry mondata[] = { MR_NO_FLAGS, 500, 10, MONS_MERFOLK, MONS_MERFOLK, MH_NATURAL, -3, { {AT_HIT, AF_PLAIN, 35}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, - { 14, 5, 3, 0 }, + { 14, 6, 3, 0 }, // Gladiators prefer light armour, and are dodging experts. - 0, 16, MST_NO_SPELLS, CE_CONTAMINATED, Z_SMALL, S_SHOUT, + 0, 17, MST_NO_SPELLS, CE_CONTAMINATED, Z_SMALL, S_SHOUT, I_NORMAL, HT_AMPHIBIOUS_WATER, FL_NONE, 10, ATTACK_ENERGY(6), MONUSE_WEAPONS_ARMOUR, MONEAT_NOTHING, SIZE_MEDIUM }, +{ + MONS_MERFOLK_ELEMENTALIST, 'm', LIGHTGREEN, "merfolk elementalist", + M_WARM_BLOOD | M_SPELLCASTER | M_ACTUAL_SPELLS, + MR_RES_COLD, + 500, 10, MONS_MERFOLK, MONS_MERFOLK, MH_NATURAL, -4, + { {AT_HIT, AF_PLAIN, 15}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, + { 15, 3, 3, 0 }, + 0, 12, MST_MERFOLK_ELEMENTALIST, CE_CONTAMINATED, Z_SMALL, S_SHOUT, + I_NORMAL, HT_AMPHIBIOUS_WATER, FL_NONE, 10, DEFAULT_ENERGY, + MONUSE_WEAPONS_ARMOUR, MONEAT_NOTHING, SIZE_MEDIUM +}, + { MONS_MERMAID, 'm', CYAN, "mermaid", M_SPELLCASTER | M_WARM_BLOOD | M_SPEAKS, diff --git a/crawl-ref/source/mon-gear.cc b/crawl-ref/source/mon-gear.cc index 9f284736d2..c1a4dace95 100644 --- a/crawl-ref/source/mon-gear.cc +++ b/crawl-ref/source/mon-gear.cc @@ -412,6 +412,14 @@ static item_make_species_type _give_weapon(monsters *mon, int level, item.sub_type = WPN_LONGBOW; break; + case MONS_MERFOLK_ELEMENTALIST: + item_race = MAKE_ITEM_NO_RACE; + item.base_type = OBJ_WEAPONS; + item.sub_type = WPN_SABRE; + if (coinflip()) + level = MAKE_GOOD_ITEM; + break; + case MONS_DEEP_ELF_ANNIHILATOR: case MONS_DEEP_ELF_CONJURER: case MONS_DEEP_ELF_DEATH_MAGE: @@ -1489,6 +1497,7 @@ void give_armour(monsters *mon, int level) case MONS_WIZARD: case MONS_ILSUIW: case MONS_MARA: + case MONS_MERFOLK_ELEMENTALIST: if (item_race == MAKE_ITEM_RANDOM_RACE) item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; diff --git a/crawl-ref/source/mon-pick.cc b/crawl-ref/source/mon-pick.cc index e1a429c91b..a79945b990 100644 --- a/crawl-ref/source/mon-pick.cc +++ b/crawl-ref/source/mon-pick.cc @@ -1722,6 +1722,7 @@ int mons_shoals_level(int mcls) case MONS_SIREN: case MONS_HARPY: case MONS_MERFOLK_GLADIATOR: + case MONS_MERFOLK_ELEMENTALIST: mlev += 3; break; @@ -1766,6 +1767,7 @@ int mons_shoals_rare(int mcls) case MONS_SIREN: case MONS_YAKTAUR: + case MONS_MERFOLK_ELEMENTALIST: return 25; case MONS_CYCLOPS: diff --git a/crawl-ref/source/mon-spll.h b/crawl-ref/source/mon-spll.h index 526d37f378..76c561e352 100644 --- a/crawl-ref/source/mon-spll.h +++ b/crawl-ref/source/mon-spll.h @@ -1319,6 +1319,18 @@ } }, + { MST_MERFOLK_ELEMENTALIST, + { + SPELL_PRIMAL_WAVE, + SPELL_BOLT_OF_COLD, + // Ice form would be neat. + SPELL_THROW_ICICLE, + SPELL_NO_SPELL, + SPELL_NO_SPELL, + SPELL_BLINK + } + }, + { MST_TEST_SPAWNER, { SPELL_SHADOW_CREATURES, diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index f9d18c97d9..f6003c3b81 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -3308,6 +3308,21 @@ int monsters::res_asphyx() const return (res); } +int monsters::res_water_drowning() const +{ + const int res = res_asphyx(); + if (res) + return res; + switch (mons_habitat(this)) + { + case HT_WATER: + case HT_AMPHIBIOUS_WATER: + return 1; + default: + return 0; + } +} + int monsters::res_poison() const { int u = get_mons_resists(this).poison; @@ -5550,7 +5565,9 @@ void monsters::check_redraw(const coord_def &old) const } } -void monsters::apply_location_effects(const coord_def &oldpos) +void monsters::apply_location_effects(const coord_def &oldpos, + killer_type killer, + int killernum) { if (oldpos != pos()) dungeon_events.fire_position_event(DET_MONSTER_MOVED, pos()); @@ -5583,7 +5600,7 @@ void monsters::apply_location_effects(const coord_def &oldpos) ptrap->trigger(*this); if (alive()) - mons_check_pool(this, pos()); + mons_check_pool(this, pos(), killer, killernum); if (alive() && has_ench(ENCH_SUBMERGED) && (!monster_can_submerge(this, grd(pos())) diff --git a/crawl-ref/source/monster.h b/crawl-ref/source/monster.h index 109dc876fb..16ec367332 100644 --- a/crawl-ref/source/monster.h +++ b/crawl-ref/source/monster.h @@ -128,7 +128,9 @@ public: bool is_summoned(int* duration = NULL, int* summon_type = NULL) const; bool has_action_energy() const; void check_redraw(const coord_def &oldpos) const; - void apply_location_effects(const coord_def &oldpos); + void apply_location_effects(const coord_def &oldpos, + killer_type killer = KILL_NONE, + int killernum = -1); void moveto(const coord_def& c); bool move_to_pos(const coord_def &newpos); @@ -317,6 +319,7 @@ public: int res_poison() const; int res_rotting() const; int res_asphyx() const; + int res_water_drowning() const; int res_sticky_flame() const; int res_holy_energy(const actor *) const; int res_negative_energy() const; diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index 40352ecc0c..34f8bc736c 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -91,6 +91,13 @@ int check_your_resists(int hurted, beam_type flavour) switch (flavour) { + case BEAM_WATER: + hurted = resist_adjust_damage(&you, flavour, + you.res_water_drowning(), hurted, true); + if (!hurted) + mpr("You shrug off the wave."); + break; + case BEAM_STEAM: hurted = resist_adjust_damage(&you, flavour, player_res_steam(), hurted, true); diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 7ba87a20ff..8ebf0a0655 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -6452,6 +6452,12 @@ int player::res_elec() const return (player_res_electricity() * 2); } +int player::res_water_drowning() const +{ + return (res_asphyx() || + (you.species == SP_MERFOLK && !transform_changed_physiology())); +} + int player::res_asphyx() const { // The undead are immune to asphyxiation, or so we'll assume. @@ -7049,6 +7055,13 @@ bool player::move_to_pos(const coord_def &c) return false; } +void player::apply_location_effects(const coord_def &oldpos, + killer_type killer, + int killernum) +{ + move_player_to_grid(pos(), false, true, true, false); +} + void player::shiftto(const coord_def &c) { crawl_view.shift_player_to(c); diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h index ee34bd703e..09b66c2053 100644 --- a/crawl-ref/source/player.h +++ b/crawl-ref/source/player.h @@ -464,6 +464,7 @@ public: int res_poison() const; int res_rotting() const; int res_asphyx() const; + int res_water_drowning() const; int res_sticky_flame() const; int res_holy_energy(const actor *) const; int res_negative_energy() const; @@ -513,6 +514,10 @@ public: bool do_shaft(); + void apply_location_effects(const coord_def &oldpos, + killer_type killer = KILL_NONE, + int killernum = -1); + //////////////////////////////////////////////////////////////// PlaceInfo& get_place_info() const ; // Current place info diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index 9f875c298f..acaaa7ebca 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -1139,6 +1139,7 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail) dist spd; bolt beam; + beam.origin_spell = spell; // [dshaligram] Any action that depends on the spellcasting attempt to have // succeeded must be performed after the switch(). @@ -1419,6 +1420,11 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail) return (SPRET_ABORT); break; + case SPELL_PRIMAL_WAVE: + if (!zapping(ZAP_PRIMAL_WAVE, powc, beam, true)) + return (SPRET_ABORT); + break; + case SPELL_STONE_ARROW: if (!zapping(ZAP_STONE_ARROW, powc, beam, true)) return (SPRET_ABORT); diff --git a/crawl-ref/source/spl-data.h b/crawl-ref/source/spl-data.h index 303306cc83..6a62b9ed09 100644 --- a/crawl-ref/source/spl-data.h +++ b/crawl-ref/source/spl-data.h @@ -2641,6 +2641,20 @@ false }, +{ + SPELL_PRIMAL_WAVE, "Primal Wave", + SPTYP_CONJURATION | SPTYP_ICE, + SPFLAG_DIR_OR_TARGET, + 6, + 200, + 7, 7, + 0, + NULL, + true, + false +}, + + { SPELL_NO_SPELL, "nonexistent spell", 0, diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc index 75d7264e07..4e61296b5b 100644 --- a/crawl-ref/source/spl-util.cc +++ b/crawl-ref/source/spl-util.cc @@ -997,6 +997,8 @@ spell_type zap_type_to_spell(zap_type zap) return(SPELL_BOLT_OF_FIRE); case ZAP_COLD: return(SPELL_BOLT_OF_COLD); + case ZAP_PRIMAL_WAVE: + return(SPELL_PRIMAL_WAVE); case ZAP_CONFUSION: return(SPELL_CONFUSE); case ZAP_INVISIBILITY: -- cgit v1.2.3-54-g00ecf From d85ce5fca3ae674e2437783a358dfc3eecd38a3c Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Tue, 29 Dec 2009 08:34:11 +0530 Subject: s/merfolk elementalist/merfolk aquamancer/ (sorear). --- crawl-ref/source/enum.h | 4 ++-- crawl-ref/source/mon-data.h | 4 ++-- crawl-ref/source/mon-gear.cc | 4 ++-- crawl-ref/source/mon-pick.cc | 4 ++-- crawl-ref/source/mon-spll.h | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index bf570798f1..4d8acfc69a 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -1822,7 +1822,7 @@ enum monster_type // (int) menv[].type // Shoals guardians MONS_MERFOLK_GLADIATOR, - MONS_MERFOLK_ELEMENTALIST, + MONS_MERFOLK_AQUAMANCER, //jmf: end new monsters MONS_WHITE_IMP = 220, // 220 @@ -2325,7 +2325,7 @@ enum mon_spellbook_type MST_HAROLD, MST_MARA, MST_MARA_FAKE, - MST_MERFOLK_ELEMENTALIST, + MST_MERFOLK_AQUAMANCER, MST_TEST_SPAWNER = 200, NUM_MSTYPES, diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index 574a1b916d..7dcf33e759 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -1132,13 +1132,13 @@ static monsterentry mondata[] = { }, { - MONS_MERFOLK_ELEMENTALIST, 'm', LIGHTGREEN, "merfolk elementalist", + MONS_MERFOLK_AQUAMANCER, 'm', LIGHTGREEN, "merfolk aquamancer", M_WARM_BLOOD | M_SPELLCASTER | M_ACTUAL_SPELLS, MR_RES_COLD, 500, 10, MONS_MERFOLK, MONS_MERFOLK, MH_NATURAL, -4, { {AT_HIT, AF_PLAIN, 15}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, { 15, 3, 3, 0 }, - 0, 12, MST_MERFOLK_ELEMENTALIST, CE_CONTAMINATED, Z_SMALL, S_SHOUT, + 0, 12, MST_MERFOLK_AQUAMANCER, CE_CONTAMINATED, Z_SMALL, S_SHOUT, I_NORMAL, HT_AMPHIBIOUS_WATER, FL_NONE, 10, DEFAULT_ENERGY, MONUSE_WEAPONS_ARMOUR, MONEAT_NOTHING, SIZE_MEDIUM }, diff --git a/crawl-ref/source/mon-gear.cc b/crawl-ref/source/mon-gear.cc index c1a4dace95..e0a9f54e8a 100644 --- a/crawl-ref/source/mon-gear.cc +++ b/crawl-ref/source/mon-gear.cc @@ -412,7 +412,7 @@ static item_make_species_type _give_weapon(monsters *mon, int level, item.sub_type = WPN_LONGBOW; break; - case MONS_MERFOLK_ELEMENTALIST: + case MONS_MERFOLK_AQUAMANCER: item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_WEAPONS; item.sub_type = WPN_SABRE; @@ -1497,7 +1497,7 @@ void give_armour(monsters *mon, int level) case MONS_WIZARD: case MONS_ILSUIW: case MONS_MARA: - case MONS_MERFOLK_ELEMENTALIST: + case MONS_MERFOLK_AQUAMANCER: if (item_race == MAKE_ITEM_RANDOM_RACE) item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; diff --git a/crawl-ref/source/mon-pick.cc b/crawl-ref/source/mon-pick.cc index a79945b990..084d643d55 100644 --- a/crawl-ref/source/mon-pick.cc +++ b/crawl-ref/source/mon-pick.cc @@ -1722,7 +1722,7 @@ int mons_shoals_level(int mcls) case MONS_SIREN: case MONS_HARPY: case MONS_MERFOLK_GLADIATOR: - case MONS_MERFOLK_ELEMENTALIST: + case MONS_MERFOLK_AQUAMANCER: mlev += 3; break; @@ -1767,7 +1767,7 @@ int mons_shoals_rare(int mcls) case MONS_SIREN: case MONS_YAKTAUR: - case MONS_MERFOLK_ELEMENTALIST: + case MONS_MERFOLK_AQUAMANCER: return 25; case MONS_CYCLOPS: diff --git a/crawl-ref/source/mon-spll.h b/crawl-ref/source/mon-spll.h index 76c561e352..2137cbbacb 100644 --- a/crawl-ref/source/mon-spll.h +++ b/crawl-ref/source/mon-spll.h @@ -1319,7 +1319,7 @@ } }, - { MST_MERFOLK_ELEMENTALIST, + { MST_MERFOLK_AQUAMANCER, { SPELL_PRIMAL_WAVE, SPELL_BOLT_OF_COLD, -- cgit v1.2.3-54-g00ecf From 45cd93ff148f33ec39ae41fb428207a36592574b Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Mon, 28 Dec 2009 13:16:20 +1000 Subject: Add a note about Cloud vault, tweak. --- crawl-ref/source/dat/wizlab.des | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index bbe1921297..c8f0c73417 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -1417,6 +1417,7 @@ ENDMAP ############################################################################### # Chambers of the Cloud Mage # +# To-do: make it look as cool in tiles. NAME: wizlab_cloud ORIENT: encompass TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup @@ -1432,7 +1433,7 @@ MARKER: ! = lua:fog_machine { \ pow_max = 10, delay_min = 10, delay_max = 40, \ size = 1, size_buildup_amnt = 5, \ size_buildup_time = 25, cloud_type = "grey smoke", \ - colour = "white", name = "white smoke" \ + colour = "white", name = "fluffy clouds" \ } KITEM: % = w:20 potion of levitation / w:20 potion of water / \ potion of magic / potion of speed / potion of resistance / \ -- cgit v1.2.3-54-g00ecf From ebbacbf127b0a82ab96529add2cb73f942de2139 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Tue, 29 Dec 2009 18:27:35 +1000 Subject: Rename clouds to "white fluffiness". --- crawl-ref/source/dat/wizlab.des | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index c8f0c73417..ab55a59408 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -1433,7 +1433,7 @@ MARKER: ! = lua:fog_machine { \ pow_max = 10, delay_min = 10, delay_max = 40, \ size = 1, size_buildup_amnt = 5, \ size_buildup_time = 25, cloud_type = "grey smoke", \ - colour = "white", name = "fluffy clouds" \ + colour = "white", name = "white fluffiness" \ } KITEM: % = w:20 potion of levitation / w:20 potion of water / \ potion of magic / potion of speed / potion of resistance / \ -- cgit v1.2.3-54-g00ecf From 43e630ae90712669b072242328e35904cd6adc64 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Tue, 29 Dec 2009 18:27:50 +1000 Subject: Colour-variant "white smoke" tile. Basically just a test to make sure that cloud recolouring using recoloured tiles (if they exist) works. As far as I can see, it works exactly as hoped-for! It's just a matter of reorganising the base cloud associations so that you can specify any type of smoke, recolour it, and get the proper tile. --- crawl-ref/source/rltiles/dc-misc.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crawl-ref/source/rltiles/dc-misc.txt b/crawl-ref/source/rltiles/dc-misc.txt index 653b614435..10bc4fc714 100644 --- a/crawl-ref/source/rltiles/dc-misc.txt +++ b/crawl-ref/source/rltiles/dc-misc.txt @@ -22,6 +22,12 @@ cloud_poison2 CLOUD_POISON_2 cloud_black_smoke CLOUD_BLACK_SMOKE cloud_blue_smoke CLOUD_BLUE_SMOKE cloud_grey_smoke CLOUD_GREY_SMOKE + +%variation CLOUD_GREY_SMOKE white +%lum 0 30 +%repeat CLOUD_GREY_SMOKE CLOUD_WHITE_SMOKE +%resetcol + cloud_miasma CLOUD_MIASMA cloud_tloc_energy CLOUD_TLOC_ENERGY cloud_mutagenic_small1 CLOUD_MUTAGENIC_0 -- cgit v1.2.3-54-g00ecf From cccb371a91d0fb0f1f1008bc1eff23e48418114a Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Tue, 29 Dec 2009 16:20:41 +0530 Subject: s/merfolk gladiator/merfolk impaler/ --- crawl-ref/source/enum.h | 2 +- crawl-ref/source/mon-data.h | 2 +- crawl-ref/source/mon-gear.cc | 6 +++--- crawl-ref/source/mon-pick.cc | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index 4d8acfc69a..4a37b027b6 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -1821,7 +1821,7 @@ enum monster_type // (int) menv[].type MONS_BALLISTOMYCETE, // 200 // Shoals guardians - MONS_MERFOLK_GLADIATOR, + MONS_MERFOLK_IMPALER, MONS_MERFOLK_AQUAMANCER, //jmf: end new monsters diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index 7dcf33e759..5f8822a84b 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -1119,7 +1119,7 @@ static monsterentry mondata[] = { }, { - MONS_MERFOLK_GLADIATOR, 'm', LIGHTBLUE, "merfolk gladiator", + MONS_MERFOLK_IMPALER, 'm', LIGHTBLUE, "merfolk impaler", M_WARM_BLOOD, MR_NO_FLAGS, 500, 10, MONS_MERFOLK, MONS_MERFOLK, MH_NATURAL, -3, diff --git a/crawl-ref/source/mon-gear.cc b/crawl-ref/source/mon-gear.cc index e0a9f54e8a..a012972cc3 100644 --- a/crawl-ref/source/mon-gear.cc +++ b/crawl-ref/source/mon-gear.cc @@ -590,7 +590,7 @@ static item_make_species_type _give_weapon(monsters *mon, int level, } break; - case MONS_MERFOLK_GLADIATOR: + case MONS_MERFOLK_IMPALER: item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_WEAPONS; // Weapon types are not strictly sorted by quality. This is intentional. @@ -1057,7 +1057,7 @@ static void _give_ammo(monsters *mon, int level, qty = random_range(4, 7); break; - case MONS_MERFOLK_GLADIATOR: + case MONS_MERFOLK_IMPALER: // Gladiators rarely get javelins. if (one_chance_in(4)) { @@ -1381,7 +1381,7 @@ void give_armour(monsters *mon, int level) break; } - case MONS_MERFOLK_GLADIATOR: + case MONS_MERFOLK_IMPALER: item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_ARMOUR; item.sub_type = random_choose_weighted(100, ARM_ROBE, diff --git a/crawl-ref/source/mon-pick.cc b/crawl-ref/source/mon-pick.cc index 084d643d55..01df392e72 100644 --- a/crawl-ref/source/mon-pick.cc +++ b/crawl-ref/source/mon-pick.cc @@ -1721,7 +1721,7 @@ int mons_shoals_level(int mcls) case MONS_CYCLOPS: // will have a sheep band case MONS_SIREN: case MONS_HARPY: - case MONS_MERFOLK_GLADIATOR: + case MONS_MERFOLK_IMPALER: case MONS_MERFOLK_AQUAMANCER: mlev += 3; break; @@ -1756,7 +1756,7 @@ int mons_shoals_rare(int mcls) return 50; case MONS_MERMAID: - case MONS_MERFOLK_GLADIATOR: + case MONS_MERFOLK_IMPALER: return 40; case MONS_HIPPOGRIFF: -- cgit v1.2.3-54-g00ecf From fe97e90bb05bca87d2df81bf3a2d7ded964fd42c Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Tue, 29 Dec 2009 17:55:13 +0530 Subject: Fix warnings for double->int implicit conversion (Napkin). --- crawl-ref/source/dgn-shoals.cc | 9 +++++---- crawl-ref/source/dungeon.cc | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/crawl-ref/source/dgn-shoals.cc b/crawl-ref/source/dgn-shoals.cc index c72cd41bf6..b88873d5b5 100644 --- a/crawl-ref/source/dgn-shoals.cc +++ b/crawl-ref/source/dgn-shoals.cc @@ -203,8 +203,9 @@ static void _shoals_build_cliff() for (int i = 0; i < length; i += 3) { int distance = i - length / 2; - coord_def place = cliffc + coord_def(distance * cos(angle), - distance * sin(angle)); + coord_def place = + cliffc + coord_def(static_cast(distance * cos(angle)), + static_cast(distance * sin(angle))); coord_def fuzz = coord_def(random_range(-2, 2), random_range(-2, 2)); place += fuzz; @@ -512,7 +513,7 @@ static coord_def _shoals_region_center( } } - const coord_def cgravity(cx, cy); + const coord_def cgravity(static_cast(cx), static_cast(cy)); coord_def closest_to_center; int closest_distance = 0; for (int i = 0, size = visit.size(); i < size; ++i) @@ -663,7 +664,7 @@ struct coord_dbl static coord_def _int_coord(const coord_dbl &c) { - return coord_def(c.x, c.y); + return coord_def(static_cast(c.x), static_cast(c.y)); } static std::vector _shoals_windshadows(grid_bool &windy) diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 1c1d27f642..93e5086ef6 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -7632,8 +7632,9 @@ coord_def dgn_random_point_from(const coord_def &c, int radius, int margin) while (attempts-- > 0) { const double angle = dgn_degrees_to_radians(random2(360)); - const coord_def res = c + coord_def(radius * cos(angle), - radius * sin(angle)); + const coord_def res = + c + coord_def(static_cast(radius * cos(angle)), + static_cast(radius * sin(angle))); if (res.x >= margin && res.x < GXM - margin && res.y >= margin && res.y < GYM - margin) { -- cgit v1.2.3-54-g00ecf From cfdb6e14f51f38e104444acf22e17706fcda104d Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Tue, 29 Dec 2009 17:56:26 +0530 Subject: Add merfolk javelineers to the Shoals, add descriptions for the three new merfolk types. --- crawl-ref/source/dat/descript/monsters.txt | 14 ++++++++- crawl-ref/source/enum.h | 1 + crawl-ref/source/mon-act.cc | 7 ++++- crawl-ref/source/mon-data.h | 24 +++++++++++---- crawl-ref/source/mon-gear.cc | 49 ++++++++++++++++++------------ crawl-ref/source/mon-pick.cc | 4 ++- 6 files changed, 71 insertions(+), 28 deletions(-) diff --git a/crawl-ref/source/dat/descript/monsters.txt b/crawl-ref/source/dat/descript/monsters.txt index da05efc32f..579bbeb6a3 100644 --- a/crawl-ref/source/dat/descript/monsters.txt +++ b/crawl-ref/source/dat/descript/monsters.txt @@ -1048,7 +1048,19 @@ This tall and powerful demon is Mara, Lord of Illusions, mighty among dreamers. %%%% merfolk -Half fish, half man, the merfolk are citizens of both water and land, and they'll fiercely protect their chosen territory. +Half fish, half man, the merfolk are citizens of both water and land, and fierce protectors of their chosen territory. +%%%% +merfolk impaler + +A powerfully muscled merfolk warrior, bearing a great trident. +%%%% +merfolk aquamancer + +A slender merfolk mystic with unusually webby hands. Its form shifts and glistens as if seen through ocean spray. +%%%% +merfolk javelineer + +A sinewy merfolk fighter with a piercing gaze and a large bundle of javelins. %%%% mermaid diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index 4a37b027b6..08ae63c36e 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -1823,6 +1823,7 @@ enum monster_type // (int) menv[].type // Shoals guardians MONS_MERFOLK_IMPALER, MONS_MERFOLK_AQUAMANCER, + MONS_MERFOLK_JAVELINEER, //jmf: end new monsters MONS_WHITE_IMP = 220, // 220 diff --git a/crawl-ref/source/mon-act.cc b/crawl-ref/source/mon-act.cc index 3fc1cea5a0..31d1c990a7 100644 --- a/crawl-ref/source/mon-act.cc +++ b/crawl-ref/source/mon-act.cc @@ -1139,7 +1139,12 @@ static bool _mons_throw(struct monsters *monster, struct bolt &pbolt, { const mon_attack_def attk = mons_attack_spec(monster, 0); if (attk.type == AT_SHOOT) - ammoDamBonus += random2avg(attk.damage, 2); + { + if (projected == LRET_THROWN && wepClass == OBJ_MISSILES) + ammoHitBonus += random2avg(attk.damage, 2); + else + ammoDamBonus += random2avg(attk.damage, 2); + } } if (projected == LRET_THROWN) diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index 5f8822a84b..e5e5fb7b98 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -1123,12 +1123,24 @@ static monsterentry mondata[] = { M_WARM_BLOOD, MR_NO_FLAGS, 500, 10, MONS_MERFOLK, MONS_MERFOLK, MH_NATURAL, -3, - { {AT_HIT, AF_PLAIN, 35}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, - { 14, 6, 3, 0 }, - // Gladiators prefer light armour, and are dodging experts. - 0, 17, MST_NO_SPELLS, CE_CONTAMINATED, Z_SMALL, S_SHOUT, + { {AT_HIT, AF_PLAIN, 40}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, + { 16, 5, 3, 0 }, + // Impalers prefer light armour, and are dodging experts. + 0, 23, MST_NO_SPELLS, CE_CONTAMINATED, Z_SMALL, S_SHOUT, I_NORMAL, HT_AMPHIBIOUS_WATER, FL_NONE, 10, ATTACK_ENERGY(6), - MONUSE_WEAPONS_ARMOUR, MONEAT_NOTHING, SIZE_MEDIUM + MONUSE_MAGIC_ITEMS, MONEAT_NOTHING, SIZE_MEDIUM +}, + +{ + MONS_MERFOLK_JAVELINEER, 'm', LIGHTGREY, "merfolk javelineer", + M_WARM_BLOOD | M_ARCHER, + MR_NO_FLAGS, + 500, 10, MONS_MERFOLK, MONS_MERFOLK, MH_NATURAL, -4, + { {AT_SHOOT, AF_PLAIN, 18}, {AT_HIT, AF_PLAIN, 20}, AT_NO_ATK, AT_NO_ATK }, + { 16, 4, 2, 0 }, + 0, 15, MST_NO_SPELLS, CE_CONTAMINATED, Z_SMALL, S_SHOUT, + I_NORMAL, HT_AMPHIBIOUS_WATER, FL_NONE, 10, MISSILE_ENERGY(8), + MONUSE_MAGIC_ITEMS, MONEAT_NOTHING, SIZE_MEDIUM }, { @@ -1140,7 +1152,7 @@ static monsterentry mondata[] = { { 15, 3, 3, 0 }, 0, 12, MST_MERFOLK_AQUAMANCER, CE_CONTAMINATED, Z_SMALL, S_SHOUT, I_NORMAL, HT_AMPHIBIOUS_WATER, FL_NONE, 10, DEFAULT_ENERGY, - MONUSE_WEAPONS_ARMOUR, MONEAT_NOTHING, SIZE_MEDIUM + MONUSE_MAGIC_ITEMS, MONEAT_NOTHING, SIZE_MEDIUM }, { diff --git a/crawl-ref/source/mon-gear.cc b/crawl-ref/source/mon-gear.cc index a012972cc3..393d4680b7 100644 --- a/crawl-ref/source/mon-gear.cc +++ b/crawl-ref/source/mon-gear.cc @@ -412,14 +412,6 @@ static item_make_species_type _give_weapon(monsters *mon, int level, item.sub_type = WPN_LONGBOW; break; - case MONS_MERFOLK_AQUAMANCER: - item_race = MAKE_ITEM_NO_RACE; - item.base_type = OBJ_WEAPONS; - item.sub_type = WPN_SABRE; - if (coinflip()) - level = MAKE_GOOD_ITEM; - break; - case MONS_DEEP_ELF_ANNIHILATOR: case MONS_DEEP_ELF_CONJURER: case MONS_DEEP_ELF_DEATH_MAGE: @@ -593,11 +585,8 @@ static item_make_species_type _give_weapon(monsters *mon, int level, case MONS_MERFOLK_IMPALER: item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_WEAPONS; - // Weapon types are not strictly sorted by quality. This is intentional. item.sub_type = random_choose_weighted(100, WPN_TRIDENT, - 45, WPN_BARDICHE, 15, WPN_DEMON_TRIDENT, - 15, WPN_HALBERD, 0); if (coinflip()) level = MAKE_GOOD_ITEM; @@ -611,6 +600,23 @@ static item_make_species_type _give_weapon(monsters *mon, int level, } break; + + case MONS_MERFOLK_AQUAMANCER: + item_race = MAKE_ITEM_NO_RACE; + item.base_type = OBJ_WEAPONS; + item.sub_type = WPN_SABRE; + if (coinflip()) + level = MAKE_GOOD_ITEM; + break; + + case MONS_MERFOLK_JAVELINEER: + item_race = MAKE_ITEM_NO_RACE; + item.base_type = OBJ_WEAPONS; + item.sub_type = WPN_SPEAR; + if (!one_chance_in(3)) + level = MAKE_GOOD_ITEM; + break; + case MONS_MERFOLK: if (one_chance_in(3)) { @@ -1057,14 +1063,13 @@ static void _give_ammo(monsters *mon, int level, qty = random_range(4, 7); break; - case MONS_MERFOLK_IMPALER: - // Gladiators rarely get javelins. - if (one_chance_in(4)) - { - weap_class = OBJ_MISSILES; - weap_type = MI_JAVELIN; - qty = random_range(3, 8, 2); - } + case MONS_MERFOLK_JAVELINEER: + weap_class = OBJ_MISSILES; + weap_type = MI_JAVELIN; + item_race = MAKE_ITEM_NO_RACE; + qty = random_range(9, 23, 2); + if (one_chance_in(3)) + level = MAKE_GOOD_ITEM; break; case MONS_MERFOLK: @@ -1391,6 +1396,12 @@ void give_armour(monsters *mon, int level) 0); break; + case MONS_MERFOLK_JAVELINEER: + item_race = MAKE_ITEM_NO_RACE; + item.base_type = OBJ_ARMOUR; + item.sub_type = ARM_LEATHER_ARMOUR; + break; + case MONS_ANGEL: case MONS_SIGMUND: case MONS_WIGHT: diff --git a/crawl-ref/source/mon-pick.cc b/crawl-ref/source/mon-pick.cc index 01df392e72..edcb9a5ec7 100644 --- a/crawl-ref/source/mon-pick.cc +++ b/crawl-ref/source/mon-pick.cc @@ -1723,6 +1723,7 @@ int mons_shoals_level(int mcls) case MONS_HARPY: case MONS_MERFOLK_IMPALER: case MONS_MERFOLK_AQUAMANCER: + case MONS_MERFOLK_JAVELINEER: mlev += 3; break; @@ -1756,13 +1757,14 @@ int mons_shoals_rare(int mcls) return 50; case MONS_MERMAID: - case MONS_MERFOLK_IMPALER: return 40; case MONS_HIPPOGRIFF: case MONS_GIANT_BAT: case MONS_BUTTERFLY: case MONS_CENTAUR: + case MONS_MERFOLK_IMPALER: + case MONS_MERFOLK_JAVELINEER: return 35; case MONS_SIREN: -- cgit v1.2.3-54-g00ecf From 07ec071cac85c4c35637cd84f07c70781e8ba05f Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Tue, 29 Dec 2009 22:51:41 +1000 Subject: Add light and dark vine-covered statue bases. Also, convert the weapons wielded by the current statue into overlays, and add relevant combination lines to dc-mon.txt to generate. The names may require changing if they cause confusion, or if unneeded, the section could be commented out. Also update the relevant vaults. --- crawl-ref/source/dat/float.des | 24 ++++++++++------ crawl-ref/source/dat/mini.des | 2 +- crawl-ref/source/rltiles/dc-mon.txt | 31 ++++++++++++++++++++- .../dc-mon/statues/dark_vine_statue_base.png | Bin 0 -> 3821 bytes .../dc-mon/statues/light_vine_statue_base.png | Bin 0 -> 3870 bytes .../source/rltiles/dc-mon/statues/overlay_axe.png | Bin 0 -> 1026 bytes .../source/rltiles/dc-mon/statues/overlay_bow.png | Bin 0 -> 999 bytes .../rltiles/dc-mon/statues/overlay_crossbow.png | Bin 0 -> 1093 bytes .../source/rltiles/dc-mon/statues/overlay_mace.png | Bin 0 -> 981 bytes .../source/rltiles/dc-mon/statues/overlay_mage.png | Bin 0 -> 985 bytes .../rltiles/dc-mon/statues/overlay_scythe.png | Bin 0 -> 989 bytes .../rltiles/dc-mon/statues/overlay_sword.png | Bin 0 -> 1021 bytes 12 files changed, 47 insertions(+), 10 deletions(-) create mode 100644 crawl-ref/source/rltiles/dc-mon/statues/dark_vine_statue_base.png create mode 100644 crawl-ref/source/rltiles/dc-mon/statues/light_vine_statue_base.png create mode 100644 crawl-ref/source/rltiles/dc-mon/statues/overlay_axe.png create mode 100644 crawl-ref/source/rltiles/dc-mon/statues/overlay_bow.png create mode 100644 crawl-ref/source/rltiles/dc-mon/statues/overlay_crossbow.png create mode 100644 crawl-ref/source/rltiles/dc-mon/statues/overlay_mace.png create mode 100644 crawl-ref/source/rltiles/dc-mon/statues/overlay_mage.png create mode 100644 crawl-ref/source/rltiles/dc-mon/statues/overlay_scythe.png create mode 100644 crawl-ref/source/rltiles/dc-mon/statues/overlay_sword.png diff --git a/crawl-ref/source/dat/float.des b/crawl-ref/source/dat/float.des index 493d018b9e..a66a5961dc 100644 --- a/crawl-ref/source/dat/float.des +++ b/crawl-ref/source/dat/float.des @@ -709,15 +709,23 @@ NAME: statue_cache ORIENT: north TAGS: no_monster_gen DEPTH: D:12-20, Elf, Vault -MONS: statue name:archer name_adjective ; crossbow ego:flame . bolt q:30 -MONS: statue name:archer name_adjective ; crossbow ego:frost . bolt q:30 -MONS: statue name:warrior name_adjective ; battleaxe ego:flaming good_item -MONS: statue name:warrior name_adjective ; battleaxe ego:freezing good_item -MONS: statue name:warrior name_adjective ; great mace ego:flaming good_item -MONS: statue name:warrior name_adjective ; great mace ego:freezing good_item +MONS: statue name:archer name_adjective tile:mons_statue_crossbow ; crossbow \ + ego:flame . bolt q:30 +MONS: statue name:archer name_adjective tile:mons_statue_crossbow ; crossbow \ + ego:frost . bolt q:30 +MONS: statue name:warrior name_adjective tile:mons_statue_axe ; battleaxe \ + ego:flaming good_item +MONS: statue name:warrior name_adjective tile:mons_statue_axe ; battleaxe \ + ego:freezing good_item +MONS: statue name:warrior name_adjective tile:mons_statue_mace ; great mace \ + ego:flaming good_item +MONS: statue name:warrior name_adjective tile:mons_statue_mace ; great mace \ + ego:freezing good_item MONS: silver statue -KMONS: 8 = statue name:wizard name_adjective spells:lehudib's_crystal_spear;iskenderun's_mystic_blast;slow;stone_arrow -KMONS: 9 = statue name:wizard name_adjective spells:freezing_cloud;mephitic_cloud;throw_icicle;confuse +KMONS: 8 = statue name:wizard name_adjective tile:mons_statue_mage \ + spells:lehudib's_crystal_spear;iskenderun's_mystic_blast;slow;stone_arrow +KMONS: 9 = statue name:wizard name_adjective tile:mons_statue_mage \ + spells:freezing_cloud;mephitic_cloud;throw_icicle;confuse MAP cccccccccccccc cccccccc7ccccc diff --git a/crawl-ref/source/dat/mini.des b/crawl-ref/source/dat/mini.des index 2927e8362c..d29eeff639 100644 --- a/crawl-ref/source/dat/mini.des +++ b/crawl-ref/source/dat/mini.des @@ -2667,7 +2667,7 @@ ENDMAP # NAME: archer_statue DEPTH: D:8-, Vault, Elf -MONS: statue tile:mons_archer_statue name:archer name_adjective; longbow . arrow q:30 +MONS: statue tile:mons_statue_archer name:archer name_adjective; longbow . arrow q:30 MAP ccc ccccc1ccccc diff --git a/crawl-ref/source/rltiles/dc-mon.txt b/crawl-ref/source/rltiles/dc-mon.txt index dba205a119..2ecaf85b16 100644 --- a/crawl-ref/source/rltiles/dc-mon.txt +++ b/crawl-ref/source/rltiles/dc-mon.txt @@ -287,7 +287,36 @@ roxanne MONS_ROXANNE ice_statue MONS_ICE_STATUE silver_statue MONS_SILVER_STATUE orange_crystal_statue MONS_ORANGE_CRYSTAL_STATUE -statue_archer MONS_ARCHER_STATUE + +%back statue_base +overlay_axe MONS_STATUE_AXE +overlay_bow MONS_STATUE_ARCHER +overlay_crossbow MONS_STATUE_CROSSBOW +overlay_mace MONS_STATUE_MACE +overlay_mage MONS_STATUE_MAGE +overlay_scythe MONS_STATUE_SCYTHE +overlay_sword MONS_STATUE_SWORD +%back none + +%back light_vine_statue_base +overlay_axe MONS_LIGHT_VINE_STATUE_AXE +overlay_bow MONS_LIGHT_VINE_STATUE_ARCHER +overlay_crossbow MONS_LIGHT_VINE_STATUE_CROSSBOW +overlay_mace MONS_LIGHT_VINE_STATUE_MACE +overlay_mage MONS_LIGHT_VINE_STATUE_MAGE +overlay_scythe MONS_LIGHT_VINE_STATUE_SCYTHE +overlay_sword MONS_LIGHT_VINE_STATUE_SWORD +%back none + +%back dark_vine_statue_base +overlay_axe MONS_DARK_VINE_STATUE_AXE +overlay_bow MONS_DARK_VINE_STATUE_ARCHER +overlay_crossbow MONS_DARK_VINE_STATUE_CROSSBOW +overlay_mace MONS_DARK_VINE_STATUE_MACE +overlay_mage MONS_DARK_VINE_STATUE_MAGE +overlay_scythe MONS_DARK_VINE_STATUE_SCYTHE +overlay_sword MONS_DARK_VINE_STATUE_SWORD +%back none ## Gargoyles ('9') %sdir dc-mon diff --git a/crawl-ref/source/rltiles/dc-mon/statues/dark_vine_statue_base.png b/crawl-ref/source/rltiles/dc-mon/statues/dark_vine_statue_base.png new file mode 100644 index 0000000000..5d2a5a1283 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/statues/dark_vine_statue_base.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/statues/light_vine_statue_base.png b/crawl-ref/source/rltiles/dc-mon/statues/light_vine_statue_base.png new file mode 100644 index 0000000000..2d0a4e5ee1 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/statues/light_vine_statue_base.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/statues/overlay_axe.png b/crawl-ref/source/rltiles/dc-mon/statues/overlay_axe.png new file mode 100644 index 0000000000..1dcb1f1574 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/statues/overlay_axe.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/statues/overlay_bow.png b/crawl-ref/source/rltiles/dc-mon/statues/overlay_bow.png new file mode 100644 index 0000000000..4710c7d683 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/statues/overlay_bow.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/statues/overlay_crossbow.png b/crawl-ref/source/rltiles/dc-mon/statues/overlay_crossbow.png new file mode 100644 index 0000000000..3f78ae7af0 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/statues/overlay_crossbow.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/statues/overlay_mace.png b/crawl-ref/source/rltiles/dc-mon/statues/overlay_mace.png new file mode 100644 index 0000000000..12a2fb2486 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/statues/overlay_mace.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/statues/overlay_mage.png b/crawl-ref/source/rltiles/dc-mon/statues/overlay_mage.png new file mode 100644 index 0000000000..ab1533abbb Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/statues/overlay_mage.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/statues/overlay_scythe.png b/crawl-ref/source/rltiles/dc-mon/statues/overlay_scythe.png new file mode 100644 index 0000000000..671280385d Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/statues/overlay_scythe.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/statues/overlay_sword.png b/crawl-ref/source/rltiles/dc-mon/statues/overlay_sword.png new file mode 100644 index 0000000000..b0ea9caaae Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/statues/overlay_sword.png differ -- cgit v1.2.3-54-g00ecf From 87427dc9d989fcf0b70261ebae95f8d835fb8ed8 Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Tue, 29 Dec 2009 10:02:21 +0100 Subject: Remove resistances from Ilsuiw that other merfolk lost. --- crawl-ref/source/mon-data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index 5d42867f4d..f40dbb7c10 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -4586,7 +4586,7 @@ static monsterentry mondata[] = { { MONS_ILSUIW, 'm', GREEN, "Ilsuiw", M_UNIQUE | M_WARM_BLOOD | M_SPELLCASTER | M_ACTUAL_SPELLS | M_SPEAKS, - MR_RES_POISON | MR_RES_COLD, + MR_NO_FLAGS, 500, 10, MONS_MERFOLK, MONS_MERFOLK, MH_NATURAL, -7, { {AT_HIT, AF_PLAIN, 10}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, { 9, 0, 0, 54 }, -- cgit v1.2.3-54-g00ecf From 8657d1a1b6f40b7da7e970ca6e0082d04f0d1802 Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Tue, 29 Dec 2009 13:21:09 +0100 Subject: Give tier 3 (= long blade) stabbing bonuses to all 1-handed polearms. --- crawl-ref/source/fight.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index b2237a92cb..c88ca09f3b 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -1652,7 +1652,10 @@ void melee_attack::player_weapon_auto_id() int melee_attack::player_stab_weapon_bonus(int damage) { if (weapon && weapon->base_type == OBJ_WEAPONS - && (weapon->sub_type == WPN_CLUB || weapon->sub_type == WPN_SPEAR)) + && (weapon->sub_type == WPN_CLUB + || weapon->sub_type == WPN_SPEAR + || weapon->sub_type == WPN_TRIDENT + || weapon->sub_type == WPN_DEMON_TRIDENT)) { goto ok_weaps; } -- cgit v1.2.3-54-g00ecf From 3f8334b021c123a371f0dfe8062c3a84eebba673 Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Tue, 29 Dec 2009 13:38:36 +0100 Subject: Make clarity allow intentional berserk. Unknown potions of rage override it as well. This is a debatable thing, but since other sources of involuntary berserk are caused by "being angry", it makes sense a drug is not affected by merely being calm. --- crawl-ref/source/abl-show.cc | 9 +++------ crawl-ref/source/dat/descript/items.txt | 3 ++- crawl-ref/source/misc.cc | 4 ++-- crawl-ref/source/misc.h | 2 +- crawl-ref/source/player.cc | 6 ++++-- crawl-ref/source/player.h | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc index a16fdf3ca6..3079b924d0 100644 --- a/crawl-ref/source/abl-show.cc +++ b/crawl-ref/source/abl-show.cc @@ -702,8 +702,6 @@ static talent _get_talent(ability_type ability, bool check_confused) case ABIL_TROG_BERSERK: // piety >= 30 invoc = true; failure = 30 - you.piety; // starts at 0% - if (player_mental_clarity(true)) - failure += 80; break; case ABIL_TROG_REGEN_MR: // piety >= 50 @@ -1101,8 +1099,7 @@ static bool _check_ability_possible(const ability_def& abil, mpr("You're too hungry to berserk."); return (false); } - return (you.can_go_berserk(true, abil.ability == ABIL_TROG_BERSERK) - && berserk_check_wielded_weapon()); + return (you.can_go_berserk(true) && berserk_check_wielded_weapon()); case ABIL_FLY_II: if (you.duration[DUR_EXHAUSTED]) @@ -1161,7 +1158,7 @@ static bool _activate_talent(const talent& tal) } if ((tal.which == ABIL_EVOKE_BERSERK || tal.which == ABIL_TROG_BERSERK) - && !you.can_go_berserk(true, tal.which == ABIL_TROG_BERSERK)) + && !you.can_go_berserk(true)) { crawl_state.zero_turns_taken(); return (false); @@ -1745,7 +1742,7 @@ static bool _do_ability(const ability_def& abil) case ABIL_TROG_BERSERK: // Trog abilities don't use or train invocations. - go_berserk(true, true); + go_berserk(true); break; case ABIL_TROG_REGEN_MR: diff --git a/crawl-ref/source/dat/descript/items.txt b/crawl-ref/source/dat/descript/items.txt index 25277aff17..2b1dc4c4ea 100644 --- a/crawl-ref/source/dat/descript/items.txt +++ b/crawl-ref/source/dat/descript/items.txt @@ -8,7 +8,8 @@ one is skilled in the appropriate elemental magic. %%%% amulet of clarity -This amulet protects its wearer from some forms of mental confusion. +This amulet protects its wearer from some forms of mental confusion, +including being infuriated against one's will. %%%% amulet of conservation diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 2cc226f127..4bac2e7ff0 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -2696,11 +2696,11 @@ bool scramble(void) return (true); } -bool go_berserk(bool intentional, bool no_clarity) +bool go_berserk(bool intentional) { ASSERT(!crawl_state.arena); - if (!you.can_go_berserk(intentional, no_clarity)) + if (!you.can_go_berserk(intentional)) return (false); if (Tutorial.tutorial_left) diff --git a/crawl-ref/source/misc.h b/crawl-ref/source/misc.h index 3c5cee6cbf..9f75955885 100644 --- a/crawl-ref/source/misc.h +++ b/crawl-ref/source/misc.h @@ -13,7 +13,7 @@ struct bolt; struct dist; struct activity_interrupt_data; -bool go_berserk(bool intentional, bool no_clarity = false); +bool go_berserk(bool intentional); void search_around(bool only_adjacent = false); void down_stairs(int old_level, dungeon_feature_type force_stair = DNGN_UNSEEN, diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 7ba87a20ff..631e04e622 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -5980,8 +5980,10 @@ bool player::can_go_berserk() const return (can_go_berserk(false)); } -bool player::can_go_berserk(bool verbose, bool no_clarity) const +bool player::can_go_berserk(bool intentional) const { + const bool verbose = intentional; + if (berserk()) { if (verbose) @@ -6016,7 +6018,7 @@ bool player::can_go_berserk(bool verbose, bool no_clarity) const return (false); } - if (!no_clarity && player_mental_clarity(true)) + if (!intentional && player_mental_clarity(true)) { if (verbose) { diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h index ee34bd703e..c1a3c62b29 100644 --- a/crawl-ref/source/player.h +++ b/crawl-ref/source/player.h @@ -414,7 +414,7 @@ public: void attacking(actor *other); bool can_go_berserk() const; - bool can_go_berserk(bool verbose, bool no_clarity = false) const; + bool can_go_berserk(bool intentional) const; void go_berserk(bool intentional); bool berserk() const; bool can_mutate() const; -- cgit v1.2.3-54-g00ecf From 9cc1ba155f353a235d38e785c1eefc984f4d42c1 Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Tue, 29 Dec 2009 19:48:21 +0530 Subject: Boost Ilsuiw stats and give her Call Tide, which strongly boosts the tide in Shoals, pegs it towards high tide, and includes a local high tide maximum centered on Ilsuiw, which can be double the height of the normal high tide. --- crawl-ref/source/dgn-shoals.cc | 108 +++++++++++++++++++++++++++++++++++------ crawl-ref/source/dgn-shoals.h | 3 +- crawl-ref/source/enum.h | 2 + crawl-ref/source/main.cc | 2 +- crawl-ref/source/mon-abil.cc | 12 +---- crawl-ref/source/mon-cast.cc | 13 +++++ crawl-ref/source/mon-data.h | 2 +- crawl-ref/source/mon-gear.cc | 12 +++++ crawl-ref/source/mon-spll.h | 5 +- crawl-ref/source/mon-stuff.cc | 3 ++ crawl-ref/source/mon-util.cc | 7 +++ crawl-ref/source/monster.cc | 7 ++- crawl-ref/source/monster.h | 1 + crawl-ref/source/spl-data.h | 12 +++++ crawl-ref/source/view.cc | 13 +++++ crawl-ref/source/view.h | 1 + 16 files changed, 169 insertions(+), 34 deletions(-) diff --git a/crawl-ref/source/dgn-shoals.cc b/crawl-ref/source/dgn-shoals.cc index b88873d5b5..b91dc3a195 100644 --- a/crawl-ref/source/dgn-shoals.cc +++ b/crawl-ref/source/dgn-shoals.cc @@ -1,6 +1,7 @@ #include "AppHdr.h" #include "branch.h" +#include "colour.h" #include "coord.h" #include "coordit.h" #include "dungeon.h" @@ -10,10 +11,12 @@ #include "items.h" #include "maps.h" #include "mgen_data.h" +#include "mon-iter.h" #include "mon-place.h" #include "mon-util.h" #include "random.h" #include "terrain.h" +#include "view.h" #include #include @@ -42,6 +45,23 @@ const int N_PERTURB_OFFSET_HIGH = 45; const int PERTURB_OFFSET_RADIUS_LOW = 2; const int PERTURB_OFFSET_RADIUS_HIGH = 7; +// The raw tide height / TIDE_MULTIPLIER is the actual tide height. The higher +// the tide multiplier, the slower the tide advances and recedes. A multiplier +// of X implies that the tide will advance visibly about once in X turns. +const int TIDE_MULTIPLIER = 30; + +const int LOW_TIDE = -18 * TIDE_MULTIPLIER; +const int HIGH_TIDE = 25 * TIDE_MULTIPLIER; + +// The highest a tide can be called by a tide caller such as Ilsuiw. +const int HIGH_CALLED_TIDE = 25; +const int TIDE_DECEL_MARGIN = 8; +const int PEAK_TIDE_ACCEL = 2; + +// The area around the user of a call tide spell that is subject to +// local tide elevation. +const int TIDE_CALL_RADIUS = 8; + const int _shoals_margin = 6; enum shoals_height_thresholds @@ -60,6 +80,10 @@ enum tide_direction }; static tide_direction _shoals_tide_direction; +static monsters *tide_caller = NULL; +static coord_def tide_caller_pos; +static long tide_called_turns = 0L; +static int tide_called_peak = 0; static dungeon_feature_type _shoals_feature_by_height(int height) { @@ -816,18 +840,16 @@ void shoals_postprocess_level() } } -// The raw tide height / TIDE_MULTIPLIER is the actual tide height. The higher -// the tide multiplier, the slower the tide advances and recedes. A multiplier -// of X implies that the tide will advance visibly about once in X turns. -const int TIDE_MULTIPLIER = 30; - -const int LOW_TIDE = -18 * TIDE_MULTIPLIER; -const int HIGH_TIDE = 25 * TIDE_MULTIPLIER; -const int TIDE_DECEL_MARGIN = 8; -const int START_TIDE_RISE = 2; - static void _shoals_run_tide(int &tide, int &acc) { + // If someone is calling the tide, the acceleration is clamped high. + if (tide_caller) + acc = 15; + // If there's no tide caller and our acceleration is suspiciously high, + // reset it to a falling tide at peak acceleration. + else if (abs(acc) > PEAK_TIDE_ACCEL) + acc = -PEAK_TIDE_ACCEL; + tide += acc; tide = std::max(std::min(tide, HIGH_TIDE), LOW_TIDE); if ((tide == HIGH_TIDE && acc > 0) @@ -836,7 +858,7 @@ static void _shoals_run_tide(int &tide, int &acc) bool in_decel_margin = (abs(tide - HIGH_TIDE) < TIDE_DECEL_MARGIN) || (abs(tide - LOW_TIDE) < TIDE_DECEL_MARGIN); - if ((abs(acc) == 2) == in_decel_margin) + if ((abs(acc) > 1) == in_decel_margin) acc = in_decel_margin? acc / 2 : acc * 2; } @@ -956,6 +978,23 @@ static void _shoals_apply_tide_at(coord_def c, int tide) _shoals_apply_tide_feature_at(c, newfeat); } +static int _shoals_tide_at(coord_def pos, int base_tide) +{ + if (!tide_caller) + return base_tide; + + const int rl_distance = grid_distance(pos, tide_caller_pos); + if (rl_distance > TIDE_CALL_RADIUS) + return base_tide; + + const int distance = + static_cast(sqrt((pos - tide_caller->pos()).abs())); + if (distance > TIDE_CALL_RADIUS) + return base_tide; + + return (base_tide + std::max(0, tide_called_peak - distance * 3)); +} + static void _shoals_apply_tide(int tide) { std::vector pages[2]; @@ -980,7 +1019,7 @@ static void _shoals_apply_tide(int tide) coord_def c(cpage[i]); const bool was_wet(_shoals_tide_passable_feat(grd(c))); seen_points(c) = true; - _shoals_apply_tide_at(c, tide); + _shoals_apply_tide_at(c, _shoals_tide_at(c, tide)); const bool is_wet(feat_is_water(grd(c))); // Only squares that were wet (before applying tide @@ -1017,13 +1056,22 @@ static void _shoals_init_tide() if (!env.properties.exists(ENVP_SHOALS_TIDE_KEY)) { env.properties[ENVP_SHOALS_TIDE_KEY] = short(0); - env.properties[ENVP_SHOALS_TIDE_VEL] = short(2); + env.properties[ENVP_SHOALS_TIDE_VEL] = short(PEAK_TIDE_ACCEL); } } -void shoals_apply_tides(int turns_elapsed) +static monsters *_shoals_find_tide_caller() +{ + for (monster_iterator mi; mi; ++mi) + if (mi->has_ench(ENCH_TIDE)) + return *mi; + return NULL; +} + +void shoals_apply_tides(int turns_elapsed, bool force) { - if (!player_in_branch(BRANCH_SHOALS) || !turns_elapsed + if (!player_in_branch(BRANCH_SHOALS) + || (!turns_elapsed && !force) || !env.heightmap.get()) { return; @@ -1035,6 +1083,20 @@ void shoals_apply_tides(int turns_elapsed) turns_elapsed = turns_elapsed % TIDE_UNIT + TIDE_UNIT; _shoals_init_tide(); + + unwind_var tide_caller_unwind(tide_caller, + _shoals_find_tide_caller()); + if (tide_caller) + { + tide_called_turns = tide_caller->props[TIDE_CALL_TURN].get_long(); + tide_called_turns = you.num_turns - tide_called_turns; + if (tide_called_turns < 1L) + tide_called_turns = 1L; + tide_called_peak = std::min(HIGH_CALLED_TIDE, + int(tide_called_turns * 5)); + tide_caller_pos = tide_caller->pos(); + } + int tide = env.properties[ENVP_SHOALS_TIDE_KEY].get_short(); int acc = env.properties[ENVP_SHOALS_TIDE_VEL].get_short(); const int old_tide = tide; @@ -1042,10 +1104,24 @@ void shoals_apply_tides(int turns_elapsed) _shoals_run_tide(tide, acc); env.properties[ENVP_SHOALS_TIDE_KEY] = short(tide); env.properties[ENVP_SHOALS_TIDE_VEL] = short(acc); - if (old_tide / TIDE_MULTIPLIER != tide / TIDE_MULTIPLIER) + if (force + || tide_caller + || old_tide / TIDE_MULTIPLIER != tide / TIDE_MULTIPLIER) { _shoals_tide_direction = tide > old_tide ? TIDE_RISING : TIDE_FALLING; _shoals_apply_tide(tide / TIDE_MULTIPLIER); } } + +void shoals_release_tide(monsters *mons) +{ + if (player_in_branch(BRANCH_SHOALS) + && player_can_hear(you.pos())) + { + mprf(MSGCH_SOUND, "The tide is released from %s call.", + mons->name(DESC_NOCAP_YOUR, true).c_str()); + flash_view_delay(ETC_WATER, 150); + shoals_apply_tides(0, true); + } +} diff --git a/crawl-ref/source/dgn-shoals.h b/crawl-ref/source/dgn-shoals.h index f558f6606f..1d14c620f2 100644 --- a/crawl-ref/source/dgn-shoals.h +++ b/crawl-ref/source/dgn-shoals.h @@ -3,6 +3,7 @@ void prepare_shoals(int level_number); void shoals_postprocess_level(); -void shoals_apply_tides(int turns_elapsed); +void shoals_apply_tides(int turns_elapsed, bool force = false); +void shoals_release_tide(monsters *caller); #endif diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index 08ae63c36e..f770323cfc 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -1254,6 +1254,7 @@ enum enchant_type ENCH_SPORE_PRODUCTION, // 35 ENCH_SLOUCH, ENCH_SWIFT, + ENCH_TIDE, // Update enchantment names in mon-util.cc when adding or removing // enchantments. @@ -2930,6 +2931,7 @@ enum spell_type SPELL_SUMMON_RAKSHASA, SPELL_SUMMON_PLAYER_GHOST, SPELL_PRIMAL_WAVE, + SPELL_CALL_TIDE, NUM_SPELLS }; diff --git a/crawl-ref/source/main.cc b/crawl-ref/source/main.cc index 7f3ccb2592..1ad6e1af6c 100644 --- a/crawl-ref/source/main.cc +++ b/crawl-ref/source/main.cc @@ -4631,7 +4631,7 @@ static void _compile_time_asserts() COMPILE_CHECK(SP_VAMPIRE == 30 , c3); COMPILE_CHECK(SPELL_DEBUGGING_RAY == 103 , c4); COMPILE_CHECK(SPELL_RETURNING_AMMUNITION == 162 , c5); - COMPILE_CHECK(NUM_SPELLS == 216 , c6); + COMPILE_CHECK(NUM_SPELLS == 217 , c6); //jmf: NEW ASSERTS: we ought to do a *lot* of these COMPILE_CHECK(NUM_SPECIES < SP_UNKNOWN , c7); diff --git a/crawl-ref/source/mon-abil.cc b/crawl-ref/source/mon-abil.cc index 5325d3f27b..781778d6d3 100644 --- a/crawl-ref/source/mon-abil.cc +++ b/crawl-ref/source/mon-abil.cc @@ -303,17 +303,7 @@ static bool _do_merge(monsters *initial_slime, monsters *merge_to) merge_to->name(DESC_NOCAP_A).c_str()); } - flash_view(LIGHTGREEN); - - int flash_delay = 150; - // Scale delay to match change in arena_delay. - if (crawl_state.arena) - { - flash_delay *= Options.arena_delay; - flash_delay /= 600; - } - - delay(flash_delay); + flash_view_delay(LIGHTGREEN, 150); } else if (you.can_see(initial_slime)) mpr("A slime creature suddenly disappears!"); diff --git a/crawl-ref/source/mon-cast.cc b/crawl-ref/source/mon-cast.cc index 42b7b52da5..5190625c61 100644 --- a/crawl-ref/source/mon-cast.cc +++ b/crawl-ref/source/mon-cast.cc @@ -839,6 +839,7 @@ bool setup_mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast, case SPELL_SUMMON_EYEBALLS: case SPELL_SUMMON_BUTTERFLIES: case SPELL_MISLEAD: + case SPELL_CALL_TIDE: return (true); default: if (check_validity) @@ -1678,6 +1679,18 @@ void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast, simple_monster_message(monster, " seems to move somewhat quicker."); return; + case SPELL_CALL_TIDE: + { + const int tide_duration = random_range(18, 50, 2); + monster->add_ench(mon_enchant(ENCH_TIDE, 0, KC_OTHER, + tide_duration * 10)); + monster->props[TIDE_CALL_TURN] = you.num_turns; + simple_monster_message(monster, + " sings a water chant to call the tide!"); + flash_view_delay(ETC_WATER, 300); + return; + } + case SPELL_SUMMON_SMALL_MAMMALS: case SPELL_VAMPIRE_SUMMON: if (spell_cast == SPELL_SUMMON_SMALL_MAMMALS) diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index e5e5fb7b98..6ce2103a22 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -4626,7 +4626,7 @@ static monsterentry mondata[] = { MR_RES_POISON | MR_RES_COLD, 500, 10, MONS_MERFOLK, MONS_MERFOLK, MH_NATURAL, -7, { {AT_HIT, AF_PLAIN, 10}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, - { 9, 0, 0, 54 }, + { 16, 0, 0, 150 }, 5, 18, MST_ILSUIW, CE_CONTAMINATED, Z_NOZOMBIE, S_SHOUT, I_NORMAL, HT_AMPHIBIOUS_WATER, FL_NONE, 10, DEFAULT_ENERGY, MONUSE_WEAPONS_ARMOUR, MONEAT_NOTHING, SIZE_MEDIUM diff --git a/crawl-ref/source/mon-gear.cc b/crawl-ref/source/mon-gear.cc index 393d4680b7..8affc9587f 100644 --- a/crawl-ref/source/mon-gear.cc +++ b/crawl-ref/source/mon-gear.cc @@ -12,6 +12,7 @@ #include "mon-gear.h" #include "artefact.h" +#include "colour.h" #include "dungeon.h" #include "env.h" #include "itemprop.h" @@ -582,6 +583,17 @@ static item_make_species_type _give_weapon(monsters *mon, int level, } break; + case MONS_ILSUIW: + item_race = MAKE_ITEM_NO_RACE; + item.base_type = OBJ_WEAPONS; + item.sub_type = WPN_TRIDENT; + item.special = SPWPN_FREEZING; + item.plus = random_range(-1, 6, 2); + item.plus2 = random_range(-1, 6, 2); + item.colour = ETC_ICE; + force_item = true; + break; + case MONS_MERFOLK_IMPALER: item_race = MAKE_ITEM_NO_RACE; item.base_type = OBJ_WEAPONS; diff --git a/crawl-ref/source/mon-spll.h b/crawl-ref/source/mon-spll.h index 2137cbbacb..344ae8e6b8 100644 --- a/crawl-ref/source/mon-spll.h +++ b/crawl-ref/source/mon-spll.h @@ -1043,8 +1043,8 @@ { MST_ILSUIW, { - SPELL_THROW_FROST, // was: SPELL_CONFUSED (jpeg) - SPELL_SLOW, + SPELL_THROW_ICICLE, + SPELL_CALL_TIDE, SPELL_INVISIBILITY, SPELL_BLINK, SPELL_WATER_ELEMENTALS, @@ -1323,7 +1323,6 @@ { SPELL_PRIMAL_WAVE, SPELL_BOLT_OF_COLD, - // Ice form would be neat. SPELL_THROW_ICICLE, SPELL_NO_SPELL, SPELL_NO_SPELL, diff --git a/crawl-ref/source/mon-stuff.cc b/crawl-ref/source/mon-stuff.cc index 3db902c13b..ca7b9cf12c 100644 --- a/crawl-ref/source/mon-stuff.cc +++ b/crawl-ref/source/mon-stuff.cc @@ -1422,6 +1422,9 @@ int monster_die(monsters *monster, killer_type killer, return (-1); } + // If the monster was calling the tide, let go now. + monster->del_ench(ENCH_TIDE); + crawl_state.inc_mon_acting(monster); ASSERT(!( YOU_KILL(killer) && crawl_state.arena )); diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 3687e1711c..5895a0c542 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -2390,6 +2390,13 @@ bool ms_waste_of_time( const monsters *mon, spell_type monspell ) // handled here as well. - bwr switch (monspell) { + case SPELL_CALL_TIDE: + return (!player_in_branch(BRANCH_SHOALS) + || mon->has_ench(ENCH_TIDE) + || !foe + || (grd(mon->pos()) == DNGN_DEEP_WATER + && grd(foe->pos()) == DNGN_DEEP_WATER)); + case SPELL_BRAIN_FEED: ret = (foe != &you); break; diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index f6003c3b81..2f83c01d6f 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -12,6 +12,7 @@ #include "coordit.h" #include "delay.h" #include "dgnevent.h" +#include "dgn-shoals.h" #include "directn.h" #include "env.h" #include "fight.h" @@ -4305,6 +4306,10 @@ void monsters::remove_enchantment_effect(const mon_enchant &me, bool quiet) { switch (me.ench) { + case ENCH_TIDE: + shoals_release_tide(this); + break; + case ENCH_BERSERK: scale_hp(2, 3); break; @@ -6031,7 +6036,7 @@ static const char *enchant_names[] = "short-lived", "paralysis", "sick", "sleep", "fatigue", "held", "blood-lust", "neutral", "petrifying", "petrified", "magic-vulnerable", "soul-ripe", "decay", "hungry", "flopping", "spore-producing", - "downtrodden", "swift", "bug" + "downtrodden", "swift", "tide", "bug" }; static const char *_mons_enchantment_name(enchant_type ench) diff --git a/crawl-ref/source/monster.h b/crawl-ref/source/monster.h index 16ec367332..b93ed65571 100644 --- a/crawl-ref/source/monster.h +++ b/crawl-ref/source/monster.h @@ -4,6 +4,7 @@ #include "actor.h" const int KRAKEN_TENTACLE_RANGE = 3; +#define TIDE_CALL_TURN "tide-call-turn" class mon_enchant { diff --git a/crawl-ref/source/spl-data.h b/crawl-ref/source/spl-data.h index 6a62b9ed09..db5979a031 100644 --- a/crawl-ref/source/spl-data.h +++ b/crawl-ref/source/spl-data.h @@ -2654,6 +2654,18 @@ false }, +{ + SPELL_CALL_TIDE, "Call Tide", + SPTYP_TRANSLOCATION, + SPFLAG_MONSTER, + 7, + 0, + -1, -1, + 0, + NULL, + false, + false +}, { SPELL_NO_SPELL, "nonexistent spell", diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc index b8e6447a89..94ad2a572c 100644 --- a/crawl-ref/source/view.cc +++ b/crawl-ref/source/view.cc @@ -635,6 +635,19 @@ void flash_view(int colour) viewwindow(false, false); } +void flash_view_delay(int colour, long flash_delay) +{ + flash_view(colour); + // Scale delay to match change in arena_delay. + if (crawl_state.arena) + { + flash_delay *= Options.arena_delay; + flash_delay /= 600; + } + + delay(flash_delay); +} + static void _debug_pane_bounds() { #if DEBUG_PANE_BOUNDS diff --git a/crawl-ref/source/view.h b/crawl-ref/source/view.h index 7a618c182b..70029c000d 100644 --- a/crawl-ref/source/view.h +++ b/crawl-ref/source/view.h @@ -37,6 +37,7 @@ std::string screenshot(bool fullscreen = false); bool view_update(); void view_update_at(const coord_def &pos); void flash_view(int colour = BLACK); // inside #ifndef USE_TILE? +void flash_view_delay(int colour = BLACK, long delay = 150); #ifndef USE_TILE void flash_monster_colour(const monsters *mon, unsigned char fmc_colour, int fmc_delay); -- cgit v1.2.3-54-g00ecf From 225b0e70b831304bdeb50cc9f123819dc9a2b6bc Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Tue, 29 Dec 2009 20:03:35 +0530 Subject: Weaken merfolk impalers and javelineers, give sirens and mermaids extra hp, and sirens extra HD, remove ettin and sheep from Shoals. --- crawl-ref/source/mon-data.h | 12 ++++++------ crawl-ref/source/mon-pick.cc | 4 ---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index 6ce2103a22..0db6c4e927 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -1123,8 +1123,8 @@ static monsterentry mondata[] = { M_WARM_BLOOD, MR_NO_FLAGS, 500, 10, MONS_MERFOLK, MONS_MERFOLK, MH_NATURAL, -3, - { {AT_HIT, AF_PLAIN, 40}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, - { 16, 5, 3, 0 }, + { {AT_HIT, AF_PLAIN, 34}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, + { 16, 4, 3, 0 }, // Impalers prefer light armour, and are dodging experts. 0, 23, MST_NO_SPELLS, CE_CONTAMINATED, Z_SMALL, S_SHOUT, I_NORMAL, HT_AMPHIBIOUS_WATER, FL_NONE, 10, ATTACK_ENERGY(6), @@ -1136,8 +1136,8 @@ static monsterentry mondata[] = { M_WARM_BLOOD | M_ARCHER, MR_NO_FLAGS, 500, 10, MONS_MERFOLK, MONS_MERFOLK, MH_NATURAL, -4, - { {AT_SHOOT, AF_PLAIN, 18}, {AT_HIT, AF_PLAIN, 20}, AT_NO_ATK, AT_NO_ATK }, - { 16, 4, 2, 0 }, + { {AT_SHOOT, AF_PLAIN, 16}, {AT_HIT, AF_PLAIN, 20}, AT_NO_ATK, AT_NO_ATK }, + { 15, 4, 2, 0 }, 0, 15, MST_NO_SPELLS, CE_CONTAMINATED, Z_SMALL, S_SHOUT, I_NORMAL, HT_AMPHIBIOUS_WATER, FL_NONE, 10, MISSILE_ENERGY(8), MONUSE_MAGIC_ITEMS, MONEAT_NOTHING, SIZE_MEDIUM @@ -1161,7 +1161,7 @@ static monsterentry mondata[] = { MR_NO_FLAGS, 500, 10, MONS_MERMAID, MONS_MERMAID, MH_NATURAL, -5, { {AT_HIT, AF_PLAIN, 10}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, - { 8, 2, 3, 0 }, + { 8, 3, 3, 0 }, 4, 12, MST_NO_SPELLS, CE_CONTAMINATED, Z_SMALL, S_SHOUT, I_NORMAL, HT_AMPHIBIOUS_WATER, FL_NONE, 10, DEFAULT_ENERGY, MONUSE_WEAPONS_ARMOUR, MONEAT_NOTHING, SIZE_MEDIUM @@ -1173,7 +1173,7 @@ static monsterentry mondata[] = { MR_NO_FLAGS, 500, 12, MONS_MERMAID, MONS_SIREN, MH_NATURAL, -7, { {AT_HIT, AF_PLAIN, 10}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, - { 8, 2, 3, 0 }, + { 13, 5, 3, 0 }, 4, 12, MST_NO_SPELLS, CE_CONTAMINATED, Z_SMALL, S_SHOUT, I_NORMAL, HT_AMPHIBIOUS_WATER, FL_NONE, 10, DEFAULT_ENERGY, MONUSE_WEAPONS_ARMOUR, MONEAT_NOTHING, SIZE_MEDIUM diff --git a/crawl-ref/source/mon-pick.cc b/crawl-ref/source/mon-pick.cc index edcb9a5ec7..091650e0a0 100644 --- a/crawl-ref/source/mon-pick.cc +++ b/crawl-ref/source/mon-pick.cc @@ -1706,8 +1706,6 @@ int mons_shoals_level(int mcls) case MONS_MERFOLK: case MONS_MERMAID: case MONS_CENTAUR: - case MONS_ETTIN: - case MONS_SHEEP: case MONS_HIPPOGRIFF: mlev++; break; @@ -1751,8 +1749,6 @@ int mons_shoals_rare(int mcls) case MONS_PLANT: return 150; - case MONS_ETTIN: - case MONS_SHEEP: case MONS_MERFOLK: return 50; -- cgit v1.2.3-54-g00ecf From 8efdaf11a28299dda120a8afe78702686a6e2a47 Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Tue, 29 Dec 2009 20:14:23 +0530 Subject: Give Ilsuiw a more interesting band. --- crawl-ref/source/mon-place.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/crawl-ref/source/mon-place.cc b/crawl-ref/source/mon-place.cc index 27b6c8fe20..cb54b20982 100644 --- a/crawl-ref/source/mon-place.cc +++ b/crawl-ref/source/mon-place.cc @@ -598,7 +598,7 @@ static monster_type _resolve_monster_type(monster_type mon_type, mon_type = MONS_DANCING_WEAPON; else { - if (you.level_type == LEVEL_PORTAL_VAULT + if (you.level_type == LEVEL_PORTAL_VAULT && vault_mon_types.size() > 0) { int i = choose_random_weighted(vault_mon_weights.begin(), @@ -636,7 +636,7 @@ static monster_type _resolve_monster_type(monster_type mon_type, } else if (you.level_type == LEVEL_PORTAL_VAULT) { - // XXX: We don't have a random monster list here, so pick one + // XXX: We don't have a random monster list here, so pick one // from where we were. place.level_type = LEVEL_DUNGEON; *lev_mons = place.absdepth(); @@ -2401,7 +2401,12 @@ static monster_type _band_member(band_type band, int power) break; } case BAND_ILSUIW: - mon_type = coinflip()? MONS_MERFOLK : MONS_MERMAID; + mon_type = static_cast( + random_choose_weighted(30, MONS_MERMAID, + 15, MONS_MERFOLK, + 10, MONS_MERFOLK_JAVELINEER, + 10, MONS_MERFOLK_IMPALER, + 0)); break; case BAND_AZRAEL: -- cgit v1.2.3-54-g00ecf From 7152c75c893858061d13bf55f96d1c1f4ca416c5 Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Tue, 29 Dec 2009 23:32:59 +0530 Subject: Change aquamancer -> green, Ilsuiw -> lightgreen, remove aquamancer cold res. (Ero) --- crawl-ref/source/mon-data.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index 9460407bf2..6736603b5d 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -1144,9 +1144,9 @@ static monsterentry mondata[] = { }, { - MONS_MERFOLK_AQUAMANCER, 'm', LIGHTGREEN, "merfolk aquamancer", + MONS_MERFOLK_AQUAMANCER, 'm', GREEN, "merfolk aquamancer", M_WARM_BLOOD | M_SPELLCASTER | M_ACTUAL_SPELLS, - MR_RES_COLD, + MR_NO_FLAGS, 500, 10, MONS_MERFOLK, MONS_MERFOLK, MH_NATURAL, -4, { {AT_HIT, AF_PLAIN, 15}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, { 15, 3, 3, 0 }, @@ -4621,7 +4621,7 @@ static monsterentry mondata[] = { }, { - MONS_ILSUIW, 'm', GREEN, "Ilsuiw", + MONS_ILSUIW, 'm', LIGHTGREEN, "Ilsuiw", M_UNIQUE | M_WARM_BLOOD | M_SPELLCASTER | M_ACTUAL_SPELLS | M_SPEAKS, MR_NO_FLAGS, 500, 10, MONS_MERFOLK, MONS_MERFOLK, MH_NATURAL, -7, -- cgit v1.2.3-54-g00ecf From 0822d05b5a0597c3521a9440997e37b217b2cdb0 Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Wed, 30 Dec 2009 00:29:14 +0530 Subject: Add extra check to prevent Ilsuiw using call tide outside Shoals. --- crawl-ref/source/mon-cast.cc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/crawl-ref/source/mon-cast.cc b/crawl-ref/source/mon-cast.cc index 5190625c61..895466f322 100644 --- a/crawl-ref/source/mon-cast.cc +++ b/crawl-ref/source/mon-cast.cc @@ -1680,16 +1680,17 @@ void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast, return; case SPELL_CALL_TIDE: - { - const int tide_duration = random_range(18, 50, 2); - monster->add_ench(mon_enchant(ENCH_TIDE, 0, KC_OTHER, - tide_duration * 10)); - monster->props[TIDE_CALL_TURN] = you.num_turns; - simple_monster_message(monster, - " sings a water chant to call the tide!"); - flash_view_delay(ETC_WATER, 300); + if (player_in_branch(BRANCH_SHOALS)) + { + const int tide_duration = random_range(18, 50, 2); + monster->add_ench(mon_enchant(ENCH_TIDE, 0, KC_OTHER, + tide_duration * 10)); + monster->props[TIDE_CALL_TURN] = you.num_turns; + simple_monster_message(monster, + " sings a water chant to call the tide!"); + flash_view_delay(ETC_WATER, 300); + } return; - } case SPELL_SUMMON_SMALL_MAMMALS: case SPELL_VAMPIRE_SUMMON: -- cgit v1.2.3-54-g00ecf From 884a020ab85f131212638b07913f9ec749c9ecb2 Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Wed, 30 Dec 2009 00:35:33 +0530 Subject: More call tide fixes: don't flash view if Ilsuiw is not in LOS, apply tide reset even if the player is not messaged about it. --- crawl-ref/source/dgn-shoals.cc | 13 ++++++++----- crawl-ref/source/mon-cast.cc | 9 ++++++--- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/crawl-ref/source/dgn-shoals.cc b/crawl-ref/source/dgn-shoals.cc index b91dc3a195..f48a146266 100644 --- a/crawl-ref/source/dgn-shoals.cc +++ b/crawl-ref/source/dgn-shoals.cc @@ -1116,12 +1116,15 @@ void shoals_apply_tides(int turns_elapsed, bool force) void shoals_release_tide(monsters *mons) { - if (player_in_branch(BRANCH_SHOALS) - && player_can_hear(you.pos())) + if (player_in_branch(BRANCH_SHOALS)) { - mprf(MSGCH_SOUND, "The tide is released from %s call.", - mons->name(DESC_NOCAP_YOUR, true).c_str()); - flash_view_delay(ETC_WATER, 150); + if (player_can_hear(mons->pos())) + { + mprf(MSGCH_SOUND, "The tide is released from %s call.", + mons->name(DESC_NOCAP_YOUR, true).c_str()); + if (you.see_cell(mons->pos())) + flash_view_delay(ETC_WATER, 150); + } shoals_apply_tides(0, true); } } diff --git a/crawl-ref/source/mon-cast.cc b/crawl-ref/source/mon-cast.cc index 895466f322..fb9b5092d4 100644 --- a/crawl-ref/source/mon-cast.cc +++ b/crawl-ref/source/mon-cast.cc @@ -1686,9 +1686,12 @@ void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast, monster->add_ench(mon_enchant(ENCH_TIDE, 0, KC_OTHER, tide_duration * 10)); monster->props[TIDE_CALL_TURN] = you.num_turns; - simple_monster_message(monster, - " sings a water chant to call the tide!"); - flash_view_delay(ETC_WATER, 300); + if (simple_monster_message( + monster, + " sings a water chant to call the tide!")) + { + flash_view_delay(ETC_WATER, 300); + } } return; -- cgit v1.2.3-54-g00ecf From 846946afdb8c45bf6490f778fedc3ac8937f145f Mon Sep 17 00:00:00 2001 From: Johanna Ploog Date: Tue, 29 Dec 2009 23:32:18 +0100 Subject: Cleanup animated statues' weapon overlays. --- .../source/rltiles/dc-mon/statues/overlay_axe.png | Bin 1026 -> 992 bytes .../source/rltiles/dc-mon/statues/overlay_bow.png | Bin 999 -> 946 bytes .../rltiles/dc-mon/statues/overlay_crossbow.png | Bin 1093 -> 1058 bytes .../source/rltiles/dc-mon/statues/overlay_mace.png | Bin 981 -> 946 bytes .../source/rltiles/dc-mon/statues/overlay_mage.png | Bin 985 -> 939 bytes .../source/rltiles/dc-mon/statues/overlay_scythe.png | Bin 989 -> 950 bytes .../source/rltiles/dc-mon/statues/overlay_sword.png | Bin 1021 -> 966 bytes 7 files changed, 0 insertions(+), 0 deletions(-) diff --git a/crawl-ref/source/rltiles/dc-mon/statues/overlay_axe.png b/crawl-ref/source/rltiles/dc-mon/statues/overlay_axe.png index 1dcb1f1574..51138c7992 100644 Binary files a/crawl-ref/source/rltiles/dc-mon/statues/overlay_axe.png and b/crawl-ref/source/rltiles/dc-mon/statues/overlay_axe.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/statues/overlay_bow.png b/crawl-ref/source/rltiles/dc-mon/statues/overlay_bow.png index 4710c7d683..a674ae87dc 100644 Binary files a/crawl-ref/source/rltiles/dc-mon/statues/overlay_bow.png and b/crawl-ref/source/rltiles/dc-mon/statues/overlay_bow.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/statues/overlay_crossbow.png b/crawl-ref/source/rltiles/dc-mon/statues/overlay_crossbow.png index 3f78ae7af0..d65db57370 100644 Binary files a/crawl-ref/source/rltiles/dc-mon/statues/overlay_crossbow.png and b/crawl-ref/source/rltiles/dc-mon/statues/overlay_crossbow.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/statues/overlay_mace.png b/crawl-ref/source/rltiles/dc-mon/statues/overlay_mace.png index 12a2fb2486..7555ff46c1 100644 Binary files a/crawl-ref/source/rltiles/dc-mon/statues/overlay_mace.png and b/crawl-ref/source/rltiles/dc-mon/statues/overlay_mace.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/statues/overlay_mage.png b/crawl-ref/source/rltiles/dc-mon/statues/overlay_mage.png index ab1533abbb..aa26b5b556 100644 Binary files a/crawl-ref/source/rltiles/dc-mon/statues/overlay_mage.png and b/crawl-ref/source/rltiles/dc-mon/statues/overlay_mage.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/statues/overlay_scythe.png b/crawl-ref/source/rltiles/dc-mon/statues/overlay_scythe.png index 671280385d..bb2f7df127 100644 Binary files a/crawl-ref/source/rltiles/dc-mon/statues/overlay_scythe.png and b/crawl-ref/source/rltiles/dc-mon/statues/overlay_scythe.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/statues/overlay_sword.png b/crawl-ref/source/rltiles/dc-mon/statues/overlay_sword.png index b0ea9caaae..6b6e8050de 100644 Binary files a/crawl-ref/source/rltiles/dc-mon/statues/overlay_sword.png and b/crawl-ref/source/rltiles/dc-mon/statues/overlay_sword.png differ -- cgit v1.2.3-54-g00ecf From 48586bbe934e4f37601b90a5b1b8427a6998b67a Mon Sep 17 00:00:00 2001 From: Johanna Ploog Date: Tue, 29 Dec 2009 23:33:20 +0100 Subject: Add a mage statue overlay including a wizard hat. --- .../source/rltiles/dc-mon/statues/overlay_mage_hat.png | Bin 0 -> 975 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 crawl-ref/source/rltiles/dc-mon/statues/overlay_mage_hat.png diff --git a/crawl-ref/source/rltiles/dc-mon/statues/overlay_mage_hat.png b/crawl-ref/source/rltiles/dc-mon/statues/overlay_mage_hat.png new file mode 100644 index 0000000000..d9960f0db0 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/statues/overlay_mage_hat.png differ -- cgit v1.2.3-54-g00ecf From c33c77fcd7ce9820640cf5e4e4905321d1bd9ca7 Mon Sep 17 00:00:00 2001 From: Johanna Ploog Date: Tue, 29 Dec 2009 23:33:50 +0100 Subject: And use it for the non-vinecovered statue tiles. Looks really odd on the recoloured ones. --- crawl-ref/source/rltiles/dc-mon.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crawl-ref/source/rltiles/dc-mon.txt b/crawl-ref/source/rltiles/dc-mon.txt index 2ecaf85b16..b4c3dd3e2c 100644 --- a/crawl-ref/source/rltiles/dc-mon.txt +++ b/crawl-ref/source/rltiles/dc-mon.txt @@ -293,7 +293,7 @@ overlay_axe MONS_STATUE_AXE overlay_bow MONS_STATUE_ARCHER overlay_crossbow MONS_STATUE_CROSSBOW overlay_mace MONS_STATUE_MACE -overlay_mage MONS_STATUE_MAGE +overlay_mage_hat MONS_STATUE_MAGE overlay_scythe MONS_STATUE_SCYTHE overlay_sword MONS_STATUE_SWORD %back none -- cgit v1.2.3-54-g00ecf From fe24d203fafbdbba479f6f86a9d71fa50bdcab61 Mon Sep 17 00:00:00 2001 From: Johanna Ploog Date: Tue, 29 Dec 2009 23:35:39 +0100 Subject: Remove the statue tiles predating the weapon overlays. --- .../source/rltiles/dc-mon/statues/statue_archer.png | Bin 996 -> 0 bytes crawl-ref/source/rltiles/dc-mon/statues/statue_axe.png | Bin 1026 -> 0 bytes .../source/rltiles/dc-mon/statues/statue_crossbow.png | Bin 1104 -> 0 bytes crawl-ref/source/rltiles/dc-mon/statues/statue_mace.png | Bin 979 -> 0 bytes crawl-ref/source/rltiles/dc-mon/statues/statue_mage.png | Bin 975 -> 0 bytes .../source/rltiles/dc-mon/statues/statue_scythe.png | Bin 1008 -> 0 bytes crawl-ref/source/rltiles/dc-mon/statues/statue_sword.png | Bin 993 -> 0 bytes 7 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 crawl-ref/source/rltiles/dc-mon/statues/statue_archer.png delete mode 100644 crawl-ref/source/rltiles/dc-mon/statues/statue_axe.png delete mode 100644 crawl-ref/source/rltiles/dc-mon/statues/statue_crossbow.png delete mode 100644 crawl-ref/source/rltiles/dc-mon/statues/statue_mace.png delete mode 100644 crawl-ref/source/rltiles/dc-mon/statues/statue_mage.png delete mode 100644 crawl-ref/source/rltiles/dc-mon/statues/statue_scythe.png delete mode 100644 crawl-ref/source/rltiles/dc-mon/statues/statue_sword.png diff --git a/crawl-ref/source/rltiles/dc-mon/statues/statue_archer.png b/crawl-ref/source/rltiles/dc-mon/statues/statue_archer.png deleted file mode 100644 index 0358366f7c..0000000000 Binary files a/crawl-ref/source/rltiles/dc-mon/statues/statue_archer.png and /dev/null differ diff --git a/crawl-ref/source/rltiles/dc-mon/statues/statue_axe.png b/crawl-ref/source/rltiles/dc-mon/statues/statue_axe.png deleted file mode 100644 index 795928ef22..0000000000 Binary files a/crawl-ref/source/rltiles/dc-mon/statues/statue_axe.png and /dev/null differ diff --git a/crawl-ref/source/rltiles/dc-mon/statues/statue_crossbow.png b/crawl-ref/source/rltiles/dc-mon/statues/statue_crossbow.png deleted file mode 100644 index 80fa73380d..0000000000 Binary files a/crawl-ref/source/rltiles/dc-mon/statues/statue_crossbow.png and /dev/null differ diff --git a/crawl-ref/source/rltiles/dc-mon/statues/statue_mace.png b/crawl-ref/source/rltiles/dc-mon/statues/statue_mace.png deleted file mode 100644 index c74efdd79e..0000000000 Binary files a/crawl-ref/source/rltiles/dc-mon/statues/statue_mace.png and /dev/null differ diff --git a/crawl-ref/source/rltiles/dc-mon/statues/statue_mage.png b/crawl-ref/source/rltiles/dc-mon/statues/statue_mage.png deleted file mode 100644 index bc709937e2..0000000000 Binary files a/crawl-ref/source/rltiles/dc-mon/statues/statue_mage.png and /dev/null differ diff --git a/crawl-ref/source/rltiles/dc-mon/statues/statue_scythe.png b/crawl-ref/source/rltiles/dc-mon/statues/statue_scythe.png deleted file mode 100644 index 19ab6410ce..0000000000 Binary files a/crawl-ref/source/rltiles/dc-mon/statues/statue_scythe.png and /dev/null differ diff --git a/crawl-ref/source/rltiles/dc-mon/statues/statue_sword.png b/crawl-ref/source/rltiles/dc-mon/statues/statue_sword.png deleted file mode 100644 index 6a8c005184..0000000000 Binary files a/crawl-ref/source/rltiles/dc-mon/statues/statue_sword.png and /dev/null differ -- cgit v1.2.3-54-g00ecf From 91adc427383b9284af5f2347a6e50c81ed3db00c Mon Sep 17 00:00:00 2001 From: Johanna Ploog Date: Tue, 29 Dec 2009 23:41:59 +0100 Subject: Move the giant spore tile into the fungi_plants subfolder. --- crawl-ref/source/rltiles/dc-mon.txt | 2 ++ .../source/rltiles/dc-mon/fungi_plants/giant_spore.png | Bin 0 -> 602 bytes crawl-ref/source/rltiles/dc-mon/giant_spore.png | Bin 602 -> 0 bytes 3 files changed, 2 insertions(+) create mode 100644 crawl-ref/source/rltiles/dc-mon/fungi_plants/giant_spore.png delete mode 100644 crawl-ref/source/rltiles/dc-mon/giant_spore.png diff --git a/crawl-ref/source/rltiles/dc-mon.txt b/crawl-ref/source/rltiles/dc-mon.txt index b4c3dd3e2c..ed37fd06d6 100644 --- a/crawl-ref/source/rltiles/dc-mon.txt +++ b/crawl-ref/source/rltiles/dc-mon.txt @@ -416,7 +416,9 @@ skeletal_dragon MONS_SKELETAL_DRAGON serpent_of_hell MONS_SERPENT_OF_HELL ## Eyes ('G') +%sdir dc-mon/fungi_plants giant_spore MONS_GIANT_SPORE +%sdir dc-mon giant_eyeball MONS_GIANT_EYEBALL eye_of_draining MONS_EYE_OF_DRAINING giant_orange_brain MONS_GIANT_ORANGE_BRAIN diff --git a/crawl-ref/source/rltiles/dc-mon/fungi_plants/giant_spore.png b/crawl-ref/source/rltiles/dc-mon/fungi_plants/giant_spore.png new file mode 100644 index 0000000000..77c5948737 Binary files /dev/null and b/crawl-ref/source/rltiles/dc-mon/fungi_plants/giant_spore.png differ diff --git a/crawl-ref/source/rltiles/dc-mon/giant_spore.png b/crawl-ref/source/rltiles/dc-mon/giant_spore.png deleted file mode 100644 index 77c5948737..0000000000 Binary files a/crawl-ref/source/rltiles/dc-mon/giant_spore.png and /dev/null differ -- cgit v1.2.3-54-g00ecf From b40563be508e08864722f026bb5154b39135b0c0 Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Wed, 30 Dec 2009 05:40:12 +0530 Subject: Fix grouping of monster names in wizmode &" --- crawl-ref/source/wiz-mon.cc | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/crawl-ref/source/wiz-mon.cc b/crawl-ref/source/wiz-mon.cc index 632b716b54..e237401b5d 100644 --- a/crawl-ref/source/wiz-mon.cc +++ b/crawl-ref/source/wiz-mon.cc @@ -228,6 +228,11 @@ static bool _sort_monster_list(int a, int b) const monsters* m1 = &menv[a]; const monsters* m2 = &menv[b]; + if (m1->alive() != m2->alive()) + return m1->alive(); + else if (!m1->alive()) + return a < b; + if (m1->type == m2->type) { if (!m1->alive() || !m2->alive()) @@ -263,8 +268,16 @@ void debug_list_monsters() std::string prev_name = ""; int count = 0; - for (monster_iterator mi; mi; ++mi) + for (int i = 0; i < MAX_MONSTERS; ++i) { + const int idx = mon_nums[i]; + if (invalid_monster_index(idx)) + continue; + + const monsters *mi(&menv[idx]); + if (!mi->alive()) + continue; + std::string name = mi->name(DESC_PLAIN, true); if (prev_name != name && count > 0) @@ -282,7 +295,7 @@ void debug_list_monsters() count++; prev_name = name; - int exp = exper_value(*mi); + int exp = exper_value(mi); total_exp += exp; if ((mi->flags & (MF_WAS_NEUTRAL | MF_NO_REWARD)) -- cgit v1.2.3-54-g00ecf From d6d6ba04b6d5b6b3d7170f0b49aafde0b9ca9bd6 Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Wed, 30 Dec 2009 06:13:06 +0530 Subject: Give boss merfolk small bands of regular merfolk as lackeys. --- crawl-ref/source/mgen_enum.h | 4 +++- crawl-ref/source/mon-gear.cc | 18 +++++++++++++++++- crawl-ref/source/mon-place.cc | 37 ++++++++++++++++++++++++++++++++++--- crawl-ref/source/mon-place.h | 3 +++ 4 files changed, 57 insertions(+), 5 deletions(-) diff --git a/crawl-ref/source/mgen_enum.h b/crawl-ref/source/mgen_enum.h index 0927e9ae65..d7aee96df8 100644 --- a/crawl-ref/source/mgen_enum.h +++ b/crawl-ref/source/mgen_enum.h @@ -57,6 +57,9 @@ enum band_type BAND_KHUFU, BAND_GOLDEN_EYE, BAND_PIKEL, + BAND_MERFOLK_AQUAMANCER, + BAND_MERFOLK_IMPALER, + BAND_MERFOLK_JAVELINEER, NUM_BANDS // always last }; @@ -99,4 +102,3 @@ enum mgen_flag_type }; #endif - diff --git a/crawl-ref/source/mon-gear.cc b/crawl-ref/source/mon-gear.cc index 8affc9587f..640a875051 100644 --- a/crawl-ref/source/mon-gear.cc +++ b/crawl-ref/source/mon-gear.cc @@ -18,6 +18,8 @@ #include "itemprop.h" #include "items.h" #include "makeitem.h" +#include "mgen_enum.h" +#include "mon-place.h" #include "mon-util.h" #include "random.h" #include "spl-book.h" @@ -630,6 +632,17 @@ static item_make_species_type _give_weapon(monsters *mon, int level, break; case MONS_MERFOLK: + if (active_monster_band == BAND_MERFOLK_IMPALER) + { + item_race = MAKE_ITEM_NO_RACE; + item.base_type = OBJ_WEAPONS; + item.sub_type = random_choose_weighted(10, WPN_SPEAR, + 10, WPN_TRIDENT, + 5, WPN_HALBERD, + 5, WPN_GLAIVE, + 0); + break; + } if (one_chance_in(3)) { item_race = MAKE_ITEM_NO_RACE; @@ -1085,7 +1098,8 @@ static void _give_ammo(monsters *mon, int level, break; case MONS_MERFOLK: - if (!one_chance_in(3)) + if (!one_chance_in(3) + || active_monster_band == BAND_MERFOLK_JAVELINEER) { item_race = MAKE_ITEM_NO_RACE; if (coinflip()) @@ -1099,6 +1113,8 @@ static void _give_ammo(monsters *mon, int level, weap_type = MI_JAVELIN; qty = 3 + random2(6); } + if (active_monster_band == BAND_MERFOLK_JAVELINEER) + break; } if (one_chance_in(6) && !mons_summoned) { diff --git a/crawl-ref/source/mon-place.cc b/crawl-ref/source/mon-place.cc index cb54b20982..63d6524a4c 100644 --- a/crawl-ref/source/mon-place.cc +++ b/crawl-ref/source/mon-place.cc @@ -42,6 +42,8 @@ #include "travel.h" #include "view.h" +band_type active_monster_band = BAND_NO_BAND; + static std::vector vault_mon_types; static std::vector vault_mon_bases; static std::vector vault_mon_weights; @@ -775,6 +777,7 @@ int place_monster(mgen_data mg, bool force_pos) int band_size = 1; bool leader = false; monster_type band_monsters[BIG_BAND]; // band monster types + band_type band = BAND_NO_BAND; band_monsters[0] = mg.cls; // The (very) ugly thing band colour. @@ -785,10 +788,8 @@ int place_monster(mgen_data mg, bool force_pos) #ifdef DEBUG_MON_CREATION mpr("Choose band members...", MSGCH_DIAGNOSTICS); #endif - const band_type band = _choose_band(mg.cls, mg.power, band_size, - leader); + band = _choose_band(mg.cls, mg.power, band_size, leader); band_size++; - for (int i = 1; i < band_size; ++i) { band_monsters[i] = _band_member(band, mg.power); @@ -1006,6 +1007,7 @@ int place_monster(mgen_data mg, bool force_pos) band_template.flags |= MG_BAND_MINION; } + unwind_var current_band(active_monster_band, band); // (5) For each band monster, loop call to place_monster_aux(). for (int i = 1; i < band_size; i++) { @@ -2110,6 +2112,23 @@ static band_type _choose_band(int mon_type, int power, int &band_size, band_size = 4; break; + case MONS_MERFOLK_AQUAMANCER: + natural_leader = true; + band = BAND_MERFOLK_AQUAMANCER; + band_size = random_range(3, 6); + break; + + case MONS_MERFOLK_JAVELINEER: + natural_leader = true; + band = BAND_MERFOLK_JAVELINEER; + band_size = random_range(3, 5); + break; + + case MONS_MERFOLK_IMPALER: + natural_leader = true; + band = BAND_MERFOLK_IMPALER; + band_size = random_range(3, 5); + break; } // end switch if (band != BAND_NO_BAND && band_size == 0) @@ -2429,6 +2448,18 @@ static monster_type _band_member(band_type band, int power) mon_type = MONS_SLAVE; break; + case BAND_MERFOLK_AQUAMANCER: + mon_type = static_cast( + random_choose_weighted(8, MONS_MERFOLK, + 10, MONS_ICE_BEAST, + 0)); + break; + + case BAND_MERFOLK_IMPALER: + case BAND_MERFOLK_JAVELINEER: + mon_type = MONS_MERFOLK; + break; + default: break; } diff --git a/crawl-ref/source/mon-place.h b/crawl-ref/source/mon-place.h index 3512639462..28dc5e413f 100644 --- a/crawl-ref/source/mon-place.h +++ b/crawl-ref/source/mon-place.h @@ -102,4 +102,7 @@ monsters* get_free_monster(); bool can_place_on_trap(int mon_type, trap_type trap); bool mons_airborne(int mcls, int flies, bool paralysed); +// Active monster band may influence gear generation on band followers. +extern band_type active_monster_band; + #endif // MONPLACE_H -- cgit v1.2.3-54-g00ecf From 315f93f92a8dc156d2e652990fefbf1e1019c6b5 Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Wed, 30 Dec 2009 06:29:02 +0530 Subject: Give Shoals huts a guard of shoals monsters, remove plants from Shoals random gen - the terrain builder will place lots of plants as scenery anyway. --- crawl-ref/source/dat/shoals.des | 20 ++++++++++---------- crawl-ref/source/mon-pick.cc | 4 ---- crawl-ref/source/mon-place.cc | 2 +- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/crawl-ref/source/dat/shoals.des b/crawl-ref/source/dat/shoals.des index 2b52eb6ade..e924b792f3 100644 --- a/crawl-ref/source/dat/shoals.des +++ b/crawl-ref/source/dat/shoals.des @@ -244,11 +244,11 @@ SUBST: A:x, B:x, C:x=, D=+ LROCKTILE: wall_vines MAP xxCxx -xx...xx -x.....x -B..O..D -x.....x -xx...xx +xx.1.xx +x.1.1.x +B1.O.1D +x.1.1.x +xx.1.xx xxAxx ENDMAP @@ -263,10 +263,10 @@ SHUFFLE: ABCD SUBST: A:x, B:x, C:x=, D=+ MAP xxCxx -xx...xx -x.....x -B..|..D -x.....x -xx...xx +xx.1.xx +x.1.1.x +B1.|.1D +x.1.1.x +xx.1.xx xxAxx ENDMAP diff --git a/crawl-ref/source/mon-pick.cc b/crawl-ref/source/mon-pick.cc index 091650e0a0..7692517c68 100644 --- a/crawl-ref/source/mon-pick.cc +++ b/crawl-ref/source/mon-pick.cc @@ -1699,7 +1699,6 @@ int mons_shoals_level(int mcls) switch (mcls) { case MONS_BUTTERFLY: - case MONS_PLANT: case MONS_GIANT_BAT: break; @@ -1746,9 +1745,6 @@ int mons_shoals_rare(int mcls) { switch (mcls) { - case MONS_PLANT: - return 150; - case MONS_MERFOLK: return 50; diff --git a/crawl-ref/source/mon-place.cc b/crawl-ref/source/mon-place.cc index 63d6524a4c..dc5c47ba00 100644 --- a/crawl-ref/source/mon-place.cc +++ b/crawl-ref/source/mon-place.cc @@ -770,7 +770,7 @@ int place_monster(mgen_data mg, bool force_pos) mg.pos, mg.map_mask, &stair_type, &mg.power); - if (mg.cls == MONS_NO_MONSTER) + if (mg.cls == MONS_NO_MONSTER || mg.cls == MONS_PROGRAM_BUG) return (-1); // (3) Decide on banding (good lord!) -- cgit v1.2.3-54-g00ecf From 456c88a32cdf9080e07cc8007cc558c6e4a3812a Mon Sep 17 00:00:00 2001 From: Steven Noonan Date: Tue, 29 Dec 2009 14:05:06 -0800 Subject: store.{cc,h}: remove pointless special case for MSVC The version currently in use by TARGET_COMPILER_VC only works on GCC, Clang, and MSVC. Why use the other one? Even an objdump output shows there's no difference between the two, except in terms of function naming: --- store.byref.D 2009-12-29 13:59:36.364840900 -0800 +++ store.byval.D 2009-12-29 14:04:29.313840690 -0800 @@ -712,32 +712,32 @@ 57b: 48 03 42 08 add 0x8(%rdx),%rax 57f: c3 retq -0000000000000580 : - 580: e9 00 00 00 00 jmpq 585 +0000000000000580 : + 580: e9 00 00 00 00 jmpq 585 585: 90 nop 586: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 58d: 00 00 00 -0000000000000590 : - 590: e9 00 00 00 00 jmpq 595 +0000000000000590 : + 590: e9 00 00 00 00 jmpq 595 595: 90 nop 596: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 59d: 00 00 00 -00000000000005a0 : - 5a0: e9 00 00 00 00 jmpq 5a5 +00000000000005a0 : + 5a0: e9 00 00 00 00 jmpq 5a5 5a5: 90 nop 5a6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 5ad: 00 00 00 -00000000000005b0 : - 5b0: e9 00 00 00 00 jmpq 5b5 +00000000000005b0 : + 5b0: e9 00 00 00 00 jmpq 5b5 5b5: 90 nop 5b6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 5bd: 00 00 00 -00000000000005c0 : - 5c0: e9 00 00 00 00 jmpq 5c5 +00000000000005c0 : + 5c0: e9 00 00 00 00 jmpq 5c5 5c5: 90 nop 5c6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 5cd: 00 00 00 @@ -1863,8 +1863,8 @@ 1324: 66 66 66 2e 0f 1f 84 nopw %cs:0x0(%rax,%rax,1) 132b: 00 00 00 00 00 -0000000000001330 : - 1330: e9 00 00 00 00 jmpq 1335 +0000000000001330 : + 1330: e9 00 00 00 00 jmpq 1335 1335: 90 nop 1336: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 133d: 00 00 00 @@ -1982,8 +1982,8 @@ 14bb: 90 nop 14bc: 0f 1f 40 00 nopl 0x0(%rax) -00000000000014c0 : - 14c0: e9 00 00 00 00 jmpq 14c5 +00000000000014c0 : + 14c0: e9 00 00 00 00 jmpq 14c5 14c5: 90 nop 14c6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 14cd: 00 00 00 @@ -2090,8 +2090,8 @@ 1612: 66 66 66 66 66 2e 0f nopw %cs:0x0(%rax,%rax,1) 1619: 1f 84 00 00 00 00 00 -0000000000001620 : - 1620: e9 00 00 00 00 jmpq 1625 +0000000000001620 : + 1620: e9 00 00 00 00 jmpq 1625 1625: 90 nop 1626: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 162d: 00 00 00 @@ -2329,8 +2329,8 @@ 1919: 90 nop 191a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) -0000000000001920 : - 1920: e9 00 00 00 00 jmpq 1925 +0000000000001920 : + 1920: e9 00 00 00 00 jmpq 1925 1925: 90 nop 1926: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 192d: 00 00 00 @@ -2423,8 +2423,8 @@ 1a56: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 1a5d: 00 00 00 -0000000000001a60 : - 1a60: e9 00 00 00 00 jmpq 1a65 +0000000000001a60 : + 1a60: e9 00 00 00 00 jmpq 1a65 1a65: 90 nop 1a66: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 1a6d: 00 00 00 @@ -2566,8 +2566,8 @@ 1c36: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 1c3d: 00 00 00 -0000000000001c40 : - 1c40: e9 00 00 00 00 jmpq 1c45 +0000000000001c40 : + 1c40: e9 00 00 00 00 jmpq 1c45 1c45: 90 nop 1c46: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 1c4d: 00 00 00 @@ -2825,8 +2825,8 @@ 1fed: 90 nop 1fee: 66 90 xchg %ax,%ax -0000000000001ff0 : - 1ff0: e9 00 00 00 00 jmpq 1ff5 +0000000000001ff0 : + 1ff0: e9 00 00 00 00 jmpq 1ff5 1ff5: 90 nop 1ff6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 1ffd: 00 00 00 @@ -2979,8 +2979,8 @@ 2206: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 220d: 00 00 00 -0000000000002210 : - 2210: e9 00 00 00 00 jmpq 2215 +0000000000002210 : + 2210: e9 00 00 00 00 jmpq 2215 2215: 90 nop 2216: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 221d: 00 00 00 @@ -3120,8 +3120,8 @@ 2448: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) 244f: 00 -0000000000002450 : - 2450: e9 00 00 00 00 jmpq 2455 +0000000000002450 : + 2450: e9 00 00 00 00 jmpq 2455 2455: 90 nop 2456: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 245d: 00 00 00 The only difference is that the non-TARGET_COMPILER_VC version breaks non-GCC compilers. Signed-off-by: Steven Noonan --- crawl-ref/source/store.cc | 76 ++--------------------------------------------- crawl-ref/source/store.h | 17 ----------- 2 files changed, 2 insertions(+), 91 deletions(-) diff --git a/crawl-ref/source/store.cc b/crawl-ref/source/store.cc index df8f5b345c..a4afaece9f 100644 --- a/crawl-ref/source/store.cc +++ b/crawl-ref/source/store.cc @@ -951,7 +951,6 @@ const CrawlStoreValue &CrawlStoreValue::operator ///////////////////// // Typecast operators -#ifdef TARGET_COMPILER_VC CrawlStoreValue::operator bool&() { return get_bool(); } CrawlStoreValue::operator char&() { return get_byte(); } CrawlStoreValue::operator short&() { return get_short(); } @@ -964,79 +963,8 @@ CrawlStoreValue::operator CrawlVector&() { return get_vector(); } CrawlStoreValue::operator item_def&() { return get_item(); } CrawlStoreValue::operator level_id&() { return get_level_id(); } CrawlStoreValue::operator level_pos&() { return get_level_pos(); } -CrawlStoreValue::operator monster&() { return get_monster(); } -CrawlStoreValue::operator dlua_chunk&() { return get_dlua_chunk(); } -#else -&CrawlStoreValue::operator bool() -{ - return get_bool(); -} - -&CrawlStoreValue::operator char() -{ - return get_byte(); -} - -&CrawlStoreValue::operator short() -{ - return get_short(); -} - -&CrawlStoreValue::operator float() -{ - return get_float(); -} - -&CrawlStoreValue::operator long() -{ - return get_long(); -} - -&CrawlStoreValue::operator std::string() -{ - return get_string(); -} - -&CrawlStoreValue::operator coord_def() -{ - return get_coord(); -} - -&CrawlStoreValue::operator CrawlHashTable() -{ - return get_table(); -} - -&CrawlStoreValue::operator CrawlVector() -{ - return get_vector(); -} - -&CrawlStoreValue::operator item_def() -{ - return get_item(); -} - -&CrawlStoreValue::operator level_id() -{ - return get_level_id(); -} - -&CrawlStoreValue::operator level_pos() -{ - return get_level_pos(); -} - -&CrawlStoreValue::operator monsters() -{ - return get_monster(); -} - -&CrawlStoreValue::operator dlua_chunk() -{ - return get_lua(); -} -#endif +CrawlStoreValue::operator monsters&() { return get_monster(); } +CrawlStoreValue::operator dlua_chunk&() { return get_lua(); } /////////////////////////// // Const typecast operators diff --git a/crawl-ref/source/store.h b/crawl-ref/source/store.h index 79b9454c97..8a54189cae 100644 --- a/crawl-ref/source/store.h +++ b/crawl-ref/source/store.h @@ -184,7 +184,6 @@ public: const CrawlStoreValue &operator [] (const vec_size &index) const; // Typecast operators -#ifdef TARGET_COMPILER_VC operator bool&(); operator char&(); operator short&(); @@ -199,22 +198,6 @@ public: operator level_pos&(); operator monsters&(); operator dlua_chunk&(); -#else - &operator bool(); - &operator char(); - &operator short(); - &operator long(); - &operator float(); - &operator std::string(); - &operator coord_def(); - &operator CrawlHashTable(); - &operator CrawlVector(); - &operator item_def(); - &operator level_id(); - &operator level_pos(); - &operator monsters(); - &operator dlua_chunk(); -#endif operator bool() const; operator char() const; -- cgit v1.2.3-54-g00ecf From 80cea433b4d6e3b13bbc624f82e2de4e5dfd4360 Mon Sep 17 00:00:00 2001 From: Steven Noonan Date: Tue, 29 Dec 2009 14:15:56 -0800 Subject: message.h: remove superfluous semicolon This blows up on clang++ and pedantic GCC builds. Signed-off-by: Steven Noonan --- crawl-ref/source/message.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crawl-ref/source/message.h b/crawl-ref/source/message.h index 7e878fbc28..8af1f17d7e 100644 --- a/crawl-ref/source/message.h +++ b/crawl-ref/source/message.h @@ -87,7 +87,7 @@ namespace msg { public: mpr_stream_buf(msg_channel_type chan); - virtual ~mpr_stream_buf() {}; + virtual ~mpr_stream_buf() {} void set_param(int p); void set_muted(bool m); protected: -- cgit v1.2.3-54-g00ecf From 2aaee630b73f2556e79aeb37518d98f229909ea3 Mon Sep 17 00:00:00 2001 From: Steven Noonan Date: Tue, 29 Dec 2009 14:16:22 -0800 Subject: headers: fix inconsistent struct/class forward declarations Some classes were erroneously referred to as 'struct' in forward declarations, and vice versa. Signed-off-by: Steven Noonan --- crawl-ref/source/arena.h | 2 +- crawl-ref/source/artefact.h | 2 +- crawl-ref/source/beam.h | 2 +- crawl-ref/source/item_use.h | 2 +- crawl-ref/source/mapdef.h | 2 +- crawl-ref/source/misc.h | 2 +- crawl-ref/source/mon-abil.h | 2 +- crawl-ref/source/mon-cast.h | 2 +- crawl-ref/source/spells2.h | 4 ++-- crawl-ref/source/spells3.h | 2 +- crawl-ref/source/spells4.h | 2 +- crawl-ref/source/spl-util.h | 2 +- crawl-ref/source/view.h | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/crawl-ref/source/arena.h b/crawl-ref/source/arena.h index 619767d841..d79d2f834d 100644 --- a/crawl-ref/source/arena.h +++ b/crawl-ref/source/arena.h @@ -10,7 +10,7 @@ class level_id; class monsters; -class mgen_data; +struct mgen_data; struct coord_def; diff --git a/crawl-ref/source/artefact.h b/crawl-ref/source/artefact.h index 0bc887c647..aec4951dd7 100644 --- a/crawl-ref/source/artefact.h +++ b/crawl-ref/source/artefact.h @@ -10,7 +10,7 @@ #include "externs.h" -class bolt; +struct bolt; // NOTE: NO_UNRANDARTS is automatically set by util/art-data.pl #define NO_UNRANDARTS 82 diff --git a/crawl-ref/source/beam.h b/crawl-ref/source/beam.h index 7c60170f41..d1a47e1a0f 100644 --- a/crawl-ref/source/beam.h +++ b/crawl-ref/source/beam.h @@ -31,7 +31,7 @@ enum mon_resist_type MON_OTHER // monster unaffected, but for other reasons }; -struct dist; +class dist; typedef FixedArray explosion_map; diff --git a/crawl-ref/source/item_use.h b/crawl-ref/source/item_use.h index 8df61d07b6..a76dc3843c 100644 --- a/crawl-ref/source/item_use.h +++ b/crawl-ref/source/item_use.h @@ -39,7 +39,7 @@ enum fire_type }; struct bolt; -struct dist; +class dist; bool armour_prompt(const std::string & mesg, int *index, operation_types oper); diff --git a/crawl-ref/source/mapdef.h b/crawl-ref/source/mapdef.h index 3ef19e0eeb..354109e8a1 100644 --- a/crawl-ref/source/mapdef.h +++ b/crawl-ref/source/mapdef.h @@ -258,7 +258,7 @@ std::string parse_weighted_str(const std::string &cspec, T &list); class map_def; class rectangle_iterator; -class keyed_mapspec; +struct keyed_mapspec; class map_lines { public: diff --git a/crawl-ref/source/misc.h b/crawl-ref/source/misc.h index 9f75955885..9b0eaa47a7 100644 --- a/crawl-ref/source/misc.h +++ b/crawl-ref/source/misc.h @@ -10,7 +10,7 @@ #include "externs.h" struct bolt; -struct dist; +class dist; struct activity_interrupt_data; bool go_berserk(bool intentional); diff --git a/crawl-ref/source/mon-abil.h b/crawl-ref/source/mon-abil.h index 47aee1641a..845b114c49 100644 --- a/crawl-ref/source/mon-abil.h +++ b/crawl-ref/source/mon-abil.h @@ -8,7 +8,7 @@ #define MONABIL_H class monsters; -class bolt; +struct bolt; bool mon_special_ability(monsters *monster, bolt & beem); void mon_nearby_ability(monsters *monster); diff --git a/crawl-ref/source/mon-cast.h b/crawl-ref/source/mon-cast.h index 22629b4f9a..45e87e73c4 100644 --- a/crawl-ref/source/mon-cast.h +++ b/crawl-ref/source/mon-cast.h @@ -10,7 +10,7 @@ #include "enum.h" class monsters; -class bolt; +struct bolt; void init_mons_spells(); bool is_valid_mon_spell(spell_type spell); diff --git a/crawl-ref/source/spells2.h b/crawl-ref/source/spells2.h index 64349079de..83ba485321 100644 --- a/crawl-ref/source/spells2.h +++ b/crawl-ref/source/spells2.h @@ -10,7 +10,7 @@ #include "enum.h" #include "itemprop-enum.h" -struct dist; +class dist; bool brand_weapon(brand_type which_brand, int power); bool brand_ammo(special_missile_type which_brand); @@ -19,7 +19,7 @@ bool burn_freeze(int pow, beam_type flavour, monsters *monster); void corpse_rot(); -struct dist; +class dist; bool vampiric_drain(int pow, const dist &vmove); int detect_creatures(int pow, bool telepathic = false); int detect_items(int pow); diff --git a/crawl-ref/source/spells3.h b/crawl-ref/source/spells3.h index b41a35ae3a..30252963e5 100644 --- a/crawl-ref/source/spells3.h +++ b/crawl-ref/source/spells3.h @@ -10,7 +10,7 @@ #include "itemprop-enum.h" -struct dist; +class dist; struct bolt; bool allow_control_teleport(bool quiet = false); diff --git a/crawl-ref/source/spells4.h b/crawl-ref/source/spells4.h index cd977e3d01..3f6bbbd3ac 100644 --- a/crawl-ref/source/spells4.h +++ b/crawl-ref/source/spells4.h @@ -10,7 +10,7 @@ #include "externs.h" -struct dist; +class dist; struct bolt; bool backlight_monsters(coord_def where, int pow, int garbage); diff --git a/crawl-ref/source/spl-util.h b/crawl-ref/source/spl-util.h index eb44f4db07..a1738c17a9 100644 --- a/crawl-ref/source/spl-util.h +++ b/crawl-ref/source/spl-util.h @@ -32,7 +32,7 @@ enum spschool_flag_type }; struct bolt; -struct dist; +class dist; bool is_valid_spell(spell_type spell); void init_spell_descs(void); diff --git a/crawl-ref/source/view.h b/crawl-ref/source/view.h index 70029c000d..33a525cba2 100644 --- a/crawl-ref/source/view.h +++ b/crawl-ref/source/view.h @@ -25,7 +25,7 @@ bool magic_mapping(int map_radius, int proportion, bool suppress_msg, coord_def origin = coord_def(-1, -1)); void reautomap_level(); -class level_pos; +struct level_pos; void show_map( level_pos &spec_place, bool travel_mode, bool allow_esc = false ); bool is_feature(int feature, const coord_def& where); -- cgit v1.2.3-54-g00ecf From 82c047ea3c235d96a008e5730eabcb12f31a7aec Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Wed, 30 Dec 2009 07:40:45 +0530 Subject: Add a Shoal:$ Ilsuiw minivault to (almost) guarantee her showing up on Shoal:$ if she hasn't already appeared. --- crawl-ref/source/dat/shoals.des | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/crawl-ref/source/dat/shoals.des b/crawl-ref/source/dat/shoals.des index e924b792f3..49b17a232b 100644 --- a/crawl-ref/source/dat/shoals.des +++ b/crawl-ref/source/dat/shoals.des @@ -270,3 +270,23 @@ x.1.1.x xx.1.xx xxAxx ENDMAP + +################################################################################ +# Shoal hangout of Ilsuiw. Using PLACE: makes this quite likely to turn up. +# The hut itself may be empty if Ilsuiw had other engagements. + +NAME: shoal_ilsuiw +PLACE: Shoal:$ +TAGS: water_ok +KMONS: 1 = Ilsuiw band, siren +KMONS: 2 = merfolk impaler / merfolk javelineer +KFEAT: 12 = w +MAP + xxxxx +xxw2wxx +xwwww*x ++ww1w|x +xwwww*x +xxw2wxx + xxxxx +ENDMAP -- cgit v1.2.3-54-g00ecf From 6f40e4499e2e8057d7ff2476faec45d186daadfe Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Wed, 30 Dec 2009 08:24:00 +0530 Subject: Remove shoal decoy huts. The rune huts are now also used as decoys, with the rune replaced by | --- crawl-ref/source/dat/shoals.des | 28 ++++++---------------------- crawl-ref/source/dgn-shoals.cc | 12 ++++++++---- crawl-ref/source/dungeon.cc | 15 +++++++++++---- crawl-ref/source/dungeon.h | 3 ++- 4 files changed, 27 insertions(+), 31 deletions(-) diff --git a/crawl-ref/source/dat/shoals.des b/crawl-ref/source/dat/shoals.des index 49b17a232b..f74c690a93 100644 --- a/crawl-ref/source/dat/shoals.des +++ b/crawl-ref/source/dat/shoals.des @@ -234,11 +234,13 @@ wwwwwwwww ENDMAP ################################################################################ -# Shoal hut with rune inside +# Shoal hut with rune inside. +# +# This hut is also used for the decoy huts, with the rune replaced with a good +# item. # -# Shoal:$ is hand-hacked to force lots of minivaults. NAME: shoalhut_rune -TAGS: shoal_rune water_ok no_dump +TAGS: shoal_rune water_ok no_dump allow_dup SHUFFLE: ABCD SUBST: A:x, B:x, C:x=, D=+ LROCKTILE: wall_vines @@ -252,25 +254,6 @@ xx.1.xx xxAxx ENDMAP -################################################################################ -# Shoal hut with no rune inside -# -# Shoal:$ is hand-hacked to force lots of minivaults. -NAME: shoalhut_norune -DEPTH: Shoal:$ -TAGS: allow_dup water_ok shoal no_dump -SHUFFLE: ABCD -SUBST: A:x, B:x, C:x=, D=+ -MAP - xxCxx -xx.1.xx -x.1.1.x -B1.|.1D -x.1.1.x -xx.1.xx - xxAxx -ENDMAP - ################################################################################ # Shoal hangout of Ilsuiw. Using PLACE: makes this quite likely to turn up. # The hut itself may be empty if Ilsuiw had other engagements. @@ -281,6 +264,7 @@ TAGS: water_ok KMONS: 1 = Ilsuiw band, siren KMONS: 2 = merfolk impaler / merfolk javelineer KFEAT: 12 = w +LROCKTILE: wall_vines MAP xxxxx xxw2wxx diff --git a/crawl-ref/source/dgn-shoals.cc b/crawl-ref/source/dgn-shoals.cc index f48a146266..367ca497d4 100644 --- a/crawl-ref/source/dgn-shoals.cc +++ b/crawl-ref/source/dgn-shoals.cc @@ -407,11 +407,15 @@ static void _shoals_furniture(int margin) const int nhuts = std::min(8, int(_shoals_islands.size())); for (int i = 2; i < nhuts; ++i) { - // Place (non-rune) minivaults on the other islands + // Place (non-rune) minivaults on the other islands. We + // reuse the shoal rune huts, but do not place the rune + // again. + int tries = 5; do - vault = random_map_for_tag("shoal"); - while (!vault); - dgn_place_map(vault, false, true, _pick_shoals_island()); + vault = random_map_for_tag("shoal_rune"); + while (!vault && --tries > 0); + if (vault) + dgn_place_map(vault, false, true, _pick_shoals_island(), 0); } } else diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 93e5086ef6..5cae7491fe 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -4085,8 +4085,11 @@ void _fixup_after_vault() // clobber: If true, assumes the newly placed vault can clobber existing // items and monsters (items may be destroyed, monsters may be // teleported). -bool dgn_place_map(const map_def *mdef, bool clobber, bool make_no_exits, - const coord_def &where) +bool dgn_place_map(const map_def *mdef, + bool clobber, + bool make_no_exits, + const coord_def &where, + int rune_subst) { const dgn_colour_override_manager colour_man; @@ -4114,8 +4117,7 @@ bool dgn_place_map(const map_def *mdef, bool clobber, bool make_no_exits, } } - int rune_subst = -1; - if (mdef->has_tag_suffix("_entry")) + if (rune_subst == -1 && mdef->has_tag_suffix("_entry")) rune_subst = _dgn_find_rune_subst_tags(mdef->tags); did_map = _build_secondary_vault(you.your_level, mdef, rune_subst, clobber, make_no_exits, where); @@ -4938,6 +4940,11 @@ static void _vault_grid(vault_placement &place, int which_depth; int spec = 250; + // If rune_subst is set to 0, the rune was already placed, + // take appropriate steps. + if (place.rune_subst == 0 && vgrid == 'O') + place.num_runes++; + if (vgrid == '$') { which_class = OBJ_GOLD; diff --git a/crawl-ref/source/dungeon.h b/crawl-ref/source/dungeon.h index ded9cea53a..38a9aef6d9 100644 --- a/crawl-ref/source/dungeon.h +++ b/crawl-ref/source/dungeon.h @@ -193,7 +193,8 @@ void dgn_set_colours_from_monsters(); void dgn_set_grid_colour_at(const coord_def &c, int colour); bool dgn_place_map(const map_def *map, bool clobber, bool make_no_exits, - const coord_def &pos = coord_def(-1, -1)); + const coord_def &pos = coord_def(-1, -1), + int rune_subst = -1); void level_clear_vault_memory(); void level_welcome_messages(); -- cgit v1.2.3-54-g00ecf From 1f88b2d7c9832d0f303148db9d844230c8d5a80e Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Wed, 30 Dec 2009 12:57:16 +1000 Subject: Change scorpion to yellow (N78291), 052 glyph settings (jpeg). Yellow scorpions work better with brown giant cockroaches, now that they are on the same glyph, and they represent large threats than cockroaches; they also are no longer visually similar to wolf spiders, who are a completely different type of threat. This commit also includes a new settings file based on the 034_monster_glyphs.txt file, instead using the recent changes since 0.5.2: this includes the demon tier and colour changes, as well as the recent insect changes. Hopefully I've formatted it correctly, as I haven't worked out how to test it yet. :-) --- crawl-ref/settings/052_monster_glyphs.txt | 31 +++++++++++++++++++++++++++++++ crawl-ref/source/mon-data.h | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 crawl-ref/settings/052_monster_glyphs.txt diff --git a/crawl-ref/settings/052_monster_glyphs.txt b/crawl-ref/settings/052_monster_glyphs.txt new file mode 100644 index 0000000000..091890a9f7 --- /dev/null +++ b/crawl-ref/settings/052_monster_glyphs.txt @@ -0,0 +1,31 @@ +# With current Dungeon Crawl Stone Soup trunk (tentatively +# titled 0.6), there has been a new shift of glyphs and +# colours. Some demons have been promoted, and others have +# been demoted, while queen monsters have been moved into +# their relevant non-queen glyph. + +########################### +# monsters +########################### + +# bees +mon_glyph = killer bee : yellow +mon_glyph = queen bee : yellow Q + +# ants/cockroaches +mon_glyph = queen ant : lightgrey Q +mon_glyph = giant cockroach : brown a + +# hybrids +mon_glyph = minotaur : red t + +# spiders +mon_glyph = trapdoor spider : brown +mon_glyph = wolf spider : brown + +# tier 4 demons +mon_glpyh = smoke demon : lightgrey 4 + +# tier 3 demons +mon_glyph = hellion : fire 3 +mon_glyph = ynoxinul : cyan 3 diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index 6736603b5d..5bbdd504c7 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -1480,7 +1480,7 @@ static monsterentry mondata[] = { }, { - MONS_SCORPION, 's', LIGHTGREY, "scorpion", + MONS_SCORPION, 's', YELLOW, "scorpion", M_NO_SKELETON, MR_VUL_POISON, 500, 10, MONS_SCORPION, MONS_SCORPION, MH_NATURAL, -3, -- cgit v1.2.3-54-g00ecf From 5f66b931c03fc1e7da44771999e52f0b495fde08 Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Wed, 30 Dec 2009 08:36:28 +0530 Subject: Readjust Ilsuiw's minivault. --- crawl-ref/source/dat/shoals.des | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/crawl-ref/source/dat/shoals.des b/crawl-ref/source/dat/shoals.des index f74c690a93..c89fea0aad 100644 --- a/crawl-ref/source/dat/shoals.des +++ b/crawl-ref/source/dat/shoals.des @@ -260,17 +260,18 @@ ENDMAP NAME: shoal_ilsuiw PLACE: Shoal:$ -TAGS: water_ok +TAGS: mini_float KMONS: 1 = Ilsuiw band, siren +KITEM: 1 = | KMONS: 2 = merfolk impaler / merfolk javelineer -KFEAT: 12 = w +KFEAT: 2 = w LROCKTILE: wall_vines MAP - xxxxx -xxw2wxx -xwwww*x -+ww1w|x -xwwww*x -xxw2wxx - xxxxx + wxwxw +wxw2wxw +xwwWwwx +wwW1Www +xwwWwwx +wxw2wxw + wxwxw ENDMAP -- cgit v1.2.3-54-g00ecf From 75c0968931bf47f6f718b91ce3f589cd9f815298 Mon Sep 17 00:00:00 2001 From: Enne Walker Date: Tue, 29 Dec 2009 22:12:23 -0500 Subject: Don't create name.tdl files in non-tiles builds. There is no reason to create this file if it doesn't exist. This should prevent extraneous files being created on servers. --- crawl-ref/source/files.cc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc index 8ae63853a1..00a862a3ab 100644 --- a/crawl-ref/source/files.cc +++ b/crawl-ref/source/files.cc @@ -1677,13 +1677,6 @@ static void _save_game_base() fclose(dollf); DO_CHMOD_PRIVATE(dollFile.c_str()); } -#else - // Don't overwrite old tile dolls. - if (!file_exists(dollFile)) - { - FILE *dollf = fopen(dollFile.c_str(), "wb"); - fclose(dollf); - } #endif std::string charFile = get_savedir_filename(you.your_name, "", "sav"); -- cgit v1.2.3-54-g00ecf From 8a504d20b9992fea2daac06faa6ca5559ca63ae0 Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Tue, 29 Dec 2009 22:43:19 -0800 Subject: Give move/copy_item_to_grid responsibility for hazardous terrain We now have much less duplication of logic, yay. --- crawl-ref/source/beam.cc | 10 +++++++--- crawl-ref/source/effects.cc | 23 +++++----------------- crawl-ref/source/item_use.cc | 21 ++------------------- crawl-ref/source/item_use.h | 3 +-- crawl-ref/source/items.cc | 38 +++++++++++++++++++++++++++++-------- crawl-ref/source/items.h | 6 ++++-- crawl-ref/source/misc.cc | 29 ++++++++++++---------------- crawl-ref/source/mon-act.cc | 2 +- crawl-ref/source/mon-stuff.cc | 39 ++++++++------------------------------ crawl-ref/source/mon-transit.cc | 2 +- crawl-ref/source/monster.cc | 42 +++++++++++++++-------------------------- crawl-ref/source/wiz-item.cc | 3 +++ crawl-ref/source/xom.cc | 2 +- 13 files changed, 90 insertions(+), 130 deletions(-) diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index abe97ceb66..451cadd81d 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -3140,7 +3140,7 @@ void bolt::drop_object() return; } - if (!thrown_object_destroyed(item, pos(), false)) + if (!thrown_object_destroyed(item, pos())) { if (item->sub_type == MI_THROWING_NET) { @@ -3154,10 +3154,10 @@ void bolt::drop_object() set_item_stationary(*item); } } + copy_item_to_grid(*item, pos(), 1); } - else if (item->sub_type == MI_LARGE_ROCK - && !feat_destroys_items(grd(pos()))) + else if (item->sub_type == MI_LARGE_ROCK) { // Large rocks mulch to stone. std::string sound_msg = "You hear a cracking sound!"; @@ -3176,6 +3176,10 @@ void bolt::drop_object() copy_item_to_grid(*item, pos(), item->quantity); } + else + { + item_was_destroyed(*item, NON_MONSTER); + } } // Returns true if the beam hits the player, fuzzing the beam if necessary diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index bede6d46c2..dcec8a0373 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -2315,14 +2315,12 @@ int acquirement_create_item(object_class_type class_wanted, if (agent > GOD_NO_GOD && agent < NUM_GODS && agent == you.religion) thing.inscription = "god gift"; - move_item_to_grid( &thing_created, pos ); - - // This should never actually be NON_ITEM because of the way - // move_item_to_grid works (doesn't create a new item ever), - // but we're checking it anyways. -- bwr + // Moving this above the move since it might not exist after falling. if (thing_created != NON_ITEM && !quiet) canned_msg(MSG_SOMETHING_APPEARS); + move_item_to_grid( &thing_created, pos ); + return (thing_created); } @@ -2382,10 +2380,6 @@ bool acquirement(object_class_type class_wanted, int agent, if (feat_destroys_items(grd(you.pos()))) { - // How sad (and stupid). - if (!silenced(you.pos()) && !quiet) - mprf(MSGCH_SOUND, feat_item_destruction_message(grd(you.pos()))); - if (agent > GOD_NO_GOD && agent < NUM_GODS) { if (agent == GOD_XOM) @@ -2399,18 +2393,11 @@ bool acquirement(object_class_type class_wanted, int agent, god_name((god_type) agent).c_str()); } } - - *item_index = NON_ITEM; - - // Well, the item may have fallen in the drink, but the intent is - // that acquirement happened. -- bwr - return (true); } - *item_index = - acquirement_create_item(class_wanted, agent, quiet, you.pos(), debug); + acquirement_create_item(class_wanted, agent, quiet, you.pos(), debug); - return (*item_index != NON_ITEM); + return (true); } bool recharge_wand(int item_slot) diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index fd01008e25..07aa928eb4 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -3113,7 +3113,7 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, pbolt.fire(); // The item can be destroyed before returning. - if (did_return && thrown_object_destroyed(&item, pbolt.target, true)) + if (did_return && thrown_object_destroyed(&item, pbolt.target)) did_return = false; } @@ -3178,8 +3178,7 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, return (hit); } -bool thrown_object_destroyed(item_def *item, const coord_def& where, - bool returning) +bool thrown_object_destroyed(item_def *item, const coord_def& where) { ASSERT(item != NULL); @@ -3244,22 +3243,6 @@ bool thrown_object_destroyed(item_def *item, const coord_def& where, // destruction: plus / (1 + plus) chance of survival. bool destroyed = (chance == 0) ? false : (one_chance_in(chance) && one_chance_in(item->plus + 1)); - bool hostile_grid = feat_destroys_items(grd(where)); - - // Non-returning items thrown into item-destroying grids are always - // destroyed. Returning items are only destroyed if they would have - // been randomly destroyed anyway. - if (returning && !destroyed) - hostile_grid = false; - - if (hostile_grid) - { - if (player_can_hear(where)) - mprf(MSGCH_SOUND, feat_item_destruction_message(grd(where))); - - item_was_destroyed(*item, NON_MONSTER); - destroyed = true; - } return destroyed; } diff --git a/crawl-ref/source/item_use.h b/crawl-ref/source/item_use.h index a76dc3843c..bba83aa3b4 100644 --- a/crawl-ref/source/item_use.h +++ b/crawl-ref/source/item_use.h @@ -104,8 +104,7 @@ void throw_noise(actor* act, const bolt &pbolt, const item_def &ammo); bool throw_it(bolt &pbolt, int throw_2, bool teleport = false, int acc_bonus = 0, dist *target = NULL); -bool thrown_object_destroyed(item_def *item, const coord_def& where, - bool returning); +bool thrown_object_destroyed(item_def *item, const coord_def& where); void prompt_inscribe_item(); int launcher_shield_slowdown(const item_def &launcher, diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 29b25a021b..81adf191dd 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -1719,7 +1719,10 @@ void mark_items_non_pickup_at(const coord_def &pos) // // Done this way in the hopes that it will be obvious from // calling code that "obj" is possibly modified. -bool move_item_to_grid( int *const obj, const coord_def& p ) +// +// Returns false on error or level full - cases where you +// keep the item. +bool move_item_to_grid( int *const obj, const coord_def& p, bool silent ) { ASSERT(in_bounds(p)); @@ -1730,6 +1733,18 @@ bool move_item_to_grid( int *const obj, const coord_def& p ) item_def& item(mitm[ob]); + if (feat_destroys_items(grd(p))) + { + if (!silenced(p) && !silent) + mprf(MSGCH_SOUND, feat_item_destruction_message(grd(p))); + + item_was_destroyed(item, NON_MONSTER); + destroy_item(ob); + ob = NON_ITEM; + + return (true); + } + // If it's a stackable type... if (is_stackable_item( item )) { @@ -1809,15 +1824,25 @@ void move_item_stack_to_grid( const coord_def& from, const coord_def& to ) } -// Returns quantity dropped. +// Returns false iff no items could be dropped. bool copy_item_to_grid( const item_def &item, const coord_def& p, - int quant_drop, bool mark_dropped ) + int quant_drop, bool mark_dropped, bool silent ) { ASSERT(in_bounds(p)); if (quant_drop == 0) return (false); + if (feat_destroys_items(grd(p))) + { + if (!silenced(p)) + mprf(MSGCH_SOUND, feat_item_destruction_message(grd(p))); + + item_was_destroyed(item, NON_MONSTER); + + return (true); + } + // default quant_drop == -1 => drop all if (quant_drop < 0) quant_drop = item.quantity; @@ -1966,9 +1991,8 @@ bool drop_item( int item_dropped, int quant_drop, bool try_offer ) const dungeon_feature_type my_grid = grd(you.pos()); - if (!feat_destroys_items(my_grid) - && !copy_item_to_grid( you.inv[item_dropped], - you.pos(), quant_drop, true )) + if (!copy_item_to_grid( you.inv[item_dropped], + you.pos(), quant_drop, true, true )) { mpr("Too many items on this level, not dropping the item."); return (false); @@ -1981,8 +2005,6 @@ bool drop_item( int item_dropped, int quant_drop, bool try_offer ) { if (!silenced(you.pos())) mprf(MSGCH_SOUND, feat_item_destruction_message(my_grid)); - - item_was_destroyed(you.inv[item_dropped], NON_MONSTER); } else if (strstr(you.inv[item_dropped].inscription.c_str(), "=s") != 0) StashTrack.add_stash(); diff --git a/crawl-ref/source/items.h b/crawl-ref/source/items.h index 4ffa1c9c30..8d82197764 100644 --- a/crawl-ref/source/items.h +++ b/crawl-ref/source/items.h @@ -34,7 +34,8 @@ bool dec_mitm_item_quantity(int obj, int amount); void inc_inv_item_quantity(int obj, int amount, bool suppress_burden = false); void inc_mitm_item_quantity(int obj, int amount); -bool move_item_to_grid( int *const obj, const coord_def& p ); +bool move_item_to_grid( int *const obj, const coord_def& p, + bool silent = false ); void move_item_stack_to_grid( const coord_def& from, const coord_def& to ); void note_inscribe_item(item_def &item); int move_item_to_player(int obj, int quant_got, bool quiet = false, @@ -77,7 +78,8 @@ void item_list_on_square( std::vector& items, bool copy_item_to_grid( const item_def &item, const coord_def& p, int quant_drop = -1, // item.quantity by default - bool mark_dropped = false); + bool mark_dropped = false, + bool silent = false ); bool move_top_item( const coord_def &src, const coord_def &dest ); diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 4bac2e7ff0..b9d9fdabb3 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -1041,23 +1041,18 @@ void split_potions_into_decay( int obj, int amount, bool need_msg ) } } - // Only bother creating a distinct stack of potions - // if it won't get destroyed right away. - if (!feat_destroys_items(grd(you.pos()))) - { - item_def potion2; - potion2.base_type = OBJ_POTIONS; - potion2.sub_type = POT_DECAY; - // Keep description as it was. - potion2.plus = potion.plus; - potion2.quantity = amount; - potion2.colour = potion.colour; - potion2.plus2 = 0; - potion2.flags = 0; - potion2.special = 0; - - copy_item_to_grid(potion2, you.pos()); - } + item_def potion2; + potion2.base_type = OBJ_POTIONS; + potion2.sub_type = POT_DECAY; + // Keep description as it was. + potion2.plus = potion.plus; + potion2.quantity = amount; + potion2.colour = potion.colour; + potion2.plus2 = 0; + potion2.flags = 0; + potion2.special = 0; + + copy_item_to_grid(potion2, you.pos()); // Is decreased even if the decay stack goes splat. dec_inv_item_quantity(obj, amount); diff --git a/crawl-ref/source/mon-act.cc b/crawl-ref/source/mon-act.cc index 31d1c990a7..18ad9a1b01 100644 --- a/crawl-ref/source/mon-act.cc +++ b/crawl-ref/source/mon-act.cc @@ -1413,7 +1413,7 @@ static bool _mons_throw(struct monsters *monster, struct bolt &pbolt, pbolt.fire(); // The item can be destroyed before returning. - if (really_returns && thrown_object_destroyed(&item, pbolt.target, true)) + if (really_returns && thrown_object_destroyed(&item, pbolt.target)) { really_returns = false; } diff --git a/crawl-ref/source/mon-stuff.cc b/crawl-ref/source/mon-stuff.cc index ca7b9cf12c..bcaeecc95a 100644 --- a/crawl-ref/source/mon-stuff.cc +++ b/crawl-ref/source/mon-stuff.cc @@ -255,10 +255,6 @@ bool curse_an_item( bool decay_potions, bool quiet ) void monster_drop_ething(monsters *monster, bool mark_item_origins, int owner_id) { - const bool hostile_grid = feat_destroys_items(grd(monster->pos())); - - bool destroyed = false; - // Drop weapons & missiles last (ie on top) so others pick up. for (int i = NUM_MONSTER_SLOTS - 1; i >= 0; i--) { @@ -268,30 +264,25 @@ void monster_drop_ething(monsters *monster, bool mark_item_origins, { const bool summoned_item = testbits(mitm[item].flags, ISFLAG_SUMMONED); - if (hostile_grid || summoned_item) + if (summoned_item) { item_was_destroyed(mitm[item], monster->mindex()); destroy_item( item ); - if (!summoned_item) - destroyed = true; } else { if (monster->friendly() && mitm[item].is_valid()) mitm[item].flags |= ISFLAG_DROPPED_BY_ALLY; - move_item_to_grid(&item, monster->pos()); - if (mark_item_origins && mitm[item].is_valid()) origin_set_monster(mitm[item], monster); + + move_item_to_grid(&item, monster->pos()); } monster->inv[i] = NON_ITEM; } } - - if (destroyed) - mprf(MSGCH_SOUND, feat_item_destruction_message(grd(monster->pos()))); } monster_type fill_out_corpse(const monsters* monster, item_def& corpse, @@ -421,14 +412,6 @@ bool explode_corpse(item_def& corpse, const coord_def& where) --nchunks; - if (feat_destroys_items(grd(cp))) - { - if (!silenced(cp)) - mprf(MSGCH_SOUND, feat_item_destruction_message(grd(cp))); - - continue; - } - dprf("Success"); copy_item_to_grid(corpse, cp); @@ -483,16 +466,8 @@ int place_monster_corpse(const monsters *monster, bool silent, return (-1); } - if (feat_destroys_items(grd(monster->pos()))) - { - item_was_destroyed(corpse); - destroy_item(o); - return (-1); - } - - // Don't care if 'o' is changed, and it shouldn't be (corpses don't - // stack). move_item_to_grid(&o, monster->pos()); + if (you.see_cell(monster->pos())) { if (force && !silent) @@ -507,10 +482,12 @@ int place_monster_corpse(const monsters *monster, bool silent, } const bool poison = (mons_corpse_effect(corpse_class) == CE_POISONOUS && player_res_poison() <= 0); - tutorial_dissection_reminder(!poison); + + if (o != NON_ITEM) + tutorial_dissection_reminder(!poison); } - return (o); + return (o == NON_ITEM ? -1 : o); } static void _tutorial_inspect_kill() diff --git a/crawl-ref/source/mon-transit.cc b/crawl-ref/source/mon-transit.cc index 49a1e37ba0..6db3c417ca 100644 --- a/crawl-ref/source/mon-transit.cc +++ b/crawl-ref/source/mon-transit.cc @@ -214,7 +214,7 @@ void place_transiting_items() pos, true); // List of items we couldn't place. - if (!copy_item_to_grid(*item, where_to_go)) + if (!copy_item_to_grid(*item, where_to_go, 1, false, true)) keep.push_back(*item); } diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index 2f83c01d6f..de3af6b0a9 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -1154,12 +1154,8 @@ bool monsters::drop_item(int eslot, int near) was_unequipped = true; } - bool on_floor = true; - if (pitem->flags & ISFLAG_SUMMONED) { - on_floor = false; - if (need_message(near)) mprf("%s %s as %s drops %s!", pitem->name(DESC_CAP_THE).c_str(), @@ -1170,38 +1166,30 @@ bool monsters::drop_item(int eslot, int near) item_was_destroyed(*pitem, mindex()); destroy_item(item_index); } - else if (!move_item_to_grid(&item_index, pos())) - { - // Re-equip item if we somehow failed to drop it. - if (was_unequipped) - equip(*pitem, eslot, near); - - return (false); - } - - // move_item_to_grid could change item_index, so - // update pitem. - pitem = &mitm[item_index]; - - if (on_floor) + else { - if (friendly()) - pitem->flags |= ISFLAG_DROPPED_BY_ALLY; - if (need_message(near)) { mprf("%s drops %s.", name(DESC_CAP_THE).c_str(), pitem->name(DESC_NOCAP_A).c_str()); } - dungeon_feature_type feat = grd(pos()); - if (feat_destroys_items(feat)) + if (!move_item_to_grid(&item_index, pos())) { - if ( player_can_hear(pos()) ) - mprf(MSGCH_SOUND, feat_item_destruction_message(feat)); + // Re-equip item if we somehow failed to drop it. + if (was_unequipped) + equip(*pitem, eslot, near); - item_was_destroyed(*pitem, mindex()); - unlink_item(item_index); + return (false); + } + + if (friendly() && item_index != NON_ITEM) + { + // move_item_to_grid could change item_index, so + // update pitem. + pitem = &mitm[item_index]; + + pitem->flags |= ISFLAG_DROPPED_BY_ALLY; } } diff --git a/crawl-ref/source/wiz-item.cc b/crawl-ref/source/wiz-item.cc index 6fa4b411b0..1bdce290dd 100644 --- a/crawl-ref/source/wiz-item.cc +++ b/crawl-ref/source/wiz-item.cc @@ -50,6 +50,9 @@ static void _make_all_books() move_item_to_grid(&thing, you.pos()); + if (thing == NON_ITEM) + continue; + item_def book(mitm[thing]); mark_had_book(book); diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc index 4f01f1145a..4fdb333dd4 100644 --- a/crawl-ref/source/xom.cc +++ b/crawl-ref/source/xom.cc @@ -682,9 +682,9 @@ static void _xom_make_item(object_class_type base, int subtype, int power) mitm[thing_created].name(DESC_PLAIN).c_str()); take_note(Note(NOTE_XOM_EFFECT, you.piety, -1, gift_buf), true); - move_item_to_grid(&thing_created, you.pos()); mitm[thing_created].inscription = "god gift"; canned_msg(MSG_SOMETHING_APPEARS); + move_item_to_grid(&thing_created, you.pos()); stop_running(); } -- cgit v1.2.3-54-g00ecf From 4db1d75dca2405e186a3e9869a2aa9e058cbf71f Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Wed, 30 Dec 2009 00:57:03 -0800 Subject: Allow tiles to destroy only some items. --- crawl-ref/source/dgn-shoals.cc | 26 +++++++----- crawl-ref/source/effects.cc | 51 ++++++++++-------------- crawl-ref/source/items.cc | 17 ++------ crawl-ref/source/l_feat.cc | 5 +-- crawl-ref/source/mon-pathfind.cc | 2 +- crawl-ref/source/religion.cc | 21 ++++------ crawl-ref/source/spells4.cc | 14 +++---- crawl-ref/source/terrain.cc | 86 ++++++++++++++++++++++++---------------- crawl-ref/source/terrain.h | 5 +-- crawl-ref/source/wiz-item.cc | 7 ---- crawl-ref/source/xom.cc | 7 +--- 11 files changed, 113 insertions(+), 128 deletions(-) diff --git a/crawl-ref/source/dgn-shoals.cc b/crawl-ref/source/dgn-shoals.cc index 367ca497d4..3547932a43 100644 --- a/crawl-ref/source/dgn-shoals.cc +++ b/crawl-ref/source/dgn-shoals.cc @@ -867,7 +867,7 @@ static void _shoals_run_tide(int &tide, int &acc) } static coord_def _shoals_escape_place_from(coord_def bad_place, - bool monster_free) + actor *act, item_def *it) { int best_height = -1000; coord_def chosen; @@ -875,8 +875,8 @@ static coord_def _shoals_escape_place_from(coord_def bad_place, { coord_def p(*ai); const dungeon_feature_type feat(grd(p)); - if (!feat_is_solid(feat) && !feat_destroys_items(feat) - && (!monster_free || !actor_at(p))) + if ((!act || (feat_has_solid_floor(feat) && !actor_at(p))) + && (!it || !feat_destroys_item(feat, *it))) { if (best_height == -1000 || shoals_heights(p) > best_height) { @@ -894,12 +894,18 @@ static bool _shoals_tide_sweep_items_clear(coord_def c) if (link == NON_ITEM) return true; - const coord_def target(_shoals_escape_place_from(c, false)); - // Don't abort tide entry because of items. If we can't sweep the - // item clear here, let dungeon_terrain_changed teleport the item - // to the nearest safe square. - if (!target.origin()) - move_item_stack_to_grid(c, target); + for (stack_iterator si(c); si; ++si) + { + const coord_def target(_shoals_escape_place_from(c, NULL, &*si)); + // Don't abort tide entry because of items. If we can't sweep the + // item clear here, let dungeon_terrain_changed teleport the item + // to the nearest safe square. + int id = si.link(); + + if (!target.origin()) + move_item_to_grid(&id, target); + } + return true; } @@ -921,7 +927,7 @@ static bool _shoals_tide_sweep_actors_clear(coord_def c) if (monster_habitable_grid(mvictim, DNGN_DEEP_WATER)) return true; } - coord_def evacuation_point(_shoals_escape_place_from(c, true)); + coord_def evacuation_point(_shoals_escape_place_from(c, victim, NULL)); // The tide moves on even if we cannot evacuate the tile! if (!evacuation_point.origin()) victim->move_to_pos(evacuation_point); diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index dcec8a0373..a4a765177e 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -2319,6 +2319,17 @@ int acquirement_create_item(object_class_type class_wanted, if (thing_created != NON_ITEM && !quiet) canned_msg(MSG_SOMETHING_APPEARS); + // If a god wants to give you something but the floor doesn't want it, + // it counts as a failed acquirement - no piety, etc cost. + if (feat_destroys_item(grd(pos), thing) && (agent > GOD_NO_GOD) && + (agent < NUM_GODS)) + { + if (agent == GOD_XOM) + simple_god_message(" snickers.", GOD_XOM); + else + return _failed_acquirement(quiet); + } + move_item_to_grid( &thing_created, pos ); return (thing_created); @@ -2378,23 +2389,6 @@ bool acquirement(object_class_type class_wanted, int agent, } } - if (feat_destroys_items(grd(you.pos()))) - { - if (agent > GOD_NO_GOD && agent < NUM_GODS) - { - if (agent == GOD_XOM) - simple_god_message(" snickers.", GOD_XOM); - else - { - ASSERT(!"God gave gift item while player was on grid which " - "destroys items."); - mprf(MSGCH_ERROR, "%s gave a god gift while you were on " - "terrain which destroys items.", - god_name((god_type) agent).c_str()); - } - } - } - acquirement_create_item(class_wanted, agent, quiet, you.pos(), debug); return (true); @@ -2956,11 +2950,6 @@ static void _hell_effects() } } -static bool _is_floor(const dungeon_feature_type feat) -{ - return (!feat_is_solid(feat) && !feat_destroys_items(feat)); -} - // This function checks whether we can turn a wall into a floor space and // still keep a corridor-like environment. The wall in position x is a // a candidate for switching if it's flanked by floor grids to two sides @@ -2982,8 +2971,8 @@ static bool _feat_is_flanked_by_walls(const coord_def &p) return (false); return (feat_is_wall(grd(adjs[0])) && feat_is_wall(grd(adjs[1])) - && _is_floor(grd(adjs[2])) && _is_floor(grd(adjs[3])) - || _is_floor(grd(adjs[0])) && _is_floor(grd(adjs[1])) + && feat_has_solid_floor(grd(adjs[2])) && feat_has_solid_floor(grd(adjs[3])) + || feat_has_solid_floor(grd(adjs[0])) && feat_has_solid_floor(grd(adjs[1])) && feat_is_wall(grd(adjs[2])) && feat_is_wall(grd(adjs[3]))); } @@ -3088,7 +3077,7 @@ static bool _deadend_check_floor(const coord_def &p) continue; const coord_def a(p.x, p.y+2*i); - if (!in_bounds(a) || _is_floor(grd(a))) + if (!in_bounds(a) || feat_has_solid_floor(grd(a))) continue; for (int j = -1; j <= 1; j++) @@ -3101,7 +3090,7 @@ static bool _deadend_check_floor(const coord_def &p) continue; const coord_def c(p.x+j, p.y+i); - if (_is_floor(grd(c)) && !_is_floor(grd(b))) + if (feat_has_solid_floor(grd(c)) && !feat_has_solid_floor(grd(b))) return (false); } } @@ -3114,7 +3103,7 @@ static bool _deadend_check_floor(const coord_def &p) continue; const coord_def a(p.x+2*i, p.y); - if (!in_bounds(a) || _is_floor(grd(a))) + if (!in_bounds(a) || feat_has_solid_floor(grd(a))) continue; for (int j = -1; j <= 1; j++) @@ -3127,7 +3116,7 @@ static bool _deadend_check_floor(const coord_def &p) continue; const coord_def c(p.x+i, p.y+j); - if (_is_floor(grd(c)) && !_is_floor(grd(b))) + if (feat_has_solid_floor(grd(c)) && !feat_has_solid_floor(grd(b))) return (false); } } @@ -3236,7 +3225,7 @@ void change_labyrinth(bool msg) // Use the adjacent floor grids as source and destination. coord_def src(c.x-1,c.y); coord_def dst(c.x+1,c.y); - if (!_is_floor(grd(src)) || !_is_floor(grd(dst))) + if (!feat_has_solid_floor(grd(src)) || !feat_has_solid_floor(grd(dst))) { src = coord_def(c.x, c.y-1); dst = coord_def(c.x, c.y+1); @@ -3375,7 +3364,7 @@ void change_labyrinth(bool msg) int floor_count = 0; coord_def new_adj(p); for (adjacent_iterator ai(c); ai; ++ai) - if (_is_floor(grd(*ai)) && one_chance_in(++floor_count)) + if (feat_has_solid_floor(grd(*ai)) && one_chance_in(++floor_count)) new_adj = *ai; if (new_adj != p && maybe_bloodify_square(new_adj)) @@ -3423,7 +3412,7 @@ void change_labyrinth(bool msg) if (!in_bounds(p)) continue; - if (_is_floor(grd(p))) + if (feat_has_solid_floor(grd(p))) { // Once a valid grid is found, move all items from the // stack onto it. diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 81adf191dd..1437238afd 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -1733,11 +1733,8 @@ bool move_item_to_grid( int *const obj, const coord_def& p, bool silent ) item_def& item(mitm[ob]); - if (feat_destroys_items(grd(p))) + if (feat_destroys_item(grd(p), mitm[ob], !silenced(p) && !silent)) { - if (!silenced(p) && !silent) - mprf(MSGCH_SOUND, feat_item_destruction_message(grd(p))); - item_was_destroyed(item, NON_MONSTER); destroy_item(ob); ob = NON_ITEM; @@ -1833,11 +1830,8 @@ bool copy_item_to_grid( const item_def &item, const coord_def& p, if (quant_drop == 0) return (false); - if (feat_destroys_items(grd(p))) + if (feat_destroys_item(grd(p), item, !silenced(p) && !silent)) { - if (!silenced(p)) - mprf(MSGCH_SOUND, feat_item_destruction_message(grd(p))); - item_was_destroyed(item, NON_MONSTER); return (true); @@ -2001,11 +1995,8 @@ bool drop_item( int item_dropped, int quant_drop, bool try_offer ) mprf("You drop %s.", quant_name(you.inv[item_dropped], quant_drop, DESC_NOCAP_A).c_str()); - if (feat_destroys_items(my_grid)) - { - if (!silenced(you.pos())) - mprf(MSGCH_SOUND, feat_item_destruction_message(my_grid)); - } + if (feat_destroys_item(my_grid, you.inv[item_dropped], !silenced(you.pos()))) + ; else if (strstr(you.inv[item_dropped].inscription.c_str(), "=s") != 0) StashTrack.add_stash(); diff --git a/crawl-ref/source/l_feat.cc b/crawl-ref/source/l_feat.cc index 00529c11dc..baeaac20fd 100644 --- a/crawl-ref/source/l_feat.cc +++ b/crawl-ref/source/l_feat.cc @@ -31,10 +31,9 @@ return (1); \ } -FEATF(_feat_destroys_items, feat_destroys_items) - FEATF(_feat_is_wall, feat_is_wall) FEATF(_feat_is_solid, feat_is_solid) +FEATF(_feat_has_solid_floor, feat_has_solid_floor) FEATF(_feat_is_opaque, feat_is_opaque) FEATF(_feat_is_door, feat_is_door) FEATF(_feat_is_closed_door, feat_is_closed_door) @@ -60,9 +59,9 @@ FEATF(_feat_is_critical, is_critical_feature) const struct luaL_reg feat_dlib[] = { -{ "destroys_items", _feat_destroys_items }, { "is_wall", _feat_is_wall }, { "is_solid", _feat_is_solid }, +{ "has_solid_floor", _feat_has_solid_floor }, { "is_opaque", _feat_is_opaque }, { "is_door", _feat_is_door }, { "is_closed_door", _feat_is_closed_door }, diff --git a/crawl-ref/source/mon-pathfind.cc b/crawl-ref/source/mon-pathfind.cc index 173d643020..68215b5fca 100644 --- a/crawl-ref/source/mon-pathfind.cc +++ b/crawl-ref/source/mon-pathfind.cc @@ -392,7 +392,7 @@ bool monster_pathfind::traversable(const coord_def p) if (mons) return mons_traversable(p); - return (!feat_is_solid(grd(p)) && !feat_destroys_items(grd(p))); + return feat_has_solid_floor(grd(p)); } // Checks whether a given monster can pass over a certain position, respecting diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 3a0c43fb0f..3845be27d2 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -1175,7 +1175,6 @@ static bool _need_missile_gift() const item_def *launcher = _find_missile_launcher(best_missile_skill); return (you.piety > 80 && random2( you.piety ) > 70 - && !feat_destroys_items( grd(you.pos()) ) && one_chance_in(8) && you.skills[ best_missile_skill ] >= 8 && (launcher || best_missile_skill == SK_DARTS)); @@ -1263,9 +1262,6 @@ static void _show_pure_deck_chances() static void _give_nemelex_gift() { - if (feat_destroys_items(grd(you.pos()))) - return; - // Nemelex will give at least one gift early. if (!you.num_gifts[GOD_NEMELEX_XOBEH] && x_chance_in_y(you.piety + 1, piety_breakpoint(1)) @@ -1289,14 +1285,16 @@ static void _give_nemelex_gift() #if DEBUG_GIFTS || DEBUG_CARDS _show_pure_deck_chances(); #endif - _update_sacrifice_weights(choice); - int thing_created = items( 1, OBJ_MISCELLANY, gift_type, true, 1, MAKE_ITEM_RANDOM_RACE, 0, 0, GOD_NEMELEX_XOBEH ); + move_item_to_grid(&thing_created, you.pos(), true); + if (thing_created != NON_ITEM) { + _update_sacrifice_weights(choice); + // Piety|Common | Rare |Legendary // -------------------------------- // 0: 95.00%, 5.00%, 0.00% @@ -1329,8 +1327,6 @@ static void _give_nemelex_gift() deck.colour = deck_rarity_to_color(rarity); deck.inscription = "god gift"; - move_item_to_grid(&thing_created, you.pos()); - simple_god_message(" grants you a gift!"); more(); canned_msg(MSG_SOMETHING_APPEARS); @@ -2046,7 +2042,6 @@ static void _do_god_gift(bool prayed_for) case GOD_TROG: if (you.piety > 130 && random2(you.piety) > 120 - && !feat_destroys_items(grd(you.pos())) && one_chance_in(4)) { if (you.religion == GOD_TROG @@ -2058,7 +2053,8 @@ static void _do_god_gift(bool prayed_for) { success = acquirement(OBJ_ARMOUR, you.religion); // Okawaru charges extra for armour acquirements. - _inc_gift_timeout(30 + random2avg(15, 2)); + if (success) + _inc_gift_timeout(30 + random2avg(15, 2)); } if (success) @@ -2194,8 +2190,7 @@ static void _do_god_gift(bool prayed_for) } } - if (gift != NUM_BOOKS - && !feat_destroys_items(grd(you.pos()))) + if (gift != NUM_BOOKS) { if (gift == OBJ_RANDOM) { @@ -2216,7 +2211,7 @@ static void _do_god_gift(bool prayed_for) // reason. mark_had_book(gift); - move_item_to_grid( &thing_created, you.pos() ); + move_item_to_grid( &thing_created, you.pos(), true ); if (thing_created != NON_ITEM) { diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc index 7da3ee46af..9f3f03d736 100644 --- a/crawl-ref/source/spells4.cc +++ b/crawl-ref/source/spells4.cc @@ -1714,13 +1714,6 @@ bool cast_portal_projectile(int pow) bool cast_apportation(int pow, const coord_def& where) { - // Protect the player from destroying the item. - if (feat_destroys_items(grd(you.pos()))) - { - mpr( "That would be silly while over this terrain!" ); - return (false); - } - if (you.trans_wall_blocking(where)) { mpr("A translucent wall is in the way."); @@ -1750,6 +1743,13 @@ bool cast_apportation(int pow, const coord_def& where) item_def& item = mitm[item_idx]; + // Protect the player from destroying the item. + if (feat_destroys_item(grd(you.pos()), item)) + { + mpr( "That would be silly while over this terrain!" ); + return (false); + } + // Mass of one unit. const int unit_mass = item_mass(item); const int max_mass = pow * 30 + random2(pow * 20); diff --git a/crawl-ref/source/terrain.cc b/crawl-ref/source/terrain.cc index 9b2fe96deb..2e3ac60cc7 100644 --- a/crawl-ref/source/terrain.cc +++ b/crawl-ref/source/terrain.cc @@ -321,6 +321,12 @@ bool cell_is_solid(const coord_def &c) return (feat_is_solid(grd(c))); } +bool feat_has_solid_floor(dungeon_feature_type feat) +{ + return (!feat_is_solid(feat) && feat != DNGN_DEEP_WATER && + feat != DNGN_LAVA); +} + bool feat_is_door(dungeon_feature_type feat) { return (feat == DNGN_CLOSED_DOOR || feat == DNGN_DETECTED_SECRET_DOOR @@ -376,11 +382,6 @@ bool feat_is_watery(dungeon_feature_type feat) return (feat_is_water(feat) || feat == DNGN_FOUNTAIN_BLUE); } -bool feat_destroys_items(dungeon_feature_type feat) -{ - return (feat == DNGN_LAVA || feat == DNGN_DEEP_WATER); -} - // Returns GOD_NO_GOD if feat is not an altar, otherwise returns the // GOD_* type. god_type feat_altar_god(dungeon_feature_type feat) @@ -543,16 +544,30 @@ dungeon_feature_type grid_secret_door_appearance(const coord_def &where) : ret); } -const char *feat_item_destruction_message(dungeon_feature_type feat) +bool feat_destroys_item(dungeon_feature_type feat, const item_def &item, + bool noisy) { - return (feat == DNGN_DEEP_WATER ? "You hear a splash." : - feat == DNGN_LAVA ? "You hear a sizzling splash." - : "You hear a crunching noise."); + switch (feat) + { + case DNGN_DEEP_WATER: + if (noisy) + mprf(MSGCH_SOUND, "You hear a splash."); + return (true); + + case DNGN_LAVA: + if (noisy) + mprf(MSGCH_SOUND, "You hear a sizzling splash."); + return (true); + + default: + return (false); + } } static coord_def _dgn_find_nearest_square( const coord_def &pos, - bool (*acceptable)(const coord_def &), + void *thing, + bool (*acceptable)(const coord_def &, void *thing), bool (*traversable)(const coord_def &) = NULL) { memset(travel_point_distance, 0, sizeof(travel_distance_grid_t)); @@ -568,7 +583,7 @@ static coord_def _dgn_find_nearest_square( { const coord_def &p = *i; - if (p != pos && acceptable(p)) + if (p != pos && acceptable(p, thing)) return (p); travel_point_distance[p.x][p.y] = 1; @@ -597,16 +612,17 @@ static coord_def _dgn_find_nearest_square( return (unfound); } -static bool _item_safe_square(const coord_def &pos) +static bool _item_safe_square(const coord_def &pos, void *item) { const dungeon_feature_type feat = grd(pos); - return (feat_is_traversable(feat) && !feat_destroys_items(feat)); + return (feat_is_traversable(feat) && + !feat_destroys_item(feat, *static_cast(item))); } // Moves an item on the floor to the nearest adjacent floor-space. static bool _dgn_shift_item(const coord_def &pos, item_def &item) { - const coord_def np = _dgn_find_nearest_square(pos, _item_safe_square); + const coord_def np = _dgn_find_nearest_square(pos, &item, _item_safe_square); if (in_bounds(np) && np != pos) { int index = item.index(); @@ -622,7 +638,7 @@ bool is_critical_feature(dungeon_feature_type feat) || feat_altar_god(feat) != GOD_NO_GOD); } -static bool _is_feature_shift_target(const coord_def &pos) +static bool _is_feature_shift_target(const coord_def &pos, void*) { return (grd(pos) == DNGN_FLOOR && !dungeon_events.has_listeners_at(pos)); } @@ -634,7 +650,7 @@ static bool _dgn_shift_feature(const coord_def &pos) return (false); const coord_def dest = - _dgn_find_nearest_square(pos, _is_feature_shift_target); + _dgn_find_nearest_square(pos, NULL, _is_feature_shift_target); if (in_bounds(dest) && dest != pos) { @@ -654,27 +670,27 @@ static bool _dgn_shift_feature(const coord_def &pos) static void _dgn_check_terrain_items(const coord_def &pos, bool preserve_items) { const dungeon_feature_type feat = grd(pos); - if (feat_is_solid(feat) || feat_destroys_items(feat)) + + int item = igrd(pos); + bool did_destroy = false; + while (item != NON_ITEM) { - int item = igrd(pos); - bool did_destroy = false; - while (item != NON_ITEM) - { - const int curr = item; - item = mitm[item].link; + const int curr = item; + item = mitm[item].link; - // Game-critical item. - if (preserve_items || mitm[curr].is_critical()) - _dgn_shift_item(pos, mitm[curr]); - else - { - item_was_destroyed(mitm[curr]); - destroy_item(curr); - did_destroy = true; - } + if (!feat_is_solid(feat) && !feat_destroys_item(feat, mitm[curr])) + continue; + + // Game-critical item. + if (preserve_items || mitm[curr].is_critical()) + _dgn_shift_item(pos, mitm[curr]); + else + { + feat_destroys_item(feat, mitm[curr], true); + item_was_destroyed(mitm[curr]); + destroy_item(curr); + did_destroy = true; } - if (did_destroy && player_can_hear(pos)) - mprf(MSGCH_SOUND, feat_item_destruction_message(feat)); } } @@ -704,7 +720,7 @@ static void _dgn_check_terrain_blood(const coord_def &pos, else { if (feat_is_solid(old_feat) != feat_is_solid(new_feat) - || feat_is_water(new_feat) || feat_destroys_items(new_feat) + || feat_is_water(new_feat) || new_feat == DNGN_LAVA || is_critical_feature(new_feat)) { env.pgrid(pos) &= ~(FPROP_BLOODY); diff --git a/crawl-ref/source/terrain.h b/crawl-ref/source/terrain.h index f464d29929..73c5c5ee5e 100644 --- a/crawl-ref/source/terrain.h +++ b/crawl-ref/source/terrain.h @@ -24,6 +24,7 @@ bool cell_is_solid(const coord_def &c); bool feat_is_wall(dungeon_feature_type feat); bool feat_is_opaque(dungeon_feature_type feat); bool feat_is_solid(dungeon_feature_type feat); +bool feat_has_solid_floor(dungeon_feature_type feat); bool feat_is_door(dungeon_feature_type feat); bool feat_is_closed_door(dungeon_feature_type feat); bool feat_is_secret_door(dungeon_feature_type feat); @@ -63,9 +64,7 @@ void find_connected_range(coord_def d, dungeon_feature_type ft_min, void get_door_description(int door_size, const char** adjective, const char** noun); dungeon_feature_type grid_secret_door_appearance(const coord_def &where); dungeon_feature_type grid_appearance(const coord_def &gc); -bool feat_destroys_items(dungeon_feature_type feat); - -const char *feat_item_destruction_message( dungeon_feature_type feat ); +bool feat_destroys_item(dungeon_feature_type feat, const item_def &item, bool noisy = false); // Terrain changed under 'pos', perform necessary effects. void dungeon_terrain_changed(const coord_def &pos, diff --git a/crawl-ref/source/wiz-item.cc b/crawl-ref/source/wiz-item.cc index 1bdce290dd..56b1b9bba0 100644 --- a/crawl-ref/source/wiz-item.cc +++ b/crawl-ref/source/wiz-item.cc @@ -822,13 +822,6 @@ void wizard_list_items() //--------------------------------------------------------------- static void _debug_acquirement_stats(FILE *ostat) { - if (feat_destroys_items(grd(you.pos()))) - { - mpr("You must stand on a square which doesn't destroy items " - "in order to do this."); - return; - } - int p = get_item_slot(11); if (p == NON_ITEM) { diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc index 4fdb333dd4..40a19123cb 100644 --- a/crawl-ref/source/xom.cc +++ b/crawl-ref/source/xom.cc @@ -659,11 +659,8 @@ static void _xom_make_item(object_class_type base, int subtype, int power) items(true, base, subtype, true, power, MAKE_ITEM_RANDOM_RACE, 0, 0, GOD_XOM); - if (feat_destroys_items(grd(you.pos()))) + if (feat_destroys_item(grd(you.pos()), mitm[thing_created], !silenced(you.pos()))) { - if (!silenced(you.pos())) - mprf(MSGCH_SOUND, feat_item_destruction_message(grd(you.pos()))); - simple_god_message(" snickers.", GOD_XOM); destroy_item(thing_created, true); thing_created = NON_ITEM; @@ -2425,7 +2422,7 @@ static void _xom_zero_miscast() } } - if (!feat_destroys_items(feat) && !feat_is_solid(feat) + if (feat_has_solid_floor(feat) && inv_items.size() > 0) { int idx = inv_items[random2(inv_items.size())]; -- cgit v1.2.3-54-g00ecf From 4edafcc00547b63775d48c88dc1d03b15bb9c381 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Wed, 30 Dec 2009 19:01:02 +1000 Subject: Add another new map by Mu. --- crawl-ref/source/dat/wizlab.des | 97 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index ab55a59408..2a7c217a5c 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -1775,3 +1775,100 @@ cccccccc..ccccccccccccc.cccccccccclllcv.....$v ccccccccc.ccccccccccccccccccccccccccccv....$*v ccccccccccccccccccccccccccccccccccccccvvvvvvvv ENDMAP + +############################################################################### +# Halls of the Hellbinder (by Mu.) +# +NAME: wizlab_demon +ORIENT: encompass +TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +LFLOORCOL: red +LROCKCOL: red +COLOUR: c = darkgrey +COLOUR: " = yellow +KPROP: ' = bloody / nothing +KFEAT: _ = altar_makhleb +KPROP: _ = bloody +MARKER: ! = lua:fog_machine { \ + pow_max = 10, delay_min = 10, delay_max = 40, \ + size = 1, size_buildup_amnt = 5, \ + size_buildup_time = 25, cloud_type = "flame" } +KMONS: 2 = w:1 Lorocyproca / w:20 soul eater / w:20 reaper /\ + w:20 ice devil / w:20 sun demon / hellion +KMONS: 3 = blue devil / iron devil / shadow demon / neqoxec /\ + w:5 tormentor / ynoxinul +KMONS: 4 = kobold demonologist / deep elf demonologist +KMONS: 5 = blue death / green death / cacodemon +KMONS: 1 = col:fire patrolling wizard name:Hellbinder name_replace \ + name_definite spells:call_imp;summon_demon;haste;\ + hellfire;blink_away;throw_flame hd:20 hp:150 ; demon blade \ + . robe +KITEM: $ = gold / w:1 scroll of torment / w:1 scroll of summoning +KITEM: | = rod of demonology / ring of fire / ring of protection from fire /\ + amulet of conservation / scroll of torment / scroll of summoning /\ + demon blade / demon whip / demon trident / gold / wand of fire /\ + wand of draining / staff of summoning / any book / any good_item +KITEM: B = randbook disc:summoning +NSUBST: | = 1:B / *:| +MAP +cccccccccccccccccccccccccccccccccccccccccccccc +ccccccc.cccccc...................cccccc.cccccc +ccccc.....cccc.cc+ccccc+ccccc+cc.cccc.....cccc +cccc.."""..ccc.c...cccc.cccc...c.ccc..."...ccc +ccc.."..."..cc.+.A.ccc...ccc.<.+.cc.."....."cc +ccc."...3.".cc.c...cc.....cc...c.cc.""".3.".cc +cc.."..3.."....ccccc..c.c..ccccc.....".3."...c +cc..".3..."....cccc..cc.cc..cccc......3."....c +ccc.".....".cc.ccc.....4.....ccc.cc...."""""cc +ccc.."..."..cc.cc..cccc.cccc..cc.cc...".....cc +cccc.."""..ccc.+...............+.ccc.".....ccc +ccccc.....cccc.ccccccccccccccccc.cccc.....cccc +ccccccc.cccccc...................cccccc.cccccc +ccccccc.cccccc.cccccccc.cccccccc.cccccc.cccccc +ccccccc.ccccccc.cccccc.c.cccccc.ccccccc.cccccc +ccccccc.cccccccc.cccc.ccc.cccc.cccccccc.cccccc +ccccccc.ccccccccc.cc.ccccc.cc.ccccccccc.cccccc +ccccccc.cccccccccc..ccccccc..cccccccccc.cccccc +ccccccc.cccc.5...................5.cccc.cccccc +ccccccc.cccc..ccccccccc.ccccccccc..cccc.cccccc +ccccccc.ccccc..cccc$$$c.c$$$cccc..ccccc.cccccc +ccccccc.cccccc..ccc$$$+.+$$$ccc..cccccc.cccccc +ccccccc.cc.cccc..cc$$$c.c$$$cc..cccc.cc.cccccc +ccccccc......ccc..ccccc.ccccc..ccc.."...cccccc +ccccccc..."...ccc..cccc.cccc..ccc.."..".cccccc +cccccc.."..."..ccc..ccc.ccc..ccc.."..""".ccccc +cccccc..."2"...cccc..cc.cc..cccc."2222"..ccccc +ccccc.."2"""2"..cccc.......cccc.".........cccc +cccccc..""2""...ccccc."4".ccccc""""""""""ccccc +cccccc..."."....ccccc.."..ccccc........".ccccc +ccccccc.."""....ccccc.."..ccccc.......".cccccc +cccccccc........ccccc.....ccccc......".ccccccc +cccccccccc......cccc..ccc..cccc......ccccccccc +ccccccccccc.....ccc..ccccc..ccc.....cccccccccc +cccccccccccc.....c...ccccc...c.....ccccccccccc +cccccccccccc.."."..cc.ccc.cc.."."..ccccccccccc +ccccccccccccc.."..cccc.c.cccc.."..cccccccccccc +ccccccccccccc."...ccccc!ccccc...".cccccccccccc +cccccccccccccc.....ccc.c.ccc.....ccccccccccccc +ccccccccccccccc.....c.ccc.c.....cccccccccccccc +ccccccccccccccccc.....ccc.....cccccccccccccccc +ccccccccccccccccccc.........cccccccccccccccccc +ccccccccccccccccccccc.....cccccccccccccccccccc +ccccccccccccccccccccccc+cccccccccccccccccccccc +ccccccccccccccccccccc.....cccccccccccccccccccc +ccccccccccccccccccc..."""...cccccccccccccccccc +ccccccccccccccccc...""...""...cccccccccccccccc +cccccccccccccccc.."".......""..ccccccccccccccc +ccccccccccccccc.."..".....".."..cccccccccccccc +ccccccccccccccc."....lllll....".cccccccccccccc +cccccccccccccc.."...ll"."ll..."..ccccccccccccc +cccccccccccccc.".".ll"..."ll.".".ccccccccccccc +ccccccccccccc.."...."..1.."...."..cccccccccccc +ccccccccccccc.."..."".'''.""..."..cccccccccccc +ccccccccccccc..".."xx"'_'"xx".."..cccccccccccc +cccccccccccc....""..xx"'"xx..""....ccccccccccc +cccccccccccc|..."..".xxxxx.".."...|ccccccccccc +cccccccccccc||..."".........""...||ccccccccccc +cccccccccccc|||.................|||ccccccccccc +cccccccccccccccccccccccccccccccccccccccccccccc +ENDMAP -- cgit v1.2.3-54-g00ecf From e4206960f898f3ffc8ff7d507dfb227a232b085b Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Wed, 30 Dec 2009 01:08:16 -0800 Subject: Do not destroy items in deep water and lava In the past, this made sense, because deep water was forever. Now, with Shoals tides and Fedhas Sunlight, deep water can dry up, and it makes no sense for waterproof items to cease to exist after a stint as a reef. Scrolls are still destroyed in lava because they are flammable. --- crawl-ref/source/terrain.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crawl-ref/source/terrain.cc b/crawl-ref/source/terrain.cc index 2e3ac60cc7..b917b87b50 100644 --- a/crawl-ref/source/terrain.cc +++ b/crawl-ref/source/terrain.cc @@ -549,15 +549,16 @@ bool feat_destroys_item(dungeon_feature_type feat, const item_def &item, { switch (feat) { + case DNGN_SHALLOW_WATER: case DNGN_DEEP_WATER: if (noisy) mprf(MSGCH_SOUND, "You hear a splash."); - return (true); + return (false); case DNGN_LAVA: if (noisy) mprf(MSGCH_SOUND, "You hear a sizzling splash."); - return (true); + return (item.base_type == OBJ_SCROLLS); default: return (false); -- cgit v1.2.3-54-g00ecf From 41fe930161f170b0b71eddb284a6568f08ecb6e2 Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Wed, 30 Dec 2009 01:10:43 -0800 Subject: Don't generate splash messages twice --- crawl-ref/source/items.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 1437238afd..9a060c2933 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -1773,7 +1773,7 @@ bool move_item_to_grid( int *const obj, const coord_def& p, bool silent ) while (item.quantity > 1) { // If we can't copy the items out, we lose the surplus. - if (copy_item_to_grid(item, p, 1, false)) + if (copy_item_to_grid(item, p, 1, false, true)) --item.quantity; else item.quantity = 1; @@ -1883,7 +1883,7 @@ bool copy_item_to_grid( const item_def &item, const coord_def& p, origin_set_unknown(new_item); } - move_item_to_grid( &new_item_idx, p ); + move_item_to_grid( &new_item_idx, p, true ); if (is_blood_potion(item) && item.quantity != quant_drop) // partial drop only { -- cgit v1.2.3-54-g00ecf From 9483afb14439b650bda657d4f14c6a8dfdfc9e66 Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Wed, 30 Dec 2009 01:35:10 -0800 Subject: Hide items under deep water and lava --- crawl-ref/source/show.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/crawl-ref/source/show.cc b/crawl-ref/source/show.cc index c37901d7e0..103d00b09d 100644 --- a/crawl-ref/source/show.cc +++ b/crawl-ref/source/show.cc @@ -234,15 +234,22 @@ void show_def::_update_item_at(const coord_def &gp, const coord_def &ep) glyph g = get_item_glyph(eitem); const dungeon_feature_type feat = grd(gp); + + if ((feat == DNGN_DEEP_WATER && you.species != SP_MERFOLK) + || feat == DNGN_LAVA) + return; + if (Options.feature_item_brand && is_critical_feature(feat)) ecol |= COLFLAG_FEATURE_ITEM; else if (Options.trap_item_brand && feat_is_trap(feat)) ecol |= COLFLAG_TRAP_ITEM; else { - const unsigned short gcol = env.grid_colours(gp); - ecol = (feat == DNGN_SHALLOW_WATER) ? - (gcol != BLACK ? gcol : CYAN) : g.col; + ecol = g.col; + + if (feat_is_water(feat)) + ecol = _feat_colour(gp, feat); + // monster(mimic)-owned items have link = NON_ITEM+1+midx if (eitem->link > NON_ITEM && igrd(gp) != NON_ITEM) ecol |= COLFLAG_ITEM_HEAP; -- cgit v1.2.3-54-g00ecf From 4e7ce852fffc07900790e7923dd381b776b82599 Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Wed, 30 Dec 2009 01:47:57 -0800 Subject: Deny apportation of items in deep water / lava --- crawl-ref/source/spells4.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc index 9f3f03d736..03dbf76e72 100644 --- a/crawl-ref/source/spells4.cc +++ b/crawl-ref/source/spells4.cc @@ -1720,6 +1720,15 @@ bool cast_apportation(int pow, const coord_def& where) return (false); } + // Letting mostly-melee characters spam apport after every Shoals + // fight seems like it has too much grinding potential. We could + // weaken this for high power. + if (grd(where) == DNGN_DEEP_WATER || grd(where) == DNGN_LAVA) + { + mpr("The density of the terrain blocks your spell."); + return (false); + } + // Let's look at the top item in that square... // And don't allow apporting from shop inventories. const int item_idx = igrd(where); -- cgit v1.2.3-54-g00ecf From 5b697e0c33dbab41e41c63df1ef2b366fbf0a8d9 Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Wed, 30 Dec 2009 01:48:16 -0800 Subject: Shoals tide washes over items, does not push them away --- crawl-ref/source/dgn-shoals.cc | 34 +++++----------------------------- 1 file changed, 5 insertions(+), 29 deletions(-) diff --git a/crawl-ref/source/dgn-shoals.cc b/crawl-ref/source/dgn-shoals.cc index 3547932a43..028a8984bb 100644 --- a/crawl-ref/source/dgn-shoals.cc +++ b/crawl-ref/source/dgn-shoals.cc @@ -866,8 +866,7 @@ static void _shoals_run_tide(int &tide, int &acc) acc = in_decel_margin? acc / 2 : acc * 2; } -static coord_def _shoals_escape_place_from(coord_def bad_place, - actor *act, item_def *it) +static coord_def _shoals_escape_place_from(coord_def bad_place, actor *act) { int best_height = -1000; coord_def chosen; @@ -875,8 +874,7 @@ static coord_def _shoals_escape_place_from(coord_def bad_place, { coord_def p(*ai); const dungeon_feature_type feat(grd(p)); - if ((!act || (feat_has_solid_floor(feat) && !actor_at(p))) - && (!it || !feat_destroys_item(feat, *it))) + if (feat_has_solid_floor(feat) && !actor_at(p)) { if (best_height == -1000 || shoals_heights(p) > best_height) { @@ -888,27 +886,6 @@ static coord_def _shoals_escape_place_from(coord_def bad_place, return chosen; } -static bool _shoals_tide_sweep_items_clear(coord_def c) -{ - int link = igrd(c); - if (link == NON_ITEM) - return true; - - for (stack_iterator si(c); si; ++si) - { - const coord_def target(_shoals_escape_place_from(c, NULL, &*si)); - // Don't abort tide entry because of items. If we can't sweep the - // item clear here, let dungeon_terrain_changed teleport the item - // to the nearest safe square. - int id = si.link(); - - if (!target.origin()) - move_item_to_grid(&id, target); - } - - return true; -} - static bool _shoals_tide_sweep_actors_clear(coord_def c) { actor *victim = actor_at(c); @@ -927,19 +904,18 @@ static bool _shoals_tide_sweep_actors_clear(coord_def c) if (monster_habitable_grid(mvictim, DNGN_DEEP_WATER)) return true; } - coord_def evacuation_point(_shoals_escape_place_from(c, victim, NULL)); + coord_def evacuation_point(_shoals_escape_place_from(c, victim)); // The tide moves on even if we cannot evacuate the tile! if (!evacuation_point.origin()) victim->move_to_pos(evacuation_point); return true; } -// The tide will attempt to push items and non-water-capable monsters to +// The tide will attempt to push non-water-capable monsters to // adjacent squares. static bool _shoals_tide_sweep_clear(coord_def c) { - return _shoals_tide_sweep_items_clear(c) - && _shoals_tide_sweep_actors_clear(c); + return _shoals_tide_sweep_actors_clear(c); } static void _shoals_apply_tide_feature_at(coord_def c, -- cgit v1.2.3-54-g00ecf From 2bbd33ecce444f4a14e817355c67d5d86d505c16 Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Wed, 30 Dec 2009 02:02:37 -0800 Subject: Killing a merfolk should not cause it to leap 10 feet into the air and drop its gear from a height. --- crawl-ref/source/items.cc | 9 ++++++++- crawl-ref/source/mon-stuff.cc | 5 +++-- crawl-ref/source/monster.cc | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 9a060c2933..1aaeda2dec 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -1995,7 +1995,14 @@ bool drop_item( int item_dropped, int quant_drop, bool try_offer ) mprf("You drop %s.", quant_name(you.inv[item_dropped], quant_drop, DESC_NOCAP_A).c_str()); - if (feat_destroys_item(my_grid, you.inv[item_dropped], !silenced(you.pos()))) + bool quiet = silenced(you.pos()); + + // If you drop an item in as a merfolk, it is below the water line and + // makes no noise falling. + if (you.swimming()) + quiet = true; + + if (feat_destroys_item(my_grid, you.inv[item_dropped], !quiet)) ; else if (strstr(you.inv[item_dropped].inscription.c_str(), "=s") != 0) StashTrack.add_stash(); diff --git a/crawl-ref/source/mon-stuff.cc b/crawl-ref/source/mon-stuff.cc index bcaeecc95a..cb14b67710 100644 --- a/crawl-ref/source/mon-stuff.cc +++ b/crawl-ref/source/mon-stuff.cc @@ -277,7 +277,8 @@ void monster_drop_ething(monsters *monster, bool mark_item_origins, if (mark_item_origins && mitm[item].is_valid()) origin_set_monster(mitm[item], monster); - move_item_to_grid(&item, monster->pos()); + // If a monster is swimming, the items are ALREADY underwater + move_item_to_grid(&item, monster->pos(), monster->swimming()); } monster->inv[i] = NON_ITEM; @@ -466,7 +467,7 @@ int place_monster_corpse(const monsters *monster, bool silent, return (-1); } - move_item_to_grid(&o, monster->pos()); + move_item_to_grid(&o, monster->pos(), !monster->swimming()); if (you.see_cell(monster->pos())) { diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index de3af6b0a9..8d0f02f428 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -1174,7 +1174,7 @@ bool monsters::drop_item(int eslot, int near) pitem->name(DESC_NOCAP_A).c_str()); } - if (!move_item_to_grid(&item_index, pos())) + if (!move_item_to_grid(&item_index, pos(), swimming())) { // Re-equip item if we somehow failed to drop it. if (was_unequipped) -- cgit v1.2.3-54-g00ecf From e9f0cdca10075a3f590e355199ee70880c593f20 Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Wed, 30 Dec 2009 02:22:09 -0800 Subject: Let tide break up piles (dshaligram) --- crawl-ref/source/dgn-shoals.cc | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/crawl-ref/source/dgn-shoals.cc b/crawl-ref/source/dgn-shoals.cc index 028a8984bb..57025a67d4 100644 --- a/crawl-ref/source/dgn-shoals.cc +++ b/crawl-ref/source/dgn-shoals.cc @@ -866,7 +866,8 @@ static void _shoals_run_tide(int &tide, int &acc) acc = in_decel_margin? acc / 2 : acc * 2; } -static coord_def _shoals_escape_place_from(coord_def bad_place, actor *act) +static coord_def _shoals_escape_place_from(coord_def bad_place, + actor *act, item_def *it) { int best_height = -1000; coord_def chosen; @@ -874,7 +875,10 @@ static coord_def _shoals_escape_place_from(coord_def bad_place, actor *act) { coord_def p(*ai); const dungeon_feature_type feat(grd(p)); - if (feat_has_solid_floor(feat) && !actor_at(p)) + if (!feat_has_solid_floor(feat)) + continue; + + if (!act || !actor_at(p)) { if (best_height == -1000 || shoals_heights(p) > best_height) { @@ -886,6 +890,31 @@ static coord_def _shoals_escape_place_from(coord_def bad_place, actor *act) return chosen; } +static bool _shoals_tide_sweep_items_clear(coord_def c) +{ + int link = igrd(c); + if (link == NON_ITEM) + return true; + + for (stack_iterator si(c); si; ++si) + { + const coord_def target(_shoals_escape_place_from(c, NULL, &*si)); + // Don't abort tide entry because of items. If we can't sweep the + // item clear here, let dungeon_terrain_changed teleport the item + // to the nearest safe square. + int id = si.link(); + + // Let the tide break up stacks + if (!one_chance_in(2)) + continue; + + if (!target.origin()) + move_item_to_grid(&id, target); + } + + return true; +} + static bool _shoals_tide_sweep_actors_clear(coord_def c) { actor *victim = actor_at(c); @@ -904,18 +933,19 @@ static bool _shoals_tide_sweep_actors_clear(coord_def c) if (monster_habitable_grid(mvictim, DNGN_DEEP_WATER)) return true; } - coord_def evacuation_point(_shoals_escape_place_from(c, victim)); + coord_def evacuation_point(_shoals_escape_place_from(c, victim, NULL)); // The tide moves on even if we cannot evacuate the tile! if (!evacuation_point.origin()) victim->move_to_pos(evacuation_point); return true; } -// The tide will attempt to push non-water-capable monsters to +// The tide will attempt to push items and non-water-capable monsters to // adjacent squares. static bool _shoals_tide_sweep_clear(coord_def c) { - return _shoals_tide_sweep_actors_clear(c); + return _shoals_tide_sweep_items_clear(c) + && _shoals_tide_sweep_actors_clear(c); } static void _shoals_apply_tide_feature_at(coord_def c, -- cgit v1.2.3-54-g00ecf From b32bebf09b94e9a900e3b0bbdd2e9a43a89a97a0 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Wed, 30 Dec 2009 20:31:17 +1000 Subject: Further tweaks. --- crawl-ref/source/dat/wizlab.des | 188 +--------------------------------------- 1 file changed, 3 insertions(+), 185 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 2a7c217a5c..65274964b5 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -1592,190 +1592,6 @@ cccccccccccccccccccccuc.McucccccccccccccL....c cccccccccccccccccccccccccccccccccccccccccccccc ENDMAP -############################################################################### -# Random wizard (Death theme) (by Mu.) -# -NAME: wizlab_random2 -ORIENT: encompass -TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup -LFLOORCOL: darkgrey -COLOUR: =c = white -COLOUR: " = red -KFEAT: _ = altar_kikubaaqudgha -KMONS: s = slave -NSUBST: ' = 1:= / *:c -NSUBST: ; = 1:= / *:c -KMONS: V = vampire / vampire knight / vampire mage -KMONS: a = patrolling vampire -KMONS: z = skeletal warrior -KMONS: p = shadow -### statue needs a description still -### This statue really needs vampiric draining as a monster spell! -KMONS: 8 = ice statue col:darkgrey spells:pain;bolt_of_draining;pain;\ - pain;pain;major_healing name:black_statue \ - name_replace name_descriptor hd:15 hp:150 -KMONS: L = patrolling lich / w:5 patrolling ancient lich -KMONS: u = patrolling mummy / w:2 patrolling guardian mummy -KMONS: M = patrolling mummy priest / w:2 patrolling greater mummy -MARKER: u = lua:fog_machine { \ - pow_max = 10, delay_min = 10, delay_max = 40, \ - size = 1, size_buildup_amnt = 5, \ - size_buildup_time = 25, cloud_type = "foul pestilence" \ - } -MARKER: M = lua:fog_machine { \ - pow_max = 10, delay_min = 10, delay_max = 40, \ - size = 1, size_buildup_amnt = 5, \ - size_buildup_time = 25, cloud_type = "foul pestilence" \ - } -MARKER: ! = lua:fog_machine { \ - pow_max = 10, delay_min = 10, delay_max = 40, \ - size = 1, size_buildup_amnt = 5, \ - size_buildup_time = 25, cloud_type = "foul pestilence" \ - } -KFEAT: ! = granite_statue -KITEM: * = book of unlife -KITEM: % = dagger unrand:morg / demon blade unrand:leech / dagger unrand:vampires_tooth -KITEM: $ = potion of healing / potion of heal wounds / potion of decay / \ - scroll of torment / potion of blood / w:20 gold -KITEM: ^ = potion of healing / potion of heal wounds / potion of decay / \ - scroll of torment / potion of blood / w:20 gold -KFEAT: ^ = alarm trap -KITEM: | = ring of life protection / amulet of warding / \ - wand of draining / wand of healing / any book / acquire book / \ - staff of death / potion of healing / potion of heal wounds / \ - potion of decay / potion of blood -SUBST: B = $$|.. -: wizlab_setup(_G, "Random") -MAP -cccccccccccccccccccccccccccccccccccccccccccccc -cccccccccccccccccccccc|*|ccccccccccccccccccccc -ccccccccccccccccccccc|...|cccccccccccccccccccc -cccccccccccccccccccc.......ccccccccccccccccccc -cccccccc$$$c...c...c..._...c...c...c$$$ccccccc -cccccccc$$$+.L.+.!.+.......+.!.+.L.+$$$ccccccc -cccccccc$$$c...c...c.......c...c...c$$$ccccccc -cccccccccccccccccccc.......ccccccccccccccccccc -ccccccccccccccccccccccc+cccccccccccccccccccccc -cccccccccccccccccccccc...ccccccccccccccccccccc -cccccccccccccccccccc.......ccccccccccccccccccc -cccccccccccccccccc.....c.....ccccccccccccccccc -ccccccccccccccccc......c......cccccccccccccccc -cccccccccccccccc.......c.......ccccccccccccccc -cccccccccccccccc.......c.......cccccccc..ccccc -cccccccccccccccc.......c.......ccccccc....cccc -cccccccccccccccc.szs...cnnn....cccccc..cc..ccc -cccccccccccccccc.sss.G.cnsn....ccccc..cccc..cc -cc............cc.......cnnn....cccc..ccccc..cc -cc............cc.......c.".....ccc..ccccc..ccc -cc.ccccccccc..cc.......c.".....cc..ccccc..cccc -cc.cG$....|c..cc.......c.".....c..ccccc..ccccc -cc.c$L.....c..cc.......c.".....c..ccc...cccccc -cc.c.......c..cc.....G.c.Y.V.V.+.ccn...ccccccc -cc.c.......c..cc.......c.".....cccsn....cccccc -cc.c.......c..cc.......c.".....ccs.n...ccccccc -cc.c.......+..cc.......c.".....ccc.n....cccccc -cc.c%......+..cc.......c.".....ccccn.....ncccc -cc.ccccccccccccc.......cnnn....cccsn..p..nsccc -cc.............+.....G.cnsn....cc..n.ppp.n.scc -cccccccccccccccc.......cnnn....cccsn.p8p.n..cc -cccccccccccccccc.......c.......cccccpppppncccc -cccccccccccccccc.......c.......ccccccccccccccc -cccBBBBBBBBBBccc.......c.......ccccacacacacccc -cccBBBBBBBBBBccc.......cnnn....cccc+c+c+c+cccc -cccBBBc''cBBBccc.....G.cnsn....ccc.........ccc -ccc'c'cM.c'ccccc.......cnnn....ccc.........+ac -cccucuc..cuccccc.......c.".....ccc.........ccc -ccc.c.c..c.ccccc.......c.".....cc..........+ac -ccc+c+c++c+ccccc.......c.".....cc..........ccc -cc.............c.......c.".....c.....^^^...+ac -cc.T...........+.....G.c.Y.....+.....^Y^...ccc -cc.............c.......c.".....c.....^^^...+ac -ccc+c+c+c++ccccc.......c.".....cc..........ccc -ccc.c.c.c..ccccc.......c.".....cc..........+ac -cccucucuc..ccccc.......c.".....ccc.........ccc -ccc;c;c;c.Mccccc.szs...cnnn....ccc.........+ac -cccBBBBBc;;ccccc.sss.G.cnsnV.V.ccc.........ccc -cccBBBBBBBBBcccc.......cnnn....cccc+c+c+c+cccc -cccBBBBBBBBBcccc.......c.......ccccacacacacccc -cccccccccccccccc.......c.......ccccccccccccccc -cccccccccccccccc.......c.......ccccccccccccccc -cccccccccccccccc.......c.......ccccccccccccccc -cccccccccccccccc.....ccccc.....ccccccccccccccc -cccccccccccccccc...ccc...ccc...ccccccccccccccc -ccccccccccccccccc+cc.......cc+cccccccccccccccc -cccccccccccccccc...............ccccccccccccccc -cccccccccccccccc.....<.A.<.....ccccccccccccccc -cccccccccccccccc...............ccccccccccccccc -cccccccccccccccccccccccccccccccccccccccccccccc -ENDMAP - -NAME: wizlab_random3 -ORIENT: encompass -TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup -MAP -cccccccccccccccccccccccccccccccvvvvvvvvvvvvvvv -ccccccccccccccclllllll.........+.v.!.v......%v -ccccccccccccclllllllllll.......+.v.v.v.v...8%v -ccccccccccclllllllllllllll.....v.!.v.!.v....%v -cccccccccclllllllllllllllll....vvvvvvvvv.8.1%v -ccccccccclllllllllllllllllll...vcccccccc%%%%%v -ccccccccclllllll....llllllll...vcccccccccccccv -cccccccclllllll......llllllll..vvvvvvvvvvvvvvv -cccccccclllllll..18..........................c -cccccccllllllll..22..........................c -cccccccllllllll......lllllllllvv+vvvvvvvvvvvvv -ccccccclllllllll....llllllllllv.......+......v -cccccccllllllllll..lllllllllllv.......v.....2v -cccccccllllllllll..lllllllllllv.......v.....2v -cccccccllllllllll..lllllllllllv|||||||v.....2v -cccccccllllllllll..lllllllllllvvvvvvvvv.....2v -cccccccclllllllll..llllllllllllcccccccv......v -cccccccclllllllll..lllllllllllccccccccv......v -cccccccccllllllll..lllllllllllllccccccv......v -cccccccccllllllll..llllllllllllllccccvv+vvv+vv -cccccccccccclllll..llllllllllllllccccv%%%v%%%v -cccccvvvvvvvvvvll..lllllllllllllcllccv%%%v%%%v -cccccvll......v.....llllllllllllllcccv%%%v%%%v -cccccvl1......v......llllllllllllllllvvAvvvBvv -cccccvcc......+.......vlllllllllllllllvavcv.vc -cccccvll......v.......vclclllllllllllcvavcvbvc -cccccvl1......v.......vvvvlllllllllcccvavcvbvc -cccccvcl......v...........llllllllllllvavcvbvc -cccccvlllll.lllll.lllllllllllllllllllcvavcvbvc -cccccvcl......v.......vvvvvvlllllllllcvavcvbvc -cccccvll......v.......vccclllllllllllcvavcvbvc -cccccvl1......vvvvvv+vvcccllllllllllccvavvvbvc -cccccvcc......v.......vccccllllllllllcvaa.bbvc -cccccvll......v8..2..8vcccclllllllllccvvv+vvvc -cccccvl1......v.......vccccclllllllllllcv.vccc -cccccvvvvvvvvvv.......vccccllllllllllllcv.vccc -ccccccccccccccv.......vcccllllllllllllccv.vccc -cvvvvvvvccccccvvvv++vvvc....lllllllcllccv.vccc -cv.....vccccc....o..o........lllllllllccv.vccc -cv. Date: Wed, 30 Dec 2009 20:37:50 +1000 Subject: Preparation for merging into master. --- crawl-ref/source/dat/wizlab.des | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 65274964b5..6d8e040b6a 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -837,7 +837,8 @@ ENDMAP # Todo: work out what happens next??? NAME: wizlab_alistair ORIENT: encompass -TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +TAGS: no_item_gen no_monster_gen no_rotate allow_dup +# unfinished : wizlab_setup(_G, "Alistair's Brewery") SHUFFLE: CYHB KFEAT: CYHB = . @@ -883,7 +884,7 @@ ENDMAP # NAME: wizlab_borgnjor ORIENT: encompass -TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +#TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup : wizlab_setup(_G, "Borgnjor's Mortuary") MAP ENDMAP @@ -1057,7 +1058,7 @@ ENDMAP # NAME: wizlab_iskenderun ORIENT: encompass -TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +#TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup : wizlab_setup(_G, "Iskenderun's Mystic Tower") MAP ENDMAP @@ -1067,7 +1068,7 @@ ENDMAP # NAME: wizlab_lee ORIENT: encompass -TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +#TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup : wizlab_setup(_G, "Lee's Rapid Deconstructor") MAP ENDMAP @@ -1077,7 +1078,7 @@ ENDMAP # NAME: wizlab_lehudib ORIENT: encompass -TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +#TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup : wizlab_setup(_G, "Lehudib's Crystal Spire") MAP ENDMAP @@ -1087,7 +1088,7 @@ ENDMAP # NAME: wizlab_maxwell ORIENT: encompass -TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +#TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup : wizlab_setup(_G, "Maxwell's Forge") MAP ENDMAP @@ -1097,7 +1098,7 @@ ENDMAP # NAME: wizlab_olgreb ORIENT: encompass -TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +#TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup : wizlab_setup(_G, "Olgreb's Toxic Laboratory") MAP ENDMAP @@ -1107,7 +1108,8 @@ ENDMAP # NAME: wizlab_ozocubu ORIENT: encompass -TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +TAGS: no_item_gen no_monster_gen no_rotate allow_dup +# unfinished MONS: skeletal warrior patrolling col:lightblue ; any weapon good_item \ . ice dragon armour MONS: ice statue spells:ice_storm col:darkgrey name:black name_adjective @@ -1217,7 +1219,7 @@ ENDMAP # NAME: wizlab_zonguldrok ORIENT: encompass -TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +#TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup : wizlab_setup(_G, "Zonguldrok's Shrine") MAP ENDMAP @@ -1385,7 +1387,7 @@ ENDMAP # NAME: wizlab_botono ORIENT: encompass -TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +#TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup : wizlab_setup(_G, "Botono's Bayou") MAP ENDMAP @@ -1395,7 +1397,7 @@ ENDMAP # NAME: wizlab_ukta ORIENT: encompass -TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +#TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup : wizlab_setup(_G, "Ukta's Hut") MAP ENDMAP @@ -1405,7 +1407,7 @@ ENDMAP # NAME: wizlab_alchemist ORIENT: encompass -TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +#TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup : wizlab_setup(_G, "The Alchemist's Tower") MAP ENDMAP @@ -1519,7 +1521,7 @@ ENDMAP # NAME: wizlab_random1 ORIENT: encompass -TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup +#TAGS: wizlab no_item_gen no_monster_gen no_rotate allow_dup LFLOORCOL: darkgrey COLOUR: =c = white COLOUR: " = red -- cgit v1.2.3-54-g00ecf From 9e0d51966b2dc524073c89e2283bd6b59566c825 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Wed, 30 Dec 2009 20:46:06 +1000 Subject: And actually provide depths for the maps. --- crawl-ref/source/dat/wizlab.des | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crawl-ref/source/dat/wizlab.des b/crawl-ref/source/dat/wizlab.des index 6d8e040b6a..03a12ccc13 100644 --- a/crawl-ref/source/dat/wizlab.des +++ b/crawl-ref/source/dat/wizlab.des @@ -147,6 +147,8 @@ function wizlab_setup (e, wizlab_desc) end }} +default-depth: Vault:2-7, Crypt, D:22-27 + ############################################################################### # Portal entrances. # -- cgit v1.2.3-54-g00ecf From 74c535b701b7642b74b45934e78cadd7ab67a0e4 Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Wed, 30 Dec 2009 03:27:21 -0800 Subject: Ignore obscured items in the UI I probably missed a few spots. --- crawl-ref/source/directn.cc | 14 +++++++------- crawl-ref/source/food.cc | 12 ++++++------ crawl-ref/source/items.cc | 4 ++-- crawl-ref/source/l_item.cc | 2 +- crawl-ref/source/mon-act.cc | 9 +++++++++ crawl-ref/source/ouch.cc | 4 ++++ crawl-ref/source/player.cc | 11 +++++++++++ crawl-ref/source/player.h | 1 + crawl-ref/source/religion.cc | 7 ++++--- crawl-ref/source/show.cc | 12 ++++-------- crawl-ref/source/showsymb.cc | 2 +- crawl-ref/source/spells4.cc | 4 ++-- crawl-ref/source/stash.cc | 8 ++++---- crawl-ref/source/stuff.cc | 4 ++-- crawl-ref/source/stuff.h | 2 +- crawl-ref/source/tilepick.cc | 4 ++-- crawl-ref/source/tilereg.cc | 2 +- crawl-ref/source/tilesdl.cc | 4 ++-- crawl-ref/source/travel.cc | 4 ++-- crawl-ref/source/tutorial.cc | 4 ++-- 20 files changed, 68 insertions(+), 46 deletions(-) diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index 047dcd3974..58aac3b22a 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -523,7 +523,7 @@ void full_describe_view() if (unknown_mimic) // It'll be on top. list_items.push_back(get_mimic_item(mon)); - const int oid = igrd(*ri); + const int oid = you.visible_igrd(*ri); if (oid == NON_ITEM) continue; @@ -1764,10 +1764,10 @@ std::string get_terse_square_desc(const coord_def &gc) else desc = mons.full_name(DESC_PLAIN, true); } - else if (igrd(gc) != NON_ITEM) + else if (you.visible_igrd(gc) != NON_ITEM) { - if (mitm[igrd(gc)].is_valid()) - desc = mitm[igrd(gc)].name(DESC_PLAIN); + if (mitm[you.visible_igrd(gc)].is_valid()) + desc = mitm[you.visible_igrd(gc)].name(DESC_PLAIN); } else desc = feature_description(gc, false, DESC_PLAIN, false); @@ -1793,7 +1793,7 @@ void get_square_desc(const coord_def &c, describe_info &inf, return; const monsters* mons = monster_at(c); - const int oid = igrd(c); + const int oid = you.visible_igrd(c); if (mons && mons->visible_to(&you)) { @@ -1836,7 +1836,7 @@ void full_describe_square(const coord_def &c) return; const monsters* mons = monster_at(c); - const int oid = igrd(c); + const int oid = you.visible_igrd(c); if (mons && mons->visible_to(&you)) { @@ -3425,7 +3425,7 @@ static void _describe_cell(const coord_def& where, bool in_range) cloud_described = true; } - int targ_item = igrd(where); + int targ_item = you.visible_igrd(where); if (targ_item != NON_ITEM) { diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index bd2db8d728..d17a4a5371 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -452,7 +452,7 @@ static bool _have_corpses_in_pack(bool remind) bool butchery(int which_corpse) { - if (igrd(you.pos()) == NON_ITEM) + if (you.visible_igrd(you.pos()) == NON_ITEM) { if (!_have_corpses_in_pack(false)) mpr("There isn't anything here!"); @@ -503,7 +503,7 @@ bool butchery(int which_corpse) int num_corpses = 0; int corpse_id = -1; bool prechosen = (which_corpse != -1); - for (stack_iterator si(you.pos()); si; ++si) + for (stack_iterator si(you.pos(), true); si; ++si) { if (si->base_type == OBJ_CORPSES && si->sub_type == CORPSE_BODY) { @@ -577,7 +577,7 @@ bool butchery(int which_corpse) bool did_weap_swap = false; bool first_corpse = true; int keyin; - for (stack_iterator si(you.pos()); si; ++si) + for (stack_iterator si(you.pos(), true); si; ++si) { if (si->base_type != OBJ_CORPSES || si->sub_type != CORPSE_BODY) continue; @@ -790,7 +790,7 @@ bool eat_food(int slot) if (result != -2) // else skip ahead to inventory { - if (igrd(you.pos()) != NON_ITEM) + if (you.visible_igrd(you.pos()) != NON_ITEM) { result = eat_from_floor(true); if (result == 1) @@ -1186,7 +1186,7 @@ int eat_from_floor(bool skip_chunks) bool found_valid = false; std::vector food_items; - for (stack_iterator si(you.pos()); si; ++si ) + for (stack_iterator si(you.pos(), true); si; ++si ) { if (you.species == SP_VAMPIRE) { @@ -1483,7 +1483,7 @@ int prompt_eat_chunks() // First search the stash on the floor, unless levitating. if (you.flight_mode() != FL_LEVITATE) { - for (stack_iterator si(you.pos()); si; ++si) + for (stack_iterator si(you.pos(), true); si; ++si) { if (you.species == SP_VAMPIRE) { diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 1aaeda2dec..fe96b86d1b 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -1171,7 +1171,7 @@ void pickup() return; } - int o = igrd(you.pos()); + int o = you.visible_igrd(you.pos()); const int num_nonsquelched = _count_nonsquelched_items(o); if (o == NON_ITEM) @@ -2578,7 +2578,7 @@ static void _do_autopickup() return; } - int o = igrd(you.pos()); + int o = you.visible_igrd(you.pos()); std::string pickup_warning; while (o != NON_ITEM) diff --git a/crawl-ref/source/l_item.cc b/crawl-ref/source/l_item.cc index e8dc23a2b1..ecd343be2a 100644 --- a/crawl-ref/source/l_item.cc +++ b/crawl-ref/source/l_item.cc @@ -48,7 +48,7 @@ void lua_set_exclusive_item(const item_def *item) void lua_push_floor_items(lua_State *ls) { - lua_push_items(ls, igrd(you.pos())); + lua_push_items(ls, you.visible_igrd(you.pos())); } void lua_push_inv_items(lua_State *ls = NULL) diff --git a/crawl-ref/source/mon-act.cc b/crawl-ref/source/mon-act.cc index 18ad9a1b01..6aca56ffa8 100644 --- a/crawl-ref/source/mon-act.cc +++ b/crawl-ref/source/mon-act.cc @@ -2183,6 +2183,7 @@ static bool _monster_eat_item(monsters *monster, bool nearby) bool death_ooze_ate_good = false; bool death_ooze_ate_corpse = false; + // Jellies can swim, so don't check water for (stack_iterator si(monster->pos()); si && eaten < max_eat && hps_changed < 50; ++si) { @@ -2466,6 +2467,14 @@ static bool _handle_pickup(monsters *monster) if (monster->asleep() || monster->submerged()) return (false); + // Hack - Harpies fly over water, but we don't have a general + // system for monster igrd yet. Flying intelligent monsters + // (kenku!) would also count here. + dungeon_feature_type feat = grd(monster->pos()); + + if ((feat == DNGN_LAVA || feat == DNGN_DEEP_WATER) && !monster->flight_mode()) + return (false); + const bool nearby = mons_near(monster); int count_pickup = 0; diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index 34f8bc736c..2813101bbe 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -551,6 +551,10 @@ bool expose_items_to_element(beam_type flavour, const coord_def& where, if (target_class == OBJ_UNASSIGNED) return (false); + // Beams fly *over* water and lava. + if (grd(where) == DNGN_LAVA || grd(where) == DNGN_DEEP_WATER) + return (false); + for (stack_iterator si(where); si; ++si) { if (!si->is_valid()) diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index e490908d1b..564bf18de1 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -5549,6 +5549,17 @@ bool player::can_swim() const return (species == SP_MERFOLK && merfolk_change_is_safe(true)); } +int player::visible_igrd(const coord_def &where) const +{ + if (grd(where) == DNGN_LAVA + || (grd(where) == DNGN_DEEP_WATER && species != SP_MERFOLK)) + { + return (NON_ITEM); + } + + return igrd(where); +} + bool player::swimming() const { return in_water() && can_swim(); diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h index 1e5c58d47a..9c64409023 100644 --- a/crawl-ref/source/player.h +++ b/crawl-ref/source/player.h @@ -323,6 +323,7 @@ public: bool in_water() const; bool can_swim() const; + int visible_igrd(const coord_def&) const; bool is_levitating() const; bool cannot_speak() const; bool invisible() const; diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 3845be27d2..80b277bc67 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -2266,7 +2266,7 @@ static bool _confirm_pray_sacrifice(god_type god) return (false); } - for (stack_iterator si(you.pos()); si; ++si) + for (stack_iterator si(you.pos(), true); si; ++si) { if (_god_likes_item(god, *si) && (_is_risky_sacrifice(*si) @@ -3811,7 +3811,7 @@ bool ely_destroy_weapons() god_acting gdact; bool success = false; - for (stack_iterator si(you.pos()); si; ++si) + for (stack_iterator si(you.pos(), true); si; ++si) { item_def& item(*si); if (item.base_type != OBJ_WEAPONS @@ -4692,7 +4692,8 @@ void offer_items() int i = igrd(you.pos()); - if (!god_likes_items(you.religion) && i != NON_ITEM) + if (!god_likes_items(you.religion) && i != NON_ITEM + && you.visible_igrd(you.pos()) != NON_ITEM) { simple_god_message(" doesn't care about such mundane gifts.", you.religion); diff --git a/crawl-ref/source/show.cc b/crawl-ref/source/show.cc index 103d00b09d..0148d92438 100644 --- a/crawl-ref/source/show.cc +++ b/crawl-ref/source/show.cc @@ -224,8 +224,8 @@ void show_def::_update_item_at(const coord_def &gp, const coord_def &ep) const monsters* m = monster_at(gp); if (m && mons_is_unknown_mimic(m)) eitem = &get_mimic_item(m); - else if (igrd(gp) != NON_ITEM) - eitem = &mitm[igrd(gp)]; + else if (you.visible_igrd(gp) != NON_ITEM) + eitem = &mitm[you.visible_igrd(gp)]; else return; @@ -235,10 +235,6 @@ void show_def::_update_item_at(const coord_def &gp, const coord_def &ep) const dungeon_feature_type feat = grd(gp); - if ((feat == DNGN_DEEP_WATER && you.species != SP_MERFOLK) - || feat == DNGN_LAVA) - return; - if (Options.feature_item_brand && is_critical_feature(feat)) ecol |= COLFLAG_FEATURE_ITEM; else if (Options.trap_item_brand && feat_is_trap(feat)) @@ -251,7 +247,7 @@ void show_def::_update_item_at(const coord_def &gp, const coord_def &ep) ecol = _feat_colour(gp, feat); // monster(mimic)-owned items have link = NON_ITEM+1+midx - if (eitem->link > NON_ITEM && igrd(gp) != NON_ITEM) + if (eitem->link > NON_ITEM && you.visible_igrd(gp) != NON_ITEM) ecol |= COLFLAG_ITEM_HEAP; else if (eitem->link < NON_ITEM && !crawl_state.arena) ecol |= COLFLAG_ITEM_HEAP; @@ -260,7 +256,7 @@ void show_def::_update_item_at(const coord_def &gp, const coord_def &ep) } #ifdef USE_TILE - int idx = igrd(gp); + int idx = you.visible_igrd(gp); if (idx != NON_ITEM) { if (feat_is_stair(feat)) diff --git a/crawl-ref/source/showsymb.cc b/crawl-ref/source/showsymb.cc index 6f3c77fea6..6019065d7e 100644 --- a/crawl-ref/source/showsymb.cc +++ b/crawl-ref/source/showsymb.cc @@ -100,7 +100,7 @@ static int _get_mons_colour(const monsters *mons) col |= COLFLAG_FEATURE_ITEM; } else if (Options.heap_brand != CHATTR_NORMAL - && igrd(mons->pos()) != NON_ITEM + && you.visible_igrd(mons->pos()) != NON_ITEM && !crawl_state.arena) { col |= COLFLAG_ITEM_HEAP; diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc index 03dbf76e72..d4c78afc48 100644 --- a/crawl-ref/source/spells4.cc +++ b/crawl-ref/source/spells4.cc @@ -1182,7 +1182,7 @@ void cast_fulsome_distillation(int /*pow*/) int corpse = -1; // Search items at the player's location for corpses. - for (stack_iterator si(you.pos()); si; ++si) + for (stack_iterator si(you.pos(), true); si; ++si) { if (si->base_type == OBJ_CORPSES && si->sub_type == CORPSE_BODY) { @@ -1476,7 +1476,7 @@ bool cast_fragmentation(int pow, const dist& spd) goto all_done; } - for (stack_iterator si(spd.target); si; ++si) + for (stack_iterator si(spd.target, true); si; ++si) { if (si->base_type == OBJ_CORPSES) { diff --git a/crawl-ref/source/stash.cc b/crawl-ref/source/stash.cc index 147dbc67d8..f40dc4005e 100644 --- a/crawl-ref/source/stash.cc +++ b/crawl-ref/source/stash.cc @@ -326,7 +326,7 @@ static bool _grid_has_mimic_item(const coord_def& pos) static bool _grid_has_perceived_item(const coord_def& pos) { - return (igrd(pos) != NON_ITEM || _grid_has_mimic_item(pos)); + return (you.visible_igrd(pos) != NON_ITEM || _grid_has_mimic_item(pos)); } static bool _grid_has_perceived_multiple_items(const coord_def& pos) @@ -336,7 +336,7 @@ static bool _grid_has_perceived_multiple_items(const coord_def& pos) if (_grid_has_mimic_item(pos)) ++count; - for (stack_iterator si(pos); si && count < 2; ++si) + for (stack_iterator si(pos, true); si && count < 2; ++si) ++count; return (count > 1); @@ -361,7 +361,7 @@ void Stash::update() items.clear(); // Now, grab all items on that square and fill our vector - for (stack_iterator si(p); si; ++si) + for (stack_iterator si(p, true); si; ++si) if (!is_filtered(*si)) add_item(*si); @@ -384,7 +384,7 @@ void Stash::update() pitem = &get_mimic_item(monster_at(p)); else { - pitem = &mitm[igrd(p)]; + pitem = &mitm[you.visible_igrd(p)]; tutorial_first_item(*pitem); } diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc index ccff7125aa..9094d9b214 100644 --- a/crawl-ref/source/stuff.cc +++ b/crawl-ref/source/stuff.cc @@ -65,9 +65,9 @@ #include "tutorial.h" #include "view.h" -stack_iterator::stack_iterator(const coord_def& pos) +stack_iterator::stack_iterator(const coord_def& pos, bool accesible) { - cur_link = igrd(pos); + cur_link = accesible ? you.visible_igrd(pos) : igrd(pos); if ( cur_link != NON_ITEM ) next_link = mitm[cur_link].link; else diff --git a/crawl-ref/source/stuff.h b/crawl-ref/source/stuff.h index 684df4175d..8d0e288db6 100644 --- a/crawl-ref/source/stuff.h +++ b/crawl-ref/source/stuff.h @@ -24,7 +24,7 @@ class stack_iterator : public std::iterator { public: - explicit stack_iterator( const coord_def& pos ); + explicit stack_iterator( const coord_def& pos, bool accessible = false ); explicit stack_iterator( int start_link ); operator bool() const; diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc index 723dbc0d00..8881bc867b 100644 --- a/crawl-ref/source/tilepick.cc +++ b/crawl-ref/source/tilepick.cc @@ -4795,7 +4795,7 @@ void tile_place_monster(int gx, int gy, int idx, bool foreground, bool detected) if (!mons_is_known_mimic(mon)) { // If necessary add item brand. - if (igrd(gc) != NON_ITEM) + if (you.visible_igrd(gc) != NON_ITEM) { if (foreground) t |= TILE_FLAG_S_UNDER; @@ -4815,7 +4815,7 @@ void tile_place_monster(int gx, int gy, int idx, bool foreground, bool detected) else if (menv[idx].holiness() == MH_PLANT) { // If necessary add item brand. - if (igrd(gc) != NON_ITEM) + if (you.visible_igrd(gc) != NON_ITEM) { if (foreground) t |= TILE_FLAG_S_UNDER; diff --git a/crawl-ref/source/tilereg.cc b/crawl-ref/source/tilereg.cc index 4490e3a59a..65383f46b4 100644 --- a/crawl-ref/source/tilereg.cc +++ b/crawl-ref/source/tilereg.cc @@ -1745,7 +1745,7 @@ bool DungeonRegion::update_tip_text(std::string& tip) tip += get_class_abbrev(you.char_class); tip += ")"; - if (igrd(m_cursor[CURSOR_MOUSE]) != NON_ITEM) + if (you.visible_igrd(m_cursor[CURSOR_MOUSE]) != NON_ITEM) tip += "\n[L-Click] Pick up items (g)"; const dungeon_feature_type feat = grd(m_cursor[CURSOR_MOUSE]); diff --git a/crawl-ref/source/tilesdl.cc b/crawl-ref/source/tilesdl.cc index 50dbb83f58..62ac431970 100644 --- a/crawl-ref/source/tilesdl.cc +++ b/crawl-ref/source/tilesdl.cc @@ -1550,7 +1550,7 @@ void TilesFramework::update_inventory() memset(inv_shown, 0, sizeof(inv_shown)); int num_ground = 0; - for (int i = igrd(you.pos()); i != NON_ITEM; i = mitm[i].link) + for (int i = you.visible_igrd(you.pos()); i != NON_ITEM; i = mitm[i].link) num_ground++; // If the inventory is full, show at least one row of the ground. @@ -1676,7 +1676,7 @@ void TilesFramework::update_inventory() type = (object_class_type)(find - obj_syms); } - for (int i = igrd(you.pos()); i != NON_ITEM; i = mitm[i].link) + for (int i = you.visible_igrd(you.pos()); i != NON_ITEM; i = mitm[i].link) { if ((int)inv.size() >= mx * my) break; diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc index 28b593d97a..296e39318a 100644 --- a/crawl-ref/source/travel.cc +++ b/crawl-ref/source/travel.cc @@ -550,8 +550,8 @@ inline static void _check_interesting_square(int x, int y, ed.found_item(pos, get_mimic_item(mons)); } - if (igrd(pos) != NON_ITEM) - ed.found_item( pos, mitm[ igrd(pos) ] ); + if (you.visible_igrd(pos) != NON_ITEM) + ed.found_item( pos, mitm[ you.visible_igrd(pos) ] ); } ed.found_feature( pos, grd(pos) ); diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc index 69aeb760a2..e0e7d53b72 100644 --- a/crawl-ref/source/tutorial.cc +++ b/crawl-ref/source/tutorial.cc @@ -1887,7 +1887,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc) text << "Ah, a corpse!"; else { - int i = igrd(gc); + int i = you.visible_igrd(gc); while (i != NON_ITEM) { if (mitm[i].base_type == OBJ_CORPSES) @@ -4680,7 +4680,7 @@ void tutorial_observe_cell(const coord_def& gc) else if (grd(gc) == DNGN_ENTER_PORTAL_VAULT) learned_something_new(TUT_SEEN_PORTAL, gc); - const int it = igrd(gc); + const int it = you.visible_igrd(gc); if (it != NON_ITEM) { const item_def& item(mitm[it]); -- cgit v1.2.3-54-g00ecf From b18886c774356255931595a12557c1cf9a611884 Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Wed, 30 Dec 2009 17:10:27 +0530 Subject: Reduce kraken attack damage, make ice beasts amphibious (aquamancer escort). --- crawl-ref/source/mon-data.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index 5bbdd504c7..afecaf42fa 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -2473,7 +2473,7 @@ static monsterentry mondata[] = { { {AT_HIT, AF_COLD, 5}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, { 5, 3, 5, 0 }, 5, 10, MST_NO_SPELLS, CE_NOCORPSE, Z_NOZOMBIE, S_SILENT, - I_ANIMAL, HT_LAND, FL_NONE, 10, DEFAULT_ENERGY, + I_ANIMAL, HT_AMPHIBIOUS_LAND, FL_NONE, 10, DEFAULT_ENERGY, MONUSE_NOTHING, MONEAT_NOTHING, SIZE_LARGE }, @@ -3340,7 +3340,7 @@ static monsterentry mondata[] = { M_COLD_BLOOD | M_SPELLCASTER, MR_NO_FLAGS, 1500, 20, MONS_KRAKEN, MONS_KRAKEN, MH_NATURAL, -3, - { {AT_BITE, AF_PLAIN, 65}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, + { {AT_BITE, AF_PLAIN, 50}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, { 20, 10, 10, 0 }, 20, 0, MST_KRAKEN, CE_NOCORPSE, Z_NOZOMBIE, S_SILENT, I_ANIMAL, HT_WATER, FL_NONE, 10, DEFAULT_ENERGY, -- cgit v1.2.3-54-g00ecf From 33bb370e46344d6cf54e2e9f937e7f1b2d2e83b1 Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Wed, 30 Dec 2009 03:30:39 -0800 Subject: Fix four cosmetic errors in one line --- crawl-ref/source/religion.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 80b277bc67..8a20c52062 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -4853,9 +4853,9 @@ void offer_items() if (num_sacced > 0 && you.religion == GOD_KIKUBAAQUDGHA) { - simple_god_message(" torments the living!"); + simple_god_message(" torments the living!"); torment(TORMENT_KIKUBAAQUDGHA, you.pos()); - you.piety -= 8 + random2(4); // costs 8 - 12 piety + lose_piety(random_range(8, 12)); } // Explanatory messages if nothing the god likes is sacrificed. -- cgit v1.2.3-54-g00ecf From dc6da664d1b8aebf9c7baf96dc26513863affadb Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Wed, 30 Dec 2009 04:10:14 -0800 Subject: Implement fish corpses and kraken zombies. --- crawl-ref/source/mon-act.cc | 2 +- crawl-ref/source/mon-cast.cc | 10 ++++++++-- crawl-ref/source/mon-data.h | 24 ++++++++++++------------ crawl-ref/source/mon-place.cc | 4 +++- crawl-ref/source/mon-stuff.cc | 4 ++-- crawl-ref/source/mon-util.cc | 5 +++++ crawl-ref/source/mon-util.h | 1 + crawl-ref/source/monster.cc | 4 ++-- 8 files changed, 34 insertions(+), 20 deletions(-) diff --git a/crawl-ref/source/mon-act.cc b/crawl-ref/source/mon-act.cc index 6aca56ffa8..067d59d3a6 100644 --- a/crawl-ref/source/mon-act.cc +++ b/crawl-ref/source/mon-act.cc @@ -2793,7 +2793,7 @@ static bool _mon_can_move_to_pos(const monsters *monster, // The kraken is so large it cannot enter shallow water. // Its tentacles can, and will, though. - if (monster->type == MONS_KRAKEN && target_grid == DNGN_SHALLOW_WATER) + if (mons_base_type(monster) == MONS_KRAKEN && target_grid == DNGN_SHALLOW_WATER) return (false); // Effectively slows down monster movement across water. diff --git a/crawl-ref/source/mon-cast.cc b/crawl-ref/source/mon-cast.cc index fb9b5092d4..e1bca14d78 100644 --- a/crawl-ref/source/mon-cast.cc +++ b/crawl-ref/source/mon-cast.cc @@ -1818,15 +1818,21 @@ void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast, // Tentacles aren't really summoned (controlled by spell_cast // being passed to summon_type), so I'm not sure what the // abjuration value (3) is doing there. (jpeg) - if (create_monster( + int tentacle = create_monster( mgen_data(MONS_KRAKEN_TENTACLE, SAME_ATTITUDE(monster), monster, 3, spell_cast, monster->pos(), monster->foe, 0, god, MONS_NO_MONSTER, kraken_index, monster->colour, you.your_level, PROX_CLOSE_TO_PLAYER, - you.level_type)) == -1) + you.level_type)); + + if (tentacle < 0) { sumcount2--; } + else if (monster->holiness() == MH_UNDEAD) + { + menv[tentacle].flags |= MF_HONORARY_UNDEAD; + } } if (sumcount2 == 1) mpr("A tentacle rises from the water!"); diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index afecaf42fa..ac0bb050f1 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -3276,10 +3276,10 @@ static monsterentry mondata[] = { MONS_BIG_FISH, ';', LIGHTGREEN, "big fish", M_COLD_BLOOD, MR_NO_FLAGS, - 0, 10, MONS_BIG_FISH, MONS_BIG_FISH, MH_NATURAL, -3, + 300, 10, MONS_BIG_FISH, MONS_BIG_FISH, MH_NATURAL, -3, { {AT_BITE, AF_PLAIN, 8}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, { 4, 3, 5, 0 }, - 1, 12, MST_NO_SPELLS, CE_NOCORPSE, Z_SMALL, S_SILENT, + 1, 12, MST_NO_SPELLS, CE_CLEAN, Z_SMALL, S_SILENT, I_ANIMAL, HT_WATER, FL_NONE, 10, DEFAULT_ENERGY, MONUSE_NOTHING, MONEAT_NOTHING, SIZE_SMALL }, @@ -3288,10 +3288,10 @@ static monsterentry mondata[] = { MONS_GIANT_GOLDFISH, ';', LIGHTRED, "giant goldfish", M_COLD_BLOOD, MR_NO_FLAGS, - 0, 10, MONS_BIG_FISH, MONS_GIANT_GOLDFISH, MH_NATURAL, -3, + 500, 10, MONS_BIG_FISH, MONS_GIANT_GOLDFISH, MH_NATURAL, -3, { {AT_BITE, AF_PLAIN, 15}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, { 7, 3, 5, 0 }, - 5, 7, MST_NO_SPELLS, CE_NOCORPSE, Z_SMALL, S_SILENT, + 5, 7, MST_NO_SPELLS, CE_CLEAN, Z_SMALL, S_SILENT, I_ANIMAL, HT_WATER, FL_NONE, 10, DEFAULT_ENERGY, MONUSE_NOTHING, MONEAT_NOTHING, SIZE_LITTLE }, @@ -3300,10 +3300,10 @@ static monsterentry mondata[] = { MONS_ELECTRIC_EEL, ';', LIGHTBLUE, "electric eel", M_COLD_BLOOD | M_SPECIAL_ABILITY, MR_RES_ELEC, - 0, 10, MONS_ELECTRIC_EEL, MONS_ELECTRIC_EEL, MH_NATURAL, -3, + 700, 10, MONS_ELECTRIC_EEL, MONS_ELECTRIC_EEL, MH_NATURAL, -3, { AT_NO_ATK, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, { 3, 3, 5, 0 }, - 1, 15, MST_NO_SPELLS, CE_NOCORPSE, Z_SMALL, S_SILENT, + 1, 15, MST_NO_SPELLS, CE_CLEAN, Z_SMALL, S_SILENT, I_ANIMAL, HT_WATER, FL_NONE, 10, DEFAULT_ENERGY, MONUSE_NOTHING, MONEAT_NOTHING, SIZE_SMALL }, @@ -3312,11 +3312,11 @@ static monsterentry mondata[] = { MONS_JELLYFISH, 'J', CYAN, "jellyfish", M_NO_FLAGS, MR_RES_POISON, - 0, 10, MONS_JELLYFISH, MONS_JELLYFISH, MH_NATURAL, -3, + 1000, 10, MONS_JELLYFISH, MONS_JELLYFISH, MH_NATURAL, -3, { {AT_STING, AF_POISON_STR, 1}, {AT_HIT, AF_PLAIN, 1}, AT_NO_ATK, AT_NO_ATK }, { 4, 3, 5, 0 }, - 0, 5, MST_NO_SPELLS, CE_NOCORPSE, Z_SMALL, S_SILENT, + 0, 5, MST_NO_SPELLS, CE_POISONOUS, Z_SMALL, S_SILENT, I_PLANT, HT_WATER, FL_NONE, 10, DEFAULT_ENERGY, MONUSE_NOTHING, MONEAT_NOTHING, SIZE_LITTLE }, @@ -3326,10 +3326,10 @@ static monsterentry mondata[] = { MONS_SHARK, ';', WHITE, "shark", M_COLD_BLOOD | M_BLOOD_SCENT, MR_NO_FLAGS, - 0, 12, MONS_SHARK, MONS_SHARK, MH_NATURAL, -3, + 2000, 12, MONS_SHARK, MONS_SHARK, MH_NATURAL, -3, { {AT_BITE, AF_PLAIN, 15}, {AT_BITE, AF_PLAIN, 8}, AT_NO_ATK, AT_NO_ATK }, { 7, 3, 5, 0 }, - 9, 5, MST_NO_SPELLS, CE_NOCORPSE, Z_BIG, S_SILENT, + 9, 5, MST_NO_SPELLS, CE_CONTAMINATED, Z_BIG, S_SILENT, I_ANIMAL, HT_WATER, FL_NONE, 10, DEFAULT_ENERGY, MONUSE_NOTHING, MONEAT_NOTHING, SIZE_LARGE }, @@ -3339,10 +3339,10 @@ static monsterentry mondata[] = { MONS_KRAKEN, 'X', BLACK, "kraken", M_COLD_BLOOD | M_SPELLCASTER, MR_NO_FLAGS, - 1500, 20, MONS_KRAKEN, MONS_KRAKEN, MH_NATURAL, -3, + 3500, 20, MONS_KRAKEN, MONS_KRAKEN, MH_NATURAL, -3, { {AT_BITE, AF_PLAIN, 50}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, { 20, 10, 10, 0 }, - 20, 0, MST_KRAKEN, CE_NOCORPSE, Z_NOZOMBIE, S_SILENT, + 20, 0, MST_KRAKEN, CE_POISONOUS, Z_BIG, S_SILENT, I_ANIMAL, HT_WATER, FL_NONE, 10, DEFAULT_ENERGY, MONUSE_NOTHING, MONEAT_NOTHING, SIZE_HUGE }, diff --git a/crawl-ref/source/mon-place.cc b/crawl-ref/source/mon-place.cc index dc5c47ba00..10dd3c615c 100644 --- a/crawl-ref/source/mon-place.cc +++ b/crawl-ref/source/mon-place.cc @@ -1681,7 +1681,9 @@ static void _define_zombie(int mid, monster_type ztype, monster_type cs, define_monster(mid); // Turn off all spellcasting flags. - menv[mid].flags &= ~MF_SPELLCASTER & ~MF_ACTUAL_SPELLS & ~MF_PRIEST; + // Hack - kraken get to keep their spell-like ability. + if (menv[mid].base_monster != MONS_KRAKEN) + menv[mid].flags &= ~MF_SPELLCASTER & ~MF_ACTUAL_SPELLS & ~MF_PRIEST; menv[mid].hit_points = hit_points(menv[mid].hit_dice, 6, 5); menv[mid].max_hit_points = menv[mid].hit_points; diff --git a/crawl-ref/source/mon-stuff.cc b/crawl-ref/source/mon-stuff.cc index cb14b67710..95a418b0a7 100644 --- a/crawl-ref/source/mon-stuff.cc +++ b/crawl-ref/source/mon-stuff.cc @@ -1306,7 +1306,7 @@ static int _tentacle_too_far(monsters *head, monsters *tentacle) void mons_relocated(monsters *monster) { - if (monster->type == MONS_KRAKEN) + if (mons_base_type(monster) == MONS_KRAKEN) { int headnum = monster->mindex(); @@ -2098,7 +2098,7 @@ int monster_die(monsters *monster, killer_type killer, // he goes away. pikel_band_neutralise(); } - else if (monster->type == MONS_KRAKEN) + else if (mons_base_type(monster) == MONS_KRAKEN) { if (_destroy_tentacles(monster) && !in_transit) { diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 5895a0c542..fa2ce2be15 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -922,6 +922,11 @@ bool mons_is_zombified(const monsters *mon) return (mons_class_is_zombified(mon->type)); } +monster_type mons_base_type(const monsters *mon) +{ + return mons_is_zombified(mon) ? mon->base_monster : mon->type; +} + bool mons_class_can_be_zombified(int mc) { int ms = mons_species(mc); diff --git a/crawl-ref/source/mon-util.h b/crawl-ref/source/mon-util.h index b9c5424aee..95a0ca5d55 100644 --- a/crawl-ref/source/mon-util.h +++ b/crawl-ref/source/mon-util.h @@ -557,6 +557,7 @@ bool mons_can_regenerate(const monsters *mon); int mons_zombie_size(int mc); monster_type mons_zombie_base(const monsters *mon); bool mons_class_is_zombified(int mc); +monster_type mons_base_type(const monsters *mon); bool mons_is_zombified(const monsters *monster); bool mons_class_can_be_zombified(int mc); bool mons_can_be_zombified(const monsters *mon); diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index 8d0f02f428..1e88b10f33 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -188,7 +188,7 @@ static bool _player_near_water() bool monsters::wants_submerge() const { // Krakens never retreat when food (the player) is in range. - if (type == MONS_KRAKEN) + if (mons_base_type(this) == MONS_KRAKEN) if (_player_near_water()) return (false); @@ -5994,7 +5994,7 @@ void monsters::react_to_damage(int damage, beam_type flavour, kill_category whos else if (type == MONS_KRAKEN_TENTACLE && flavour != BEAM_TORMENT_DAMAGE) { if (!invalid_monster_index(number) - && menv[number].type == MONS_KRAKEN) + && mons_base_type(&menv[number]) == MONS_KRAKEN) { menv[number].hurt(&you, damage, flavour); -- cgit v1.2.3-54-g00ecf From 964f798ab9503b70e423411b6576274f02ecf74a Mon Sep 17 00:00:00 2001 From: Vsevolod Kozlov Date: Wed, 30 Dec 2009 15:41:22 +0300 Subject: vmake_stringf: Copy the va_list argument for the second vsnprintf call. It needs to be copied, otherwise the second call to vsnprintf will be passed a va_list that has been messed up by the first call, and weird segfaults will occur. (They did for me.) --- crawl-ref/source/libutil.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crawl-ref/source/libutil.cc b/crawl-ref/source/libutil.cc index 26243f405c..bd3440d0fb 100644 --- a/crawl-ref/source/libutil.cc +++ b/crawl-ref/source/libutil.cc @@ -143,12 +143,15 @@ std::string strip_filename_unsafe_chars(const std::string &s) std::string vmake_stringf(const char* s, va_list args) { char buf1[400]; + va_list orig_args; + va_copy(orig_args, args); size_t len = vsnprintf(buf1, sizeof buf1, s, args); if (len < sizeof buf1) return (buf1); char *buf2 = (char*)malloc(len + 1); - vsnprintf(buf2, len + 1, s, args); + vsnprintf(buf2, len + 1, s, orig_args); + va_end(orig_args); std::string ret(buf2); free(buf2); -- cgit v1.2.3-54-g00ecf From 30ad58ea18d6e4e2132d235e60f66f11131e17dc Mon Sep 17 00:00:00 2001 From: Johanna Ploog Date: Wed, 30 Dec 2009 13:47:15 +0100 Subject: Add shadows to the tree tiles. How comes I'm writing tutorials and don't even listen to my own advice? --- crawl-ref/source/rltiles/dc-dngn/wall/tree1.png | Bin 827 -> 824 bytes crawl-ref/source/rltiles/dc-dngn/wall/tree2.png | Bin 870 -> 872 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/tree1.png b/crawl-ref/source/rltiles/dc-dngn/wall/tree1.png index c5c69a2156..6f80075b4d 100644 Binary files a/crawl-ref/source/rltiles/dc-dngn/wall/tree1.png and b/crawl-ref/source/rltiles/dc-dngn/wall/tree1.png differ diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/tree2.png b/crawl-ref/source/rltiles/dc-dngn/wall/tree2.png index 711742ee6b..a8835226a0 100644 Binary files a/crawl-ref/source/rltiles/dc-dngn/wall/tree2.png and b/crawl-ref/source/rltiles/dc-dngn/wall/tree2.png differ -- cgit v1.2.3-54-g00ecf