/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* hack.mkobj.c - version 1.0.3 */
char mkobjstr
[] = "))[[!!!!????%%%%/=**))[[!!!!????%%%%/=**(%";
struct obj
*mkobj(), *mksobj();
register struct obj
*otmp
= mkobj(let
);
register struct obj
*otmp
= mksobj(otyp
);
let
= mkobjstr
[rn2(sizeof(mkobjstr
) - 1)];
CORPSE
+ ((let
> 'Z') ? (let
-'a'+'Z'-'@'+1) : (let
-'@'))
register struct obj
*otmp
;
char let
= objects
[otyp
].oc_olet
;
otmp
->o_id
= flags
.ident
++;
otmp
->dknown
= index("/=!?*", let
) ? 0 : 1;
otmp
->quan
= (otmp
->otyp
<= ROCK
) ? rn1(6,6) : 1;
if(!rn2(11)) otmp
->spe
= rnd(3);
if(otmp
->otyp
>= CORPSE
) break;
#ifdef NOT_YET_IMPLEMENTED
/* if tins are to be identified, need to adapt doname() etc */
#endif NOT_YET_IMPLEMENTED
/* fall into next case */
otmp
->quan
= rn2(6) ? 1 : 2;
if(!rn2(8)) otmp
->cursed
= 1;
if(!rn2(10)) otmp
->spe
= rnd(3);
if(otmp
->otyp
== WAN_WISHING
) otmp
->spe
= 3; else
(objects
[otmp
->otyp
].bits
& NODIR
) ? 11 : 4);
if(objects
[otmp
->otyp
].bits
& SPEC
) {
} else otmp
->spe
= rnd(2);
} else if(otmp
->otyp
== RIN_TELEPORTATION
||
otmp
->otyp
== RIN_AGGRAVATE_MONSTER
||
otmp
->otyp
== RIN_HUNGER
|| !rn2(9))
panic("impossible mkobj");
otmp
->owt
= weight(otmp
);
return(('@' <= c
&& c
<= 'Z') || ('a' <= c
&& c
<= 'z'));
register struct obj
*obj
;
register int wt
= objects
[obj
->otyp
].oc_weight
;
return(wt
? wt
*obj
->quan
: (obj
->quan
+ 1)/2);
register struct gold
*gold
;
register long amount
= (num
? num
: 1 + (rnd(dlevel
+2) * rnd(30)));
/* do sth with display? */