Lines Matching refs:otmp

117    If no alignment is given, then 'otmp' is converted
123 mk_artifact(otmp, alignment)
124 struct obj *otmp; /* existing object; ignored if alignment specified */
130 short o_typ = (by_align || !otmp) ? 0 : otmp->otyp;
131 boolean unique = !by_align && otmp && objects[o_typ].oc_unique;
153 make_artif: if (by_align) otmp = mksobj((int)a->otyp, TRUE, FALSE);
154 otmp = oname(otmp, a->name);
155 otmp->oartifact = m;
159 if (by_align) otmp = 0; /* (there was no original object) */
161 return otmp;
209 artifact_exists(otmp, name, mod)
210 register struct obj *otmp;
216 if (otmp && *name)
218 if (a->otyp == otmp->otyp && !strcmp(a->name, name)) {
220 otmp->oartifact = (char)(mod ? m : 0);
221 otmp->age = 0;
222 if(otmp->otyp == RIN_INCREASE_DAMAGE)
223 otmp->spe = 0;
245 spec_ability(otmp, abil)
246 struct obj *otmp;
249 const struct artifact *arti = get_artifact(otmp);
286 restrict_name(otmp, name) /* returns 1 if name is restricted for otmp->otyp */
287 register struct obj *otmp;
301 if (a->otyp != otmp->otyp) continue;
306 otmp->quan > 1L));
313 attacks(adtyp, otmp)
315 register struct obj *otmp;
319 if ((weap = get_artifact(otmp)) != 0)
325 defends(adtyp, otmp)
327 register struct obj *otmp;
331 if ((weap = get_artifact(otmp)) != 0)
338 protects(adtyp, otmp)
340 struct obj *otmp;
344 if ((weap = get_artifact(otmp)) != 0)
354 set_artifact_intrinsic(otmp,on,wp_mask)
355 register struct obj *otmp;
360 register const struct artifact *oart = get_artifact(otmp);
387 if(obj != otmp && obj->oartifact) {
406 if(obj != otmp && obj->oartifact) {
443 if (spec_m2(otmp)) {
446 flags.warntype |= spec_m2(otmp);
449 flags.warntype &= ~spec_m2(otmp);
484 (void) arti_invoke(otmp);
619 spec_m2(otmp)
620 struct obj *otmp;
622 register const struct artifact *artifact = get_artifact(otmp);
630 spec_abon(otmp, mon)
631 struct obj *otmp;
634 register const struct artifact *weap = get_artifact(otmp);
646 spec_dbon(otmp, mon, tmp)
647 struct obj *otmp;
651 register const struct artifact *weap = get_artifact(otmp);
936 artifact_hit(magr, mdef, otmp, dmgptr, dieroll)
938 struct obj *otmp;
958 *dmgptr += spec_dbon(otmp, mdef, *dmgptr);
970 if (attacks(AD_FIRE, otmp)) {
983 if (attacks(AD_COLD, otmp)) {
991 if (attacks(AD_ELEC, otmp)) {
1000 if (attacks(AD_MAGM, otmp)) {
1009 if (attacks(AD_STUN, otmp) && dieroll <= MB_MAX_DIEROLL) {
1011 return Mb_hit(magr, mdef, otmp, dmgptr, dieroll, vis, hittee);
1022 if (spec_ability(otmp, SPFX_BEHEAD)) {
1023 if (otmp->oartifact == ART_TSURUGI_OF_MURAMASA && dieroll == 1) {
1048 otmp->dknown = TRUE;
1065 otmp->dknown = TRUE;
1068 } else if (otmp->oartifact == ART_VORPAL_BLADE &&
1098 otmp->dknown = TRUE;
1116 otmp->dknown = TRUE;
1122 if (spec_ability(otmp, SPFX_DRLI)) {
1125 if(otmp->oartifact == ART_STORMBRINGER)
1131 The(distant_name(otmp, xname)),
1150 otmp->oartifact == ART_STORMBRINGER ?
1152 else if (otmp->oartifact == ART_STORMBRINGER)
1157 The(distant_name(otmp, xname)));
1258 struct obj *otmp = getobj(recharge_type, "charge");
1261 if (!otmp) {
1267 recharge(otmp, b_effect ? 1 : obj->cursed ? -1 : 0);
1334 struct obj *otmp = mksobj(ARROW, TRUE, FALSE);
1336 if (!otmp) goto nothing_special;
1337 otmp->blessed = obj->blessed;
1338 otmp->cursed = obj->cursed;
1339 otmp->bknown = obj->bknown;
1341 if (otmp->spe < 0) otmp->spe = 0;
1342 otmp->quan += rnd(10);
1344 if (otmp->spe > 0) otmp->spe = 0;
1346 otmp->quan += rnd(5);
1347 otmp->owt = weight(otmp);
1348 otmp = hold_another_object(otmp, "Suddenly %s out.",
1349 aobjnam(otmp, "fall"), (const char *)0);
1437 artifact_has_invprop(otmp, inv_prop)
1438 struct obj *otmp;
1441 const struct artifact *arti = get_artifact(otmp);
1448 arti_cost(otmp)
1449 struct obj *otmp;
1451 if (!otmp->oartifact)
1452 return ((long)objects[otmp->otyp].oc_cost);
1453 else if (artilist[(int) otmp->oartifact].cost)
1454 return (artilist[(int) otmp->oartifact].cost);
1456 return (100L * (long)objects[otmp->otyp].oc_cost);