| /openbsd-src/games/hack/ |
| H A D | hack.mkobj.c | 80 mksobj_at(int otyp, int x, int y) in mksobj_at() argument 82 struct obj *otmp = mksobj(otyp); in mksobj_at() 107 mksobj(int otyp) in mksobj() argument 110 char let = objects[otyp].oc_olet; in mksobj() 118 otmp->otyp = otyp; in mksobj() 122 otmp->quan = (otmp->otyp <= ROCK) ? rn1(6,6) : 1; in mksobj() 130 if(otmp->otyp >= CORPSE) break; in mksobj() 133 if(otmp->otyp == TIN) in mksobj() 156 if(otmp->otyp == WAN_WISHING) otmp->spe = 3; else in mksobj() 158 (objects[otmp->otyp].bits & NODIR) ? 11 : 4); in mksobj() [all …]
|
| H A D | hack.do_wear.c | 159 int delay = -objects[otmp->otyp].oc_delay; in armoroff() 165 switch(otmp->otyp) { in armoroff() 195 if(otmp->otyp == HELMET){ in doweararm() 201 } else if(otmp->otyp == SHIELD){ in doweararm() 203 if(uwep && uwep->otyp == TWO_HANDED_SWORD) in doweararm() 206 } else if(otmp->otyp == PAIR_OF_GLOVES) { in doweararm() 218 if(otmp->otyp != ELVEN_CLOAK || uarm2) { in doweararm() 233 delay = -objects[otmp->otyp].oc_delay; in doweararm() 289 oldprop = u.uprops[PROP(otmp->otyp)].p_flgs; in dowearring() 290 u.uprops[PROP(otmp->otyp)].p_flgs |= mask; in dowearring() [all …]
|
| H A D | hack.eat.c | 192 if(otmp->otyp == TIN){ in doeat() 194 switch(uwep->otyp) { in doeat() 234 ftmp = &objects[otmp->otyp]; in doeat() 236 if(otmp->otyp >= CORPSE && eatcorpse(otmp)) goto eatx; in doeat() 237 if(!rn2(7) && otmp->otyp != FORTUNE_COOKIE) { in doeat() 262 switch(otmp->otyp){ in doeat() 289 if(otmp->otyp >= CORPSE) in doeat() 294 if(otmp->otyp == DEAD_LIZARD && (Confusion > 2)) in doeat() 298 if(otmp->otyp == CARROT && !Blind){ in doeat() 304 if(otmp->otyp == FORTUNE_COOKIE) { in doeat() [all …]
|
| H A D | hack.do.c | 128 if(obj->otyp == CRYSKNIFE) in dropy() 129 obj->otyp = WORM_TOOTH; in dropy() 369 if(obj->otyp == EXPENSIVE_CAMERA) { in dothrow() 372 } else if(obj->otyp == EGG) { in dothrow() 384 } else if(obj->otyp == BOOMERANG) { in dothrow() 391 if(obj->otyp == PICK_AXE && shkcatch(obj)) in dothrow() 394 mon = bhit(u.dx, u.dy, (obj->otyp == ICE_BOX) ? 1 : in dothrow() 404 if(obj->otyp < ROCK) { in dothrow() 406 uwep->otyp != obj->otyp+(BOW-ARROW)) in dothrow() 412 if(obj->otyp == BOOMERANG) tmp += 4; in dothrow() [all …]
|
| H A D | hack.potion.c | 81 if(!strcmp(objects[otmp->otyp].oc_descr, "smoky") && !rn2(13)) { in dodrink() 85 switch(otmp->otyp){ in dodrink() 236 impossible("What a funny potion! (%u)", otmp->otyp); in dodrink() 243 if(otmp->dknown && !objects[otmp->otyp].oc_name_known) { in dodrink() 245 objects[otmp->otyp].oc_name_known = 1; in dodrink() 247 } else if(!objects[otmp->otyp].oc_uname) in dodrink() 278 if(!objects[obj->otyp].oc_name_known && !objects[obj->otyp].oc_uname) in strange_feeling() 308 if(!isyou && !rn2(3)) switch(obj->otyp) { in potionhit() 360 switch(obj->otyp) { in potionbreathe() 426 if(obj->otyp == ARROW || obj->otyp == DART || in dodip() [all …]
|
| H A D | hack.dog.c | 167 (obj->otyp == TRIPE_RATION) ? DOGFOOD : in dogfood() 168 (obj->otyp < CARROT) ? ACCFOOD : in dogfood() 169 (obj->otyp < CORPSE) ? MANFOOD : in dogfood() 171 obj->otyp == DEAD_COCKATRICE) in dogfood() 197 xchar gx, gy, gtyp, otyp; /* current goal */ in dog_move() local 244 if((otyp = dogfood(obj)) <= CADAVER){ in dog_move() 265 otyp = dogfood(obj); in dog_move() 266 if(otyp > gtyp || otyp == UNDEF) continue; in dog_move() 268 if(otyp < MANFOOD && in dog_move() 270 if(otyp < gtyp || (otyp == gtyp && in dog_move() [all …]
|
| H A D | hack.fight.c | 216 } else if(obj->olet == WEAPON_SYM || obj->otyp == PICK_AXE) { in hmon() 217 if(obj == uwep && (obj->otyp > SPEAR || obj->otyp < BOOMERANG)) in hmon() 221 tmp = rnd(objects[obj->otyp].wldam); in hmon() 222 if(obj->otyp == TWO_HANDED_SWORD) tmp += d(2,6); in hmon() 223 else if(obj->otyp == FLAIL) tmp += rnd(4); in hmon() 225 tmp = rnd(objects[obj->otyp].wsdam); in hmon() 228 if(!thrown && obj == uwep && obj->otyp == BOOMERANG in hmon() 238 if(mon->data->mlet == 'O' && obj->otyp == TWO_HANDED_SWORD && in hmon() 241 } else switch(obj->otyp) { in hmon() 367 if(uwep->olet == WEAPON_SYM || uwep->otyp == PICK_AXE) in attack() [all …]
|
| H A D | hack.zap.c | 90 switch(otmp->otyp) { in bhitm() 114 objects[otmp->otyp].oc_name_known = 1; in bhitm() 131 impossible("What an interesting wand (%u)", otmp->otyp); in bhitm() 145 switch(otmp->otyp) { in bhito() 148 mkobj_at((obj->otyp == ROCK || obj->otyp == ENORMOUS_ROCK) in bhito() 154 if(obj->otyp == ENORMOUS_ROCK) in bhito() 182 impossible("What an interesting wand (%u)", otmp->otyp); in bhito() 201 if(!(objects[obj->otyp].bits & NODIR) && !getdir(1)) in dozap() 204 if(objects[obj->otyp].bits & IMMEDIATE) { in dozap() 216 switch(obj->otyp){ in dozap() [all …]
|
| H A D | hack.wield.c | 95 } else if(uarms && wep->otyp == TWO_HANDED_SWORD) in dowield() 136 if(uwep->otyp == WORM_TOOTH && amount > 0) { in chwepon() 137 uwep->otyp = CRYSKNIFE; in chwepon() 143 if(uwep->otyp == CRYSKNIFE && amount < 0) { in chwepon() 144 uwep->otyp = WORM_TOOTH; in chwepon()
|
| H A D | hack.objnam.c | 101 typename(int otyp) in typename() argument 104 struct objclass *ocl = &objects[otyp]; in typename() 127 if(otyp >= TURQUOISE && otyp <= JADE) in typename() 171 int nn = objects[obj->otyp].oc_name_known; in xname() 172 char *an = objects[obj->otyp].oc_name; in xname() 173 char *dn = objects[obj->otyp].oc_descr; in xname() 174 char *un = objects[obj->otyp].oc_uname; in xname() 193 if(obj->otyp == DEAD_HOMUNCULUS && pl) { in xname() 201 if(obj->otyp == WORM_TOOTH && pl) { in xname() 206 if(obj->otyp == CRYSKNIFE && pl) { in xname() [all …]
|
| H A D | hack.read.c | 90 switch(scroll->otyp) { in doread() 104 objects[otmp->otyp].oc_name); in doread() 110 objects[otmp->otyp].oc_name); in doread() 115 objects[otmp->otyp].oc_name); in doread() 128 objects[otmp->otyp].oc_name); in doread() 216 objects[uwep->otyp].oc_name); in doread() 225 objects[uwep->otyp].oc_name); in doread() 486 scroll->otyp); in doread() 488 if(!objects[scroll->otyp].oc_name_known) { in doread() 490 objects[scroll->otyp].oc_name_known = 1; in doread() [all …]
|
| H A D | hack.engrave.c | 222 if(otmp && otmp->otyp == WAN_FIRE && otmp->spe) { in doengrave() 249 if(otmp->otyp == DAGGER || otmp->otyp == TWO_HANDED_SWORD || in doengrave() 250 otmp->otyp == CRYSKNIFE || in doengrave() 251 otmp->otyp == LONG_SWORD || otmp->otyp == AXE) { in doengrave()
|
| H A D | hack.u_init.c | 341 obj->otyp = trop->trotyp; in ini_inv() 343 if(obj->otyp == WAN_WISHING) /* gitpyr!robert */ in ini_inv() 344 obj->otyp = WAN_DEATH; in ini_inv() 348 switch(obj->otyp){ in ini_inv()
|
| H A D | hack.invent.c | 284 if(otmp->ox == x && otmp->oy == y && otmp->otyp == n) in sobj_at() 305 if(otmp->otyp == type) in carrying() 808 if(Blind && otmp->otyp == DEAD_COCKATRICE && !uarmg) { in dolook() 852 if(obj->otyp == otmp->otyp && in merged() 859 (obj->olet == WEAPON_SYM && obj->otyp < BOOMERANG)))) { in merged()
|
| H A D | hack.trap.c | 299 if(uwep && uwep->otyp == DEAD_COCKATRICE){ in selftouch() 302 killer = objects[uwep->otyp].oc_name; in selftouch() 533 obj->otyp = SCR_BLANK_PAPER; in drown()
|
| H A D | def.objclass.h | 81 #define ARM_BONUS(obj) ((10 - objects[obj->otyp].a_ac) + obj->spe)
|
| H A D | def.obj.h | 71 uchar otyp; member
|
| H A D | hack.shk.c | 848 tmp = 10*rnd((obj->otyp == EXPENSIVE_CAMERA) ? 150 : 30); in getprice() 859 if(obj->otyp == SCR_MAIL) in getprice() 879 if(obj->otyp < BOOMERANG) in getprice() 881 else if(obj->otyp == LONG_SWORD || in getprice() 882 obj->otyp == TWO_HANDED_SWORD) in getprice() 906 tmp += objects[otmp->otyp].nutrition; in realhunger()
|
| H A D | hack.mhitu.c | 130 (!uarm || objects[uarm->otyp].a_can < rnd(3) || !rn2(50)); in mhitu() 304 uarm->otyp < STUDDED_LEATHER_ARMOR && in mhitu()
|
| H A D | hack.apply.c | 92 switch(obj->otyp){ in doapply() 327 if(u.uswallow || !uwep || uwep->otyp != PICK_AXE || in dig()
|
| H A D | hack.do_name.c | 249 str1 = &(objects[obj->otyp].oc_uname); in docall()
|
| H A D | hack.end.c | 249 objects[otmp->otyp].oc_name_known = 1; in done() 250 i = otmp->quan*objects[otmp->otyp].g_val; in done()
|
| H A D | hack.pri.c | 580 if(obj->olet == FOOD_SYM && obj->otyp >= CORPSE in seeobjs() 586 if(obj->olet == FOOD_SYM && obj->otyp >= CORPSE in seeobjs()
|
| H A D | hack.mon.c | 422 objects[otmp->otyp].g_val != 0) in m_move() 532 if (mtmp->data->mlet != 'u' || objects[otmp->otyp].g_val != 0){ in mpickgems()
|
| H A D | hack.c | 458 if(obj->otyp == DEAD_COCKATRICE && !uarmg){ in pickup() 465 if(obj->otyp == SCR_SCARE_MONSTER){ in pickup()
|