Changed behaviour when using KMONS and KITEM without a corresponding KFEAT. Previously this would force the dungeon feature of that square to plain floor. The new behaviour is to try to map the glyph to itself. For instance: KMONS: O = pandemonium demon will place a pandemonium demon on the rune, whereas previously it would place the pan demon on a floor square.
Tossed out old waypoint hacks. Waypoints are now handled in the same way as travel to stash search places. This ought to fix the waypoint corruption issues.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1081 c06c8d41-db1a-0410-9941-cceddc491573
442VGKMARB6LTQUEBIB5P447EI34BRJL6JALZKXLWPDHWCM6KKCQC
ZHFUXYUHS6V47WK2NRH7OU6RX77NRKTXOZC3MND2GG7PEEWSGFTAC
JDM27QE4HR52AYFSQE763BFF57ANOTF5MXKMO377PP5EXMN7SAOAC
HBQ43PKGMQZHGAKT7HKQLWQ6NKPE5L34NPMVUHIN6YMYFXVW5JGAC
SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC
SCWXQW5H65OXUP2MEJ2MEEAVPSRJDT3RQGKYCMKVTORS2334PQSQC
RC6L3CIBLJEH4GWRFD7UQNGI6PZT74FRUVOYHSAN2XCC74NZUASQC
T4IH76FA5TWHFOZUJFHLQXQJENJHWTUZZP4EGNA7D4GTZY7D4ZKAC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
SVUM62ARSXH6RUBFRWS6KAQC7PTNTMGSV2GPZJQQJ4GNEML2HBVQC
KCHX2F3JFEWOZT3WMJVZAAQUU2QSZ5Q7RDCD7WUJ7VE65J52JFUQC
KNBQ2Y4XXAJGSHC4FU2AHCRGLLHETYA2MU55TDSHV2TIMTOX3QZQC
RIRJ746W5ESARX4HUEA4JRVAKXXF3WYVXUCFFONPJMMKWHQAGI2AC
}
LevelInfo::LevelInfo(const LevelInfo &other)
{
stairs = other.stairs;
excludes = other.excludes;
int sz = stairs.size() * stairs.size();
stair_distances = new short [ sz ];
if (other.stair_distances)
memcpy(stair_distances, other.stair_distances, sz * sizeof(int));
}
const LevelInfo &LevelInfo::operator = (const LevelInfo &other)
{
if (&other == this)
return *this;
stairs = other.stairs;
excludes = other.excludes;
int sz = stairs.size() * stairs.size();
delete [] stair_distances;
stair_distances = new short [ sz ];
if (other.stair_distances)
memcpy(stair_distances, other.stair_distances, sz * sizeof(short));
return *this;
}
LevelInfo::~LevelInfo()
{
delete [] stair_distances;
}
void LevelInfo::add_waypoint(const coord_def &pos)
{
if (pos.x < 0 || pos.y < 0) return;
// First, make sure we don't already have this position in our stair list.
for (int i = 0, sz = stairs.size(); i < sz; ++i)
if (stairs[i].position == pos)
return;
stair_info si;
si.position = pos;
si.destination.id.depth = -2; // Magic number for waypoints.
stairs.push_back(si);
delete [] stair_distances;
stair_distances = new short [ stairs.size() * stairs.size() ];
update_stair_distances();
}
void LevelInfo::remove_waypoint(const coord_def &pos)
{
for (std::vector<stair_info>::iterator i = stairs.begin();
i != stairs.end(); ++i)
{
if (i->position == pos && i->destination.id.depth == -2)
{
stairs.erase(i);
break;
}
}
delete [] stair_distances;
stair_distances = new short [ stairs.size() * stairs.size() ];
update_stair_distances();
}
void LevelInfo::travel_to_waypoint(const coord_def &pos)
{
stair_info *target = get_stair(pos);
if (!target) return;
curr_stairs.clear();
for (int i = 0, sz = stairs.size(); i < sz; ++i)
{
if (stairs[i].destination.id.depth == -2) continue;
stair_info si = stairs[i];
si.distance = distance_between(target, &stairs[i]);
curr_stairs.push_back(si);
}
start_translevel_travel(false);
travel_target = waypoints[num];
set_trans_travel_dest(trans_travel_dest, sizeof trans_travel_dest,
travel_target);
LevelInfo &li = get_level_info(travel_target.id);
li.travel_to_waypoint(travel_target.pos);
start_translevel_travel(waypoints[num]);
// NOTE: THE ORDER AND VALUE OF THESE IS CURRENTLY VERY IMPORTANT!
enum vault_type
{
VAULT_VAULT_1 = 0,
VAULT_VAULT_2 = 1,
VAULT_VAULT_3 = 2,
VAULT_VAULT_4 = 3,
VAULT_VAULT_5 = 4,
VAULT_VAULT_6 = 5,
VAULT_VAULT_7 = 6,
VAULT_VAULT_8 = 7,
VAULT_VAULT_9 = 8,
VAULT_VAULT_10 = 9,
VAULT_ORC_TEMPLE = 10,
VAULT_FARM_AND_COUNTRY = 11,
VAULT_FORT_YAKTAUR = 12,
VAULT_BOX_LEVEL = 13,
VAULT_MY_MAP = 14,
VAULT_VESTIBULE_MAP = 50,
VAULT_CASTLE_DIS = 51,
VAULT_ASMODEUS = 52,
VAULT_ANTAEUS = 53,
VAULT_ERESHKIGAL = 54,
VAULT_MNOLEG = 60,
VAULT_LOM_LOBON = 61,
VAULT_CEREBOV = 62,
VAULT_GLOORX_VLOQ = 63,
// VAULT_MOLLUSC = 64,
VAULT_BEEHIVE = 80,
VAULT_SLIME_PIT = 81,
VAULT_BOTTOM_OF_VAULTS = 82,
VAULT_HALL_OF_BLADES = 83,
VAULT_HALL_OF_ZOT = 84,
VAULT_TEMPLE = 85,
VAULT_SNAKE_PIT = 86,
VAULT_ELF_HALL = 87,
VAULT_TOMB_1 = 88,
VAULT_TOMB_2 = 89,
VAULT_TOMB_3 = 90,
VAULT_SWAMP = 91,
VAULT_RANDOM = 100,
VAULT_MINIVAULT_1 = 200,
VAULT_MINIVAULT_2 = 201,
VAULT_MINIVAULT_3 = 202,
VAULT_MINIVAULT_4 = 203,
VAULT_MINIVAULT_5 = 204,
VAULT_MINIVAULT_6 = 205,
VAULT_MINIVAULT_7 = 206,
VAULT_MINIVAULT_8 = 207,
VAULT_MINIVAULT_9 = 208,
VAULT_MINIVAULT_10 = 209,
VAULT_MINIVAULT_11 = 210,
VAULT_MINIVAULT_12 = 211,
VAULT_MINIVAULT_13 = 212,
VAULT_MINIVAULT_14 = 213,
VAULT_MINIVAULT_15 = 214,
VAULT_MINIVAULT_16 = 215,
VAULT_MINIVAULT_17 = 216,
VAULT_MINIVAULT_18 = 217,
VAULT_MINIVAULT_19 = 218,
VAULT_MINIVAULT_20 = 219,
VAULT_MINIVAULT_21 = 220,
VAULT_MINIVAULT_22 = 221,
VAULT_MINIVAULT_23 = 222,
VAULT_MINIVAULT_24 = 223,
VAULT_MINIVAULT_25 = 224,
VAULT_MINIVAULT_26 = 225,
VAULT_MINIVAULT_27 = 226,
VAULT_MINIVAULT_28 = 227,
VAULT_MINIVAULT_29 = 228,
VAULT_MINIVAULT_30 = 229,
VAULT_MINIVAULT_31 = 230,
VAULT_MINIVAULT_32 = 231,
VAULT_MINIVAULT_33 = 232,
VAULT_MINIVAULT_34 = 233,
VAULT_MINIVAULT_35 = 234,
VAULT_RAND_DEMON_1 = 300,
VAULT_RAND_DEMON_2 = 301,
VAULT_RAND_DEMON_3 = 302,
VAULT_RAND_DEMON_4 = 303,
VAULT_RAND_DEMON_5 = 304,
VAULT_RAND_DEMON_6 = 305,
VAULT_RAND_DEMON_7 = 306,
VAULT_RAND_DEMON_8 = 307,
VAULT_RAND_DEMON_9 = 308
};
ENDMAP
##############################################################################
# Caught partying
NAME: erik_orc_1
TAGS: orc_entry
MONS: orc, orc priest/orc wizard, weight:50 orc warrior/ogre, swamp drake
# The drake's name is Bobby. Since you did ask.
KITEM: 1 = sausage / nothing / animal skin / potion of confusion / potion of paralysis / potion of slowing / potion of degeneration / weight:2 potion of speed / weight:2 potion of might
ITEM: club, potion of confusion, slice of pizza, sausage / weight:40 nothing, potion of confusion / potion of water
SHUFFLE: defO
FLAGS: no_rotate
ORIENT: float
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
x.........g..........2x...w4xxx
x.....1...32...1......x1...wxxx
x.........xx.....e..........xxx
@.......f...1g............3.x$x
x..x1.................O...x.xhx
x..x1...1........2..1....gx.xhx
x......2....g.........d.1.x1+hx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP
##############################################################################
# C'mon, you *gotta* have a *fort*!
NAME: erik_orc_2
TAGS: orc_entry no_pool_fixup
MONS: orc warrior, orc priest/orc wizard, weight:100 orc / orc warrior, weight:100 orc knight / orc warrior
ORIENT: float
FLAGS: no_rotate
SUBST: c = c:1000 x
MAP
.............................
.Iwwwwwwwwwwwwwwwwwwwwwwwwww.
.wIwwwwwwwwwwwwwwwwwwwwwwwww.
.ww2ccccccccccccccccccccccww.
.ww.c.......3.3.3......w2cww.
.wwxx........3.3.......wwcww.
.122........3.I.3......4Ocww.
.wwxx........3.3.......wwcww.
.ww.c.......3.3.3......w2cww.
.ww2ccccccccccccccccccccccww.
.wIwwwwwwwwwwwwwwwwwwwwwwwww.
.Iwwwwwwwwwwwwwwwwwwwwwwwwww.
.............................
ENDMAP
##############################################################################
# Just like home
NAME: erik_orc_3
TAGS: orc_entry
MONS: orc / weight:2 goblin / weight:2 hobgoblin / nothing, orc warrior / orc priest / orc wizard / nothing, warg / ogre / nothing
ORIENT: float
SUBST: ? = x . $:1
# too bad there's no no_item_gen tag
MAP
xxx.xxxxxxxxxxxxxxxxxxx
xxx?.x?x?xx?xxx??xx?xxx
xx..xxx..1.xxx....13xxx
xx.x??x.x1xx?x.21xx?..x
xx...x..xxx.2..1.x.x??.
xx?x.....?x.x..x.x1?.xx
xx..??12x?x.1.1?x.x??xx
xxx..x..x??O<x..x.xx.xx
x?..?x......x?.x.??x.xx
xx.x??.x.x..?x..xx.x?xx
x?xx?xx.x??...x.1x.1??x
xx..xxx...x.x.x.1?1.xxx
x?.2....xx2.x...xx.x??x
xxx??xx..xx.xx.x?..xxxx
xx..1.x.x.3...x2.x1..xx
..x??x.xxx..xxxx??.??xx
xx?.??.11.x?xxx..x..xxx
x??xxxx???xx?xxx??x.?xx
xxxxxxxxxxxxxxxxxxxx.xx
ENDMAP
##############################################################################
# Orc-henge
NAME: erik_orc_4
TAGS: orc_entry
MONS: human/goblin/hobgoblin/weight:2 orc, orc priest, orc
MONS: orc priest/orc wizard/weight:2 goblin/nothing, orc warrior/warg
ORIENT: float
SUBST: ? : c:20 .
SUBST: Z : c:20 .
SUBST: X : c:20 .
SUBST: v : c:20 .
SUBST: b : c:20 .
KITEM: 2 = knife
MAP
..............................
...............ZZ.............
.........??....ZZ....vv.......
.........??..........vv.......
....XX.......33533............
....XX........1.2........bb...
.........4....xxx...4....bb...
.............33533............
..bb..........................
..bb...........O..........??..
........4.............4...??..
..................4...........
...ZZ.........................
...ZZ......4............vv....
........................vv....
.......cc..........vv.........
.......cc....??....vv.........
.............??...............
..............................
ENDMAP
##############################################################################
# Bears Won't Share
NAME: erik_hive_1
TAGS: hive_entry
MONS: weight:200 bear/polar bear, grizzly bear, black bear, killer bee, queen bee, killer bee larva
ITEM: honeycomb, royal jelly
SHUFFLE: 123
SHUFFLE: deO
ORIENT: float
MAP
.......................
.............aaa.......
...........aaa4aaaaa...
...........a4e6d564a...
......2....a6.4.4O6a...
............a64aa4a....
....1.......aaaaaa.....
.......3...............
.......................
##############################################################################
# Bucolic
NAME: erik_hive_2
TAGS: hive_entry
MONS: plant, killer bee
SUBST: 1 = 1.
SUBST: 2 = 2.
ORIENT: float
MAP
.....................
.1.....2.......1.1...
...1.....1...2..1....
.....2.........1.....
.1.2....1....2.....2.
......2.....1....21..
.1...1...1...........
.....2.....1.21...2..
.......1.O......21...
...1.......1.........
...2.....1....1..2...
.....11.2....2...11..
...1..1....1.........
....2.......2....1...
....1...1.....1......
.....................
ENDMAP
##############################################################################
# Object lesson
NAME: erik_hive_3
TAGS: hive_entry
MONS: killer bee larva, killer bee, queen bee, firedrake
SUBST: l = l.
ORIENT: float
MAP
..................
...aaaaa..........
..aaRa....a...a...
..a2.a.aaa=.aa....
.aa.1aaa.1aaa...a.
..aa21.2O2aaa4.aa.
...aaa2131aaaaa...
..aaaaaRaaa..aa...
..aa.4aaa.a...a...
.aa...aaa.aa......
.a..aaaa..........
......a..a.llllll.
.......aaa.llllll.
...........llllll.
..................
ENDMAP