summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-04 10:08:23 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-04 10:08:23 +0000
commite52811f9c089b748627cd582419a29e67aa1a22a (patch)
tree6fc34b6e1327c43a3460fd30d7e49349b6eaaa56 /crawl-ref/source
parenta6e153fdce02d271899d8b71ecd82fffcbf0fbc2 (diff)
downloadcrawl-ref-e52811f9c089b748627cd582419a29e67aa1a22a.tar.gz
crawl-ref-e52811f9c089b748627cd582419a29e67aa1a22a.zip
Fix 1902654: Wandering monsters hitting you without noticing you.
They will now notice if they bump into you. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3520 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/fight.cc3
-rw-r--r--crawl-ref/source/item_use.cc7
-rw-r--r--crawl-ref/source/monstuff.cc4
3 files changed, 10 insertions, 4 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index e7717f1476..3a362df083 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -3822,6 +3822,9 @@ bool monster_attack(int monster_attacking)
if (mons_friendly(attacker) && !mons_is_confused(attacker))
return false;
+ // in case the monster hasn't noticed you
+ // bumping into will change that
+ behaviour_event( attacker, ME_ALERT, MHITYOU );
melee_attack attk(attacker, &you);
attk.attack();
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 7330c76b29..5fa3c53deb 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -4041,9 +4041,10 @@ static bool scroll_modify_item(const scroll_type scroll)
case SCR_RECHARGING:
if (item_is_rechargable(item))
{
- mpr("This is a scroll of recharging!");
- recharge_wand(item_slot);
- return (true);
+ // might still fail on highly enchanted weapons of electrocution
+ if (recharge_wand(item_slot))
+ return (true);
+ return (false);
}
case SCR_ENCHANT_ARMOUR:
if (is_enchantable_armour(item, true))
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 1a87ea13a6..64355d5209 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -4708,8 +4708,10 @@ void handle_monsters(void)
handle_monster_move(i, monster);
if (!invalid_monster(monster)
- && (monster->x != mx || monster->y != my))
+ && (monster->x != mx || monster->y != my))
+ {
immobile_monster[i] = true;
+ }
// If the player got banished, discard pending monster actions.
if (you.banished)