jcs's openbsd hax
openbsd
at jcs 748 lines 20 kB view raw
1/* $OpenBSD: hack.h,v 1.15 2024/05/21 05:00:47 jsg Exp $*/ 2/* $NetBSD: hack.h,v 1.3 1995/03/23 08:30:21 cgd Exp $*/ 3 4/* 5 * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, 6 * Amsterdam 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are 11 * met: 12 * 13 * - Redistributions of source code must retain the above copyright notice, 14 * this list of conditions and the following disclaimer. 15 * 16 * - Redistributions in binary form must reproduce the above copyright 17 * notice, this list of conditions and the following disclaimer in the 18 * documentation and/or other materials provided with the distribution. 19 * 20 * - Neither the name of the Stichting Centrum voor Wiskunde en 21 * Informatica, nor the names of its contributors may be used to endorse or 22 * promote products derived from this software without specific prior 23 * written permission. 24 * 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 26 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 27 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 28 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 29 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 30 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 31 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 32 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 33 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 34 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 35 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 */ 37 38/* 39 * Copyright (c) 1982 Jay Fenlason <hack@gnu.org> 40 * All rights reserved. 41 * 42 * Redistribution and use in source and binary forms, with or without 43 * modification, are permitted provided that the following conditions 44 * are met: 45 * 1. Redistributions of source code must retain the above copyright 46 * notice, this list of conditions and the following disclaimer. 47 * 2. Redistributions in binary form must reproduce the above copyright 48 * notice, this list of conditions and the following disclaimer in the 49 * documentation and/or other materials provided with the distribution. 50 * 3. The name of the author may not be used to endorse or promote products 51 * derived from this software without specific prior written permission. 52 * 53 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 54 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 55 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 56 * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 57 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 58 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 59 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 60 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 61 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 62 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 63 */ 64 65#include <fcntl.h> 66#include <stdarg.h> 67#include <string.h> 68 69#define Null(type) ((struct type *) 0) 70 71#include "config.h" 72#include "def.objclass.h" 73 74typedef struct { 75 xchar x,y; 76} coord; 77 78#include "def.mkroom.h" 79#include "def.monst.h" /* uses coord */ 80#include "def.gold.h" 81#include "def.trap.h" 82#include "def.obj.h" 83#include "def.flag.h" 84#include "def.wseg.h" 85 86#define plur(x) (((x) == 1) ? "" : "s") 87 88#define BUFSZ 256 /* for getlin buffers */ 89#define PL_NSIZ 32 /* name of player, ghost, shopkeeper */ 90 91#include "def.rm.h" 92#include "def.permonst.h" 93 94extern xchar xdnstair, ydnstair, xupstair, yupstair; /* stairs up and down. */ 95 96extern xchar dlevel; 97#define newstring(x) (char *) alloc((unsigned)(x)) 98 99#include "hack.onames.h" 100 101#define ON 1 102#define OFF 0 103 104extern struct obj *invent, *uwep, *uarm, *uarm2, *uarmh, *uarms, *uarmg, 105 *uleft, *uright, *fcobj; 106extern struct obj *uchain; /* defined iff PUNISHED */ 107extern struct obj *uball; /* defined if PUNISHED */ 108 109struct prop { 110#define TIMEOUT 007777 /* mask */ 111#define LEFT_RING W_RINGL /* 010000L */ 112#define RIGHT_RING W_RINGR /* 020000L */ 113#define INTRINSIC 040000L 114#define LEFT_SIDE LEFT_RING 115#define RIGHT_SIDE RIGHT_RING 116#define BOTH_SIDES (LEFT_SIDE | RIGHT_SIDE) 117 long p_flgs; 118 int (*p_tofn)(); /* called after timeout */ 119}; 120 121struct you { 122 xchar ux, uy; 123 schar dx, dy, dz; /* direction of move (or zap or ... ) */ 124#ifdef QUEST 125 schar di; /* direction of FF */ 126 xchar ux0, uy0; /* initial position FF */ 127#endif /* QUEST */ 128 xchar udisx, udisy; /* last display pos */ 129 char usym; /* usually '@' */ 130 schar uluck; 131#define LUCKMAX 10 /* on moonlit nights 11 */ 132#define LUCKMIN (-10) 133 int last_str_turn:3; /* 0: none, 1: half turn, 2: full turn */ 134 /* +: turn right, -: turn left */ 135 unsigned udispl:1; /* @ on display */ 136 unsigned ulevel:4; /* 1 - 14 */ 137#ifdef QUEST 138 unsigned uhorizon:7; 139#endif /* QUEST */ 140 unsigned utrap:3; /* trap timeout */ 141 unsigned utraptype:1; /* defined if utrap nonzero */ 142#define TT_BEARTRAP 0 143#define TT_PIT 1 144 unsigned uinshop:6; /* used only in shk.c - (roomno+1) of shop */ 145 146 147/* perhaps these #define's should also be generated by makedefs */ 148#define TELEPAT LAST_RING /* not a ring */ 149#define Telepat u.uprops[TELEPAT].p_flgs 150#define FAST (LAST_RING+1) /* not a ring */ 151#define Fast u.uprops[FAST].p_flgs 152#define CONFUSION (LAST_RING+2) /* not a ring */ 153#define Confusion u.uprops[CONFUSION].p_flgs 154#define INVIS (LAST_RING+3) /* not a ring */ 155#define Invis u.uprops[INVIS].p_flgs 156#define Invisible (Invis && !See_invisible) 157#define GLIB (LAST_RING+4) /* not a ring */ 158#define Glib u.uprops[GLIB].p_flgs 159#define PUNISHED (LAST_RING+5) /* not a ring */ 160#define Punished u.uprops[PUNISHED].p_flgs 161#define SICK (LAST_RING+6) /* not a ring */ 162#define Sick u.uprops[SICK].p_flgs 163#define BLIND (LAST_RING+7) /* not a ring */ 164#define Blind u.uprops[BLIND].p_flgs 165#define WOUNDED_LEGS (LAST_RING+8) /* not a ring */ 166#define Wounded_legs u.uprops[WOUNDED_LEGS].p_flgs 167#define STONED (LAST_RING+9) /* not a ring */ 168#define Stoned u.uprops[STONED].p_flgs 169#define PROP(x) (x-RIN_ADORNMENT) /* convert ring to index in uprops */ 170 unsigned umconf:1; 171 char *usick_cause; 172 struct prop uprops[LAST_RING+10]; 173 174 unsigned uswallow:1; /* set if swallowed by a monster */ 175 unsigned uswldtim:4; /* time you have been swallowed */ 176 unsigned uhs:3; /* hunger state - see hack.eat.c */ 177 schar ustr,ustrmax; 178 schar udaminc; 179 schar uac; 180 int uhp,uhpmax; 181 long int ugold,ugold0,uexp,urexp; 182 int uhunger; /* refd only in eat.c and shk.c */ 183 int uinvault; 184 struct monst *ustuck; 185 int nr_killed[CMNUM+2]; /* used for experience bookkeeping */ 186}; 187 188extern struct you u; 189 190extern char *traps[]; 191extern char vowels[]; 192 193extern xchar curx,cury; /* cursor location on screen */ 194 195extern coord bhitpos; /* place where thrown weapon falls to the ground */ 196 197extern xchar seehx,seelx,seehy,seely; /* where to see*/ 198extern char *save_cm,*killer; 199 200extern xchar dlevel, maxdlevel; /* dungeon level */ 201 202extern long moves; 203 204extern int multi; 205 206 207extern char lock[PL_NSIZ+4]; 208 209 210#define DIST(x1,y1,x2,y2) (((x1)-(x2))*((x1)-(x2)) + ((y1)-(y2))*((y1)-(y2))) 211 212#define PL_CSIZ 20 /* sizeof pl_character */ 213#define MAX_CARR_CAP 120 /* so that boulders can be heavier */ 214#define MAXLEVEL 40 215#define FAR (COLNO+2) /* position outside screen */ 216 217 218/* alloc.c */ 219void *alloc(unsigned int); 220 221/* hack.apply.c */ 222int doapply(void); 223int holetime(void); 224void dighole(void); 225 226/* hack.bones.c */ 227void savebones(void); 228int getbones(void); 229 230/* hack.c */ 231void unsee(void); 232void seeoff(int); 233void domove(void); 234int dopickup(void); 235void pickup(int); 236void lookaround(void); 237int monster_nearby(void); 238int cansee(xchar, xchar); 239int sgn(int); 240void setsee(void); 241void nomul(int); 242int abon(void); 243int dbon(void); 244void losestr(int); 245void losehp(int, char *); 246void losehp_m(int, struct monst *); 247void losexp(void); 248int inv_weight(void); 249long newuexp(void); 250 251/* hack.cmd.c */ 252void rhack(char *); 253int doextcmd(void); 254int movecmd(char); 255int getdir(boolean); 256void confdir(void); 257#ifdef QUEST 258void finddir(void); 259int isroom(int, int); 260#endif 261int isok(int, int); 262 263/* hack.do.c */ 264int dodrop(void); 265void dropx(struct obj *); 266void dropy(struct obj *); 267int doddrop(void); 268int dodown(void); 269int doup(void); 270void goto_level(int, boolean); 271int donull(void); 272int dopray(void); 273int dothrow(void); 274struct obj *splitobj(struct obj *, int); 275void more_experienced(int, int); 276void set_wounded_legs(long, int); 277void heal_legs(void); 278 279/* hack.do_name.c */ 280coord getpos(int, char *); 281int do_mname(void); 282int ddocall(void); 283void docall(struct obj *); 284char *xmonnam(struct monst *, int); 285char *monnam(struct monst *); 286char *Monnam(struct monst *); 287char *amonnam(struct monst *, char *); 288char *Amonnam(struct monst *, char *); 289char *Xmonnam(struct monst *); 290 291/* hack.do_wear.c */ 292int doremarm(void); 293int doremring(void); 294int armoroff(struct obj *); 295int doweararm(void); 296int dowearring(void); 297void ringoff(struct obj *); 298void find_ac(void); 299void glibr(void); 300struct obj *some_armor(void); 301void corrode_armor(void); 302 303/* hack.dog.c */ 304void makedog(void); 305void losedogs(void); 306void keepdogs(void); 307void fall_down(struct monst *); 308int dog_move(struct monst *, int); 309int inroom(xchar, xchar); 310int tamedog(struct monst *, struct obj *); 311 312/* hack.eat.c */ 313void init_uhunger(void); 314int opentin(void); 315void Meatdone(void); 316int doeat(void); 317void gethungry(void); 318void morehungry(int); 319void lesshungry(int); 320void unfaint(void); 321int poisonous(struct obj *); 322 323/* hack.end.c */ 324void done1(int); 325int done2(void); 326void done_intr(int); 327void done_hangup(int); 328void done_in_by(struct monst *); 329void done(char *); 330void clearlocks(void); 331char *eos(char *); 332void charcat(char *, char); 333void prscore(int, char **); 334 335/* hack.engrave.c */ 336struct engr *engr_at(xchar, xchar); 337int sengr_at(char *, xchar, xchar); 338void u_wipe_engr(int); 339void wipe_engr_at(xchar, xchar, xchar); 340void read_engr_at(int, int); 341void make_engr_at(int, int, char *); 342int doengrave(void); 343void save_engravings(int); 344void rest_engravings(int); 345 346/* hack.fight.c */ 347int hitmm(struct monst *, struct monst *); 348void mondied(struct monst *); 349int fightm(struct monst *); 350int thitu(int, int, char *); 351boolean hmon(struct monst *, struct obj *, int); 352boolean attack(struct monst *); 353 354/* hack.invent.c */ 355struct obj *addinv(struct obj *); 356void useup(struct obj *); 357void freeinv(struct obj *); 358void delobj(struct obj *); 359void freeobj(struct obj *); 360void freegold(struct gold *); 361void deltrap(struct trap *); 362struct monst *m_at(int, int); 363struct obj *o_at(int, int); 364struct obj *sobj_at(int, int, int); 365int carried(struct obj *); 366boolean carrying(int); 367struct obj *o_on(unsigned int, struct obj *); 368struct trap *t_at(int, int); 369struct gold *g_at(int, int); 370struct obj *mkgoldobj(long); 371struct obj *getobj(char *, char *); 372int ckunpaid(struct obj *); 373int ggetobj(char *, int (*fn)(struct obj *), int); 374int askchain(struct obj *, char *, int, int (*fn)(struct obj *), 375 int (*ckfn)(struct obj *), int); 376void prinv(struct obj *); 377int ddoinv(void); 378int dotypeinv(void); 379int dolook(void); 380void stackobj(struct obj *); 381int countgold(void); 382int doprgold(void); 383int doprwep(void); 384int doprarm(void); 385int doprring(void); 386 387/* hack.ioctl.c */ 388void getioctls(void); 389void setioctls(void); 390#ifdef SUSPEND 391int dosuspend(void); 392#endif 393 394/* hack.lev.c */ 395void savelev(int, xchar); 396void bwrite(int, const void *, ssize_t); 397void saveobjchn(int, struct obj *); 398void savemonchn(int, struct monst *); 399void savegoldchn(int, struct gold *); 400void savetrapchn(int, struct trap *); 401void getlev(int, int, xchar); 402void mread(int, char *, unsigned); 403void mklev(void); 404 405/* hack.main.c */ 406void glo(int); 407void askname(void); 408void impossible(const char *, ...) __attribute__((__format__ (printf, 1, 2))); 409/* ... stuff: fix in files; printf-like ones have spec _attrib or 410 * something */ 411void stop_occupation(void); 412 413/* hack.makemon.c */ 414struct monst *makemon(struct permonst *, int, int); 415coord enexto(xchar, xchar); 416int goodpos(int, int); 417void rloc(struct monst *); 418struct monst *mkmon_at(char, int, int); 419 420/* hack.mhitu.c */ 421int mhitu(struct monst *); 422int hitu(struct monst *, int); 423 424/* hack.mklev.c */ 425void makelevel(void); 426int makerooms(void); 427void mktrap(int, int, struct mkroom *); 428 429/* hack.mkmaze.c */ 430void makemaz(void); 431coord mazexy(void); 432 433/* hack/mkobj.c */ 434struct obj * mkobj_at(int, int, int); 435void mksobj_at(int, int, int); 436struct obj *mkobj(int); 437struct obj *mksobj(int); 438int letter(int); 439int weight(struct obj *); 440void mkgold(long, int, int); 441 442/* hack.mkshop.c */ 443#ifndef QUEST 444void mkshop(void); 445void mkzoo(int); 446struct permonst *morguemon(void); 447void mkswamp(void); 448#endif 449 450/* hack.mon.c */ 451void movemon(void); 452void justswld(struct monst *, char *); 453void youswld(struct monst *, int, int, char *); 454int dochug(struct monst *); 455int m_move(struct monst *, int); 456int mfndpos(struct monst *, coord pos[9], int info[9], int); 457int dist(int, int); 458void poisoned(char *, char *); 459void mondead(struct monst *); 460void replmon(struct monst *, struct monst *); 461void relmon(struct monst *); 462void monfree(struct monst *); 463void unstuck(struct monst *); 464void killed(struct monst *); 465void kludge(char *, char *); 466void rescham(void); 467int newcham(struct monst *, struct permonst *); 468void mnexto(struct monst *); 469void setmangry(struct monst *); 470int canseemon(struct monst *); 471 472/* hack.o_init.c */ 473int letindex(char); 474void init_objects(void); 475int probtype(char); 476void oinit(void); 477void savenames(int); 478void restnames(int); 479int dodiscovered(void); 480 481/* hack.objnam.c */ 482char *strprepend(char *, char *); 483char *typename(int); 484char *xname(struct obj *); 485char *doname(struct obj *); 486void setan(char *, char *, size_t); 487char *aobjnam(struct obj *, char *); 488char *Doname(struct obj *); 489struct obj *readobjnam(char *, size_t); 490 491/* hack.options.c */ 492void initoptions(void); 493int doset(void); 494 495/* hack.pager.c */ 496int dowhatis(void); 497void intruph(int); 498void set_whole_screen(void); 499#ifdef NEWS 500int readnews(void); 501#endif 502void set_pager(int); 503int page_line(char *); 504void cornline(int, char *); 505int dohelp(void); 506int page_file(char *, boolean); 507#ifdef UNIX 508#ifdef SHELL 509int dosh(void); 510#endif 511int child(int); 512#endif 513 514/* hack.potion.c */ 515int dodrink(void); 516void pluslvl(void); 517void strange_feeling(struct obj *, char *); 518void potionhit(struct monst *, struct obj *); 519void potionbreathe(struct obj *); 520int dodip(void); 521 522/* hack.pri.c */ 523void swallowed(void); 524void panic(const char *, ...) __attribute__((__format__ (printf, 1, 2))); 525void atl(int, int, int); 526void on_scr(int, int); 527void tmp_at(schar, schar); 528void Tmp_at(schar, schar); 529void setclipped(void); 530void at(xchar, xchar, char); 531void prme(void); 532int doredraw(void); 533void docrt(void); 534void docorner(int, int); 535void curs_on_u(void); 536void pru(void); 537void prl(int, int); 538char news0(xchar, xchar); 539void newsym(int, int); 540void mnewsym(int, int); 541void nosee(int, int); 542#ifndef QUEST 543void prl1(int, int); 544void nose1(int, int); 545#endif 546int vism_at(int, int); 547void unpobj(struct obj *); 548void seeobjs(void); 549void seemons(void); 550void pmon(struct monst *); 551void unpmon(struct monst *); 552void nscr(void); 553void bot(void); 554void cls(void); 555 556/* hack.read.c */ 557int doread(void); 558int identify(struct obj *); 559void litroom(boolean); 560 561/* hack.rip.c */ 562void outrip(void); 563 564/* hack.rumors.c */ 565void outrumor(void); 566 567/* hack.save.c */ 568int dosave(void); 569__dead void hackhangup(int); 570int dorecover(int); 571struct obj *restobjchn(int); 572struct monst *restmonchn(int); 573 574/* hack.search.c */ 575int findit(void); 576int dosearch(void); 577int doidtrap(void); 578void wakeup(struct monst *); 579void seemimic(struct monst *); 580 581/* hack.shk.c */ 582char *shkname(struct monst *); 583void shkdead(struct monst *); 584void replshk(struct monst *, struct monst *); 585int inshop(void); 586void obfree(struct obj *, struct obj *); 587int dopay(void); 588void paybill(void); 589void addtobill(struct obj *); 590void splitbill(struct obj *, struct obj *); 591void subfrombill(struct obj *); 592int doinvbill(int); 593int shkcatch(struct obj *); 594int shk_move(struct monst *); 595void shopdig(int); 596int online(int, int); 597int follower(struct monst *); 598 599/* hack.shknam.c */ 600void findname(char *, size_t, char); 601 602/* hack.steal.c */ 603long somegold(void); 604void stealgold(struct monst *); 605void stealarm(void); 606int steal(struct monst *); 607void mpickobj(struct monst *, struct obj *); 608int stealamulet(struct monst *); 609void relobj(struct monst *, int); 610 611/* hack.termcap.c */ 612void startup(void); 613void start_screen(void); 614void end_screen(void); 615void start_screen(void); 616void curs(int, int); 617void cl_end(void); 618void clr_screen(void); 619void home(void); 620void standoutbeg(void); 621void standoutend(void); 622void backsp(void); 623void hackbell(void); 624void cl_eos(void); 625 626/* hack.timeout.c */ 627void hacktimeout(void); 628 629/* hack.topl.c */ 630int doredotopl(void); 631void remember_topl(void); 632void addtopl(char *); 633void more(void); 634void cmore(char *); 635void clrlin(void); 636void pline(const char *, ...) __attribute__((__format__ (printf, 1, 2))); 637void vpline(const char *, va_list) __attribute__((__format__ (printf, 1, 0))); 638void putsym(char); 639void putstr(char *); 640 641/* hack.track.c */ 642void initrack(void); 643void settrack(void); 644coord *gettrack(int, int); 645 646/* hack.trap.c */ 647struct trap *maketrap(int, int, int); 648void dotrap(struct trap *); 649int mintrap(struct monst *); 650void selftouch(char *); 651void float_up(void); 652int float_down(void); 653void tele(void); 654int dotele(void); 655void placebc(int); 656void unplacebc(void); 657void level_tele(void); 658void drown(void); 659 660/* hack.tty.c */ 661void gettty(void); 662void settty(char *); 663void setftty(void); 664__dead void error(const char *, ...) __attribute__((__format__ (printf, 1, 2))); 665void getlin(char *); 666void getret(void); 667void cgetret(char *); 668void xwaitforspace(char *); 669char *parse(void); 670char readchar(void); 671void end_of_input(void); 672 673/* hack.u_init.c */ 674void u_init(void); 675void plnamesuffix(void); 676 677/* hack.unix.c */ 678int getyear(void); 679char *getdate(void); 680int phase_of_the_moon(void); 681int night(void); 682int midnight(void); 683void getlock(void); 684#ifdef MAIL 685void getmailstatus(void); 686void ckmailstatus(void); 687void readmail(void); 688#endif 689void regularize(char *); 690 691/* hack.vault.c */ 692void setgd(void); 693void invault(void); 694int gd_move(void); 695void gddead(void); 696void replgd(struct monst *, struct monst *); 697 698/* hack.version.c */ 699int doversion(void); 700 701/* hack.wield.c */ 702void setuwep(struct obj *); 703int dowield(void); 704void corrode_weapon(void); 705int chwepon(struct obj *, int); 706 707/* hack.wizard.c */ 708void amulet(void); 709int wiz_hit(struct monst *); 710void inrange(struct monst *); 711void aggravate(void); 712 713/* hack.worm.c */ 714#ifndef NOWORM 715int getwn(struct monst *); 716void initworm(struct monst *); 717void worm_move(struct monst *); 718void worm_nomove(struct monst *); 719void wormdead(struct monst *); 720void wormhit(struct monst *); 721void wormsee(unsigned); 722void pwseg(struct wseg *); 723void cutworm(struct monst *, xchar, xchar, uchar); 724#endif 725 726/* hack.worn.c */ 727void setworn(struct obj *, long); 728void setnotworn(struct obj *); 729 730/* hack.zap.c */ 731void bhitm(struct monst *, struct obj *); 732boolean bhito(struct obj *, struct obj *); 733int dozap(void); 734char *exclam(int); 735void hit(char *, struct monst *, char *); 736void miss(char *, struct monst *); 737struct monst *bhit(int, int, int, char, 738 void (*fhitm)(struct monst *, struct obj *), 739 boolean (*fhito)(struct obj *, struct obj *), struct obj *); 740struct monst *boomhit(int, int); 741void buzz(int, xchar, xchar, int, int); 742void fracture_rock(struct obj *); 743 744/* rnd.c */ 745int rn1(int, int); 746int rn2(int); 747int rnd(int); 748int d(int, int);