#include #include #include "mon.h" #include "obj.h" #include "dice.h" #include "vars.h" #include "objtypes.h" static void urchin_tick(MONST *m) { std_human_tick(m); } static void urchin_bemoved(MONST *m __attribute__((__unused__))) { } static const char *urchin_name(MONST *m __attribute__((__unused__))) { return("the urchin"); } static const char *urchin_Name(MONST *m __attribute__((__unused__))) { return("The urchin"); } static int urchin_attack(MONST *m __attribute__((__unused__))) { return(rnd(100)); } static int urchin_defend(MONST *m __attribute__((__unused__))) { return(rnd(25)); } static int urchin_givedamage(MONST *m __attribute__((__unused__)), int dd __attribute__((__unused__))) { return(roll("d1000")); } static MONOPS ops = { &urchin_tick, &urchin_bemoved, &urchin_name, &urchin_Name, &urchin_attack, &urchin_defend, &urchin_givedamage, &std_takedamage, &std_kill, &std_destroy }; static MONST *new(MONST *m, LEVEL *lv __attribute__((__unused__))) { m->symbol = 'u'; m->hp = 3000; m->maxhp = 3000; m->heal = 3; m->flags = Z_mad ? MF_TRACKING : 0; m->ops = &ops; return(m); } static void ctl(MONST *m, int op, ...) { va_list ap; va_start(ap,op); switch (op) { case MCTL_AGGR: { int ag; ag = va_arg(ap,int); if (ag) m->flags |= MF_TRACKING; else m->flags &= ~MF_TRACKING; } break; } va_end(ap); } static PROBINIT probs[] = { PROBALL(1), PROBELEM(0), PROBEND() }; extern MTINFO mtinfo_u; MTINFO mtinfo_u = { &probs[0], &new, &ctl };