summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohanna Ploog <j-p-e-g@users.sourceforge.net>2010-01-02 17:44:29 +0100
committerJohanna Ploog <j-p-e-g@users.sourceforge.net>2010-01-02 17:44:29 +0100
commitb6fcb6516c139914febb40fd6549bfb0be0f1d8d (patch)
tree3966959817a31d5fc89f7144c434037be8686602
parent2a673e4ca8d871c8f5b01056a9f19e06b65b7abc (diff)
downloadcrawl-ref-b6fcb6516c139914febb40fd6549bfb0be0f1d8d.tar.gz
crawl-ref-b6fcb6516c139914febb40fd6549bfb0be0f1d8d.zip
Give player-zapped wand bolts the "friendly" attitude. Fixes bug 0000244
(Xom being amused by the player zapping beneficial wands at himself.)
-rw-r--r--crawl-ref/source/beam.cc3
-rw-r--r--crawl-ref/source/item_use.cc3
2 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index e991e44b51..2745db78d2 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -4183,8 +4183,7 @@ void bolt::affect_player_enchantment()
else
foe_info.hurt++;
}
-
- if (nice)
+ else if (nice)
{
if (mons_att_wont_attack(attitude))
friend_info.helped++;
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 9cd2d4fd2b..0da1d40a68 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -4288,7 +4288,8 @@ void zap_wand(int slot)
if (wand.sub_type == WAND_RANDOM_EFFECTS)
beam.effect_known = false;
- beam.source = you.pos();
+ beam.source = you.pos();
+ beam.attitude = ATT_FRIENDLY;
beam.set_target(zap_wand);
bool aimed_at_self = (beam.target == you.pos());