summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/transform.h
diff options
context:
space:
mode:
authorRaphael Langella <raphael.langella@gmail.com>2010-10-04 17:49:37 +0200
committerAdam Borowski <kilobyte@angband.pl>2010-10-04 20:49:08 +0200
commit9ad9d9ef6e0d16c6fda7a98539008ce0085ca9ac (patch)
tree8f2fd6ace5da96721b2eb90552f2903bfe032ae9 /crawl-ref/source/transform.h
parent9856fdbfc5f82c87d04779238cb5287874d59e5c (diff)
downloadcrawl-ref-9ad9d9ef6e0d16c6fda7a98539008ce0085ca9ac.tar.gz
crawl-ref-9ad9d9ef6e0d16c6fda7a98539008ce0085ca9ac.zip
Merfolk tail and transforms overhaul
changes and bugfixes: * Make the merfolk tail compatible with blade hands. * Entering water doesn't cancel transformations. (Mantis 2110) * Trying to enter deep water with a non-swimming form as a merfolk prints: "You cannot swim in your current form.". You have to manually cancel the transformation. * Merfolk can cast all transformations in shallow water and blade hands and ice form in deep water. (Mantis 2384) * Prevent turning into non-flying form (and being porkalated to death) when in a flying form above lava/deep water. * Fix some messages (Mantis 1784, 2312, 2667). * Fix some special cases where the merfolk doesn't untransform (Mantis 1104). * When you change from one flying form to another over deep water, you no longer drown (extremly rare). * Add new functions so that it should be much easier to add new swimming and flying forms. bug not fixed: * If you fly/levitate out of water, the player doll isn't updated properly and keeps its tail. I have no idea how to fix this, but if someone does, it now should be much easier to fix. internals: * A new boolean has been added to the player struct to track the status of the fishtail. Currently, it isn't saved (to preserve save compatibility), but as the status is checked after each step, this shouldn't be a problem. I put preprocessor directives so that it will be saved when the TAG_MAJOR_VERSION changes. * Add 2 functions transform_can_fly and transform_can_swim and use them wherever possible. transformation_can_wield has been renamed to transform_can_wield for consistency with all the other transform functions. * replaced (you.species == SP_MERFOLK && you.swimming()) (and similar conditionals) by you.fishtail wherever possible.
Diffstat (limited to 'crawl-ref/source/transform.h')
-rw-r--r--crawl-ref/source/transform.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/crawl-ref/source/transform.h b/crawl-ref/source/transform.h
index 3c20620a02..fc34d36094 100644
--- a/crawl-ref/source/transform.h
+++ b/crawl-ref/source/transform.h
@@ -26,8 +26,13 @@ enum transformation_type
NUM_TRANSFORMATIONS // must remain last member {dlb}
};
-bool transformation_can_wield(transformation_type trans);
+bool transform_can_wield(transformation_type trans);
+bool transform_can_wield();
bool transform_can_butcher_barehanded(transformation_type tt);
+bool transform_can_fly(transformation_type trans);
+bool transform_can_fly();
+bool transform_can_swim(transformation_type trans);
+bool transform_can_swim();
// skip_move: don't make player re-enter current cell
void untransform(bool skip_wielding = false, bool skip_move = false);