Identify lifedrain weapons ("of lifesucking") if you see them working.

This commit is contained in:
Rob Pearce 2016-05-31 16:37:37 +10:00
parent 2746095a69
commit 6b500b8b36
1 changed files with 9 additions and 1 deletions

View File

@ -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);
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