On Tue, 9 Jul 1996, Brian Christopher Guilbault wrote:
> I have implemented a "dodge" skill on my mud wherein a warrior, if lucky,
> will completely avoid an attack. My question was whether anyone else had
> done this and how they go about checking for success.
>
> My skill works perfectly, and is checked automatically but I certainly
> don't want it to work 85 percent of the time or whataever warrior's
> skills can go up to. I would like it to work more like 15 percent or so.
> Should I first check to see if they make the 85%, then check again
> against 15% or should I not include it as a skill at all and just have it
> work 15% of the time? That is bad because then it wouldn't matter how
> good you were or what level, it would always be the same. Maybe a switch
> based on skill percentage, like if you had 0-10% in it you would dodge 5%
> of the time...see what I mean?
>
> Just looking for suggestions. How do YOU do it? Drop me a line if you
> have a good idea. I'd appreciate it.
Here's what I use, in hit(), right after the offense/defense check,
err, that translates to thac0 check I guess...
/* DODGE */
percent = number(1, 150) + GET_HITROLL(ch) + GET_DEX(ch);
prob = GET_SKILL(victim, SKILL_DODGE) + GET_DEX(victim);
if (GET_POS(victim) == POS_FIGHTING && prob > percent) {
act("$N swiftly dodges your attack.", FALSE, ch, 0, victim, TO_CHAR);
act("$N swiftly dodges $n's attack.", FALSE, ch, 0, victim, TO_NOTVICT);
act("You swiftly dodge $n's attack.", FALSE, ch, 0, victim, TO_VICT);
return;
}
learn(victim, SKILL_DODGE, 1000, 0);
I do parry checks afterwards, the same exact way, and it seems to work fine.
People with a decent dodge and parry both still get hit, only less...
-Sky
This archive was generated by hypermail 2b30 : 12/07/00 PST