cutting down closed doors
Most things that can be dug or chopped can only have that done by one of the two types of digging/chopping tools: pick-axe or axe. Since closed door can be broken open via either type, mention the type of implement in the final "you break through the door" message by adding "with your <uwep>."
This commit is contained in:
18
src/dig.c
18
src/dig.c
@@ -438,6 +438,7 @@ dig(void)
|
||||
}
|
||||
|
||||
if (svc.context.digging.effort > 100) {
|
||||
char digbuf[BUFSZ];
|
||||
const char *digtxt, *dmgtxt = (const char *) 0;
|
||||
struct obj *obj, *bobj;
|
||||
boolean shopedge = *in_rooms(dpx, dpy, SHOPBASE);
|
||||
@@ -504,7 +505,9 @@ dig(void)
|
||||
if (!(lev->doormask & D_TRAPPED))
|
||||
lev->doormask = D_BROKEN;
|
||||
} else if (closed_door(dpx, dpy)) {
|
||||
digtxt = "You break through the door.";
|
||||
Sprintf(digbuf, "You break through the door with your %s.",
|
||||
simpleonames(uwep));
|
||||
digtxt = digbuf;
|
||||
if (shopedge) {
|
||||
add_damage(dpx, dpy, SHOP_DOOR_COST);
|
||||
dmgtxt = "break";
|
||||
@@ -523,18 +526,9 @@ dig(void)
|
||||
pay_for_damage(dmgtxt, FALSE);
|
||||
|
||||
if (Is_earthlevel(&u.uz) && !rn2(3)) {
|
||||
struct monst *mtmp;
|
||||
int mndx = rn2(2) ? PM_EARTH_ELEMENTAL : PM_XORN;
|
||||
|
||||
switch (rn2(2)) {
|
||||
case 0:
|
||||
mtmp = makemon(&mons[PM_EARTH_ELEMENTAL], dpx, dpy,
|
||||
MM_NOMSG);
|
||||
break;
|
||||
default:
|
||||
mtmp = makemon(&mons[PM_XORN], dpx, dpy, MM_NOMSG);
|
||||
break;
|
||||
}
|
||||
if (mtmp)
|
||||
if (makemon(&mons[mndx], dpx, dpy, MM_NOMSG))
|
||||
pline_The("debris from your digging comes to life!");
|
||||
}
|
||||
if (IS_DOOR(lev->typ) && (lev->doormask & D_TRAPPED)) {
|
||||
|
||||
Reference in New Issue
Block a user