From b6fcb6516c139914febb40fd6549bfb0be0f1d8d Mon Sep 17 00:00:00 2001 From: Johanna Ploog Date: Sat, 2 Jan 2010 17:44:29 +0100 Subject: Give player-zapped wand bolts the "friendly" attitude. Fixes bug 0000244 (Xom being amused by the player zapping beneficial wands at himself.) --- crawl-ref/source/beam.cc | 3 +-- crawl-ref/source/item_use.cc | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'crawl-ref') 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()); -- cgit v1.2.3-54-g00ecf