Lines Matching refs:otmp

64 off_msg(otmp)
65 register struct obj *otmp;
68 You("were wearing %s.", doname(otmp));
73 on_msg(otmp)
74 register struct obj *otmp;
80 if (otmp->otyp == TOWEL)
83 obj_is_pname(otmp) ? the(xname(otmp)) : an(xname(otmp)),
908 Blindf_on(otmp)
909 register struct obj *otmp;
913 if (otmp == uwep)
915 if (otmp == uswapwep)
917 if (otmp == uquiver)
919 setworn(otmp, W_TOOL);
920 on_msg(otmp);
941 Blindf_off(otmp)
942 register struct obj *otmp;
947 setworn((struct obj *)0, otmp->owornmask);
948 off_msg(otmp);
954 if (otmp->otyp != LENSES)
992 donning(otmp) /* also checks for doffing */
993 register struct obj *otmp;
999 if (otmp == uarm)
1003 else if (otmp == uarmu)
1007 else if (otmp == uarmc)
1010 else if (otmp == uarmf)
1013 else if (otmp == uarmh)
1016 else if (otmp == uarmg)
1019 else if (otmp == uarms)
1049 register struct obj *otmp = (struct obj *)0;
1052 #define MOREARM(x) if (x) { armorpieces++; otmp = x; }
1059 otmp = uarmc;
1062 otmp = uarm;
1066 otmp = uarmu;
1082 otmp = getobj(clothes, "take off");
1083 if (otmp == 0) return(0);
1084 if (!(otmp->owornmask & W_ARMOR)) {
1090 if (otmp == uskin || ((otmp == uarm) && uarmc)
1092 || ((otmp == uarmu) && (uarmc || uarm))
1100 (void) select_off(otmp);
1104 (void) armoroff(otmp);
1112 register struct obj *otmp = 0;
1115 #define MOREACC(x) if (x) { Accessories++; otmp = x; }
1131 if (Accessories != 1) otmp = getobj(accessories, "remove");
1132 if(!otmp) return(0);
1133 if(!(otmp->owornmask & (W_RING | W_AMUL | W_TOOL))) {
1139 (void) select_off(otmp);
1143 if (otmp == uright || otmp == uleft) {
1150 off_msg(otmp);
1151 Ring_off(otmp);
1152 } else if (otmp == uamul) {
1154 off_msg(otmp);
1155 } else if (otmp == ublindf) {
1156 Blindf_off(otmp); /* does its own off_msg */
1165 cursed(otmp)
1166 register struct obj *otmp;
1169 if((otmp == uwep) ? welded(otmp) : (int)otmp->cursed) {
1171 (is_boots(otmp) || is_gloves(otmp) || otmp->quan > 1L)
1173 otmp->bknown = TRUE;
1180 armoroff(otmp)
1181 register struct obj *otmp;
1183 register int delay = -objects[otmp->otyp].oc_delay;
1185 if(cursed(otmp)) return(0);
1188 if (is_helmet(otmp)) {
1192 else if (is_gloves(otmp)) {
1196 else if (is_boots(otmp)) {
1220 if(is_cloak(otmp))
1222 else if(is_shield(otmp))
1224 else setworn((struct obj *)0, otmp->owornmask & W_ARMOR);
1225 off_msg(otmp);
1248 * inputs: otmp (the piece of armor)
1250 * output: mask (otmp's armor type)
1253 canwearobj(otmp,mask,noisy)
1254 struct obj *otmp;
1261 which = is_cloak(otmp) ? c_cloak :
1263 is_shirt(otmp) ? c_shirt :
1265 is_suit(otmp) ? c_suit : 0;
1269 (racial_exception(&youmonst, otmp) < 1)) {
1272 } else if (otmp->owornmask & W_ARMOR) {
1278 (is_suit(otmp)
1280 || is_shirt(otmp)
1289 if (is_helmet(otmp)) {
1293 } else if (Upolyd && has_horns(youmonst.data) && !is_flimsy(otmp)) {
1301 } else if (is_shield(otmp)) {
1317 } else if (is_boots(otmp)) {
1343 } else if (is_gloves(otmp)) {
1354 } else if (is_shirt(otmp)) {
1366 } else if (is_cloak(otmp)) {
1372 } else if (is_suit(otmp)) {
1385 if (noisy) silly_thing("wear", otmp);
1390 if (welded(otmp)) {
1392 if (noisy) weldmsg(otmp);
1403 struct obj *otmp;
1414 otmp = getobj(clothes, "wear");
1415 if(!otmp) return(0);
1417 if (!canwearobj(otmp,&mask,TRUE)) return(0);
1419 if (otmp->oartifact && !touch_artifact(otmp, &youmonst))
1422 if (otmp->otyp == HELM_OF_OPPOSITE_ALIGNMENT &&
1429 makeknown(otmp->otyp);
1434 otmp->known = TRUE;
1435 if(otmp == uwep)
1437 if (otmp == uswapwep)
1439 if (otmp == uquiver)
1441 setworn(otmp, mask);
1442 delay = -objects[otmp->otyp].oc_delay;
1445 if(is_boots(otmp)) afternmv = Boots_on;
1446 if(is_helmet(otmp)) afternmv = Helmet_on;
1447 if(is_gloves(otmp)) afternmv = Gloves_on;
1448 if(otmp == uarm) afternmv = Armor_on;
1451 if(is_cloak(otmp)) (void) Cloak_on();
1452 if (is_shield(otmp)) (void) Shield_on();
1454 if (is_shirt(otmp)) (void) Shirt_on();
1456 on_msg(otmp);
1465 register struct obj *otmp;
1475 otmp = getobj(accessories, "put on");
1476 if(!otmp) return(0);
1477 if(otmp->owornmask & (W_RING | W_AMUL | W_TOOL)) {
1481 if(welded(otmp)) {
1482 weldmsg(otmp);
1485 if(otmp == uwep)
1487 if(otmp == uswapwep)
1489 if(otmp == uquiver)
1491 if(otmp->oclass == RING_CLASS || otmp->otyp == MEAT_RING) {
1539 if (otmp->oartifact && !touch_artifact(otmp, &youmonst))
1541 setworn(otmp, mask);
1542 Ring_on(otmp);
1543 } else if (otmp->oclass == AMULET_CLASS) {
1548 if (otmp->oartifact && !touch_artifact(otmp, &youmonst))
1550 setworn(otmp, W_AMUL);
1551 if (otmp->otyp == AMULET_OF_CHANGE) {
1563 if (otmp->otyp == LENSES)
1568 if (otmp->otyp == BLINDFOLD)
1576 if (otmp->otyp != BLINDFOLD && otmp->otyp != TOWEL && otmp->otyp != LENSES) {
1580 if (otmp->oartifact && !touch_artifact(otmp, &youmonst))
1582 Blindf_on(otmp);
1585 if (is_worn(otmp))
1586 prinv((char *)0, otmp, 0L);
1625 register struct obj *otmp;
1641 otmp = uleft;
1643 dropx(otmp);
1646 otmp = uright;
1648 dropx(otmp);
1652 otmp = uswapwep;
1653 if (u.twoweap && otmp) {
1654 otherwep = is_sword(otmp) ? c_sword :
1655 makesingular(oclass_names[(int)otmp->oclass]);
1662 if (otmp->otyp != LOADSTONE || !otmp->cursed)
1663 dropx(otmp);
1665 otmp = uwep;
1666 if (otmp && !welded(otmp)) {
1670 thiswep = is_sword(otmp) ? c_sword :
1671 makesingular(oclass_names[(int)otmp->oclass]);
1680 if (otmp->otyp != LOADSTONE || !otmp->cursed)
1681 dropx(otmp);
1689 register struct obj *otmph, *otmp;
1699 otmp = (victim == &youmonst) ? uarmh : which_armor(victim, W_ARMH);
1700 if(otmp && (!otmph || !rn2(4))) otmph = otmp;
1701 otmp = (victim == &youmonst) ? uarmg : which_armor(victim, W_ARMG);
1702 if(otmp && (!otmph || !rn2(4))) otmph = otmp;
1703 otmp = (victim == &youmonst) ? uarmf : which_armor(victim, W_ARMF);
1704 if(otmp && (!otmph || !rn2(4))) otmph = otmp;
1705 otmp = (victim == &youmonst) ? uarms : which_armor(victim, W_ARMS);
1706 if(otmp && (!otmph || !rn2(4))) otmph = otmp;
1760 select_off(otmp)
1761 register struct obj *otmp;
1766 if (!otmp) return 0;
1770 if (otmp == uright || otmp == uleft) {
1776 if (welded(uwep) && (otmp == uright || bimanual(uwep))) {
1790 if (otmp == uarmg) {
1803 if (otmp == uarmf) {
1815 if (otmp == uarm
1817 || otmp == uarmu
1825 } else if (otmp == uarmu && uarm && uarm->cursed) {
1836 You("cannot %s to take off %s.", buf, the(xname(otmp)));
1842 if (otmp == uquiver || (otmp == uswapwep && !u.twoweap)) {
1846 if (cursed(otmp)) return 0;
1849 if(otmp == uarm) takeoff_mask |= WORN_ARMOR;
1850 else if(otmp == uarmc) takeoff_mask |= WORN_CLOAK;
1851 else if(otmp == uarmf) takeoff_mask |= WORN_BOOTS;
1852 else if(otmp == uarmg) takeoff_mask |= WORN_GLOVES;
1853 else if(otmp == uarmh) takeoff_mask |= WORN_HELMET;
1854 else if(otmp == uarms) takeoff_mask |= WORN_SHIELD;
1856 else if(otmp == uarmu) takeoff_mask |= WORN_SHIRT;
1858 else if(otmp == uleft) takeoff_mask |= LEFT_RING;
1859 else if(otmp == uright) takeoff_mask |= RIGHT_RING;
1860 else if(otmp == uamul) takeoff_mask |= WORN_AMUL;
1861 else if(otmp == ublindf) takeoff_mask |= WORN_BLINDF;
1862 else if(otmp == uwep) takeoff_mask |= W_WEP;
1863 else if(otmp == uswapwep) takeoff_mask |= W_SWAPWEP;
1864 else if(otmp == uquiver) takeoff_mask |= W_QUIVER;
1866 else impossible("select_off: %s???", doname(otmp));
1874 register struct obj *otmp = (struct obj *)0;
1890 otmp = uarm;
1891 if(!cursed(otmp)) (void) Armor_off();
1893 otmp = uarmc;
1894 if(!cursed(otmp)) (void) Cloak_off();
1896 otmp = uarmf;
1897 if(!cursed(otmp)) (void) Boots_off();
1899 otmp = uarmg;
1900 if(!cursed(otmp)) (void) Gloves_off();
1902 otmp = uarmh;
1903 if(!cursed(otmp)) (void) Helmet_off();
1905 otmp = uarms;
1906 if(!cursed(otmp)) (void) Shield_off();
1909 otmp = uarmu;
1910 if (!cursed(otmp)) (void) Shirt_off();
1913 otmp = uamul;
1914 if(!cursed(otmp)) Amulet_off();
1916 otmp = uleft;
1917 if(!cursed(otmp)) Ring_off(uleft);
1919 otmp = uright;
1920 if(!cursed(otmp)) Ring_off(uright);
1925 return(otmp);
1935 register struct obj *otmp;
1942 if ((otmp = do_takeoff())) off_msg(otmp);
1954 otmp = (struct obj *) 0;
1967 otmp = uarm;
1974 otmp = uarmc;
1976 otmp = uarmf;
1978 otmp = uarmg;
1980 otmp = uarmh;
1982 otmp = uarms;
1985 otmp = uarmu;
2003 if (otmp) todelay += objects[otmp->otyp].oc_delay;
2107 register struct obj *otmp;
2108 #define DESTROY_ARM(o) ((otmp = (o)) != 0 && \
2109 (!atmp || atmp == otmp) && \
2110 (!obj_resists(otmp, 0, 90)))
2113 if (donning(otmp)) cancel_don();
2117 useup(otmp);
2119 if (donning(otmp)) cancel_don();
2123 useup(otmp);
2126 if (donning(otmp)) cancel_don();
2129 useup(otmp);
2132 if (donning(otmp)) cancel_don();
2135 useup(otmp);
2137 if (donning(otmp)) cancel_don();
2140 useup(otmp);
2143 if (donning(otmp)) cancel_don();
2146 useup(otmp);
2148 if (donning(otmp)) cancel_don();
2151 useup(otmp);
2162 adj_abon(otmp, delta)
2163 register struct obj *otmp;
2166 if (uarmg && uarmg == otmp && otmp->otyp == GAUNTLETS_OF_DEXTERITY) {
2173 if (uarmh && uarmh == otmp && otmp->otyp == HELM_OF_BRILLIANCE) {