This is a bit of a newbie question in C programming but i just wanna make sure of what it is.
...
in act.offensive.c..
270 ACMD(do_bash)
271 {
272 struct char_data *vict;
273 int percent, prob;
274
275 one_argument(argument, arg);
276
277 if (GET_CLASS(ch) != CLASS_WARRIOR) {
278 send_to_char("You'd better leave all the martial arts to fighters.\r\n", ch);
279 return;
280 }
281 if (!(vict = get_char_room_vis(ch, arg))) {
282 if (FIGHTING(ch)) {
283 vict = FIGHTING(ch);
284 } else {
285 send_to_char("Bash who?\r\n", ch);
286 return;
287 }
288 }
289 if (vict == ch) {
290 send_to_char("Aren't we funny today...\r\n", ch);
291 return;
292 }
293 if (!GET_EQ(ch, WEAR_WIELD)) {
294 send_to_char("You need to wield a weapon to make it a success.\r\n", ch);
295 return;
296 }
297 percent = number(1, 101); /* 101% is a complete failure */
298 prob = GET_SKILL(ch, SKILL_BASH);
299
300 if (MOB_FLAGGED(vict, MOB_NOBASH))
301 percent = 101;
302
303 if (percent > prob) {
304 damage(ch, vict, 0, SKILL_BASH);
305 GET_POS(ch) = POS_SITTING;
306 } else {
307 damage(ch, vict, 1, SKILL_BASH);
308 GET_POS(vict) = POS_SITTING;
309 WAIT_STATE(vict, PULSE_VIOLENCE);
310 }
311 WAIT_STATE(ch, PULSE_VIOLENCE * 2);
312 }
on line 277 --- how would i make it so that it could also be a CLASS_DEMON that could do it? just add a || != CLASS_DEMON? or what...
thanx.
Creator..
wanna-be-coder/Imp/Builder of The Shadow Lands
main.phys.uconn.edu 4000
This archive was generated by hypermail 2b30 : 12/18/00 PST