- percent = rand_number(1, 101); /* 101% is a complete failure */
- prob = GET_SKILL(ch, SKILL_BASH);
+ if (MOB_FLAGGED(vict, MOB_NOKILL)) {
+ send_to_char(ch, "This mob is protected.\r\n");
+ return;
+ }
if (MOB_FLAGGED(vict, MOB_NOBASH))
percent = 101;
+ percent = rand_number(1, 101); /* 101% is a complete failure */
+ prob = GET_SKILL(ch, SKILL_BASH);
+
But if I'm reading this right, won't that make all mobs that are !Bash, become bash-able by setting percent to 101 if they are !Bash, and then setting percent to a random number?
Should this not read:
+ if (MOB_FLAGGED(vict, MOB_NOKILL)) {
+ send_to_char(ch, "This mob is protected.\r\n");
+ return;
+ }
percent = rand_number(1, 101); /* 101% is a complete failure */
prob = GET_SKILL(ch, SKILL_BASH);
if (MOB_FLAGGED(vict, MOB_NOBASH))
percent = 101;
anderyu



