Here it is only this is meant as a racial innate, Can be easier changed. As is it checks for skill so there I guess want take much. If you use this credit ........... "The Hubis Group" hubis.eushc.org:4000 www.cdc.net/~parka/" Banyal /* SNIP */ /* The damn mailer played cats cradle wiith line spacing */ ACMD(do_doorbash) /* BURU 5/12/97 */ /*Changed to a skill to allow multi_assigning to races in class.c */ /*Banyal*/ #define EXITK(room, dir) (world[room].dir_option[dir]) #define OPEN_DOORK(room, door) (TOGGLE_BIT(EXITK(room, door)->exit_info, EX_CLOSED)) { char arg[MAX_INPUT_LENGTH]; int dir, percent, temp; extern int rev_dir[]; one_argument(argument, arg); percent = number(0, 101); temp = percent + GET_LEVEL(ch); if (GET_LEVEL(ch) >= LVL_IMMORT){ temp = 101;} if (!*arg&&((GET_SKILL(ch, SKILL_DOORBASH))||(GET_LEVEL(ch)>=LVL_IMMORT))){ send_to_char("&0What direction?&0\r\n", ch); return;} if (GET_LEVEL(ch)<LVL_IMMORT){ if (!GET_SKILL(ch, SKILL_DOORBASH)){ send_to_char("&0You do not feel massive enough!&0\r\n", ch); return;}} if (*arg){ switch (*arg) { case 'n': case 'N': dir = 0; break; case 'e': case 'E': dir = 1; break; case 's': case 'S': dir = 2; break; case 'w': case 'W': dir = 3; break; case 'u': case 'U': dir = 4; break; case 'd': case 'D': dir = 5; break; default: send_to_char("Doorbash where?\r\n", ch); return; break; }} if ((GET_SKILL(ch, SKILL_DOORBASH)||(GET_LEVEL(ch)>=LVL_IMMORT))){ if (!EXIT(ch, dir) || EXIT(ch, dir)->to_room == NOWHERE){ send_to_char("&0Even YOU couldn't bash through that!...\r\n&0", ch); return;} if (EXIT(ch, dir) && EXIT(ch, dir)->to_room != NOWHERE && !IS_SET(EXIT(ch, dir)->exit_info, EX_CLOSED)) { send_to_char("&0There is no obstruction!&0\r\n", ch); return;} if (EXIT(ch, dir)) { if (!IS_SET(EXIT(ch, dir)->exit_info, EX_PICKPROOF)){ if ((IS_SET(EXIT(ch, dir)->exit_info, EX_CLOSED))||(IS_SET(EXIT(ch, dir)->exit_info, EX_LOCKED))){ if (temp < 80){ {sprintf(buf, "&0You charge at the %s &0but merely bounce off!&0\r\n", fname(EXIT(ch, dir)->keyword)); send_to_char(buf, ch);} {sprintf(buf, "&0$n &0charges at the %s and simple bounces off!&0", fname(EXIT(ch, dir)->keyword)); act(buf, FALSE, ch, 0, 0, TO_ROOM);} WAIT_STATE(ch, PULSE_VIOLENCE*3); if(GET_LEVEL(ch) < LVL_IMMORT){ if ((GET_HIT(ch)-(((percent/10)*(GET_LEVEL(ch)/10))+GET_LEVEL(ch)))>-5){ GET_HIT(ch) = GET_HIT(ch)-(((percent/10)*(GET_LEVEL(ch)/10))+GET_LEVEL(ch)); update_pos(ch);} else { GET_HIT(ch) = -5; update_pos(ch);} return;}} if (temp >79){ OPEN_DOORK(ch->in_room, dir); { sprintf(buf, "&0$n &0*CRASHES* through the %s&0!", fname(EXIT(ch, dir)->keyword)); act(buf, FALSE, ch, 0, 0, TO_ROOM);} { sprintf(buf, "&0You *CHARGE* at the %s &0and crash through it!&0\r\n", fname(EXIT(ch, dir)->keyword)); send_to_char(buf, ch);} { sprintf(buf, "&0&b&8Splinters and dust fly as $N &0&b&8*CRASHES* into the room!&0"); act(buf, FALSE, (world[EXIT(ch, dir)->to_room].people), 0, ch, TO_CHAR);} perform_move(ch, dir, 1); if (EXIT(ch, rev_dir[dir])) { OPEN_DOORK(ch->in_room, rev_dir[dir]); WAIT_STATE(ch, PULSE_VIOLENCE);} else{ return;}} return;}} else{ {sprintf(buf, "&0You CHARGE at the %s &0but merely bounce off!&0\r\n", fname(EXIT(ch, dir)->keyword)); send_to_char(buf, ch);} {sprintf(buf, "&0$n &0CHARGES at the %s&0 and literally bounces off!&0", fname(EXIT(ch, dir)->keyword)); act(buf, FALSE, ch, 0, 0, TO_ROOM);} WAIT_STATE(ch, PULSE_VIOLENCE*3); if(GET_LEVEL(ch) < LVL_IMMORT){ if ((GET_HIT(ch)-(((percent/10)*(GET_LEVEL(ch)/10))+GET_LEVEL(ch)))>-5){ GET_HIT(ch) = GET_HIT(ch)-(((percent/10)*(GET_LEVEL(ch)/10))+GET_LEVEL(ch)); update_pos(ch);} else { GET_HIT(ch) = -5; update_pos(ch);} } return; } } } } +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST