summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-28 22:23:03 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-28 22:23:03 +0000
commit4033ebc58ba40784a7ef241edc17fd3e940c23e2 (patch)
treeabb1a6e24d52d7322a02f83dee1c309058ac05e3 /crawl-ref/source/monstuff.cc
parentfc09d2de4c77399a6562507ad99c394d93c5cee9 (diff)
downloadcrawl-ref-4033ebc58ba40784a7ef241edc17fd3e940c23e2.tar.gz
crawl-ref-4033ebc58ba40784a7ef241edc17fd3e940c23e2.zip
In response to BR 2005224 (TSO penance from shooting unseen underwater
enemies) use player_visible_monster() as parameter known when setting conducts in beam.cc, so the player isn't punished for attacking monsters he didn't know were there, or if he did, had no idea about their current behaviour (fleeing perhaps?) Might be too nice, again, but I think it's okay. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6190 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index e9e0e56d00..f8d183728b 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -4372,8 +4372,7 @@ static bool _handle_potion(monsters *monster, bolt & beem)
bool imbibed = false;
item_type_id_state_type ident = ID_UNKNOWN_TYPE;
- bool was_visible =
- mons_near(monster) && player_monster_visible(monster);
+ bool was_visible = (mons_near(monster) && player_monster_visible(monster));
const int potion_type = mitm[monster->inv[MSLOT_POTION]].sub_type;
switch (potion_type)
@@ -4642,8 +4641,7 @@ static bool _handle_wand(monsters *monster, bolt &beem)
bool niceWand = false;
bool zap = false;
- bool was_visible
- = mons_near(monster) && player_monster_visible(monster);
+ bool was_visible = (mons_near(monster) && player_monster_visible(monster));
item_def &wand(mitm[monster->inv[MSLOT_WAND]]);