Home | History | Annotate | Line # | Download | only in hack
      1  1.7  christos /*	$NetBSD: hack.monst.c,v 1.7 2011/08/16 09:26:22 christos Exp $	*/
      2  1.4  christos 
      3  1.2   mycroft /*
      4  1.6       jsm  * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
      5  1.6       jsm  * Amsterdam
      6  1.6       jsm  * All rights reserved.
      7  1.6       jsm  *
      8  1.6       jsm  * Redistribution and use in source and binary forms, with or without
      9  1.6       jsm  * modification, are permitted provided that the following conditions are
     10  1.6       jsm  * met:
     11  1.6       jsm  *
     12  1.6       jsm  * - Redistributions of source code must retain the above copyright notice,
     13  1.6       jsm  * this list of conditions and the following disclaimer.
     14  1.6       jsm  *
     15  1.6       jsm  * - Redistributions in binary form must reproduce the above copyright
     16  1.6       jsm  * notice, this list of conditions and the following disclaimer in the
     17  1.6       jsm  * documentation and/or other materials provided with the distribution.
     18  1.6       jsm  *
     19  1.6       jsm  * - Neither the name of the Stichting Centrum voor Wiskunde en
     20  1.6       jsm  * Informatica, nor the names of its contributors may be used to endorse or
     21  1.6       jsm  * promote products derived from this software without specific prior
     22  1.6       jsm  * written permission.
     23  1.6       jsm  *
     24  1.6       jsm  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
     25  1.6       jsm  * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     26  1.6       jsm  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
     27  1.6       jsm  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
     28  1.6       jsm  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     29  1.6       jsm  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     30  1.6       jsm  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
     31  1.6       jsm  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
     32  1.6       jsm  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
     33  1.6       jsm  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
     34  1.6       jsm  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     35  1.6       jsm  */
     36  1.6       jsm 
     37  1.6       jsm /*
     38  1.6       jsm  * Copyright (c) 1982 Jay Fenlason <hack (at) gnu.org>
     39  1.6       jsm  * All rights reserved.
     40  1.6       jsm  *
     41  1.6       jsm  * Redistribution and use in source and binary forms, with or without
     42  1.6       jsm  * modification, are permitted provided that the following conditions
     43  1.6       jsm  * are met:
     44  1.6       jsm  * 1. Redistributions of source code must retain the above copyright
     45  1.6       jsm  *    notice, this list of conditions and the following disclaimer.
     46  1.6       jsm  * 2. Redistributions in binary form must reproduce the above copyright
     47  1.6       jsm  *    notice, this list of conditions and the following disclaimer in the
     48  1.6       jsm  *    documentation and/or other materials provided with the distribution.
     49  1.6       jsm  * 3. The name of the author may not be used to endorse or promote products
     50  1.6       jsm  *    derived from this software without specific prior written permission.
     51  1.6       jsm  *
     52  1.6       jsm  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
     53  1.6       jsm  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
     54  1.6       jsm  * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
     55  1.6       jsm  * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     56  1.6       jsm  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     57  1.6       jsm  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
     58  1.6       jsm  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     59  1.6       jsm  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     60  1.6       jsm  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
     61  1.6       jsm  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     62  1.2   mycroft  */
     63  1.2   mycroft 
     64  1.4  christos #include <sys/cdefs.h>
     65  1.2   mycroft #ifndef lint
     66  1.7  christos __RCSID("$NetBSD: hack.monst.c,v 1.7 2011/08/16 09:26:22 christos Exp $");
     67  1.4  christos #endif				/* not lint */
     68  1.1       cgd 
     69  1.1       cgd #include "hack.h"
     70  1.4  christos #include "extern.h"
     71  1.1       cgd #include "def.eshk.h"
     72  1.1       cgd 
     73  1.5       jsm const struct permonst mons[CMNUM + 2] = {
     74  1.4  christos 	{"bat", 'B', 1, 22, 8, 1, 4, 0},
     75  1.4  christos 	{"gnome", 'G', 1, 6, 5, 1, 6, 0},
     76  1.4  christos 	{"hobgoblin", 'H', 1, 9, 5, 1, 8, 0},
     77  1.4  christos 	{"jackal", 'J', 0, 12, 7, 1, 2, 0},
     78  1.4  christos 	{"kobold", 'K', 1, 6, 7, 1, 4, 0},
     79  1.4  christos 	{"leprechaun", 'L', 5, 15, 8, 1, 2, 0},
     80  1.4  christos 	{"giant rat", 'r', 0, 12, 7, 1, 3, 0},
     81  1.4  christos 	{"acid blob", 'a', 2, 3, 8, 0, 0, 0},
     82  1.4  christos 	{"floating eye", 'E', 2, 1, 9, 0, 0, 0},
     83  1.4  christos 	{"homunculus", 'h', 2, 6, 6, 1, 3, 0},
     84  1.4  christos 	{"imp", 'i', 2, 6, 2, 1, 4, 0},
     85  1.4  christos 	{"orc", 'O', 2, 9, 6, 1, 8, 0},
     86  1.4  christos 	{"yellow light", 'y', 3, 15, 0, 0, 0, 0},
     87  1.4  christos 	{"zombie", 'Z', 2, 6, 8, 1, 8, 0},
     88  1.4  christos 	{"giant ant", 'A', 3, 18, 3, 1, 6, 0},
     89  1.4  christos 	{"fog cloud", 'f', 3, 1, 0, 1, 6, 0},
     90  1.4  christos 	{"nymph", 'N', 6, 12, 9, 1, 2, 0},
     91  1.4  christos 	{"piercer", 'p', 3, 1, 3, 2, 6, 0},
     92  1.4  christos 	{"quasit", 'Q', 3, 15, 3, 1, 4, 0},
     93  1.4  christos 	{"quivering blob", 'q', 3, 1, 8, 1, 8, 0},
     94  1.4  christos 	{"violet fungi", 'v', 3, 1, 7, 1, 4, 0},
     95  1.4  christos 	{"giant beetle", 'b', 4, 6, 4, 3, 4, 0},
     96  1.4  christos 	{"centaur", 'C', 4, 18, 4, 1, 6, 0},
     97  1.4  christos 	{"cockatrice", 'c', 4, 6, 6, 1, 3, 0},
     98  1.4  christos 	{"gelatinous cube", 'g', 4, 6, 8, 2, 4, 0},
     99  1.4  christos 	{"jaguar", 'j', 4, 15, 6, 1, 8, 0},
    100  1.4  christos 	{"killer bee", 'k', 4, 14, 4, 2, 4, 0},
    101  1.4  christos 	{"snake", 'S', 4, 15, 3, 1, 6, 0},
    102  1.4  christos 	{"freezing sphere", 'F', 2, 13, 4, 0, 0, 0},
    103  1.4  christos 	{"owlbear", 'o', 5, 12, 5, 2, 6, 0},
    104  1.4  christos 	{"rust monster", 'R', 10, 18, 3, 0, 0, 0},
    105  1.4  christos 	{"scorpion", 's', 5, 15, 3, 1, 4, 0},
    106  1.4  christos 	{"tengu", 't', 5, 13, 5, 1, 7, 0},
    107  1.4  christos 	{"wraith", 'W', 5, 12, 5, 1, 6, 0},
    108  1.1       cgd #ifdef NOWORM
    109  1.4  christos 	{"wumpus", 'w', 8, 3, 2, 3, 6, 0},
    110  1.1       cgd #else
    111  1.4  christos 	{"long worm", 'w', 8, 3, 5, 1, 4, 0},
    112  1.4  christos #endif	/* NOWORM */
    113  1.4  christos 	{"large dog", 'd', 6, 15, 4, 2, 4, 0},
    114  1.4  christos 	{"leocrotta", 'l', 6, 18, 4, 3, 6, 0},
    115  1.4  christos 	{"mimic", 'M', 7, 3, 7, 3, 4, 0},
    116  1.4  christos 	{"troll", 'T', 7, 12, 4, 2, 7, 0},
    117  1.4  christos 	{"unicorn", 'u', 8, 24, 5, 1, 10, 0},
    118  1.4  christos 	{"yeti", 'Y', 5, 15, 6, 1, 6, 0},
    119  1.4  christos 	{"stalker", 'I', 8, 12, 3, 4, 4, 0},
    120  1.4  christos 	{"umber hulk", 'U', 9, 6, 2, 2, 10, 0},
    121  1.4  christos 	{"vampire", 'V', 8, 12, 1, 1, 6, 0},
    122  1.4  christos 	{"xorn", 'X', 8, 9, -2, 4, 6, 0},
    123  1.4  christos 	{"xan", 'x', 7, 18, -2, 2, 4, 0},
    124  1.4  christos 	{"zruty", 'z', 9, 8, 3, 3, 6, 0},
    125  1.4  christos 	{"chameleon", ':', 6, 5, 6, 4, 2, 0},
    126  1.4  christos 	{"dragon", 'D', 10, 9, -1, 3, 8, 0},
    127  1.4  christos 	{"ettin", 'e', 10, 12, 3, 2, 8, 0},
    128  1.4  christos 	{"lurker above", '\'', 10, 3, 3, 0, 0, 0},
    129  1.4  christos 	{"nurse", 'n', 11, 6, 0, 1, 3, 0},
    130  1.4  christos 	{"trapper", ',', 12, 3, 3, 0, 0, 0},
    131  1.4  christos 	{"purple worm", 'P', 15, 9, 6, 2, 8, 0},
    132  1.4  christos 	{"demon", '&', 10, 12, -4, 1, 4, 0},
    133  1.4  christos 	{"minotaur", 'm', 15, 15, 6, 4, 10, 0},
    134  1.4  christos 	{"shopkeeper", '@', 12, 18, 0, 4, 8, sizeof(struct eshk)}
    135  1.1       cgd };
    136  1.1       cgd 
    137  1.5       jsm const struct permonst pm_ghost = {"ghost", ' ', 10, 3, -5, 1, 1, sizeof(plname)};
    138  1.5       jsm const struct permonst pm_wizard = {
    139  1.1       cgd 	"wizard of Yendor", '1', 15, 12, -2, 1, 12, 0
    140  1.1       cgd };
    141  1.1       cgd #ifdef MAIL
    142  1.5       jsm const struct permonst pm_mail_daemon = {"mail daemon", '2', 100, 1, 10, 0, 0, 0};
    143  1.4  christos #endif	/* MAIL */
    144  1.5       jsm const struct permonst pm_eel = {"giant eel", ';', 15, 6, -3, 3, 6, 0};
    145  1.7  christos 
    146  1.7  christos void *
    147  1.7  christos monster_private(struct monst *mon)
    148  1.7  christos {
    149  1.7  christos 	return mon->mextra;
    150  1.7  christos }
    151