From 6b500b8b361070875b599f418429d043a8197574 Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Tue, 31 May 2016 16:37:37 +1000 Subject: [PATCH] Identify lifedrain weapons ("of lifesucking") if you see them working. --- attack.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/attack.c b/attack.c index 8859478..70cb07d 100644 --- a/attack.c +++ b/attack.c @@ -3314,18 +3314,26 @@ void wepeffects(flagpile_t *fp, cell_t *where, flag_t *damflag, int dam, int isu if (pctchance(f->val[0]) && !hasob(where->obpile, OT_VINE)) { dospelleffects(owner, OT_S_ENTANGLE, f->val[1], victim, NULL, where, B_UNCURSED, NULL, B_FALSE, NULL); - f->known = B_KNOWN; + if (haslos(player, where)) { + f->known = B_KNOWN; + } } } else if ((f->id == F_DRAINONHIT) && victim && !isdead(victim)) { if (!leveldrain(victim, f->val[0], f->val[1], f->val[2], owner)) { if (strlen(f->text)) { gainhp(owner, roll(f->text)); + if (haslos(player, where)) { + f->known = B_KNOWN; + } } } } else if ((f->id == F_DRAINATTONHIT) && victim && !isdead(victim)) { int amt; amt = roll(f->text); statdrain(victim, f->val[0], amt, f->val[1], f->val[2], owner); + if (haslos(player, where)) { + f->known = B_KNOWN; + } } else if (f->id == F_FLAMESTRIKE) { if (!hasob(where->obpile, OT_FIRESMALL)) { // ignite