diff options
author | Vsevolod Kozlov <zaba@thorium.homeunix.org> | 2009-11-05 19:42:01 +0300 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-05 18:50:57 +0100 |
commit | de162132f702a4723cc9390d8c83baa012844161 (patch) | |
tree | 920b26fe8ea60d7d0225d59435f49f7e6e90d3d5 | |
parent | cf225c256f67b33f96a04c243f7c88ba23168664 (diff) | |
download | crawl-ref-de162132f702a4723cc9390d8c83baa012844161.tar.gz crawl-ref-de162132f702a4723cc9390d8c83baa012844161.zip |
Replace uses of player_is_swimming with you.swimming.
Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
-rw-r--r-- | crawl-ref/source/describe.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/fight.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/item_use.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/mon-cast.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 13 | ||||
-rw-r--r-- | crawl-ref/source/player.h | 1 | ||||
-rw-r--r-- | crawl-ref/source/transfor.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/view.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/xom.cc | 2 |
9 files changed, 15 insertions, 21 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 6d5b42bf67..5754d81332 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -3737,7 +3737,7 @@ std::string get_skill_description(int skill, bool need_title) if (you.attribute[ATTR_TRANSFORMATION] == TRAN_DRAGON || player_genus(GENPC_DRACONIAN) - || you.species == SP_MERFOLK && player_is_swimming() + || you.species == SP_MERFOLK && you.swimming() || player_mutation_level( MUT_STINGER )) { // TSO worshippers will not use their venomous tails. @@ -3766,7 +3766,7 @@ std::string get_skill_description(int skill, bool need_title) else if (player_mutation_level(MUT_TALONS)) unarmed_attacks.push_back("claw with your talons"); else if (you.species != SP_NAGA - && (you.species != SP_MERFOLK || !player_is_swimming())) + && (you.species != SP_MERFOLK || !you.swimming())) { unarmed_attacks.push_back("deliver a kick"); } diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 77b954b513..3d88c58563 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -239,7 +239,7 @@ int calc_heavy_armour_penalty( bool random_factor ) // Wearing heavy armour in water is particularly cumbersome. if (you.species == SP_MERFOLK && grd(you.pos()) == DNGN_DEEP_WATER - && player_is_swimming()) + && you.swimming()) { ev_pen *= 2; } @@ -985,7 +985,7 @@ bool melee_attack::player_aux_unarmed() if ((you.attribute[ATTR_TRANSFORMATION] == TRAN_DRAGON || player_genus(GENPC_DRACONIAN) - || (you.species == SP_MERFOLK && player_is_swimming()) + || (you.species == SP_MERFOLK && you.swimming()) || player_mutation_level(MUT_STINGER)) && one_chance_in(3)) { @@ -1098,7 +1098,7 @@ bool melee_attack::player_aux_unarmed() { // not draconian, and not wet merfolk if (!player_genus(GENPC_DRACONIAN) - && !(you.species == SP_MERFOLK && player_is_swimming()) + && !(you.species == SP_MERFOLK && you.swimming()) && !player_mutation_level(MUT_STINGER) || (!one_chance_in(4))) diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 371e407330..3380880fd1 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -853,7 +853,7 @@ bool can_wear_armour(const item_def &item, bool verbose, bool ignore_temporary) return (false); } - if (!ignore_temporary && player_is_swimming() + if (!ignore_temporary && you.swimming() && you.species == SP_MERFOLK) { if (verbose) diff --git a/crawl-ref/source/mon-cast.cc b/crawl-ref/source/mon-cast.cc index 4f877ae5c0..a9535cea2e 100644 --- a/crawl-ref/source/mon-cast.cc +++ b/crawl-ref/source/mon-cast.cc @@ -1382,7 +1382,7 @@ static void _do_high_level_summon(monsters *monster, bool monsterNearby, static bool _legs_msg_applicable() { return (you.species != SP_NAGA - && (you.species != SP_MERFOLK || !player_is_swimming())); + && (you.species != SP_MERFOLK || !you.swimming())); } void mons_cast_haunt(monsters *monster) diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 43c6fedeae..e0a768146c 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -428,11 +428,6 @@ bool player_likes_water(bool permanently) return (player_can_swim() || (!permanently && beogh_water_walk())); } -bool player_is_swimming() -{ - return (you.swimming()); -} - bool player_in_bat_form() { return (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT); @@ -692,7 +687,7 @@ bool you_tran_can_wear(int eq, bool check_mutation) return (false); if (eq == EQ_BOOTS - && (player_is_swimming() && you.species == SP_MERFOLK + && (you.swimming() && you.species == SP_MERFOLK || player_mutation_level(MUT_HOOVES) || player_mutation_level(MUT_TALONS))) { @@ -1867,7 +1862,7 @@ int player_movement_speed(void) { int mv = 10; - if (player_is_swimming()) + if (you.swimming()) { // This is swimming... so it doesn't make sense to really // apply the other things (the mutation is "cover ground", @@ -4051,7 +4046,7 @@ void display_char_status() const int move_cost = (player_speed() * player_movement_speed()) / 10; const bool water = player_in_water(); - const bool swim = player_is_swimming(); + const bool swim = you.swimming(); const bool lev = you.airborne(); const bool fly = (you.flight_mode() == FL_FLY); @@ -6173,7 +6168,7 @@ std::string player::foot_name(bool plural, bool *can_plural) const str = "underbelly"; *can_plural = false; } - else if (this->species == SP_MERFOLK && player_is_swimming()) + else if (this->species == SP_MERFOLK && you.swimming()) { str = "tail"; *can_plural = false; diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h index 827d8788de..d62a4affdc 100644 --- a/crawl-ref/source/player.h +++ b/crawl-ref/source/player.h @@ -538,7 +538,6 @@ bool is_light_armour( const item_def &item ); bool player_light_armour(bool with_skill = false); bool player_in_water(void); -bool player_is_swimming(void); bool player_under_penance(void); diff --git a/crawl-ref/source/transfor.cc b/crawl-ref/source/transfor.cc index b2b2bec286..3127308325 100644 --- a/crawl-ref/source/transfor.cc +++ b/crawl-ref/source/transfor.cc @@ -532,7 +532,7 @@ bool transform(int pow, transformation_type which_trans, bool force, return (false); } - if (you.species == SP_MERFOLK && player_is_swimming() + if (you.species == SP_MERFOLK && you.swimming() && which_trans != TRAN_DRAGON && which_trans != TRAN_BAT) { // This might be overkill, but it's okay because obviously @@ -672,7 +672,7 @@ bool transform(int pow, transformation_type which_trans, bool force, symbol = 'D'; colour = GREEN; dur = std::min(20 + random2(pow) + random2(pow), 100); - if (you.species == SP_MERFOLK && player_is_swimming()) + if (you.species == SP_MERFOLK && you.swimming()) { msg = "You fly out of the water as you turn into " "a fearsome dragon!"; diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc index 9156ea8ca3..4b4ad25e4d 100644 --- a/crawl-ref/source/view.cc +++ b/crawl-ref/source/view.cc @@ -1751,7 +1751,7 @@ void viewwindow(bool draw_it, bool do_updates) buffy[bufcount] = you.symbol; buffy[bufcount + 1] = you.colour; - if (player_is_swimming()) + if (you.swimming()) { if (grd(gc) == DNGN_DEEP_WATER) buffy[bufcount + 1] = BLUE; diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc index a1f0b98fcc..05a51fcc82 100644 --- a/crawl-ref/source/xom.cc +++ b/crawl-ref/source/xom.cc @@ -2475,7 +2475,7 @@ static void _xom_zero_miscast() } if (you.species != SP_NAGA - && (you.species != SP_MERFOLK || !player_is_swimming()) + && (you.species != SP_MERFOLK || !you.swimming()) && !you.airborne()) { messages.push_back("You do an impromptu tapdance."); |