summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/transform.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-12-19 02:22:10 +0100
committerAdam Borowski <kilobyte@angband.pl>2013-12-19 02:22:10 +0100
commit17875e8c741bb89ababcd66dcc43496fa9fb947b (patch)
treecfd0038d1f33034b1a79b1710f24b0b3c2383db6 /crawl-ref/source/transform.cc
parent6372d9d7dff8d04232bf43af8614304ca44f5847 (diff)
downloadcrawl-ref-17875e8c741bb89ababcd66dcc43496fa9fb947b.tar.gz
crawl-ref-17875e8c741bb89ababcd66dcc43496fa9fb947b.zip
Fix odditiies with statue/lich form for merfolk and octopodes.
Changes in this commit: * lich Mf/Op retain full swimming * lich GreyDr, statue Mf/Op/GreyDr can walk through water GreyDr-style
Diffstat (limited to 'crawl-ref/source/transform.cc')
-rw-r--r--crawl-ref/source/transform.cc22
1 files changed, 19 insertions, 3 deletions
diff --git a/crawl-ref/source/transform.cc b/crawl-ref/source/transform.cc
index 027087514b..01fe02b6ee 100644
--- a/crawl-ref/source/transform.cc
+++ b/crawl-ref/source/transform.cc
@@ -94,8 +94,11 @@ bool form_can_swim(transformation_type form)
if (form == TRAN_ICE_BEAST || form == TRAN_JELLY)
return true;
- if (you.species == SP_MERFOLK && !form_changed_physiology(form))
+ if ((you.species == SP_MERFOLK || you.species == SP_OCTOPODE)
+ && (!form_changed_physiology(form) || form == TRAN_LICH))
+ {
return true;
+ }
if (you.species == SP_OCTOPODE && !form_changed_physiology(form))
return true;
@@ -109,8 +112,21 @@ bool form_can_swim(transformation_type form)
bool form_likes_water(transformation_type form)
{
- return form_can_swim(form) || you.species == SP_GREY_DRACONIAN
- && !form_changed_physiology(form);
+ // Grey dracs can't swim, so can't statue form merfolk/octopodes
+ // -- yet they can still survive in water.
+ if (you.species == SP_GREY_DRACONIAN || you.species == SP_MERFOLK
+ || you.species == SP_OCTOPODE)
+ {
+ if (form == TRAN_NONE
+ || form == TRAN_BLADE_HANDS
+ || form == TRAN_APPENDAGE
+ || form == TRAN_LICH
+ || form == TRAN_STATUE)
+ {
+ return true;
+ }
+ }
+ return form_can_swim(form);
}
bool form_has_mouth(transformation_type form)