summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorNicholas Feinberg <pleasingfung@gmail.com>2014-06-07 17:11:56 -0700
committerNicholas Feinberg <pleasingfung@gmail.com>2014-06-15 20:38:27 -0700
commit4d6b2eaccc57a13a8fe72fca8fc3db9678ca7c17 (patch)
tree86f3326b656d621ebd53dec1d4aa3c38f737b4ee /crawl-ref
parent3c45d0dbb16a72bf7eaa57357a4cf206156a0dab (diff)
downloadcrawl-ref-4d6b2eaccc57a13a8fe72fca8fc3db9678ca7c17.tar.gz
crawl-ref-4d6b2eaccc57a13a8fe72fca8fc3db9678ca7c17.zip
Add torpor snails
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/dat/descript/monsters.txt7
-rw-r--r--crawl-ref/source/enum.h3
-rw-r--r--crawl-ref/source/mon-abil.cc27
-rw-r--r--crawl-ref/source/mon-abil.h1
-rw-r--r--crawl-ref/source/mon-act.cc3
-rw-r--r--crawl-ref/source/mon-data.h12
-rw-r--r--crawl-ref/source/mon-pick-data.h2
-rw-r--r--crawl-ref/source/mon-place.cc32
-rw-r--r--crawl-ref/source/rltiles/dc-corpse.txt8
-rw-r--r--crawl-ref/source/rltiles/dc-mon.txt3
-rw-r--r--crawl-ref/source/rltiles/mon/animals/torpor_snail.png (renamed from crawl-ref/source/rltiles/UNUSED/monsters/agate_snail.png)bin501 -> 501 bytes
-rw-r--r--crawl-ref/source/tilepick.cc6
12 files changed, 98 insertions, 6 deletions
diff --git a/crawl-ref/source/dat/descript/monsters.txt b/crawl-ref/source/dat/descript/monsters.txt
index 47ed9a9c95..a23f9c6be7 100644
--- a/crawl-ref/source/dat/descript/monsters.txt
+++ b/crawl-ref/source/dat/descript/monsters.txt
@@ -2497,6 +2497,13 @@ tormentor
A malign devil covered in all manner of claws, spines, and cruel hooks. It is
able to inflict torturous agony on those foolish enough to gaze upon it.
%%%%
+torpor snail
+
+A huge gastropod with a lime-green shell. Torpor snails are said to be in some
+way connected with the god Cheibriados; just looking at them is enough to slow
+the movements of unwary adventurers, leaving them easy prey for the snails'
+terrifying, ever-gnashing radulae.
+%%%%
torturous demonspawn
<demonspawn>
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 18f7aa328b..0e66be56fd 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -2342,6 +2342,8 @@ enum monster_type // menv[].type
#if TAG_MAJOR_VERSION == 34
MONS_GIANT_SLUG,
MONS_AGATE_SNAIL,
+#else
+ MONS_TORPOR_SNAIL,
#endif
MONS_ELEPHANT_SLUG,
MONS_GIANT_LEECH,
@@ -3206,6 +3208,7 @@ enum monster_type // menv[].type
MONS_OCTOPODE_CRUSHER,
MONS_CRAB,
MONS_GHOST_CRAB,
+ MONS_TORPOR_SNAIL,
#endif
NUM_MONSTERS, // used for polymorph
diff --git a/crawl-ref/source/mon-abil.cc b/crawl-ref/source/mon-abil.cc
index d8fefcd9b9..c865c3969f 100644
--- a/crawl-ref/source/mon-abil.cc
+++ b/crawl-ref/source/mon-abil.cc
@@ -4807,6 +4807,33 @@ void ancient_zyme_sicken(monster* mons)
}
}
+/**
+ * Apply the torpor snail -swift effect.
+ *
+ * @param mons The snail applying the effect.
+ */
+void torpor_snail_unswift(monster* mons)
+{
+ if (is_sanctuary(mons->pos())
+ || is_sanctuary(you.pos())
+ || you_worship(GOD_CHEIBRIADOS)
+ || !you.can_see(mons)
+ || !cell_see_cell(you.pos(), mons->pos(), LOS_SOLID_SEE))
+ {
+ return;
+ }
+
+ you.set_duration(DUR_SWIFTNESS, 9 + random2(6), 15);
+ if (you.attribute[ATTR_SWIFTNESS] != -1)
+ {
+ you.attribute[ATTR_SWIFTNESS] = -1;
+ mprf("Seeing %s leaves you feeling sluggish.",
+ mons->name(DESC_THE).c_str());
+ }
+
+ // slow (friendly) monsters? (would need to change initial bloc)
+}
+
static bool _do_merge_masses(monster* initial_mass, monster* merge_to)
{
// Combine enchantment durations.
diff --git a/crawl-ref/source/mon-abil.h b/crawl-ref/source/mon-abil.h
index 4f43fc2589..a7141f0355 100644
--- a/crawl-ref/source/mon-abil.h
+++ b/crawl-ref/source/mon-abil.h
@@ -26,6 +26,7 @@ void move_child_tentacles(monster * kraken);
void move_solo_tentacle(monster * tentacle);
void ancient_zyme_sicken(monster* mons);
+void torpor_snail_unswift(monster* mons);
void starcursed_merge(monster* mon, bool forced);
bool has_push_space(const coord_def& pos, actor* act,
diff --git a/crawl-ref/source/mon-act.cc b/crawl-ref/source/mon-act.cc
index f8f8275ad2..0777aff19e 100644
--- a/crawl-ref/source/mon-act.cc
+++ b/crawl-ref/source/mon-act.cc
@@ -2563,6 +2563,9 @@ static void _post_monster_move(monster* mons)
if (mons->type == MONS_ANCIENT_ZYME)
ancient_zyme_sicken(mons);
+ if (mons->type == MONS_TORPOR_SNAIL)
+ torpor_snail_unswift(mons);
+
if (mons->type == MONS_ASMODEUS)
{
cloud_type ctype = CLOUD_FIRE;
diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h
index d8e3b63427..2c6a152340 100644
--- a/crawl-ref/source/mon-data.h
+++ b/crawl-ref/source/mon-data.h
@@ -2244,6 +2244,18 @@ DUMMY_GENUS(MONS_CRAB, 't', LIGHTGREY, "crab")
MONUSE_NOTHING, MONEAT_NOTHING, SIZE_LARGE, MON_SHAPE_SNAKE
},
+{
+ MONS_TORPOR_SNAIL, 'w', GREEN, "torpor snail",
+ M_NO_SKELETON,
+ MR_NO_FLAGS,
+ 1200, 10, MONS_ELEPHANT_SLUG, MONS_TORPOR_SNAIL, MH_NATURAL, -3,
+ { {AT_BITE, AF_PLAIN, 30}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK },
+ { 12, 5, 2, 0 },
+ 10, 1, MST_NO_SPELLS, CE_POISONOUS, Z_BIG, S_SILENT,
+ I_INSECT, HT_AMPHIBIOUS, FL_NONE, 7, DEFAULT_ENERGY,
+ MONUSE_NOTHING, MONEAT_NOTHING, SIZE_LARGE, MON_SHAPE_SNAIL
+},
+
// dummy genus monster; not using DUMMY_GENUS since it's also a dummy species
{
MONS_ELEPHANT_SLUG, 'w', WHITE, "elephant slug",
diff --git a/crawl-ref/source/mon-pick-data.h b/crawl-ref/source/mon-pick-data.h
index 9a70e733e2..09896254ca 100644
--- a/crawl-ref/source/mon-pick-data.h
+++ b/crawl-ref/source/mon-pick-data.h
@@ -249,6 +249,7 @@ static const pop_entry pop_lair[] =
{ 1, 11, 457, SEMI, MONS_BLACK_MAMBA },
{ 1, 11, 514, SEMI, MONS_HYDRA },
{ 3, 9, 52, SEMI, MONS_CATOBLEPAS },
+ { 3, 9, 52, SEMI, MONS_TORPOR_SNAIL },
{ 4, 8, 14, SEMI, MONS_BRAIN_WORM },
{ 2, 10, 89, PEAK, MONS_WYVERN },
{ 1, 11, 273, PEAK, MONS_FIRE_DRAKE },
@@ -369,6 +370,7 @@ static const pop_entry pop_spider[] =
{ 0, 10, 763, SEMI, MONS_DEMONIC_CRAWLER },
{ 2, 10, 200, PEAK, MONS_GHOST_MOTH },
{ 2, 7, 155, SEMI, MONS_MOTH_OF_WRATH },
+ { 1, 7, 100, FLAT, MONS_TORPOR_SNAIL },
{ -1, 5, 193, SEMI, MONS_NO_MONSTER}, // Old worm/cockroach/mite weight
{ 0,0,0,FLAT,MONS_0 }
};
diff --git a/crawl-ref/source/mon-place.cc b/crawl-ref/source/mon-place.cc
index 4c8e297373..b8adc75d4b 100644
--- a/crawl-ref/source/mon-place.cc
+++ b/crawl-ref/source/mon-place.cc
@@ -2837,6 +2837,38 @@ static band_type _choose_band(monster_type mon_type, int &band_size,
}
break;
+ case MONS_TORPOR_SNAIL:
+ // would be nice to support more branches, generically...
+ if (player_in_branch(BRANCH_LAIR))
+ band = random_choose_weighted(5, BAND_YAKS,
+ 2, BAND_DEATH_YAKS,
+ 1, BAND_SHEEP,
+ 0);
+ else if (player_in_branch(BRANCH_SPIDER))
+ band = coinflip() ? BAND_REDBACK : BAND_RANDOM_SINGLE;
+
+ switch (band)
+ {
+ case BAND_YAKS:
+ band_size = 2 + random2(4); // 2-5
+ break;
+ case BAND_DEATH_YAKS:
+ band_size = 1 + random2(2); // 1-2
+ break;
+ case BAND_SHEEP:
+ band_size = 5 + random2(4); // 5-8
+ break;
+ case BAND_REDBACK:
+ band_size = 2 + random2(3); // 2-4
+ break;
+ case BAND_RANDOM_SINGLE:
+ band_size = 1;
+ break;
+ default:
+ break;
+ }
+ break;
+
default: ;
}
diff --git a/crawl-ref/source/rltiles/dc-corpse.txt b/crawl-ref/source/rltiles/dc-corpse.txt
index a47385e17e..9e0b29497e 100644
--- a/crawl-ref/source/rltiles/dc-corpse.txt
+++ b/crawl-ref/source/rltiles/dc-corpse.txt
@@ -52,10 +52,6 @@ iguana CORPSE_IGUANA
basilisk CORPSE_BASILISK
komodo_dragon CORPSE_KOMODO_DRAGON
-## Slugs ('j')
-%back blood_green blood_green1 blood_green2 blood_green3 blood_green4
-elephant_slug CORPSE_ELEPHANT_SLUG
-
## Rodents ('r')
%back blood_puddle_red blood_puddle_red1 blood_puddle_red2 blood_puddle_red3 blood_puddle_red4
rat CORPSE_RAT
@@ -93,12 +89,14 @@ fire_crab CORPSE_FIRE_CRAB
apocalypse_crab CORPSE_APOCALYPSE_CRAB
%sdir mon/animals
-## Worms ('w')
+## Worms and gastropods ('w')
%back blood_green blood_green1 blood_green2 blood_green3 blood_green4
worm CORPSE_WORM
../aquatic/swamp_worm CORPSE_SWAMP_WORM
brain_worm CORPSE_BRAIN_WORM
giant_leech CORPSE_GIANT_LEECH
+torpor_snail CORPSE_TORPOR_SNAIL
+elephant_slug CORPSE_ELEPHANT_SLUG
## Wasps ('y')
vampire_mosquito CORPSE_VAMPIRE_MOSQUITO
diff --git a/crawl-ref/source/rltiles/dc-mon.txt b/crawl-ref/source/rltiles/dc-mon.txt
index 5d24d5aff9..551b8fb2ae 100644
--- a/crawl-ref/source/rltiles/dc-mon.txt
+++ b/crawl-ref/source/rltiles/dc-mon.txt
@@ -152,6 +152,9 @@ lava_worm MONS_LAVA_WORM
worm MONS_WORM
brain_worm MONS_BRAIN_WORM
giant_leech MONS_GIANT_LEECH
+%rim 0
+torpor_snail MONS_TORPOR_SNAIL
+%rim 1
## Flying insects ('y')
vampire_mosquito MONS_VAMPIRE_MOSQUITO
diff --git a/crawl-ref/source/rltiles/UNUSED/monsters/agate_snail.png b/crawl-ref/source/rltiles/mon/animals/torpor_snail.png
index de337be0d9..de337be0d9 100644
--- a/crawl-ref/source/rltiles/UNUSED/monsters/agate_snail.png
+++ b/crawl-ref/source/rltiles/mon/animals/torpor_snail.png
Binary files differ
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc
index 8b8ccdee4a..9fe177faaf 100644
--- a/crawl-ref/source/tilepick.cc
+++ b/crawl-ref/source/tilepick.cc
@@ -1382,6 +1382,8 @@ static tileidx_t _tileidx_monster_base(int type, bool in_water, int colour,
return TILEP_MONS_SWAMP_WORM;
case MONS_GIANT_LEECH:
return TILEP_MONS_GIANT_LEECH;
+ case MONS_TORPOR_SNAIL:
+ return TILEP_MONS_TORPOR_SNAIL;
// small abominations ('x')
case MONS_UNSEEN_HORROR:
@@ -3692,7 +3694,7 @@ static tileidx_t _tileidx_corpse(const item_def &item)
return ugly_corpse_tile + colour_offset;
}
- // worms ('w')
+ // worms and gastropods ('w')
case MONS_WORM:
return TILE_CORPSE_WORM;
case MONS_BRAIN_WORM:
@@ -3701,6 +3703,8 @@ static tileidx_t _tileidx_corpse(const item_def &item)
return TILE_CORPSE_SWAMP_WORM;
case MONS_GIANT_LEECH:
return TILE_CORPSE_GIANT_LEECH;
+ case MONS_TORPOR_SNAIL:
+ return TILE_CORPSE_TORPOR_SNAIL;
// flying insects ('y')
case MONS_VAMPIRE_MOSQUITO: