summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells1.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-12-13 10:02:21 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-12-13 10:02:21 +0000
commit52b146bac6c9f15d8b90331576738204651d6c8c (patch)
treefd443b2458c9309d39ff82847632ccd1eba0c996 /crawl-ref/source/spells1.cc
parentac1b7c7427e4786ff62d6be16277c2d7e2a5b0c8 (diff)
downloadcrawl-ref-52b146bac6c9f15d8b90331576738204651d6c8c.tar.gz
crawl-ref-52b146bac6c9f15d8b90331576738204651d6c8c.zip
Permanent levitation no longer confers permanent flight.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3053 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells1.cc')
-rw-r--r--crawl-ref/source/spells1.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc
index 2e8b7acb26..c9bae358a2 100644
--- a/crawl-ref/source/spells1.cc
+++ b/crawl-ref/source/spells1.cc
@@ -785,13 +785,13 @@ void antimagic()
DUR_INSULATION, DUR_RESIST_POISON, DUR_RESIST_FIRE, DUR_RESIST_COLD,
DUR_SLAYING, DUR_STEALTH, DUR_MAGIC_SHIELD, DUR_SAGE
};
-
- if (you.duration[DUR_LEVITATION] > 2 && you.duration[DUR_LEVITATION] < 100)
+
+ if (!you.permanent_levitation() && you.duration[DUR_LEVITATION] > 2)
you.duration[DUR_LEVITATION] = 2;
- if (you.duration[DUR_CONTROLLED_FLIGHT] < 100 &&
- you.duration[DUR_CONTROLLED_FLIGHT] > 1) // don't mess with permaflight
+ if (!you.permanent_flight() && you.duration[DUR_CONTROLLED_FLIGHT] > 1)
you.duration[DUR_CONTROLLED_FLIGHT] = 1;
+
for ( unsigned int i = 0; i < ARRAYSIZE(dur_list); ++i )
if ( you.duration[dur_list[i]] > 1 )
you.duration[dur_list[i]] = 1;
@@ -1046,7 +1046,7 @@ void cast_swiftness(int power)
void cast_fly(int power)
{
- int dur_change = 25 + random2(power) + random2(power);
+ const int dur_change = 25 + random2(power) + random2(power);
const bool was_levitating = player_is_airborne();