Tweaked dungeon builder so you always land on { on level 1 of a branch (using a map marker to identify which stair was a {).
Maps with the "uniq" tag will be used only once in a game. Maps with a "uniq_foo" tag will be used only once, and will also prevent any other maps tagged "uniq_foo" from being used thereafter. Breaks saves.
Oklob plants should not receive stab brands, fixed.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1897 c06c8d41-db1a-0410-9941-cceddc491573
3PY3L3A4QRW3Z5Y7SHO4TMVOOP2VNCO27X2MX4DTOP2SADLBQUOAC LCCGXSFIDQFIRXHGRJWOELNPQOHHCXCWXS366GOULDFPQVOKAIJAC RLUXNEFLEICA7ERDVUOIJZJJSTPY2QLEXYN2KDEVWZSKVIV4CKPQC WTGKEI4F7WINPHW4UMWFADYQH7VK7TNV5V7RUORBVXGFSO5SNP5AC 3EEPRFC6SVG4NAQS5XDAUBDG33CRJ7UG3MJOHI6WNO6RKCIGTFXAC 2WRXQTGYDBLV46WRNVIUKGNA5QS563XZNNW3N2L6PVOCHIP2YGHQC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC IVVTHLTTLOP5TSULXJWUSSXHOKYWVU3OWKYVK45A7RIB6V34MYQAC 7AMQN7MITMXBNVDAK5VOXTQ4TZIAOD6ZLOFJG7GQMBTY23Y2BKSAC 5ASC3STDYCNLZFEBN6UTMUCGDETHBR2OCBZCF5VIAZ5RRWLOTDYQC 7KWDC7XFNMBLSUO2HISIROBINZBX5T67LJEEXTAORXW2YZ7VWFGAC RGHXFBNIULRVRYLBGG5JZDMYVM2E2JJ2Y5KQPMU6PUS3V26G6ZXQC ANBVGN4RZOMY5LI4QSHOV2477FN55H353ZYLSVCPTXC7AWWSQZBAC KXUQB3WNWC5IFL6VFWADEPQMMU3VV3NDI5FLA666PGOEWFYUHCLQC 2EF3QUVPUQAKBTZKLKQ5B73Z26TXX2H2G2MKIMXD7B7BSDCYE7SAC SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC TZ55IZNANEJO2WDTKYWVLY2W2VV6BR7WKIN7XLNISAMMFT6LG2WQC OY7KHQPESOUHPBXRZ2JSNUKPAC7DCDY73TAUHCSJG5V6TPAHBVYQC 5UVDIVD4NSXA52U4QMQIVST3GSZJ2A2YZK3RUEXKPM43YVQ7LI5AC JNB3PBPBJHDUHH47ZICB25QENPTMLYK7CXC5BXRVWZ3J3ZZPKCUAC SCWXQW5H65OXUP2MEJ2MEEAVPSRJDT3RQGKYCMKVTORS2334PQSQC WE3JT43OR4L6675GINGU4B3YDBMURJZHDDYY3VLHUJEBAKH2HYEAC WLX2RQMMOMP2PYPAGJRM4VFD2WTLJTOAZZPPY3MV76FU2EGEJ54QC ZJLJGSB2XSBQU42OFQMXL3EG4CXAQGOYAU6YTV2SAWZEJIPFH2CAC 2YSMM7QMFZOPD5NXAD2OAMDJEY5LOZO4NCYBC7UCQVANKINJRNBAC C22455VGUQOSUX2OORA32LROFQ7NNYDMD2ZDTTUZSAQLXK4AD6QAC KCHX2F3JFEWOZT3WMJVZAAQUU2QSZ5Q7RDCD7WUJ7VE65J52JFUQC 56C44YMFHZ62GXAAOLYSLLGBVGRWXB53W2VI37Q26ZECEK2XG5SQC XAFFD52IHN6FWFR2TT5F2KCUS7HAVCBI5CWTFMKPQG77GGTGAHLAC H3552BCIAVBLKAYKE4DHFLBLFW5RGRMYBMRRYHYEB5IPIJRUVU5QC void unmarshallString(struct tagHeader &th, char *data, int maxSize);std::string unmarshallString(tagHeader &th, int maxSize);
void unmarshallCString(struct tagHeader &th, char *data, int maxSize);std::string unmarshallString(tagHeader &th, int maxSize = 1000);
}template <typename T_container, typename T_inserter, typename T_unmarshall>static void unmarshall_container(tagHeader &th, T_container &container,T_inserter inserter, T_unmarshall unmarshal){container.clear();const long num_to_read = unmarshallLong(th);for (long i = 0; i < num_to_read; ++i)(container.*inserter)(unmarshal(th));
typedef std::set<std::string> string_set;typedef std::pair<string_set::iterator, bool> ssipair;unmarshall_container(th, you.uniq_map_tags,(ssipair (string_set::*)(const std::string &))&string_set::insert,unmarshallString);unmarshall_container(th, you.uniq_map_names,(ssipair (string_set::*)(const std::string &))&string_set::insert,unmarshallString);
return (!mons_class_flag(m->type, M_NO_EXP_GAIN)&& !mons_is_mimic(m->type)&& !mons_is_statue(m->type)&& !mons_friendly(m)&& mons_is_sleeping(m));
return (mons_behaviour_perceptible(m)&& !mons_friendly(m)&& mons_is_sleeping(m));
template <typename I>static bool map_has_no_tags(const map_def &map, I begin, I end){for ( ; begin != end; ++begin)if (map.has_tag(*begin))return (false);return (true);}static bool vault_unforbidden(const map_def &map){return (you.uniq_map_names.find(map.name) == you.uniq_map_names.end()&& map_has_no_tags(map, you.uniq_map_tags.begin(),you.uniq_map_tags.end()));}
static void place_altars(){// No altars before level 5.if (you.your_level < 4)return;if ( you.level_type == LEVEL_DUNGEON ){int prob = your_branch().altar_chance;while (prob){if (random2(100) >= prob)break;#ifdef DEBUG_DIAGNOSTICSmprf(MSGCH_DIAGNOSTICS, "Placing an altar");#endifplace_altar();// Reduce the chance and try to place another.prob /= 5;}}}
}static void dgn_register_vault(const map_def &map){if (map.has_tag("uniq"))you.uniq_map_names.insert(map.name);std::vector<std::string> tags = split_string(" ", map.tags);for (int t = 0, ntags = tags.size(); t < ntags; ++t){const std::string &tag = tags[t];if (tag.find("uniq_") == 0)you.uniq_map_tags.insert(tag);}
static void place_altars(){// No altars before level 5.if (you.your_level < 4)return;if ( you.level_type == LEVEL_DUNGEON ){int prob = your_branch().altar_chance;while (prob){if (random2(100) >= prob)break;#ifdef DEBUG_DIAGNOSTICSmprf(MSGCH_DIAGNOSTICS, "Placing an altar");#endifplace_altar();// Reduce the chance and try to place another.prob /= 5;}}}
############################################################################################################################################################# Elf:1 arrival vaults## The concept:# There are no entry vaults for the Elven Halls. Instead, there is a "border# check" vault on the other side, in the Elf:1 level. Note that elves and orcs# are not necessarily at war or have big enmities against each other. It's# just a border check.## The intention:# I (Eino here, hi!) lost a lot of characters trying to do the Halls right# after the Mines until I realized the Halls are significantly harder. A# welcoming party on the other side will hopefully warn the player about this.## Honor this intention. Lots of space between the monsters and the stairs, so# the players have many turns to realize their mistake. Note that designing# can be a challenge with the eight space LOS. What might make the player# realize it's better to flee: facing a nasty summon, taking a few hits from# conjurations.. they might engage melee opponents, at which point it's quite# difficult to flee. Please keep that in mind. Note also, that a corridor is# usually easier for the player than an open space.## This is an instance where an entry (arrival) vault really does benefit from# having monsters, even a nasty bunch. However, don't go overboard trying to# make it really hard. And try to make it seem like a plausible border guard.############################################################################################################################################################## Dummy Elf arrival vaultNAME: elf_arrival_dummyTAGS: dummyPLACE: Elf:1CHANCE: 50ORIENT: floatMAP{ENDMAP############################################################################### Elf arrival vault: corridor one (with the hidden toll cashbox)NAME: elf_arrival_001PLACE: Elf:1ORIENT: floatSHUFFLE: asd/v$=SHUFFLE: fgh/v$=SUBST: a = v, s = v, d = v, f = v, g = v, h = vMONS: deep elf soldier, deep elf mage, deep elf conjurer / deep elf priest / deep elf fighterMONS: deep elf summoner / deep elf knight w:2MAPaaaasavvvvvvvvvvvvvvvvvvvvdvv...vvvvv..12..3.....@v.{........v12..v.4..vv...vvvvv..12..3.....@vvvvvvvvvvvvvvvvvvvvhvfgffffENDMAP
NAME: elf_arrival_002PLACE: Elf:1ORIENT: floatFLAGS: no_rotateMONS: deep elf soldier, deep elf mage, deep elf conjurer / deep elf priest / deep elf fighterMONS: deep elf summoner / deep elf knight w:2MAPxxxxx@xxx@xxx@xxxxxxxxx...........xxxxxx....G.3.3.G....xxx...1.........1...xx.G...2..4..2...G.xx.................xx.......G.G.......xx.................xx.....G.....G.....xxx.1.....{.....1.xxxxxx...........xxxxxxxxxxxxxxxxxxxxxxxENDMAP