From 52b146bac6c9f15d8b90331576738204651d6c8c Mon Sep 17 00:00:00 2001 From: haranp Date: Thu, 13 Dec 2007 10:02:21 +0000 Subject: 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 --- crawl-ref/source/player.cc | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'crawl-ref/source/player.cc') diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 2a9dd4cb78..b264ca8ab1 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -3247,14 +3247,7 @@ void level_change(bool skip_ability_increase) MSGCH_INTRINSIC_GAIN); } else if (you.experience_level == 15) - { mpr("You can now fly continuously.", MSGCH_INTRINSIC_GAIN); - if (you.duration[DUR_LEVITATION]) - { - you.duration[DUR_LEVITATION] = 100; - you.duration[DUR_CONTROLLED_FLIGHT] = 100; - } - } break; case SP_MERFOLK: @@ -3669,7 +3662,7 @@ void display_char_status() const bool swim = player_is_swimming(); const bool lev = player_is_airborne(); - const bool fly = (lev && you.duration[DUR_CONTROLLED_FLIGHT]); + const bool fly = (you.flight_mode() == FL_FLY); const bool swift = (you.duration[DUR_SWIFTNESS] > 0); mprf( "Your %s speed is %s%s%s.", @@ -5988,6 +5981,24 @@ flight_type player::flight_mode() const return (FL_NONE); } +bool player::permanent_levitation() const +{ + return airborne() && + (permanent_flight() || + // Boots of levitation keep you with DUR_LEVITATION >= 2 at + // all times. This is so that you can evoke stop-levitation + // in order to actually cancel levitation (by setting + // DUR_LEVITATION to 1.) Note that antimagic() won't do this. + (player_equip_ego_type( EQ_BOOTS, SPARM_LEVITATION ) && + you.duration[DUR_LEVITATION] > 1)); +} + +bool player::permanent_flight() const +{ + return airborne() && + (you.species == SP_KENKU && you.experience_level >= 15); +} + bool player::light_flight() const { // Only Kenku get perks for flying light. -- cgit v1.2.3-54-g00ecf