more angry god vs pacifist conduct
Do it properly, using the arguments to xkilled() instead of reversing the conduct counter after the fact. The xkilled() flag value of '1' has been reversed. It used to mean 'display message' but now means 'suppress message' since both of the other flag bits are for suppression. All callers have been updated to specify either XKILL_GIVEMSG or XKILL_NOMSG so the underlying number remains transparent.
This commit is contained in:
@@ -326,6 +326,13 @@ NEARDATA extern coord bhitpos; /* place where throw or zap hits or stops */
|
|||||||
#define SORTLOOT_INVLET 0x02
|
#define SORTLOOT_INVLET 0x02
|
||||||
#define SORTLOOT_LOOT 0x04
|
#define SORTLOOT_LOOT 0x04
|
||||||
|
|
||||||
|
/* flags for xkilled() [note: meaning of first bit used to be reversed,
|
||||||
|
1 to give message and 0 to suppress] */
|
||||||
|
#define XKILL_GIVEMSG 0
|
||||||
|
#define XKILL_NOMSG 1
|
||||||
|
#define XKILL_NOCORPSE 2
|
||||||
|
#define XKILL_NOCONDUCT 4
|
||||||
|
|
||||||
/* Macros for messages referring to hands, eyes, feet, etc... */
|
/* Macros for messages referring to hands, eyes, feet, etc... */
|
||||||
#define ARM 0
|
#define ARM 0
|
||||||
#define EYE 1
|
#define EYE 1
|
||||||
|
|||||||
+1
-1
@@ -737,7 +737,7 @@ register xchar x, y;
|
|||||||
that's the result of his actions; gain experience,
|
that's the result of his actions; gain experience,
|
||||||
lose pacifism, take alignment and luck hit, make
|
lose pacifism, take alignment and luck hit, make
|
||||||
corpse less likely to remain tame after revival */
|
corpse less likely to remain tame after revival */
|
||||||
xkilled(mtmp, 0); /* no "you kill it" message */
|
xkilled(mtmp, XKILL_NOMSG);
|
||||||
/* life-saving doesn't ordinarily reset this */
|
/* life-saving doesn't ordinarily reset this */
|
||||||
if (mtmp->mhp > 0)
|
if (mtmp->mhp > 0)
|
||||||
u.uconduct.killer = save_pacifism;
|
u.uconduct.killer = save_pacifism;
|
||||||
|
|||||||
+26
-16
@@ -423,9 +423,9 @@ int x, y;
|
|||||||
}
|
}
|
||||||
|
|
||||||
STATIC_OVL void
|
STATIC_OVL void
|
||||||
e_died(etmp, dest, how)
|
e_died(etmp, xkill_flags, how)
|
||||||
struct entity *etmp;
|
struct entity *etmp;
|
||||||
int dest, how;
|
int xkill_flags, how;
|
||||||
{
|
{
|
||||||
if (is_u(etmp)) {
|
if (is_u(etmp)) {
|
||||||
if (how == DROWNING) {
|
if (how == DROWNING) {
|
||||||
@@ -462,13 +462,14 @@ int dest, how;
|
|||||||
|
|
||||||
killer.name[0] = 0;
|
killer.name[0] = 0;
|
||||||
/* fake "digested to death" damage-type suppresses corpse */
|
/* fake "digested to death" damage-type suppresses corpse */
|
||||||
#define mk_message(dest) ((dest & 1) ? "" : (char *) 0)
|
#define mk_message(dest) (((dest & XKILL_NOMSG) != 0) ? (char *) 0 : "")
|
||||||
#define mk_corpse(dest) ((dest & 2) ? AD_DGST : AD_PHYS)
|
#define mk_corpse(dest) (((dest & XKILL_NOCORPSE) != 0) ? AD_DGST : AD_PHYS)
|
||||||
/* if monsters are moving, one of them caused the destruction */
|
/* if monsters are moving, one of them caused the destruction */
|
||||||
if (context.mon_moving)
|
if (context.mon_moving)
|
||||||
monkilled(etmp->emon, mk_message(dest), mk_corpse(dest));
|
monkilled(etmp->emon,
|
||||||
|
mk_message(xkill_flags), mk_corpse(xkill_flags));
|
||||||
else /* you caused it */
|
else /* you caused it */
|
||||||
xkilled(etmp->emon, dest);
|
xkilled(etmp->emon, xkill_flags);
|
||||||
etmp->edata = (struct permonst *) 0;
|
etmp->edata = (struct permonst *) 0;
|
||||||
|
|
||||||
/* dead long worm handling */
|
/* dead long worm handling */
|
||||||
@@ -605,7 +606,9 @@ struct entity *etmp;
|
|||||||
if (crm->typ == DRAWBRIDGE_DOWN) {
|
if (crm->typ == DRAWBRIDGE_DOWN) {
|
||||||
pline("%s crushed underneath the drawbridge.",
|
pline("%s crushed underneath the drawbridge.",
|
||||||
E_phrase(etmp, "are")); /* no jump */
|
E_phrase(etmp, "are")); /* no jump */
|
||||||
e_died(etmp, e_inview ? 3 : 2, CRUSHING); /* no corpse */
|
e_died(etmp,
|
||||||
|
XKILL_NOCORPSE | (e_inview ? XKILL_GIVEMSG : XKILL_NOMSG),
|
||||||
|
CRUSHING); /* no corpse */
|
||||||
return; /* Note: Beyond this point, we know we're */
|
return; /* Note: Beyond this point, we know we're */
|
||||||
} /* not at an opened drawbridge, since all */
|
} /* not at an opened drawbridge, since all */
|
||||||
must_jump = TRUE; /* *missable* creatures survive on the */
|
must_jump = TRUE; /* *missable* creatures survive on the */
|
||||||
@@ -621,7 +624,10 @@ struct entity *etmp;
|
|||||||
E_phrase(etmp, "are"));
|
E_phrase(etmp, "are"));
|
||||||
else if (!Deaf)
|
else if (!Deaf)
|
||||||
You_hear("a crushing sound.");
|
You_hear("a crushing sound.");
|
||||||
e_died(etmp, e_inview ? 3 : 2, CRUSHING);
|
e_died(etmp,
|
||||||
|
XKILL_NOCORPSE | (e_inview ? XKILL_GIVEMSG
|
||||||
|
: XKILL_NOMSG),
|
||||||
|
CRUSHING);
|
||||||
/* no corpse */
|
/* no corpse */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -717,7 +723,7 @@ struct entity *etmp;
|
|||||||
if (!e_survives_at(etmp, etmp->ex, etmp->ey)) {
|
if (!e_survives_at(etmp, etmp->ex, etmp->ey)) {
|
||||||
killer.format = KILLED_BY_AN;
|
killer.format = KILLED_BY_AN;
|
||||||
Strcpy(killer.name, "closing drawbridge");
|
Strcpy(killer.name, "closing drawbridge");
|
||||||
e_died(etmp, 0, CRUSHING); /* no message */
|
e_died(etmp, XKILL_NOMSG, CRUSHING);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
debugpline1("%s in here", E_phrase(etmp, "survive"));
|
debugpline1("%s in here", E_phrase(etmp, "survive"));
|
||||||
@@ -748,11 +754,11 @@ struct entity *etmp;
|
|||||||
}
|
}
|
||||||
killer.format = NO_KILLER_PREFIX;
|
killer.format = NO_KILLER_PREFIX;
|
||||||
Strcpy(killer.name, "fell from a drawbridge");
|
Strcpy(killer.name, "fell from a drawbridge");
|
||||||
e_died(etmp, e_inview ? 3 : 2, /* CRUSHING is arbitrary */
|
e_died(etmp, /* CRUSHING is arbitrary */
|
||||||
(is_pool(etmp->ex, etmp->ey))
|
XKILL_NOCORPSE | (e_inview ? XKILL_GIVEMSG : XKILL_NOMSG),
|
||||||
? DROWNING
|
is_pool(etmp->ex, etmp->ey) ? DROWNING
|
||||||
: (is_lava(etmp->ex, etmp->ey)) ? BURNING
|
: is_lava(etmp->ex, etmp->ey) ? BURNING
|
||||||
: CRUSHING); /*no corpse*/
|
: CRUSHING); /*no corpse*/
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -954,7 +960,9 @@ int x, y;
|
|||||||
E_phrase(etmp2, "are"));
|
E_phrase(etmp2, "are"));
|
||||||
killer.format = KILLED_BY_AN;
|
killer.format = KILLED_BY_AN;
|
||||||
Strcpy(killer.name, "exploding drawbridge");
|
Strcpy(killer.name, "exploding drawbridge");
|
||||||
e_died(etmp2, e_inview ? 3 : 2, CRUSHING); /*no corpse*/
|
e_died(etmp2,
|
||||||
|
XKILL_NOCORPSE | (e_inview ? XKILL_GIVEMSG : XKILL_NOMSG),
|
||||||
|
CRUSHING); /*no corpse*/
|
||||||
} /* nothing which is vulnerable can survive this */
|
} /* nothing which is vulnerable can survive this */
|
||||||
}
|
}
|
||||||
set_entity(x, y, etmp1);
|
set_entity(x, y, etmp1);
|
||||||
@@ -984,7 +992,9 @@ int x, y;
|
|||||||
}
|
}
|
||||||
killer.format = KILLED_BY_AN;
|
killer.format = KILLED_BY_AN;
|
||||||
Strcpy(killer.name, "collapsing drawbridge");
|
Strcpy(killer.name, "collapsing drawbridge");
|
||||||
e_died(etmp1, e_inview ? 3 : 2, CRUSHING); /*no corpse*/
|
e_died(etmp1,
|
||||||
|
XKILL_NOCORPSE | (e_inview ? XKILL_GIVEMSG : XKILL_NOMSG),
|
||||||
|
CRUSHING); /*no corpse*/
|
||||||
if (levl[etmp1->ex][etmp1->ey].typ == MOAT)
|
if (levl[etmp1->ex][etmp1->ey].typ == MOAT)
|
||||||
do_entity(etmp1);
|
do_entity(etmp1);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -2664,7 +2664,7 @@ register struct attack *mattk;
|
|||||||
}
|
}
|
||||||
pline("%s turns to stone!", Monnam(mtmp));
|
pline("%s turns to stone!", Monnam(mtmp));
|
||||||
stoned = 1;
|
stoned = 1;
|
||||||
xkilled(mtmp, 0);
|
xkilled(mtmp, XKILL_NOMSG);
|
||||||
if (mtmp->mhp > 0)
|
if (mtmp->mhp > 0)
|
||||||
return 1;
|
return 1;
|
||||||
return 2;
|
return 2;
|
||||||
@@ -2773,7 +2773,7 @@ register struct attack *mattk;
|
|||||||
assess_dmg:
|
assess_dmg:
|
||||||
if ((mtmp->mhp -= tmp) <= 0) {
|
if ((mtmp->mhp -= tmp) <= 0) {
|
||||||
pline("%s dies!", Monnam(mtmp));
|
pline("%s dies!", Monnam(mtmp));
|
||||||
xkilled(mtmp, 0);
|
xkilled(mtmp, XKILL_NOMSG);
|
||||||
if (mtmp->mhp > 0)
|
if (mtmp->mhp > 0)
|
||||||
return 1;
|
return 1;
|
||||||
return 2;
|
return 2;
|
||||||
|
|||||||
@@ -2153,26 +2153,29 @@ void
|
|||||||
killed(mtmp)
|
killed(mtmp)
|
||||||
struct monst *mtmp;
|
struct monst *mtmp;
|
||||||
{
|
{
|
||||||
xkilled(mtmp, 1);
|
xkilled(mtmp, XKILL_GIVEMSG);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* the player has killed the monster mtmp */
|
/* the player has killed the monster mtmp */
|
||||||
void
|
void
|
||||||
xkilled(mtmp, dflags)
|
xkilled(mtmp, xkill_flags)
|
||||||
struct monst *mtmp;
|
struct monst *mtmp;
|
||||||
int dflags; /* disposition flags: 1 => give message, 2 => suppress corpse */
|
int xkill_flags; /* 1: suppress message, 2: suppress corpse, 4: pacifist */
|
||||||
{
|
{
|
||||||
int tmp, mndx, x = mtmp->mx, y = mtmp->my;
|
int tmp, mndx, x = mtmp->mx, y = mtmp->my;
|
||||||
struct permonst *mdat;
|
struct permonst *mdat;
|
||||||
struct obj *otmp;
|
struct obj *otmp;
|
||||||
struct trap *t;
|
struct trap *t;
|
||||||
boolean wasinside = u.uswallow && (u.ustuck == mtmp), burycorpse = FALSE,
|
boolean wasinside = u.uswallow && (u.ustuck == mtmp),
|
||||||
givemsg = (dflags & 1) != 0, nocorpse = (dflags & 2) != 0;
|
burycorpse = FALSE,
|
||||||
|
nomsg = (xkill_flags & XKILL_NOMSG) != 0,
|
||||||
|
nocorpse = (xkill_flags & XKILL_NOCORPSE) != 0,
|
||||||
|
noconduct = (xkill_flags & XKILL_NOCONDUCT) != 0;
|
||||||
|
|
||||||
/* KMH, conduct */
|
if (!noconduct) /* KMH, conduct */
|
||||||
u.uconduct.killer++;
|
u.uconduct.killer++;
|
||||||
|
|
||||||
if (givemsg)
|
if (!nomsg)
|
||||||
You("%s %s!",
|
You("%s %s!",
|
||||||
nonliving(mtmp->data) ? "destroy" : "kill",
|
nonliving(mtmp->data) ? "destroy" : "kill",
|
||||||
!(wasinside || canspotmon(mtmp)) ? "it"
|
!(wasinside || canspotmon(mtmp)) ? "it"
|
||||||
@@ -2260,7 +2263,7 @@ int dflags; /* disposition flags: 1 => give message, 2 => suppress corpse */
|
|||||||
/* oc_big is also oc_bimanual and oc_bulky */
|
/* oc_big is also oc_bimanual and oc_bulky */
|
||||||
&& (otmp->owt > 30 || objects[otyp].oc_big)) {
|
&& (otmp->owt > 30 || objects[otyp].oc_big)) {
|
||||||
delobj(otmp);
|
delobj(otmp);
|
||||||
} else if (!flooreffects(otmp, x, y, givemsg ? "fall" : "")) {
|
} else if (!flooreffects(otmp, x, y, nomsg ? "" : "fall")) {
|
||||||
place_object(otmp, x, y);
|
place_object(otmp, x, y);
|
||||||
stackobj(otmp);
|
stackobj(otmp);
|
||||||
}
|
}
|
||||||
@@ -2270,7 +2273,7 @@ int dflags; /* disposition flags: 1 => give message, 2 => suppress corpse */
|
|||||||
cadaver = make_corpse(mtmp, burycorpse ? CORPSTAT_BURIED
|
cadaver = make_corpse(mtmp, burycorpse ? CORPSTAT_BURIED
|
||||||
: CORPSTAT_NONE);
|
: CORPSTAT_NONE);
|
||||||
if (burycorpse && cadaver && cansee(x, y) && !mtmp->minvis
|
if (burycorpse && cadaver && cansee(x, y) && !mtmp->minvis
|
||||||
&& cadaver->where == OBJ_BURIED && givemsg) {
|
&& cadaver->where == OBJ_BURIED && !nomsg) {
|
||||||
pline("%s corpse ends up buried.", s_suffix(Monnam(mtmp)));
|
pline("%s corpse ends up buried.", s_suffix(Monnam(mtmp)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -225,7 +225,7 @@ boolean verbose; /* give message(s) even when you can't see what happened */
|
|||||||
/* don't blame hero for unknown rolling boulder trap */
|
/* don't blame hero for unknown rolling boulder trap */
|
||||||
if (!context.mon_moving
|
if (!context.mon_moving
|
||||||
&& (otmp->otyp != BOULDER || range >= 0 || otmp->otrapped))
|
&& (otmp->otyp != BOULDER || range >= 0 || otmp->otrapped))
|
||||||
xkilled(mtmp, 0);
|
xkilled(mtmp, XKILL_NOMSG);
|
||||||
else
|
else
|
||||||
mondied(mtmp);
|
mondied(mtmp);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -2240,7 +2240,7 @@ boolean stoning;
|
|||||||
if (mon->mhp <= 0) {
|
if (mon->mhp <= 0) {
|
||||||
pline("%s dies!", Monnam(mon));
|
pline("%s dies!", Monnam(mon));
|
||||||
if (by_you)
|
if (by_you)
|
||||||
xkilled(mon, 0);
|
xkilled(mon, XKILL_NOMSG);
|
||||||
else
|
else
|
||||||
mondead(mon);
|
mondead(mon);
|
||||||
return;
|
return;
|
||||||
|
|||||||
+8
-9
@@ -360,16 +360,15 @@ int force;
|
|||||||
else {
|
else {
|
||||||
You("destroy %s!",
|
You("destroy %s!",
|
||||||
mtmp->mtame
|
mtmp->mtame
|
||||||
? x_monnam(
|
? x_monnam(mtmp, ARTICLE_THE,
|
||||||
mtmp, ARTICLE_THE,
|
"poor",
|
||||||
"poor",
|
has_mname(mtmp)
|
||||||
(has_mname(mtmp))
|
? SUPPRESS_SADDLE
|
||||||
? SUPPRESS_SADDLE
|
: 0,
|
||||||
: 0,
|
FALSE)
|
||||||
FALSE)
|
: mon_nam(mtmp));
|
||||||
: mon_nam(mtmp));
|
|
||||||
}
|
}
|
||||||
xkilled(mtmp, 0);
|
xkilled(mtmp, XKILL_NOMSG);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (x == u.ux && y == u.uy) {
|
} else if (x == u.ux && y == u.uy) {
|
||||||
|
|||||||
+2
-6
@@ -531,8 +531,6 @@ STATIC_OVL void
|
|||||||
god_zaps_you(resp_god)
|
god_zaps_you(resp_god)
|
||||||
aligntyp resp_god;
|
aligntyp resp_god;
|
||||||
{
|
{
|
||||||
long oldkillcount = u.uconduct.killer;
|
|
||||||
|
|
||||||
if (u.uswallow) {
|
if (u.uswallow) {
|
||||||
pline(
|
pline(
|
||||||
"Suddenly a bolt of lightning comes down at you from the heavens!");
|
"Suddenly a bolt of lightning comes down at you from the heavens!");
|
||||||
@@ -544,8 +542,7 @@ aligntyp resp_god;
|
|||||||
* Other credit/blame applies (luck or alignment adjustments),
|
* Other credit/blame applies (luck or alignment adjustments),
|
||||||
* but not direct kill count (pacifist conduct).
|
* but not direct kill count (pacifist conduct).
|
||||||
*/
|
*/
|
||||||
xkilled(u.ustuck, 0);
|
xkilled(u.ustuck, XKILL_NOMSG | XKILL_NOCONDUCT);
|
||||||
u.uconduct.killer = oldkillcount;
|
|
||||||
} else
|
} else
|
||||||
pline("%s seems unaffected.", Monnam(u.ustuck));
|
pline("%s seems unaffected.", Monnam(u.ustuck));
|
||||||
} else {
|
} else {
|
||||||
@@ -569,8 +566,7 @@ aligntyp resp_god;
|
|||||||
mon_nam(u.ustuck));
|
mon_nam(u.ustuck));
|
||||||
if (!resists_disint(u.ustuck)) {
|
if (!resists_disint(u.ustuck)) {
|
||||||
pline("%s disintegrates into a pile of dust!", Monnam(u.ustuck));
|
pline("%s disintegrates into a pile of dust!", Monnam(u.ustuck));
|
||||||
xkilled(u.ustuck, 2); /* no corpse */
|
xkilled(u.ustuck, XKILL_NOMSG | XKILL_NOCORPSE | XKILL_NOCONDUCT);
|
||||||
u.uconduct.killer = oldkillcount;
|
|
||||||
} else
|
} else
|
||||||
pline("%s seems unaffected.", Monnam(u.ustuck));
|
pline("%s seems unaffected.", Monnam(u.ustuck));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+3
-3
@@ -1744,9 +1744,9 @@ boolean confused, byu;
|
|||||||
}
|
}
|
||||||
mtmp->mhp -= mdmg;
|
mtmp->mhp -= mdmg;
|
||||||
if (mtmp->mhp <= 0) {
|
if (mtmp->mhp <= 0) {
|
||||||
if (byu)
|
if (byu) {
|
||||||
xkilled(mtmp, 1);
|
killed(mtmp);
|
||||||
else {
|
} else {
|
||||||
pline("%s is killed.", Monnam(mtmp));
|
pline("%s is killed.", Monnam(mtmp));
|
||||||
mondied(mtmp);
|
mondied(mtmp);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -2679,7 +2679,7 @@ boolean byplayer;
|
|||||||
pline("%s turns to stone.", Monnam(mon));
|
pline("%s turns to stone.", Monnam(mon));
|
||||||
if (byplayer) {
|
if (byplayer) {
|
||||||
stoned = TRUE;
|
stoned = TRUE;
|
||||||
xkilled(mon, 0);
|
xkilled(mon, XKILL_NOMSG);
|
||||||
} else
|
} else
|
||||||
monstone(mon);
|
monstone(mon);
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-9
@@ -1152,7 +1152,7 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */
|
|||||||
if (poiskilled) {
|
if (poiskilled) {
|
||||||
pline_The("poison was deadly...");
|
pline_The("poison was deadly...");
|
||||||
if (!already_killed)
|
if (!already_killed)
|
||||||
xkilled(mon, 0);
|
xkilled(mon, XKILL_NOMSG);
|
||||||
destroyed = TRUE; /* return FALSE; */
|
destroyed = TRUE; /* return FALSE; */
|
||||||
} else if (destroyed) {
|
} else if (destroyed) {
|
||||||
if (!already_killed)
|
if (!already_killed)
|
||||||
@@ -1471,7 +1471,7 @@ register struct attack *mattk;
|
|||||||
if (pd == &mons[PM_STRAW_GOLEM] || pd == &mons[PM_PAPER_GOLEM]) {
|
if (pd == &mons[PM_STRAW_GOLEM] || pd == &mons[PM_PAPER_GOLEM]) {
|
||||||
if (!Blind)
|
if (!Blind)
|
||||||
pline("%s burns completely!", Monnam(mdef));
|
pline("%s burns completely!", Monnam(mdef));
|
||||||
xkilled(mdef, 2);
|
xkilled(mdef, XKILL_NOMSG | XKILL_NOCORPSE);
|
||||||
tmp = 0;
|
tmp = 0;
|
||||||
break;
|
break;
|
||||||
/* Don't return yet; keep hp<1 and tmp=0 for pet msg */
|
/* Don't return yet; keep hp<1 and tmp=0 for pet msg */
|
||||||
@@ -1589,7 +1589,7 @@ register struct attack *mattk;
|
|||||||
if (!Blind)
|
if (!Blind)
|
||||||
pline("Some writing vanishes from %s head!",
|
pline("Some writing vanishes from %s head!",
|
||||||
s_suffix(mon_nam(mdef)));
|
s_suffix(mon_nam(mdef)));
|
||||||
xkilled(mdef, 0);
|
xkilled(mdef, XKILL_NOMSG);
|
||||||
/* Don't return yet; keep hp<1 and tmp=0 for pet msg */
|
/* Don't return yet; keep hp<1 and tmp=0 for pet msg */
|
||||||
} else {
|
} else {
|
||||||
mdef->mcan = 1;
|
mdef->mcan = 1;
|
||||||
@@ -1601,11 +1601,12 @@ register struct attack *mattk;
|
|||||||
case AD_DRLI:
|
case AD_DRLI:
|
||||||
if (!negated && !rn2(3) && !resists_drli(mdef)) {
|
if (!negated && !rn2(3) && !resists_drli(mdef)) {
|
||||||
int xtmp = d(2, 6);
|
int xtmp = d(2, 6);
|
||||||
|
|
||||||
pline("%s suddenly seems weaker!", Monnam(mdef));
|
pline("%s suddenly seems weaker!", Monnam(mdef));
|
||||||
mdef->mhpmax -= xtmp;
|
mdef->mhpmax -= xtmp;
|
||||||
if ((mdef->mhp -= xtmp) <= 0 || !mdef->m_lev) {
|
if ((mdef->mhp -= xtmp) <= 0 || !mdef->m_lev) {
|
||||||
pline("%s dies!", Monnam(mdef));
|
pline("%s dies!", Monnam(mdef));
|
||||||
xkilled(mdef, 0);
|
xkilled(mdef, XKILL_NOMSG);
|
||||||
} else
|
} else
|
||||||
mdef->m_lev--;
|
mdef->m_lev--;
|
||||||
tmp = 0;
|
tmp = 0;
|
||||||
@@ -1614,7 +1615,7 @@ register struct attack *mattk;
|
|||||||
case AD_RUST:
|
case AD_RUST:
|
||||||
if (pd == &mons[PM_IRON_GOLEM]) {
|
if (pd == &mons[PM_IRON_GOLEM]) {
|
||||||
pline("%s falls to pieces!", Monnam(mdef));
|
pline("%s falls to pieces!", Monnam(mdef));
|
||||||
xkilled(mdef, 0);
|
xkilled(mdef, XKILL_NOMSG);
|
||||||
}
|
}
|
||||||
erode_armor(mdef, ERODE_RUST);
|
erode_armor(mdef, ERODE_RUST);
|
||||||
tmp = 0;
|
tmp = 0;
|
||||||
@@ -1626,7 +1627,7 @@ register struct attack *mattk;
|
|||||||
case AD_DCAY:
|
case AD_DCAY:
|
||||||
if (pd == &mons[PM_WOOD_GOLEM] || pd == &mons[PM_LEATHER_GOLEM]) {
|
if (pd == &mons[PM_WOOD_GOLEM] || pd == &mons[PM_LEATHER_GOLEM]) {
|
||||||
pline("%s falls to pieces!", Monnam(mdef));
|
pline("%s falls to pieces!", Monnam(mdef));
|
||||||
xkilled(mdef, 0);
|
xkilled(mdef, XKILL_NOMSG);
|
||||||
}
|
}
|
||||||
erode_armor(mdef, ERODE_ROT);
|
erode_armor(mdef, ERODE_ROT);
|
||||||
tmp = 0;
|
tmp = 0;
|
||||||
@@ -1770,11 +1771,11 @@ register struct attack *mattk;
|
|||||||
if (mdef->mtame && !cansee(mdef->mx, mdef->my)) {
|
if (mdef->mtame && !cansee(mdef->mx, mdef->my)) {
|
||||||
You_feel("embarrassed for a moment.");
|
You_feel("embarrassed for a moment.");
|
||||||
if (tmp)
|
if (tmp)
|
||||||
xkilled(mdef, 0); /* !tmp but hp<1: already killed */
|
xkilled(mdef, XKILL_NOMSG); /* !tmp but hp<1: already killed */
|
||||||
} else if (!flags.verbose) {
|
} else if (!flags.verbose) {
|
||||||
You("destroy it!");
|
You("destroy it!");
|
||||||
if (tmp)
|
if (tmp)
|
||||||
xkilled(mdef, 0);
|
xkilled(mdef, XKILL_NOMSG);
|
||||||
} else if (tmp)
|
} else if (tmp)
|
||||||
killed(mdef);
|
killed(mdef);
|
||||||
return 2;
|
return 2;
|
||||||
@@ -1933,7 +1934,7 @@ register struct attack *mattk;
|
|||||||
m_useup(mdef, otmp);
|
m_useup(mdef, otmp);
|
||||||
|
|
||||||
newuhs(FALSE);
|
newuhs(FALSE);
|
||||||
xkilled(mdef, 2);
|
xkilled(mdef, XKILL_NOMSG | XKILL_NOCORPSE);
|
||||||
if (mdef->mhp > 0) { /* monster lifesaved */
|
if (mdef->mhp > 0) { /* monster lifesaved */
|
||||||
You("hurriedly regurgitate the sizzling in your %s.",
|
You("hurriedly regurgitate the sizzling in your %s.",
|
||||||
body_part(STOMACH));
|
body_part(STOMACH));
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ struct obj *otmp;
|
|||||||
}
|
}
|
||||||
/* context.bypasses = TRUE; ## for make_corpse() */
|
/* context.bypasses = TRUE; ## for make_corpse() */
|
||||||
/* no corpse after system shock */
|
/* no corpse after system shock */
|
||||||
xkilled(mtmp, 3);
|
xkilled(mtmp, XKILL_GIVEMSG | XKILL_NOCORPSE);
|
||||||
} else if (newcham(mtmp, (struct permonst *) 0,
|
} else if (newcham(mtmp, (struct permonst *) 0,
|
||||||
polyspot, give_msg) != 0
|
polyspot, give_msg) != 0
|
||||||
/* if shapechange failed because there aren't
|
/* if shapechange failed because there aren't
|
||||||
@@ -401,14 +401,15 @@ struct obj *otmp;
|
|||||||
dmg *= 2;
|
dmg *= 2;
|
||||||
if (otyp == SPE_DRAIN_LIFE)
|
if (otyp == SPE_DRAIN_LIFE)
|
||||||
dmg = spell_damage_bonus(dmg);
|
dmg = spell_damage_bonus(dmg);
|
||||||
if (resists_drli(mtmp))
|
if (resists_drli(mtmp)) {
|
||||||
shieldeff(mtmp->mx, mtmp->my);
|
shieldeff(mtmp->mx, mtmp->my);
|
||||||
else if (!resist(mtmp, otmp->oclass, dmg, NOTELL) && mtmp->mhp > 0) {
|
} else if (!resist(mtmp, otmp->oclass, dmg, NOTELL) && mtmp->mhp > 0) {
|
||||||
mtmp->mhp -= dmg;
|
mtmp->mhp -= dmg;
|
||||||
mtmp->mhpmax -= dmg;
|
mtmp->mhpmax -= dmg;
|
||||||
if (mtmp->mhp <= 0 || mtmp->mhpmax <= 0 || mtmp->m_lev < 1)
|
/* die if already level 0, regardless of hit points */
|
||||||
xkilled(mtmp, 1);
|
if (mtmp->mhp <= 0 || mtmp->mhpmax <= 0 || mtmp->m_lev < 1) {
|
||||||
else {
|
killed(mtmp);
|
||||||
|
} else {
|
||||||
mtmp->m_lev--;
|
mtmp->m_lev--;
|
||||||
if (canseemon(mtmp))
|
if (canseemon(mtmp))
|
||||||
pline("%s suddenly seems weaker!", Monnam(mtmp));
|
pline("%s suddenly seems weaker!", Monnam(mtmp));
|
||||||
@@ -3843,7 +3844,7 @@ const char *fltxt;
|
|||||||
if (type < 0)
|
if (type < 0)
|
||||||
monkilled(mon, (char *) 0, -AD_RBRE);
|
monkilled(mon, (char *) 0, -AD_RBRE);
|
||||||
else
|
else
|
||||||
xkilled(mon, 2);
|
xkilled(mon, XKILL_NOMSG | XKILL_NOCORPSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user