summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-03-18 07:05:07 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-03-18 07:05:07 +0000
commit3fdf3ab24ea63ecde6537ea122e2ab1cd6b8d4f1 (patch)
treea838b57e94a87f84fcdbf3e551b365aec922259d /crawl-ref/source/fight.cc
parentde11c27378236139089c48ecfb0b66457cc0d67c (diff)
downloadcrawl-ref-3fdf3ab24ea63ecde6537ea122e2ab1cd6b8d4f1.tar.gz
crawl-ref-3fdf3ab24ea63ecde6537ea122e2ab1cd6b8d4f1.zip
Banished uniques (including ghosts) will now be sent to the Abyss. Banished
non-uniques may also get the Abyss treatment if they clear a HD roll. Crawl tries very hard not to lose banished monsters, preserving them across Abyss shifts and teleports, and saving them on the transit list when the player escapes the Abyss. Breaks savefile compatibility. Toned down Vehumet and wizardry boosts a touch. Fixed bugginess where player could get aux unarmed attacks on a monster that just teleported away (by weapon of distortion). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1052 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 7b46f788d3..0d741668c5 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -495,6 +495,8 @@ bool melee_attack::player_attack()
if (cancel_attack)
return (false);
+ coord_def where = defender->pos();
+
if (player_hits_monster())
{
did_hit = true;
@@ -533,11 +535,14 @@ bool melee_attack::player_attack()
const bool did_primary_hit = did_hit;
- if (unarmed_ok && player_aux_unarmed())
+ if (unarmed_ok && where == defender->pos() && player_aux_unarmed())
return (true);
- if ((did_primary_hit || did_hit) && def->type != -1)
+ if ((did_primary_hit || did_hit) && def->alive()
+ && where == defender->pos())
+ {
print_wounds(def);
+ }
return (did_primary_hit || did_hit);
}
@@ -1691,7 +1696,7 @@ bool melee_attack::apply_damage_brand()
break;
}
- if (coinflip())
+ if (you.level_type != LEVEL_ABYSS && coinflip())
{
emit_nodmg_hit_message();
defender->banish();