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)) { if (pctchance(f->val[0]) && !hasob(where->obpile, OT_VINE)) {
dospelleffects(owner, OT_S_ENTANGLE, f->val[1], victim, NULL, where, B_UNCURSED, dospelleffects(owner, OT_S_ENTANGLE, f->val[1], victim, NULL, where, B_UNCURSED,
NULL, B_FALSE, NULL); 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)) { } else if ((f->id == F_DRAINONHIT) && victim && !isdead(victim)) {
if (!leveldrain(victim, f->val[0], f->val[1], f->val[2], owner)) { if (!leveldrain(victim, f->val[0], f->val[1], f->val[2], owner)) {
if (strlen(f->text)) { if (strlen(f->text)) {
gainhp(owner, roll(f->text)); gainhp(owner, roll(f->text));
if (haslos(player, where)) {
f->known = B_KNOWN;
}
} }
} }
} else if ((f->id == F_DRAINATTONHIT) && victim && !isdead(victim)) { } else if ((f->id == F_DRAINATTONHIT) && victim && !isdead(victim)) {
int amt; int amt;
amt = roll(f->text); amt = roll(f->text);
statdrain(victim, f->val[0], amt, f->val[1], f->val[2], owner); 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) { } else if (f->id == F_FLAMESTRIKE) {
if (!hasob(where->obpile, OT_FIRESMALL)) { if (!hasob(where->obpile, OT_FIRESMALL)) {
// ignite // ignite