|
From: <gi...@cr...> - 2011-08-31 03:10:43
|
via 9e6dcc6c39c2edfbad379a31f0cc5c857e8d395e (commit)
via 3852ca96729ad9677da42f74cdead79caffd7207 (commit)
via d56b3e8651d6285942204675ed1bad2df39567f2 (commit)
via c6d72e6737679a86a1e8b39ab0f43650a2b25716 (commit)
via 0a68e8cfdeea0627a0830acf8741f419e2a4f57b (commit)
via 8b54452bc0b236e57dbbacc02c5b396a85923e1a (commit)
via 19a43b852cb989f9139012b6ced164eb6e92d9c4 (commit)
via 1422032f84d09e508c5da28a12de960a86613639 (commit)
via 0001daee8e34c3b4616b7b304fbad2743b50a1f7 (commit)
via 545ad87ee9cee7f655028416b85fa5d966327071 (commit)
via 6373aee8176506a22c94006bf67c8084b20b46d8 (commit)
via ed426862ffef3feadd21d4c1f560c0c53aa035e9 (commit)
from 2a51ea332b62bbe876496c04d859485acb20b5ae (commit)
-----------------------------------------------------------------------
commit 9e6dcc6c39c2edfbad379a31f0cc5c857e8d395e
Author: Adam Borowski <kil...@an...>
Date: Wed Aug 31 05:09:26 2011 +0200
A description for webs.
commit 3852ca96729ad9677da42f74cdead79caffd7207
Author: Adam Borowski <kil...@an...>
Date: Wed Aug 31 04:55:13 2011 +0200
s/web trap/web/
It's a trap only technically.
commit d56b3e8651d6285942204675ed1bad2df39567f2
Author: Adam Borowski <kil...@an...>
Date: Wed Aug 31 04:48:47 2011 +0200
Give a message stating why a non-spider monster is immune to webs.
commit c6d72e6737679a86a1e8b39ab0f43650a2b25716
Author: Adam Borowski <kil...@an...>
Date: Wed Aug 31 04:36:29 2011 +0200
Fix players being netted too.
commit 0a68e8cfdeea0627a0830acf8741f419e2a4f57b
Author: Adam Borowski <kil...@an...>
Date: Wed Aug 31 04:25:04 2011 +0200
Fix monsters stumbling into webs being netted as well.
commit 8b54452bc0b236e57dbbacc02c5b396a85923e1a
Author: Adam Borowski <kil...@an...>
Date: Wed Aug 31 04:14:36 2011 +0200
Simplify messaging a bit.
commit 19a43b852cb989f9139012b6ced164eb6e92d9c4
Author: Adam Borowski <kil...@an...>
Date: Wed Aug 31 04:08:24 2011 +0200
Don't give Gastronok the hat of Pondering if it was generated elsewhere.
commit 1422032f84d09e508c5da28a12de960a86613639
Author: Adam Borowski <kil...@an...>
Date: Wed Aug 31 04:03:50 2011 +0200
Greatly simplify selection of web tile flavour.
commit 0001daee8e34c3b4616b7b304fbad2743b50a1f7
Author: Adam Borowski <kil...@an...>
Date: Wed Aug 31 03:15:45 2011 +0200
Reorder DNGN_TRAP enums on next compat break.
commit 545ad87ee9cee7f655028416b85fa5d966327071
Author: Pete Hurst <pe...@do...>
Date: Tue Aug 30 18:01:40 2011 +0100
Web trap initial implementation
commit 6373aee8176506a22c94006bf67c8084b20b46d8
Author: Adam Borowski <kil...@an...>
Date: Wed Aug 31 02:28:03 2011 +0200
ontoclasm's new tiles for Crypt.
commit ed426862ffef3feadd21d4c1f560c0c53aa035e9
Author: Adam Borowski <kil...@an...>
Date: Wed Aug 31 01:51:52 2011 +0200
Remove 0.9 Octopode checks.
Whether we'll end up adding such checks for 0.10 is another question, but
I'd say there'll be enough time for a final decision.
Not removing the blocking code but commenting it out. There are talks about
testing both competing golem proposals in trunk...
-----------------------------------------------------------------------
Summary of changes:
crawl-ref/source/actor.h | 1 +
crawl-ref/source/dat/des/branches/spider.des | 22 ++++
crawl-ref/source/dat/descript/features.txt | 4 +
crawl-ref/source/describe.cc | 2 +-
crawl-ref/source/directn.cc | 5 +
crawl-ref/source/enum.h | 7 +
crawl-ref/source/feature.cc | 7 +
crawl-ref/source/hints.cc | 1 +
crawl-ref/source/l_you.cc | 12 ++
crawl-ref/source/mapdef.cc | 2 +-
crawl-ref/source/mon-gear.cc | 2 +-
crawl-ref/source/monster.cc | 14 +++
crawl-ref/source/monster.h | 1 +
crawl-ref/source/newgame.cc | 5 +-
crawl-ref/source/player-act.cc | 6 +
crawl-ref/source/player.h | 1 +
crawl-ref/source/rltiles/dc-dngn/floor/crypt0.png | Bin 0 -> 330 bytes
crawl-ref/source/rltiles/dc-dngn/floor/crypt1.png | Bin 0 -> 374 bytes
crawl-ref/source/rltiles/dc-dngn/floor/crypt2.png | Bin 0 -> 392 bytes
crawl-ref/source/rltiles/dc-dngn/floor/crypt3.png | Bin 0 -> 391 bytes
crawl-ref/source/rltiles/dc-dngn/floor/crypt4.png | Bin 0 -> 380 bytes
crawl-ref/source/rltiles/dc-dngn/floor/crypt5.png | Bin 0 -> 392 bytes
crawl-ref/source/rltiles/dc-dngn/floor/crypt6.png | Bin 0 -> 356 bytes
crawl-ref/source/rltiles/dc-dngn/floor/crypt7.png | Bin 0 -> 354 bytes
.../source/rltiles/dc-dngn/traps/cobweb_ES.png | Bin 0 -> 1376 bytes
.../source/rltiles/dc-dngn/traps/cobweb_ESW.png | Bin 0 -> 1549 bytes
.../source/rltiles/dc-dngn/traps/cobweb_EW.png | Bin 0 -> 1487 bytes
.../source/rltiles/dc-dngn/traps/cobweb_NE.png | Bin 0 -> 2359 bytes
.../source/rltiles/dc-dngn/traps/cobweb_NES.png | Bin 0 -> 1554 bytes
.../source/rltiles/dc-dngn/traps/cobweb_NESW.png | Bin 0 -> 1626 bytes
.../source/rltiles/dc-dngn/traps/cobweb_NEW.png | Bin 0 -> 1565 bytes
.../source/rltiles/dc-dngn/traps/cobweb_NS.png | Bin 0 -> 1512 bytes
.../source/rltiles/dc-dngn/traps/cobweb_NSW.png | Bin 0 -> 1551 bytes
.../source/rltiles/dc-dngn/traps/cobweb_NW.png | Bin 0 -> 1521 bytes
.../source/rltiles/dc-dngn/traps/cobweb_SW.png | Bin 0 -> 1455 bytes
.../source/rltiles/dc-dngn/traps/cobweb_none.png | Bin 0 -> 1392 bytes
crawl-ref/source/rltiles/dc-dngn/wall/crypt0.png | Bin 0 -> 255 bytes
crawl-ref/source/rltiles/dc-dngn/wall/crypt1.png | Bin 0 -> 255 bytes
crawl-ref/source/rltiles/dc-dngn/wall/crypt2.png | Bin 0 -> 295 bytes
crawl-ref/source/rltiles/dc-dngn/wall/crypt3.png | Bin 0 -> 323 bytes
crawl-ref/source/rltiles/dc-dngn/wall/crypt4.png | Bin 0 -> 303 bytes
crawl-ref/source/rltiles/dc-dngn/wall/crypt5.png | Bin 0 -> 361 bytes
crawl-ref/source/rltiles/dc-dngn/wall/crypt6.png | Bin 0 -> 421 bytes
crawl-ref/source/rltiles/dc-dngn/wall/crypt7.png | Bin 0 -> 415 bytes
crawl-ref/source/rltiles/dc-dngn/wall/crypt8.png | Bin 0 -> 415 bytes
crawl-ref/source/rltiles/dc-dngn/wall/crypt9.png | Bin 0 -> 422 bytes
crawl-ref/source/rltiles/dc-feat.txt | 18 +++
crawl-ref/source/rltiles/dc-floor.txt | 9 ++
crawl-ref/source/rltiles/dc-wall.txt | 13 ++
crawl-ref/source/terrain.cc | 2 +-
crawl-ref/source/tilepick.cc | 31 +++++-
crawl-ref/source/tileview.cc | 4 +-
crawl-ref/source/traps.cc | 116 +++++++++++++++++++-
crawl-ref/source/travel.cc | 2 +-
crawl-ref/source/viewmap.cc | 1 +
55 files changed, 272 insertions(+), 16 deletions(-)
create mode 100644 crawl-ref/source/rltiles/dc-dngn/floor/crypt0.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/floor/crypt1.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/floor/crypt2.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/floor/crypt3.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/floor/crypt4.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/floor/crypt5.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/floor/crypt6.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/floor/crypt7.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/traps/cobweb_ES.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/traps/cobweb_ESW.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/traps/cobweb_EW.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NE.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NES.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NESW.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NEW.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NS.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NSW.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NW.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/traps/cobweb_SW.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/traps/cobweb_none.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/wall/crypt0.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/wall/crypt1.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/wall/crypt2.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/wall/crypt3.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/wall/crypt4.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/wall/crypt5.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/wall/crypt6.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/wall/crypt7.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/wall/crypt8.png
create mode 100644 crawl-ref/source/rltiles/dc-dngn/wall/crypt9.png
diff --git a/crawl-ref/source/actor.h b/crawl-ref/source/actor.h
index 771d7d8..fe72ef5 100644
--- a/crawl-ref/source/actor.h
+++ b/crawl-ref/source/actor.h
@@ -262,6 +262,7 @@ public:
virtual bool can_cling_to(const coord_def& p) const;
virtual bool check_clinging(bool stepped, bool door = false);
virtual void clear_clinging();
+ virtual bool is_web_immune() const = 0;
virtual bool airborne() const;
virtual bool ground_level() const;
virtual bool stand_on_solid_ground() const;
diff --git a/crawl-ref/source/dat/des/branches/spider.des b/crawl-ref/source/dat/des/branches/spider.des
index 50e2df8..461ec4f 100644
--- a/crawl-ref/source/dat/des/branches/spider.des
+++ b/crawl-ref/source/dat/des/branches/spider.des
@@ -30,6 +30,28 @@ W.WW.WW.W
.WWW.WWW.
ENDMAP
+##########################
+# Web trappy entry
+NAME: spiders_nest_entry_webs
+TAGS: spider_entry patrolling no_monster_gen
+KFEAT: O = enter_spider_nest
+KFEAT: ^ = web
+MONS: trapdoor spider
+MAP
+.......x.....
+..^...xxx.^..
+...1.^xxx....
+.^..^xx^x....
+....xx^^^....
+.1..x^^^...^.
+..^..^O^..1..
+.x...^^^^....
+xx^.1.x^^^...
+x^^^^..xxx...
+.xx^^...xxx..
+..xxx........
+ENDMAP
+
##############################################################################
# Rune vaults
##############################################################################
diff --git a/crawl-ref/source/dat/descript/features.txt b/crawl-ref/source/dat/descript/features.txt
index e14c40c..8c4c45b 100644
--- a/crawl-ref/source/dat/descript/features.txt
+++ b/crawl-ref/source/dat/descript/features.txt
@@ -336,6 +336,10 @@ A white marble altar of Elyvilon
An altar to Elyvilon the Healer, made from purest white marble and topped by a sculpture of the Chalice of Purification.
%%%%
+A web
+
+The spider who left this web must have been huge, as it seems to be made for trapping {{ return you.genus(true) }} rather than flies.
+%%%%
An abandoned shop
This shop has been abandoned.
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 0a0118e..e38982b 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -533,7 +533,7 @@ static const char *trap_names[] =
"dart", "arrow", "spear", "axe",
"teleport", "alarm", "blade",
"bolt", "net", "zot", "needle",
- "shaft", "passage", "pressure plate",
+ "shaft", "passage", "pressure plate", "web",
};
const char *trap_name(trap_type trap)
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc
index 9283b96..30d13e9 100644
--- a/crawl-ref/source/directn.cc
+++ b/crawl-ref/source/directn.cc
@@ -2939,6 +2939,8 @@ static std::string _base_feature_desc(dungeon_feature_type grid,
return ("passage of Golubria");
case TRAP_PLATE:
return ("pressure plate");
+ case TRAP_WEB:
+ return ("web");
default:
error_message_to_player();
return ("undefined trap");
@@ -3029,6 +3031,8 @@ static std::string _base_feature_desc(dungeon_feature_type grid,
return ("magical trap");
case DNGN_TRAP_NATURAL:
return ("natural trap");
+ case DNGN_TRAP_WEB:
+ return ("web");
case DNGN_ENTER_SHOP:
return ("shop");
case DNGN_ABANDONED_SHOP:
@@ -3368,6 +3372,7 @@ std::string feature_description(const coord_def& where, bool covering,
case DNGN_TRAP_MECHANICAL:
case DNGN_TRAP_MAGICAL:
case DNGN_TRAP_NATURAL:
+ case DNGN_TRAP_WEB:
return (feature_description(grid, get_trap_type(where),
covering_description, dtype,
add_stop, base_desc));
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 75f073e..981f008 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -1165,7 +1165,13 @@ enum dungeon_feature_type
DNGN_TRAP_MECHANICAL = 75, // 75
DNGN_TRAP_MAGICAL,
DNGN_TRAP_NATURAL,
+#if TAG_MAJOR_VERSION == 32
DNGN_UNDISCOVERED_TRAP, // 78
+ DNGN_TRAP_WEB, // 79
+#else
+ DNGN_TRAP_WEB,
+ DNGN_UNDISCOVERED_TRAP,
+#endif
DNGN_ENTER_SHOP = 80, // 80
DNGN_ENTER_LABYRINTH,
@@ -3249,6 +3255,7 @@ enum trap_type // env.trap_type[]
TRAP_SHAFT,
TRAP_GOLUBRIA,
TRAP_PLATE,
+ TRAP_WEB,
NUM_TRAPS, // must remain last 'regular' member {dlb}
TRAP_MAX_REGULAR = TRAP_SHAFT,
TRAP_UNASSIGNED = 100,
diff --git a/crawl-ref/source/feature.cc b/crawl-ref/source/feature.cc
index ecb3193..a8c1980 100644
--- a/crawl-ref/source/feature.cc
+++ b/crawl-ref/source/feature.cc
@@ -244,6 +244,13 @@ static void _init_feat(feature_def &f, dungeon_feature_type feat)
f.minimap = MF_TRAP;
break;
+ case DNGN_TRAP_WEB:
+ f.colour = LIGHTGREY;
+ f.dchar = DCHAR_TRAP;
+ f.map_colour = LIGHTGREY;
+ f.minimap = MF_TRAP;
+ break;
+
case DNGN_UNDISCOVERED_TRAP:
f.dchar = DCHAR_FLOOR;
f.colour = ETC_FLOOR;
diff --git a/crawl-ref/source/hints.cc b/crawl-ref/source/hints.cc
index 04885f2..7e9fdbd 100644
--- a/crawl-ref/source/hints.cc
+++ b/crawl-ref/source/hints.cc
@@ -4306,6 +4306,7 @@ static bool _hints_feat_interesting(dungeon_feature_type feat)
case DNGN_TRAP_MAGICAL:
case DNGN_TRAP_MECHANICAL:
case DNGN_TRAP_NATURAL:
+ case DNGN_TRAP_WEB:
case DNGN_STONE_STAIRS_DOWN_I:
case DNGN_STONE_STAIRS_DOWN_II:
case DNGN_STONE_STAIRS_DOWN_III:
diff --git a/crawl-ref/source/l_you.cc b/crawl-ref/source/l_you.cc
index da6f429..41968a1 100644
--- a/crawl-ref/source/l_you.cc
+++ b/crawl-ref/source/l_you.cc
@@ -149,6 +149,17 @@ LUARET1(you_piety_rank, number, piety_rank(you.piety) - 1)
LUARET1(you_max_burden, number, carrying_capacity(BS_UNENCUMBERED))
LUARET1(you_burden, number, you.burden)
+static int l_you_genus(lua_State *ls)
+{
+ bool plural = lua_toboolean(ls, 1);
+ std::string genus = species_name(you.species, true);
+ lowercase(genus);
+ if (plural)
+ genus = pluralise(genus);
+ lua_pushstring(ls, genus.c_str());
+ return (1);
+}
+
void lua_push_floor_items(lua_State *ls, int link);
static int you_floor_items(lua_State *ls)
{
@@ -264,6 +275,7 @@ static const struct luaL_reg you_clib[] =
{ "name" , you_name },
{ "race" , you_race },
{ "class" , you_class },
+ { "genus" , l_you_genus },
{ "god" , you_god },
{ "good_god" , you_good_god },
{ "evil_god" , you_evil_god },
diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc
index a49c968..ed5494f 100644
--- a/crawl-ref/source/mapdef.cc
+++ b/crawl-ref/source/mapdef.cc
@@ -5530,7 +5530,7 @@ feature_spec_list keyed_mapspec::parse_feature(const std::string &str)
return (list);
}
- if (s.find("trap") != std::string::npos)
+ if (s.find("trap") != std::string::npos || s == "web")
{
list.push_back(parse_trap(s, weight));
return (list);
diff --git a/crawl-ref/source/mon-gear.cc b/crawl-ref/source/mon-gear.cc
index 595bb55..afcebad 100644
--- a/crawl-ref/source/mon-gear.cc
+++ b/crawl-ref/source/mon-gear.cc
@@ -1842,7 +1842,7 @@ void give_armour(monster* mon, int level, bool spectral_orcs)
break;
case MONS_GASTRONOK:
- if (one_chance_in(10))
+ if (one_chance_in(10) && !get_unique_item_status(UNRAND_PONDERING))
{
force_item = true;
make_item_unrandart(item, UNRAND_PONDERING);
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index 8cf7561..4dab5fb 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -6145,6 +6145,7 @@ bool monster::do_shaft()
case DNGN_TRAP_MECHANICAL:
case DNGN_TRAP_MAGICAL:
case DNGN_TRAP_NATURAL:
+ case DNGN_TRAP_WEB:
case DNGN_UNDISCOVERED_TRAP:
case DNGN_ENTER_SHOP:
break;
@@ -6643,6 +6644,19 @@ bool monster::can_cling_to_walls() const
|| type == MONS_DEMONIC_CRAWLER);
}
+bool monster::is_web_immune() const
+{
+ // Spiders (and other clingers)
+ // Ghosts and other incorporeals
+ // Oozes
+ // All 'I' (ice / sky beast)
+ return (can_cling_to_walls()
+ || is_insubstantial()
+ || mons_genus(type) == MONS_JELLY
+ || mons_genus(type) == MONS_ICE_BEAST
+ || mons_genus(type) == MONS_SKY_BEAST);
+}
+
/////////////////////////////////////////////////////////////////////////
// mon_enchant
diff --git a/crawl-ref/source/monster.h b/crawl-ref/source/monster.h
index 0559f43..4aebff4 100644
--- a/crawl-ref/source/monster.h
+++ b/crawl-ref/source/monster.h
@@ -355,6 +355,7 @@ public:
flight_type flight_mode() const;
bool is_levitating() const;
bool can_cling_to_walls() const;
+ bool is_web_immune() const;
bool invisible() const;
bool can_see_invisible() const;
bool visible_to(const actor *looker) const;
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index 145a41a..a8570e7 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -163,12 +163,13 @@ static bool _is_species_valid_choice(species_type species)
if (species >= SP_ELF) // These are all invalid.
return (false);
- if (species == SP_OCTOPODE
+#if 0
+ if (species == SP_MY_NEW_TRUNK_ONLY_EXPERIMENT
&& Version::ReleaseType() != VER_ALPHA)
{
- // Octopodes are not targetted at 0.9.
return (false);
}
+#endif
// Non-base draconians cannot be selected either.
if (species >= SP_RED_DRACONIAN && species < SP_BASE_DRACONIAN)
diff --git a/crawl-ref/source/player-act.cc b/crawl-ref/source/player-act.cc
index 06c8314..2cd4f28 100644
--- a/crawl-ref/source/player-act.cc
+++ b/crawl-ref/source/player-act.cc
@@ -688,3 +688,9 @@ bool player::can_cling_to_walls() const
{
return you.form == TRAN_SPIDER;
}
+
+bool player::is_web_immune() const
+{
+ // Spider form
+ return (can_cling_to_walls());
+}
diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h
index 5dd60a6..e215cbd 100644
--- a/crawl-ref/source/player.h
+++ b/crawl-ref/source/player.h
@@ -410,6 +410,7 @@ public:
int visible_igrd(const coord_def&) const;
bool is_levitating() const;
bool can_cling_to_walls() const;
+ bool is_web_immune() const;
bool cannot_speak() const;
bool invisible() const;
bool misled() const;
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/crypt0.png b/crawl-ref/source/rltiles/dc-dngn/floor/crypt0.png
new file mode 100644
index 0000000..bdf2a12
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/floor/crypt0.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/crypt1.png b/crawl-ref/source/rltiles/dc-dngn/floor/crypt1.png
new file mode 100644
index 0000000..d327fe1
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/floor/crypt1.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/crypt2.png b/crawl-ref/source/rltiles/dc-dngn/floor/crypt2.png
new file mode 100644
index 0000000..bad2349
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/floor/crypt2.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/crypt3.png b/crawl-ref/source/rltiles/dc-dngn/floor/crypt3.png
new file mode 100644
index 0000000..09a13a2
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/floor/crypt3.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/crypt4.png b/crawl-ref/source/rltiles/dc-dngn/floor/crypt4.png
new file mode 100644
index 0000000..199ef9b
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/floor/crypt4.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/crypt5.png b/crawl-ref/source/rltiles/dc-dngn/floor/crypt5.png
new file mode 100644
index 0000000..6c4f799
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/floor/crypt5.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/crypt6.png b/crawl-ref/source/rltiles/dc-dngn/floor/crypt6.png
new file mode 100644
index 0000000..cffbbfa
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/floor/crypt6.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/floor/crypt7.png b/crawl-ref/source/rltiles/dc-dngn/floor/crypt7.png
new file mode 100644
index 0000000..d5bd5ef
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/floor/crypt7.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_ES.png b/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_ES.png
new file mode 100644
index 0000000..d62b189
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_ES.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_ESW.png b/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_ESW.png
new file mode 100644
index 0000000..c7ea9bb
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_ESW.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_EW.png b/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_EW.png
new file mode 100644
index 0000000..16447ac
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_EW.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NE.png b/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NE.png
new file mode 100644
index 0000000..a3c3c28
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NE.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NES.png b/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NES.png
new file mode 100644
index 0000000..9ae1091
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NES.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NESW.png b/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NESW.png
new file mode 100644
index 0000000..5efa2ba
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NESW.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NEW.png b/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NEW.png
new file mode 100644
index 0000000..11a4278
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NEW.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NS.png b/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NS.png
new file mode 100644
index 0000000..fcb6e5b
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NS.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NSW.png b/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NSW.png
new file mode 100644
index 0000000..5f207be
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NSW.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NW.png b/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NW.png
new file mode 100644
index 0000000..7866112
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_NW.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_SW.png b/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_SW.png
new file mode 100644
index 0000000..2e5150f
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_SW.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_none.png b/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_none.png
new file mode 100644
index 0000000..0397c13
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/traps/cobweb_none.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/crypt0.png b/crawl-ref/source/rltiles/dc-dngn/wall/crypt0.png
new file mode 100644
index 0000000..8b00ff2
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/wall/crypt0.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/crypt1.png b/crawl-ref/source/rltiles/dc-dngn/wall/crypt1.png
new file mode 100644
index 0000000..cb1b23a
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/wall/crypt1.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/crypt2.png b/crawl-ref/source/rltiles/dc-dngn/wall/crypt2.png
new file mode 100644
index 0000000..2ce3703
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/wall/crypt2.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/crypt3.png b/crawl-ref/source/rltiles/dc-dngn/wall/crypt3.png
new file mode 100644
index 0000000..58260b3
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/wall/crypt3.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/crypt4.png b/crawl-ref/source/rltiles/dc-dngn/wall/crypt4.png
new file mode 100644
index 0000000..98ed847
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/wall/crypt4.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/crypt5.png b/crawl-ref/source/rltiles/dc-dngn/wall/crypt5.png
new file mode 100644
index 0000000..c10fa8f
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/wall/crypt5.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/crypt6.png b/crawl-ref/source/rltiles/dc-dngn/wall/crypt6.png
new file mode 100644
index 0000000..f330210
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/wall/crypt6.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/crypt7.png b/crawl-ref/source/rltiles/dc-dngn/wall/crypt7.png
new file mode 100644
index 0000000..85860d9
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/wall/crypt7.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/crypt8.png b/crawl-ref/source/rltiles/dc-dngn/wall/crypt8.png
new file mode 100644
index 0000000..ee670e9
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/wall/crypt8.png differ
diff --git a/crawl-ref/source/rltiles/dc-dngn/wall/crypt9.png b/crawl-ref/source/rltiles/dc-dngn/wall/crypt9.png
new file mode 100644
index 0000000..e100462
Binary files /dev/null and b/crawl-ref/source/rltiles/dc-dngn/wall/crypt9.png differ
diff --git a/crawl-ref/source/rltiles/dc-feat.txt b/crawl-ref/source/rltiles/dc-feat.txt
index b5e993a..2e0def8 100644
--- a/crawl-ref/source/rltiles/dc-feat.txt
+++ b/crawl-ref/source/rltiles/dc-feat.txt
@@ -138,6 +138,24 @@ zot DNGN_TRAP_ZOT
passage_of_golubria DNGN_TRAP_GOLUBRIA
pressure_plate DNGN_TRAP_PLATE
+# order matters (tilepick.c tileidx_feature())
+cobweb_none DNGN_TRAP_WEB
+cobweb_NS DNGN_TRAP_WEB_N
+cobweb_EW DNGN_TRAP_WEB_E
+cobweb_NE DNGN_TRAP_WEB_NE
+cobweb_NS DNGN_TRAP_WEB_S
+cobweb_NS DNGN_TRAP_WEB_NS
+cobweb_ES DNGN_TRAP_WEB_ES
+cobweb_NES DNGN_TRAP_WEB_NES
+cobweb_EW DNGN_TRAP_WEB_W
+cobweb_NW DNGN_TRAP_WEB_NW
+cobweb_EW DNGN_TRAP_WEB_EW
+cobweb_NEW DNGN_TRAP_WEB_NEW
+cobweb_SW DNGN_TRAP_WEB_SW
+cobweb_NSW DNGN_TRAP_WEB_NSW
+cobweb_ESW DNGN_TRAP_WEB_ESW
+cobweb_NESW DNGN_TRAP_WEB_NESW
+
## stairs
%sdir dc-dngn/gateways
dngn_exit_dungeon DNGN_EXIT_DUNGEON
diff --git a/crawl-ref/source/rltiles/dc-floor.txt b/crawl-ref/source/rltiles/dc-floor.txt
index 34e12da..3008489 100644
--- a/crawl-ref/source/rltiles/dc-floor.txt
+++ b/crawl-ref/source/rltiles/dc-floor.txt
@@ -589,3 +589,12 @@ labyrinth0 FLOOR_LABYRINTH
labyrinth1
labyrinth2
labyrinth3
+
+crypt0 FLOOR_CRYPT
+crypt1
+crypt2
+crypt3
+crypt4
+crypt5
+crypt6
+crypt7
diff --git a/crawl-ref/source/rltiles/dc-wall.txt b/crawl-ref/source/rltiles/dc-wall.txt
index c416279..deebf74 100644
--- a/crawl-ref/source/rltiles/dc-wall.txt
+++ b/crawl-ref/source/rltiles/dc-wall.txt
@@ -559,6 +559,19 @@ lab-metal4
lab-metal5
lab-metal6
+crypt0 WALL_CRYPT
+crypt1
+crypt2
+crypt3
+crypt4
+%weight 2
+crypt5
+crypt6
+crypt7
+crypt8
+crypt9
+%weight 10
+
stone2_gray0 DNGN_STONE_WALL DNGN_STONE_WALL_LIGHTGRAY
stone2_gray1
stone2_gray2
diff --git a/crawl-ref/source/terrain.cc b/crawl-ref/source/terrain.cc
index 79ce44b..faef6e0 100644
--- a/crawl-ref/source/terrain.cc
+++ b/crawl-ref/source/terrain.cc
@@ -415,7 +415,7 @@ bool feat_is_permarock(dungeon_feature_type feat)
bool feat_is_trap(dungeon_feature_type feat, bool undiscovered_too)
{
return (feat == DNGN_TRAP_MECHANICAL || feat == DNGN_TRAP_MAGICAL
- || feat == DNGN_TRAP_NATURAL
+ || feat == DNGN_TRAP_NATURAL || feat == DNGN_TRAP_WEB
|| undiscovered_too && feat == DNGN_UNDISCOVERED_TRAP);
}
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc
index fe27ab4..aa1d1e8 100644
--- a/crawl-ref/source/tilepick.cc
+++ b/crawl-ref/source/tilepick.cc
@@ -108,6 +108,8 @@ static tileidx_t _tileidx_trap(trap_type type)
return TILE_DNGN_TRAP_GOLUBRIA;
case TRAP_PLATE:
return TILE_DNGN_TRAP_PLATE;
+ case TRAP_WEB:
+ return TILE_DNGN_TRAP_WEB;
default:
return TILE_DNGN_ERROR;
}
@@ -222,6 +224,8 @@ static tileidx_t _tileidx_feature_base(dungeon_feature_type feat)
return TILE_DNGN_TRAP_ZOT;
case DNGN_TRAP_NATURAL:
return TILE_DNGN_TRAP_SHAFT;
+ case DNGN_TRAP_WEB:
+ return TILE_DNGN_TRAP_WEB;
case DNGN_ENTER_SHOP:
return TILE_SHOP_GENERAL;
case DNGN_ABANDONED_SHOP:
@@ -436,7 +440,32 @@ tileidx_t tileidx_feature(const coord_def &gc)
case DNGN_TRAP_MECHANICAL:
case DNGN_TRAP_MAGICAL:
case DNGN_TRAP_NATURAL:
- return (_tileidx_trap(get_trap_type(gc)));
+ return (_tileidx_trap(get_trap_type(gc)));
+
+ case DNGN_TRAP_WEB:
+ {
+ /*
+ trap_type this_trap_type = get_trap_type(gc);
+ // There's room here to have different types of webs (acid? fire? ice? different strengths?)
+ if (this_trap_type==TRAP_WEB) {*/
+
+ // Determine web connectivity on all sides
+ const coord_def neigh[4] = {
+ coord_def(gc.x, gc.y - 1),
+ coord_def(gc.x + 1, gc.y),
+ coord_def(gc.x, gc.y + 1),
+ coord_def(gc.x - 1, gc.y),
+ };
+ int solid = 0;
+ for (int i = 0; i < 4; i++)
+ if (feat_is_solid(grd(neigh[i]))
+ || grd(neigh[i]) != DNGN_UNDISCOVERED_TRAP
+ && get_trap_type(neigh[i]) == TRAP_WEB)
+ {
+ solid |= 1 << i;
+ }
+ return TILE_DNGN_TRAP_WEB + solid;
+ }
case DNGN_ENTER_SHOP:
return (_tileidx_shop(gc));
case DNGN_DEEP_WATER:
diff --git a/crawl-ref/source/tileview.cc b/crawl-ref/source/tileview.cc
index 277b977..053c73c 100644
--- a/crawl-ref/source/tileview.cc
+++ b/crawl-ref/source/tileview.cc
@@ -161,7 +161,7 @@ void tile_default_flv(level_area_type lev, branch_type br, tile_flavour &flv)
case BRANCH_CRYPT:
flv.wall = TILE_WALL_BRICK_GRAY;
- flv.floor = TILE_FLOOR_TOMB;
+ flv.floor = TILE_FLOOR_CRYPT;
return;
case BRANCH_TOMB:
@@ -983,7 +983,7 @@ static inline void _apply_variations(const tile_flavour &flv, tileidx_t *bg,
&& orig == TILE_DNGN_STONE_WALL)
{
if (you.where_are_you == BRANCH_CRYPT)
- orig = TILE_WALL_UNDEAD;
+ orig = TILE_WALL_CRYPT;
else if (you.where_are_you == BRANCH_TOMB)
orig = TILE_WALL_TOMB;
}
diff --git a/crawl-ref/source/traps.cc b/crawl-ref/source/traps.cc
index 61da9c1..8c91bf1 100644
--- a/crawl-ref/source/traps.cc
+++ b/crawl-ref/source/traps.cc
@@ -236,6 +236,10 @@ bool trap_def::is_safe(actor* act) const
return true;
}
+ // Web traps are safe for spiders and spider forms, and certain others
+ if (category()==DNGN_TRAP_WEB && act->is_web_immune())
+ return true;
+
if (act->atype() != ACT_PLAYER)
return false;
@@ -440,6 +444,19 @@ void check_net_will_hold_monster(monster* mons)
mons->add_ench(ENCH_HELD);
}
+bool player_caught_in_web()
+{
+ if (you.attribute[ATTR_HELD])
+ return false;
+
+ you.attribute[ATTR_HELD] = 10;
+ mpr("You become entangled in the net!");
+ stop_running();
+ stop_delay(true); // even stair delays
+ redraw_screen(); // Account for changes in display.
+ return (true);
+}
+
std::vector<coord_def> find_golubria_on_level()
{
std::vector<coord_def> ret;
@@ -790,12 +807,14 @@ void trap_def::trigger(actor& triggerer, bool flat_footed)
triggered = true;
if (in_sight)
- {
- msg::stream << "A large net falls down";
if (m->visible_to(&you))
- msg::stream << " onto " << m->name(DESC_NOCAP_THE);
- msg::stream << "!" << std::endl;
- }
+ {
+ mprf("A large net falls down onto %s!",
+ m->name(DESC_NOCAP_THE).c_str());
+ }
+ else
+ mpr("A large net falls down!");
+
// FIXME: Fake a beam for monster_caught_in_net().
bolt beam;
beam.flavour = BEAM_MISSILE;
@@ -817,6 +836,88 @@ void trap_def::trigger(actor& triggerer, bool flat_footed)
}
break;
+ case TRAP_WEB:
+ if (triggerer.body_size(PSIZE_BODY) >= SIZE_GIANT)
+ {
+ trap_destroyed = true;
+ if (you_trigger)
+ mprf("You tear through %s web.", you_know ? "the" : "a");
+ else if (m)
+ simple_monster_message(m, " tears through a web.");
+ break;
+ }
+
+ if (triggerer.is_web_immune())
+ {
+ if (m)
+ {
+ if (m->is_insubstantial())
+ simple_monster_message(m, " passes through a web.");
+ else if (mons_genus(m->type))
+ simple_monster_message(m, " oozes through a web.");
+ // too spammy for spiders, and expected
+ }
+ break;
+ }
+
+ if (you_trigger)
+ {
+ if (trig_knows && one_chance_in(3))
+ mpr("You pick your way through the web.");
+ else
+ {
+ if (random2limit(player_evasion(), 40)
+ + (random2(you.dex()) / 3) + (trig_knows ? 3 : 0) > 12)
+ {
+ mpr("You notice a web but duck past it!");
+ }
+ else
+ {
+ mpr("You are caught in the web!");
+ if (player_caught_in_web() && player_in_a_dangerous_place())
+ xom_is_stimulated(50);
+ }
+ }
+ }
+ else if (m)
+ {
+ if (one_chance_in(3) || (trig_knows && coinflip()))
+ {
+ // Not triggered, trap stays.
+ if (you_know)
+ simple_monster_message(m, " evades a web.");
+ else
+ hide();
+ }
+ else if (random2(m->ev) > 8 || (trig_knows && random2(m->ev) > 8))
+ {
+ // Triggered but evaded.
+ if (in_sight)
+ {
+ if (!simple_monster_message(m,
+ " nimbly jumps through a gap in a web."))
+ {
+ mpr("A web waves in the air!");
+ }
+ }
+ }
+ else
+ {
+ // Triggered and hit.
+ if (in_sight)
+ {
+ if (m->visible_to(&you))
+ simple_monster_message(m, " is caught in a web!");
+ else
+ mpr("A web moves frantically as something is caught in it!");
+ }
+
+ // If somehow already caught, make it worse.
+ m->add_ench(ENCH_HELD);
+ }
+ }
+ break;
+
case TRAP_ZOT:
if (you_trigger)
{
@@ -1097,7 +1198,8 @@ void disarm_trap(const coord_def& where)
practise(EX_TRAP_DISARM_FAIL, you.absdepth0);
else
{
- if (trap.type == TRAP_NET && trap.pos != you.pos())
+ if ((trap.type == TRAP_NET || trap.type==TRAP_WEB)
+ && trap.pos != you.pos())
{
if (coinflip())
{
@@ -1581,6 +1683,8 @@ dungeon_feature_type trap_category(trap_type type)
{
switch (type)
{
+ case TRAP_WEB:
+ return (DNGN_TRAP_WEB);
case TRAP_SHAFT:
return (DNGN_TRAP_NATURAL);
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index 238a137..720445e 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -542,7 +542,7 @@ void initialise_travel()
{
for (int feat = DNGN_FLOOR_MIN; feat < NUM_FEATURES; feat++)
{
- if (feat >= DNGN_TRAP_MECHANICAL && feat <= DNGN_TRAP_NATURAL)
+ if (feat >= DNGN_TRAP_MECHANICAL && feat <= DNGN_TRAP_WEB)
continue;
traversable_terrain[feat] = TRAVERSABLE;
diff --git a/crawl-ref/source/viewmap.cc b/crawl-ref/source/viewmap.cc
index 7738e3c..ed1dccf 100644
--- a/crawl-ref/source/viewmap.cc
+++ b/crawl-ref/source/viewmap.cc
@@ -264,6 +264,7 @@ bool is_feature(wchar_t feature, const coord_def& where)
case DNGN_TRAP_MECHANICAL:
case DNGN_TRAP_MAGICAL:
case DNGN_TRAP_NATURAL:
+ case DNGN_TRAP_WEB:
return (true);
default:
return (false);
--
Dungeon Crawl Stone Soup
|