diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-04-10 06:53:37 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-04-10 06:53:37 +0000 |
commit | 4dbca72b9ff21d9e8534f8c18ae1d67d3e154203 (patch) | |
tree | 31abd12236010fef8849f1f6be63521b763604e1 | |
parent | eb456e33420acdd3c65b64dc0a9c9415d0709149 (diff) | |
download | crawl-ref-4dbca72b9ff21d9e8534f8c18ae1d67d3e154203.tar.gz crawl-ref-4dbca72b9ff21d9e8534f8c18ae1d67d3e154203.zip |
Levitation fix backport for 0.2.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.2@1279 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r-- | crawl-ref/source/dungeon.h | 4 | ||||
-rw-r--r-- | crawl-ref/source/externs.h | 6 | ||||
-rw-r--r-- | crawl-ref/source/mon-util.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 7 |
4 files changed, 11 insertions, 8 deletions
diff --git a/crawl-ref/source/dungeon.h b/crawl-ref/source/dungeon.h index 9772d19118..576b89059e 100644 --- a/crawl-ref/source/dungeon.h +++ b/crawl-ref/source/dungeon.h @@ -114,8 +114,8 @@ bool place_specific_trap(unsigned char spec_x, unsigned char spec_y, unsigned char spec_type); void place_spec_shop(int level_number, unsigned char shop_x, - unsigned char shop_y, unsigned char force_s_type, - bool representative = false ); + unsigned char shop_y, unsigned char force_s_type, + bool representative = false ); bool unforbidden(const coord_def &c, const dgn_region_list &forbidden); diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index e6c08b891d..c3ab663dc0 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -184,7 +184,7 @@ public: virtual int res_poison() const = 0; virtual int res_negative_energy() const = 0; - virtual bool levitates() const = 0; + virtual int levitates() const = 0; virtual bool paralysed() const = 0; virtual bool confused() const = 0; @@ -778,7 +778,7 @@ public: int res_poison() const; int res_negative_energy() const; - bool levitates() const; + int levitates() const; bool paralysed() const; bool confused() const; @@ -977,7 +977,7 @@ public: int res_poison() const; int res_negative_energy() const; - bool levitates() const; + int levitates() const; bool paralysed() const; bool confused() const; diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index b1dd2696b0..96402499e6 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -2734,7 +2734,7 @@ int monsters::res_negative_energy() const return (mons_res_negative_energy(this)); } -bool monsters::levitates() const +int monsters::levitates() const { return (mons_flies(this)); } diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index bdd629580a..9fcff7ce26 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -5083,9 +5083,12 @@ int player::res_negative_energy() const return (player_prot_life()); } -bool player::levitates() const +int player::levitates() const { - return (player_is_levitating()); + if ( !player_is_levitating() ) + return 0; + else + return (you.duration[DUR_CONTROLLED_FLIGHT] ? 1 : 2); } int player::mons_species() const |