when polymorphed into an opposite sex monster, if you then become a new
human while failing to polymorph into something else, you'd be told
"you feel like a new man" for female or "a new woman" for male
+the weight of a non-cursed bag of holding was sometimes off by 1 unit
Platform- and/or Interface-Specific Fixes
* Bag status Weight of contents
* ---------- ------------------
* cursed 2x
- * blessed x/4 + 1
- * otherwise x/2 + 1
+ * blessed x/4 [rounded up: (x+3)/4]
+ * otherwise x/2 [rounded up: (x+1)/2]
*
* The macro DELTA_CWT in pickup.c also implements these
* weight equations.
- *
- * Note: The above checks are performed in the given order.
- * this means that if an object is both blessed and
- * cursed (not supposed to happen), it will be treated
- * as cursed.
*/
if (obj->otyp == BAG_OF_HOLDING)
cwt = obj->cursed ? (cwt * 2) :
- (1 + (cwt / (obj->blessed ? 4 : 2)));
+ obj->blessed ? ((cwt + 3) / 4) :
+ ((cwt + 1) / 2);
return wt + cwt;
}
*/
#define DELTA_CWT(cont,obj) \
((cont)->cursed ? (obj)->owt * 2 : \
- 1 + ((obj)->owt / ((cont)->blessed ? 4 : 2)))
+ (cont)->blessed ? ((obj)->owt + 3) / 4 : ((obj)->owt + 1) / 2)
#define GOLD_WT(n) (((n) + 50L) / 100L)
/* if you can figure this out, give yourself a hearty pat on the back... */
#define GOLD_CAPACITY(w,n) (((w) * -100L) - ((n) + 50L) - 1L)