Lines Matching refs:otmp

189 	struct obj *otmp;
204 for (otmp = level.objects[sx][sy]; otmp; otmp = otmp->nexthere)
205 otmp->no_charge = 0;
1426 struct obj *otmp;
1430 if ((otmp = bp_to_obj(bp)) != 0) {
1434 if (bp->useup) otmp->quan = bp->bquan;
1440 if (pass == bp->useup && otmp->quan == bp->bquan) {
1447 switch (dopayobj(shkp, bp, &otmp, pass, itemize)) {
1777 register struct obj *otmp;
1787 while ((otmp = invent) != 0) {
1788 otmp->owornmask = 0L; /* perhaps we should call setnotworn? */
1789 otmp->lamplit = 0; /* avoid "goes out" msg from freeinv */
1790 if (rn2(5)) curse(otmp); /* normal bones treatment for invent */
1791 obj_extract_self(otmp);
1792 place_object(otmp, ox, oy);
1937 register struct obj *otmp;
1940 for (otmp = obj->cobj; otmp; otmp = otmp->nobj) {
1941 if (otmp->oclass == COIN_CLASS) continue;
1944 if (saleable(shkp, otmp) &&
1945 !otmp->unpaid && otmp->oclass != BALL_CLASS &&
1946 !(otmp->oclass == FOOD_CLASS && otmp->oeaten) &&
1947 !(Is_candle(otmp) && otmp->age <
1948 20L * (long)objects[otmp->otyp].oc_cost))
1949 price += set_cost(otmp, shkp);
1950 } else if (!otmp->no_charge &&
1951 (!unpaid_only || (unpaid_only && otmp->unpaid))) {
1952 price += get_cost(otmp, shkp) * otmp->quan;
1955 if (Has_contents(otmp))
1956 price += contained_cost(otmp, shkp, price, usell, unpaid_only);
1966 register struct obj *otmp;
1970 for (otmp = obj->cobj; otmp; otmp = otmp->nobj)
1971 if (otmp->oclass == COIN_CLASS)
1972 value += otmp->quan;
1973 else if (Has_contents(otmp))
1974 value += contained_gold(otmp);
1985 register struct obj *otmp;
1988 for (otmp = obj->cobj; otmp; otmp = otmp->nobj) {
1989 if (otmp->oclass == COIN_CLASS) continue;
1991 if (!otmp->unpaid && !(sale && saleable(shkp, otmp)))
1992 otmp->no_charge = 1;
1994 if (Has_contents(otmp))
1995 dropped_container(otmp, shkp, sale);
2003 register struct obj *otmp;
2006 for (otmp = obj->cobj; otmp; otmp = otmp->nobj) {
2007 if (otmp->oclass == COIN_CLASS) continue;
2009 if (otmp->no_charge)
2010 otmp->no_charge = 0;
2012 if (Has_contents(otmp))
2013 picked_container(otmp);
2139 register struct obj *otmp;
2141 for (otmp = obj->cobj; otmp; otmp = otmp->nobj) {
2142 if (otmp->oclass == COIN_CLASS) continue;
2145 if (!otmp->no_charge)
2146 add_one_tobill(otmp, dummy);
2147 if (Has_contents(otmp))
2148 bill_box_content(otmp, ininv, dummy, shkp);
2298 splitbill(obj, otmp)
2299 register struct obj *obj, *otmp;
2301 /* otmp has been split off from obj */
2315 if(bp->bquan < otmp->quan) {
2318 if(bp->bquan == otmp->quan) {
2321 bp->bquan -= otmp->quan;
2323 if(ESHK(shkp)->billct == BILLSZ) otmp->unpaid = 0;
2327 bp->bo_id = otmp->o_id;
2328 bp->bquan = otmp->quan;
2343 register struct obj *otmp;
2347 otmp = newobj(0);
2348 *otmp = *obj;
2349 bp->bo_id = otmp->o_id = flags.ident++;
2350 otmp->where = OBJ_FREE;
2351 otmp->quan = (bp->bquan -= obj->quan);
2352 otmp->owt = 0; /* superfluous */
2353 otmp->onamelth = 0;
2354 otmp->oxlth = 0;
2355 otmp->oattached = OATTACHED_NOTHING;
2357 add_to_billobjs(otmp);
2383 register struct obj *otmp;
2388 for(otmp = obj->cobj; otmp; otmp = otmp->nobj) {
2389 if(otmp->oclass == COIN_CLASS) continue;
2391 if (Has_contents(otmp))
2392 subfrombill(otmp, shkp);
2394 sub_one_frombill(otmp, shkp);
2408 register struct obj *otmp;
2419 for(otmp = obj->cobj; otmp; otmp = otmp->nobj) {
2421 if(otmp->oclass == COIN_CLASS) continue;
2423 if (!Has_contents(otmp)) {
2425 if(otmp->unpaid)
2426 price += otmp->quan * get_cost(otmp, shkp);
2428 if(!otmp->no_charge) {
2429 if(otmp->oclass != FOOD_CLASS || !otmp->oeaten)
2430 price += otmp->quan * get_cost(otmp, shkp);
2432 otmp->no_charge = 0;
2435 price += stolen_container(otmp, shkp, price, ininv);
3070 register struct obj *otmp;
3094 otmp = mksobj((ttmp->ttyp == LANDMINE) ? LAND_MINE :
3096 otmp->quan= 1;
3097 otmp->owt = weight(otmp);
3098 (void) mpickobj(shkp, otmp);
3121 if ((otmp = level.objects[x][y]) != 0) {
3148 while ((otmp = level.objects[x][y]) != 0)
3150 if ((otmp->otyp == BOULDER) || (otmp->otyp == ROCK)) {
3151 obj_extract_self(otmp);
3152 obfree(otmp, (struct obj *)0);
3155 remove_object(otmp);
3156 place_object(otmp, x+horiz(i), y+vert(i));
3626 register struct obj *otmp;
3632 for (otmp = level.objects[x][y]; otmp; otmp = otmp->nexthere)
3633 if (otmp->oclass != COIN_CLASS)
3635 /* note: otmp might have ->no_charge set, but that's ok */
3636 return (otmp && costly_spot(x, y) && NOTANGRY(shkp)
3638 ? otmp : (struct obj *)0;
3646 register struct obj *otmp;
3656 for (otmp = first_obj; otmp; otmp = otmp->nexthere) {
3657 if (otmp->oclass == COIN_CLASS) continue;
3658 cost = (otmp->no_charge || otmp == uball || otmp == uchain) ? 0L :
3659 get_cost(otmp, (struct monst *)0);
3660 if (Has_contents(otmp))
3661 cost += contained_cost(otmp, shkp, 0L, FALSE, FALSE);
3666 otmp->quan > 1L ? " each" : "");
3668 Sprintf(buf, "%s, %s", doname(otmp), price);
3827 cost_per_charge(shkp, otmp, altusage)
3829 struct obj *otmp;
3835 tmp = get_cost(otmp, shkp);
3840 if(otmp->otyp == MAGIC_LAMP) { /* 1 */
3848 } else if(otmp->otyp == MAGIC_MARKER) { /* 70 - 100 */
3854 } else if(otmp->otyp == BAG_OF_TRICKS || /* 1 - 20 */
3855 otmp->otyp == HORN_OF_PLENTY) {
3857 } else if(otmp->otyp == CRYSTAL_BALL || /* 1 - 5 */
3858 otmp->otyp == OIL_LAMP || /* 1 - 10 */
3859 otmp->otyp == BRASS_LANTERN ||
3860 (otmp->otyp >= MAGIC_FLUTE &&
3861 otmp->otyp <= DRUM_OF_EARTHQUAKE) || /* 5 - 9 */
3862 otmp->oclass == WAND_CLASS) { /* 3 - 11 */
3863 if (otmp->spe > 1) tmp /= 4L;
3864 } else if (otmp->oclass == SPBOOK_CLASS) {
3866 } else if (otmp->otyp == CAN_OF_GREASE ||
3867 otmp->otyp == TINNING_KIT
3869 || otmp->otyp == EXPENSIVE_CAMERA
3873 } else if (otmp->otyp == POT_OIL) {
3887 check_unpaid_usage(otmp, altusage)
3888 struct obj *otmp;
3895 if (!otmp->unpaid || !*u.ushops ||
3896 (otmp->spe <= 0 && objects[otmp->otyp].oc_charged))
3900 if ((tmp = cost_per_charge(shkp, otmp, altusage)) == 0L)
3904 if (otmp->oclass == SPBOOK_CLASS) {
3908 } else if (otmp->otyp == POT_OIL) {
3924 check_unpaid(otmp)
3925 struct obj *otmp;
3927 check_unpaid_usage(otmp, FALSE); /* normal item use */