Merge branch 'master' of https://rodney.nethack.org:20040/git/NHsource
This commit is contained in:
+2
-1
@@ -2891,6 +2891,7 @@ do_break_wand(obj)
|
|||||||
boolean fillmsg = FALSE;
|
boolean fillmsg = FALSE;
|
||||||
int expltype = EXPL_MAGICAL;
|
int expltype = EXPL_MAGICAL;
|
||||||
char confirm[QBUFSZ], buf[BUFSZ];
|
char confirm[QBUFSZ], buf[BUFSZ];
|
||||||
|
boolean is_fragile = (!strcmp(OBJ_DESCR(objects[obj->otyp]), "balsa"));
|
||||||
|
|
||||||
if (yn(safe_qbuf(confirm, "Are you really sure you want to break ", "?",
|
if (yn(safe_qbuf(confirm, "Are you really sure you want to break ", "?",
|
||||||
obj, yname, ysimple_name, "the wand")) == 'n')
|
obj, yname, ysimple_name, "the wand")) == 'n')
|
||||||
@@ -2899,7 +2900,7 @@ do_break_wand(obj)
|
|||||||
if (nohands(youmonst.data)) {
|
if (nohands(youmonst.data)) {
|
||||||
You_cant("break %s without hands!", yname(obj));
|
You_cant("break %s without hands!", yname(obj));
|
||||||
return 0;
|
return 0;
|
||||||
} else if (ACURR(A_STR) < 10) {
|
} else if (ACURR(A_STR) < (is_fragile ? 5 : 10)) {
|
||||||
You("don't have the strength to break %s!", yname(obj));
|
You("don't have the strength to break %s!", yname(obj));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-5
@@ -1498,6 +1498,7 @@ doloot() /* loot a container on the floor or loot saddle from mon. */
|
|||||||
char qbuf[BUFSZ];
|
char qbuf[BUFSZ];
|
||||||
int prev_inquiry = 0;
|
int prev_inquiry = 0;
|
||||||
boolean prev_loot = FALSE;
|
boolean prev_loot = FALSE;
|
||||||
|
int num_conts;
|
||||||
|
|
||||||
if (check_capacity((char *)0)) {
|
if (check_capacity((char *)0)) {
|
||||||
/* "Can't do that while carrying so much stuff." */
|
/* "Can't do that while carrying so much stuff." */
|
||||||
@@ -1518,15 +1519,11 @@ doloot() /* loot a container on the floor or loot saddle from mon. */
|
|||||||
|
|
||||||
lootcont:
|
lootcont:
|
||||||
|
|
||||||
if (container_at(cc.x, cc.y, FALSE)) {
|
if ((num_conts = container_at(cc.x, cc.y, TRUE)) > 0) {
|
||||||
boolean anyfound = FALSE;
|
boolean anyfound = FALSE;
|
||||||
int num_conts = 0;
|
|
||||||
|
|
||||||
if (!able_to_loot(cc.x, cc.y, TRUE)) return 0;
|
if (!able_to_loot(cc.x, cc.y, TRUE)) return 0;
|
||||||
|
|
||||||
for (cobj = level.objects[cc.x][cc.y]; cobj; cobj = cobj->nexthere)
|
|
||||||
if (Is_container(cobj)) num_conts++;
|
|
||||||
|
|
||||||
if (num_conts > 1) {
|
if (num_conts > 1) {
|
||||||
/* use a menu to loot many containers */
|
/* use a menu to loot many containers */
|
||||||
int n, i;
|
int n, i;
|
||||||
|
|||||||
Reference in New Issue
Block a user