summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/transform.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-11-27 14:51:09 +0100
committerAdam Borowski <kilobyte@angband.pl>2013-11-27 23:35:19 +0100
commit3f9f1092ff86ddf0e1116b29848e6827c111ca71 (patch)
tree6ac99dcf4f6678700c150eab292dfbaa3907bf39 /crawl-ref/source/transform.cc
parent1b66571fcb2c7977a8f38a9d170bcf1245db8e99 (diff)
downloadcrawl-ref-3f9f1092ff86ddf0e1116b29848e6827c111ca71.tar.gz
crawl-ref-3f9f1092ff86ddf0e1116b29848e6827c111ca71.zip
Fix gargoyles and black dracs not resuming flight upon ending tree form.
Diffstat (limited to 'crawl-ref/source/transform.cc')
-rw-r--r--crawl-ref/source/transform.cc21
1 files changed, 15 insertions, 6 deletions
diff --git a/crawl-ref/source/transform.cc b/crawl-ref/source/transform.cc
index d7ca267b3a..8f8d412d23 100644
--- a/crawl-ref/source/transform.cc
+++ b/crawl-ref/source/transform.cc
@@ -1323,15 +1323,24 @@ void untransform(bool skip_wielding, bool skip_move)
break;
case TRAN_TREE:
mpr("You feel less woody.", MSGCH_DURATION);
- if (grd(you.pos()) == DNGN_DEEP_WATER && you.species == SP_TENGU
- && you.experience_level >= 5)
+ if (grd(you.pos()) == DNGN_DEEP_WATER)
{
- // Flight was disabled, need to turn it back NOW.
- if (you.experience_level >= 15)
+ if (beogh_water_walk() || species_likes_water(you.species))
+ ; // nothing to do
+ else if (you.racial_permanent_flight()
+ || you.wearing_ego(EQ_ALL_ARMOUR, SPARM_FLYING))
+ {
you.attribute[ATTR_PERM_FLIGHT] = 1;
- else
+ mpr("You fly out of the water.");
+ }
+ else if (you.species == SP_TENGU
+ && you.experience_level >= 5)
+ {
you.increase_duration(DUR_FLIGHT, 50, 100);
- mpr("You frantically escape the water.");
+ mpr("You frantically fly out of the water.");
+ }
+ else
+ fall_into_a_pool(you.pos(), true, DNGN_DEEP_WATER);
}
notify_stat_change(STAT_STR, -10, true,
"losing the tree transformation");