summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/ability.cc
diff options
context:
space:
mode:
authorNicholas Feinberg <pleasingfung@gmail.com>2014-04-06 20:30:58 -0700
committerShmuale Mark <shm.mark@gmail.com>2014-04-07 00:01:42 -0400
commite495eb6ae1ceead0085c87b41fbe6984bab8d7eb (patch)
treede829db9f9c635e65dfc32d1a7de9dc31437fba2 /crawl-ref/source/ability.cc
parentdeeb9b75cdf8cf4a5bc3e6a669666bd057a619a9 (diff)
downloadcrawl-ref-e495eb6ae1ceead0085c87b41fbe6984bab8d7eb.tar.gz
crawl-ref-e495eb6ae1ceead0085c87b41fbe6984bab8d7eb.zip
Deduplicate feature danger code
Diffstat (limited to 'crawl-ref/source/ability.cc')
-rw-r--r--crawl-ref/source/ability.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/crawl-ref/source/ability.cc b/crawl-ref/source/ability.cc
index d867a2c333..02b4fef2e8 100644
--- a/crawl-ref/source/ability.cc
+++ b/crawl-ref/source/ability.cc
@@ -1664,8 +1664,7 @@ bool activate_talent(const talent& tal)
// Doing these would outright kill the player.
if (tal.which == ABIL_STOP_FLYING)
{
- if (grd(you.pos()) == DNGN_DEEP_WATER && !player_likes_water()
- || grd(you.pos()) == DNGN_LAVA && !player_likes_lava())
+ if (is_feat_dangerous(grd(you.pos()), false, true))
{
mpr("Stopping flight right now would be fatal!");
crawl_state.zero_turns_taken();