summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-11-06 13:02:46 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-11-06 13:02:46 +0000
commit79a10fe36b89f68f5d34263ebd7bd4ba46038184 (patch)
treeb00fecb57358084e17428084724fb7dffe0a787a
parent386b6ea529672a91ab7bf12035b2d1d50cb9fa4d (diff)
downloadcrawl-ref-79a10fe36b89f68f5d34263ebd7bd4ba46038184.tar.gz
crawl-ref-79a10fe36b89f68f5d34263ebd7bd4ba46038184.zip
Fix for 1591103, incorrect no-damage messages with vorpal brands.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup@343 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/fight.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 93de92044b..8c4c4cbabc 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -1052,10 +1052,12 @@ bool you_attack(int monster_attacked, bool unarmed_attacks)
{
hit = true;
- snprintf( info, INFO_SIZE, "You %s ", damage_noise);
- strcat(info, ptr_monam(defender, DESC_NOCAP_THE));
- strcat(info, ", but do no damage.");
- mpr(info);
+ if ( !ur_armed || melee_brand != SPWPN_VORPAL )
+ {
+ snprintf(info, INFO_SIZE, "You %s %s, but do no damage.",
+ damage_noise, ptr_monam(defender, DESC_NOCAP_THE));
+ mpr(info);
+ }
}
}
else
@@ -1485,6 +1487,9 @@ bool you_attack(int monster_attacked, bool unarmed_attacks)
case SPWPN_VORPAL:
specdam = 1 + random2(damage_done) / 2;
+ if (damage_done < 1)
+ mprf(MSGCH_PLAIN, "You strike %s.",
+ ptr_monam(defender, DESC_NOCAP_THE));
break;
case SPWPN_VAMPIRICISM: