diff options
author | pubby <pubby8@gmail.com> | 2013-06-30 14:01:58 -0500 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2013-06-30 18:49:12 -0400 |
commit | faf8416790ef3e910264d7ef83a243078e933cb2 (patch) | |
tree | d5d6e74dbad7fd7ab61e0c793b370cb9f5c46540 /crawl-ref/source/behold.cc | |
parent | 3dbd8d124c34f4fcf6db89c28bbeb6d6ed53b8c8 (diff) | |
download | crawl-ref-faf8416790ef3e910264d7ef83a243078e933cb2.tar.gz crawl-ref-faf8416790ef3e910264d7ef83a243078e933cb2.zip |
Remove use of 'you' inside player member functions
'you' seemed to be pointless in such context anyways, and lead to some
const correctness bugs since '*this' could have a different const-ness
from 'you'.
Diffstat (limited to 'crawl-ref/source/behold.cc')
-rw-r--r-- | crawl-ref/source/behold.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crawl-ref/source/behold.cc b/crawl-ref/source/behold.cc index db4cdcd3fe..d9c1cce8a0 100644 --- a/crawl-ref/source/behold.cc +++ b/crawl-ref/source/behold.cc @@ -25,11 +25,11 @@ static bool _mermaid_beholder(const monster* mons) // Add a monster to the list of beholders. void player::add_beholder(const monster* mon, bool axe) { - if (is_sanctuary(you.pos()) && !axe) + if (is_sanctuary(pos()) && !axe) { if (_mermaid_beholder(mon)) { - if (you.can_see(mon)) + if (can_see(mon)) { mprf("%s's singing sounds muted, and has no effect on you.", mon->name(DESC_THE).c_str()); @@ -39,7 +39,7 @@ void player::add_beholder(const monster* mon, bool axe) } else { - if (you.can_see(mon)) + if (can_see(mon)) mprf("%s's is no longer quite as mesmerising!", mon->name(DESC_THE).c_str()); else mpr("Your mesmeriser suddenly seems less interesting!"); @@ -50,7 +50,7 @@ void player::add_beholder(const monster* mon, bool axe) if (!duration[DUR_MESMERISED]) { - you.set_duration(DUR_MESMERISED, 7, 12); + set_duration(DUR_MESMERISED, 7, 12); beholders.push_back(mon->mindex()); if (!axe) { @@ -60,7 +60,7 @@ void player::add_beholder(const monster* mon, bool axe) } else { - you.increase_duration(DUR_MESMERISED, 5, 12); + increase_duration(DUR_MESMERISED, 5, 12); if (!beheld_by(mon)) beholders.push_back(mon->mindex()); } @@ -263,6 +263,6 @@ bool player::possible_beholder(const monster* mon) const && !mon->confused() && !mon->asleep() && !mon->cannot_move() && !mon->berserk() && !mons_is_fleeing(mon) - && !is_sanctuary(you.pos()) + && !is_sanctuary(pos()) || player_equip_unrand_effect(UNRAND_DEMON_AXE))); } |