At 11:54 AM 3/15/96 +0100, you wrote:
>
>In perform_violence() (fight.c)
>
>if GET_SKILL(ch, SKILL_SECOND_ATTACK) != 0 {
> prob = GET_SKILL(ch, SKILL_SECOND_ATTACK);
> percent = number(1, 101);
>
> if (percent > prob)
> hit (ch, FIGHTING(ch), TYPE_UNDEFINED);
>}
>
would this not be better?
if (FIGHTING(ch)) /* <-- I've noticed some systems crash without this check */
if (number(1, 101) > GET_SKILL(ch, SKILL_SECOND_ATTACK))
hit(ch, FIGHTING(ch), TYPE_UNDEFINED);
That way you don't have to mess with prob and percent variables :)
Brazil - IMP of AddictMUD tolkien.realms.org 4000
206.185.33.2 4000
**** NOTE IP ADDRESS CHANGE, WE **ARE** BACK UP ****
This archive was generated by hypermail 2b30 : 12/07/00 PST