From 9fcc7c41761ea968d0da075f2974a8908a2ef19b Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Thu, 24 Dec 2009 20:34:29 +1000 Subject: New (rakshasa) unique: Mara, Lord of Ilusions. This re-uses several ideas from the Emerald Eye FR, and implements the spell "Mislead": this grants the "Misled" status effect to the player, and causes on-level monsters to appear (glyph, name and tile) to be other monsters. Only their appearance is changed. Healing potions and rain remove this status effect. Mara also has a beefed-up version of the Rakshasa clone spell: it instead creates an "exact" clone (slightly altered spells list, and non-unique status for his clones). Only two will ever be created at once. Finally, he has the spell "Summon Player Ghost". This spell creates a ghost of the player (though marked as a summon, meaning that it (shouldn't) register a milestone, though it will be treated as a self-ghost kill) that is hostile. Only one of these should be existant at any one point in time. I'm pretty sure that I haven't broken anything, but would definitely appreciate someone sanity-checking this commit. Known minor issue: Kirke's summon ugly things being cast while having the Misled status causes them to show up with no glyph. --- crawl-ref/source/dat/database/monspeak.txt | 50 ++++++++++++++++++++++++++++++ crawl-ref/source/dat/database/monspell.txt | 24 ++++++++++++++ crawl-ref/source/dat/database/quotes.txt | 10 ++++++ crawl-ref/source/dat/descript/monsters.txt | 4 +++ 4 files changed, 88 insertions(+) (limited to 'crawl-ref/source/dat') diff --git a/crawl-ref/source/dat/database/monspeak.txt b/crawl-ref/source/dat/database/monspeak.txt index 1b63fbcbcd..a9380051ec 100644 --- a/crawl-ref/source/dat/database/monspeak.txt +++ b/crawl-ref/source/dat/database/monspeak.txt @@ -2552,6 +2552,56 @@ Louise @_mercenary_guard_@ ### END Louise %%%% +############ MARA ### A powerful demon lord, Lord of Illusions +Mara + +@_Mara_common_@ + +w:5 + +@_Mara_rare_@ +%%%% +_Mara_common_ + +VISUAL:@The_monster@'s face changes twice. + +@The_monster@ says, "I mislead the hearts of men!" + +@The_monster@ says, "What good are steel and magic against my illusions?" + +# Buddhism +@The_monster@ says, "Entranced by some poetic flight, are you?" + +@The_monster@ says, "Bound art thou by all the snares!" + +# And original +@The_monster@ growls. + +VISUAL SPELL:@The_monster@ gestures. + +VISUAL SPELL:@The_monster@ points ostentatiously. + +SPELL:@The_monster@ weaves an illusion. +%%%% +_Mara_rare_ + +# Lord of Light +@The_monster@ screams, "Tenfold be your damnation!" + +@The_monster@'s features momentarily become yours. "Wouldst slay thyself?" + +@The_monster@ says, "I stand as high above you as a star above the ocean's bottom." + +@The_monster@ smirks. "I am one who seeks the Path and the Right." + +@The_monster@ says, "Thou art lean, ill-favoured, death is in thy neighbourhood!" + +@The_monster@ says, "Difficult is the way of exertion, difficult to pass, difficult to enter upon." + +@The_monster@ calls, "Stop! In seven days from now the wheel of empire will appear!" + +@The_monster@ boasts, "I am lord over the four continents and the two thousand adjacent isles." +%%%% ############ MARGERY ### A powerful sorceress, guarding the ORB Margery diff --git a/crawl-ref/source/dat/database/monspell.txt b/crawl-ref/source/dat/database/monspell.txt index 0ce22a12e5..c1556fcc50 100644 --- a/crawl-ref/source/dat/database/monspell.txt +++ b/crawl-ref/source/dat/database/monspell.txt @@ -85,6 +85,30 @@ Greater Healing cast @The_monster@ briefly glows brightly. %%%% +Mislead cast + +@The_monster@ weaves an illusion. + +@The_monster@ misleads you. + +@The_monster@ clouds your mind. +%%%% +unseen Mislead cast + +Something tries to mislead you! + +Something weaves an illusion around you! +%%%% +Mara Summon cast + +@The_monster@ weaves an illusion. + +@The_monster@ shimmers. +%%%% +unseen Mara summon cast + +Something weaves an illusion! +%%%% Symbol of Torment cast @The_monster@ calls on the powers of Hell! diff --git a/crawl-ref/source/dat/database/quotes.txt b/crawl-ref/source/dat/database/quotes.txt index 436eb7ab71..0f0e8d5920 100644 --- a/crawl-ref/source/dat/database/quotes.txt +++ b/crawl-ref/source/dat/database/quotes.txt @@ -756,6 +756,16 @@ dreadful nostrils and making ring waves around him, which can reach many miles. Could one doubt that this is the Leviathan of Job?" -Jacob Wallenberg, "Min son på galejan", 1781. %%%% +Mara + +"This night the Lord of Illusion passed among you, Mara, mighty among + dreamers, mighty for ill. He did come upon another who may work with the + stuff of dreams in a different way. He did meet with Dharma, who may expel + a dreamer from his dream. They did struggle, and the Lord Mara is no more. + Why did they struggle, deathgod against illusionist? You say their ways are + incomprehensible, being the ways of gods. This is not the answer." + -Roger Zelazny, "Lord of Light", 1967 +%%%% Menkaure "Ye men of Egypt, ye have heard your king! diff --git a/crawl-ref/source/dat/descript/monsters.txt b/crawl-ref/source/dat/descript/monsters.txt index 131c577bdb..da05efc32f 100644 --- a/crawl-ref/source/dat/descript/monsters.txt +++ b/crawl-ref/source/dat/descript/monsters.txt @@ -1042,6 +1042,10 @@ manticore A hideous cross-breed, bearing the features of a human and a lion, with great bat-like wings. Its tail bristles with spikes that can be loosed at potential prey. %%%% +Mara + +This tall and powerful demon is Mara, Lord of Illusions, mighty among dreamers. He is capable of creating intricately detailed illusions, able to mislead even the minds of the mightiest and most brilliant spell-casters. +%%%% merfolk Half fish, half man, the merfolk are citizens of both water and land, and they'll fiercely protect their chosen territory. -- cgit v1.2.3-54-g00ecf From 52eb7cb1ac83e28c1ad0a0a9e476ebc1242868a8 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Thu, 24 Dec 2009 21:29:22 +1000 Subject: Actually let Mara generate (same area as Margery). --- crawl-ref/source/dat/uniques.des | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crawl-ref/source/dat') diff --git a/crawl-ref/source/dat/uniques.des b/crawl-ref/source/dat/uniques.des index 8f301d0ae3..365d66e8eb 100644 --- a/crawl-ref/source/dat/uniques.des +++ b/crawl-ref/source/dat/uniques.des @@ -215,6 +215,10 @@ NAME: uniq_maud DEPTH: 14-16 : place_unique(_G, "Maud") +NAME: uniq_mara +DEPTH: 20-27, !Lair, !Slime +: place_unique(_G, "Mara") + NAME: uniq_maurice DEPTH: 8-9, 10-13, !Lair, !Slime : place_unique(_G, "Maurice") -- cgit v1.2.3-54-g00ecf From 9fc99a71b4cef054f5cf2b350fb427119bbd02fc Mon Sep 17 00:00:00 2001 From: Enne Walker Date: Thu, 24 Dec 2009 19:43:51 -0500 Subject: Updating zot.des due to previous rltiles change. --- crawl-ref/source/dat/zot.des | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crawl-ref/source/dat') diff --git a/crawl-ref/source/dat/zot.des b/crawl-ref/source/dat/zot.des index bdc8ee1d46..4f6d81b319 100644 --- a/crawl-ref/source/dat/zot.des +++ b/crawl-ref/source/dat/zot.des @@ -416,7 +416,7 @@ ORIENT: float LFLOORCOL: lightgrey LROCKCOL: lightgrey LFLOORTILE: floor_tomb -LROCKTILE: wall_zot_gray +LROCKTILE: wall_zot_white MAP . ENDMAP -- cgit v1.2.3-54-g00ecf From cff43655c657b8ce52e2710cff321b49f05eeea5 Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Fri, 25 Dec 2009 16:18:47 +0530 Subject: Fix util.append (due). --- crawl-ref/source/dat/clua/util.lua | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'crawl-ref/source/dat') diff --git a/crawl-ref/source/dat/clua/util.lua b/crawl-ref/source/dat/clua/util.lua index 5ef063d9fb..d6e842fa7e 100644 --- a/crawl-ref/source/dat/clua/util.lua +++ b/crawl-ref/source/dat/clua/util.lua @@ -86,18 +86,12 @@ function util.set(list) end -- Appends the elements in any number of additional tables to the first table. -function util.append(table, ...) - local res = table +function util.append(first, ...) + local res = first local tables = { ... } - if #tables == 0 then - return res - elseif #tables == 1 and #res == 0 then - return tables[1] - else - for _, tab in ipairs(tables) do - for _, val in ipairs(tab) do - table.insert(res, val) - end + for _, tab in ipairs(tables) do + for _, val in ipairs(tab) do + table.insert(res, val) end end return res -- cgit v1.2.3-54-g00ecf From 9db07b06e8c59d76596875751e239e5fff4ac50e Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Sat, 26 Dec 2009 12:50:09 +1000 Subject: Tweak Mara's depth and stats. After watching some people fight against him on CDO, I've reduced his magic resistance as HD adjusts this considerably (giving him an MR of around 260) to around 210. His HP and HD remain the same, but I've also reduced AC and EV back to those of a normal Rakshasa. (10 and 14 respectively). I've also increased his depth to 22-27 and tweaked the EXP modifier slightly (though this may be too much and require adjusting back down in future). --- crawl-ref/source/dat/uniques.des | 2 +- crawl-ref/source/mon-data.h | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'crawl-ref/source/dat') diff --git a/crawl-ref/source/dat/uniques.des b/crawl-ref/source/dat/uniques.des index 365d66e8eb..851b3fb320 100644 --- a/crawl-ref/source/dat/uniques.des +++ b/crawl-ref/source/dat/uniques.des @@ -216,7 +216,7 @@ DEPTH: 14-16 : place_unique(_G, "Maud") NAME: uniq_mara -DEPTH: 20-27, !Lair, !Slime +DEPTH: 22-27, !Lair, !Slime : place_unique(_G, "Mara") NAME: uniq_maurice diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index c0c251c67b..4467317458 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -4676,10 +4676,10 @@ static monsterentry mondata[] = { MONS_MARA, 'R', LIGHTRED, "Mara", M_SPELLCASTER | M_SEE_INVIS | M_ACTUAL_SPELLS | M_SPEAKS | M_UNIQUE, MR_RES_POISON | MR_RES_ELEC, - 0, 15, MONS_RAKSHASA, MONS_RAKSHASA, MH_DEMONIC, -10, - { {AT_HIT, AF_PLAIN, 40}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, + 0, 20, MONS_RAKSHASA, MONS_RAKSHASA, MH_DEMONIC, -8, + { {AT_HIT, AF_PLAIN, 30}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, { 20, 0, 0, 140 }, - 15, 15, MST_MARA, CE_NOCORPSE, Z_NOZOMBIE, S_SILENT, + 10, 14, MST_MARA, CE_NOCORPSE, Z_NOZOMBIE, S_SILENT, I_HIGH, HT_LAND, FL_NONE, 10, DEFAULT_ENERGY, MONUSE_WEAPONS_ARMOUR, MONEAT_NOTHING, SIZE_MEDIUM }, @@ -4690,10 +4690,10 @@ static monsterentry mondata[] = { MONS_MARA_FAKE, 'R', LIGHTRED, "Mara", M_SPELLCASTER | M_SEE_INVIS | M_ACTUAL_SPELLS | M_SPEAKS, MR_RES_POISON | MR_RES_ELEC, - 0, 15, MONS_RAKSHASA_FAKE, MONS_RAKSHASA_FAKE, MH_DEMONIC, MAG_IMMUNE, - { {AT_HIT, AF_PLAIN, 40}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, + 0, 20, MONS_RAKSHASA_FAKE, MONS_RAKSHASA_FAKE, MH_DEMONIC, MAG_IMMUNE, + { {AT_HIT, AF_PLAIN, 30}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, { 20, 0, 0, 140 }, - 15, 15, MST_MARA_FAKE, CE_NOCORPSE, Z_NOZOMBIE, S_SILENT, + 10, 14, MST_MARA_FAKE, CE_NOCORPSE, Z_NOZOMBIE, S_SILENT, I_HIGH, HT_LAND, FL_NONE, 10, DEFAULT_ENERGY, MONUSE_WEAPONS_ARMOUR, MONEAT_NOTHING, SIZE_MEDIUM }, -- cgit v1.2.3-54-g00ecf From c124daef6c8b8535427ce56a0b419f3000fb774e Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Sat, 26 Dec 2009 14:02:32 +1000 Subject: Some tweaks to Mu's elemental vault. --- crawl-ref/source/dat/float.des | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/dat') diff --git a/crawl-ref/source/dat/float.des b/crawl-ref/source/dat/float.des index 17f3cd4b58..493d018b9e 100644 --- a/crawl-ref/source/dat/float.des +++ b/crawl-ref/source/dat/float.des @@ -954,8 +954,10 @@ KMONS: Z = col:gila wizard hd:15 name_descriptor \ . dagger ego:freezing | dagger ego:flaming | \ dagger ego:electrocution : end -KITEM: B = any book -KITEM: | = staff of fire / staff of cold / staff of earth / staff of air +KITEM: B = randbook disc:air / randbook disc:fire / randbook disc:ice / \ + randbook disc:earth +KITEM: | = staff of fire / staff of cold / staff of earth / staff of air / \ + quarterstaff unrand:elemental_staff MAP ccccccccc ccE+'''cwcc -- cgit v1.2.3-54-g00ecf From 0ede21ec50340b1249f9f9d75aac30605efd6e9f Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Sat, 26 Dec 2009 14:11:14 +0100 Subject: Broaden Agnes' range. --- crawl-ref/source/dat/uniques.des | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crawl-ref/source/dat') diff --git a/crawl-ref/source/dat/uniques.des b/crawl-ref/source/dat/uniques.des index 851b3fb320..0632db8edb 100644 --- a/crawl-ref/source/dat/uniques.des +++ b/crawl-ref/source/dat/uniques.des @@ -95,7 +95,7 @@ ENDMAP ################################################################################ NAME: uniq_agnes -DEPTH: 14-16, !Lair, !Slime +DEPTH: 12-18, !Lair, !Slime : place_unique(_G, "Agnes") NAME: uniq_aizul -- cgit v1.2.3-54-g00ecf From e5e6474f335d47ce81f0d33d5adf95b4dd64ba46 Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Sat, 26 Dec 2009 16:25:41 +0100 Subject: Deuglify a temple layout, now that we're not limited to 12 altars only. --- crawl-ref/source/dat/temple.des | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/dat') diff --git a/crawl-ref/source/dat/temple.des b/crawl-ref/source/dat/temple.des index 78df580778..20902ec963 100644 --- a/crawl-ref/source/dat/temple.des +++ b/crawl-ref/source/dat/temple.des @@ -1000,14 +1000,16 @@ WEIGHT: 5 SHUFFLE: {([ MAP bbbbb + b...b + b.(.b bbbbb...bbbbb - b...b.(.b...b + b...bb.bb...b b.B.......B.b - bbbbb...bbbbb...bbbbb - b...bb.bbbbbbbbbb...b -bbbbb.{.b...bbbbb.....[.bbbbb -b...b...b.B.......B.b...b...b -b.B....bb...b...b...bb....B.b + bbbbb...b...b...bbbbb + b...bb.bb.B.bbbbb...b +bbbbb.{.b...b...b.....[.bbbbb +b...b...b.B.bbbbb.B.b...b...b +b.B....bb...........bb....B.b b...b...bbbbb.B.bbbbb...b...b bbbbb.B....bb...bb....B.bbbbb b...b...bbbbb...b...b -- cgit v1.2.3-54-g00ecf From e498a6cf12a2a1428f7135867739e6b64ffa394a Mon Sep 17 00:00:00 2001 From: Johanna Ploog Date: Sat, 26 Dec 2009 17:11:29 +0100 Subject: Actually use the archer statue tile in the corresponding vault definition. --- crawl-ref/source/dat/mini.des | 2 +- crawl-ref/source/rltiles/dc-mon.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/dat') diff --git a/crawl-ref/source/dat/mini.des b/crawl-ref/source/dat/mini.des index 4f61617b69..2927e8362c 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 name:archer name_adjective; longbow . arrow q:30 +MONS: statue tile:mons_archer_statue 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 18a2dc86b1..a01f00d479 100644 --- a/crawl-ref/source/rltiles/dc-mon.txt +++ b/crawl-ref/source/rltiles/dc-mon.txt @@ -287,6 +287,7 @@ 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 ## Gargoyles ('9') %sdir dc-mon -- cgit v1.2.3-54-g00ecf From ec717839b67f5acc52044fca7820df71680f5ff6 Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Sun, 27 Dec 2009 02:46:16 +0530 Subject: Remove floor at corners of shoal huts. --- crawl-ref/source/dat/shoals.des | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/dat') diff --git a/crawl-ref/source/dat/shoals.des b/crawl-ref/source/dat/shoals.des index 4983347ecd..2b52eb6ade 100644 --- a/crawl-ref/source/dat/shoals.des +++ b/crawl-ref/source/dat/shoals.des @@ -243,13 +243,13 @@ SHUFFLE: ABCD SUBST: A:x, B:x, C:x=, D=+ LROCKTILE: wall_vines MAP -.xxCxx. + xxCxx xx...xx x.....x B..O..D x.....x xx...xx -.xxAxx + xxAxx ENDMAP ################################################################################ @@ -262,11 +262,11 @@ TAGS: allow_dup water_ok shoal no_dump SHUFFLE: ABCD SUBST: A:x, B:x, C:x=, D=+ MAP -.xxCxx. + xxCxx xx...xx x.....x B..|..D x.....x xx...xx -.xxAxx + xxAxx ENDMAP -- cgit v1.2.3-54-g00ecf From b9b709e2e741ad27b31193925ada1f47f3b0b935 Mon Sep 17 00:00:00 2001 From: David Ploog Date: Sun, 27 Dec 2009 02:10:10 +0100 Subject: Three new Vault:8 subvaults (Neil). Guarantee exactly one Vault:8 subvault rich in loot. --- crawl-ref/source/dat/vaults.des | 187 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 171 insertions(+), 16 deletions(-) (limited to 'crawl-ref/source/dat') diff --git a/crawl-ref/source/dat/vaults.des b/crawl-ref/source/dat/vaults.des index cee6e36ea2..274a32e4df 100644 --- a/crawl-ref/source/dat/vaults.des +++ b/crawl-ref/source/dat/vaults.des @@ -230,7 +230,7 @@ ENDMAP # NAME: metal_show ORIENT: float -DEPTH: Vault:3- +DEPTH: Vault:3-7 TAGS: no_secret_doors no_monster_gen no_item_gen no_wall_fixup COLOUR: M = magenta COLOUR: K = magenta @@ -325,7 +325,7 @@ lua_marker('e', portal_desc { teleport_spot=1}) lua_marker('m', portal_desc { teleport_spot=2}) }} ORIENT: float -DEPTH: Vault:3- +DEPTH: Vault:3-7 TAGS: no_secret_doors no_monster_gen no_item_gen uniq_the_teleporter \ patrolling COLOUR: ME = yellow @@ -489,8 +489,9 @@ ENDMAP # tagged vault8_room should just provide loot. Note that the rooms # are not all the same sizes. # +# about 24 | NAME: vault8_rooms -TAGS: vault8_quadrant +TAGS: vault8_quadrant uniq_vault8_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= @@ -613,7 +614,7 @@ ENDMAP ############################################################################## # Vault:8 - Cross Quadrant -# +# about 2 | NAME: vault8_cross TAGS: vault8_quadrant NSUBST: U = 1:. / *:xxxx= @@ -649,7 +650,7 @@ ENDMAP ############################################################################## # Vault:8 - Diamond Quadrant -# +# about 4 | NAME: vault8_diamond TAGS: vault8_quadrant SHUFFLE: !_ @@ -686,7 +687,7 @@ ENDMAP ############################################################################## # Vault:8 - Stripes Quadrant -# +# about 5 | NAME: vault8_stripes TAGS: vault8_quadrant # double use of Y=Y. and Z=Z. for decreasing variance @@ -725,7 +726,7 @@ ENDMAP ############################################################################## # Vault:8 - Clover Quadrant (by Mu.) -# +# about 4 | NAME: vault8_clover TAGS: vault8_quadrant SUBST: Q = 8 9 .:20 @@ -761,9 +762,9 @@ ENDMAP ############################################################################## # Vault:8 - Triangles Quadrant (by Mu.) -# +# about 19 | NAME: vault8_triangles -TAGS: vault8_quadrant +TAGS: vault8_quadrant uniq_vault8_prize SUBST: Q = 8 9 .:20 NSUBST: ? = 1:O / *:| SUBST: " = =:1 x:99 @@ -781,11 +782,11 @@ x..Q..xx..Q..xx****xx.Q...x x......xx.....xx**xx......x x....Q..xx..Q.."xxx|Q.....x x........xx.....xx||....Q.x -x......Q.*x"..Q.."x|Q.....x -x..Q.....**xx.....xx......x -x......Q.*xxx"..Q..xx.Q...x +x......Q.|x"..Q.."x|Q.....x +x..Q.....*|xx.....xx......x +x......Q.|xxx"..Q..xx.Q...x x........xx||xx.....xx....x -x....Q..xx||||xx..Q..xx.Q.x +x....Q..xx||||xx..Q..xx.Q|x x......xx..Q.Q.xx.....xx||x x..Q..xx........xx..Q..xx?x x....xx..Q.....Q.xx.....xxx @@ -798,9 +799,9 @@ ENDMAP ############################################################################## # Vault:8 - Not Diamond Quadrant (by Mu.) -# +# about 8 | NAME: vault8_not_diamond -TAGS: vault8_quadrant +TAGS: vault8_quadrant SUBST: Q = 8 9 *:20 : vault8_loot(_G) : vault8_rune(_G) @@ -832,7 +833,7 @@ ENDMAP ############################################################################## # Vault:8 - Boxes (by Mu.) -# +# about 11 | NAME: vault8_boxes TAGS: vault8_quadrant NSUBST: a = 1:+ / *:x @@ -877,6 +878,160 @@ x..........xxexx..........x xxxxxxxxxxxxxxxxxxxxxxxxx ENDMAP +############################################################################## +# Vault:8 - Corners Quadrant (by Mu.) +# about 25 | +NAME: vault8_corners +TAGS: vault8_quadrant uniq_vault8_prize +SUBST: Q = 8 9 .:10 +NSUBST: $ = 1:O / *:$ +SUBST: $ = | *:20 $ +SUBST: a = x. +: vault8_loot(_G) +: vault8_rune(_G) +MAP +xxxxxxxxxxxxxxxxxxxxxxxxxxx +x$$$$x.......xQQ...x..$$$$x +x$$$$x.......xQQ...x.x$$$$x +x$$$$x..xxx..x..x..x.x$$$$x +x$$$$x..xxx..x..x..x.x$$$$x +x.xxxx..xxx..x..x..x.xxxxxx +x.......xxx.....xQQ.......x +xxxxxx..xxx.....xQQ.......x +x.......xxxxxxxxxxxxxxxx..x +x.......xQQ...$$$$xQQ.....x +x..xxxxxxQQxxx$$$$xQQ.....x +xQQ.....x..xxx$$$$x..xxxxxx +xQQ.....x..xxx$$$$x.....QQx +xxxxxx..x..xxxxxxxx.....QQx +x.......x..xxxxxxxxxxxxx..x +x.......x.................x +x..xxxxxx.................x +xQQ.....x..xxxxxxxxx.xxxxxx +xQQ.....x..xxx$$$$xx.x$$$$x +xxxxxx..x..xxx$$$$xx.x$$$$x +a.......xQQxxx$$$$xx.x$$$$x + .......xQQ...$$$$xx..$$$$x + axxxxxxxxxxxxxxxxxxxxxxxx +ENDMAP + +############################################################################## +# Vault:8 - Flips Quadrant (by Mu.) +# about 21 | +NAME: vault8_flips +TAGS: vault8_quadrant uniq_vault8_prize +NSUBST: ; = 3:l / 3:z / 3:a / *:. +SUBST: Q = 8 9 +SUBST: $ = | * $ +KFEAT: l = teleport trap +KFEAT: z = zot trap +KFEAT: a = alarm trap +SUBST: s = .:250 =:1 +SUBST: a = x. +: vault8_loot(_G) +: vault8_rune(_G) +MAP +xxxxxxxxxxxxxxxxxxxxxxxxxxx +xQQQ......................x +xQQQxxxxxxxxxxxxxxxxxxxxs.x +xQQQ....................x.x +x.x.xxxxxxxxxxxxxxxxxxs.x.x +x.x.xQQQ..............x.x.x +x.x.xQQQxxxxxxxxxxxxs.x.x.x +x.x.xQQQ;;;;;;;;$$$$x.x.x.x +x.x.x.x;;;;;;;;;$$$$x.x.x.x +x.x.x.x;;;;;;;;;$$$$x.x.x.x +x.x.x.x;;;;;;;;;$$$$x.x.x.x +x.x.x.x;;;;;;;;;$$$$x.x.x.x +x.x.x.x;;;;;;;;;$$$$x.x.x.x +x.x.x.x$$$$$$$$$$$$$x.x.x.x +x.x.x.x$$$$$$$$$$$$$x.x.x.x +x.x.x.x$$$$$$$$$$$$Ox.x.x.x +x.x.x.sxxxxxxxxxxxxxx.x.x.x +x.x.x................QQQx.x +x.x.sxxxxxxxxxxxxxxxxQQQx.x +x.x..................QQQx.x +x.sxxxxxxxxxxxxxxxxxxxxxx.a +x......................... +xxxxxxxxxxxxxxxxxxxxxxxxa +ENDMAP + +############################################################################## +# Vault:8 - Construction Quadrant (by Mu.) +# about 21 | +NAME: vault8_construction +TAGS: vault8_quadrant uniq_vault8_prize +SUBST: Q = 8 9 . +NSUBST: $ = 1:O / *:$ +SUBST: $ = |*$. +SUBST: c = xnQ. +NSUBST: D = 1:+ / *:x +SUBST: a = xn.. +: vault8_loot(_G) +: vault8_rune(_G) +MAP + axxxxxxxxxxxxxxxxxxxxxxxx + ..c.c.c.c.c.c.c.c.c.c.c.cx +a.c.c.c.c.c.c.c.c.c.c.c.c.x +xc.c.c.c.c.c.c.c.c.c.c.c.cx +x.c.c.c.c.c.c.c.c.c.c.c.c.x +xc.c.c.c.c.c.c.c.c.c.c.c.cx +x.c.c.c.c.c.c.c.c.c.c.c.c.x +xc.c.c.c.c.c.c.c.c.c.c.c.cx +x.c.c.c.c.c.c.c.c.c.c.c.c.x +xc.c.c.c.c.c.c.c.c.c.c.c.cx +x.c.c.c.c.c.c.c.c.c.c.c.c.x +xDxDxDxDxDxDxDxDxDxDxDxDxDx +x.........................x +x.........................x +x.Qx..x..x..xQx..x..x..xQ.x +x.........................x +x.........................x +xxx+xxxx+xxxx+xxxx+xxxx+xxx +x$$$$x$$$$$x$$$x$$$$$x$$$$x +x$$$$x$$$$$x$$$x$$$$$x$$$$x +x$$$$x$$$$$x$$$x$$$$$x$$$$x +x$$$$x$$$$$x$$$x$$$$$x$$$$x +xxxxxxxxxxxxxxxxxxxxxxxxxxx +ENDMAP + +############################################################################## +# Vault:8 - Long Quadrant (by Mu.) +# about 8 | +NAME: vault8_long +TAGS: vault8_quadrant +SUBST: Q = 8 9 .:10 +NSUBST: $ = 1:O / *:$ +SUBST: $ = |**$ +SUBST: a = x. +: vault8_loot(_G) +: vault8_rune(_G) +MAP +xxxxxxxxxxxxxxxxxxxxxxxxa +x......................... +x.........................a +x.........................x +x..xxxxxxxxxxxxxxxxxxxxx..x +x....QQQ............$$$x..x +x....QQQ............$$$x..x +x..xxxxxxxxxxxxxxxxxxxxx..x +x..x$$$............QQQ....x +x..x$$$............QQQ....x +x..xxxxxxxxxxxxxxxxxxxxx..x +x....QQQ............$$$x..x +x....QQQ............$$$x..x +x..xxxxxxxxxxxxxxxxxxxxx..x +x..x$$$............QQQ....x +x..x$$$............QQQ....x +x..xxxxxxxxxxxxxxxxxxxxx..x +x....QQQ............$$$x..x +x....QQQ............$$$x..x +x..xxxxxxxxxxxxxxxxxxxxx..x +x.........................x +x.........................x +xxxxxxxxxxxxxxxxxxxxxxxxxxx +ENDMAP + ############################################################################## -- cgit v1.2.3-54-g00ecf From 8c410379d02b62467016224d62040a3075ec3a99 Mon Sep 17 00:00:00 2001 From: David Ploog Date: Sun, 27 Dec 2009 02:21:58 +0100 Subject: Slight changes to labyrinth vaults. --- crawl-ref/source/dat/lab.des | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'crawl-ref/source/dat') diff --git a/crawl-ref/source/dat/lab.des b/crawl-ref/source/dat/lab.des index e54833f85c..fd7c942d23 100644 --- a/crawl-ref/source/dat/lab.des +++ b/crawl-ref/source/dat/lab.des @@ -83,9 +83,10 @@ ENDMAP ############################################################################# # Green exit -NAME: labyrinth_green -TAGS: minotaur generate_loot allow_dup -MONS: patrolling minotaur +NAME: labyrinth_green +TAGS: minotaur generate_loot allow_dup +MONS: patrolling minotaur +WEIGHT: 2 MAP ........ .bbbbbb. @@ -119,7 +120,7 @@ ENDMAP NAME: labyrinth_hidden_loot TAGS: minotaur generate_loot allow_dup MONS: patrolling minotaur, minotaur zombie -SUBST: d = 2% +SUBST: d = 2%* SUBST: c : cvv MAP ............ @@ -183,11 +184,11 @@ WEIGHT: 2 MAP .............. .cccccccccccc. -.g..ddD+.cccc. +.g.dddD+.cccc. .c.ccccc.cccc. -.g..ddD+.+1 Date: Mon, 28 Dec 2009 00:17:23 +1000 Subject: Customisable clouds! cloud_struct now has members for colour, name, and tile; colour will be used instead of the default colour of the cloud type, and will be used to recolour the tile of the cloud (if it exists). Name will be used to rebrand the cloud's description, and also alter the message generate while standing in a cloud. Finally, tile can be used to completely customise the tile used for the cloud. The value is stored as a string in order to maintain save compatibility across ASCII and tiles. A random tile (found using tile_main_count) from that set will also be used, however, no duration effects will be applied. Recoloured cloud tiles using just the colour code should be possible, though aren't yet fully tested. This commit bumps TAG_MAJOR_VERSION: changing marshalling of the FogMachine Lua code causes nasty crashes on reloading saved games. Otherwise, I don't think I broke anything else. :-) --- crawl-ref/source/beam.cc | 5 +- crawl-ref/source/cloud.cc | 110 ++++++++++++++++++++++++++--------- crawl-ref/source/cloud.h | 24 ++++++-- crawl-ref/source/dat/clua/lm_fog.lua | 21 ++++++- crawl-ref/source/directn.cc | 3 +- crawl-ref/source/externs.h | 6 +- crawl-ref/source/l_dgn.cc | 18 ++++-- crawl-ref/source/misc.cc | 5 +- crawl-ref/source/player.cc | 2 +- crawl-ref/source/show.cc | 3 +- crawl-ref/source/spells1.cc | 17 +++--- crawl-ref/source/spells1.h | 9 ++- crawl-ref/source/spells4.cc | 5 +- crawl-ref/source/spells4.h | 3 +- crawl-ref/source/spl-util.cc | 19 +++--- crawl-ref/source/spl-util.h | 6 +- crawl-ref/source/tags.cc | 6 ++ crawl-ref/source/tags.h | 2 +- crawl-ref/source/tilepick.cc | 109 +++++++++++++++++++++------------- crawl-ref/source/tilereg.cc | 8 +-- crawl-ref/source/tiles.h | 2 +- crawl-ref/source/tutorial.cc | 2 +- 22 files changed, 261 insertions(+), 124 deletions(-) (limited to 'crawl-ref/source/dat') diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index cdeefc8204..8b05a833d9 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -3243,17 +3243,18 @@ void bolt::affect_place_clouds() if (p == you.pos()) { mprf("The %s you are in turns into %s!", - cloud_name(ctype).c_str(), cloud_name(new_type).c_str()); + cloud_name(cloudidx).c_str(), cloud_name(new_type).c_str()); obvious_effect = true; } else if (you.see_cell(p)) { mprf("A cloud of %s turns into %s.", - cloud_name(ctype).c_str(), cloud_name(new_type).c_str()); + cloud_name(cloudidx).c_str(), cloud_name(new_type).c_str()); obvious_effect = true; } ctype = new_type; + env.cloud[cloudidx].name = ""; return; } diff --git a/crawl-ref/source/cloud.cc b/crawl-ref/source/cloud.cc index 638432f504..bd5670b846 100644 --- a/crawl-ref/source/cloud.cc +++ b/crawl-ref/source/cloud.cc @@ -27,6 +27,11 @@ #include "stuff.h" #include "env.h" #include "terrain.h" +#ifdef USE_TILE +#include "tiles.h" +#include "tiledef-gui.h" +#include "tiledef-main.h" +#endif #include "mutation.h" static int _actual_spread_rate(cloud_type type, int spread_rate) @@ -70,7 +75,8 @@ static bool _killer_whose_match(kill_category whose, killer_type killer) static void _new_cloud( int cloud, cloud_type type, const coord_def& p, int decay, kill_category whose, killer_type killer, - unsigned char spread_rate ) + unsigned char spread_rate, int colour, std::string name, + std::string tile) { ASSERT( env.cloud[cloud].type == CLOUD_NONE ); ASSERT(_killer_whose_match(whose, killer)); @@ -83,13 +89,28 @@ static void _new_cloud( int cloud, cloud_type type, const coord_def& p, c.whose = whose; c.killer = killer; c.spread_rate = spread_rate; + c.colour = colour; + c.name = name; +#ifdef USE_TILE + if (!tile.empty()) + { + unsigned int index; + if (!tile_main_index(tile.c_str(), index)) + { + mprf(MSGCH_ERROR, "Invalid tile requested for cloud: '%s'.", tile.c_str()); + tile = ""; + } + } +#endif + c.tile = tile; env.cgrid(p) = cloud; env.cloud_no++; } static void _place_new_cloud(cloud_type cltype, const coord_def& p, int decay, kill_category whose, killer_type killer, - int spread_rate) + int spread_rate, int colour, std::string name, + std::string tile) { if (env.cloud_no >= MAX_CLOUDS) return; @@ -99,7 +120,8 @@ static void _place_new_cloud(cloud_type cltype, const coord_def& p, int decay, { if (env.cloud[ci].type == CLOUD_NONE) // i.e., is empty { - _new_cloud( ci, cltype, p, decay, whose, killer, spread_rate ); + _new_cloud( ci, cltype, p, decay, whose, killer, spread_rate, colour, + name, tile ); break; } } @@ -129,7 +151,7 @@ static int _spread_cloud(const cloud_struct &cloud) newdecay = cloud.decay - 1; _place_new_cloud( cloud.type, *ai, newdecay, cloud.whose, cloud.killer, - cloud.spread_rate ); + cloud.spread_rate, cloud.colour, cloud.name, cloud.tile ); extra_decay += 8; } @@ -151,7 +173,8 @@ static void _spread_fire(const cloud_struct &cloud) // burning trees produce flames all around if (!cell_is_solid(*ai) && make_flames) _place_new_cloud( CLOUD_FIRE, *ai, cloud.decay/2+1, cloud.whose, - cloud.killer, cloud.spread_rate ); + cloud.killer, cloud.spread_rate, cloud.colour, + cloud.name, cloud.tile ); // forest fire doesn't spread in all directions at once, // every neighbouring square gets a separate roll @@ -161,7 +184,8 @@ static void _spread_fire(const cloud_struct &cloud) mpr("The forest fire spreads!"); grd(*ai) = DNGN_FLOOR; _place_new_cloud( cloud.type, *ai, random2(30)+25, cloud.whose, - cloud.killer, cloud.spread_rate ); + cloud.killer, cloud.spread_rate, cloud.colour, + cloud.name, cloud.tile ); } } @@ -248,6 +272,9 @@ void delete_cloud( int cloud ) c.whose = KC_OTHER; c.killer = KILL_NONE; c.spread_rate = 0; + c.colour = -1; + c.name = ""; + c.tile = ""; env.cgrid(c.pos) = EMPTY_CLOUD; c.pos.reset(); @@ -271,32 +298,37 @@ void move_cloud( int cloud, const coord_def& newpos ) // Places a cloud with the given stats assuming one doesn't already // exist at that point. void check_place_cloud( cloud_type cl_type, const coord_def& p, int lifetime, - kill_category whose, int spread_rate ) + kill_category whose, int spread_rate, int colour, + std::string name, std::string tile) { check_place_cloud(cl_type, p, lifetime, whose, - cloud_struct::whose_to_killer(whose), spread_rate); + cloud_struct::whose_to_killer(whose), spread_rate, colour, + name, tile); } // Places a cloud with the given stats assuming one doesn't already // exist at that point. void check_place_cloud( cloud_type cl_type, const coord_def& p, int lifetime, - killer_type killer, int spread_rate ) + killer_type killer, int spread_rate, int colour, + std::string name, std::string tile) { check_place_cloud(cl_type, p, lifetime, cloud_struct::killer_to_whose(killer), killer, - spread_rate); + spread_rate, colour, name, tile); } // Places a cloud with the given stats assuming one doesn't already // exist at that point. void check_place_cloud( cloud_type cl_type, const coord_def& p, int lifetime, kill_category whose, killer_type killer, - int spread_rate ) + int spread_rate, int colour, std::string name, + std::string tile) { if (!in_bounds(p) || env.cgrid(p) != EMPTY_CLOUD) return; - place_cloud( cl_type, p, lifetime, whose, killer, spread_rate ); + place_cloud( cl_type, p, lifetime, whose, killer, spread_rate, colour, + name, tile ); } int steam_cloud_damage(const cloud_struct &cloud) @@ -317,27 +349,32 @@ int steam_cloud_damage(int decay) // make way if there are too many on level. Will overwrite an old // cloud under some circumstances. void place_cloud(cloud_type cl_type, const coord_def& ctarget, int cl_range, - kill_category whose, int _spread_rate) + kill_category whose, int _spread_rate, int colour, + std::string name, std::string tile) { place_cloud(cl_type, ctarget, cl_range, whose, - cloud_struct::whose_to_killer(whose), _spread_rate); + cloud_struct::whose_to_killer(whose), _spread_rate, + colour, name, tile); } // Places a cloud with the given stats. May delete old clouds to // make way if there are too many on level. Will overwrite an old // cloud under some circumstances. void place_cloud(cloud_type cl_type, const coord_def& ctarget, int cl_range, - killer_type killer, int _spread_rate) + killer_type killer, int _spread_rate, int colour, + std::string name, std::string tile) { place_cloud(cl_type, ctarget, cl_range, - cloud_struct::killer_to_whose(killer), killer, _spread_rate); + cloud_struct::killer_to_whose(killer), killer, _spread_rate, + colour, name, tile); } // Places a cloud with the given stats. May delete old clouds to // make way if there are too many on level. Will overwrite an old // cloud under some circumstances. void place_cloud(cloud_type cl_type, const coord_def& ctarget, int cl_range, - kill_category whose, killer_type killer, int _spread_rate) + kill_category whose, killer_type killer, int _spread_rate, + int colour, std::string name, std::string tile) { if (is_sanctuary(ctarget) && !is_harmless_cloud(cl_type)) return; @@ -393,7 +430,7 @@ void place_cloud(cloud_type cl_type, const coord_def& ctarget, int cl_range, if (cl_new != -1) { _new_cloud( cl_new, cl_type, ctarget, cl_range * 10, - whose, killer, spread_rate ); + whose, killer, spread_rate, colour, name, tile ); } else { @@ -403,7 +440,7 @@ void place_cloud(cloud_type cl_type, const coord_def& ctarget, int cl_range, if (env.cloud[ci].type == CLOUD_NONE) // ie is empty { _new_cloud( ci, cl_type, ctarget, cl_range * 10, - whose, killer, spread_rate ); + whose, killer, spread_rate, colour, name, tile ); break; } } @@ -609,6 +646,7 @@ void in_a_cloud() int cl = env.cgrid(you.pos()); int hurted = 0; int resist; + std::string name = env.cloud[cl].name; if (you.duration[DUR_CONDENSATION_SHIELD] > 0) remove_condensation_shield(); @@ -620,7 +658,7 @@ void in_a_cloud() if (you.duration[DUR_FIRE_SHIELD]) return; - mpr("You are engulfed in roaring flames!"); + mprf("You are engulfed in %s!", !name.empty() ? name.c_str() : "roaring flames"); resist = player_res_fire(); @@ -650,7 +688,8 @@ void in_a_cloud() case CLOUD_STINK: // If you don't have to breathe, unaffected - mpr("You are engulfed in noxious fumes!"); + mprf("You are engulfed in %s!", !name.empty() ? name.c_str() : "noxious fumes"); + if (player_res_poison()) break; @@ -674,7 +713,7 @@ void in_a_cloud() if (you.mutation[MUT_PASSIVE_FREEZE]) break; - mpr("You are engulfed in freezing vapours!"); + mprf("You are engulfed in %s!", !name.empty() ? name.c_str() : "freezing vapours"); resist = player_res_cold(); @@ -703,7 +742,8 @@ void in_a_cloud() case CLOUD_POISON: // If you don't have to breathe, unaffected - mpr("You are engulfed in poison gas!"); + mprf("You are engulfed in %s!", !name.empty() ? name.c_str() : "poison gas"); + if (!player_res_poison()) { ouch((random2(10) * you.time_taken) / 10, cl, KILLED_BY_CLOUD, @@ -717,12 +757,14 @@ void in_a_cloud() case CLOUD_TLOC_ENERGY: case CLOUD_PURPLE_SMOKE: case CLOUD_BLACK_SMOKE: - mpr("You are engulfed in a cloud of smoke!"); + mprf("You are engulfed in %s!", !name.empty() ? name.c_str() : "a cloud of smoke"); + break; case CLOUD_STEAM: { - mpr("You are engulfed in a cloud of scalding steam!"); + mprf("You are engulfed in %s!", !name.empty() ? name.c_str() : "a cloud of scalding steam"); + if (player_res_steam() > 0) { mpr("It doesn't seem to affect you."); @@ -746,7 +788,7 @@ void in_a_cloud() } case CLOUD_MIASMA: - mpr("You are engulfed in a dark miasma."); + mprf("You are engulfed in %s!", !name.empty() ? name.c_str() : "a dark miasma"); if (you.res_rotting()) return; @@ -771,11 +813,12 @@ void in_a_cloud() you.duration[DUR_MISLED] = 0; } - mpr("You are standing in the rain."); + mprf("You are engulfed in %s.", !name.empty() ? name.c_str() : "the rain"); + break; case CLOUD_MUTAGENIC: - mpr("You are engulfed in a mutagenic fog!"); + mprf("You are engulfed in %s!", !name.empty() ? name.c_str() : "a mutagenic fog"); if (coinflip()) { @@ -870,6 +913,14 @@ cloud_type in_what_cloud() return (env.cloud[cl].type); } +std::string cloud_name(int cloudno) +{ + if (!env.cloud[cloudno].name.empty()) + return (env.cloud[cloudno].name); + else + return cloud_name(env.cloud[cloudno].type); +} + std::string cloud_name(cloud_type type) { switch (type) @@ -975,6 +1026,9 @@ void cloud_struct::set_killer(killer_type _killer) int get_cloud_colour(int cloudno) { int which_colour = LIGHTGREY; + if (env.cloud[cloudno].colour != -1) + return (env.cloud[cloudno].colour); + switch (env.cloud[cloudno].type) { case CLOUD_FIRE: diff --git a/crawl-ref/source/cloud.h b/crawl-ref/source/cloud.h index 9cd1ef249c..9bb5ba7f00 100644 --- a/crawl-ref/source/cloud.h +++ b/crawl-ref/source/cloud.h @@ -34,19 +34,30 @@ void delete_cloud( int cloud ); void move_cloud( int cloud, const coord_def& newpos ); void check_place_cloud( cloud_type cl_type, const coord_def& p, int lifetime, - kill_category whose, int spread_rate = -1 ); + kill_category whose, int spread_rate = -1, + int colour = -1, std::string name = "", + std::string tile = ""); void check_place_cloud( cloud_type cl_type, const coord_def& p, int lifetime, - killer_type killer, int spread_rate = -1 ); + killer_type killer, int spread_rate = -1, + int colour = -1, std::string name = "", + std::string tile = ""); void check_place_cloud( cloud_type cl_type, const coord_def& p, int lifetime, kill_category whose, killer_type killer, - int spread_rate = -1 ); + int spread_rate = -1, + int colour = -1, std::string name = "", + std::string tile = ""); void place_cloud( cloud_type cl_type, const coord_def& ctarget, - int cl_range, kill_category whose, int spread_rate = -1 ); + int cl_range, kill_category whose, int spread_rate = -1, + int colour = -1, std::string name = "", + std::string tile = ""); void place_cloud( cloud_type cl_type, const coord_def& ctarget, - int cl_range, killer_type killer, int spread_rate = -1 ); + int cl_range, killer_type killer, int spread_rate = -1, + int colour = -1, std::string name = "", + std::string tile = ""); void place_cloud( cloud_type cl_type, const coord_def& ctarget, int cl_range, kill_category whose, killer_type killer, - int spread_rate = -1 ); + int spread_rate = -1, int colour = -1, std::string name = "", + std::string tile = ""); void manage_clouds(void); @@ -61,6 +72,7 @@ int resist_fraction(int resist, int bonus_res = 0); int max_cloud_damage(cloud_type cl_type, int power = -1); void in_a_cloud(void); +std::string cloud_name(int cloudno); std::string cloud_name(cloud_type type); int get_cloud_colour(int cloudno); diff --git a/crawl-ref/source/dat/clua/lm_fog.lua b/crawl-ref/source/dat/clua/lm_fog.lua index 17b80e652e..ace95fec53 100644 --- a/crawl-ref/source/dat/clua/lm_fog.lua +++ b/crawl-ref/source/dat/clua/lm_fog.lua @@ -52,6 +52,10 @@ -- start_clouds: The number of clouds to lay when the level containing -- the cloud machine is entered. This is necessary since clouds -- are cleared when the player leaves a level. +-- colour: A string value with which to recolour the cloud. +-- name: A string value with which to rebrand (specifically, rename) the +-- cloud in question. +-- tile: A string value with which to retile the cloud. -- listener: A table with a function field called 'func'. Will be called -- whenever the countdown is activated, and whenever the fog -- machine is reset. It will be called with a reference to the table, @@ -100,6 +104,9 @@ function FogMachine:new(pars) m.size_max = pars.size_max or pars.size m.spread_rate = pars.spread_rate or -1 m.start_clouds = pars.start_clouds or 1 + m.colour = pars.colour or "" + m.name = pars.name or "" + m.tile = pars.tile or "" m.size_buildup_amnt = pars.size_buildup_amnt or 0 m.size_buildup_time = pars.size_buildup_time or 1 @@ -125,9 +132,10 @@ function FogMachine:new(pars) end function FogMachine:apply_cloud(point, pow_min, pow_max, pow_rolls, - size, cloud_type, kill_cat, spread) + size, cloud_type, kill_cat, spread, colour, + name, tile) dgn.apply_area_cloud(point.x, point.y, pow_min, pow_max, pow_rolls, size, - cloud_type, kill_cat, spread) + cloud_type, kill_cat, spread, colour, name, tile) end function FogMachine:do_fog(point) @@ -165,7 +173,8 @@ function FogMachine:do_fog(point) self:apply_cloud(p, self.pow_min, self.pow_max, self.pow_rolls, crawl.random_range(size_min, size_max, 1), - self.cloud_type, self.kill_cat, spread) + self.cloud_type, self.kill_cat, spread, self.colour, + self.name, self.tile) end function FogMachine:do_trigger(triggerer, marker, ev) @@ -225,6 +234,9 @@ function FogMachine:write(marker, th) file.marshall(th, self.spread_buildup_amnt) file.marshall(th, self.spread_buildup_time) file.marshall(th, self.buildup_turns) + file.marshall(th, self.colour) + file.marshall(th, self.name) + file.marshall(th, self.tile) end function FogMachine:read(marker, th) @@ -245,6 +257,9 @@ function FogMachine:read(marker, th) self.spread_buildup_amnt = file.unmarshall_number(th) self.spread_buildup_time = file.unmarshall_number(th) self.buildup_turns = file.unmarshall_number(th) + self.colour = file.unmarshall_string(th) + self.name = file.unmarshall_string(th) + self.tile = file.unmarshall_string(th) setmetatable(self, FogMachine) diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index 9807ec54dc..3b0a1262b3 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -3418,10 +3418,9 @@ static void _describe_cell(const coord_def& where, bool in_range) if (env.cgrid(where) != EMPTY_CLOUD) { const int cloud_inspected = env.cgrid(where); - const cloud_type ctype = (cloud_type) env.cloud[cloud_inspected].type; mprf(MSGCH_EXAMINE, "There is a cloud of %s here.", - cloud_name(ctype).c_str()); + cloud_name(cloud_inspected).c_str()); cloud_described = true; } diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index e1a8083ef3..c3eb240a16 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -257,9 +257,13 @@ struct cloud_struct unsigned char spread_rate; kill_category whose; killer_type killer; + int colour; + std::string name; + std::string tile; cloud_struct() : pos(), type(CLOUD_NONE), decay(0), spread_rate(0), - whose(KC_OTHER), killer(KILL_NONE) + whose(KC_OTHER), killer(KILL_NONE), colour(-1), + name(""), tile("") { } diff --git a/crawl-ref/source/l_dgn.cc b/crawl-ref/source/l_dgn.cc index 99035d37f0..dddb216da4 100644 --- a/crawl-ref/source/l_dgn.cc +++ b/crawl-ref/source/l_dgn.cc @@ -1173,14 +1173,16 @@ static int lua_cloud_pow_rolls; static int make_a_lua_cloud(coord_def where, int garbage, int spread_rate, cloud_type ctype, kill_category whose, - killer_type killer) + killer_type killer, int colour, std::string name, + std::string tile) { UNUSED( garbage ); const int pow = random_range(lua_cloud_pow_min, lua_cloud_pow_max, lua_cloud_pow_rolls); - place_cloud( ctype, where, pow, whose, killer, spread_rate ); + place_cloud( ctype, where, pow, whose, killer, spread_rate, colour, name, + tile ); return 1; } @@ -1200,6 +1202,10 @@ static int dgn_apply_area_cloud(lua_State *ls) const int spread_rate = lua_isnumber(ls, 9) ? luaL_checkint(ls, 9) : -1; + const int colour = lua_isstring(ls, 10) ? str_to_colour(luaL_checkstring(ls, 10)) : -1; + std::string name = lua_isstring(ls, 11) ? luaL_checkstring(ls, 11) : ""; + std::string tile = lua_isstring(ls, 12) ? luaL_checkstring(ls, 12) : ""; + if (!in_bounds(x, y)) { char buf[80]; @@ -1265,7 +1271,7 @@ static int dgn_apply_area_cloud(lua_State *ls) apply_area_cloud(make_a_lua_cloud, coord_def(x, y), 0, size, ctype, kc, cloud_struct::whose_to_killer(kc), - spread_rate); + spread_rate, colour, name, tile); return (0); } @@ -1282,6 +1288,10 @@ static int dgn_place_cloud(lua_State *ls) const int spread_rate = lua_isnumber(ls, 6) ? luaL_checkint(ls, 6) : -1; + const int colour = lua_isstring(ls, 7) ? str_to_colour(luaL_checkstring(ls, 7)) : -1; + std::string name = lua_isstring(ls, 8) ? luaL_checkstring(ls, 8) : ""; + std::string tile = lua_isstring(ls, 9) ? luaL_checkstring(ls, 9) : ""; + if (!in_bounds(x, y)) { char buf[80]; @@ -1315,7 +1325,7 @@ static int dgn_place_cloud(lua_State *ls) return (0); } - place_cloud(ctype, coord_def(x, y), cl_range, kc, spread_rate); + place_cloud(ctype, coord_def(x, y), cl_range, kc, spread_rate, colour, name, tile); return (0); } diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 3312bfcf94..b5c9e6bb40 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -2889,14 +2889,15 @@ bool i_feel_safe(bool announce, bool want_move, bool just_monsters, int range) // check clouds if (in_bounds(you.pos()) && env.cgrid(you.pos()) != EMPTY_CLOUD) { - const cloud_type type = env.cloud[env.cgrid(you.pos())].type; + const int cloudidx = env.cgrid(you.pos()); + const cloud_type type = env.cloud[cloudidx].type; if (is_damaging_cloud(type, want_move)) { if (announce) { mprf(MSGCH_WARN, "You're standing in a cloud of %s!", - cloud_name(type).c_str()); + cloud_name(cloudidx).c_str()); } return (false); } diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index e7e54c63d6..f16b6742c6 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -165,7 +165,7 @@ bool move_player_to_grid( const coord_def& p, bool stepped, bool allow_shift, { std::string prompt = make_stringf( "Really step into that cloud of %s?", - cloud_name(ctype).c_str()); + cloud_name(cloud).c_str()); if (!yesno(prompt.c_str(), false, 'n')) { diff --git a/crawl-ref/source/show.cc b/crawl-ref/source/show.cc index d6c3ff577a..c37901d7e0 100644 --- a/crawl-ref/source/show.cc +++ b/crawl-ref/source/show.cc @@ -273,8 +273,7 @@ void show_def::_update_cloud(int cloudno) grid(e).colour = which_colour; #ifdef USE_TILE - tile_place_cloud(e.x, e.y, env.cloud[cloudno].type, - env.cloud[cloudno].decay); + tile_place_cloud(e.x, e.y, env.cloud[cloudno]); #endif } diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc index 647077f2f4..f6dd4009a3 100644 --- a/crawl-ref/source/spells1.cc +++ b/crawl-ref/source/spells1.cc @@ -661,29 +661,32 @@ bool stinking_cloud( int pow, bolt &beem ) int cast_big_c(int pow, cloud_type cty, kill_category whose, bolt &beam) { - big_cloud( cty, whose, beam.target, pow, 8 + random2(3) ); + big_cloud( cty, whose, beam.target, pow, 8 + random2(3), -1 ); return (1); } void big_cloud(cloud_type cl_type, kill_category whose, - const coord_def& where, int pow, int size, int spread_rate) + const coord_def& where, int pow, int size, int spread_rate, + int colour, std::string name, std::string tile) { big_cloud(cl_type, whose, cloud_struct::whose_to_killer(whose), - where, pow, size, spread_rate); + where, pow, size, spread_rate, colour, name, tile); } void big_cloud(cloud_type cl_type, killer_type killer, - const coord_def& where, int pow, int size, int spread_rate) + const coord_def& where, int pow, int size, int spread_rate, + int colour, std::string name, std::string tile) { big_cloud(cl_type, cloud_struct::killer_to_whose(killer), killer, - where, pow, size, spread_rate); + where, pow, size, spread_rate, colour, name, tile); } void big_cloud(cloud_type cl_type, kill_category whose, killer_type killer, - const coord_def& where, int pow, int size, int spread_rate) + const coord_def& where, int pow, int size, int spread_rate, + int colour, std::string name, std::string tile) { apply_area_cloud(make_a_normal_cloud, where, pow, size, - cl_type, whose, killer, spread_rate); + cl_type, whose, killer, spread_rate, colour, name, tile); } static bool _mons_hostile(const monsters *mon) diff --git a/crawl-ref/source/spells1.h b/crawl-ref/source/spells1.h index 8368947f03..b342b71684 100644 --- a/crawl-ref/source/spells1.h +++ b/crawl-ref/source/spells1.h @@ -21,11 +21,14 @@ void remove_divine_stamina(); bool cast_vitalisation(); void big_cloud(cloud_type cl_type, kill_category whose, const coord_def& where, - int pow, int size, int spread_rate = -1); + int pow, int size, int spread_rate = -1, int colour = -1, + std::string name = "", std::string tile = ""); void big_cloud(cloud_type cl_type, killer_type killer, const coord_def& where, - int pow, int size, int spread_rate = -1); + int pow, int size, int spread_rate = -1, int colour = -1, + std::string name = "", std::string tile = ""); void big_cloud(cloud_type cl_type, kill_category whose, killer_type killer, - const coord_def& where, int pow, int size, int spread_rate = -1); + const coord_def& where, int pow, int size, int spread_rate = -1, + int colour = -1, std::string name = "", std::string tile = ""); int blink(int pow, bool high_level_controlled_blink, bool wizard_blink = false); diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc index 6819599ee5..6fbb55f399 100644 --- a/crawl-ref/source/spells4.cc +++ b/crawl-ref/source/spells4.cc @@ -879,14 +879,15 @@ void cast_dispersal(int pow) int make_a_normal_cloud(coord_def where, int pow, int spread_rate, cloud_type ctype, kill_category whose, - killer_type killer) + killer_type killer, int colour, std::string name, + std::string tile) { if (killer == KILL_NONE) killer = cloud_struct::whose_to_killer(whose); place_cloud( ctype, where, (3 + random2(pow / 4) + random2(pow / 4) + random2(pow / 4)), - whose, killer, spread_rate ); + whose, killer, spread_rate, colour, name, tile ); return 1; } diff --git a/crawl-ref/source/spells4.h b/crawl-ref/source/spells4.h index fbadac0203..cd977e3d01 100644 --- a/crawl-ref/source/spells4.h +++ b/crawl-ref/source/spells4.h @@ -16,7 +16,8 @@ struct bolt; bool backlight_monsters(coord_def where, int pow, int garbage); int make_a_normal_cloud(coord_def where, int pow, int spread_rate, cloud_type ctype, kill_category, - killer_type killer = KILL_NONE); + killer_type killer = KILL_NONE, int colour = -1, + std::string name = "", std::string tile = ""); int disperse_monsters(coord_def where, int pow); void remove_condensation_shield(); diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc index 2f32ea67e1..75d7264e07 100644 --- a/crawl-ref/source/spl-util.cc +++ b/crawl-ref/source/spl-util.cc @@ -73,7 +73,8 @@ static struct spell_desc *_seekspell(spell_type spellid); static bool _cloud_helper(cloud_func func, const coord_def& where, int pow, int spread_rate, cloud_type ctype, kill_category whose, - killer_type killer); + killer_type killer, int colour, + std::string name, std::string tile); // // BEGIN PUBLIC FUNCTIONS @@ -677,13 +678,14 @@ int apply_area_within_radius(cell_func cf, const coord_def& where, void apply_area_cloud( cloud_func func, const coord_def& where, int pow, int number, cloud_type ctype, kill_category whose, killer_type killer, - int spread_rate ) + int spread_rate, int colour, std::string name, + std::string tile) { int good_squares = 0; int neighbours[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; if (number && _cloud_helper(func, where, pow, spread_rate, ctype, whose, - killer)) + killer, colour, name, tile)) number--; if (number == 0) @@ -703,7 +705,8 @@ void apply_area_cloud( cloud_func func, const coord_def& where, { const int aux = arrs[m][i]; if ( _cloud_helper(func, where + Compass[aux], - pow, spread_rate, ctype, whose, killer)) + pow, spread_rate, ctype, whose, killer, colour, + name, tile)) { number--; good_squares++; @@ -729,7 +732,7 @@ void apply_area_cloud( cloud_func func, const coord_def& where, number -= spread; good_squares--; apply_area_cloud(func, where + Compass[j], pow, spread, ctype, whose, - killer, spread_rate); + killer, spread_rate, colour, name, tile); } } @@ -893,11 +896,13 @@ bool is_valid_spell(spell_type spell) static bool _cloud_helper(cloud_func func, const coord_def& where, int pow, int spread_rate, cloud_type ctype, kill_category whose, - killer_type killer) + killer_type killer, int colour, std::string name, + std::string tile) { if (!feat_is_solid(grd(where)) && env.cgrid(where) == EMPTY_CLOUD) { - func(where, pow, spread_rate, ctype, whose, killer); + func(where, pow, spread_rate, ctype, whose, killer, colour, name, + tile); return (true); } diff --git a/crawl-ref/source/spl-util.h b/crawl-ref/source/spl-util.h index 8ff8e4ceeb..eb44f4db07 100644 --- a/crawl-ref/source/spl-util.h +++ b/crawl-ref/source/spl-util.h @@ -80,7 +80,8 @@ const char* spelltype_long_name( int which_spelltype ); typedef int cell_func(coord_def where, int pow, int aux, actor *agent); typedef int cloud_func(coord_def where, int pow, int spreadrate, cloud_type type, kill_category whose, - killer_type killer); + killer_type killer, int colour, std::string name, + std::string tile); int apply_area_visible(cell_func cf, int power, bool pass_through_trans = false, actor *agent = NULL); @@ -104,7 +105,8 @@ int apply_area_within_radius(cell_func cf, const coord_def& where, void apply_area_cloud(cloud_func func, const coord_def& where, int pow, int number, cloud_type ctype, kill_category kc, killer_type killer, - int spread_rate = -1); + int spread_rate = -1, int colour = -1, + std::string name = "", std::string tile = ""); bool spell_direction( dist &spelld, bolt &pbolt, targetting_type restrict = DIR_NONE, diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc index c092062c23..8a90a4ee00 100644 --- a/crawl-ref/source/tags.cc +++ b/crawl-ref/source/tags.cc @@ -1803,6 +1803,9 @@ static void tag_construct_level(writer &th) marshallByte(th, (char) env.cloud[i].spread_rate); marshallByte(th, env.cloud[i].whose); marshallByte(th, env.cloud[i].killer); + marshallShort(th, env.cloud[i].colour); + marshallString(th, env.cloud[i].name); + marshallString(th, env.cloud[i].tile); } // how many shops? @@ -2201,6 +2204,9 @@ static void tag_read_level( reader &th, char minorVersion ) env.cloud[i].spread_rate = (unsigned char) unmarshallByte(th); env.cloud[i].whose = static_cast(unmarshallByte(th)); env.cloud[i].killer = static_cast(unmarshallByte(th)); + env.cloud[i].colour = unmarshallShort(th); + env.cloud[i].name = unmarshallString(th); + env.cloud[i].tile = unmarshallString(th); } // how many shops? diff --git a/crawl-ref/source/tags.h b/crawl-ref/source/tags.h index e7877dfd6f..3ecacbbcd1 100644 --- a/crawl-ref/source/tags.h +++ b/crawl-ref/source/tags.h @@ -40,7 +40,7 @@ enum tag_file_type // file types supported by tag system enum tag_major_version { TAG_MAJOR_START = 5, - TAG_MAJOR_VERSION = 11 + TAG_MAJOR_VERSION = 12 }; // Minor version will be reset to zero when major version changes. diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc index 36b3e5014c..34cbf7eb7f 100644 --- a/crawl-ref/source/tilepick.cc +++ b/crawl-ref/source/tilepick.cc @@ -2649,64 +2649,89 @@ int tileidx_feature(dungeon_feature_type feat, int gx, int gy) } } -static int _tileidx_cloud(int type, int decay) +static int _tileidx_cloud(cloud_struct cl) { + int type = cl.type; + int decay = cl.decay; + std::string override = cl.tile; + int colour = cl.colour; + int ch = TILE_ERROR; int dur = decay/20; if (dur > 2) dur = 2; - switch (type) + if (!override.empty()) { - case CLOUD_FIRE: - ch = TILE_CLOUD_FIRE_0 + dur; - break; + unsigned int index; + if (!tile_main_index(override.c_str(), index)) + { + mprf(MSGCH_ERROR, "Invalid tile requested for cloud: '%s'.", override.c_str()); + } + else + { + int offset = tile_main_count(index); + ch = index + offset; + } + } + else + { + switch (type) + { + case CLOUD_FIRE: + ch = TILE_CLOUD_FIRE_0 + dur; + break; - case CLOUD_COLD: - ch = TILE_CLOUD_COLD_0 + dur; - break; + case CLOUD_COLD: + ch = TILE_CLOUD_COLD_0 + dur; + break; - case CLOUD_STINK: - case CLOUD_POISON: - ch = TILE_CLOUD_POISON_0 + dur; - break; + case CLOUD_STINK: + case CLOUD_POISON: + ch = TILE_CLOUD_POISON_0 + dur; + break; - case CLOUD_BLUE_SMOKE: - ch = TILE_CLOUD_BLUE_SMOKE; - break; + case CLOUD_BLUE_SMOKE: + ch = TILE_CLOUD_BLUE_SMOKE; + break; - case CLOUD_PURPLE_SMOKE: - case CLOUD_TLOC_ENERGY: - ch = TILE_CLOUD_TLOC_ENERGY; - break; + case CLOUD_PURPLE_SMOKE: + case CLOUD_TLOC_ENERGY: + ch = TILE_CLOUD_TLOC_ENERGY; + break; - case CLOUD_MIASMA: - ch = TILE_CLOUD_MIASMA; - break; + case CLOUD_MIASMA: + ch = TILE_CLOUD_MIASMA; + break; - case CLOUD_BLACK_SMOKE: - ch = TILE_CLOUD_BLACK_SMOKE; - break; + case CLOUD_BLACK_SMOKE: + ch = TILE_CLOUD_BLACK_SMOKE; + break; - case CLOUD_MUTAGENIC: - ch = (dur == 0 ? TILE_CLOUD_MUTAGENIC_0 : - dur == 1 ? TILE_CLOUD_MUTAGENIC_1 - : TILE_CLOUD_MUTAGENIC_2); - ch += random2(tile_main_count(ch)); - break; + case CLOUD_MUTAGENIC: + ch = (dur == 0 ? TILE_CLOUD_MUTAGENIC_0 : + dur == 1 ? TILE_CLOUD_MUTAGENIC_1 + : TILE_CLOUD_MUTAGENIC_2); + ch += random2(tile_main_count(ch)); + break; - case CLOUD_MIST: - ch = TILE_CLOUD_MIST; - break; + case CLOUD_MIST: + ch = TILE_CLOUD_MIST; + break; - case CLOUD_RAIN: - ch = TILE_CLOUD_RAIN + random2(tile_main_count(TILE_CLOUD_RAIN)); - break; + case CLOUD_RAIN: + ch = TILE_CLOUD_RAIN + random2(tile_main_count(TILE_CLOUD_RAIN)); + break; - default: - ch = TILE_CLOUD_GREY_SMOKE; - break; + default: + ch = TILE_CLOUD_GREY_SMOKE; + break; + } } + + if (colour != -1) + ch = tile_main_coloured(ch, colour); + return (ch | TILE_FLAG_FLYING); } @@ -4852,9 +4877,9 @@ void tile_place_monster(int gx, int gy, int idx, bool foreground, bool detected) } } -void tile_place_cloud(int x, int y, int type, int decay) +void tile_place_cloud(int x, int y, cloud_struct cl) { - env.tile_fg[x][y] = _tileidx_cloud(type, decay); + env.tile_fg[x][y] = _tileidx_cloud(cl); } unsigned int num_tile_rays = 0; diff --git a/crawl-ref/source/tilereg.cc b/crawl-ref/source/tilereg.cc index 753ea5be30..82ed562c56 100644 --- a/crawl-ref/source/tilereg.cc +++ b/crawl-ref/source/tilereg.cc @@ -1541,10 +1541,8 @@ int DungeonRegion::handle_mouse(MouseEvent &event) const int cloudidx = env.cgrid(gc); if (cloudidx != EMPTY_CLOUD) { - cloud_type ctype = env.cloud[cloudidx].type; - std::string terrain_desc = desc; - desc = cloud_name(ctype); + desc = cloud_name(cloudidx); if (!terrain_desc.empty()) desc += "\n" + terrain_desc; @@ -1937,9 +1935,7 @@ bool DungeonRegion::update_alt_text(std::string &alt) const int cloudidx = env.cgrid(gc); if (cloudidx != EMPTY_CLOUD) { - cloud_type ctype = env.cloud[cloudidx].type; - - inf.prefix = "There is a cloud of " + cloud_name(ctype) + inf.prefix = "There is a cloud of " + cloud_name(cloudidx) + " here.$$"; } } diff --git a/crawl-ref/source/tiles.h b/crawl-ref/source/tiles.h index d938715e55..2f1028b72d 100644 --- a/crawl-ref/source/tiles.h +++ b/crawl-ref/source/tiles.h @@ -74,7 +74,7 @@ void tile_place_monster(int gx, int gy, int idx, bool foreground = true, bool detected = false); void tile_place_item(int x, int y, int idx); void tile_place_item_marker(int x, int y, int idx); -void tile_place_cloud(int x, int y, int type, int decay); +void tile_place_cloud(int x, int y, cloud_struct cl); void tile_place_ray(const coord_def& gc, bool in_range); void tile_draw_rays(bool resetCount); void tile_clear_buf(); diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc index 6893f64262..7f6bc68bc8 100644 --- a/crawl-ref/source/tutorial.cc +++ b/crawl-ref/source/tutorial.cc @@ -4440,7 +4440,7 @@ static void _tutorial_describe_cloud(int x, int y) if (ctype == CLOUD_NONE) return; - std::string cname = cloud_name(ctype); + std::string cname = cloud_name(env.cgrid(coord_def(x, y))); std::ostringstream ostr; -- cgit v1.2.3-54-g00ecf