Lines Matching refs:otmp

68 #define greatest_erosion(otmp) (int)((otmp)->oeroded > (otmp)->oeroded2 ? (otmp)->oeroded : (otmp)->oeroded2)
113 #define ONAME(otmp) (((char *)(otmp)->oextra) + (otmp)->oxlth)
117 * #define is_sword(otmp) (otmp->oclass == WEAPON_CLASS && \
118 * objects[otmp->otyp].oc_wepcat == WEP_SWORD)
119 * #define is_blade(otmp) (otmp->oclass == WEAPON_CLASS && \
120 * (objects[otmp->otyp].oc_wepcat == WEP_BLADE || \
121 * objects[otmp->otyp].oc_wepcat == WEP_SWORD))
127 #define is_blade(otmp) (otmp->oclass == WEAPON_CLASS && \
128 objects[otmp->otyp].oc_skill >= P_DAGGER && \
129 objects[otmp->otyp].oc_skill <= P_SABER)
130 #define is_axe(otmp) ((otmp->oclass == WEAPON_CLASS || \
131 otmp->oclass == TOOL_CLASS) && \
132 objects[otmp->otyp].oc_skill == P_AXE)
133 #define is_pick(otmp) ((otmp->oclass == WEAPON_CLASS || \
134 otmp->oclass == TOOL_CLASS) && \
135 objects[otmp->otyp].oc_skill == P_PICK_AXE)
136 #define is_sword(otmp) (otmp->oclass == WEAPON_CLASS && \
137 objects[otmp->otyp].oc_skill >= P_SHORT_SWORD && \
138 objects[otmp->otyp].oc_skill <= P_SABER)
139 #define is_pole(otmp) ((otmp->oclass == WEAPON_CLASS || \
140 otmp->oclass == TOOL_CLASS) && \
141 (objects[otmp->otyp].oc_skill == P_POLEARMS || \
142 objects[otmp->otyp].oc_skill == P_LANCE))
143 #define is_spear(otmp) (otmp->oclass == WEAPON_CLASS && \
144 objects[otmp->otyp].oc_skill >= P_SPEAR && \
145 objects[otmp->otyp].oc_skill <= P_JAVELIN)
146 #define is_launcher(otmp) (otmp->oclass == WEAPON_CLASS && \
147 objects[otmp->otyp].oc_skill >= P_BOW && \
148 objects[otmp->otyp].oc_skill <= P_CROSSBOW)
149 #define is_ammo(otmp) ((otmp->oclass == WEAPON_CLASS || \
150 otmp->oclass == GEM_CLASS) && \
151 objects[otmp->otyp].oc_skill >= -P_CROSSBOW && \
152 objects[otmp->otyp].oc_skill <= -P_BOW)
153 #define ammo_and_launcher(otmp,ltmp) \
154 (is_ammo(otmp) && (ltmp) && \
155 objects[(otmp)->otyp].oc_skill == -objects[(ltmp)->otyp].oc_skill)
156 #define is_missile(otmp) ((otmp->oclass == WEAPON_CLASS || \
157 otmp->oclass == TOOL_CLASS) && \
158 objects[otmp->otyp].oc_skill >= -P_BOOMERANG && \
159 objects[otmp->otyp].oc_skill <= -P_DART)
162 #define bimanual(otmp) ((otmp->oclass == WEAPON_CLASS || \
163 otmp->oclass == TOOL_CLASS) && \
164 objects[otmp->otyp].oc_bimanual)
165 #define is_multigen(otmp) (otmp->oclass == WEAPON_CLASS && \
166 objects[otmp->otyp].oc_skill >= -P_SHURIKEN && \
167 objects[otmp->otyp].oc_skill <= -P_BOW)
168 #define is_poisonable(otmp) (otmp->oclass == WEAPON_CLASS && \
169 objects[otmp->otyp].oc_skill >= -P_SHURIKEN && \
170 objects[otmp->otyp].oc_skill <= -P_BOW)
174 #define is_shield(otmp) (otmp->oclass == ARMOR_CLASS && \
175 objects[otmp->otyp].oc_armcat == ARM_SHIELD)
176 #define is_helmet(otmp) (otmp->oclass == ARMOR_CLASS && \
177 objects[otmp->otyp].oc_armcat == ARM_HELM)
178 #define is_boots(otmp) (otmp->oclass == ARMOR_CLASS && \
179 objects[otmp->otyp].oc_armcat == ARM_BOOTS)
180 #define is_gloves(otmp) (otmp->oclass == ARMOR_CLASS && \
181 objects[otmp->otyp].oc_armcat == ARM_GLOVES)
182 #define is_cloak(otmp) (otmp->oclass == ARMOR_CLASS && \
183 objects[otmp->otyp].oc_armcat == ARM_CLOAK)
184 #define is_shirt(otmp) (otmp->oclass == ARMOR_CLASS && \
185 objects[otmp->otyp].oc_armcat == ARM_SHIRT)
186 #define is_suit(otmp) (otmp->oclass == ARMOR_CLASS && \
187 objects[otmp->otyp].oc_armcat == ARM_SUIT)
188 #define is_elven_armor(otmp) ((otmp)->otyp == ELVEN_LEATHER_HELM\
189 || (otmp)->otyp == ELVEN_MITHRIL_COAT\
190 || (otmp)->otyp == ELVEN_CLOAK\
191 || (otmp)->otyp == ELVEN_SHIELD\
192 || (otmp)->otyp == ELVEN_BOOTS)
193 #define is_orcish_armor(otmp) ((otmp)->otyp == ORCISH_HELM\
194 || (otmp)->otyp == ORCISH_CHAIN_MAIL\
195 || (otmp)->otyp == ORCISH_RING_MAIL\
196 || (otmp)->otyp == ORCISH_CLOAK\
197 || (otmp)->otyp == URUK_HAI_SHIELD\
198 || (otmp)->otyp == ORCISH_SHIELD)
199 #define is_dwarvish_armor(otmp) ((otmp)->otyp == DWARVISH_IRON_HELM\
200 || (otmp)->otyp == DWARVISH_MITHRIL_COAT\
201 || (otmp)->otyp == DWARVISH_CLOAK\
202 || (otmp)->otyp == DWARVISH_ROUNDSHIELD)
203 #define is_gnomish_armor(otmp) (FALSE)
221 #define Is_box(otmp) (otmp->otyp == LARGE_BOX || otmp->otyp == CHEST)
222 #define Is_mbag(otmp) (otmp->otyp == BAG_OF_HOLDING || \
223 otmp->otyp == BAG_OF_TRICKS)
238 #define is_elven_weapon(otmp) ((otmp)->otyp == ELVEN_ARROW\
239 || (otmp)->otyp == ELVEN_SPEAR\
240 || (otmp)->otyp == ELVEN_DAGGER\
241 || (otmp)->otyp == ELVEN_SHORT_SWORD\
242 || (otmp)->otyp == ELVEN_BROADSWORD\
243 || (otmp)->otyp == ELVEN_BOW)
244 #define is_elven_obj(otmp) (is_elven_armor(otmp) || is_elven_weapon(otmp))
247 #define is_orcish_obj(otmp) (is_orcish_armor(otmp)\
248 || (otmp)->otyp == ORCISH_ARROW\
249 || (otmp)->otyp == ORCISH_SPEAR\
250 || (otmp)->otyp == ORCISH_DAGGER\
251 || (otmp)->otyp == ORCISH_SHORT_SWORD\
252 || (otmp)->otyp == ORCISH_BOW)
255 #define is_dwarvish_obj(otmp) (is_dwarvish_armor(otmp)\
256 || (otmp)->otyp == DWARVISH_SPEAR\
257 || (otmp)->otyp == DWARVISH_SHORT_SWORD\
258 || (otmp)->otyp == DWARVISH_MATTOCK)
261 #define is_gnomish_obj(otmp) (is_gnomish_armor(otmp))
264 #define Is_candle(otmp) (otmp->otyp == TALLOW_CANDLE || \
265 otmp->otyp == WAX_CANDLE)
270 #define age_is_relative(otmp) ((otmp)->otyp == BRASS_LANTERN\
271 || (otmp)->otyp == OIL_LAMP\
272 || (otmp)->otyp == CANDELABRUM_OF_INVOCATION\
273 || (otmp)->otyp == TALLOW_CANDLE\
274 || (otmp)->otyp == WAX_CANDLE\
275 || (otmp)->otyp == POT_OIL)
277 #define ignitable(otmp) ((otmp)->otyp == BRASS_LANTERN\
278 || (otmp)->otyp == OIL_LAMP\
279 || (otmp)->otyp == CANDELABRUM_OF_INVOCATION\
280 || (otmp)->otyp == TALLOW_CANDLE\
281 || (otmp)->otyp == WAX_CANDLE\
282 || (otmp)->otyp == POT_OIL)
292 #define is_flimsy(otmp) (objects[(otmp)->otyp].oc_material <= LEATHER || \
293 (otmp)->otyp == RUBBER_HOSE)
295 #define is_flimsy(otmp) (objects[(otmp)->otyp].oc_material <= LEATHER)