diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-15 10:32:44 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-15 10:32:44 +0000 |
commit | f1e3ca24060130e0c9205de20e367bcf814896d1 (patch) | |
tree | 5a900298361fcf5aa201d39d5b898ab6167072a9 /crawl-ref/source/fight.cc | |
parent | 2b0fe052f4617b1b52fd952a35bfbc4f273dac81 (diff) | |
download | crawl-ref-f1e3ca24060130e0c9205de20e367bcf814896d1.tar.gz crawl-ref-f1e3ca24060130e0c9205de20e367bcf814896d1.zip |
Fix problem of friendly monsters not using any energy when there's
nothing around to fight and they're right next to the player.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2467 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r-- | crawl-ref/source/fight.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 605f06012b..55b5d5a2c2 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -3613,15 +3613,17 @@ static void mons_lose_attack_energy(monsters *attacker, int wpn_speed, } } -void monster_attack(int monster_attacking) +bool monster_attack(int monster_attacking) { monsters *attacker = &menv[monster_attacking]; if (mons_friendly(attacker) && !mons_is_confused(attacker)) - return; + return false; melee_attack attk(attacker, &you); attk.attack(); + + return true; } // end monster_attack() bool monsters_fight(int monster_attacking, int monster_attacked) |