/* * CrossFire, A Multiplayer game for X-windows * * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team * Copyright (C) 2002 Mark Wedel & Crossfire Development Team * Copyright (C) 1992 Frank Tore Johansen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * The authors can be reached via e-mail at */ #include #include #include static const char *const orcknuckle[7] = { "none", "beholder", "ghost", "knight", "princess", "dragon", "orc" }; int command_orcknuckle (object *op, char *params) { char buf[MAX_BUF]; char buf2[MAX_BUF]; int i, j, k, l; i = rndm (1, 5); j = rndm (1, 5); k = rndm (1, 5); l = rndm (1, 6); snprintf (buf2, MAX_BUF - 1, "%s rolls %s, %s, %s, %s!", &op->name, orcknuckle[i], orcknuckle[j], orcknuckle[k], orcknuckle[l]); snprintf (buf, MAX_BUF - 1, "You roll %s, %s, %s, %s!", orcknuckle[i], orcknuckle[j], orcknuckle[k], orcknuckle[l]); new_draw_info (NDI_UNIQUE, 0, op, buf); new_info_map_except (NDI_UNIQUE, op->map, op, buf2); return 0; }