diff options
author | Nicholas Feinberg <pleasingfung@gmail.com> | 2014-07-25 21:48:12 -0700 |
---|---|---|
committer | Nicholas Feinberg <pleasingfung@gmail.com> | 2014-07-25 21:50:26 -0700 |
commit | f054a6457fa0f54580893607c794b7356a9fa5f8 (patch) | |
tree | abab95239f37583619af1e92a7926403f4848cd4 /crawl-ref/source/mon-abil.cc | |
parent | a02710520930951c3f3b6685483d157d3b32bfcb (diff) | |
download | crawl-ref-f054a6457fa0f54580893607c794b7356a9fa5f8.tar.gz crawl-ref-f054a6457fa0f54580893607c794b7356a9fa5f8.zip |
Make torpor snail slow end immediately after LOS is broken
Or after they die, etc.
Also no longer require the torpor snail to be visible, thus
preventing powerful /invis secret tech. rip :(
Diffstat (limited to 'crawl-ref/source/mon-abil.cc')
-rw-r--r-- | crawl-ref/source/mon-abil.cc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/crawl-ref/source/mon-abil.cc b/crawl-ref/source/mon-abil.cc index 7a7fdfa4c9..b764f1db88 100644 --- a/crawl-ref/source/mon-abil.cc +++ b/crawl-ref/source/mon-abil.cc @@ -4757,6 +4757,7 @@ void ancient_zyme_sicken(monster* mons) void torpor_snail_slow(monster* mons) { // XXX: might be nice to refactor together with ancient_zyme_sicken(). + // XXX: also with torpor_slowed().... so many duplicated checks :( if (is_sanctuary(mons->pos()) || mons->attitude != ATT_HOSTILE @@ -4767,7 +4768,6 @@ void torpor_snail_slow(monster* mons) if (!is_sanctuary(you.pos()) && !you.stasis() - && you.can_see(mons) && cell_see_cell(you.pos(), mons->pos(), LOS_SOLID_SEE)) { if (!you.duration[DUR_SLOW]) @@ -4776,20 +4776,19 @@ void torpor_snail_slow(monster* mons) mons->name(DESC_THE).c_str()); } - if (you.duration[DUR_SLOW] < 27) - you.set_duration(DUR_SLOW, 18 + random2(10), 27); - // can't set this much shorter, or you periodically 'speed up' - // for a turn in the middle of TORPOR COMBAT + if (you.duration[DUR_SLOW] <= 1) + you.set_duration(DUR_SLOW, 1); + you.props[TORPOR_SLOWED_KEY] = true; } - for (radius_iterator ri(mons->pos(), LOS_RADIUS, C_ROUND); ri; ++ri) + for (monster_near_iterator ri(mons->pos(), LOS_SOLID_SEE); ri; ++ri) { - monster *m = monster_at(*ri); + monster *m = *ri; if (m && !mons_aligned(mons, m) && !m->check_stasis(true) - && !m->is_stationary() && !is_sanctuary(*ri) - && cell_see_cell(mons->pos(), *ri, LOS_SOLID_SEE)) + && !m->is_stationary() && !is_sanctuary(m->pos())) { - m->add_ench(mon_enchant(ENCH_SLOW, 0, mons, 18 + random2(10))); + m->add_ench(mon_enchant(ENCH_SLOW, 0, mons, 1)); + m->props[TORPOR_SLOWED_KEY] = true; } } } |