diff options
-rw-r--r-- | crawl-ref/source/dat/clua/ziggurat.lua | 22 | ||||
-rw-r--r-- | crawl-ref/source/dat/icecave.des | 8 | ||||
-rw-r--r-- | crawl-ref/source/dat/ziggurat.des | 28 | ||||
-rw-r--r-- | crawl-ref/source/misc.cc | 72 | ||||
-rw-r--r-- | crawl-ref/source/tile2.cc | 2 |
5 files changed, 75 insertions, 57 deletions
diff --git a/crawl-ref/source/dat/clua/ziggurat.lua b/crawl-ref/source/dat/clua/ziggurat.lua index 2e95545451..9df1acade1 100644 --- a/crawl-ref/source/dat/clua/ziggurat.lua +++ b/crawl-ref/source/dat/clua/ziggurat.lua @@ -190,11 +190,23 @@ local function clamp_in_bounds(x, y) end local function set_tiles_for_place(place) - local rock = dgn.lev_rocktile(place) - dgn.change_rock_tile(rock) +-- local rock = dgn.lev_rocktile(place) +-- local floor = dgn.lev_floortile(place) + local tileset = { + blue = "wall_zot_blue", + red = "wall_zot_red", + lightblue = "wall_zot_cyan", + magenta = "wall_zot_magenta", + green = "wall_zot_green", + white = "wall_vault" + } - local floor = dgn.lev_floortile(place) - dgn.change_floor_tile(floor) + local wall = tileset[ziggurat_wall_colour()] + if (wall == nil) then + wall = "wall_vault" + end + dgn.change_rock_tile(wall) + dgn.change_floor_tile("floor_vault") end local function set_floor_colour(colour) @@ -299,7 +311,7 @@ mset(with_props("place:Slime:$", { jelly_protect = true }), with_props("place:Lair:$", { weight = 5 }), "place:Crypt:$", "place:Abyss", - with_props("place:Shoal:$", { weight = 5 }), +-- with_props("place:Shoal:$", { weight = 5 }), with_props("place:Coc:$", { weight = 5 }), with_props("place:Geh:$", { weight = 5 }), with_props("place:Dis:$", { weight = 5 }), diff --git a/crawl-ref/source/dat/icecave.des b/crawl-ref/source/dat/icecave.des index f85a8fa8b4..fc010f72b5 100644 --- a/crawl-ref/source/dat/icecave.des +++ b/crawl-ref/source/dat/icecave.des @@ -9,7 +9,7 @@ # # Flavour: white colours, ice monsters, appropriate clouds. # The escape is at the start. The player can back away if s/he decides -# some challenges are too much to handle. +# some challenges are too much to handle. # ############################################################################### @@ -20,7 +20,7 @@ function ice_cave_portal(e) "grim and arctic fury. You note that the archway is melting away." local timeout_turns = crawl.random_range(1200, 1700) - + local messager = timed_msg { visible = true, @@ -236,7 +236,7 @@ xxx.xxx xxx+xxx ENDMAP -NAME: portal_ice_cave_ice_statue_001 +NAME: portal_ice_cave_entry_ice_statue_001 TAGS: uniq_ice_cave DEPTH: D:14-24 ORIENT: float @@ -254,7 +254,7 @@ x.....x xxx+xxx ENDMAP -NAME: portal_ice_cave_ice_statue_002 +NAME: portal_ice_cave_entry_ice_statue_002 TAGS: uniq_ice_cave DEPTH: 14-24 ORIENT: float diff --git a/crawl-ref/source/dat/ziggurat.des b/crawl-ref/source/dat/ziggurat.des index b2c0f20068..e3dadf3a51 100644 --- a/crawl-ref/source/dat/ziggurat.des +++ b/crawl-ref/source/dat/ziggurat.des @@ -51,18 +51,18 @@ SHUFFLE: wW' / l;_ COLOUR: ; = red COLOUR: _ : blue / lightred COLOUR: ' = cyan -FTILE: ' = floor_hall, _ = floor_hall, ; = floor_hall, O = floor_hall +FTILE: ' = floor_hall, _ = floor_hall, ; = floor_hall, O = floor_hall SUBST: '=. , ;=. , _=. : ziggurat_portal(_G) MAP - ..'.. - ..'W'.. - ..'WwW'.. + ..'.. + ..'W'.. + ..'WwW'.. ..'WwwwW'.. .'WwwOwwW'. ..'WwwwW'.. - ..'WwW'.. - ..'W'.. + ..'WwW'.. + ..'W'.. ..'.. ENDMAP @@ -151,7 +151,7 @@ ENDMAP NAME: enter_shallow_ziggurat_d CHANCE: 50 -TAGS: chance_shallow_zig +TAGS: chance_shallow_zig MONS: angel / nothing w:20 : ziggurat_portal(_G) MAP @@ -199,14 +199,14 @@ FTILE: ' = floor_hall, _ = floor_hall, ; = floor_hall, O = floor_hall SUBST: '=. , ;=. , _=. : ziggurat_portal(_G) MAP - ..'.. - ..'W'.. - ..'WwW'.. + ..'.. + ..'W'.. + ..'WwW'.. ..'WwwwW'.. .'WwwOwwW'. ..'WwwwW'.. - ..'WwW'.. - ..'W'.. + ..'WwW'.. + ..'W'.. ..'.. ENDMAP @@ -261,7 +261,7 @@ default-depth: ####################################################################### # Pillars for ziggurats. # Ziggurat pillars are handled specially in ziggurat.lua. In particular: -# - ziggurat pillars do not need allow_dup. The pillar map is never +# - ziggurat pillars do not need allow_dup. The pillar map is never # registered as used. # - ziggurat pillars cannot use map markers. ####################################################################### @@ -276,7 +276,7 @@ NAME: ziggurat_pillar_b TAGS: ziggurat_pillar SUBST: c : cxvb MAP -c +c cc ENDMAP diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 9f494299d1..7420143953 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -420,39 +420,32 @@ void maybe_coagulate_blood_potions_floor(int obj) _compare_blood_quantity(blood, timer.size()); } +static std::string _get_desc_quantity(const int quant, const int total) +{ + if (total == quant) + return "Your"; + else if (quant == 1) + return "One of your"; + else if (quant == 2) + return "Two of your"; + else if (quant >= (total * 3) / 4) + return "Most of your"; + else + return "Some of your"; +} + // Prints messages for blood potions coagulating in inventory (coagulate = true) // or whenever potions are cursed into potions of decay (coagulate = false). static void _potion_stack_changed_message(item_def &potion, int num_changed, - bool coagulate = true) + std::string verb) { ASSERT(num_changed > 0); - if (coagulate) - ASSERT(potion.sub_type == POT_BLOOD); - - std::string msg; - if (potion.quantity == num_changed) - msg = "Your "; - else if (num_changed == 1) - msg = "One of your "; - else if (num_changed == 2) - msg = "Two of your "; - else if (num_changed >= (potion.quantity * 3) / 4) - msg = "Most of your "; - else - msg = "Some of your "; - - msg += potion.name(DESC_PLAIN, false); - if (coagulate) - msg += " coagulate"; - else - msg += " decay"; - - if (num_changed == 1) - msg += "s"; - msg += "."; - - mpr(msg.c_str(), MSGCH_ROTTEN_MEAT); + verb = replace_all(verb, "%s", num_changed == 1 ? "s" : ""); + mprf(MSGCH_ROTTEN_MEAT, "%s %s %s.", + _get_desc_quantity(num_changed, potion.quantity).c_str(), + potion.name(DESC_PLAIN, false).c_str(), + verb.c_str()); } // Returns true if "equipment weighs less" message needed. @@ -518,9 +511,23 @@ bool maybe_coagulate_blood_potions_inv(item_def &blood) you.wield_change = true; you.redraw_quiver = true; - if (!coag_count) // Some potions rotted away. + const bool knew_coag = (get_ident_type(OBJ_POTIONS, POT_BLOOD_COAGULATED) + == ID_KNOWN_TYPE); + + if (!coag_count) // Some potions rotted away, but none coagulated. { + // Only coagulated blood can rot. + ASSERT(blood.sub_type == POT_BLOOD_COAGULATED); + _potion_stack_changed_message(blood, rot_count, "rot%s away"); blood.quantity -= rot_count; + + if (!knew_coag) + { + set_ident_type( OBJ_POTIONS, POT_BLOOD_COAGULATED, ID_KNOWN_TYPE ); + if (blood.quantity >= 1) + mpr(blood.name(DESC_INVENTORY).c_str()); + } + if (blood.quantity < 1) { if (you.equip[EQ_WEAPON] == blood.link) @@ -537,11 +544,10 @@ bool maybe_coagulate_blood_potions_inv(item_def &blood) // Coagulated blood cannot coagulate any further... ASSERT(blood.sub_type == POT_BLOOD); - bool knew_blood = get_ident_type(OBJ_POTIONS, POT_BLOOD) == ID_KNOWN_TYPE; - bool knew_coag = (get_ident_type(OBJ_POTIONS, POT_BLOOD_COAGULATED) - == ID_KNOWN_TYPE); + const bool knew_blood = get_ident_type(OBJ_POTIONS, POT_BLOOD) + == ID_KNOWN_TYPE; - _potion_stack_changed_message(blood, coag_count); + _potion_stack_changed_message(blood, coag_count, "coagulate%s"); // Identify both blood and coagulated blood, if necessary. if (!knew_blood) @@ -948,7 +954,7 @@ void split_potions_into_decay( int obj, int amount, bool need_msg ) // Output decay message. if (need_msg && get_ident_type(OBJ_POTIONS, POT_DECAY) == ID_KNOWN_TYPE) - _potion_stack_changed_message(potion, amount, false); + _potion_stack_changed_message(potion, amount, "decay%s"); if (you.equip[EQ_WEAPON] == obj) you.wield_change = true; diff --git a/crawl-ref/source/tile2.cc b/crawl-ref/source/tile2.cc index d79151d6ae..ab0fdae775 100644 --- a/crawl-ref/source/tile2.cc +++ b/crawl-ref/source/tile2.cc @@ -167,7 +167,7 @@ void tile_default_flv(level_area_type lev, branch_type br, tile_flavour &flv) return; case BRANCH_SHOALS: - flv.wall = TILE_WALL_YELLOW_ROCK; + flv.wall = TILE_WALL_YELLOW_ROCK; flv.floor = TILE_FLOOR_SAND_STONE; return; |