fix scatter feedback
Reported directly to devteam (for 3.4.3 but still present in 3.6.0): an unseen landmine explosion which caused scatter() to break a boulder or statue would give feedback as if the hero could see the boulder or statue being destroyed. Also, a couple of landmine explosion messages didn't take deafness into account.
This commit is contained in:
@@ -191,6 +191,7 @@ some instances of stun or confusion timers were being overridden rather than
|
|||||||
female gnome who gains level can grow up into male-only gnome lord; give an
|
female gnome who gains level can grow up into male-only gnome lord; give an
|
||||||
an alternate message instead of prohibiting the promotion
|
an alternate message instead of prohibiting the promotion
|
||||||
kicked weapon which successfully hits monster vanishes from play
|
kicked weapon which successfully hits monster vanishes from play
|
||||||
|
unseen landmine explosion could result in "The <monst-type> statue crumbles."
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
+10
-4
@@ -576,7 +576,10 @@ struct obj *obj; /* only scatter this obj */
|
|||||||
&& ((otmp->otyp == BOULDER) || (otmp->otyp == STATUE))
|
&& ((otmp->otyp == BOULDER) || (otmp->otyp == STATUE))
|
||||||
&& rn2(10)) {
|
&& rn2(10)) {
|
||||||
if (otmp->otyp == BOULDER) {
|
if (otmp->otyp == BOULDER) {
|
||||||
pline("%s apart.", Tobjnam(otmp, "break"));
|
if (cansee(sx, sy))
|
||||||
|
pline("%s apart.", Tobjnam(otmp, "break"));
|
||||||
|
else
|
||||||
|
You_hear("stone breaking.");
|
||||||
fracture_rock(otmp);
|
fracture_rock(otmp);
|
||||||
place_object(otmp, sx, sy);
|
place_object(otmp, sx, sy);
|
||||||
if ((otmp = sobj_at(BOULDER, sx, sy)) != 0) {
|
if ((otmp = sobj_at(BOULDER, sx, sy)) != 0) {
|
||||||
@@ -589,7 +592,10 @@ struct obj *obj; /* only scatter this obj */
|
|||||||
|
|
||||||
if ((trap = t_at(sx, sy)) && trap->ttyp == STATUE_TRAP)
|
if ((trap = t_at(sx, sy)) && trap->ttyp == STATUE_TRAP)
|
||||||
deltrap(trap);
|
deltrap(trap);
|
||||||
pline("%s.", Tobjnam(otmp, "crumble"));
|
if (cansee(sx, sy))
|
||||||
|
pline("%s.", Tobjnam(otmp, "crumble"));
|
||||||
|
else
|
||||||
|
You_hear("stone crumbling.");
|
||||||
(void) break_statue(otmp);
|
(void) break_statue(otmp);
|
||||||
place_object(otmp, sx, sy); /* put fragments on floor */
|
place_object(otmp, sx, sy); /* put fragments on floor */
|
||||||
}
|
}
|
||||||
@@ -604,8 +610,8 @@ struct obj *obj; /* only scatter this obj */
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!used_up) {
|
if (!used_up) {
|
||||||
stmp =
|
stmp = (struct scatter_chain *)
|
||||||
(struct scatter_chain *) alloc(sizeof(struct scatter_chain));
|
alloc(sizeof (struct scatter_chain));
|
||||||
stmp->next = (struct scatter_chain *) 0;
|
stmp->next = (struct scatter_chain *) 0;
|
||||||
stmp->obj = otmp;
|
stmp->obj = otmp;
|
||||||
stmp->ox = sx;
|
stmp->ox = sx;
|
||||||
|
|||||||
+5
-4
@@ -2555,18 +2555,19 @@ register struct monst *mtmp;
|
|||||||
}
|
}
|
||||||
} else if (in_sight) {
|
} else if (in_sight) {
|
||||||
newsym(mtmp->mx, mtmp->my);
|
newsym(mtmp->mx, mtmp->my);
|
||||||
pline("KAABLAMM!!! %s triggers %s land mine!", Monnam(mtmp),
|
pline("%s%s triggers %s land mine!",
|
||||||
|
!Deaf ? "KAABLAMM!!! " : "", Monnam(mtmp),
|
||||||
a_your[trap->madeby_u]);
|
a_your[trap->madeby_u]);
|
||||||
}
|
}
|
||||||
if (!in_sight)
|
if (!in_sight && !Deaf)
|
||||||
pline("Kaablamm! You hear an explosion in the distance!");
|
pline("Kaablamm! You hear an explosion in the distance!");
|
||||||
blow_up_landmine(trap);
|
blow_up_landmine(trap);
|
||||||
/* explosion might have destroyed a drawbridge; don't
|
/* explosion might have destroyed a drawbridge; don't
|
||||||
dish out more damage if monster is already dead */
|
dish out more damage if monster is already dead */
|
||||||
if (mtmp->mhp <= 0
|
if (mtmp->mhp <= 0
|
||||||
|| thitm(0, mtmp, (struct obj *) 0, rnd(16), FALSE))
|
|| thitm(0, mtmp, (struct obj *) 0, rnd(16), FALSE)) {
|
||||||
trapkilled = TRUE;
|
trapkilled = TRUE;
|
||||||
else {
|
} else {
|
||||||
/* monsters recursively fall into new pit */
|
/* monsters recursively fall into new pit */
|
||||||
if (mintrap(mtmp) == 2)
|
if (mintrap(mtmp) == 2)
|
||||||
trapkilled = TRUE;
|
trapkilled = TRUE;
|
||||||
|
|||||||
Reference in New Issue
Block a user