wielded/quivered chained ball should be unwielded when thrown
polymorphing into a form that cannot twoweapon should immediately disable
twoweapon mode
+taking partial count of merged objects from a container while your pack
+ was full split the object and did not re-merge
Platform- and/or Interface-Specific Fixes
register const char *olets, *word; /* olets is an Obj Class char array */
register int FDECL((*fn),(OBJ_P)), FDECL((*ckfn),(OBJ_P));
{
- register struct obj *otmp, *otmp2;
+ struct obj *otmp, *otmp2, *otmpo;
register char sym, ilet;
register int cnt = 0, dud = 0, tmp;
boolean takeoff, nodot, ident, ininv;
}
else sym = 'y';
+ otmpo = otmp;
if (sym == '#') {
/* Number was entered; split the object unless it corresponds
to 'none' or 'all'. 2 special cases: cursed loadstones and
allflag = 1;
case 'y':
tmp = (*fn)(otmp);
- if(tmp < 0) goto ret;
+ if(tmp < 0) {
+ if (otmp != otmpo) {
+ /* split occurred, merge again */
+ (void) merged(&otmpo, &otmp);
+ }
+ goto ret;
+ }
cnt += tmp;
if(--mx == 0) goto ret;
case 'n':
/* special split case also handled by askchain() */
}
res = put_in ? in_container(otmp) : out_container(otmp);
- if (res < 0)
+ if (res < 0) {
+ if (otmp != pick_list[i].item.a_obj) {
+ /* split occurred, merge again */
+ (void) merged(&pick_list[i].item.a_obj, &otmp);
+ }
break;
+ }
}
free((genericptr_t)pick_list);
}