From 79a10fe36b89f68f5d34263ebd7bd4ba46038184 Mon Sep 17 00:00:00 2001 From: haranp Date: Mon, 6 Nov 2006 13:02:46 +0000 Subject: 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 --- crawl-ref/source/fight.cc | 13 +++++++++---- 1 file 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: -- cgit v1.2.3-54-g00ecf